git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #108752 from marsam/fix-gpgme-darwin

gpgme: fix build on darwin

commitbdc86af5ec9c5659d638469041d49b05cc6a2304 authorMichael Weiss <dev.primeos@gmail.com> dateFri 8 Jan 2021, 12:37 (6 years ago) parent5000e5774c81a6
2 files changed+39−1
pkgs/development/libraries/gpgme/default.nix+3−1 pkgs/development/libraries/gpgme/fix-clang-autoconf-undeclared-warning.patch+36
pkgs/development/libraries/gpgme/default.nix+3−1
@@ -34,7 +34,9 @@ stdenv.mkDerivation rec {
3434 sha256 = "00d4sxq63601lzdp2ha1i8fvybh7dzih4531jh8bx07fab3sw65g";
3535 })
3636 # Disable python tests on Darwin as they use gpg (see configureFlags below)
37− ] ++ lib.optional stdenv.isDarwin ./disable-python-tests.patch;
37+ ] ++ lib.optional stdenv.isDarwin ./disable-python-tests.patch
38+ # Fix _AC_UNDECLARED_WARNING for autoconf≥2.70. See https://lists.gnupg.org/pipermail/gnupg-devel/2020-November/034643.html
39+ ++ lib.optional stdenv.cc.isClang ./fix-clang-autoconf-undeclared-warning.patch;
3840
3941 outputs = [ "out" "dev" "info" ];
4042 outputBin = "dev"; # gpgme-config; not so sure about gpgme-tool
pkgs/development/libraries/gpgme/fix-clang-autoconf-undeclared-warning.patchnew file+36
@@ -0,0 +1,36 @@
1+diff -Naur gpgme.old/configure.ac gpgme.new/configure.ac
2+--- gpgme.old/configure.ac 2020-11-12 04:19:50.000000000 -0500
3++++ gpgme.new/configure.ac 2021-01-08 03:04:38.000000000 -0500
4+@@ -166,6 +166,16 @@
5+ mym4_minor mym4_micro)
6+ AC_SUBST(VERSION_NUMBER)
7+
8++# Try to find a thread-safe version of ttyname().
9++gnupg_REPLACE_TTYNAME_R
10++if test "$ac_cv_func_ttyname_r" != yes; then
11++ AC_MSG_WARN([
12++***
13++*** ttyname() is not thread-safe and ttyname_r() does not exist
14++***])
15++fi
16++
17++
18+ # We need to compile and run a program on the build machine. A
19+ # comment in libgpg-error says that the AC_PROG_CC_FOR_BUILD macro in
20+ # the AC archive is broken for autoconf 2.57. Given that there is no
21+@@ -658,15 +668,6 @@
22+
23+ AC_FUNC_FSEEKO
24+
25+-# Try to find a thread-safe version of ttyname().
26+-gnupg_REPLACE_TTYNAME_R
27+-if test "$ac_cv_func_ttyname_r" != yes; then
28+- AC_MSG_WARN([
29+-***
30+-*** ttyname() is not thread-safe and ttyname_r() does not exist
31+-***])
32+-fi
33+-
34+ # Try to find a thread-safe version of getenv().
35+ have_thread_safe_getenv=no
36+ jm_GLIBC21