From aa1ef87d514b11a1522c47854bd20dbf72a862ea Mon Sep 17 00:00:00 2001 From: fbrosson Date: Wed, 17 Jan 2018 22:03:45 +0000 Subject: [PATCH] libassuan: allow header files to be parsed by gcc2. (#2133) --- dev-libs/libassuan/libassuan-2.5.1.recipe | 2 +- .../patches/libassuan-2.5.1.patchset | 35 +++++++++++++++++-- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/dev-libs/libassuan/libassuan-2.5.1.recipe b/dev-libs/libassuan/libassuan-2.5.1.recipe index e1992943a..40a434510 100644 --- a/dev-libs/libassuan/libassuan-2.5.1.recipe +++ b/dev-libs/libassuan/libassuan-2.5.1.recipe @@ -8,7 +8,7 @@ LICENSE=" GNU GPL v3 GNU LGPL v2.1 " -REVISION="1" +REVISION="2" HOMEPAGE="https://www.gnupg.org/related_software/libassuan/" SOURCE_URI="ftp://ftp.gnupg.org/gcrypt/libassuan/libassuan-$portVersion.tar.bz2" CHECKSUM_SHA256="47f96c37b4f2aac289f0bc1bacfa8bd8b4b209a488d3d15e2229cb6cc9b26449" diff --git a/dev-libs/libassuan/patches/libassuan-2.5.1.patchset b/dev-libs/libassuan/patches/libassuan-2.5.1.patchset index 598f48390..27e98def2 100644 --- a/dev-libs/libassuan/patches/libassuan-2.5.1.patchset +++ b/dev-libs/libassuan/patches/libassuan-2.5.1.patchset @@ -9,15 +9,15 @@ Rewrite to use AC_SEARCH_LIBS. 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac -index cb21af1..ca82038 100644 +index 9b97ad4..5d00d35 100644 --- a/configure.ac +++ b/configure.ac -@@ -263,9 +263,11 @@ AC_DEFINE_UNQUOTED(BUILD_TIMESTAMP, "$BUILD_TIMESTAMP", +@@ -284,9 +284,11 @@ AC_DEFINE_UNQUOTED(BUILD_TIMESTAMP, "$BUILD_TIMESTAMP", # # Check for network libraries. They are needed for tests. # -AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt, -- [NETLIBS="-lsocket $NETLIBS"])) +- [NETLIBS="-lsocket $NETLIBS"])) +_save_libs="$LIBS" +AC_SEARCH_LIBS(setsockopt, network socket, [], [], [$NETLIBS]) +NETLIBS="$LIBS $NETLIBS" @@ -29,3 +29,32 @@ index cb21af1..ca82038 100644 -- 1.8.3.4 + +From 5bab7edd125430bc91abe4e0570a9ed3e05b6314 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/assuan.h.in b/src/assuan.h.in +index f9899d8..7136aac 100644 +--- a/src/assuan.h.in ++++ b/src/assuan.h.in +@@ -64,9 +64,14 @@ extern "C" + + /* Check for compiler features. */ + #if __GNUC__ ++#ifdef __GNUC_PATCHLEVEL__ + #define _ASSUAN_GCC_VERSION (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100 \ + + __GNUC_PATCHLEVEL__) ++#else ++#define _ASSUAN_GCC_VERSION (__GNUC__ * 10000 \ ++ + __GNUC_MINOR__ * 100) ++#endif + + #if _ASSUAN_GCC_VERSION > 30100 + #define _ASSUAN_DEPRECATED __attribute__ ((__deprecated__)) +-- +2.15.1 +