Mail archive
alpine-aports

[alpine-aports] [PATCH] testing/bmake: new aport

From: Steffen Nurpmeso <steffen_at_sdaoden.eu>
Date: Mon, 9 Oct 2017 18:47:10 +0200

http://www.crufty.net/help/sjg/bmake.html
Portable version of the NetBSD make build tool
---
 testing/bmake/APKBUILD         | 53 +++++++++++++++++++++++++++++++++++++
 testing/bmake/install-sh.patch |  8 ++++++
 testing/bmake/sjg.patch        | 59 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 120 insertions(+)
 create mode 100644 testing/bmake/APKBUILD
 create mode 100644 testing/bmake/install-sh.patch
 create mode 100644 testing/bmake/sjg.patch
diff --git a/testing/bmake/APKBUILD b/testing/bmake/APKBUILD
new file mode 100644
index 00000000..f8e500f7
--- /dev/null
+++ b/testing/bmake/APKBUILD
_at_@ -0,0 +1,53 @@
+# Maintainer: Steffen Nurpmeso <steffen_at_sdaoden.eu>
+pkgname=bmake
+pkgver=20170812
+pkgrel=0
+pkgdesc="Portable version of the NetBSD make build tool"
+url="http://www.crufty.net/help/sjg/bmake.html"
+arch="all"
+license="BSD"
+subpackages="$pkgname-doc"
+source="http://www.crufty.net/ftp/pub/sjg/bmake-$pkgver.tar.gz
+	sjg.patch
+	install-sh.patch"
+
+builddir="$srcdir/$pkgname"
+# Check automatically performed after build
+options="!check"
+
+# Avoid that paths sneak in.
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+C_INCLUDE_PATH=/usr/include
+LD_LIBRARY_PATH=/lib:/usr/lib
+LIBRARY_PATH=$LD_LIBRARY_PATH
+LD_RUN_PATH=$LD_LIBRARY_PATH
+export PATH C_INCLUDE_PATH LD_LIBRARY_PATH LIBRARY_PATH LD_RUN_PATH
+
+build() {
+	cd "$builddir"
+	mkdir -p build
+	cd build
+	sh ../boot-strap --with-default-sys-path=/usr/share/mk
+}
+
+check() {
+	# Has been done automatically after build
+	true
+}
+
+package() {
+	cd "$builddir/build"
+	sh ../boot-strap --prefix=/usr --with-mksrc=/usr/share/mk \
+			--install-destdir="$pkgdir" op=install
+
+	rm -rf "$pkgdir"/usr/share/man/cat1
+	mkdir "$pkgdir"/usr/share/man/man1
+	cp ../bmake.1 "$pkgdir"/usr/share/man/man1/
+	mkdir -p "$pkgdir"/usr/share/licenses/"$pkgname"
+	sed -e 3,69p -e d ../main.c >\
+		"$pkgdir"/usr/share/licenses/"$pkgname"/COPYING
+}
+
+sha512sums="2345d24967796950ba9c661e65228223da51c6f22da34ad2dbc5069e0ca56445902685f9da5cfd0f2594f6261ae778d3621670bd80fc8f840d970b6fd8f185f4  bmake-20170812.tar.gz
+4ba05a625696927cfc4eb79d2c434d6c8a1107e81c794a48e37b34316e712af877e529269f4e9147c6056437c61aa36a4fcb189a6db78b5c1e774f9cfb7c82eb  sjg.patch
+0de9022a2991c5ef02c09ab592a3e2d218cd0bbf58e54f21bc7694110f3dd9e4589bf2b3d241fd167fb220b425007863f20e71e141b4f65bf92d305ba94209da  install-sh.patch"
diff --git a/testing/bmake/install-sh.patch b/testing/bmake/install-sh.patch
new file mode 100644
index 00000000..974b5193
--- /dev/null
+++ b/testing/bmake/install-sh.patch
_at_@ -0,0 +1,8 @@
+--- XXX/install-sh.orig
++++ XXX/install-sh
+_at_@ -1,4 +1,4 @@
+-:
++#!/bin/sh
+ # NAME:
+ #      install.sh - portable version of install(1)
+ #
diff --git a/testing/bmake/sjg.patch b/testing/bmake/sjg.patch
new file mode 100644
index 00000000..11b617b9
--- /dev/null
+++ b/testing/bmake/sjg.patch
_at_@ -0,0 +1,59 @@
+From sjg_at_crufty.net  Wed Oct  4 00:46:22 2017
+From: Simon Gerraty <sjg_at_crufty.net>
+To: Steffen Nurpmeso <steffen_at_sdaoden.eu>
+Subject: Re: bmake: errors when creating Alpine Linux/Musl package
+MIME-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Content-ID: <24543.1507070779.1_at_bad.crufty.net>
+Date: Tue, 03 Oct 2017 15:46:19 -0700
+Message-ID: <20363.1507070779_at_bad.crufty.net>
+Status: RO
+
+> |The warning about __inline being redefined - I would not expect
+> |missing/sys/cdefs.h to be used on a Linux platform - every one I'd used
+> |(not many) has sys/cdefs.h
+
+Not much we can do about that warning.
+Fortunately nothing in bmake uses __inline
+
+For the tcc getopt bit, try running strings on the object
+to see where that Del char is.
+
+For gcc, try the patch below
+
+Index: unit-tests/dotwait.exp
+===================================================================
+RCS file: /volume/cvs/bmake/unit-tests/dotwait.exp,v
+retrieving revision 1.1.1.1
+diff -u -p -r1.1.1.1 dotwait.exp
+--- XXX/unit-tests/dotwait.exp	30 Aug 2014 18:57:18 -0000	1.1.1.1
++++ XXX/unit-tests/dotwait.exp	3 Oct 2017 22:43:52 -0000
+_at_@ -22,9 +22,9 @@ shared.2.1
+ shared.2.1
+ shared.2.99
+ shared.2.99
++cycle.1.99
++cycle.1.99
+ make: Graph cycles through `cycle.2.99'
+ make: Graph cycles through `cycle.2.98'
+ make: Graph cycles through `cycle.2.97'
+-cycle.1.99
+-cycle.1.99
+ exit status 0
+Index: unit-tests/dotwait.mk
+===================================================================
+RCS file: /volume/cvs/bmake/unit-tests/dotwait.mk,v
+retrieving revision 1.1.1.1
+diff -u -p -r1.1.1.1 dotwait.mk
+--- XXX/unit-tests/dotwait.mk	30 Aug 2014 18:57:18 -0000	1.1.1.1
++++ XXX/unit-tests/dotwait.mk	3 Oct 2017 22:42:44 -0000
+_at_@ -11,7 +11,7 @@ PAUSE= sleep 1
+ # Ignore "--- target ---" lines printed by parallel make.
+ all:
+ .for t in ${TESTS}
+-	_at_${.MAKE} -f ${THISMAKEFILE} -j4 $t | grep -v "^--- "
++	_at_${.MAKE} -f ${THISMAKEFILE} -j4 $t 2>&1 | grep -v "^--- "
+ .endfor
+ 
+ #
+
-- 
2.14.2
--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Oct 09 2017 - 20:53:22 GMT