tMerge /tmp/mkports - mkports - recipes for building multiple softwares with mk(1)
(HTM) git clone git://z3bra.org/mkports
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) commit ed417a230b75048e91af61f2b87ebe8705b51dc5
(DIR) parent 58c26cf0ce1f5971421c3f229aa6da1e180ff44f
(HTM) Author: z3bra <contactatz3bradotorg>
Date: Tue, 23 May 2017 08:44:39 +0200
Merge /tmp/mkports
Diffstat:
M binutils/mkfile | 1 -
M config.mk | 21 +++++++++++----------
M default.mk | 2 +-
M gcc/mkfile | 4 +++-
A gcc/patches/0015-posix_tar.diff | 24 ++++++++++++++++++++++++
A linux/mkfile | 14 ++++++++++++++
M musl/mkfile | 6 +++++-
M pkgconfig/mkfile | 4 ++--
8 files changed, 60 insertions(+), 16 deletions(-)
---
(DIR) diff --git a/binutils/mkfile b/binutils/mkfile
t@@ -5,7 +5,6 @@ url = ftp://ftp.gnu.org/gnu/$pkg/$pkg-$ver.tar.bz2
<../default.mk
MAKEFLAGS = ${MAKEFLAGS} tooldir=''
-CLEANUP = bin/strings man/man1/strings.1
CONFIGURE = $CONFIGURE \
--disable-tls \
--disable-pie
(DIR) diff --git a/config.mk b/config.mk
t@@ -1,13 +1,14 @@
TRIPLET = x86_64-linux-musl
-ROOT = /tmp/mkports/rootfs
-REPO = /var/repo
-WORK = `{printf '/tmp/mkports/%s-%s' "$pkg" "$(id -u)"}
+TOOLCHAIN=
+
+ROOT = /var/cache/buildroot/rootfs
+DATA = /var/cache/buildroot/packdb
+REPO = /var/cache/repo
+WORK = `{printf '/var/cache/buildroot/src/%s-%s' "$pkg" "$(id -u)"}
NPROC = 8
-#TOOLCHAIN = x86_64-linux-musl-
-TOOLCHAIN =
-CC = ${TOOLCHAIN}gcc -static
-CXX = ${TOOLCHAIN}g++ -static
+CC = ${TOOLCHAIN}gcc -static --static
+CXX = ${TOOLCHAIN}g++ -static --static
LD = $CC -Bstatic
HOSTCC = $CC
AR = ${TOOLCHAIN}ar
t@@ -17,6 +18,7 @@ GREP = /bin/grep
SED = /bin/sed
LEX = /bin/lex -Fo lex.yy.c
YACC = /bin/yacc
+TAR = /bin/tar
CHOST = $TRIPLET
CBUILD = $TRIPLET
t@@ -27,9 +29,8 @@ CFLAGS = ${CPPFLAGS}
LDFLAGS = -L${ROOT}/lib -static
MAKEFLAGS = -j${NPROC} PREFIX= prefix= MANDIR=/man mandir=/man MANPREFIX=/man
CONFIGURE = --prefix= \
- --host=$TRIPLET \
- --build=$TRIPLET \
- --target=$TRIPLET \
+ --host=$CHOST \
+ --build=$CBUILD \
--mandir=/man \
--libdir=/lib \
--includedir=/include \
(DIR) diff --git a/default.mk b/default.mk
t@@ -72,7 +72,7 @@ fetch-archive:QV: $WORK/$archive
*.tar.xz|*.txz) method="-J" ;;
*) echo "$archive: format not recognized" >&2; exit 1
esac
- ${TAR} $method -xf $archive
+ ${TAR} $method -xvf $archive
src=$(${TAR} $method -tf $archive|sed -n 1p|cut -f1 -d/)
if [ "$src" != "$pkg-$ver" ]; then
mv "$src" "$pkg-$ver"
(DIR) diff --git a/gcc/mkfile b/gcc/mkfile
t@@ -5,6 +5,7 @@ url = ftp://ftp.gnu.org/pub/gnu/gcc/$pkg-$ver/$pkg-$ver.tar.gz
<../default.mk
LD =
+TAR = bsdtar
CONFIGURE = ${CONFIGURE} \
--disable-bootstrap \
t@@ -16,7 +17,8 @@ CONFIGURE = ${CONFIGURE} \
--disable-decimal-float \
--enable-__cxa_atexit \
--enable-threads=posix \
- --enable-languages=c \
+ --enable-languages=c,c++ \
+ --with-native-system-header-dir=/include \
--with-system-zlib \
--with-cpp-install-dir=${PREFIX}/lib
--with-pkgversion="DISTRO-x86_64-static"
(DIR) diff --git a/gcc/patches/0015-posix_tar.diff b/gcc/patches/0015-posix_tar.diff
t@@ -0,0 +1,24 @@
+diff -urN a/gcc/Makefile.in b/gcc/Makefile.in
+--- a/gcc/Makefile.in 2016-04-15 11:49:39.000000000 +0000
++++ b/gcc/Makefile.in 2017-05-22 18:31:49.770190991 +0000
+@@ -3558,9 +3558,9 @@
+ # found in CDPATH, corrupting the output. We could just redirect the
+ # output of `cd', but some shells lose on redirection within `()'s
+ (cd `${PWD_COMMAND}`/include ; \
+- tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include; tar xpf - )
++ bsdtar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include; bsdtar xpf - )
+ (cd `${PWD_COMMAND}`/include-fixed ; \
+- tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include-fixed; tar xpf - )
++ bsdtar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include-fixed; bsdtar xpf - )
+ # /bin/sh on some systems returns the status of the first tar,
+ # and that can lose with GNU tar which always writes a full block.
+ # So use `exit 0' to ignore its exit status.
+@@ -3581,7 +3581,7 @@
+ # Targets without dependencies, for use in prev-gcc during bootstrap.
+ real-install-headers-tar:
+ (cd `${PWD_COMMAND}`/include-fixed ; \
+- tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include-fixed; tar xpf - )
++ bsdtar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include-fixed; bsdtar xpf - )
+
+ real-install-headers-cpio:
+ cd `${PWD_COMMAND}`/include-fixed ; \
(DIR) diff --git a/linux/mkfile b/linux/mkfile
t@@ -0,0 +1,14 @@
+pkg = linux
+ver = `{uname -r | cut -d- -f1}
+url = https://www.kernel.org/pub/linux/kernel/v4.x/$pkg-$ver.tar.xz
+
+<../default.mk
+
+build:QV: fetch patch
+ cd $WORK/$pkg-$ver
+ make mrproper
+
+install:QV: build
+ mkdir -p $destdir
+ cd $WORK/$pkg-$ver
+ make ${MAKEFLAGS} INSTALL_HDR_PATH=$destdir headers_install
(DIR) diff --git a/musl/mkfile b/musl/mkfile
t@@ -1,5 +1,9 @@
pkg = musl
-ver = 1.1.15
+ver = 1.1.16
url=http://www.musl-libc.org/releases/$pkg-$ver.tar.gz
<../default.mk
+
+# keep linker
+cleanup:V: install
+ echo Nothing to cleanup
(DIR) diff --git a/pkgconfig/mkfile b/pkgconfig/mkfile
t@@ -1,6 +1,6 @@
pkg=pkgconfig
-ver=0.29.1
-url=http://pkgconfig.freedesktop.org/releases/pkg-config-0.29.1.tar.gz
+ver=0.29.2
+url=http://pkgconfig.freedesktop.org/releases/pkg-config-$ver.tar.gz
<../default.mk
CONFIGURE = $CONFIGURE --with-internal-glib