From 092b6b68a0669121887d79e5d2685ed7a9da2d52 Mon Sep 17 00:00:00 2001 From: Svend Sorensen Date: Tue, 9 Aug 2016 17:01:09 -0700 Subject: [PATCH 1/2] gnupg: Fix gpgsm linking for gnupg 2.1.14 gnupg 2.1.14 fails to compile under OS X due to a missing -lintl flag [1]. This was fixed in commit c49c43d7 in the gnupg repository [2], which adds the flag to Makefile.am. This commit adds the flag to Makefile.in. [1] https://lists.gnupg.org/pipermail/gnupg-devel/2016-July/031354.html [2] https://lists.gnupg.org/pipermail/gnupg-devel/2016-July/031362.html Fixes #17617. --- pkgs/tools/security/gnupg/21.nix | 2 ++ pkgs/tools/security/gnupg/fix-gpgsm-linking.patch | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 pkgs/tools/security/gnupg/fix-gpgsm-linking.patch diff --git a/pkgs/tools/security/gnupg/21.nix b/pkgs/tools/security/gnupg/21.nix index 30ce33bd6a5..b5f1f3b94b7 100644 --- a/pkgs/tools/security/gnupg/21.nix +++ b/pkgs/tools/security/gnupg/21.nix @@ -27,6 +27,8 @@ stdenv.mkDerivation rec { readline libusb gnutls adns openldap zlib bzip2 ]; + patches = [ ./fix-gpgsm-linking.patch ]; + postPatch = stdenv.lib.optionalString stdenv.isLinux '' sed -i 's,"libpcsclite\.so[^"]*","${pcsclite}/lib/libpcsclite.so",g' scd/scdaemon.c ''; #" fix Emacs syntax highlighting :-( diff --git a/pkgs/tools/security/gnupg/fix-gpgsm-linking.patch b/pkgs/tools/security/gnupg/fix-gpgsm-linking.patch new file mode 100644 index 00000000000..290d43f5b0d --- /dev/null +++ b/pkgs/tools/security/gnupg/fix-gpgsm-linking.patch @@ -0,0 +1,11 @@ +--- a/tests/gpgscm/Makefile.in ++++ b/tests/gpgscm/Makefile.in +@@ -457,7 +457,7 @@ + scheme-config.h opdefines.h scheme.c scheme.h scheme-private.h + + gpgscm_LDADD = $(LDADD) $(common_libs) \ +- $(NETLIBS) $(LIBICONV) $(LIBREADLINE) \ ++ $(NETLIBS) $(LIBICONV) $(LIBREADLINE) $(LIBINTL) \ + $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) + + t_child_SOURCES = t-child.c From ac2836610d864e9ccbe6247baddcd74d4f11094f Mon Sep 17 00:00:00 2001 From: Svend Sorensen Date: Mon, 15 Aug 2016 11:16:55 -0700 Subject: [PATCH 2/2] gnupg: Add comment about when to drop fix-gpgsm-linking.patch --- pkgs/tools/security/gnupg/21.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/tools/security/gnupg/21.nix b/pkgs/tools/security/gnupg/21.nix index b5f1f3b94b7..7913b22976b 100644 --- a/pkgs/tools/security/gnupg/21.nix +++ b/pkgs/tools/security/gnupg/21.nix @@ -27,6 +27,8 @@ stdenv.mkDerivation rec { readline libusb gnutls adns openldap zlib bzip2 ]; + # gpgsm-linking is fixed by commit (c49c43d7) in the gnupg master branch; + # fix-gpgsm-linking.patch should be dropped after gnupg 2.1.15 is released patches = [ ./fix-gpgsm-linking.patch ]; postPatch = stdenv.lib.optionalString stdenv.isLinux ''