summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhorben <khorben@pkgsrc.org>2022-07-10 02:40:52 +0000
committerkhorben <khorben@pkgsrc.org>2022-07-10 02:40:52 +0000
commit2858aece8f5b418cba4a1b1edfa0b910eeb58c78 (patch)
tree8e9449de432abd9f394fd26b97eaa1e95b002140
parentf79d807f99fde0a9497fb2f4aa1a78713a0aa59b (diff)
downloadpkgsrc-2858aece8f5b418cba4a1b1edfa0b910eeb58c78.tar.gz
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.
-rw-r--r--security/libpe/Makefile3
-rw-r--r--security/libpe/distinfo3
-rw-r--r--security/libpe/patches/patch-Makefile26
3 files changed, 30 insertions, 2 deletions
diff --git a/security/libpe/Makefile b/security/libpe/Makefile
index a7ad5a78899..5b77d2d87dc 100644
--- a/security/libpe/Makefile
+++ b/security/libpe/Makefile
@@ -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 --git a/security/libpe/distinfo b/security/libpe/distinfo
index b9377642ee3..486c4fb18b2 100644
--- a/security/libpe/distinfo
+++ b/security/libpe/distinfo
@@ -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 --git a/security/libpe/patches/patch-Makefile b/security/libpe/patches/patch-Makefile
new file mode 100644
index 00000000000..f38f35be177
--- /dev/null
+++ b/security/libpe/patches/patch-Makefile
@@ -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)