From ca8ece71b6891e8022c030bd6446815c66bae3bb Mon Sep 17 00:00:00 2001 From: fbrosson Date: Wed, 17 Jan 2018 22:03:45 +0000 Subject: [PATCH] libgpg_error: allow header files to be parsed by gcc2. (#2133) --- .../libgpg_error/libgpg_error-1.27.recipe | 2 +- .../patches/libgpg_error-1.27.patchset | 48 +++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/dev-libs/libgpg_error/libgpg_error-1.27.recipe b/dev-libs/libgpg_error/libgpg_error-1.27.recipe index aa8e36c8f..c95a5542a 100644 --- a/dev-libs/libgpg_error/libgpg_error-1.27.recipe +++ b/dev-libs/libgpg_error/libgpg_error-1.27.recipe @@ -5,7 +5,7 @@ DirMngr, Pinentry, SmartCard Daemon and more." HOMEPAGE="https://www.gnupg.org/related_software/libraries.en.html#lib-libgpg-error" COPYRIGHT="2003-2016 g10 Code GmbH" LICENSE="GNU LGPL v2.1" -REVISION="3" +REVISION="4" SOURCE_URI="https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-$portVersion.tar.bz2" CHECKSUM_SHA256="4f93aac6fecb7da2b92871bb9ee33032be6a87b174f54abf8ddf0911a22d29d2" SOURCE_DIR="libgpg-error-$portVersion" diff --git a/dev-libs/libgpg_error/patches/libgpg_error-1.27.patchset b/dev-libs/libgpg_error/patches/libgpg_error-1.27.patchset index 7b53cb2b4..050fe1bc4 100644 --- a/dev-libs/libgpg_error/patches/libgpg_error-1.27.patchset +++ b/dev-libs/libgpg_error/patches/libgpg_error-1.27.patchset @@ -20,3 +20,51 @@ index ea58503..93cfef2 100644 -- 1.8.3.4 + +From 148704497e457b5d82d2d6d4d338f971a273a001 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/doc/yat2m.c b/doc/yat2m.c +index 9b76f19..6cda15a 100644 +--- a/doc/yat2m.c ++++ b/doc/yat2m.c +@@ -105,9 +105,14 @@ + + + #if __GNUC__ ++# ifdef __GNUC_PATCHLEVEL__ + # define MY_GCC_VERSION (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100 \ + + __GNUC_PATCHLEVEL__) ++# else ++# define MY_GCC_VERSION (__GNUC__ * 10000 \ ++ + __GNUC_MINOR__ * 100) ++# endif + #else + # define MY_GCC_VERSION 0 + #endif +diff --git a/src/gpg-error.h.in b/src/gpg-error.h.in +index 988898e..222a9b7 100644 +--- a/src/gpg-error.h.in ++++ b/src/gpg-error.h.in +@@ -142,9 +142,14 @@ typedef unsigned int gpg_error_t; + + /* GCC feature test. */ + #if __GNUC__ ++# ifdef __GNUC_PATCHLEVEL__ + # define _GPG_ERR_GCC_VERSION (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100 \ + + __GNUC_PATCHLEVEL__) ++# else ++# define _GPG_ERR_GCC_VERSION (__GNUC__ * 10000 \ ++ + __GNUC_MINOR__ * 100) ++# endif + #else + # define _GPG_ERR_GCC_VERSION 0 + #endif +-- +2.15.1 +