summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-01-13 14:22:02 +0100
committerMichał Górny <mgorny@gentoo.org>2024-01-13 18:53:17 +0100
commit64f58b7baa2a6828641321a0a7ef5611b449e8e4 (patch)
tree821225a10c6e201b0f5984d059f5ead82f5fe351 /dev-build
parentMove {sys-devel → dev-build}/make (diff)
downloadgentoo-64f58b7baa2a6828641321a0a7ef5611b449e8e4.tar.gz
gentoo-64f58b7baa2a6828641321a0a7ef5611b449e8e4.tar.bz2
gentoo-64f58b7baa2a6828641321a0a7ef5611b449e8e4.zip
Move {sys-devel → dev-build}/bmake
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-build')
-rw-r--r--dev-build/bmake/Manifest3
-rw-r--r--dev-build/bmake/bmake-20230909.ebuild57
-rw-r--r--dev-build/bmake/bmake-20231210.ebuild57
-rw-r--r--dev-build/bmake/files/bmake-20210206-tests.patch18
-rw-r--r--dev-build/bmake/files/bmake-20210314-mk-fixes.patch66
-rw-r--r--dev-build/bmake/metadata.xml12
6 files changed, 213 insertions, 0 deletions
diff --git a/dev-build/bmake/Manifest b/dev-build/bmake/Manifest
new file mode 100644
index 000000000000..9c78af5e50b3
--- /dev/null
+++ b/dev-build/bmake/Manifest
@@ -0,0 +1,3 @@
+DIST bmake-20230909.tar.gz 859801 BLAKE2B 02a44598edf05ebbcb31767b156563bfa10071774a3e7ae565efddc9b1ea6e684558e4ec3cfbc56d7d855cbe8663c43f43bd8d37e0a289c55ec12733e3e4916c SHA512 50622aee8024b3e0385974a8f446a4b5df0ba494b6133ab91ebbe63c408154b112f62c9df8521f4f1beaf28cdd6e7da178c3334337f6b14c8bced532029d8ba5
+DIST bmake-20231210.tar.gz 859537 BLAKE2B 554a4fab9df6c3f0ed1659c69a6294a6c3e1ebce4a8609ea1fe8bc657c11be04ea9b66ca01c50fc3bfc1ee54552a7e16584b26bea9f5461834e608ea39bbc38a SHA512 e2e35b5442f17c521ef2bf1c4cc1dbdedd0b1a335ac9a3c743add1c0bbaf4e32396ba64fd572cca75821cfa2b722d58ee71ec694d150d7e70d7a550d911a308b
+DIST mk-20210330.tar.gz 107380 BLAKE2B 9ac30a117d9ba31635cf8d8d29fdba76f148611f47628403ca8f807081c32509f10498d3c30fd24985e5420af4710fe59fc6315d71f2d0c1cfed93263a06553a SHA512 6acd3ee911442934082f4f877d795b07c5e23022eaa9c0874799d97e92a2f5a663cb45f94b7f9745c49cbbce6b7e755a29e381ccfb9e68a0be1eedbd22fd5d3b
diff --git a/dev-build/bmake/bmake-20230909.ebuild b/dev-build/bmake/bmake-20230909.ebuild
new file mode 100644
index 000000000000..2d2fc27388a5
--- /dev/null
+++ b/dev-build/bmake/bmake-20230909.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+# Skip failing test (sandbox and csh)
+PATCHES=(
+ "${FILESDIR}"/${PN}-20210206-tests.patch
+)
+
+src_prepare() {
+ default
+ cd "${WORKDIR}" || die
+ eapply "${FILESDIR}"/${PN}-20210314-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/dev-build/bmake/bmake-20231210.ebuild b/dev-build/bmake/bmake-20231210.ebuild
new file mode 100644
index 000000000000..9c749f92ff06
--- /dev/null
+++ b/dev-build/bmake/bmake-20231210.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+# Skip failing test (sandbox and csh)
+PATCHES=(
+ "${FILESDIR}"/${PN}-20210206-tests.patch
+)
+
+src_prepare() {
+ default
+ cd "${WORKDIR}" || die
+ eapply "${FILESDIR}"/${PN}-20210314-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/dev-build/bmake/files/bmake-20210206-tests.patch b/dev-build/bmake/files/bmake-20210206-tests.patch
new file mode 100644
index 000000000000..49e5f258e91a
--- /dev/null
+++ b/dev-build/bmake/files/bmake-20210206-tests.patch
@@ -0,0 +1,18 @@
+--- a/unit-tests/Makefile
++++ b/unit-tests/Makefile
+@@ -191,7 +191,6 @@ TESTS+= dotwait
+ TESTS+= envfirst
+ TESTS+= error
+ TESTS+= # escape # broken by reverting POSIX changes
+-TESTS+= export
+ TESTS+= export-all
+ TESTS+= export-env
+ TESTS+= export-variants
+@@ -290,7 +289,6 @@ TESTS+= sh-leading-plus
+ TESTS+= sh-meta-chars
+ TESTS+= sh-multi-line
+ TESTS+= sh-single-line
+-TESTS+= shell-csh
+ TESTS+= shell-custom
+ .if exists(/bin/ksh)
+ TESTS+= shell-ksh
diff --git a/dev-build/bmake/files/bmake-20210314-mk-fixes.patch b/dev-build/bmake/files/bmake-20210314-mk-fixes.patch
new file mode 100644
index 000000000000..6dd935863be1
--- /dev/null
+++ b/dev-build/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
diff --git a/dev-build/bmake/metadata.xml b/dev-build/bmake/metadata.xml
new file mode 100644
index 000000000000..fe8a3a5da516
--- /dev/null
+++ b/dev-build/bmake/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>jsmolic@gentoo.org</email>
+ <name>Jakov Smolić</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>soap@gentoo.org</email>
+ <name>David Seifert</name>
+ </maintainer>
+</pkgmetadata>