commit:     4cf4b5fe7683285d3e8d46b08f004fba85907865
Author:     Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
AuthorDate: Fri Mar 26 11:42:08 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Fri Mar 26 11:42:08 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4cf4b5fe

sys-devel/bmake: Patch the default lib.mk rule

* Bmake ships default mk rules, and lib.mk containes default LD_shared variable 
which in turn creates naming problems when we build libraries on Linux, so we 
have to fix LD_shared to prevent that

Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../bmake/{bmake-20210206.ebuild => bmake-20210206-r1.ebuild} |  6 ++++++
 sys-devel/bmake/files/bmake-20210206-lib-mk.patch             | 11 +++++++++++
 2 files changed, 17 insertions(+)

diff --git a/sys-devel/bmake/bmake-20210206.ebuild 
b/sys-devel/bmake/bmake-20210206-r1.ebuild
similarity index 92%
rename from sys-devel/bmake/bmake-20210206.ebuild
rename to sys-devel/bmake/bmake-20210206-r1.ebuild
index 9c585254add..3b3e54fcda2 100644
--- a/sys-devel/bmake/bmake-20210206.ebuild
+++ b/sys-devel/bmake/bmake-20210206-r1.ebuild
@@ -20,6 +20,12 @@ S="${WORKDIR}/${PN}"
 # Skip failing test (sandbox and csh)
 PATCHES=( "${FILESDIR}"/${P}-tests.patch )
 
+src_prepare() {
+       default
+       cd "${WORKDIR}" || die
+       eapply "${FILESDIR}"/${P}-lib-mk.patch
+}
+
 src_configure() {
        econf \
                --with-mksrc=../mk \

diff --git a/sys-devel/bmake/files/bmake-20210206-lib-mk.patch 
b/sys-devel/bmake/files/bmake-20210206-lib-mk.patch
new file mode 100644
index 00000000000..5f860b6f15a
--- /dev/null
+++ b/sys-devel/bmake/files/bmake-20210206-lib-mk.patch
@@ -0,0 +1,11 @@
+--- a/mk/lib.mk
++++ b/mk/lib.mk
+@@ -170,7 +170,7 @@ LD_solib= lib${LIB}_pic.a
+ .elif ${TARGET_OSNAME} == "Linux"
+ SHLIB_LD = ${CC}
+ # this is ambiguous of course
+-LD_shared=-shared -Wl,"-soname lib${LIB}.so.${SHLIB_MAJOR}"
++LD_shared=-shared -Wl,-soname,lib${LIB}.so.${SHLIB_MAJOR}
+ LD_solib= -Wl,--whole-archive lib${LIB}_pic.a -Wl,--no-whole-archive
+ .if ${COMPILER_TYPE} == "gcc"
+ # Linux uses GNU ld, which is a multi-pass linker

Reply via email to