ports

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

commit 38a74708a45f3e1e2f30e2b4bc7aedc14d89b158
parent 7ad2f7bf636899ddbff04a957d277e9a3116e23c
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat Jul 12 14:37:33 +0000

fix cross-compile for some packages

- fix cross-compile for some packages (tested for ARM).
- use original source mirrors ($mirror is also arch-dependent (uses $arch)).

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

Diffstat:
busybox/busybox.mk | 8+++++++-
busybox/mkfile | 2+-
cares/cares.mk | 2+-
curl/curl.mk | 2++
gdb/gdb.mk | 2--
git/git.mk | 4++++
libedit/libedit.mk | 4+++-
libevent/libevent.mk | 3+++
libevent/mkfile | 2+-
make/make.mk | 2++
make/mkfile | 2+-
ncurses/checksums | 2+-
ncurses/mkfile | 2+-
ncurses/ncurses.mk | 21+++++++++++++++------
openssl/mkfile | 2+-
openssl/openssl.mk | 3++-
tmux/tmux.mk | 2++
zlib/checksums | 2+-
zlib/mkfile | 2+-
19 files changed, 49 insertions(+), 20 deletions(-)
diff --git a/busybox/busybox.mk b/busybox/busybox.mk @@ -35,5 +35,11 @@ INSTALL_SYMLINK = \ <$mkbuild/mk.common busybox:Q: + # https://sourceware.org/bugzilla/show_bug.cgi?id=16698 + if test x"$arch" = x"arm"; then + export LDFLAGS="`printf "%s" \"$LDFLAGS\" | sed 's@-Wl,--gc-sections@@g'`" + sed 's@^ check_libc_is_glibc.*$@echo ""@g' -i scripts/trylink + fi cp ../busybox.config .config - make -j$nprocs AR="$AR" HOSTCC="$HOSTCC -static" CC="$CC" busybox + make -j$nprocs AR="$AR" HOSTCC="$HOSTCC -static" CC="$CC" LDFLAGS="$LDFLAGS" \ + STRIP="$STRIP" busybox diff --git a/busybox/mkfile b/busybox/mkfile @@ -2,5 +2,5 @@ <v.mk src = busybox-$v -url = $mirror/busybox-$v.tar.bz2 +url = http://busybox.net/downloads/busybox-$v.tar.bz2 mkfile = ../busybox.mk diff --git a/cares/cares.mk b/cares/cares.mk @@ -9,7 +9,7 @@ cares:QV: export CPPFLAGS="-D_BSD_SOURCE -D_GNU_SOURCE" CC="${CC} -static" CFLAGS="" ./configure \ --build="${TOOLCHAIN_TRIPLET}" \ - --host="${TOOLCHAIN_TRIPLET}" \ + --host="${HOST_TOOLCHAIN_TRIPLET}" \ --prefix="$PREFIX" \ --mandir="$ROOT/share/man" \ --disable-werror \ diff --git a/curl/curl.mk b/curl/curl.mk @@ -13,6 +13,8 @@ curl:QV: export CFLAGS="$CFLAGS $DEPS_CFLAGS" export LDFLAGS="$LDFLAGS $DEPS_LDFLAGS" CC="$CC -static" ./configure \ + --build="${TOOLCHAIN_TRIPLET}" \ + --host="${HOST_TOOLCHAIN_TRIPLET}" \ --prefix="" \ --bindir="$BINDIR" \ --sbindir="$BINDIR" \ diff --git a/gdb/gdb.mk b/gdb/gdb.mk @@ -12,8 +12,6 @@ gdb:QV: find . -name 'configure' -exec sed -i 's,MAKEINFO="$MISSING makeinfo",MAKEINFO=true,' '{}' \; # remove hardcoded -O2 -g CFLAGS which are *not* overridable (i.e. always appended, taking precedence) find . -name 'configure' -exec sed -e 's/CFLAGS="-g -O2"/:/g' -e 's/CFLAGS="-O2"/:/g' -i '{}' \; - # fix mips build ... - cp ../gdb-sgidefs.h gdb/sgidefs.h # sh ../libibertyfix libiberty # diff --git a/git/git.mk b/git/git.mk @@ -6,6 +6,8 @@ DEPS = curl openssl zlib git:QV: export CFLAGS="$CFLAGS $DEPS_CFLAGS" export LDFLAGS="$LDFLAGS $DEPS_LDFLAGS" + # https://sourceware.org/bugzilla/show_bug.cgi?id=16698 + test x"$arch" = x"arm" && export LDFLAGS="`printf "%s" \"$LDFLAGS\" | sed 's@-Wl,--gc-sections@@g'`" # NOTE: "$PREFIX/" is needed to set the proper mandir. make CURL_LIBCURL="${curl_libdir}/libcurl.a ${openssl_libdir}/libssl.a ${openssl_libdir}/libcrypto.a" \ CC="$CC -static" \ @@ -18,6 +20,8 @@ git:QV: install: export CFLAGS="$CFLAGS $DEPS_CFLAGS" export LDFLAGS="$LDFLAGS $DEPS_LDFLAGS" + # https://sourceware.org/bugzilla/show_bug.cgi?id=16698 + test x"$arch" = x"arm" && export LDFLAGS="`printf "%s" \"$LDFLAGS\" | sed 's@-Wl,--gc-sections@@g'`" # NOTE: "$PREFIX/" is needed to set the proper mandir. make CURL_LIBCURL="${curl_libdir}/libcurl.a ${openssl_libdir}/libssl.a ${openssl_libdir}/libcrypto.a" \ CC="$CC -static" \ diff --git a/libedit/libedit.mk b/libedit/libedit.mk @@ -5,10 +5,12 @@ DEPS = ncurses libedit:QV: # -D__STDC_ISO_10646__ fixes error: - # "wchar_t must store ISO 10646 characters". + # "wchar_t must store ISO 10646 characters". export CFLAGS="$CFLAGS $DEPS_CFLAGS -D__STDC_ISO_10646__" 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/libevent/libevent.mk b/libevent/libevent.mk @@ -4,9 +4,12 @@ TARG = libevent libevent:QV: CC="$CC" ./configure \ + --build="${TOOLCHAIN_TRIPLET}" \ + --host="${HOST_TOOLCHAIN_TRIPLET}" \ --prefix="$PREFIX" \ --mandir="$ROOT/share/man" \ --disable-shared \ + --disable-libevent-regress \ --enable-static make -j$nprocs # copy some header files to include dir for depsinc diff --git a/libevent/mkfile b/libevent/mkfile @@ -2,5 +2,5 @@ <v.mk src = libevent-$v -url = http://dl.2f30.org/morpheus-pkgs/$arch/0.0/libevent-$v.tar.gz +url = http://github.com/downloads/libevent/libevent/libevent-$v.tar.gz mkfile = ../libevent.mk diff --git a/make/make.mk b/make/make.mk @@ -1,3 +1,5 @@ +# TODO: bump to 4.0. + <../v.mk BIN = make diff --git a/make/mkfile b/make/mkfile @@ -2,5 +2,5 @@ <v.mk src = make-$v -url = $mirror/make-$v.tar.bz2 +url = http://ftp.gnu.org/gnu/make/make-$v.tar.bz2 mkfile = ../make.mk diff --git a/ncurses/checksums b/ncurses/checksums @@ -1 +1 @@ -d7c5e54b6d4d8b9211f0006ca8786f7609d180cc1aaebf4f25e7e35e12959779cf66447359a602daed625621ca32b0d910d67aef3eb8b6fdc3c373819a88faa1 ncurses.tar.gz +d7c5e54b6d4d8b9211f0006ca8786f7609d180cc1aaebf4f25e7e35e12959779cf66447359a602daed625621ca32b0d910d67aef3eb8b6fdc3c373819a88faa1 ncurses-5.9.tar.gz diff --git a/ncurses/mkfile b/ncurses/mkfile @@ -2,5 +2,5 @@ <v.mk src = ncurses-$v -url = $mirror/ncurses.tar.gz +url = http://ftp.gnu.org/pub/gnu/ncurses/ncurses-$v.tar.gz mkfile = ../ncurses.mk diff --git a/ncurses/ncurses.mk b/ncurses/ncurses.mk @@ -8,11 +8,21 @@ INSTALL_MAN5 = man/terminfo.5 libncurses:QV: cp ../ncurses-fallback.c ncurses/fallback.c CC="$CC -static" ./configure \ - --prefix="$PREFIX" --mandir="$MANDIR" \ - --datadir="$PREFIX/share" --without-tests \ - --with-normal --enable-sigwinch --disable-nls --without-dlsym \ - --without-cxx-binding --enable-widec \ - --with-fallbacks="linux vt100 xterm xterm256-color" </dev/ptmx + --build="$TOOLCHAIN_TRIPLET" \ + --host="$HOST_TOOLCHAIN_TRIPLET" \ + --prefix="$PREFIX" \ + --mandir="$MANDIR" \ + --datadir="$PREFIX/share" \ + --without-tests \ + --with-normal \ + --enable-sigwinch \ + --disable-nls \ + --without-dlsym \ + --without-cxx \ + --without-cxx-binding \ + --enable-widec \ + --without-ada \ + --with-fallbacks="linux vt100 xterm xterm256-color" </dev/ptmx make -j$nprocs ln -sf curses.h include/ncurses.h cd lib @@ -20,4 +30,3 @@ libncurses:QV: ln -sf lib${lib}w_g.a lib${lib}_g.a ln -sf lib${lib}w.a lib${lib}.a done - diff --git a/openssl/mkfile b/openssl/mkfile @@ -2,7 +2,7 @@ <v.mk src = openssl-$v -url = https://www.openssl.org/source/openssl-$v.tar.gz +url = http://www.openssl.org/source/openssl-$v.tar.gz mkfile = ../openssl.mk patches = \ ../openssl-1.0.0a-ldflags.patch \ diff --git a/openssl/openssl.mk b/openssl/openssl.mk @@ -1,3 +1,4 @@ +# TODO: update to 1.0.1h LIB = openssl DEPS = zlib INSTALL_LIB = libcrypto.a libssl.a @@ -40,7 +41,7 @@ openssl:QV: sslarch="linux-generic64" ;; arm) - sslarch="arm" + sslarch="linux-armv4" ;; esac ./Configure "${sslarch}" \ diff --git a/tmux/tmux.mk b/tmux/tmux.mk @@ -9,6 +9,8 @@ tmux: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/zlib/checksums b/zlib/checksums @@ -1 +1 @@ -ece209d4c7ec0cb58ede791444dc754e0d10811cbbdebe3df61c0fd9f9f9867c1c3ccd5f1827f847c005e24eef34fb5bf87b5d3f894d75da04f1797538290e4a zlib-1.2.8.tar.gz +405fbb4fc9ca8a59f34488205f403e77d4f184b08d344efbec6a8f558cac0512ee6cda1dc01b7913d61d9bed04cc710e61db1081bb8782c139fcb727f586fa54 zlib-1.2.8.tar.xz diff --git a/zlib/mkfile b/zlib/mkfile @@ -2,5 +2,5 @@ <v.mk src = zlib-$v -url = $mirror/zlib-$v.tar.gz +url = http://heanet.dl.sourceforge.net/project/libpng/zlib/$v/zlib-$v.tar.xz mkfile = ../zlib.mk