summaryrefslogtreecommitdiff
path: root/net-mail/notmuch/files
diff options
context:
space:
mode:
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2022-09-12 19:18:43 -0400
committerAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2022-09-12 19:18:43 -0400
commit9b5bc1d934936ced5c4172538bc792217fcfa5e4 (patch)
treef31d00553835832e5c0f951cc61b59ebada97e24 /net-mail/notmuch/files
parentbbac56867d2bdd36d0f279f0f41cd27c758621e0 (diff)
downloadgentoo-overlay-9b5bc1d934936ced5c4172538bc792217fcfa5e4.tar.xz
gentoo-overlay-9b5bc1d934936ced5c4172538bc792217fcfa5e4.zip
net-mail/notmuch: sync ::gentoo
Diffstat (limited to 'net-mail/notmuch/files')
-rw-r--r--net-mail/notmuch/files/notmuch-assume-modern-gmime.patch38
1 files changed, 27 insertions, 11 deletions
diff --git a/net-mail/notmuch/files/notmuch-assume-modern-gmime.patch b/net-mail/notmuch/files/notmuch-assume-modern-gmime.patch
index 6e3c8d3..5c9f86a 100644
--- a/net-mail/notmuch/files/notmuch-assume-modern-gmime.patch
+++ b/net-mail/notmuch/files/notmuch-assume-modern-gmime.patch
@@ -1,8 +1,8 @@
diff --git a/configure b/configure
-index 6c3a38f1..39d1f8c6 100755
+index 5247e05a..097b2039 100755
--- a/configure
+++ b/configure
-@@ -464,215 +464,8 @@ if pkg-config --exists "gmime-3.0 >= $GMIME_MINVER"; then
+@@ -490,230 +490,9 @@ if pkg-config --exists "gmime-3.0 >= $GMIME_MINVER"; then
gmime_cflags=$(pkg-config --cflags gmime-3.0)
gmime_ldflags=$(pkg-config --libs gmime-3.0)
@@ -68,11 +68,7 @@ index 6c3a38f1..39d1f8c6 100755
- rm -rf "$TEMP_GPG"
- fi
-
-- # see https://github.com/jstedfast/gmime/pull/90
-- # should be fixed in GMime in 3.2.7, but some distros might patch
-- printf "Checking for GMime X.509 certificate validity... "
--
-- cat > _check_x509_validity.c <<EOF
+- cat > _check_gmime_cert.c <<EOF
-#include <stdio.h>
-#include <gmime/gmime.h>
-
@@ -84,7 +80,6 @@ index 6c3a38f1..39d1f8c6 100755
- GMimeSignature *sig = NULL;
- GMimeCertificate *cert = NULL;
- GMimeObject *output = NULL;
-- GMimeValidity validity = GMIME_VALIDITY_UNKNOWN;
- int len;
-
- g_mime_init ();
@@ -105,16 +100,27 @@ index 6c3a38f1..39d1f8c6 100755
- if (sig == NULL) return !! fprintf (stderr, "no GMimeSignature found at position 0\n");
- cert = g_mime_signature_get_certificate (sig);
- if (cert == NULL) return !! fprintf (stderr, "no GMimeCertificate found\n");
-- validity = g_mime_certificate_get_id_validity (cert);
+-#ifdef CHECK_VALIDITY
+- GMimeValidity validity = g_mime_certificate_get_id_validity (cert);
- if (validity != GMIME_VALIDITY_FULL) return !! fprintf (stderr, "Got validity %d, expected %d\n", validity, GMIME_VALIDITY_FULL);
--
+-#endif
+-#ifdef CHECK_EMAIL
+- const char *email = g_mime_certificate_get_email (cert);
+- if (! email) return !! fprintf (stderr, "no email returned");
+- if (email[0] == '<') return 2;
+-#endif
- return 0;
-}
-EOF
+-
+- # see https://github.com/jstedfast/gmime/pull/90
+- # should be fixed in GMime in 3.2.7, but some distros might patch
+- printf "Checking for GMime X.509 certificate validity... "
+-
- if ! TEMP_GPG=$(mktemp -d "${TMPDIR:-/tmp}/notmuch.XXXXXX"); then
- printf 'No.\nCould not make tempdir for testing X.509 certificate validity support.\n'
- errors=$((errors + 1))
-- elif ${CC} ${CFLAGS} ${gmime_cflags} _check_x509_validity.c ${gmime_ldflags} -o _check_x509_validity \
+- elif ${CC} -DCHECK_VALIDITY ${CFLAGS} ${gmime_cflags} _check_gmime_cert.c ${gmime_ldflags} -o _check_x509_validity \
- && echo disable-crl-checks > "$TEMP_GPG/gpgsm.conf" \
- && echo "4D:E0:FF:63:C0:E9:EC:01:29:11:C8:7A:EE:DA:3A:9A:7F:6E:C1:0D S" >> "$TEMP_GPG/trustlist.txt" \
- && GNUPGHOME=${TEMP_GPG} gpgsm --batch --quiet --import < "$srcdir"/test/smime/ca.crt
@@ -136,6 +142,15 @@ index 6c3a38f1..39d1f8c6 100755
- errors=$((errors + 1))
- fi
- fi
+- printf "Checking whether GMime emits email addresses with angle brackets... "
+- if ${CC} -DCHECK_EMAIL ${CFLAGS} ${gmime_cflags} _check_gmime_cert.c ${gmime_ldflags} -o _check_email &&
+- GNUPGHOME=${TEMP_GPG} ./_check_email; then
+- gmime_emits_angle_brackets=0
+- printf "No.\n"
+- else
+- gmime_emits_angle_brackets=1
+- printf "Yes.\n"
+- fi
- else
- printf 'No.\nFailed to set up gpgsm for testing X.509 certificate validity support.\n'
- errors=$((errors + 1))
@@ -217,6 +232,7 @@ index 6c3a38f1..39d1f8c6 100755
- fi
+ gmime_x509_cert_validity=1
+ gmime_verify_with_session_key=1
++ gmime_emits_angle_brackets=0
else
have_gmime=0
printf "No.\n"