From 6ea4afd620d6e1894199289bc95256aff2f9ba77 Mon Sep 17 00:00:00 2001 From: fbrosson Date: Wed, 17 Jan 2018 22:03:45 +0000 Subject: [PATCH] libgcrypt: allow header files to be parsed by gcc2. (#2133) --- dev-libs/libgcrypt/libgcrypt-1.8.2.recipe | 2 +- .../patches/libgcrypt-1.8.2.patchset | 35 +++++++++++++++++-- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/dev-libs/libgcrypt/libgcrypt-1.8.2.recipe b/dev-libs/libgcrypt/libgcrypt-1.8.2.recipe index 976a9c771..8075dac22 100644 --- a/dev-libs/libgcrypt/libgcrypt-1.8.2.recipe +++ b/dev-libs/libgcrypt/libgcrypt-1.8.2.recipe @@ -4,7 +4,7 @@ used in GnuPG." HOMEPAGE="https://gnupg.org/related_software/libgcrypt/" COPYRIGHT="2000-2017 Free Software Foundation, Inc." LICENSE="GNU LGPL v3" -REVISION="1" +REVISION="2" SOURCE_URI="https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-$portVersion.tar.bz2" CHECKSUM_SHA256="c8064cae7558144b13ef0eb87093412380efa16c4ee30ad12ecb54886a524c07" PATCHES="libgcrypt-$portVersion.patchset" diff --git a/dev-libs/libgcrypt/patches/libgcrypt-1.8.2.patchset b/dev-libs/libgcrypt/patches/libgcrypt-1.8.2.patchset index b0293db9c..22a5a7e13 100644 --- a/dev-libs/libgcrypt/patches/libgcrypt-1.8.2.patchset +++ b/dev-libs/libgcrypt/patches/libgcrypt-1.8.2.patchset @@ -5,10 +5,10 @@ Subject: haiku patch diff --git a/configure.ac b/configure.ac -index 487a1bc..aa8bc7a 100644 +index 672396c..1915737 100644 --- a/configure.ac +++ b/configure.ac -@@ -763,6 +763,7 @@ fi +@@ -761,6 +761,7 @@ fi AC_SEARCH_LIBS(setsockopt, [socket], , [AC_SEARCH_LIBS(setsockopt, [socket], , , [-lnsl])]) AC_SEARCH_LIBS(setsockopt, [nsl]) @@ -27,7 +27,7 @@ Subject: gcc2 patch diff --git a/src/hwf-x86.c b/src/hwf-x86.c -index eeacccb..52fad3c 100644 +index 0d3a1f4..32bdfa9 100644 --- a/src/hwf-x86.c +++ b/src/hwf-x86.c @@ -103,7 +103,7 @@ get_xgetbv(void) @@ -42,3 +42,32 @@ index eeacccb..52fad3c 100644 -- 2.2.2 + +From 9f39e7bd9b26b9938e9cdebf53e3f39b21183097 Mon Sep 17 00:00:00 2001 +From: fbrosson +Date: Wed, 17 Jan 2018 22:03:45 +0000 +Subject: Do not use __GNUC_PATCHLEVEL__ if it's not defined. + + +diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in +index 89b1303..5d82564 100644 +--- a/src/gcrypt.h.in ++++ b/src/gcrypt.h.in +@@ -82,9 +82,14 @@ extern "C" { + underscore they are subject to change without notice. */ + #ifdef __GNUC__ + ++#ifdef __GNUC_PATCHLEVEL__ + #define _GCRY_GCC_VERSION (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100 \ + + __GNUC_PATCHLEVEL__) ++#else ++#define _GCRY_GCC_VERSION (__GNUC__ * 10000 \ ++ + __GNUC_MINOR__ * 100) ++#endif + + #if _GCRY_GCC_VERSION >= 30100 + #define _GCRY_GCC_ATTR_DEPRECATED __attribute__ ((__deprecated__)) +-- +2.15.1 +