From a7bcdd9b1b7da56ce4895e4e798a25aba0824ee0 Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Fri, 18 Feb 2022 10:59:00 -0600 Subject: more work.. --- scripts/bootstrap.sh | 4 +-- scripts/setup-abuild | 98 +++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 91 insertions(+), 11 deletions(-) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 78f8ac7ff..db165140b 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -30,8 +30,8 @@ test ! -n "${TARGET_ARCH}" && printf "Invoking '%s TARGET_ARCH' where 'TARGET_AR # "${HERE}/setup-abuild" ${TARGET_ARCH}; export PATH="${MCMTOOLS}/abuild/bin:${PATH}"; -#bash; -#exit; +bash; +exit; ## # Additional configuration. diff --git a/scripts/setup-abuild b/scripts/setup-abuild index cc8e238be..95e56d787 100755 --- a/scripts/setup-abuild +++ b/scripts/setup-abuild @@ -4,10 +4,9 @@ # This script is to be called from 'bootstrap.sh', not sourced. # PATH is fully contained. We install to 'MCMTOOLS/abuild/'. # -export PATH="${MCMTOOLS}/sys/bin:${MCMTOOLS}/host/bin"; - HERE="$(dirname $(readlink -f ${0}))"; DEST="${MCMTOOLS}/abuild"; +export PATH="${MCMTOOLS}/sys/bin:${MCMTOOLS}/host/bin:${DEST}/bin"; mkdir -p "${DEST}"; cd "${DEST}"; @@ -17,7 +16,7 @@ cd "${DEST}"; # OpenSSL # nssl=openssl; -vssl=1.1.1l; +vssl=1.1.1m; test ! -f ._${nssl}-${vssl} && \ ( test ! -d ${nssl}-${vssl} \ @@ -42,7 +41,7 @@ rm -fr ${nssl}-${vssl}; # abuild # nbld=abuild; -vbld=ff913b49072352604ce081378f015af1714e1bd2; +vbld=681ef9dfcf6e57bdda767efed7e50ce8e9de0563 test ! -f ._${nbld}-${vbld} && \ ( test ! -d ${nbld}-${vbld} \ @@ -64,6 +63,7 @@ test ! -f ._${nbld}-${vbld} && \ make -j$(nproc) -C .. install \ prefix="${DEST}" \ sysconfdir="${DEST}" \ + SCDOC=true \ ; sed -i "${DEST}/bin/abuild" \ -e 's@/bin/ash -e@/usr/bin/env bash@' \ @@ -77,7 +77,7 @@ touch ._${nbld}-${vbld}; # util-linux (for 'getopt' used by 'abuild-keygen') # nutl=util-linux; -vutl=2.37.2; +vutl=2.37.4; test ! -f ._${nutl}-${vutl} && \ ( test ! -d ${nutl}-${vutl} \ @@ -104,11 +104,89 @@ touch ._${nutl}-${vutl}; rm -fr ${nutl}-${vutl}; +## +# pkgconf (pkg-config replacement) +# +npkg=pkgconf; +vpkg=1044bb57ca8a6e6679de63105ffabf6b8e8acfd7; +test ! -f ._${npkg}-${vpkg} && +( + test ! -d ${npkg}-${vpkg} \ + && git clone https://github.com/${npkg}/${npkg}.git ${npkg}-${vpkg} \ + ; + cd ${npkg}-${vpkg}; + ./autogen.sh; + ./configure \ + --prefix="${DEST}" \ + --enable-static \ + --disable-shared \ + --with-system-libdir=/lib:/usr/lib \ + --with-system-includedir=/usr/include \ + ; + make -j$(nproc) install; +) +touch ._${npkg}-${vpkg}; +rm -fr ${npkg}-${vpkg}; + + +## +# samurai (ninja replacement) +# +nsam=samurai; +vsam=4cc8f4a3654b72c977e0e62367d1ab6d5b873def; +test ! -f ._${nsam}-${vsam} && +( + test ! -d ${nsam}-${vsam} \ + && git clone https://github.com/michaelforney/${nsam}.git ${nsam}-${vsam} \ + ; + cd ${nsam}-${vsam}; + CC=gcc \ + make -j$(nproc) install \ + PREFIX="" \ + DESTDIR="${DEST}" \ + ; + +) +touch ._${nsam}-${vsam}; +rm -fr ${nsam}-${vsam}; + + +## +# muon (meson replacement) +# +nmun=muon; +vmun=df7ee57e6d48aa159015e639588f51ab0e35ed03; +test ! -f ._${nmun}-${vmun} && +( + test ! -d ${nmun}-${vmun} \ + && git clone https://git.sr.ht/~lattis/${nmun} ${nmun}-${vmun} \ + ; + cd ${nmun}-${vmun}; + sed -i bootstrap.sh \ + -e 's/if.*then/if false; then/g' \ + ; + CC=gcc \ + ./bootstrap.sh \ + bootstrap \ + ; + bootstrap/muon setup \ + -Dstatic=true \ + build \ + ; + samu -C build; + cp build/muon "${DEST}/bin"; +) +touch ._${nmun}-${vmun}; +rm -fr ${nmun}-${vmun}; + + ## # apk-tools # +# Ariadne says use meson, and 'muon' doesn't work so... kludges! +# natl=apk-tools; -vatl=9f07a3447ea1e8fb67cdbd5c30b2ea144e826490; +vatl=be4ce40797af9056c79be4dc74ff978f1f4957e4; test ! -f ._${natl}-${vatl} && \ ( test ! -d ${natl}-${vatl} \ @@ -120,15 +198,17 @@ test ! -f ._${natl}-${vatl} && \ ; # disable shared libs sed -i src/Makefile \ -e 's/$(install-libapk_so)//g' -e 's/$(libapk_so)//g' \ - ; # disable shared libs + -e 's/ version.o/ version.o strlcpy.o/' \ + ; # disable shared libs, hack the hack sed -i src/context.c \ -e "s@var/log@${DEST}/${1}/var/log@" \ ; # hardcoded + ln -sf ../portability/strlcpy.c src/strlcpy.c; export LUA=no; # documentation requires lua make clean; make \ INSTALLDIR="${DEST}" \ - CFLAGS="-I${DEST}/include -I${MCMTOOLS}/sys/include" \ + CFLAGS="-I${DEST}/include -I${MCMTOOLS}/sys/include -DNEED_STRLCPY" \ LDFLAGS="-L${DEST}/lib -L${MCMTOOLS}/sys/lib -L${DEST}/${natl}-${vatl}/libfetch" \ LIBS="-lapk -lfetch -lssl -lcrypto -lz" \ ; @@ -168,7 +248,7 @@ rm -fr ${npax}-${vpax}; # fakeroot # nfrt=fakeroot; -vfrt=20210907T092512Z:1.26; # look on snapshot.d.o for this +vfrt=20220118T114129Z:1.27; # look on snapshot.d.o for this test ! -f ._${nfrt}-${vfrt#*:} && \ ( test ! -d ${nfrt}-${vfrt#*:} \ -- cgit v1.2.3-70-g09d2