public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "David Seifert" <soap@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/bmake/files/, sys-devel/bmake/
Date: Sat,  3 Apr 2021 12:31:28 +0000 (UTC)	[thread overview]
Message-ID: <1617453038.142bb6ee2cfdcc77f29da1d70622de18952fef70.soap@gentoo> (raw)

commit:     142bb6ee2cfdcc77f29da1d70622de18952fef70
Author:     Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
AuthorDate: Sat Apr  3 12:30:38 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Apr  3 12:30:38 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=142bb6ee

sys-devel/bmake: Bump mk files to 20210330, include additional .mk fixes

* Respect LDFLAGS
* Do not strip prog binaries when installing them

Closes: https://bugs.gentoo.org/779340
Closes: https://bugs.gentoo.org/778458
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sys-devel/bmake/Manifest                           |  1 +
 sys-devel/bmake/bmake-20210314-r1.ebuild           | 55 ++++++++++++++++++
 .../bmake/files/bmake-20210314-mk-fixes.patch      | 66 ++++++++++++++++++++++
 3 files changed, 122 insertions(+)

diff --git a/sys-devel/bmake/Manifest b/sys-devel/bmake/Manifest
index 1660c7bd6fd..4f09dd97003 100644
--- a/sys-devel/bmake/Manifest
+++ b/sys-devel/bmake/Manifest
@@ -1,3 +1,4 @@
 DIST bmake-20210206.tar.gz 740065 BLAKE2B 2482b980ad4e4aac4292e0244020eeb3699148d84b0f493865a8317673eddb20ed48219f1319c490c6a88c6f1c50a44bd95af5de43f5853876bd10c1aef9b4bd SHA512 abda3aadd49abfe0e7801f4c37539a9172c3bb2d6ed542e0dec5b6177a799774a4b513041ff6167409c69ac6af35f506b1d6e585694259192a65a8575c232839
 DIST bmake-20210314.tar.gz 749343 BLAKE2B 765b06577d8b06924627de7c2551e4fa25bdf533f2ce96db09a63af01d965e2bc29001e2c07df98a15d72b3c57a11e99974df82b9ec12257c9340baf563c3faf SHA512 d27c3787102d32ccd541909aaf76083ff9d2f704b938ba64d234c5d29d2e7dea320e99bbee53d3594aa830ced59d512d8701487ec5b0c277339e705d6e64f97d
 DIST mk-20191111.tar.gz 102361 BLAKE2B 6a542c41e2a2153bd3c812aa9bcdc78a47bf2e9121835279afa2e57ec9cdd44f72a1cd7b48a7647d56b0586c547656f45359821cd2013c5a90532568e12086b5 SHA512 4a3e2344e7ada0666bcb147fcd4627030ba9b928acab6876215c8529b23909be4ced802bea177b078a6b4457370d2d0070114c0d69979622274be74336778861
+DIST mk-20210330.tar.gz 107380 BLAKE2B 9ac30a117d9ba31635cf8d8d29fdba76f148611f47628403ca8f807081c32509f10498d3c30fd24985e5420af4710fe59fc6315d71f2d0c1cfed93263a06553a SHA512 6acd3ee911442934082f4f877d795b07c5e23022eaa9c0874799d97e92a2f5a663cb45f94b7f9745c49cbbce6b7e755a29e381ccfb9e68a0be1eedbd22fd5d3b

diff --git a/sys-devel/bmake/bmake-20210314-r1.ebuild b/sys-devel/bmake/bmake-20210314-r1.ebuild
new file mode 100644
index 00000000000..b68c5fb3598
--- /dev/null
+++ b/sys-devel/bmake/bmake-20210314-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MK_VER=20210330
+
+DESCRIPTION="NetBSD's portable make"
+HOMEPAGE="http://www.crufty.net/help/sjg/bmake.html"
+SRC_URI="
+	http://void.crufty.net/ftp/pub/sjg/${P}.tar.gz
+	http://void.crufty.net/ftp/pub/sjg/mk-${MK_VER}.tar.gz"
+S="${WORKDIR}/${PN}"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+# Skip failing test (sandbox and csh)
+PATCHES=( "${FILESDIR}"/${PN}-20210206-tests.patch )
+
+src_prepare() {
+	default
+	cd "${WORKDIR}" || die
+	eapply "${FILESDIR}"/${P}-mk-fixes.patch
+}
+
+src_configure() {
+	econf \
+		--with-mksrc=../mk \
+		--with-default-sys-path="${EPREFIX}"/usr/share/mk/${PN} \
+		--with-machine_arch=${ARCH}
+}
+
+src_compile() {
+	sh make-bootstrap.sh || die "bootstrap failed"
+}
+
+src_test() {
+	cd unit-tests || die
+
+	# the 'ternary' test uses ${A} internally, which
+	# conflicts with Gentoo's ${A}, hence unset it for
+	# the tests temporarily.
+	env -u A MAKEFLAGS= \
+		"${S}"/bmake -r -m / TEST_MAKE="${S}"/bmake test || die "tests compilation failed"
+}
+
+src_install() {
+	dobin ${PN}
+	doman ${PN}.1
+	FORCE_BSD_MK=1 SYS_MK_DIR=. \
+		sh ../mk/install-mk -v -m 644 "${ED}"/usr/share/mk/${PN} \
+		|| die "failed to install mk files"
+}

diff --git a/sys-devel/bmake/files/bmake-20210314-mk-fixes.patch b/sys-devel/bmake/files/bmake-20210314-mk-fixes.patch
new file mode 100644
index 00000000000..6dd935863be
--- /dev/null
+++ b/sys-devel/bmake/files/bmake-20210314-mk-fixes.patch
@@ -0,0 +1,66 @@
+# https://bugs.gentoo.org/779340
+# https://bugs.gentoo.org/778458
+# - Fix incorrect linking of shared libraries
+# - Respect LDFLAGS
+# - Do not strip prog binaries
+--- 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
+@@ -455,11 +455,11 @@ lib${LIB}.${LD_so}: ${SOLIB} ${DPADD}
+ 	    --whole-archive ${SOLIB} --no-whole-archive ${SHLIB_LDADD} \
+ 	    ${SHLIB_LDENDFILE}
+ .else
+-	${SHLIB_LD} ${LD_x} ${LD_shared} \
++	${SHLIB_LD} ${LD_x} ${LD_shared} ${LDFLAGS} \
+ 	    -o ${.TARGET} ${SOLIB} ${SHLIB_LDADD}
+ .endif
+ .else
+-	${SHLIB_LD} -o ${.TARGET} ${LD_shared} ${LD_solib} ${DLLIB} ${SHLIB_LDADD}
++	${SHLIB_LD} -o ${.TARGET} ${LD_shared} ${LDFLAGS} ${LD_solib} ${DLLIB} ${SHLIB_LDADD}
+ .endif
+ .endif
+ .if !empty(SHLIB_LINKS)
+--- a/mk/prog.mk
++++ b/mk/prog.mk
+@@ -178,7 +178,7 @@ proginstall:
+ .if defined(PROG)
+ 	[ -d ${DESTDIR}${BINDIR} ] || \
+ 	${INSTALL} -d ${PROG_INSTALL_OWN} -m 775 ${DESTDIR}${BINDIR}
+-	${INSTALL} ${COPY} ${STRIP_FLAG} ${PROG_INSTALL_OWN} -m ${BINMODE} \
++	${INSTALL} ${COPY} ${PROG_INSTALL_OWN} -m ${BINMODE} \
+ 	    ${PROG} ${DESTDIR}${BINDIR}/${PROG_NAME}
+ .endif
+ .if defined(HIDEGAME)
+--- a/mk/sys/Linux.mk
++++ b/mk/sys/Linux.mk
+@@ -19,12 +19,13 @@ NEED_SOLINKS ?=yes
+ AR ?=		ar
+ ARFLAGS ?=	rl
+ RANLIB ?=		ranlib
++LDFLAGS ?=
+ 
+ AS ?=		as
+ AFLAGS=
+ COMPILE.s ?=	${AS} ${AFLAGS}
+ LINK.s ?=		${CC} ${AFLAGS} ${LDFLAGS}
+-COMPILE.S ?=	${CC} ${AFLAGS} ${CPPFLAGS} -c
++COMPILE.S ?=	${CC} ${AFLAGS} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -c
+ LINK.S ?=		${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
+ .if exists(/usr/local/bin/gcc)
+ CC ?=		gcc -pipe
+@@ -65,7 +66,6 @@ LFLAGS=
+ LEX.l ?=		${LEX} ${LFLAGS}
+ 
+ LD ?=		ld
+-LDFLAGS=
+ 
+ LINT ?=		lint
+ LINTFLAGS ?=	-chapbx


             reply	other threads:[~2021-04-03 12:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-03 12:31 David Seifert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-05-27 21:13 [gentoo-commits] repo/gentoo:master commit in: sys-devel/bmake/files/, sys-devel/bmake/ David Seifert
2021-03-26 11:42 David Seifert
2021-01-24 19:24 David Seifert
2021-01-12  9:37 David Seifert
2020-01-28 18:11 David Seifert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1617453038.142bb6ee2cfdcc77f29da1d70622de18952fef70.soap@gentoo \
    --to=soap@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox