pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/p11-kit Only use -z nodelete linker flag if i...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2cfbf777a074
branches:  trunk
changeset: 457390:2cfbf777a074
user:      manu <manu%pkgsrc.org@localhost>
date:      Tue Aug 24 15:07:28 2021 +0000

description:
Only use -z nodelete linker flag if it is available.
This should fix the build on platforms that do not use GNU ld
such as MacOSX.

diffstat:

 security/p11-kit/Makefile                          |   4 +-
 security/p11-kit/distinfo                          |   6 +-
 security/p11-kit/patches/patch-Makefile.in         |  22 ++++++--
 security/p11-kit/patches/patch-configure           |  58 ++++++++++++++++++++++
 security/p11-kit/patches/patch-p11-kit_Makefile.am |  17 ------
 5 files changed, 79 insertions(+), 28 deletions(-)

diffs (151 lines):

diff -r 5a1e92ae3f28 -r 2cfbf777a074 security/p11-kit/Makefile
--- a/security/p11-kit/Makefile Tue Aug 24 13:50:38 2021 +0000
+++ b/security/p11-kit/Makefile Tue Aug 24 15:07:28 2021 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.22 2021/08/19 12:56:22 manu Exp $
+# $NetBSD: Makefile,v 1.23 2021/08/24 15:07:28 manu Exp $
 
 DISTNAME=      p11-kit-0.24.0
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    security
 #MASTER_SITES= http://p11-glue.freedesktop.org/releases/
 MASTER_SITES+= ${MASTER_SITE_GITHUB:=p11-glue/}
diff -r 5a1e92ae3f28 -r 2cfbf777a074 security/p11-kit/distinfo
--- a/security/p11-kit/distinfo Tue Aug 24 13:50:38 2021 +0000
+++ b/security/p11-kit/distinfo Tue Aug 24 15:07:28 2021 +0000
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.16 2021/08/19 12:56:22 manu Exp $
+$NetBSD: distinfo,v 1.17 2021/08/24 15:07:28 manu Exp $
 
 SHA1 (p11-kit-0.24.0.tar.xz) = 66380b519caa58d49f31f7fb4aae7b14e91b1a40
 RMD160 (p11-kit-0.24.0.tar.xz) = 5dab40899e748c0879f1a30fc7e06811898159a7
 SHA512 (p11-kit-0.24.0.tar.xz) = 48369d6fdae79b8c5a255c821fbdb982f0c649cce07c0d92f0ff0c16322fea8919faa94067cae2efede2da3646c0e69a71a3e399b769dc2327f247bcb113eb3c
 Size (p11-kit-0.24.0.tar.xz) = 834392 bytes
-SHA1 (patch-Makefile.in) = 70118888ecc6dffe5c9a5e397f62a89d708fff92
+SHA1 (patch-Makefile.in) = 3732824f96aca011d18239f3cd19b15ba250402b
 SHA1 (patch-common_compat.c) = bdcb10cebe5e7755c81f88ef033b9dfecd7a1aad
-SHA1 (patch-p11-kit_Makefile.am) = fb90182abbe91cb3f329eb97bec1bcb15e0e9ac2
+SHA1 (patch-configure) = 1ff50e077420a59f648867210abcf114223f8231
diff -r 5a1e92ae3f28 -r 2cfbf777a074 security/p11-kit/patches/patch-Makefile.in
--- a/security/p11-kit/patches/patch-Makefile.in        Tue Aug 24 13:50:38 2021 +0000
+++ b/security/p11-kit/patches/patch-Makefile.in        Tue Aug 24 15:07:28 2021 +0000
@@ -1,19 +1,29 @@
-$NetBSD: patch-Makefile.in,v 1.5 2021/08/19 12:56:22 manu Exp $
+$NetBSD: patch-Makefile.in,v 1.6 2021/08/24 15:07:28 manu Exp $
 
 Install examples into pkgsrc example directory.
 Avoid non-portable use of readlink(1) in Makefile.
 Since libp11-kit installs pthread_atfork() callback, make sure
-it cannot be unloaded.
+it cannot be unloaded. Upstream https://github.com/p11-glue/p11-kit/pull/383
 
---- Makefile.in.orig   2021-06-03 16:51:18.000000000 +0200
-+++ Makefile.in        2021-08-17 10:49:29.475741852 +0200
-@@ -1906,9 +1906,9 @@
+--- Makefile.in.orig   2021-08-24 16:41:00.329897753 +0200
++++ Makefile.in        2021-08-24 16:41:49.846525265 +0200
+@@ -1619,8 +1619,9 @@
+ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+ LCOV = @LCOV@
+ LD = @LD@
+ LDFLAGS = @LDFLAGS@
++LDFLAGS_Z_NODELETE = @LDFLAGS_Z_NODELETE@
+ LIBFFI_CFLAGS = @LIBFFI_CFLAGS@
+ LIBFFI_LIBS = @LIBFFI_LIBS@
+ LIBICONV = @LIBICONV@
+ LIBINTL = @LIBINTL@
+@@ -1906,9 +1907,9 @@
        $(LTLIBINTL) \
        $(NULL)
  
  libp11_kit_la_CFLAGS = $(COMMON_CFLAGS)
 -libp11_kit_la_LDFLAGS = -no-undefined -version-info \
-+libp11_kit_la_LDFLAGS = -Wl,-z -Wl,nodelete -no-undefined -version-info \
++libp11_kit_la_LDFLAGS = $(LDFLAGS_Z_NODELETE) -no-undefined -version-info \
        $(P11KIT_LT_RELEASE) $(am__append_3) $(am__append_4)
  libp11_kit_la_SOURCES = \
        p11-kit/proxy.c p11-kit/proxy.h p11-kit/proxy-init.c \
diff -r 5a1e92ae3f28 -r 2cfbf777a074 security/p11-kit/patches/patch-configure
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/p11-kit/patches/patch-configure  Tue Aug 24 15:07:28 2021 +0000
@@ -0,0 +1,58 @@
+$NetBSD: patch-configure,v 1.1 2021/08/24 15:07:28 manu Exp $
+
+Since libp11-kit installs pthread_atfork() callback, make sure
+it cannot be unloaded.
+
+Submitted upstream https://github.com/p11-glue/p11-kit/pull/383
+
+--- configure.orig     2021-08-24 16:33:08.796020438 +0200
++++ configure  2021-08-24 16:39:51.633852995 +0200
+@@ -711,8 +711,9 @@
+ USE_NLS
+ PKG_CONFIG_LIBDIR
+ PKG_CONFIG_PATH
+ PKG_CONFIG
++LDFLAGS_Z_NODELETE
+ HAVE_LD_VERSION_SCRIPT_FALSE
+ HAVE_LD_VERSION_SCRIPT_TRUE
+ LT_SYS_LIBRARY_PATH
+ OTOOL64
+@@ -12747,8 +12748,38 @@
+   HAVE_LD_VERSION_SCRIPT_TRUE='#'
+   HAVE_LD_VERSION_SCRIPT_FALSE=
+ fi
+ 
++# --------------------------------------------------------------------
++# Check for -z nodelete link flag
++
++SAVE_LDFLAGS="$LDFLAGS"
++LDFLAGS="$LDFLAGS -Wl,-z -Wl,nodelete"
++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether linker understands -z nodelete" >&5
++printf %s "checking whether linker understands -z nodelete... " >&6; }
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main (void)
++{
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"
++then :
++  LDFLAGS_Z_NODELETE="-Wl,-z -Wl,nodelete"; has_option=yes
++else $as_nop
++  LDFLAGS_Z_NODELETE=""; has_option=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.beam \
++    conftest$ac_exeext conftest.$ac_ext
++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
++printf "%s\n" "$has_option" >&6; }
++LDFLAGS="$SAVE_LDFLAGS"
++
+ 
+ 
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
diff -r 5a1e92ae3f28 -r 2cfbf777a074 security/p11-kit/patches/patch-p11-kit_Makefile.am
--- a/security/p11-kit/patches/patch-p11-kit_Makefile.am        Tue Aug 24 13:50:38 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-$NetBSD: patch-p11-kit_Makefile.am,v 1.1 2021/08/19 12:56:22 manu Exp $
-
-Since libp11-kit installs pthread_atfork() callback, make sure
-it cannot be unloaded. 
-
---- p11-kit/Makefile.am.orig   2021-08-17 10:42:09.913595860 +0200
-+++ p11-kit/Makefile.am        2021-08-17 10:42:27.522236458 +0200
-@@ -86,8 +86,9 @@
- 
- libp11_kit_la_CFLAGS = $(COMMON_CFLAGS)
- 
- libp11_kit_la_LDFLAGS = \
-+      -Wl,-z -Wl,nodelete \
-       -no-undefined \
-       -version-info $(P11KIT_LT_RELEASE)
- 
- if HAVE_LD_VERSION_SCRIPT



Home | Main Index | Thread Index | Old Index