1 |
commit: 78147a1e291cd661a15126c31ff4374675609a94 |
2 |
Author: Matthew Smith <matthew <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jun 26 12:46:10 2022 +0000 |
4 |
Commit: Matthew Smith <matthew <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jun 26 12:54:19 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78147a1e |
7 |
|
8 |
sys-devel/mold: use pkg-config to find OpenSSL |
9 |
|
10 |
Signed-off-by: Matthew Smith <matthew <AT> gentoo.org> |
11 |
|
12 |
.../mold/files/mold-1.3.0-openssl-pkgconfig.patch | 28 ++++++++++++++++++++++ |
13 |
sys-devel/mold/mold-9999.ebuild | 1 + |
14 |
2 files changed, 29 insertions(+) |
15 |
|
16 |
diff --git a/sys-devel/mold/files/mold-1.3.0-openssl-pkgconfig.patch b/sys-devel/mold/files/mold-1.3.0-openssl-pkgconfig.patch |
17 |
new file mode 100644 |
18 |
index 000000000000..d2ed0af47b41 |
19 |
--- /dev/null |
20 |
+++ b/sys-devel/mold/files/mold-1.3.0-openssl-pkgconfig.patch |
21 |
@@ -0,0 +1,28 @@ |
22 |
+From a4fde946f49cddf4f7c1eceb3b86ca38375cec1d Mon Sep 17 00:00:00 2001 |
23 |
+From: Matthew Smith <matt@×××××××××.uk> |
24 |
+Date: Sun, 26 Jun 2022 13:44:36 +0100 |
25 |
+Subject: [PATCH] Revert "Do not use pkg-config" |
26 |
+ |
27 |
+This reverts commit 4ef90d4316bbba3a4b8902e38bf5f68171cc6ab7. |
28 |
+--- a/Makefile |
29 |
++++ b/Makefile |
30 |
+@@ -18,6 +18,9 @@ ifeq ($(origin CXX), default) |
31 |
+ CXX = c++ |
32 |
+ endif |
33 |
+ |
34 |
++# Allow overriding pkg-config binary |
35 |
++PKG_CONFIG = pkg-config |
36 |
++ |
37 |
+ # If you want to keep symbols in the installed binary, run make with |
38 |
+ # `STRIP=true` to run /bin/true instead of the strip command. |
39 |
+ STRIP = strip |
40 |
+@@ -100,7 +103,8 @@ ifeq ($(OS), Darwin) |
41 |
+ endif |
42 |
+ |
43 |
+ ifeq ($(NEEDS_LIBCRYPTO), 1) |
44 |
+- MOLD_LDFLAGS += -lcrypto |
45 |
++ MOLD_CXXFLAGS += $(shell $(PKG_CONFIG) --cflags-only-I openssl) |
46 |
++ MOLD_LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L openssl) -lcrypto |
47 |
+ endif |
48 |
+ |
49 |
+ # '-latomic' flag is needed building on riscv64 system. |
50 |
|
51 |
diff --git a/sys-devel/mold/mold-9999.ebuild b/sys-devel/mold/mold-9999.ebuild |
52 |
index 87931221e192..d5c163c1ba90 100644 |
53 |
--- a/sys-devel/mold/mold-9999.ebuild |
54 |
+++ b/sys-devel/mold/mold-9999.ebuild |
55 |
@@ -31,6 +31,7 @@ DEPEND="${RDEPEND}" |
56 |
PATCHES=( |
57 |
# Bug #841575 |
58 |
"${FILESDIR}"/${PN}-1.2.1-install-nopython.patch |
59 |
+ "${FILESDIR}"/${PN}-1.3.0-openssl-pkgconfig.patch |
60 |
) |
61 |
|
62 |
pkg_pretend() { |