commit:     4f4eb2c0233265332d3725e4658f5c616936148e
Author:     Stefan Strogin <steils <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  2 09:27:49 2020 +0000
Commit:     Stefan Strogin <steils <AT> gentoo <DOT> org>
CommitDate: Mon Nov  2 09:55:24 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f4eb2c0

dev-libs/libressl: fix building with USE=-static-libs

Closes: https://bugs.gentoo.org/751532
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Stefan Strogin <steils <AT> gentoo.org>

 dev-libs/libressl/files/libressl-3.2.2-build.patch | 56 ++++++++++++++++++++++
 dev-libs/libressl/libressl-3.2.2.ebuild            |  1 +
 2 files changed, 57 insertions(+)

diff --git a/dev-libs/libressl/files/libressl-3.2.2-build.patch 
b/dev-libs/libressl/files/libressl-3.2.2-build.patch
new file mode 100644
index 00000000000..586e7a7a423
--- /dev/null
+++ b/dev-libs/libressl/files/libressl-3.2.2-build.patch
@@ -0,0 +1,56 @@
+From 9abd36e3af5876f67c633f27496ad5660ab7fe24 Mon Sep 17 00:00:00 2001
+From: Brent Cook <[email protected]>
+Date: Sun, 18 Oct 2020 22:14:03 -0500
+Subject: [PATCH] modify nc build to link libcompat objects directly
+
+Rather than assuming the static version of libcrypto exists for pulling in the 
compatibility functions, link the compat objects directly. This modifies the 
object file generation script a bit to handle the empty-case properly as well.
+---
+ apps/nc/Makefile.am | 8 ++++++--
+ crypto/Makefile.am  | 4 ++--
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/apps/nc/Makefile.am b/apps/nc/Makefile.am
+index d678f1eda..58b5c0118 100644
+--- a/apps/nc/Makefile.am
++++ b/apps/nc/Makefile.am
+@@ -1,5 +1,7 @@
+ include $(top_srcdir)/Makefile.am.common
+ 
++-include $(abs_top_builddir)/crypto/libcrypto_la_objects.mk
++
+ if BUILD_NC
+ 
+ if ENABLE_NC
+@@ -12,11 +14,13 @@ endif
+ EXTRA_DIST = nc.1
+ EXTRA_DIST += CMakeLists.txt
+ 
+-nc_LDFLAGS = $(abs_top_builddir)/crypto/.libs/libcrypto.a
+-
+ nc_LDADD = $(abs_top_builddir)/tls/libtls.la
+ nc_LDADD += $(PLATFORM_LDADD) $(PROG_LDADD)
+ 
++nc_LDADD += $(libcrypto_la_objects)
++nc_LDADD += $(libcompat_la_objects)
++nc_LDADD += $(libcompatnoopt_la_objects)
++
+ AM_CPPFLAGS += -I$(top_srcdir)/apps/nc/compat
+ 
+ nc_SOURCES = atomicio.c
+diff --git a/crypto/Makefile.am b/crypto/Makefile.am
+index 97a84e1a7..e32ca96c3 100644
+--- a/crypto/Makefile.am
++++ b/crypto/Makefile.am
+@@ -99,10 +99,10 @@ libcrypto_la_objects.mk: Makefile
+         | sed 's/  */ $$\(abs_top_builddir\)\/crypto\//g' \
+         > libcrypto_la_objects.mk
+       @echo "libcompat_la_objects= $(libcompat_la_OBJECTS)" \
+-        | sed 's/  */ $$\(abs_top_builddir\)\/crypto\//g' \
++        | sed 's/compat\// $$\(abs_top_builddir\)\/crypto\/&/g' \
+         >> libcrypto_la_objects.mk
+       @echo "libcompatnoopt_la_objects= $(libcompatnoopt_la_OBJECTS)" \
+-        | sed 's/  */ $$\(abs_top_builddir\)\/crypto\//g' \
++        | sed 's/compat\// $$\(abs_top_builddir\)\/crypto\/&/g' \
+         >> libcrypto_la_objects.mk
+ 
+ libcrypto_la_LDFLAGS = -version-info @LIBCRYPTO_VERSION@ -no-undefined 
-export-symbols crypto_portable.sym

diff --git a/dev-libs/libressl/libressl-3.2.2.ebuild 
b/dev-libs/libressl/libressl-3.2.2.ebuild
index ab31f204168..d6e5a198531 100644
--- a/dev-libs/libressl/libressl-3.2.2.ebuild
+++ b/dev-libs/libressl/libressl-3.2.2.ebuild
@@ -42,6 +42,7 @@ src_prepare() {
        fi
 
        eapply "${FILESDIR}"/${PN}-2.8.3-solaris10.patch
+       eapply "${FILESDIR}"/${PN}-3.2.2-build.patch
        eapply_user
 
        elibtoolize  # for Solaris

Reply via email to