pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/security/libpe libpe: add some link-time flags



details:   https://anonhg.NetBSD.org/pkgsrc/rev/098795608867
branches:  trunk
changeset: 381573:098795608867
user:      khorben <khorben%pkgsrc.org@localhost>
date:      Sun Jul 10 02:40:52 2022 +0000

description:
libpe: add some link-time flags

This sets the rpath when linking libpe, and an absolute install_name
when linking libpe on macOS.

This notably fixes the build on macOS with PKG_DEVELOPER=yes.

Tested on NetBSD/amd64, macOS/amd64.

Bumps PKGREVISION.

diffstat:

 security/libpe/Makefile               |   3 ++-
 security/libpe/distinfo               |   3 ++-
 security/libpe/patches/patch-Makefile |  26 ++++++++++++++++++++++++++
 3 files changed, 30 insertions(+), 2 deletions(-)

diffs (55 lines):

diff -r a9824415e76a -r 098795608867 security/libpe/Makefile
--- a/security/libpe/Makefile   Sun Jul 10 01:10:44 2022 +0000
+++ b/security/libpe/Makefile   Sun Jul 10 02:40:52 2022 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.2 2021/05/30 00:49:51 khorben Exp $
+# $NetBSD: Makefile,v 1.3 2022/07/10 02:40:52 khorben Exp $
 
 .include "../../security/libpe/Makefile.common"
 
 DISTNAME=      ${GITHUB_PROJECT}-${PEV_VERSION}
+PKGREVISION=   1
 GITHUB_PROJECT=        libpe
 GITHUB_TAG=    ce39b127328e3863e08163962f7ecc768eb2555e
 
diff -r a9824415e76a -r 098795608867 security/libpe/distinfo
--- a/security/libpe/distinfo   Sun Jul 10 01:10:44 2022 +0000
+++ b/security/libpe/distinfo   Sun Jul 10 02:40:52 2022 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.3 2021/10/26 11:17:14 nia Exp $
+$NetBSD: distinfo,v 1.4 2022/07/10 02:40:52 khorben Exp $
 
 BLAKE2s (libpe-0.81-ce39b127328e3863e08163962f7ecc768eb2555e.tar.gz) = c03b0febd665c337ff7a1a9f47bd77c97c6cde2ba07f8085de61c3d2580c9757
 SHA512 (libpe-0.81-ce39b127328e3863e08163962f7ecc768eb2555e.tar.gz) = 3d05f896c710e2daffe34503409d9a2201d86fa14dad722aa14c23bb84cc88e45ff38a8e2746766f194e8b9b54bb9b07ae64b5bf7d8fd928db27fa895ea101c2
 Size (libpe-0.81-ce39b127328e3863e08163962f7ecc768eb2555e.tar.gz) = 123068 bytes
+SHA1 (patch-Makefile) = dabd1c3396948adfa6084b9161ea834e5521a6aa
diff -r a9824415e76a -r 098795608867 security/libpe/patches/patch-Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/libpe/patches/patch-Makefile     Sun Jul 10 02:40:52 2022 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-Makefile,v 1.1 2022/07/10 02:40:52 khorben Exp $
+
+Set the rpath when linking libpe
+Set an absolute install_name when linking libpe on macOS
+
+--- Makefile.orig      2021-01-11 23:28:07.000000000 +0000
++++ Makefile
+@@ -53,7 +53,8 @@ override CFLAGS += \
+       -I"./include" \
+       -W -Wall -Wextra -pedantic -std=c99 -c
+ override CPPFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
+-override LDFLAGS += -lssl -lcrypto
++override LDFLAGS += -lssl -lcrypto \
++      -Wl,-rpath,$(libdir)
+ 
+ ifneq ($(PLATFORM_OS), CYGWIN)
+       override CFLAGS += -fPIC
+@@ -90,7 +91,7 @@ else ifeq ($(PLATFORM_OS), OpenBSD)
+       $(LINK) -shared -Wl,-soname,$(LIBNAME).so.1 $(LDFLAGS) -o $(LIBNAME).so $^
+ else ifeq ($(PLATFORM_OS), Darwin)
+       $(LINK) -headerpad_max_install_names -dynamiclib \
+-              -flat_namespace -install_name $(LIBNAME).$(VERSION).dylib \
++              -flat_namespace -install_name $(libdir)/$(LIBNAME).$(VERSION).dylib \
+               -current_version $(VERSION) -compatibility_version $(VERSION) \
+               $(LDFLAGS) -o $(LIBNAME).dylib $^
+ else ifeq ($(PLATFORM_OS), CYGWIN)



Home | Main Index | Thread Index | Old Index