summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Hill <ahill@breadpudding.dev>2025-11-28 10:53:37 -0500
committerAlexander Hill <ahill@breadpudding.dev>2025-11-28 10:53:37 -0500
commit25bd0eb0b44d9635f3194a4e231900c1ec2f17bf (patch)
treedd5023c5923001b834e9514e46c8aff828a0afd8
parent679f263c2ffaf2891abd03d29a9af511c620e852 (diff)
Fixed libtool, musl, and perl for rootbuild
-rwxr-xr-xrootbuild.sh18
-rw-r--r--sources/libtool/libtool.spec4
-rwxr-xr-xsources/musl/musl.spec1
-rw-r--r--sources/perl/perl.spec18
4 files changed, 28 insertions, 13 deletions
diff --git a/rootbuild.sh b/rootbuild.sh
index d76f486..363d91b 100755
--- a/rootbuild.sh
+++ b/rootbuild.sh
@@ -1,5 +1,7 @@
#!/bin/sh -e
+export CC=clang
export CFLAGS="-O3 -pipe"
+export CXX=clang++
export CXXFLAGS=$CFLAGS
# xz Build
@@ -7,7 +9,8 @@ export CXXFLAGS=$CFLAGS
cd /maple
treetap build sources/xz/xz.spec
cd .treetap/sources/xz/*/*/xz-*/
-make -j $(nproc) install DESTDIR=/
+echo "Bootstrapping xz"
+make -j $(nproc) install DESTDIR=/ > /dev/null 2>&1
# libarchive Build
# NOTE: bsdcpio is needed to run "treetap package", so we manually install.
@@ -15,7 +18,8 @@ make -j $(nproc) install DESTDIR=/
cd /maple
treetap build sources/libarchive/libarchive.spec
cd .treetap/sources/libarchive/*/*/libarchive-*/
-make -j $(nproc) install DESTDIR=/
+echo "Bootstrapping libarchive"
+make -j $(nproc) install DESTDIR=/ > /dev/null 2>&1
# Now we can build stuff exclusively with treetap
# NOTE: bzip2, xz, and zlib need to be built before libarchive or we will be
@@ -31,8 +35,8 @@ make -j $(nproc) install DESTDIR=/
cd /maple
PACKAGES="byacc bzip2 libressl m4 make muon musl ncurses perl pkgconf xz zlib autoconf automake editline flex libarchive libtool musl-fts cmake mold"
for pkg in $PACKAGES; do
- treetap fetch sources/$pkg/$pkg.spec
- treetap build sources/$pkg/$pkg.spec
- treetap package sources/$pkg/$pkg.spec
- treetap install .treetap/packages/*/$pkg-*.cpio.xz
-done \ No newline at end of file
+ treetap fetch /maple/sources/$pkg/$pkg.spec
+ treetap build /maple/sources/$pkg/$pkg.spec
+ treetap package /maple/sources/$pkg/$pkg.spec
+ treetap install /maple/.treetap/packages/*/$pkg-*.cpio.xz
+done
diff --git a/sources/libtool/libtool.spec b/sources/libtool/libtool.spec
index a5eb3b3..ad794dd 100644
--- a/sources/libtool/libtool.spec
+++ b/sources/libtool/libtool.spec
@@ -14,7 +14,7 @@ build() {
# which requires musl-fts to function, which we can't build without
# libtoolize. Strangely enough, libtool is hard-coded to /bin/sh, so
# I don't know why libtoolize uses /usr/bin/env. ~ahill
- sed -i "s|/usr/bin/env sh|/bin/sh" libtoolize
+ sed -i "s|/usr/bin/env sh|/bin/sh|" libtoolize
}
clean() {
@@ -24,4 +24,4 @@ clean() {
package() {
cd libtool-*/
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
-} \ No newline at end of file
+}
diff --git a/sources/musl/musl.spec b/sources/musl/musl.spec
index 754c452..a4fb38a 100755
--- a/sources/musl/musl.spec
+++ b/sources/musl/musl.spec
@@ -28,5 +28,6 @@ package() {
DESTDIR=$TT_INSTALLDIR make install
# NOTE: Apparently, the linker library has an entry point that we can use as
# ldd. What kind of black magic is this? ~ahill
+ mkdir -p $TT_INSTALLDIR/bin
ln -sf /lib/ld-musl-$TT_ARCH.so.1 $TT_INSTALLDIR/bin/ldd
}
diff --git a/sources/perl/perl.spec b/sources/perl/perl.spec
index 4a5fa8a..bc737a1 100644
--- a/sources/perl/perl.spec
+++ b/sources/perl/perl.spec
@@ -2,12 +2,22 @@
SRC_HASH="e093ef184d7f9a1b9797e2465296f55510adb6dab8842b0c3ed53329663096dc"
SRC_NAME="perl"
SRC_URL="https://www.cpan.org/src/5.0/perl-5.42.0.tar.gz"
-SRC_VERSION="5.42.0"
+SRC_VERSION="5.42.0r1"
build() {
tar xf ../$SRC_FILENAME
cd perl-*/
- ./Configure -des
+ # NOTE: Not a Perl user, so I hope I don't screw this up. ~ahill
+ ./Configure -des \
+ -D bin=$TT_BINDIR \
+ -D installstyle=lib/perl5 \
+ -D prefix=$TT_PREFIX \
+ -D scriptdir=$TT_BINDIR \
+ -D sysroot=$TT_SYSROOT \
+ -D useshrplib \
+ -D usethreads \
+ -D usrinc=$TT_INCLUDEDIR \
+ -D vendorprefix=$TT_PREFIX
make -O -j $TT_PROCS
}
@@ -17,5 +27,5 @@ clean() {
package() {
cd perl-*/
- make -O -j $TT_PROCS DESTDIR=$TT_INSTALLDIR
-} \ No newline at end of file
+ make -O -j $TT_PROCS install.perl DESTDIR=$TT_INSTALLDIR
+}