morpheus

suckless linux distro
git clone git://git.2f30.org/morpheus.git
Log | Files | Refs | Submodules | README | LICENSE

commit 1a4fcf8b1c059db2ff2b105098697d3ca8e2c8c8
parent 6e52ffa89fe68d3eaf883907d90853230a0a4516
Author: sin <sin@2f30.org>
Date:   Wed Sep 25 23:00:52 +0100

Merge branch 'devel'

Diffstat:
DEPS | 1-
cross-scripts/curl | 4++--
cross-scripts/libevent | 4++--
cross-scripts/libsigc++ | 4++--
cross-scripts/libtorrent | 6++++--
cross-scripts/musl | 21+++------------------
cross-scripts/ncurses | 4++--
cross-scripts/zlib | 4++--
pkgs/dropbear | 7+++----
pkgs/em | 27---------------------------
pkgs/gawk | 2+-
pkgs/make | 4++--
pkgs/man | 2+-
pkgs/mksh | 2+-
pkgs/rsync | 4++--
pkgs/sbase | 2+-
pkgs/sdhcp | 2+-
pkgs/sed | 2+-
pkgs/sic | 2+-
pkgs/smdev | 2+-
pkgs/tmux | 7+++----
pkgs/ubase | 2+-
prepare-env | 5+++--
stage0 | 2+-
24 files changed, 40 insertions(+), 82 deletions(-)
diff --git a/DEPS b/DEPS @@ -1,3 +1,2 @@ -em ncurses dropbear zlib tmux libevent ncurses diff --git a/cross-scripts/curl b/cross-scripts/curl @@ -12,9 +12,9 @@ unpack() { build() { pushd src/curl-7.32.0 - CC=musl-gcc ./configure --prefix=$top/cross --with-ssl \ + CC=x86_64-linux-musl-gcc ./configure --prefix=$libcroot --with-ssl \ --with-random=/dev/urandom --disable-shared || return 1 - make CC=musl-gcc -j$nprocs || return 1 + make -j$nprocs || return 1 popd } diff --git a/cross-scripts/libevent b/cross-scripts/libevent @@ -12,8 +12,8 @@ unpack() { build() { pushd src/libevent-2.0.21-stable - CC=musl-gcc ./configure --prefix=$top/cross --disable-shared || return 1 - make CC=musl-gcc -j$nprocs || return 1 + CC="x86_64-linux-musl-gcc -static" ./configure --prefix=$libcroot --disable-shared || return 1 + make -j$nprocs || return 1 popd } diff --git a/cross-scripts/libsigc++ b/cross-scripts/libsigc++ @@ -12,8 +12,8 @@ unpack() { build() { pushd src/libsigc++-2.3.1 - CC=musl-gcc ./configure --prefix=$top/cross --disable-shared --enable-static || return 1 - make CC=musl-gcc -j$nprocs || return 1 + CXX=x86_64-linux-musl-g++ ./configure --prefix=$libcroot --disable-shared --enable-static || return 1 + make -j$nprocs || return 1 popd } diff --git a/cross-scripts/libtorrent b/cross-scripts/libtorrent @@ -12,8 +12,10 @@ unpack() { build() { pushd src/libtorrent-0.13.3 - CC=musl-gcc ./configure --prefix=$top/cross --disable-shared || return 1 - make CC=musl-gcc -j$nprocs || return 1 + CXX=x86_64-linux-musl-g++ ./configure --prefix=$libcroot \ + --disable-openssl --disable-shared || return 1 + sed -i 's/#define USE_EXECINFO 1//g' config.h + make -j$nprocs || return 1 popd } diff --git a/cross-scripts/musl b/cross-scripts/musl @@ -1,24 +1,9 @@ -url=$mirror/musl-0.9.13.tar.gz +url=$mirror/crossx86-x86_64-linux-musl-0.9.11.tar.xz fetch() { - wget -c $url -O src/musl-0.9.13.tar.gz -} - -unpack() { - pushd src - [ -d musl-0.9.13 ] || tar xzf musl-0.9.13.tar.gz - popd -} - -build() { - pushd src/musl-0.9.13 - ./configure --prefix=$top/cross --syslibdir=$top/cross/lib --disable-shared || return 1 - make -j$nprocs || return 1 - popd + wget -c $url -O src/crossx86-x86_64-linux-musl-0.9.11.tar.xz } install() { - pushd src/musl-0.9.13 - make install || return 1 - popd + tar xJf src/crossx86-x86_64-linux-musl-0.9.11.tar.xz -C $top/cross } diff --git a/cross-scripts/ncurses b/cross-scripts/ncurses @@ -13,11 +13,11 @@ unpack() { build() { pushd src/ncurses-5.9 cp $top/stuff/ncurses-fallback.c ncurses/fallback.c - CC=musl-gcc ./configure --prefix=$top/cross --without-tests \ + CC="x86_64-linux-musl-gcc -static" ./configure --prefix=$libcroot --without-tests \ --with-normal --enable-sigwinch --disable-nls --without-dlsym \ --without-cxx-binding \ --with-fallbacks="linux vt100 xterm xterm256-color" </dev/ptmx || return 1 - make CC=musl-gcc -j$nprocs || return 1 + make -j$nprocs || return 1 popd } diff --git a/cross-scripts/zlib b/cross-scripts/zlib @@ -12,8 +12,8 @@ unpack() { build() { pushd src/zlib-1.2.8 - CC=musl-gcc ./configure --prefix=$top/cross --static || return 1 - make CC=musl-gcc -j$nprocs || return 1 + CC=x86_64-linux-musl-gcc ./configure --prefix=$libcroot --static || return 1 + make -j$nprocs || return 1 popd } diff --git a/pkgs/dropbear b/pkgs/dropbear @@ -12,19 +12,18 @@ unpack() { build() { pushd src/dropbear-2013.56 - CC=musl-gcc ./configure CFLAGS="-I$top/cross/include" \ - LDFLAGS="-static -L$top/cross/lib" --prefix=$root || return 1 + CC=x86_64-linux-musl-gcc ./configure LDFLAGS=-static --prefix=$root || return 1 for i in UTMP WTMP PUTUTLINE PUTUTXLINE SYSLOG LASTLOG; do echo "#define DISABLE_$i" >> config.h done - make CC=musl-gcc SCPPROGRESS=1 PROGRAMS="dropbear dbclient scp dropbearkey" \ + make SCPPROGRESS=1 PROGRAMS="dropbear dbclient scp dropbearkey" \ prefix=$root sbindir=$root/bin -j$nprocs STATIC=1 || return 1 popd } install() { pushd src/dropbear-2013.56 - make CC=musl-gcc SCPPROGRESS=1 PROGRAMS="dropbear dbclient scp dropbearkey" prefix=$root \ + make SCPPROGRESS=1 PROGRAMS="dropbear dbclient scp dropbearkey" prefix=$root \ sbindir=$root/bin -j$nprocs install STATIC=1 || return 1 pushd $root/bin ln -s dbclient ssh diff --git a/pkgs/em b/pkgs/em @@ -1,27 +0,0 @@ -url=$mirror/em.tar.gz - -fetch() { - wget -c $url -O src/em.tar.gz -} - -unpack() { - pushd src - [ -d em ] || tar xzf em.tar.gz - popd -} - -build() { - pushd src/em - make clean - sed -i "s@BINDIR=/usr/bin@BINDIR=${root}/bin@;s@LIBDIR=/usr/lib@LIBDIR=${root}/share/doc/uemacs@" Makefile || return 1 - make -j$nprocs CC="musl-gcc -I$top/cross/include -I$top/cross/include/ncurses" \ - LDFLAGS="-static -L$top/cross/lib" || return 1 - popd -} - -install() { - pushd src/em - mkdir -p $root/share/doc/uemacs - make install || return 1 - popd -} diff --git a/pkgs/gawk b/pkgs/gawk @@ -12,7 +12,7 @@ unpack() { build() { pushd src/gawk-4.1.0 - CC="musl-gcc -static" ./configure --prefix=$root --disable-nls \ + CC="x86_64-linux-musl-gcc -static" ./configure --prefix=$root --disable-nls \ --libdir=$root/devel/x86_64-linux-musl/lib \ --libexecdir=$root/devel/x86_64-linux-musl/libexec || return 1 make -j$nprocs || return 1 diff --git a/pkgs/make b/pkgs/make @@ -12,8 +12,8 @@ unpack() { build() { pushd src/make-3.82 - CC="musl-gcc -static" ./configure --prefix=$root --disable-nls || return 1 - make CC="musl-gcc -static" -j$nprocs || return 1 + CC="x86_64-linux-musl-gcc -static" ./configure --prefix=$root --disable-nls || return 1 + make -j$nprocs || return 1 popd } diff --git a/pkgs/man b/pkgs/man @@ -12,7 +12,7 @@ unpack() { build() { pushd src/man - musl-gcc -std=gnu99 -o man man.c -static || return 1 + x86_64-linux-musl-gcc -std=gnu99 -o man man.c -static || return 1 popd } diff --git a/pkgs/mksh b/pkgs/mksh @@ -12,7 +12,7 @@ unpack() { build() { pushd src/mksh - CC=musl-gcc LDFLAGS+=-static sh Build.sh || return 1 + CC=x86_64-linux-musl-gcc LDFLAGS+=-static sh Build.sh || return 1 popd } diff --git a/pkgs/rsync b/pkgs/rsync @@ -12,8 +12,8 @@ unpack() { build() { pushd src/rsync-3.0.9 - CC=musl-gcc ./configure --prefix=$root LDFLAGS="-static" || return 1 - make CC=musl-gcc -j$nprocs || return 1 + CC=x86_64-linux-musl-gcc ./configure --prefix=$root LDFLAGS="-static" || return 1 + make -j$nprocs || return 1 popd } diff --git a/pkgs/sbase b/pkgs/sbase @@ -7,7 +7,7 @@ fetch() { build() { pushd src/sbase make clean - make -j$nprocs CC=musl-gcc LDFLAGS=-static || return 1 + make -j$nprocs CC=x86_64-linux-musl-gcc LDFLAGS=-static || return 1 popd } diff --git a/pkgs/sdhcp b/pkgs/sdhcp @@ -13,7 +13,7 @@ unpack() { build() { pushd src/sdhcp make clean - make CC=musl-gcc LDFLAGS=-static || return 1 + make CC=x86_64-linux-musl-gcc LDFLAGS=-static || return 1 popd } diff --git a/pkgs/sed b/pkgs/sed @@ -12,7 +12,7 @@ unpack() { build() { pushd src/sed-4.2 - CC="musl-gcc -static" ./configure --prefix=$root --disable-nls \ + CC="x86_64-linux-musl-gcc -static" ./configure --prefix=$root --disable-nls \ --libdir=$root/devel/x86_64-linux-musl/lib \ --libexecdir=$root/devel/x86_64-linux-musl/libexec || return 1 make -j$nprocs || return 1 diff --git a/pkgs/sic b/pkgs/sic @@ -13,7 +13,7 @@ unpack() { build() { pushd src/sic make clean - make CC=musl-gcc LDFLAGS=-static || return 1 + make CC=x86_64-linux-musl-gcc LDFLAGS=-static || return 1 popd } diff --git a/pkgs/smdev b/pkgs/smdev @@ -7,7 +7,7 @@ fetch() { build() { pushd src/smdev make clean - make CC=musl-gcc LDFLAGS=-static || return 1 + make CC=x86_64-linux-musl-gcc LDFLAGS=-static || return 1 popd } diff --git a/pkgs/tmux b/pkgs/tmux @@ -12,10 +12,9 @@ unpack() { build() { pushd src/tmux-1.8 - CC=musl-gcc ./configure --prefix=$root \ - CFLAGS="-I$top/cross/include -I$top/cross/include/ncurses" \ - LDFLAGS="-static -L$top/cross/lib" || return 1 - make CC=musl-gcc -j$nprocs || return 1 + CC=x86_64-linux-musl-gcc ./configure --prefix=$root LDFLAGS=-static \ + CFLAGS="-I$libcroot/include/ncurses" || return 1 + make -j$nprocs || return 1 popd } diff --git a/pkgs/ubase b/pkgs/ubase @@ -7,7 +7,7 @@ fetch() { build() { pushd src/ubase make clean - make -j$nprocs CC=musl-gcc LDFLAGS=-static || return 1 + make -j$nprocs CC=x86_64-linux-musl-gcc LDFLAGS=-static || return 1 popd } diff --git a/prepare-env b/prepare-env @@ -1,10 +1,11 @@ top=$(pwd) root=$top/root +libcroot=$top/cross/x86_64-linux-musl/x86_64-linux-musl nprocs=4 arch=x86_64 version=0.0 mirror=http://dl.2f30.org/morpheus-pkgs/$arch/$version -export top root nprocs mirror +export top root libcroot nprocs mirror -PATH=$top/cross/bin:$PATH +PATH=$top/cross/x86_64-linux-musl/bin:$PATH export PATH diff --git a/stage0 b/stage0 @@ -14,7 +14,7 @@ rm -rf root cross morpheus.log . ./prepare-root mkdir -p src cross -# Build musl-gcc +# Fetch and install our musl cross-compiler ./build cross-scripts/musl installed_deps=