ports

morpheus ports
git clone git://git.2f30.org/ports.git
Log | Files | Refs | LICENSE

commit 3ced2551763c597efb6c7f4a98b123f5a27e6023
parent 855996b338597d041db82ce453e9d200e8bccf5e
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Mon Jul 21 17:15:59 +0000

ports: cross-compile improvements

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>

Diffstat:
diffutils/diffutils.mk | 5++++-
dropbear/dropbear.mk | 2++
e2fsprogs/e2fsprogs.mk | 2+-
elinks/elinks.mk | 4++++
gawk/gawk.mk | 2++
htop/htop.mk | 2++
libsigcpp/libsigcpp.mk | 4++--
nginx/nginx.mk | 5+++--
patch/patch.mk | 2++
pcre/depsinc.mk | 3++-
sed/sed.mk | 2++
shadow/shadow.mk | 6+++---
vim/vim.mk | 14++++++++++++--
13 files changed, 41 insertions(+), 12 deletions(-)
diff --git a/diffutils/diffutils.mk b/diffutils/diffutils.mk @@ -7,7 +7,10 @@ INSTALL_MAN1 = man/diff.1 man/diff3.1 man/sdiff.1 diffutils:QV: CC="${CC} -static" ./configure \ + --build="${TOOLCHAIN_TRIPLET}" \ + --host="${HOST_TOOLCHAIN_TRIPLET}" \ --prefix="$PREFIX" \ --mandir="$ROOT/share/man" \ - --disable-shared + --disable-shared \ + --disable-nls make -j$nprocs diff --git a/dropbear/dropbear.mk b/dropbear/dropbear.mk @@ -16,6 +16,8 @@ dropbear:QV: export CFLAGS="$CFLAGS $DEPS_CFLAGS" export LDFLAGS="$LDFLAGS $DEPS_LDFLAGS" CC="$CC" ./configure \ + --build="${TOOLCHAIN_TRIPLET}" \ + --host="${HOST_TOOLCHAIN_TRIPLET}" \ --prefix="$PREFIX" \ --mandir="$ROOT/share/man" make -j$nprocs diff --git a/e2fsprogs/e2fsprogs.mk b/e2fsprogs/e2fsprogs.mk @@ -20,7 +20,7 @@ e2fsprogs:QV: rm -f libdev/lib/config.h* install:QV: - make -j$nprocs DESTDIR="$ROOT" install + make -j$nprocs install DESTDIR="$ROOT" cd "$ROOT""$BINDIR" rm -f mkfs.ext2 mkfs.ext3 mkfs.ext4 mkfs.ext4dev rm -f fsck.ext2 fsck.ext3 fsck.ext4 fsck.ext4dev diff --git a/elinks/elinks.mk b/elinks/elinks.mk @@ -7,6 +7,7 @@ elinks:QV: # TODO: enable TRE search? (--with-tre). # fix VA_COPY, __va_copy is va_copy. export CFLAGS="$CFLAGS $DEPS_CFLAGS -DVA_COPY=va_copy" + export CPPFLAGS="$CFLAGS" export LDFLAGS="$LDFLAGS $DEPS_LDFLAGS" CC="$CC -static" ./configure \ --build="${TOOLCHAIN_TRIPLET}" \ @@ -50,6 +51,9 @@ elinks:QV: CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" install:QV: + export CFLAGS="$CFLAGS $DEPS_CFLAGS -DVA_COPY=va_copy" + export CPPFLAGS="$CFLAGS" + export LDFLAGS="$LDFLAGS $DEPS_LDFLAGS" # use $TOOLCHAIN-ld ($LD can be set to $CC). printf '%s' "$LD" | grep -q 'ld' || export LD="`$CC -dumpmachine`-ld" make -j$nprocs install DESTDIR="$ROOT" \ diff --git a/gawk/gawk.mk b/gawk/gawk.mk @@ -7,6 +7,8 @@ INSTALL_MAN1 = doc/gawk.1 gawk:QV: CC="${CC} -static" ./configure \ + --build="${TOOLCHAIN_TRIPLET}" \ + --host="${HOST_TOOLCHAIN_TRIPLET}" \ --prefix="$PREFIX" \ --mandir="$ROOT/share/man" \ --disable-shared diff --git a/htop/htop.mk b/htop/htop.mk @@ -10,6 +10,8 @@ htop:QV: export CFLAGS="$CFLAGS $DEPS_CFLAGS" export LDFLAGS="$LDFLAGS $DEPS_LDFLAGS" CC="${CC} -static" ./configure \ + --build="${TOOLCHAIN_TRIPLET}" \ + --host="${HOST_TOOLCHAIN_TRIPLET}" \ --prefix="$PREFIX" \ --mandir="$ROOT/share/man" \ --disable-shared \ diff --git a/libsigcpp/libsigcpp.mk b/libsigcpp/libsigcpp.mk @@ -3,9 +3,9 @@ TARG = libsigcpp <$mkbuild/mk.common-noinst libsigcpp:QV: -# export CFLAGS="$CFLAGS $DEPS_CFLAGS" -# export LDFLAGS="$LDFLAGS $DEPS_LDFLAGS" CC="$CC" ./configure \ + --build="${TOOLCHAIN_TRIPLET}" \ + --host="${HOST_TOOLCHAIN_TRIPLET}" \ --prefix="$PREFIX" \ --mandir="$ROOT/share/man" \ --disable-shared \ diff --git a/nginx/nginx.mk b/nginx/nginx.mk @@ -8,6 +8,7 @@ nginx:QV: export LDFLAGS="$LDFLAGS $DEPS_LDFLAGS" # nginx incorrectly detects GNU crypt so set: -DNGX_HAVE_GNU_CRYPT_R=0" export CFLAGS="$CFLAGS -DNGX_HAVE_GNU_CRYPT_R=0" + export BUILDCC="${CC}" export CC="${CC} -static" # make nginx believe we are building pcre, but actually we # use the prebuilt pcre from ports. @@ -38,8 +39,8 @@ nginx:QV: --with-ipv6 \ --with-ld-opt="-L${pcre_libdir}" \ --with-cc-opt="-I${pcre_includedir}" - make -j$nprocs CC="$CC -static" + make -j$nprocs CC="$BUILDCC -static" install:QV: $INSTALL -d -m 755 "$ROOT/run/lock" - make -j$nprocs install DESTDIR="$ROOT" + make -j$nprocs install CC="$CC -static" DESTDIR="$ROOT" diff --git a/patch/patch.mk b/patch/patch.mk @@ -6,6 +6,8 @@ INSTALL_BIN = src/patch patch:QV: CC="${CC} -static" ./configure \ + --build="${TOOLCHAIN_TRIPLET}" \ + --host="${HOST_TOOLCHAIN_TRIPLET}" \ --prefix="$PREFIX" \ --mandir="$ROOT/share/man" \ --disable-shared diff --git a/pcre/depsinc.mk b/pcre/depsinc.mk @@ -1,6 +1,7 @@ <$pcre_DEPDIR/v.mk -pcre_includedir = ${pcre_DEPDIR}/pcre-$v +pcre_dir = ${pcre_DEPDIR}/pcre-$v +pcre_includedir = ${pcre_dir} pcre_libdir = ${pcre_DEPDIR}/pcre-$v/.libs pcre_CFLAGS = -I${pcre_includedir} diff --git a/sed/sed.mk b/sed/sed.mk @@ -7,6 +7,8 @@ INSTALL_MAN1 = doc/sed.1 sed:QV: CC="${CC} -static" ./configure \ + --build="${TOOLCHAIN_TRIPLET}" \ + --host="${HOST_TOOLCHAIN_TRIPLET}" \ --prefix="$PREFIX" \ --mandir="$ROOT/share/man" \ --disable-shared diff --git a/shadow/shadow.mk b/shadow/shadow.mk @@ -12,9 +12,9 @@ LOCAL_CFLAGS = -I. -Ilib -Ilibmisc -DHAVE_CONFIG_H INSTALL_BIN = useradd userdel groupadd groupdel INSTALL_MAN8 = man/man8/useradd.8 \ - man/man8/userdel.8 \ - man/man8/groupadd.8 \ - man/man8/groupdel.8 + man/man8/userdel.8 \ + man/man8/groupadd.8 \ + man/man8/groupdel.8 INSTALL_OTHER1 = etc/login.defs INSTALL_OTHER1_DIR = /etc diff --git a/vim/vim.mk b/vim/vim.mk @@ -3,17 +3,27 @@ DEPS = ncurses <$mkbuild/mk.common-noinst -$TARG:QV: +vim:QV: export CPPFLAGS="$DEPS_CFLAGS $CFLAGS" export LDFLAGS="$DEPS_LDFLAGS $LDFLAGS" + export vim_cv_toupper_broken="no" + export vim_cv_terminfo="yes" + export vim_cv_tty_group="world" + export vim_cv_tty_mode="0620" + export vim_cv_getcwd_broken="no" + export vim_cv_stat_ignores_slash="no" + export vim_cv_memmove_handles_overlap="yes" ./configure \ + --build="${TOOLCHAIN_TRIPLET}" \ + --host="${HOST_TOOLCHAIN_TRIPLET}" \ --prefix="$PREFIX/" \ --disable-gui \ --disable-nls \ --disable-netbeans \ --without-local-dir \ --with-x=no \ - --enable-multibyte + --enable-multibyte \ + --with-tlib=ncurses make -j$nprocs install:QV: