From b1eb50599e4db7eb4501af75cbbfa22007081ea5 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Thu, 14 Jun 2018 02:22:19 -0500 Subject: The New Plan all pkgs needed to bootstrap -> system others -> user --- system/make/APKBUILD | 44 +++++++++++++++++++++++++++++++++++++++ system/make/fix-atexit-exit.patch | 17 +++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 system/make/APKBUILD create mode 100644 system/make/fix-atexit-exit.patch (limited to 'system/make') diff --git a/system/make/APKBUILD b/system/make/APKBUILD new file mode 100644 index 000000000..6843986ca --- /dev/null +++ b/system/make/APKBUILD @@ -0,0 +1,44 @@ +# Maintainer: Natanael Copa +pkgname=make +pkgver=4.2.1 +pkgrel=1 +pkgdesc="GNU make utility to maintain groups of programs" +url="https://www.gnu.org/software/make" +arch="all" +license="GPL-3.0-or-later" +depends="" +subpackages="$pkgname-doc" +source="ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.bz2 + fix-atexit-exit.patch + " + +prepare() { + cd "$builddir" + update_config_sub + default_prepare +} + +build() { + cd "$builddir" + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --disable-nls + make +} + +check() { + cd "$builddir" + [ "$CBUILD" != "$CHOST" ] || (ulimit -n 64 && PERL5LIB=. make check) || return 1 +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install +} + +sha512sums="9cf00869a2f938492554f71d8cb288b5b009b3bd0489ef164f2c8f6532fc37db5c7e20af1dea288536e7c9710ee0bc6e1ddcdfc4928a8540e6e43661741825b8 make-4.2.1.tar.bz2 +a1639d9caf84a24a9f161a30d8b5dcd079b13faf2a5e3d514ff39fa11b13e796c7ff34c46ac2b56656d52129b4d3627c6102b129a4ab011f065076d872ef3992 fix-atexit-exit.patch" diff --git a/system/make/fix-atexit-exit.patch b/system/make/fix-atexit-exit.patch new file mode 100644 index 000000000..a71d26fb5 --- /dev/null +++ b/system/make/fix-atexit-exit.patch @@ -0,0 +1,17 @@ +Author: Timo Teräs + +POSIX says the behaviour is undefined if atexit callback calls +exit(). On glibc it works, but on musl it does not. Call instead +_exit() which is guaranteed to work. + +--- ./output.c.orig ++++ ./output.c +@@ -495,7 +495,7 @@ + perror_with_name (_("write error: stdout"), ""); + else + O (error, NILF, _("write error: stdout")); +- exit (MAKE_TROUBLE); ++ _exit (MAKE_TROUBLE); + } + } + -- cgit v1.2.3-70-g09d2