Merge pull request 'Integrated Treetap into Maple Linux' (#1) from treetap into main
Reviewed-on: #1
This commit is contained in:
commit
1b00f1c8ca
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1 +0,0 @@
|
||||
*.patch text eol=lf
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,3 +1,2 @@
|
||||
/build
|
||||
/maple
|
||||
/sources
|
||||
/.bootstrap
|
||||
/.treetap
|
||||
|
||||
@ -1,6 +0,0 @@
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk update
|
||||
RUN apk upgrade
|
||||
RUN apk add cargo clang cmake curl git libc++ linux-headers makedoas python3 rsync rust samurai umount
|
||||
RUN git clone https://github.com/cbpudding/maplelinux-bootstrap /maple
|
||||
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
||||
ISC License
|
||||
|
||||
Copyright (c) Alexander Hill, Nicholas McDaniel, and Maple Linux Contributors
|
||||
Copyright (c) 2024-2026 Alexander Hill, Nicholas McDaniel, and Maple Linux Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
|
||||
131
README.md
131
README.md
@ -1,127 +1,6 @@
|
||||
# Maple Linux Bootstrap Scripts
|
||||
|
||||
This repository contains the scripts used to build Maple Linux from the source code. Most users will want to download a tarball from [here](https://maple.camp/linux/) to install Maple Linux. For everyone else, contributions are welcome!
|
||||
|
||||
## System Requirements
|
||||
|
||||
- Intel Core i3-6100 or greater
|
||||
- At least 1 GB of storage space
|
||||
|
||||
## Installing Maple Linux (For Most Users)
|
||||
|
||||
Once you have a tarball downloaded from the repository above, you can begin installing Maple Linux.
|
||||
|
||||
### Building the System Image
|
||||
|
||||
First, you will need to start with a storage device that is around 4 GB in size (although, you can probably get away with less if you're brave). The first 512 MB should be an EFI System Partition (FAT32), and the remainder of the disk should be formatted as XFS. The following is an example of formatting the disk with `parted`, where `/dev/sdX` is the disk of your choice:
|
||||
|
||||
```
|
||||
# parted /dev/sdX
|
||||
GNU Parted 3.6
|
||||
Using /dev/sdX
|
||||
Welcome to GNU Parted! Type 'help' to view a list of commands.
|
||||
(parted) mklabel gpt
|
||||
(parted) mkpart fat32 0% 512M
|
||||
(parted) mkpart xfs 512M 100%
|
||||
(parted) set 1 esp on
|
||||
(parted) quit
|
||||
```
|
||||
|
||||
That doesn't actually format the partitions, so we'll need to do that next:
|
||||
|
||||
```
|
||||
# mkfs.fat -F32 /dev/sdX1
|
||||
mkfs.fat 4.2 (2021-01-31)
|
||||
# mkfs.xfs /dev/sdX2
|
||||
meta-data=/dev/sdX2 isize=512 agcount=4, agsize=1017280 blks
|
||||
= sectsz=512 attr=2, projid32bit=1
|
||||
= crc=1 finobt=1, sparse=1, rmapbt=1
|
||||
= reflink=1 bigtime=1 inobtcount=1 nrext64=1
|
||||
= exchange=0 metadir=0
|
||||
data = bsize=4096 blocks=4069120, imaxpct=25
|
||||
= sunit=0 swidth=0 blks
|
||||
naming =version 2 bsize=4096 ascii-ci=0, ftype=1, parent=0
|
||||
log =internal log bsize=4096 blocks=19237, version=2
|
||||
= sectsz=512 sunit=0 blks, lazy-count=1
|
||||
realtime =none extsz=4096 blocks=0, rtextents=0
|
||||
= rgcount=0 rgsize=0 extents
|
||||
= zoned=0 start=0 reserved=0
|
||||
Discarding blocks...Done.
|
||||
```
|
||||
|
||||
Now that our image has been formatted correctly, we can extract the contents of Maple Linux to the disk. We'll start by creating a mount point for the root partition before mounting it and the boot partition.
|
||||
|
||||
```
|
||||
# mkdir maple
|
||||
# mount /dev/sdX2 maple
|
||||
# mkdir maple/boot
|
||||
# mount /dev/sdX1 maple/boot
|
||||
```
|
||||
|
||||
Now that the image has been formatted properly, we can extract the contents of the tarball onto the system image:
|
||||
|
||||
```
|
||||
# cd maple
|
||||
# tar xf ../maplelinux-202507201645.tar.xz
|
||||
```
|
||||
|
||||
### Configuring Limine
|
||||
|
||||
To configure Limine, simply open `maple/boot/limine` in your text editor of choice. The only thing you *may* need to change is the value of `kernel_cmdline`. By default, it points to `/dev/vda2`, which is the default for a VirtIO disk on KVM. Of course, you can do [much more to customize your system](https://github.com/limine-bootloader/limine/blob/v9.x/CONFIG.md), but it is not required to boot.
|
||||
|
||||
### Writing /etc/fstab
|
||||
|
||||
Once again, you can change the fstab by opening `maple/etc/fstab` in your favorite text editor. The only two lines I would recommend changing are the first two unless you know what you're doing. The first line references the root partition and the second line references the boot partition. They are set to `/dev/vda2` and `/dev/vda1` respectively, as those are what KVM defaults to with a single VirtIO disk configured. This is what fstab should look like by default:
|
||||
|
||||
```
|
||||
/dev/vda2 / xfs defaults 1 1
|
||||
/dev/vda1 /boot vfat defaults 0 2
|
||||
proc /proc proc nosuid,noexec,nodev 0 0
|
||||
sysfs /sys sysfs nosuid,noexec,nodev 0 0
|
||||
devpts /dev/pts devpts defaults 0 0
|
||||
tmpfs /run tmpfs defaults 0 0
|
||||
devtmpfs /dev devtmpfs mode=0755,nosuid 0 0
|
||||
tmpfs /dev/shm tmpfs nosuid,nodev 0 0
|
||||
cgroup2 /sys/fs/cgroup cgroup2 nosuid,noexec,nodev 0 0
|
||||
```
|
||||
|
||||
### Building initramfs
|
||||
|
||||
Last, but certainly not least, is the initramfs. We'll start by creating the `maple/etc/tinyramfs` folder, which we'll use to store `maple/etc/tinyramfs/config`. Once again, `root` should be set to the root partition on your system.
|
||||
|
||||
```
|
||||
root=/dev/vda2
|
||||
root_type=xfs
|
||||
monolith=true
|
||||
```
|
||||
|
||||
Once the initramfs builder has been configured, we can `chroot` into the image one final time, check the installed kernel version by listing the contents of `/lib/modules` (there should only be one subfolder), and invoking `tinyramfs` to build the initramfs for boot.
|
||||
|
||||
```
|
||||
# chroot maple zsh
|
||||
hostname# ls /lib/modules
|
||||
6.15.4-maple
|
||||
hostname# tinyramfs -k 6.15.4-maple /boot/initramfs
|
||||
>> creating ramfs structure
|
||||
>> generating initramfs image
|
||||
+> done: /boot/initramfs
|
||||
hostname# exit
|
||||
```
|
||||
|
||||
With that, we can umount the image and boot into Maple Linux!
|
||||
|
||||
## Building Maple Linux
|
||||
|
||||
Building Maple Linux is mostly an automated process at this point. Here is a summary of the scripts provided in this repository, in order of execution (assuming nothing goes wrong):
|
||||
|
||||
- `./fetch-sources.sh` - Downloads the sources and verifies their hashes against what is in `sources.list`
|
||||
- `./build-bootstrap.sh` - Extracts and builds the bare minimum to build the remainder of the image in a `chroot`
|
||||
- `./chroot-bootstrap.sh` - `chroot`s into the image with all the appropriate mounts
|
||||
- `./build-chroot.sh` - Extracts and builds the system image from inside of the `chroot`
|
||||
|
||||
This process has been known to take *hours*, so it's best not to do this unless you're sure you want to do it this way. Once you have a working bootstrap, it is recommended to back that up before proceeding with the chroot build so you can easily restore your progress without waiting for hours to get a new bootstrap. Of course, if you need to change LLVM for any reason, you will need to bootstrap the system again...
|
||||
|
||||
Once you have a working image, you can follow the steps above to install the image normally. If you have any suggestions to improve the system or its build process, please make a pull request or issue!
|
||||
This repository contains the scripts used to build Maple Linux from the source code.
|
||||
|
||||
## Maple Linux Philosophy
|
||||
|
||||
@ -137,6 +16,14 @@ While it may sound too good to be true, that's because it is. Maple Linux does n
|
||||
- By taking advantage of newer hardware, we are making the system incompatible with older machines. This isn't to say that Maple Linux *shouldn't* be run on older machines, but rather that it is out of scope for this project. If you want to make this run on your own hardware, then by all means, go right ahead. That's the beauty of open source.
|
||||
- In order to achieve the "unified" experience, the software you are given has been pre-determined so we can focus on optimizing Maple Linux as a whole. This makes it far less generic and customizable, but offers a much more coherent and focused system overall. In addition, this makes it much more maintainable for a single developer such as myself.
|
||||
|
||||
### Licensing
|
||||
|
||||
Maple Linux is built upon software created by various developers, and is distributed under various licenses as a result. While it isn't one of the main goals of the system, especially since Linux itself is copyleft, I aim to create an operating system that's as free as I can reasonably make it.
|
||||
|
||||

|
||||
|
||||
For more information about the software included in this project and its licensing, see [SOFTWARE.md](docs/SOFTWARE.md).
|
||||
|
||||
### Filesystem Hierarchy
|
||||
|
||||
Maple Linux uses a slightly different filesystem hierarchy compared to most Linux systems, but it shouldn't be enough to become incompatible with existing software. The following are the notable changes:
|
||||
|
||||
@ -1,384 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
export MAPLE=$(pwd)/maple
|
||||
|
||||
export BUILD=$(clang -dumpmachine)
|
||||
export CC=clang
|
||||
export CFLAGS="-O3 -march=skylake -pipe"
|
||||
export CXX=clang++
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
export HOST=x86_64-maple-linux-musl
|
||||
export LD=ld.lld
|
||||
export THREADS=$(nproc)
|
||||
|
||||
# A simplified FHS variant with symlinks for backwards compatibility ~ahill
|
||||
# TODO: Where does /usr/com fit into all of this (shared state directory)? ~ahill
|
||||
mkdir -p $MAPLE/bin
|
||||
mkdir -p $MAPLE/boot
|
||||
mkdir -p $MAPLE/boot/EFI/BOOT/
|
||||
mkdir -p $MAPLE/dev
|
||||
mkdir -p $MAPLE/etc
|
||||
mkdir -p $MAPLE/home
|
||||
mkdir -p $MAPLE/lib
|
||||
# TODO: Does it make sense to have this long-term? Anything that depends on
|
||||
# libc++ fails to link without it, but this should be fixed via a
|
||||
# configuration change in LLVM. ~ahill
|
||||
ln -sf . $MAPLE/lib/$HOST
|
||||
mkdir -p $MAPLE/maple/patches
|
||||
mkdir -p $MAPLE/maple/sources
|
||||
mkdir -p $MAPLE/proc
|
||||
mkdir -p $MAPLE/run
|
||||
ln -sf bin $MAPLE/sbin
|
||||
mkdir -p $MAPLE/sys
|
||||
mkdir -p $MAPLE/tmp
|
||||
mkdir -p $MAPLE/usr
|
||||
ln -sf ../bin $MAPLE/usr/bin
|
||||
mkdir -p $MAPLE/usr/include
|
||||
ln -sf . $MAPLE/usr/include/$HOST
|
||||
ln -sf ../lib $MAPLE/usr/lib
|
||||
ln -sf ../lib $MAPLE/usr/libexec
|
||||
ln -sf ../bin $MAPLE/usr/sbin
|
||||
mkdir -p $MAPLE/usr/share
|
||||
mkdir -p $MAPLE/var
|
||||
mkdir -p $MAPLE/var/cache
|
||||
mkdir -p $MAPLE/var/lib
|
||||
ln -sf ../run/lock $MAPLE/var/lock
|
||||
mkdir -p $MAPLE/var/log
|
||||
ln -sf ../run $MAPLE/var/run
|
||||
mkdir -p $MAPLE/var/spool
|
||||
mkdir -p $MAPLE/var/tmp
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
# LLVM Build
|
||||
tar xf ../sources/llvm-project-*.tar*
|
||||
cd llvm-project-*/
|
||||
# TODO: Python is a required part of LLVM, but we can't include the latest
|
||||
# version due to conflicts with LibreSSL. Maybe we can piggyback off of
|
||||
# Python 3.9 for a while, but that's not a sustainable solution long-term.
|
||||
# ~ahill
|
||||
# See also: https://peps.python.org/pep-0644/
|
||||
cmake -B stage1 -G Ninja -S llvm \
|
||||
-DCLANG_DEFAULT_CXX_STDLIB=libc++ \
|
||||
-DCLANG_DEFAULT_RTLIB=compiler-rt \
|
||||
-DCLANG_DEFAULT_UNWINDLIB=libunwind \
|
||||
-DCLANG_VENDOR=Maple \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=$MAPLE/maple/tools \
|
||||
-DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON \
|
||||
-DLIBCXX_CXX_ABI=libcxxabi \
|
||||
-DLIBCXX_HAS_MUSL_LIBC=ON \
|
||||
-DLIBCXX_USE_COMPILER_RT=ON \
|
||||
-DLIBCXXABI_USE_COMPILER_RT=ON \
|
||||
-DLIBCXXABI_USE_LLVM_UNWINDER=ON \
|
||||
-DLIBUNWIND_ENABLE_ASSERTIONS=OFF \
|
||||
-DLIBUNWIND_USE_COMPILER_RT=ON \
|
||||
-DLLVM_BUILD_LLVM_DYLIB=ON \
|
||||
-DLLVM_DEFAULT_TARGET_TRIPLE=$HOST \
|
||||
-DLLVM_ENABLE_LIBCXX=ON \
|
||||
-DLLVM_ENABLE_PROJECTS="clang;lld;llvm" \
|
||||
-DLLVM_ENABLE_RUNTIMES="compiler-rt;libunwind;libcxxabi;libcxx" \
|
||||
-DLLVM_HOST_TRIPLE=$BUILD \
|
||||
-DLLVM_INSTALL_BINUTILS_SYMLINKS=ON \
|
||||
-DLLVM_INSTALL_UTILS=ON \
|
||||
-DLLVM_LINK_LLVM_DYLIB=ON \
|
||||
-DLLVM_TARGETS_TO_BUILD=X86
|
||||
cmake --build stage1
|
||||
cmake --install stage1
|
||||
cd ..
|
||||
|
||||
export CC="$MAPLE/maple/tools/bin/clang"
|
||||
export CFLAGS="-O3 -march=skylake -pipe --sysroot=$MAPLE"
|
||||
export CXX="$MAPLE/maple/tools/bin/clang++"
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
export LD=$MAPLE/maple/tools/bin/ld.lld
|
||||
export PATH="$MAPLE/maple/tools/bin:$PATH"
|
||||
export RUSTFLAGS="-C target-feature=-crt-static"
|
||||
|
||||
# Linux Headers
|
||||
tar xf ../sources/linux-*.tar*
|
||||
cd linux-*/
|
||||
LLVM=1 make -j $THREADS mrproper
|
||||
# TODO: Why do we need rsync to install the Linux headers? ~ahill
|
||||
LLVM=1 make -j $THREADS headers_install INSTALL_HDR_PATH=$MAPLE/usr
|
||||
cd ..
|
||||
|
||||
# musl Build
|
||||
# FIXME: CVE-2025-26519
|
||||
tar xf ../sources/musl-*.tar*
|
||||
cd musl-*/
|
||||
./configure --includedir=/usr/include --prefix=""
|
||||
make -O -j $THREADS
|
||||
make -O -j $THREADS install DESTDIR=$MAPLE
|
||||
# NOTE: musl provides static libraries for POSIX libraries such as libm, but
|
||||
# fails to provide shared versions which will breaks builds later on.
|
||||
# Granted, they are useless since libc.so contains all the functionality
|
||||
# we need, but it is needed for compatibility. As of April 5th, 2025, zsh
|
||||
# is known to be misconfigured as a result of missing libraries. ~ahill
|
||||
for lib in $(grep "EMPTY_LIB_NAMES =" Makefile | sed "s/EMPTY_LIB_NAMES = //"); do
|
||||
ln -sf libc.so $MAPLE/lib/lib$lib.so
|
||||
done
|
||||
# NOTE: musl has some witchcraft associated with it that allows it to function
|
||||
# as an implementation of ldd. Honestly, the idea of a library with as an
|
||||
# entry point is something I have never thought of before, but I'm
|
||||
# interested in exploring the possibilities. ~ahill
|
||||
ln -sf /lib/ld-musl-x86_64.so.1 $MAPLE/bin/ldd
|
||||
cd ..
|
||||
|
||||
# dash Build
|
||||
tar xf ../sources/dash-*.tar*
|
||||
cd dash-*/
|
||||
./configure \
|
||||
--datarootdir=/usr/share \
|
||||
--exec-prefix="" \
|
||||
--includedir=/usr/include \
|
||||
--libexecdir=/lib \
|
||||
--prefix="" \
|
||||
--sharedstatedir=/usr/com
|
||||
make -j $THREADS
|
||||
make -j $THREADS install DESTDIR=$MAPLE
|
||||
ln -sf dash $MAPLE/bin/sh
|
||||
cd ..
|
||||
|
||||
# m4 Build
|
||||
tar xf ../sources/m4-*.tar*
|
||||
cd m4-*/
|
||||
./configure \
|
||||
--datarootdir=/usr/share \
|
||||
--disable-nls \
|
||||
--enable-c++ \
|
||||
--includedir=/usr/include \
|
||||
--libexecdir=/lib \
|
||||
--prefix="" \
|
||||
--sharedstatedir=/usr/com
|
||||
make -j $THREADS
|
||||
make -j $THREADS install DESTDIR=$MAPLE
|
||||
cd ..
|
||||
|
||||
# Coreutils Build
|
||||
tar xf ../sources/coreutils-*.tar*
|
||||
cd coreutils-*/
|
||||
./configure \
|
||||
--datarootdir=/usr/share \
|
||||
--disable-nls \
|
||||
--enable-install-program=hostname \
|
||||
--includedir=/usr/include \
|
||||
--libexecdir=/lib \
|
||||
--prefix="" \
|
||||
--sharedstatedir=/usr/com
|
||||
make -j $THREADS
|
||||
make -j $THREADS install DESTDIR=$MAPLE
|
||||
cd ..
|
||||
|
||||
# Diffutils Build
|
||||
tar xf ../sources/diffutils-*.tar*
|
||||
cd diffutils-*/
|
||||
./configure \
|
||||
--disable-nls \
|
||||
--exec-prefix="" \
|
||||
--libexecdir=/lib \
|
||||
--localstatedir=/var \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc
|
||||
make -j $THREADS
|
||||
make -j $THREADS install DESTDIR=$MAPLE
|
||||
cd ..
|
||||
|
||||
# Findutils Build
|
||||
tar xf ../sources/findutils-*.tar*
|
||||
cd findutils-*/
|
||||
./configure \
|
||||
--datarootdir=/usr/share \
|
||||
--disable-nls \
|
||||
--exec-prefix="" \
|
||||
--libexecdir=/lib \
|
||||
--localstatedir=/var \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc
|
||||
make -j $THREADS
|
||||
make -j $THREADS install DESTDIR=$MAPLE
|
||||
cd ..
|
||||
|
||||
# Grep Build
|
||||
tar xf ../sources/grep-*.tar*
|
||||
cd grep-*/
|
||||
./configure \
|
||||
--datarootdir=/usr/share \
|
||||
--disable-nls \
|
||||
--exec-prefix="" \
|
||||
--libexecdir=/lib \
|
||||
--localstatedir=/var \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc
|
||||
make -j $THREADS
|
||||
make -j $THREADS install DESTDIR=$MAPLE
|
||||
cd ..
|
||||
|
||||
# Gzip Build
|
||||
tar xf ../sources/gzip-*.tar*
|
||||
cd gzip-*/
|
||||
./configure \
|
||||
--datarootdir=/usr/share \
|
||||
--exec-prefix="" \
|
||||
--libexecdir=/lib \
|
||||
--localstatedir=/var \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc
|
||||
make -j $THREAD
|
||||
make -j $THREAD install DESTDIR=$MAPLE
|
||||
cd ..
|
||||
|
||||
# Make Build
|
||||
tar xf ../sources/make-*.tar*
|
||||
cd make-*/
|
||||
./configure \
|
||||
--datarootdir=/usr/share \
|
||||
--disable-nls \
|
||||
--enable-year2038 \
|
||||
--exec-prefix="" \
|
||||
--libexecdir=/lib \
|
||||
--localstatedir=/var \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc
|
||||
make -j $THREAD
|
||||
make -j $THREAD install DESTDIR=$MAPLE
|
||||
cd ..
|
||||
|
||||
# Sed Build
|
||||
tar xf ../sources/sed-*.tar*
|
||||
cd sed-*/
|
||||
./configure \
|
||||
--datarootdir=/usr/share \
|
||||
--disable-i18n \
|
||||
--disable-nls \
|
||||
--exec-prefix="" \
|
||||
--libexecdir=/lib \
|
||||
--localstatedir=/var \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc
|
||||
make -j $THREAD
|
||||
make -j $THREAD install DESTDIR=$MAPLE
|
||||
cd ..
|
||||
|
||||
# Tar Build
|
||||
tar xf ../sources/tar-*.tar*
|
||||
cd tar-*/
|
||||
./configure \
|
||||
--datarootdir=/usr/share \
|
||||
--disable-nls \
|
||||
--exec-prefix="" \
|
||||
--libexecdir=/lib \
|
||||
--localstatedir=/var \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc
|
||||
make -j $THREAD
|
||||
make -j $THREAD install DESTDIR=$MAPLE
|
||||
cd ..
|
||||
|
||||
# Xz Build
|
||||
tar xf ../sources/xz-*.tar*
|
||||
cd xz-*/
|
||||
./configure \
|
||||
--datarootdir=/usr/share \
|
||||
--disable-doc \
|
||||
--disable-nls \
|
||||
--disable-static \
|
||||
--enable-year2038 \
|
||||
--exec-prefix="" \
|
||||
--libexecdir=/lib \
|
||||
--localstatedir=/var \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc
|
||||
make -j $THREAD
|
||||
make -j $THREAD install DESTDIR=$MAPLE
|
||||
cd ..
|
||||
|
||||
# Gawk Build
|
||||
tar xf ../sources/gawk-*.tar*
|
||||
cd gawk-*/
|
||||
./configure \
|
||||
--disable-mpfr \
|
||||
--disable-nls \
|
||||
--exec-prefix="" \
|
||||
--libexecdir=/lib \
|
||||
--localstatedir=/var \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc
|
||||
make -j $THREADS
|
||||
make -j $THREADS install DESTDIR=$MAPLE
|
||||
cd ..
|
||||
|
||||
# LLVM Build (Stage 2)
|
||||
# NOTE: We are removing the sysroot option from CFLAGS and CXXFLAGS to prevent a
|
||||
# potential conflict with CMake. Adapted from Nick's contribution. ~ahill
|
||||
export CFLAGS=$(echo $CFLAGS | sed "s/--sysroot=\S*//")
|
||||
export CXXFLAGS=$(echo $CXXFLAGS | sed "s/--sysroot=\S*//")
|
||||
cd llvm-project-*/
|
||||
TOOLCHAIN_FILE=$HOST-maple-clang.cmake
|
||||
# NOTE: First time doing this. Did I do it right? ~ahill
|
||||
echo "set(CMAKE_SYSTEM_NAME Linux)" > $TOOLCHAIN_FILE
|
||||
echo "set(CMAKE_SYSROOT $MAPLE)" >> $TOOLCHAIN_FILE
|
||||
echo "set(CMAKE_C_COMPILER_TARGET $HOST)" >> $TOOLCHAIN_FILE
|
||||
echo "set(CMAKE_CXX_COMPILER_TARGET $HOST)" >> $TOOLCHAIN_FILE
|
||||
echo "set(CMAKE_C_FLAGS_INIT \"$CFLAGS\")" >> $TOOLCHAIN_FILE
|
||||
echo "set(CMAKE_CXX_FLAGS_INIT \"$CXXFLAGS\")" >> $TOOLCHAIN_FILE
|
||||
echo "set(CMAKE_LINKER_TYPE LLD)" >> $TOOLCHAIN_FILE
|
||||
echo "set(CMAKE_C_COMPILER \"$CC\")" >> $TOOLCHAIN_FILE
|
||||
echo "set(CMAKE_CXX_COMPILER \"$CXX\")" >> $TOOLCHAIN_FILE
|
||||
echo "set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)" >> $TOOLCHAIN_FILE
|
||||
echo "set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)" >> $TOOLCHAIN_FILE
|
||||
echo "set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> $TOOLCHAIN_FILE
|
||||
echo "set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)" >> $TOOLCHAIN_FILE
|
||||
# TODO: Is it possible to prevent CMake from building static libraries? ~ahill
|
||||
# NOTE: compiler-rt fails to build on musl because execinfo.h is missing.
|
||||
# Disabling COMPILER_RT_BUILD_GWP_ASAN works. ~ahill
|
||||
# See also: https://github.com/llvm/llvm-project/issues/60687
|
||||
cmake -B stage2 -G Ninja -S llvm \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCLANG_DEFAULT_CXX_STDLIB=libc++ \
|
||||
-DCLANG_DEFAULT_RTLIB=compiler-rt \
|
||||
-DCLANG_DEFAULT_UNWINDLIB=libunwind \
|
||||
-DCMAKE_BUILD_PARALLEL_LEVEL=$THREADS \
|
||||
-DCMAKE_INSTALL_LIBDIR=$MAPLE/lib \
|
||||
-DCMAKE_INSTALL_PREFIX=$MAPLE/usr \
|
||||
-DCMAKE_INSTALL_RPATH=/lib \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$(pwd)/$TOOLCHAIN_FILE \
|
||||
-DCLANG_VENDOR=Maple \
|
||||
-DCOMPILER_RT_BUILD_GWP_ASAN=OFF \
|
||||
-DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON \
|
||||
-DLIBCXX_CXX_ABI=libcxxabi \
|
||||
-DLIBCXX_HAS_MUSL_LIBC=ON \
|
||||
-DLIBCXX_USE_COMPILER_RT=ON \
|
||||
-DLIBCXXABI_USE_COMPILER_RT=ON \
|
||||
-DLIBCXXABI_USE_LLVM_UNWINDER=ON \
|
||||
-DLIBUNWIND_ENABLE_ASSERTIONS=OFF \
|
||||
-DLIBUNWIND_USE_COMPILER_RT=ON \
|
||||
-DLLVM_BUILD_LLVM_DYLIB=ON \
|
||||
-DLLVM_ENABLE_LIBCXX=ON \
|
||||
-DLLVM_ENABLE_LLD=ON \
|
||||
-DLLVM_ENABLE_PROJECTS="clang;libclc;lld;lldb;llvm" \
|
||||
-DLLVM_ENABLE_RTTI=ON \
|
||||
-DLLVM_ENABLE_RUNTIMES="compiler-rt;libunwind;libcxxabi;libcxx" \
|
||||
-DLLVM_ENABLE_ZSTD=OFF \
|
||||
-DLLVM_HOST_TRIPLE=$HOST \
|
||||
-DLLVM_INSTALL_BINUTILS_SYMLINKS=ON \
|
||||
-DLLVM_INSTALL_UTILS=ON \
|
||||
-DLLVM_LINK_LLVM_DYLIB=ON \
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
||||
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON
|
||||
cmake --build stage2
|
||||
cmake --install stage2
|
||||
ln -sf clang $MAPLE/bin/cc
|
||||
ln -sf clang++ $MAPLE/bin/c++
|
||||
ln -sf ld.lld $MAPLE/bin/ld
|
||||
# NOTE: Temporary workaround because builds that require __config fail
|
||||
# otherwise. Is there a better solution for this? ~ahill
|
||||
mv $MAPLE/maple/tools/include/$HOST/c++/v1/__config_site $MAPLE/maple/tools/include/c++/v1/
|
||||
cd ..
|
||||
|
||||
cd ..
|
||||
|
||||
# Copy the necessary configuration files to the bootstrap
|
||||
cp limine.conf $MAPLE/boot/
|
||||
cp linux.$(uname -m).config $MAPLE/maple/
|
||||
1953
build-chroot.sh
1953
build-chroot.sh
File diff suppressed because it is too large
Load Diff
@ -1,41 +0,0 @@
|
||||
#!/bin/sh
|
||||
MAPLE=$(pwd)/maple
|
||||
|
||||
run_chroot() {
|
||||
SHELL=/bin/sh
|
||||
if [ -e $MAPLE/bin/zsh ]; then
|
||||
SHELL=/bin/zsh
|
||||
fi
|
||||
chroot $MAPLE $SHELL
|
||||
}
|
||||
|
||||
if mount --rbind /dev $MAPLE/dev && mount --make-rslave $MAPLE/dev; then
|
||||
if mount -t proc /proc $MAPLE/proc; then
|
||||
if mount --rbind /sys $MAPLE/sys && mount --make-rslave $MAPLE/sys; then
|
||||
if mount --rbind /tmp $MAPLE/tmp; then
|
||||
if mount --bind /run $MAPLE/run; then
|
||||
if [ -d $MAPLE/maple/sources ]; then
|
||||
if mount --bind ./sources $MAPLE/maple/sources; then
|
||||
if [ -d $MAPLE/maple/patches ]; then
|
||||
if mount --bind ./patches $MAPLE/maple/patches; then
|
||||
run_chroot
|
||||
umount $MAPLE/maple/patches
|
||||
fi
|
||||
else
|
||||
run_chroot
|
||||
fi
|
||||
umount $MAPLE/maple/sources
|
||||
fi
|
||||
else
|
||||
run_chroot
|
||||
fi
|
||||
umount $MAPLE/run
|
||||
fi
|
||||
umount $MAPLE/tmp
|
||||
fi
|
||||
umount -R $MAPLE/sys
|
||||
fi
|
||||
umount $MAPLE/proc
|
||||
fi
|
||||
umount -R $MAPLE/dev
|
||||
fi
|
||||
@ -1,30 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
# fstab Generation
|
||||
# TODO: Is the dump column still used today? ~ahill
|
||||
# NOTE: /dev is not here because CONFIG_DEVTMPFS_MOUNT is enabled in the Linux
|
||||
# kernel configuration. ~ahill
|
||||
echo "/dev/vda2 / xfs defaults 1 1" > /etc/fstab
|
||||
echo "/dev/vda1 /boot vfat defaults 0 2" >> /etc/fstab
|
||||
echo "proc /proc proc nosuid,noexec,nodev 0 0" >> /etc/fstab
|
||||
echo "sysfs /sys sysfs nosuid,noexec,nodev 0 0" >> /etc/fstab
|
||||
echo "devpts /dev/pts devpts defaults 0 0" >> /etc/fstab
|
||||
echo "tmpfs /run tmpfs defaults 0 0" >> /etc/fstab
|
||||
echo "tmpfs /dev/shm tmpfs nosuid,nodev 0 0" >> /etc/fstab
|
||||
echo "cgroup2 /sys/fs/cgroup cgroup2 nosuid,noexec,nodev 0 0" >> /etc/fstab
|
||||
|
||||
# initramfs Generation
|
||||
mkdir -p /etc/tinyramfs
|
||||
echo "root=/dev/vda2" > /etc/tinyramfs/config
|
||||
echo "root_type=xfs" >> /etc/tinyramfs/config
|
||||
# FIXME: Setting monolith to true is a workaround since tinyramfs searches for
|
||||
# /sbin/kmod, which doesn't work since kmod is installed under /bin.
|
||||
# While kmod *should* be moved under /sbin, tinyramfs also shouldn't
|
||||
# hard-code paths like that, so we need a way to patch this going
|
||||
# forward. Without a proper patch, kernel modules cannot be added to the
|
||||
# initramfs, which will cause issues with drivers later on. ~ahill
|
||||
echo "monolith=true" >> /etc/tinyramfs/config
|
||||
# TODO: This is a terrible way to detect the kernel version, since anything
|
||||
# else under /lib/modules will cause this to break, such as having
|
||||
# multiple kernel versions present. ~ahill
|
||||
tinyramfs -k $(ls /lib/modules) /boot/initramfs
|
||||
56
docs/SOFTWARE.md
Normal file
56
docs/SOFTWARE.md
Normal file
@ -0,0 +1,56 @@
|
||||
| Software | Copyright Holder | License | Alignment |
|
||||
| ----------------------------- | --------------------------------------------------- | -------------------------------------------------------------------------------------- | ------------------ |
|
||||
| Autoconf | Free Software Foundation, Inc. | GNU General Public License version 3 | Copyleft |
|
||||
| Automake | Free Software Foundation, Inc. | GNU General Public License version 3 | Copyleft |
|
||||
| GNU bc | Free Software Foundation, Inc. | GNU General Public License version 3 | Copyleft |
|
||||
| Berkeley Yacc | Public Domain | Public Domain | Free |
|
||||
| bzip2 | Julian R. Seward | Modified Zlib license | Free |
|
||||
| CMake | Kitware, Inc. and Contributors | BSD 3-Clause license | Free |
|
||||
| Coreutils | Free Software Foundation, Inc. | GNU General Public License version 3 | Copyleft |
|
||||
| curl | Daniel Stenberg and many contributors | The curl license | Free |
|
||||
| Debian Almquist Shell | Various | Modified BSD 3-Clause license(?) *and* GNU General Public License version 3 | Slightly Copyleft |
|
||||
| GNU Diffutils | Free Software Foundation, Inc. | GNU General Public License version 3 | Copyleft |
|
||||
| Expat | Various | MIT License | Free |
|
||||
| GNU Find Utilities | Free Software Foundation, Inc. | GNU General Public License version 3 | Copyleft |
|
||||
| Flex | Various | BSD 2-Clause license | Free |
|
||||
| fortune-mod | Various | BSD 4-Clause license | Free |
|
||||
| gettext | Free Software Foundation, Inc. | GNU General Public License version 3 | Copyleft |
|
||||
| git | Linus Torvalds and Contributors | GNU General Public License version 2 | Copyleft |
|
||||
| GNU Grep | Free Software Foundation, Inc. | GNU General Public License version 3 | Copyleft |
|
||||
| GNU roff | Free Software Foundation, Inc. | GNU General Public License version 3 | Copyleft |
|
||||
| GNU Gzip | Free Software Foundation, Inc. | GNU General Public License version 3 | Copyleft |
|
||||
| initramfs-tools | Various | GNU General Public License version 2 | Copyleft |
|
||||
| kmod | Various | GNU Lesser General Public License version 2.1 | Copyleft |
|
||||
| libarchive | Tim Kientzle | Mostly BSD 2-Clause license | Free |
|
||||
| libcap | Andrew G. Morgan | BSD 3-Clause license *or* GNU General Public License version 2 | Slightly Copyleft |
|
||||
| libelf | Various | GNU General Public License version 2 *and* GNU Lesser General Public License version 3 | Copyleft |
|
||||
| libffi | Anthony Green, Red Hat, Inc and others | MIT License | Free |
|
||||
| LibreSSL | Various | Various | Free |
|
||||
| libyaml | Ingy döt Net and Kirill Simonov | MIT License | Free |
|
||||
| The GNU Portable Library Tool | Free Software Foundation, Inc. | GNU General Public License version 2 | Copyleft |
|
||||
| Limine | Mintsuki and Contributors | BSD 2-Clause license | Free |
|
||||
| Linux | Linus Torvalds and Contributors | Mostly GNU General Public License version 2 with Linux Syscall Note | Copyleft |
|
||||
| Liquid template engine | Tobias Luetke | MIT License | Free |
|
||||
| LLVM | Various | Mostly Apache License version 2.0 with LLVM exceptions | Free |
|
||||
| GNU m4 | Free Software Foundation, Inc. | GNU General Public License version 3 | Copyleft |
|
||||
| GNU Make | Free Software Foundation, Inc. | GNU General Public License version 3 | Copyleft |
|
||||
| Maple Linux Bootstrap Scripts | Alexander Hill, Nicholas McDaniel, and Contributors | ISC License | Free |
|
||||
| Mawk | Various | GNU General Public License version 2 | Copyleft |
|
||||
| muon | Stone Tickle and Contributors | GNU General Public License version 3 | Copyleft |
|
||||
| musl | Rich Felker and Contributors | Mostly MIT License | Slightly Copyright |
|
||||
| GNU nano | Free Software Foundation, Inc. | GNU General Public License version 3 | Copyleft |
|
||||
| The Netwide Assembler | "The NASM Authors" | BSD 2-Clause license | Free |
|
||||
| New Curses | Thomas E. Dickey and Free Software Foundation, Inc. | Modified MIT License | Free |
|
||||
| OpenRC | Roy Marples and the OpenRC authors | BSD 2-Clause license | Free |
|
||||
| GNU patch | Free Software Foundation, Inc. | GNU General Public License version 3 | Copyleft |
|
||||
| Perl | Larry Wall and others | GNU General Public License version 1 | Copyleft |
|
||||
| pkgconf | Various | ISC License | Free |
|
||||
| Python | Python Software Foundation, BeOpen, and CWI | Python Software Foundation License Version 2 | Copyleft |
|
||||
| Ruby | Various | Various | Mixed |
|
||||
| GNU sed | Free Software Foundation, Inc. | GNU General Public License version 3 | Copyleft |
|
||||
| GNU tar | Free Software Foundation, Inc. | GNU General Public License version 3 | Copyleft |
|
||||
| xz | Various | Mostly BSD 0-Clause license | Slightly Copyleft |
|
||||
| Zlib | Jean-loup Gailly and Mark Adler | Zlib License | Free |
|
||||
| Zsh | The Zsh development group | Mostly MIT License (Modern Variant) | Slightly Copyleft |
|
||||
|
||||
If any of the information listed above is inaccurate, please send me an e-mail or submit a patch and it will be corrected. ~ahill
|
||||
74
docs/STATUS.md
Normal file
74
docs/STATUS.md
Normal file
@ -0,0 +1,74 @@
|
||||
This document tracks which packages can be built and packaged within the chroot.
|
||||
|
||||
Definitions:
|
||||
- Can Build - The software can be both compiled via treetap on Maple Linux and run on Maple Linux
|
||||
- Can Package - The software can be packaged by treetap under Maple Linux, while using none of the deprecated paths (/usr/bin, /usr/lib, /usr/libexec, /sbin, etc.) and without conflicting with another package
|
||||
|
||||
| Package | Can Build? | Can Package? |
|
||||
| ----------------- | ---------- | ------------ |
|
||||
| `autoconf` | Yes | Yes |
|
||||
| `automake` | Yes | Yes |
|
||||
| `bc` | Yes | Yes |
|
||||
| `byacc` | Yes | Yes |
|
||||
| `bzip2` | Yes | Yes |
|
||||
| `chrony` |
|
||||
| `cmake` | Yes | Yes |
|
||||
| `coreutils` | Yes | Yes |
|
||||
| `curl` | Yes | Yes |
|
||||
| `dash` | Yes | Yes |
|
||||
| `dhcpcd` |
|
||||
| `diffutils` | Yes | Yes |
|
||||
| `dosfstools` |
|
||||
| `efibootmgr` |
|
||||
| `expat` | Yes | Yes |
|
||||
| `findutils` | Yes | Yes |
|
||||
| `flatpak` |
|
||||
| `flex` | Yes | Yes |
|
||||
| `fortune-mod` | Yes | Yes |
|
||||
| `gettext` | Yes | Yes |
|
||||
| `git` | Yes | Yes |
|
||||
| `grep` | Yes | Yes |
|
||||
| `groff` | Yes | Yes |
|
||||
| `gzip` | Yes | Yes |
|
||||
| `initramfs-tools` | Yes | Yes |
|
||||
| `iproute2` |
|
||||
| `kbd` |
|
||||
| `kmod` | Yes | Yes |
|
||||
| `less` |
|
||||
| `libarchive` | Yes | Yes |
|
||||
| `libcap2` | Yes | Yes |
|
||||
| `libelf` | Yes | Yes |
|
||||
| `libffi` | Yes | Yes |
|
||||
| `libmnl` |
|
||||
| `libnftnl` |
|
||||
| `libressl` | Yes | Yes |
|
||||
| `libtool` | Yes | Yes |
|
||||
| `libyaml` | Yes | Yes |
|
||||
| `limine` | Yes | Yes |
|
||||
| `linux` | Yes | Yes |
|
||||
| `liquid` | Yes | Yes |
|
||||
| `llvm` | Yes | Yes |
|
||||
| `m4` | Yes | Yes |
|
||||
| `make` | Yes | Yes |
|
||||
| `mawk` | Yes | Yes |
|
||||
| `muon` | Yes | Yes |
|
||||
| `musl` | Yes | Yes |
|
||||
| `nano` | Yes | Yes |
|
||||
| `nasm` | Yes | Yes |
|
||||
| `ncurses` | Yes | Yes |
|
||||
| `nftables` |
|
||||
| `nilfs-utils` |
|
||||
| `openrc` | Yes | Yes |
|
||||
| `patch` | Yes | Yes |
|
||||
| `perl` | Yes | Yes |
|
||||
| `pkgconf` | Yes | Yes |
|
||||
| `pipewire` |
|
||||
| `python` | Yes | Yes |
|
||||
| `ruby` | Yes | Yes |
|
||||
| `sed` | Yes | Yes |
|
||||
| `shadow` |
|
||||
| `tar` | Yes | Yes |
|
||||
| `xlibre-xserver` |
|
||||
| `xz` | Yes | Yes |
|
||||
| `zlib` | Yes | Yes |
|
||||
| `zsh` | Yes | Yes |
|
||||
9
docs/licensebar.svg
Normal file
9
docs/licensebar.svg
Normal file
@ -0,0 +1,9 @@
|
||||
<svg height="16" version="1.1" width="1024" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect fill="black" height="100%" width="100%" />
|
||||
<rect fill="blue" height="10" width="509" x="3" y="3" />
|
||||
<rect fill="cornflowerblue" height="10" width="78" x="512" y="3" />
|
||||
<rect fill="white" height="10" width="392" x="590" y="3" />
|
||||
<rect fill="mediumpurple" height="10" width="20" x="982" y="3" />
|
||||
<rect fill="indianred" height="10" width="20" x="1002" y="3" />
|
||||
<rect fill="crimson" height="10" width="0" x="1022" y="3" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 512 B |
@ -1,18 +0,0 @@
|
||||
#!/bin/sh -e
|
||||
mkdir -p sources
|
||||
cd sources
|
||||
cat ../sources.list | while read line; do
|
||||
HASH=$(echo $line | cut -d"," -f1)
|
||||
URL=$(echo $line | cut -d"," -f2)
|
||||
CANONICAL=$(echo $line | cut -d"," -f3)
|
||||
if [ -z "$CANONICAL" ]; then
|
||||
OUTPUT=$(basename $URL)
|
||||
else
|
||||
OUTPUT=$CANONICAL
|
||||
fi
|
||||
if [ ! -f "$OUTPUT" ]; then
|
||||
echo $OUTPUT
|
||||
curl -L $URL -o $OUTPUT
|
||||
fi
|
||||
echo "$HASH $OUTPUT" | sha256sum -c -
|
||||
done
|
||||
@ -1,7 +0,0 @@
|
||||
timeout: 3
|
||||
|
||||
/Maple Linux
|
||||
protocol: linux
|
||||
kernel_path: boot():/vmlinuz
|
||||
kernel_cmdline: root=/dev/vda2
|
||||
module_path: boot():/initramfs
|
||||
5411
linux.x86_64.config
5411
linux.x86_64.config
File diff suppressed because it is too large
Load Diff
@ -1,225 +0,0 @@
|
||||
--- src/drm-shim/drm_shim.c 2025-07-14 02:47:27.834000000 +0000
|
||||
+++ src/drm-shim/drm_shim.c 2025-07-14 02:58:33.373000000 +0000
|
||||
@@ -324,8 +324,6 @@
|
||||
|
||||
return real_fopen(path, mode);
|
||||
}
|
||||
-PUBLIC FILE *fopen64(const char *path, const char *mode)
|
||||
- __attribute__((alias("fopen")));
|
||||
|
||||
/* Intercepts access(render_node_path) to trick drmGetMinorType */
|
||||
PUBLIC int access(const char *path, int mode)
|
||||
@@ -371,7 +369,6 @@
|
||||
|
||||
return fd;
|
||||
}
|
||||
-PUBLIC int open64(const char*, int, ...) __attribute__((alias("open")));
|
||||
|
||||
/* __open64_2 isn't declared unless _FORTIFY_SOURCE is defined. */
|
||||
PUBLIC int __open64_2(const char *path, int flags);
|
||||
@@ -429,45 +426,6 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
-/* Fakes stat to return character device stuff for our fake render node. */
|
||||
-PUBLIC int __xstat64(int ver, const char *path, struct stat64 *st)
|
||||
-{
|
||||
- init_shim();
|
||||
-
|
||||
- /* Note: call real stat if we're in the process of probing for a free
|
||||
- * render node!
|
||||
- */
|
||||
- if (render_node_minor == -1)
|
||||
- return real___xstat64(ver, path, st);
|
||||
-
|
||||
- if (hide_drm_device_path(path)) {
|
||||
- errno = ENOENT;
|
||||
- return -1;
|
||||
- }
|
||||
-
|
||||
- /* Fool libdrm's probe of whether the /sys dir for this char dev is
|
||||
- * there.
|
||||
- */
|
||||
- char *sys_dev_drm_dir;
|
||||
- nfasprintf(&sys_dev_drm_dir,
|
||||
- "/sys/dev/char/%d:%d/device/drm",
|
||||
- DRM_MAJOR, render_node_minor);
|
||||
- if (strcmp(path, sys_dev_drm_dir) == 0) {
|
||||
- free(sys_dev_drm_dir);
|
||||
- return 0;
|
||||
- }
|
||||
- free(sys_dev_drm_dir);
|
||||
-
|
||||
- if (strcmp(path, render_node_path) != 0)
|
||||
- return real___xstat64(ver, path, st);
|
||||
-
|
||||
- memset(st, 0, sizeof(*st));
|
||||
- st->st_rdev = makedev(DRM_MAJOR, render_node_minor);
|
||||
- st->st_mode = S_IFCHR;
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
/* Fakes fstat to return character device stuff for our fake render node. */
|
||||
PUBLIC int __fxstat(int ver, int fd, struct stat *st)
|
||||
{
|
||||
@@ -485,22 +443,6 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
-PUBLIC int __fxstat64(int ver, int fd, struct stat64 *st)
|
||||
-{
|
||||
- init_shim();
|
||||
-
|
||||
- struct shim_fd *shim_fd = drm_shim_fd_lookup(fd);
|
||||
-
|
||||
- if (!shim_fd)
|
||||
- return real___fxstat64(ver, fd, st);
|
||||
-
|
||||
- memset(st, 0, sizeof(*st));
|
||||
- st->st_rdev = makedev(DRM_MAJOR, render_node_minor);
|
||||
- st->st_mode = S_IFCHR;
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
#else
|
||||
|
||||
PUBLIC int stat(const char* path, struct stat* stat_buf)
|
||||
@@ -541,44 +483,6 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
-PUBLIC int stat64(const char* path, struct stat64* stat_buf)
|
||||
-{
|
||||
- init_shim();
|
||||
-
|
||||
- /* Note: call real stat if we're in the process of probing for a free
|
||||
- * render node!
|
||||
- */
|
||||
- if (render_node_minor == -1)
|
||||
- return real_stat64(path, stat_buf);
|
||||
-
|
||||
- if (hide_drm_device_path(path)) {
|
||||
- errno = ENOENT;
|
||||
- return -1;
|
||||
- }
|
||||
-
|
||||
- /* Fool libdrm's probe of whether the /sys dir for this char dev is
|
||||
- * there.
|
||||
- */
|
||||
- char *sys_dev_drm_dir;
|
||||
- nfasprintf(&sys_dev_drm_dir,
|
||||
- "/sys/dev/char/%d:%d/device/drm",
|
||||
- DRM_MAJOR, render_node_minor);
|
||||
- if (strcmp(path, sys_dev_drm_dir) == 0) {
|
||||
- free(sys_dev_drm_dir);
|
||||
- return 0;
|
||||
- }
|
||||
- free(sys_dev_drm_dir);
|
||||
-
|
||||
- if (strcmp(path, render_node_path) != 0)
|
||||
- return real_stat64(path, stat_buf);
|
||||
-
|
||||
- memset(stat_buf, 0, sizeof(*stat_buf));
|
||||
- stat_buf->st_rdev = makedev(DRM_MAJOR, render_node_minor);
|
||||
- stat_buf->st_mode = S_IFCHR;
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
PUBLIC int fstat(int fd, struct stat* stat_buf)
|
||||
{
|
||||
init_shim();
|
||||
@@ -594,22 +498,6 @@
|
||||
|
||||
return 0;
|
||||
}
|
||||
-
|
||||
-PUBLIC int fstat64(int fd, struct stat64* stat_buf)
|
||||
-{
|
||||
- init_shim();
|
||||
-
|
||||
- struct shim_fd *shim_fd = drm_shim_fd_lookup(fd);
|
||||
-
|
||||
- if (!shim_fd)
|
||||
- return real_fstat64(fd, stat_buf);
|
||||
-
|
||||
- memset(stat_buf, 0, sizeof(*stat_buf));
|
||||
- stat_buf->st_rdev = makedev(DRM_MAJOR, render_node_minor);
|
||||
- stat_buf->st_mode = S_IFCHR;
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
#endif
|
||||
|
||||
/* Tracks if the opendir was on /dev/dri. */
|
||||
@@ -664,34 +552,6 @@
|
||||
return ent;
|
||||
}
|
||||
|
||||
-/* If we're looking at /dev/dri, add our render node to the list
|
||||
- * before the real entries in the directory.
|
||||
- */
|
||||
-PUBLIC struct dirent64 *
|
||||
-readdir64(DIR *dir)
|
||||
-{
|
||||
- init_shim();
|
||||
-
|
||||
- struct dirent64 *ent = NULL;
|
||||
-
|
||||
- static struct dirent64 render_node_dirent = { 0 };
|
||||
-
|
||||
- simple_mtx_lock(&shim_lock);
|
||||
- if (_mesa_set_search(opendir_set, dir)) {
|
||||
- strcpy(render_node_dirent.d_name,
|
||||
- render_node_dirent_name);
|
||||
- render_node_dirent.d_type = DT_CHR;
|
||||
- ent = &render_node_dirent;
|
||||
- _mesa_set_remove_key(opendir_set, dir);
|
||||
- }
|
||||
- simple_mtx_unlock(&shim_lock);
|
||||
-
|
||||
- if (!ent && dir != fake_dev_dri)
|
||||
- ent = real_readdir64(dir);
|
||||
-
|
||||
- return ent;
|
||||
-}
|
||||
-
|
||||
/* Cleans up tracking of opendir("/dev/dri") */
|
||||
PUBLIC int
|
||||
closedir(DIR *dir)
|
||||
@@ -774,7 +634,7 @@
|
||||
* our DRM fd to drm_shim_ioctl().
|
||||
*/
|
||||
PUBLIC int
|
||||
-ioctl(int fd, unsigned long request, ...)
|
||||
+ioctl(int fd, int request, ...)
|
||||
{
|
||||
init_shim();
|
||||
|
||||
@@ -810,8 +670,6 @@
|
||||
|
||||
return ret;
|
||||
}
|
||||
-PUBLIC int fcntl64(int, int, ...)
|
||||
- __attribute__((alias("fcntl")));
|
||||
|
||||
/* I wrote this when trying to fix gallium screen creation, leaving it around
|
||||
* since it's probably good to have.
|
||||
@@ -841,15 +699,3 @@
|
||||
|
||||
return real_mmap(addr, length, prot, flags, fd, offset);
|
||||
}
|
||||
-
|
||||
-PUBLIC void *
|
||||
-mmap64(void* addr, size_t length, int prot, int flags, int fd, off64_t offset)
|
||||
-{
|
||||
- init_shim();
|
||||
-
|
||||
- struct shim_fd *shim_fd = drm_shim_fd_lookup(fd);
|
||||
- if (shim_fd)
|
||||
- return drm_shim_mmap(shim_fd, length, prot, flags, fd, offset);
|
||||
-
|
||||
- return real_mmap64(addr, length, prot, flags, fd, offset);
|
||||
-}
|
||||
@ -1,385 +0,0 @@
|
||||
diff -ruN mrustc-0.11.2.orig/src/ast/ast.cpp mrustc-0.11.2/src/ast/ast.cpp
|
||||
--- mrustc-0.11.2.orig/src/ast/ast.cpp 2025-05-05 19:48:49.015447489 -0400
|
||||
+++ mrustc-0.11.2/src/ast/ast.cpp 2025-05-06 21:59:55.063318921 -0400
|
||||
@@ -243,9 +243,9 @@
|
||||
|
||||
Function::Function(Span sp, ::std::string abi, Flags flags, GenericParams params, TypeRef ret_type, Arglist args, bool is_variadic):
|
||||
m_span(sp),
|
||||
- m_params( move(params) ),
|
||||
- m_rettype( move(ret_type) ),
|
||||
- m_args( move(args) ),
|
||||
+ m_params( std::move(params) ),
|
||||
+ m_rettype( std::move(ret_type) ),
|
||||
+ m_args( std::move(args) ),
|
||||
m_is_variadic(is_variadic),
|
||||
m_abi( mv$(abi) ),
|
||||
m_flags(flags)
|
||||
diff -ruN mrustc-0.11.2.orig/src/ast/ast.hpp mrustc-0.11.2/src/ast/ast.hpp
|
||||
--- mrustc-0.11.2.orig/src/ast/ast.hpp 2025-05-05 19:48:49.015447489 -0400
|
||||
+++ mrustc-0.11.2/src/ast/ast.hpp 2025-05-06 22:00:48.786212819 -0400
|
||||
@@ -101,8 +101,8 @@
|
||||
|
||||
//TypeAlias() {}
|
||||
TypeAlias(GenericParams params, TypeRef type):
|
||||
- m_params( move(params) ),
|
||||
- m_type( move(type) )
|
||||
+ m_params( std::move(params) ),
|
||||
+ m_type( std::move(type) )
|
||||
{}
|
||||
static TypeAlias new_associated_type(GenericParams params, GenericParams type_bounds, TypeRef default_type) {
|
||||
TypeAlias rv { std::move(params), std::move(default_type) };
|
||||
@@ -164,8 +164,8 @@
|
||||
|
||||
Static(Class s_class, TypeRef type, Expr value):
|
||||
m_class(s_class),
|
||||
- m_type( move(type) ),
|
||||
- m_value( move(value) )
|
||||
+ m_type( std::move(type) ),
|
||||
+ m_value( std::move(value) )
|
||||
{}
|
||||
|
||||
const Class& s_class() const { return m_class; }
|
||||
@@ -421,8 +421,8 @@
|
||||
|
||||
Enum() {}
|
||||
Enum( GenericParams params, ::std::vector<EnumVariant> variants ):
|
||||
- m_params( move(params) ),
|
||||
- m_variants( move(variants) )
|
||||
+ m_params( std::move(params) ),
|
||||
+ m_variants( std::move(variants) )
|
||||
{}
|
||||
|
||||
const GenericParams& params() const { return m_params; }
|
||||
@@ -483,11 +483,11 @@
|
||||
{
|
||||
}
|
||||
Struct( GenericParams params, ::std::vector<StructItem> fields ):
|
||||
- m_params( move(params) ),
|
||||
+ m_params( std::move(params) ),
|
||||
m_data( StructData::make_Struct({mv$(fields)}) )
|
||||
{}
|
||||
Struct( GenericParams params, ::std::vector<TupleItem> fields ):
|
||||
- m_params( move(params) ),
|
||||
+ m_params( std::move(params) ),
|
||||
m_data( StructData::make_Tuple({mv$(fields)}) )
|
||||
{}
|
||||
|
||||
@@ -511,7 +511,7 @@
|
||||
} m_markings;
|
||||
|
||||
Union( GenericParams params, ::std::vector<StructItem> fields ):
|
||||
- m_params( move(params) ),
|
||||
+ m_params( std::move(params) ),
|
||||
m_variants( mv$(fields) )
|
||||
{}
|
||||
|
||||
diff -ruN mrustc-0.11.2.orig/src/ast/expr.hpp mrustc-0.11.2/src/ast/expr.hpp
|
||||
--- mrustc-0.11.2.orig/src/ast/expr.hpp 2025-05-05 19:48:49.015447489 -0400
|
||||
+++ mrustc-0.11.2/src/ast/expr.hpp 2025-05-06 22:01:28.556431607 -0400
|
||||
@@ -76,8 +76,8 @@
|
||||
m_block_type(type),
|
||||
m_yields_final_value(yields_final_value),
|
||||
m_label(""),
|
||||
- m_local_mod( move(local_mod) ),
|
||||
- m_nodes( move(nodes) )
|
||||
+ m_local_mod( std::move(local_mod) ),
|
||||
+ m_nodes( std::move(nodes) )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -106,9 +106,9 @@
|
||||
bool m_is_braced;
|
||||
|
||||
ExprNode_Macro(AST::Path name, RcString ident, ::TokenTree&& tokens, bool is_braced=false):
|
||||
- m_path( move(name) ),
|
||||
+ m_path( std::move(name) ),
|
||||
m_ident(ident),
|
||||
- m_tokens( move(tokens) )
|
||||
+ m_tokens( std::move(tokens) )
|
||||
, m_is_braced(is_braced)
|
||||
{}
|
||||
|
||||
@@ -132,11 +132,11 @@
|
||||
::std::vector<::std::string> m_flags;
|
||||
|
||||
ExprNode_Asm(::std::string text, ::std::vector<ValRef> output, ::std::vector<ValRef> input, ::std::vector<::std::string> clobbers, ::std::vector<::std::string> flags):
|
||||
- m_text( move(text) ),
|
||||
- m_output( move(output) ),
|
||||
- m_input( move(input) ),
|
||||
- m_clobbers( move(clobbers) ),
|
||||
- m_flags( move(flags) )
|
||||
+ m_text( std::move(text) ),
|
||||
+ m_output( std::move(output) ),
|
||||
+ m_input( std::move(input) ),
|
||||
+ m_clobbers( std::move(clobbers) ),
|
||||
+ m_flags( std::move(flags) )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -169,8 +169,8 @@
|
||||
|
||||
ExprNode_Asm2(AsmCommon::Options options, std::vector<AsmCommon::Line> lines, std::vector<Param> params)
|
||||
: m_options(options)
|
||||
- , m_lines( move(lines) )
|
||||
- , m_params( move(params) )
|
||||
+ , m_lines( std::move(lines) )
|
||||
+ , m_params( std::move(params) )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -194,8 +194,8 @@
|
||||
|
||||
ExprNode_Flow(Type type, Ident target, ExprNodeP value):
|
||||
m_type(type),
|
||||
- m_target( move(target) ),
|
||||
- m_value( move(value) )
|
||||
+ m_target( std::move(target) ),
|
||||
+ m_value( std::move(value) )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -212,10 +212,10 @@
|
||||
::std::pair<unsigned,unsigned> m_letelse_slots;
|
||||
|
||||
ExprNode_LetBinding(Pattern pat, TypeRef type, ExprNodeP value, ExprNodeP else_arm={})
|
||||
- : m_pat( move(pat) )
|
||||
- , m_type( move(type) )
|
||||
- , m_value( move(value) )
|
||||
- , m_else( move(else_arm) )
|
||||
+ : m_pat( std::move(pat) )
|
||||
+ , m_type( std::move(type) )
|
||||
+ , m_value( std::move(value) )
|
||||
+ , m_else( std::move(else_arm) )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -237,8 +237,8 @@
|
||||
ExprNode_Assign(): m_op(NONE) {}
|
||||
ExprNode_Assign(Operation op, ExprNodeP slot, ExprNodeP value):
|
||||
m_op(op),
|
||||
- m_slot( move(slot) ),
|
||||
- m_value( move(value) )
|
||||
+ m_slot( std::move(slot) ),
|
||||
+ m_value( std::move(value) )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -251,8 +251,8 @@
|
||||
::std::vector<ExprNodeP> m_args;
|
||||
|
||||
ExprNode_CallPath(Path&& path, ::std::vector<ExprNodeP>&& args):
|
||||
- m_path( move(path) ),
|
||||
- m_args( move(args) )
|
||||
+ m_path( std::move(path) ),
|
||||
+ m_args( std::move(args) )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -266,9 +266,9 @@
|
||||
::std::vector<ExprNodeP> m_args;
|
||||
|
||||
ExprNode_CallMethod(ExprNodeP obj, PathNode method, ::std::vector<ExprNodeP> args):
|
||||
- m_val( move(obj) ),
|
||||
- m_method( move(method) ),
|
||||
- m_args( move(args) )
|
||||
+ m_val( std::move(obj) ),
|
||||
+ m_method( std::move(method) ),
|
||||
+ m_args( std::move(args) )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -282,8 +282,8 @@
|
||||
::std::vector<ExprNodeP> m_args;
|
||||
|
||||
ExprNode_CallObject(ExprNodeP val, ::std::vector< ExprNodeP >&& args):
|
||||
- m_val( move(val) ),
|
||||
- m_args( move(args) )
|
||||
+ m_val( std::move(val) ),
|
||||
+ m_args( std::move(args) )
|
||||
{
|
||||
}
|
||||
NODE_METHODS();
|
||||
@@ -531,9 +531,9 @@
|
||||
t_values m_values;
|
||||
|
||||
ExprNode_StructLiteral(Path path, ExprNodeP base_value, t_values&& values ):
|
||||
- m_path( move(path) ),
|
||||
- m_base_value( move(base_value) ),
|
||||
- m_values( move(values) )
|
||||
+ m_path( std::move(path) ),
|
||||
+ m_base_value( std::move(base_value) ),
|
||||
+ m_values( std::move(values) )
|
||||
{}
|
||||
|
||||
NODE_METHODS();
|
||||
@@ -548,8 +548,8 @@
|
||||
t_values m_values;
|
||||
|
||||
ExprNode_StructLiteralPattern(Path path, t_values&& values)
|
||||
- : m_path( move(path) )
|
||||
- , m_values( move(values) )
|
||||
+ : m_path( std::move(path) )
|
||||
+ , m_values( std::move(values) )
|
||||
{}
|
||||
|
||||
NODE_METHODS();
|
||||
@@ -646,8 +646,8 @@
|
||||
TypeRef m_type;
|
||||
|
||||
ExprNode_Cast(ExprNodeP value, TypeRef&& dst_type):
|
||||
- m_value( move(value) ),
|
||||
- m_type( move(dst_type) )
|
||||
+ m_value( std::move(value) ),
|
||||
+ m_type( std::move(dst_type) )
|
||||
{
|
||||
}
|
||||
NODE_METHODS();
|
||||
@@ -661,8 +661,8 @@
|
||||
TypeRef m_type;
|
||||
|
||||
ExprNode_TypeAnnotation(ExprNodeP value, TypeRef&& dst_type):
|
||||
- m_value( move(value) ),
|
||||
- m_type( move(dst_type) )
|
||||
+ m_value( std::move(value) ),
|
||||
+ m_type( std::move(dst_type) )
|
||||
{
|
||||
}
|
||||
NODE_METHODS();
|
||||
diff -ruN mrustc-0.11.2.orig/src/ast/lifetime_ref.hpp mrustc-0.11.2/src/ast/lifetime_ref.hpp
|
||||
--- mrustc-0.11.2.orig/src/ast/lifetime_ref.hpp 2025-05-05 20:46:46.568398964 -0400
|
||||
+++ mrustc-0.11.2/src/ast/lifetime_ref.hpp 2025-05-05 19:59:44.934652489 -0400
|
||||
@@ -6,6 +6,7 @@
|
||||
* - AST Lifetime reference
|
||||
*/
|
||||
#pragma once
|
||||
+#include <cstdint>
|
||||
#include "../common.hpp"
|
||||
#include "ident.hpp"
|
||||
|
||||
diff -ruN mrustc-0.11.2.orig/src/debug.cpp mrustc-0.11.2/src/debug.cpp
|
||||
--- mrustc-0.11.2.orig/src/debug.cpp 2025-05-05 20:46:46.568562659 -0400
|
||||
+++ mrustc-0.11.2/src/debug.cpp 2025-05-05 19:57:59.149549205 -0400
|
||||
@@ -5,6 +5,7 @@
|
||||
* debug.cpp
|
||||
* - Debug printing (with indenting)
|
||||
*/
|
||||
+#include <cstdint>
|
||||
#include <debug_inner.hpp>
|
||||
#include <debug.hpp>
|
||||
#include <set>
|
||||
diff -ruN mrustc-0.11.2.orig/src/hir/expr.hpp mrustc-0.11.2/src/hir/expr.hpp
|
||||
--- mrustc-0.11.2.orig/src/hir/expr.hpp 2025-05-05 19:48:49.017523096 -0400
|
||||
+++ mrustc-0.11.2/src/hir/expr.hpp 2025-05-06 22:02:51.568333466 -0400
|
||||
@@ -156,8 +156,8 @@
|
||||
ExprNode_Asm2(Span sp, AsmCommon::Options options, std::vector<AsmCommon::Line> lines, std::vector<Param> params)
|
||||
: ExprNode(mv$(sp))
|
||||
, m_options(options)
|
||||
- , m_lines( move(lines) )
|
||||
- , m_params( move(params) )
|
||||
+ , m_lines( std::move(lines) )
|
||||
+ , m_params( std::move(params) )
|
||||
{
|
||||
}
|
||||
|
||||
diff -ruN mrustc-0.11.2.orig/src/hir/generic_ref.hpp mrustc-0.11.2/src/hir/generic_ref.hpp
|
||||
--- mrustc-0.11.2.orig/src/hir/generic_ref.hpp 2025-05-05 20:46:46.568679102 -0400
|
||||
+++ mrustc-0.11.2/src/hir/generic_ref.hpp 2025-05-05 19:59:36.463727568 -0400
|
||||
@@ -6,6 +6,7 @@
|
||||
* - Reference to a generic
|
||||
*/
|
||||
#pragma once
|
||||
+#include <cstdint>
|
||||
#include <rc_string.hpp>
|
||||
|
||||
/// Binding index for a Generic that indicates "Self"
|
||||
diff -ruN mrustc-0.11.2.orig/src/hir/type_ref.hpp mrustc-0.11.2/src/hir/type_ref.hpp
|
||||
--- mrustc-0.11.2.orig/src/hir/type_ref.hpp 2025-05-05 20:46:46.568770980 -0400
|
||||
+++ mrustc-0.11.2/src/hir/type_ref.hpp 2025-05-05 19:59:57.743537961 -0400
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
+#include <cstdint>
|
||||
#include <rc_string.hpp>
|
||||
#include <span.hpp>
|
||||
|
||||
diff -ruN mrustc-0.11.2.orig/src/macro_rules/macro_rules.hpp mrustc-0.11.2/src/macro_rules/macro_rules.hpp
|
||||
--- mrustc-0.11.2.orig/src/macro_rules/macro_rules.hpp 2025-05-05 19:48:49.012008507 -0400
|
||||
+++ mrustc-0.11.2/src/macro_rules/macro_rules.hpp 2025-05-06 22:02:05.491732403 -0400
|
||||
@@ -102,7 +102,7 @@
|
||||
name( op ),
|
||||
name_index(index),
|
||||
tok( mv$(sep) ),
|
||||
- subpats( move(ents) ),
|
||||
+ subpats( std::move(ents) ),
|
||||
type(PAT_LOOP)
|
||||
{
|
||||
}
|
||||
diff -ruN mrustc-0.11.2.orig/src/trans/codegen_c.cpp mrustc-0.11.2/src/trans/codegen_c.cpp
|
||||
--- mrustc-0.11.2.orig/src/trans/codegen_c.cpp 2025-05-05 19:48:49.014366958 -0400
|
||||
+++ mrustc-0.11.2/src/trans/codegen_c.cpp 2025-05-06 22:09:34.173707709 -0400
|
||||
@@ -1287,10 +1287,11 @@
|
||||
break;
|
||||
}
|
||||
// HACK: Work around [https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117423] by disabling an optimisation stage
|
||||
- if( opt.opt_level > 0 )
|
||||
+ // Disabled for Maple Linux. See build-chroot.sh for details. ~ahill
|
||||
+ /* if( opt.opt_level > 0 )
|
||||
{
|
||||
args.push_back("-fno-tree-sra");
|
||||
- }
|
||||
+ } */
|
||||
if( opt.emit_debug_info )
|
||||
{
|
||||
args.push_back("-g");
|
||||
@@ -4785,7 +4786,8 @@
|
||||
switch (v.first[0])
|
||||
{
|
||||
case '=': m_of << "="; break;
|
||||
- case '+': m_of << "+"; break;
|
||||
+ // Patched for Maple Linux. See build-chroot.sh for details. ~ahill
|
||||
+ case '+': m_of << "="; break;
|
||||
default: MIR_TODO(mir_res, "Handle asm! output leader '" << v.first[0] << "'");
|
||||
}
|
||||
m_of << H::convert_reg(v.first.c_str() + 1);
|
||||
@@ -5428,12 +5430,14 @@
|
||||
if(i != 0) m_of << ",";
|
||||
m_of << " ";
|
||||
m_of << "\"";
|
||||
- if( !p.output && !p.input ) {
|
||||
+ // Patched for Maple Linux. See build-chroot.sh for details. ~ahill
|
||||
+ m_of << "=";
|
||||
+ /*if( !p.output && !p.input ) {
|
||||
m_of << "+";
|
||||
}
|
||||
else {
|
||||
m_of << (p.input ? "+" : "=");
|
||||
- }
|
||||
+ }*/
|
||||
TU_MATCH_HDRA((p.spec), {)
|
||||
TU_ARMA(Class, c)
|
||||
// https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html
|
||||
diff -ruN mrustc-0.11.2.orig/src/trans/target.cpp mrustc-0.11.2/src/trans/target.cpp
|
||||
--- mrustc-0.11.2.orig/src/trans/target.cpp 2025-05-05 19:48:49.014366958 -0400
|
||||
+++ mrustc-0.11.2/src/trans/target.cpp 2025-05-06 22:07:39.775297252 -0400
|
||||
@@ -405,7 +405,8 @@
|
||||
TargetSpec init_from_spec_name(const ::std::string& target_name)
|
||||
{
|
||||
// Options for all the fully-GNU environments
|
||||
- #define BACKEND_C_OPTS_GNU {"-ffunction-sections", "-pthread"}, {"-Wl,--start-group"}, {"-Wl,--end-group", "-Wl,--gc-sections", "-l", "atomic"}
|
||||
+ // Patched for Maple Linux. See build-chroot.sh for details. ~ahill
|
||||
+ #define BACKEND_C_OPTS_GNU {"-ffunction-sections", "-pthread"}, {"-Wl,--start-group"}, {"-Wl,--end-group", "-Wl,--gc-sections"}
|
||||
// If there's a '/' or a '\' in the filename, open it as a path, otherwise assume it's a triple.
|
||||
if( target_name.find('/') != ::std::string::npos || target_name.find('\\') != ::std::string::npos )
|
||||
{
|
||||
diff -ruN mrustc-0.11.2.orig/src/trans/codegen_c.cpp mrustc-0.11.2/src/trans/codegen_c.cpp
|
||||
--- mrustc-0.11.2.orig/src/trans/codegen_c.cpp 2024-12-29 22:28:18.000000000 -0500
|
||||
+++ mrustc-0.11.2/src/trans/codegen_c.cpp 2025-05-07 12:57:51.573401275 -0400
|
||||
@@ -1295,6 +1295,7 @@
|
||||
{
|
||||
args.push_back("-g");
|
||||
}
|
||||
+ args.push_back("-fno-delete-null-pointer-checks");
|
||||
// TODO: Why?
|
||||
args.push_back("-fPIC");
|
||||
args.push_back("-o");
|
||||
@ -1,399 +0,0 @@
|
||||
--- rustc-1.74.0-src.orig/compiler/rustc_codegen_llvm/src/consts.rs 2023-11-12 23:10:51.000000000 -0500
|
||||
+++ rustc-1.74.0-src/compiler/rustc_codegen_llvm/src/consts.rs 2025-05-07 11:37:17.220114783 -0400
|
||||
@@ -371,8 +371,9 @@
|
||||
// otherwise some LLVM optimization passes don't work as expected
|
||||
let mut val_llty = self.val_ty(v);
|
||||
let v = if val_llty == self.type_i1() {
|
||||
- val_llty = self.type_i8();
|
||||
- llvm::LLVMConstZExt(v, val_llty)
|
||||
+ // val_llty = self.type_i8();
|
||||
+ // llvm::LLVMConstZExt(v, val_llty)
|
||||
+ unimplemented!("Const ZExt");
|
||||
} else {
|
||||
v
|
||||
};
|
||||
--- rustc-1.74.0-src.orig/compiler/rustc_codegen_llvm/src/llvm/ffi.rs 2023-11-12 23:10:51.000000000 -0500
|
||||
+++ rustc-1.74.0-src/compiler/rustc_codegen_llvm/src/llvm/ffi.rs 2025-05-07 11:39:59.399988363 -0400
|
||||
@@ -969,7 +969,7 @@
|
||||
ConstantIndices: *const &'a Value,
|
||||
NumIndices: c_uint,
|
||||
) -> &'a Value;
|
||||
- pub fn LLVMConstZExt<'a>(ConstantVal: &'a Value, ToType: &'a Type) -> &'a Value;
|
||||
+ // pub fn LLVMConstZExt<'a>(ConstantVal: &'a Value, ToType: &'a Type) -> &'a Value;
|
||||
pub fn LLVMConstPtrToInt<'a>(ConstantVal: &'a Value, ToType: &'a Type) -> &'a Value;
|
||||
pub fn LLVMConstIntToPtr<'a>(ConstantVal: &'a Value, ToType: &'a Type) -> &'a Value;
|
||||
pub fn LLVMConstBitCast<'a>(ConstantVal: &'a Value, ToType: &'a Type) -> &'a Value;
|
||||
--- rustc-1.74.0-src.orig/compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h 2023-11-12 23:10:51.000000000 -0500
|
||||
+++ rustc-1.74.0-src/compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h 2025-05-06 22:48:58.362609469 -0400
|
||||
@@ -23,9 +23,9 @@
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Target/TargetOptions.h"
|
||||
#include "llvm/Transforms/IPO.h"
|
||||
-#include "llvm/Transforms/Instrumentation.h"
|
||||
+#include "llvm/Transforms/Utils/Instrumentation.h"
|
||||
#include "llvm/Transforms/Scalar.h"
|
||||
-#include "llvm/Transforms/Vectorize.h"
|
||||
+#include "llvm/Transforms/Vectorize/LoadStoreVectorizer.h"
|
||||
|
||||
#define LLVM_VERSION_GE(major, minor) \
|
||||
(LLVM_VERSION_MAJOR > (major) || \
|
||||
--- ./rustc-1.74.0-src.orig/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp 2023-11-13 04:10:51.000000000 +0000
|
||||
+++ ./rustc-1.74.0-src/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp 2025-05-08 01:29:24.667035511 +0000
|
||||
@@ -1,3 +1,4 @@
|
||||
+#include <llvm/Pass.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <cstddef>
|
||||
@@ -38,7 +39,7 @@
|
||||
#include "llvm/LTO/LTO.h"
|
||||
#include "llvm/Bitcode/BitcodeWriter.h"
|
||||
|
||||
-#include "llvm/Transforms/Instrumentation.h"
|
||||
+#include "llvm/Transforms/Utils/Instrumentation.h"
|
||||
#include "llvm/Transforms/Instrumentation/AddressSanitizer.h"
|
||||
#include "llvm/Support/TimeProfiler.h"
|
||||
#include "llvm/Transforms/Instrumentation/GCOVProfiler.h"
|
||||
@@ -50,6 +51,9 @@
|
||||
#include "llvm/Transforms/Utils/NameAnonGlobals.h"
|
||||
#include "llvm/Transforms/Utils.h"
|
||||
|
||||
+#include "llvm-c/TargetMachine.h"
|
||||
+#include "llvm-c/Target.h"
|
||||
+
|
||||
using namespace llvm;
|
||||
|
||||
static codegen::RegisterCodeGenFlags CGF;
|
||||
@@ -331,7 +335,7 @@
|
||||
PrintBackendInfo Print,
|
||||
void* Out) {
|
||||
const TargetMachine *Target = unwrap(TM);
|
||||
- const Triple::ArchType HostArch = Triple(sys::getDefaultTargetTriple()).getArch();
|
||||
+ const Triple::ArchType HostArch = Triple(LLVMGetDefaultTargetTriple()).getArch();
|
||||
const Triple::ArchType TargetArch = Target->getTargetTriple().getArch();
|
||||
|
||||
std::ostringstream Buf;
|
||||
@@ -351,7 +355,7 @@
|
||||
// different arch since that could be wrong or misleading.
|
||||
if (HostArch == TargetArch) {
|
||||
MaxCPULen = std::max(MaxCPULen, (unsigned) std::strlen("native"));
|
||||
- const StringRef HostCPU = sys::getHostCPUName();
|
||||
+ const StringRef HostCPU = LLVMGetHostCPUName();
|
||||
Buf << " " << std::left << std::setw(MaxCPULen) << "native"
|
||||
<< " - Select the CPU of the current host "
|
||||
"(currently " << HostCPU.str() << ").\n";
|
||||
@@ -397,7 +401,7 @@
|
||||
}
|
||||
|
||||
extern "C" const char* LLVMRustGetHostCPUName(size_t *len) {
|
||||
- StringRef Name = sys::getHostCPUName();
|
||||
+ StringRef Name = LLVMGetHostCPUName();
|
||||
*len = Name.size();
|
||||
return Name.data();
|
||||
}
|
||||
@@ -452,7 +456,7 @@
|
||||
if (OutputObjFile) {
|
||||
Options.ObjectFilenameForDebug = OutputObjFile;
|
||||
}
|
||||
-#if LLVM_VERSION_GE(16, 0)
|
||||
+/*#if LLVM_VERSION_GE(16, 0)
|
||||
if (!strcmp("zlib", DebugInfoCompression) && llvm::compression::zlib::isAvailable()) {
|
||||
Options.CompressDebugSections = DebugCompressionType::Zlib;
|
||||
} else if (!strcmp("zstd", DebugInfoCompression) && llvm::compression::zstd::isAvailable()) {
|
||||
@@ -460,9 +464,9 @@
|
||||
} else if (!strcmp("none", DebugInfoCompression)) {
|
||||
Options.CompressDebugSections = DebugCompressionType::None;
|
||||
}
|
||||
-#endif
|
||||
+#endif*/
|
||||
|
||||
- Options.RelaxELFRelocations = RelaxELFRelocations;
|
||||
+ //Options.RelaxELFRelocations = RelaxELFRelocations;
|
||||
Options.UseInitArray = UseInitArray;
|
||||
|
||||
#if LLVM_VERSION_LT(17, 0)
|
||||
@@ -515,8 +519,11 @@
|
||||
assert(buffer_offset == ArgsCstrBuffLen);
|
||||
|
||||
Options.MCOptions.Argv0 = arg0;
|
||||
- Options.MCOptions.CommandLineArgs =
|
||||
- llvm::ArrayRef<std::string>(cmd_arg_strings, num_cmd_arg_strings);
|
||||
+ std::string args = "";
|
||||
+ for (int i = 0; i < num_cmd_arg_strings; i++) {
|
||||
+ args += cmd_arg_strings[i] + " ";
|
||||
+ }
|
||||
+ Options.MCOptions.CommandlineArgs = args;
|
||||
}
|
||||
|
||||
TargetMachine *TM = TheTarget->createTargetMachine(
|
||||
@@ -527,8 +534,8 @@
|
||||
extern "C" void LLVMRustDisposeTargetMachine(LLVMTargetMachineRef TM) {
|
||||
|
||||
MCTargetOptions& MCOptions = unwrap(TM)->Options.MCOptions;
|
||||
- delete[] MCOptions.Argv0;
|
||||
- delete[] MCOptions.CommandLineArgs.data();
|
||||
+ // delete[] MCOptions.Argv0;
|
||||
+ // delete[] MCOptions.CommandLineArgs.data();
|
||||
|
||||
delete unwrap(TM);
|
||||
}
|
||||
@@ -541,7 +548,7 @@
|
||||
TargetLibraryInfoImpl TLII(TargetTriple);
|
||||
if (DisableSimplifyLibCalls)
|
||||
TLII.disableAllFunctions();
|
||||
- unwrap(PMR)->add(new TargetLibraryInfoWrapperPass(TLII));
|
||||
+ unwrap(PMR)->add(reinterpret_cast<Pass*>(new TargetLibraryInfoWrapperPass(TLII)));
|
||||
}
|
||||
|
||||
extern "C" void LLVMRustSetLLVMOptions(int Argc, char **Argv) {
|
||||
@@ -761,6 +768,7 @@
|
||||
FS,
|
||||
#endif
|
||||
PGOOptions::IRInstr, PGOOptions::NoCSAction,
|
||||
+ PGOOptions::ColdFuncOpt::Default,
|
||||
DebugInfoForProfiling);
|
||||
} else if (PGOUsePath) {
|
||||
assert(!PGOSampleUsePath);
|
||||
@@ -770,6 +778,7 @@
|
||||
FS,
|
||||
#endif
|
||||
PGOOptions::IRUse, PGOOptions::NoCSAction,
|
||||
+ PGOOptions::ColdFuncOpt::Default,
|
||||
DebugInfoForProfiling);
|
||||
} else if (PGOSampleUsePath) {
|
||||
PGOOpt = PGOOptions(PGOSampleUsePath, "", "",
|
||||
@@ -778,6 +787,7 @@
|
||||
FS,
|
||||
#endif
|
||||
PGOOptions::SampleUse, PGOOptions::NoCSAction,
|
||||
+ PGOOptions::ColdFuncOpt::Default,
|
||||
DebugInfoForProfiling);
|
||||
} else if (DebugInfoForProfiling) {
|
||||
PGOOpt = PGOOptions("", "", "",
|
||||
@@ -786,6 +796,7 @@
|
||||
FS,
|
||||
#endif
|
||||
PGOOptions::NoAction, PGOOptions::NoCSAction,
|
||||
+ PGOOptions::ColdFuncOpt::Default,
|
||||
DebugInfoForProfiling);
|
||||
}
|
||||
|
||||
@@ -813,7 +824,7 @@
|
||||
// PassBuilder does not create a pipeline.
|
||||
std::vector<std::function<void(ModulePassManager &, OptimizationLevel)>>
|
||||
PipelineStartEPCallbacks;
|
||||
- std::vector<std::function<void(ModulePassManager &, OptimizationLevel)>>
|
||||
+ std::vector<std::function<void(ModulePassManager &, OptimizationLevel, ThinOrFullLTOPhase)>>
|
||||
OptimizerLastEPCallbacks;
|
||||
|
||||
if (!IsLinkerPluginLTO
|
||||
@@ -823,7 +834,7 @@
|
||||
[](ModulePassManager &MPM, OptimizationLevel Level) {
|
||||
MPM.addPass(LowerTypeTestsPass(/*ExportSummary=*/nullptr,
|
||||
/*ImportSummary=*/nullptr,
|
||||
- /*DropTypeTests=*/false));
|
||||
+ /*DropTypeTests=*/llvm::lowertypetests::DropTestKind::None));
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -854,7 +865,7 @@
|
||||
// cargo run tests in multhreading mode by default
|
||||
// so use atomics for coverage counters
|
||||
Options.Atomic = true;
|
||||
- MPM.addPass(InstrProfiling(Options, false));
|
||||
+ MPM.addPass(InstrProfilingLoweringPass(Options, false));
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -867,7 +878,7 @@
|
||||
/*CompileKernel=*/false,
|
||||
/*EagerChecks=*/true);
|
||||
OptimizerLastEPCallbacks.push_back(
|
||||
- [Options](ModulePassManager &MPM, OptimizationLevel Level) {
|
||||
+ [Options](ModulePassManager &MPM, OptimizationLevel Level, ThinOrFullLTOPhase _) {
|
||||
#if LLVM_VERSION_LT(16, 0)
|
||||
MPM.addPass(ModuleMemorySanitizerPass(Options));
|
||||
MPM.addPass(createModuleToFunctionPassAdaptor(MemorySanitizerPass(Options)));
|
||||
@@ -880,7 +891,7 @@
|
||||
|
||||
if (SanitizerOptions->SanitizeThread) {
|
||||
OptimizerLastEPCallbacks.push_back(
|
||||
- [](ModulePassManager &MPM, OptimizationLevel Level) {
|
||||
+ [](ModulePassManager &MPM, OptimizationLevel Level, ThinOrFullLTOPhase _) {
|
||||
MPM.addPass(ModuleThreadSanitizerPass());
|
||||
MPM.addPass(createModuleToFunctionPassAdaptor(ThreadSanitizerPass()));
|
||||
}
|
||||
@@ -889,7 +900,7 @@
|
||||
|
||||
if (SanitizerOptions->SanitizeAddress || SanitizerOptions->SanitizeKernelAddress) {
|
||||
OptimizerLastEPCallbacks.push_back(
|
||||
- [SanitizerOptions](ModulePassManager &MPM, OptimizationLevel Level) {
|
||||
+ [SanitizerOptions](ModulePassManager &MPM, OptimizationLevel Level, ThinOrFullLTOPhase _) {
|
||||
auto CompileKernel = SanitizerOptions->SanitizeKernelAddress;
|
||||
AddressSanitizerOptions opts = AddressSanitizerOptions{
|
||||
CompileKernel,
|
||||
@@ -908,7 +919,7 @@
|
||||
}
|
||||
if (SanitizerOptions->SanitizeHWAddress) {
|
||||
OptimizerLastEPCallbacks.push_back(
|
||||
- [SanitizerOptions](ModulePassManager &MPM, OptimizationLevel Level) {
|
||||
+ [SanitizerOptions](ModulePassManager &MPM, OptimizationLevel Level, ThinOrFullLTOPhase _) {
|
||||
HWAddressSanitizerOptions opts(
|
||||
/*CompileKernel=*/false, SanitizerOptions->SanitizeHWAddressRecover,
|
||||
/*DisableOptimization=*/false);
|
||||
@@ -945,7 +956,7 @@
|
||||
PB.registerOptimizerLastEPCallback(C);
|
||||
|
||||
// Pass false as we manually schedule ThinLTOBufferPasses below.
|
||||
- MPM = PB.buildO0DefaultPipeline(OptLevel, /* PreLinkLTO */ false);
|
||||
+ MPM = PB.buildO0DefaultPipeline(OptLevel, /* PreLinkLTO */ ThinOrFullLTOPhase::FullLTOPreLink);
|
||||
} else {
|
||||
for (const auto &C : PipelineStartEPCallbacks)
|
||||
PB.registerPipelineStartEPCallback(C);
|
||||
@@ -956,7 +967,7 @@
|
||||
|
||||
switch (OptStage) {
|
||||
case LLVMRustOptStage::PreLinkNoLTO:
|
||||
- MPM = PB.buildPerModuleDefaultPipeline(OptLevel, DebugPassManager);
|
||||
+ MPM = PB.buildPerModuleDefaultPipeline(OptLevel, ThinOrFullLTOPhase::FullLTOPreLink);
|
||||
break;
|
||||
case LLVMRustOptStage::PreLinkThinLTO:
|
||||
MPM = PB.buildThinLTOPreLinkDefaultPipeline(OptLevel);
|
||||
@@ -967,7 +978,7 @@
|
||||
if (OptimizerLastEPCallbacks.empty())
|
||||
NeedThinLTOBufferPasses = false;
|
||||
for (const auto &C : OptimizerLastEPCallbacks)
|
||||
- C(MPM, OptLevel);
|
||||
+ C(MPM, OptLevel, ThinOrFullLTOPhase::None);
|
||||
break;
|
||||
case LLVMRustOptStage::PreLinkFatLTO:
|
||||
MPM = PB.buildLTOPreLinkDefaultPipeline(OptLevel);
|
||||
@@ -989,7 +1000,7 @@
|
||||
for (const auto &C : PipelineStartEPCallbacks)
|
||||
C(MPM, OptLevel);
|
||||
for (const auto &C : OptimizerLastEPCallbacks)
|
||||
- C(MPM, OptLevel);
|
||||
+ C(MPM, OptLevel, ThinOrFullLTOPhase::None);
|
||||
}
|
||||
|
||||
if (ExtraPassesLen) {
|
||||
@@ -1218,7 +1229,7 @@
|
||||
// Not 100% sure what these are, but they impact what's internalized and
|
||||
// what's inlined across modules, I believe.
|
||||
#if LLVM_VERSION_GE(18, 0)
|
||||
- DenseMap<StringRef, FunctionImporter::ImportMapTy> ImportLists;
|
||||
+ FunctionImporter::ImportListsTy ImportLists;
|
||||
DenseMap<StringRef, FunctionImporter::ExportSetTy> ExportLists;
|
||||
DenseMap<StringRef, GVSummaryMapTy> ModuleToDefinedGVSummaries;
|
||||
#else
|
||||
@@ -1407,12 +1418,12 @@
|
||||
TargetMachine &Target = *unwrap(TM);
|
||||
|
||||
bool ClearDSOLocal = clearDSOLocalOnDeclarations(Mod, Target);
|
||||
- bool error = renameModuleForThinLTO(Mod, Data->Index, ClearDSOLocal);
|
||||
+ renameModuleForThinLTO(Mod, Data->Index, ClearDSOLocal);
|
||||
|
||||
- if (error) {
|
||||
- LLVMRustSetLastError("renameModuleForThinLTO failed");
|
||||
- return false;
|
||||
- }
|
||||
+ // if (error) {
|
||||
+ // LLVMRustSetLastError("renameModuleForThinLTO failed");
|
||||
+ // return false;
|
||||
+ // }
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1629,14 +1640,13 @@
|
||||
// used during the normal linker-plugin incremental thin-LTO process.
|
||||
extern "C" void
|
||||
LLVMRustComputeLTOCacheKey(RustStringRef KeyOut, const char *ModId, LLVMRustThinLTOData *Data) {
|
||||
- SmallString<40> Key;
|
||||
llvm::lto::Config conf;
|
||||
const auto &ImportList = Data->ImportLists.lookup(ModId);
|
||||
const auto &ExportList = Data->ExportLists.lookup(ModId);
|
||||
const auto &ResolvedODR = Data->ResolvedODR.lookup(ModId);
|
||||
const auto &DefinedGlobals = Data->ModuleToDefinedGVSummaries.lookup(ModId);
|
||||
- std::set<GlobalValue::GUID> CfiFunctionDefs;
|
||||
- std::set<GlobalValue::GUID> CfiFunctionDecls;
|
||||
+ DenseSet<GlobalValue::GUID> CfiFunctionDefs;
|
||||
+ DenseSet<GlobalValue::GUID> CfiFunctionDecls;
|
||||
|
||||
// Based on the 'InProcessThinBackend' constructor in LLVM
|
||||
for (auto &Name : Data->Index.cfiFunctionDefs())
|
||||
@@ -1646,7 +1656,7 @@
|
||||
CfiFunctionDecls.insert(
|
||||
GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Name)));
|
||||
|
||||
- llvm::computeLTOCacheKey(Key, conf, Data->Index, ModId,
|
||||
+ std::string Key = llvm::computeLTOCacheKey(conf, Data->Index, ModId,
|
||||
ImportList, ExportList, ResolvedODR, DefinedGlobals, CfiFunctionDefs, CfiFunctionDecls
|
||||
);
|
||||
|
||||
--- rustc-1.74.0-src.orig/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp 2023-11-12 23:10:51.000000000 -0500
|
||||
+++ rustc-1.74.0-src/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp 2025-05-07 11:23:24.661493619 -0400
|
||||
@@ -1081,11 +1081,12 @@
|
||||
LLVMRustDIBuilderRef Builder, LLVMValueRef V, LLVMMetadataRef VarInfo,
|
||||
uint64_t *AddrOps, unsigned AddrOpsCount, LLVMMetadataRef DL,
|
||||
LLVMBasicBlockRef InsertAtEnd) {
|
||||
- return wrap(Builder->insertDeclare(
|
||||
+ Builder->insertDeclare(
|
||||
unwrap(V), unwrap<DILocalVariable>(VarInfo),
|
||||
Builder->createExpression(llvm::ArrayRef<uint64_t>(AddrOps, AddrOpsCount)),
|
||||
DebugLoc(cast<MDNode>(unwrap(DL))),
|
||||
- unwrap(InsertAtEnd)));
|
||||
+ unwrap(InsertAtEnd));
|
||||
+ return nullptr; //FIXME: VERY BAD
|
||||
}
|
||||
|
||||
extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateEnumerator(
|
||||
@@ -1105,7 +1106,7 @@
|
||||
unwrapDI<DIDescriptor>(Scope), StringRef(Name, NameLen),
|
||||
unwrapDI<DIFile>(File), LineNumber,
|
||||
SizeInBits, AlignInBits, DINodeArray(unwrapDI<MDTuple>(Elements)),
|
||||
- unwrapDI<DIType>(ClassTy), "", IsScoped));
|
||||
+ unwrapDI<DIType>(ClassTy), 0, "", IsScoped));
|
||||
}
|
||||
|
||||
extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateUnionType(
|
||||
@@ -1369,8 +1370,8 @@
|
||||
return LLVMPointerTypeKind;
|
||||
case Type::FixedVectorTyID:
|
||||
return LLVMVectorTypeKind;
|
||||
- case Type::X86_MMXTyID:
|
||||
- return LLVMX86_MMXTypeKind;
|
||||
+ // case Type::X86_MMXTyID:
|
||||
+ // return LLVMX86_MMXTypeKind;
|
||||
case Type::TokenTyID:
|
||||
return LLVMTokenTypeKind;
|
||||
case Type::ScalableVectorTyID:
|
||||
@@ -1814,6 +1815,7 @@
|
||||
std::string{}, // ExtName
|
||||
std::string{}, // SymbolName
|
||||
std::string{}, // AliasTarget
|
||||
+ std::string{},
|
||||
ordinal, // Ordinal
|
||||
ordinal_present, // Noname
|
||||
false, // Data
|
||||
@@ -1909,7 +1911,7 @@
|
||||
}
|
||||
}
|
||||
if (DiagnosticHandlerCallback) {
|
||||
- DiagnosticHandlerCallback(DI, DiagnosticHandlerContext);
|
||||
+ DiagnosticHandlerCallback(&DI, DiagnosticHandlerContext);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
--- rustc-1.74.0-src.orig/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs 2023-11-12 23:10:51.000000000 -0500
|
||||
+++ rustc-1.74.0-src/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs 2025-05-07 17:44:10.449613830 -0400
|
||||
@@ -18,8 +18,9 @@
|
||||
Target {
|
||||
llvm_target: "x86_64-unknown-linux-musl".into(),
|
||||
pointer_width: 64,
|
||||
- data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
- .into(),
|
||||
+ //data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
+ data_layout:
|
||||
+ "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(),
|
||||
arch: "x86_64".into(),
|
||||
options: base,
|
||||
}
|
||||
294
scripts/bootstrap.sh
Executable file
294
scripts/bootstrap.sh
Executable file
@ -0,0 +1,294 @@
|
||||
#!/bin/zsh -e
|
||||
|
||||
export MICROARCH=skylake
|
||||
export TARGET=x86_64-maple-linux-musl
|
||||
|
||||
# Set the environment up
|
||||
export ARCH=$(echo $TARGET | cut -d"-" -f1)
|
||||
export BOOTSTRAP=$(pwd)/.bootstrap
|
||||
export PROCS=$(nproc)
|
||||
export SOURCES=$(pwd)/.treetap/sources
|
||||
export SPEC=$(pwd)/sources
|
||||
export AR=llvm-ar
|
||||
export AS=llvm-as
|
||||
if [ ! -z "$CCACHE" ]; then
|
||||
export CC="$CCACHE clang"
|
||||
export CXX="$CCACHE clang++"
|
||||
else
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
fi
|
||||
export CFLAGS="-fuse-ld=lld -O3 -march=$MICROARCH -pipe --sysroot=$BOOTSTRAP/root -Wno-unused-command-line-argument"
|
||||
export CXXFLAGS=$CFLAGS
|
||||
export RANLIB=llvm-ranlib
|
||||
export LD=ld.lld
|
||||
export LDFLAGS="--sysroot=$BOOTSTRAP/root"
|
||||
export TREETAP=$(pwd)/scripts/treetap
|
||||
export TT_DIR=$(pwd)/.treetap
|
||||
export TT_MICROARCH=$MICROARCH
|
||||
export TT_SYSROOT=$BOOTSTRAP/root
|
||||
export TT_TARGET=$TARGET
|
||||
|
||||
# Fetch sources required for a bootstrap
|
||||
$TREETAP fetch sources/linux/linux.spec
|
||||
$TREETAP fetch sources/llvm/llvm.spec
|
||||
$TREETAP fetch sources/musl/musl.spec
|
||||
|
||||
# Make sure both clang-tblgen and llvm-tblgen are in the PATH. ~ahill
|
||||
echo -n "Verifying that clang-tblgen and llvm-tblgen are in the PATH... "
|
||||
! which clang-tblgen && exit 1
|
||||
! which llvm-tblgen && exit 1
|
||||
echo "Done!"
|
||||
|
||||
# Simplified filesystem heirarchy with symlinks for compatibility
|
||||
mkdir -p $BOOTSTRAP/root/{bin,boot/EFI/BOOT,dev,etc,home,lib,proc,run,sys,tmp,usr/{include,share},var/{cache,lib,log,spool,tmp}}
|
||||
ln -sf bin $BOOTSTRAP/root/sbin
|
||||
ln -sf ../bin $BOOTSTRAP/root/usr/bin
|
||||
ln -sf ../bin $BOOTSTRAP/root/usr/sbin
|
||||
ln -sf ../lib $BOOTSTRAP/root/usr/lib
|
||||
ln -sf ../lib $BOOTSTRAP/root/usr/libexec
|
||||
ln -sf ../run/lock $BOOTSTRAP/root/var/lock
|
||||
ln -sf ../run $BOOTSTRAP/root/var/run
|
||||
|
||||
# Prepare for the build
|
||||
mkdir -p $BOOTSTRAP/build
|
||||
cd $BOOTSTRAP/build
|
||||
|
||||
# Define the target for Maple Linux
|
||||
# NOTE: We run cut on CC and CXX just in case ccache is in use. ~ahill
|
||||
cat << EOF > $BOOTSTRAP/$TARGET.cmake
|
||||
set(CMAKE_ASM_COMPILER_TARGET $TARGET)
|
||||
set(CMAKE_C_COMPILER $(echo $CC | cut -d" " -f2))
|
||||
set(CMAKE_C_COMPILER_TARGET $TARGET)
|
||||
set(CMAKE_C_FLAGS_INIT "$CFLAGS")
|
||||
set(CMAKE_CXX_COMPILER $(echo $CXX | cut -d" " -f2))
|
||||
set(CMAKE_CXX_COMPILER_TARGET $TARGET)
|
||||
set(CMAKE_CXX_FLAGS_INIT "$CXXFLAGS")
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_LINKER_TYPE LLD)
|
||||
set(CMAKE_SYSROOT "$BOOTSTRAP/root")
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
EOF
|
||||
# NOTE: CMake doesn't like dealing with ccache inside of CC/CXX, so we do this
|
||||
# instead. ~ahill
|
||||
if [ ! -z "$CCACHE" ]; then
|
||||
cat << EOF >> $BOOTSTRAP/$TARGET.cmake
|
||||
set(CMAKE_C_COMPILER_LAUNCHER $CCACHE)
|
||||
set(CMAKE_CXX_COMPILER_LAUNCHER $CCACHE)
|
||||
EOF
|
||||
fi
|
||||
|
||||
# Install headers for Linux
|
||||
LINUX_VERSION=$($TREETAP variable $SPEC/linux/linux.spec SRC_VERSION)
|
||||
tar xf $SOURCES/linux/$LINUX_VERSION/linux-*.tar*
|
||||
cd linux-*/
|
||||
# NOTE: LLVM=1 is required here because GCC and other GNU tools are required in
|
||||
# some places still. This allows us to use LLVM and bypass the parts that
|
||||
# haven't become portable yet. ~ahill
|
||||
LLVM=1 make -j $PROCS mrproper
|
||||
# NOTE: We don't use the built-in headers_install target because it requires
|
||||
# rsync for some reason. ~ahill
|
||||
LLVM=1 make -j $PROCS headers ARCH=$ARCH
|
||||
find usr/include -type f ! -name "*.h" -delete
|
||||
cp -r usr/include $BOOTSTRAP/root/usr
|
||||
cd ..
|
||||
|
||||
# Install headers for musl
|
||||
MUSL_VERSION=$($TREETAP variable $SPEC/musl/musl.spec SRC_VERSION)
|
||||
tar xf $SOURCES/musl/$MUSL_VERSION/musl-*.tar*
|
||||
cd musl-*/
|
||||
# NOTE: Patch for musl 1.2.5 to prevent a character encoding vulnerability. This
|
||||
# should be safe to remove after the next release. ~ahill
|
||||
patch -p1 < $BOOTSTRAP/../sources/musl/CVE-2025-26519.patch
|
||||
# NOTE: We are intentionally not passing --target here because musl follows the
|
||||
# GNU approach when it comes to cross-compiling. This means the build
|
||||
# script prefaces the name of every build tool with the target triple
|
||||
# we're compiling for. This is unnecessary for LLVM, because we can simply
|
||||
# pass -target <triple> to the compiler and have it generate machine code
|
||||
# for that target. ~ahill
|
||||
./configure \
|
||||
--bindir=/bin \
|
||||
--includedir=/usr/include \
|
||||
--libdir=/lib \
|
||||
--prefix=/
|
||||
# NOTE: The build is skipped here because we only care about the header files at
|
||||
# this point. ~ahill
|
||||
make -O -j $PROCS install-headers DESTDIR=$BOOTSTRAP/root
|
||||
cd ..
|
||||
|
||||
# Build and install compiler-rt builtins
|
||||
LLVM_VERSION=$($TREETAP variable $SPEC/llvm/llvm.spec SRC_VERSION)
|
||||
LLVM_MAJOR_VERSION=$(echo $LLVM_VERSION | cut -d"." -f1)
|
||||
tar xf $SOURCES/llvm/$LLVM_VERSION/llvm-project-*.tar*
|
||||
cd llvm-project-*/
|
||||
cmake -S compiler-rt/lib/builtins -B build-builtins \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=$BOOTSTRAP/root/lib/clang/$LLVM_MAJOR_VERSION \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$BOOTSTRAP/$TARGET.cmake \
|
||||
-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
|
||||
cmake --build build-builtins --parallel $PROCS
|
||||
cmake --install build-builtins --parallel $PROCS
|
||||
cd ..
|
||||
|
||||
# Build musl for real this time
|
||||
# NOTE: LIBCC is required here because it will attempt to link with the build
|
||||
# system's runtime if this is not specified. ~ahill
|
||||
LIBCC="$BOOTSTRAP/root/lib/clang/$LLVM_MAJOR_VERSION/lib/linux/libclang_rt.builtins-x86_64.a" \
|
||||
$TREETAP build $SPEC/musl/musl.spec
|
||||
$TREETAP install $($TREETAP variable $SPEC/musl/musl.spec TT_PACKAGE) $BOOTSTRAP/root
|
||||
|
||||
# Include compiler-rt and musl in our environment
|
||||
export CFLAGS="$CFLAGS -Qunused-arguments -rtlib=compiler-rt -Wl,--dynamic-linker=/lib/ld-musl-$ARCH.so.1"
|
||||
export CXXFLAGS="$CXXFLAGS -Qunused-arguments -rtlib=compiler-rt -Wl,--dynamic-linker=/lib/ld-musl-$ARCH.so.1"
|
||||
|
||||
# Build the LLVM runtimes
|
||||
# NOTE: When CMake tests the C++ compiler, it attempts to link libstdc++/libc++
|
||||
# before it even exists, causing an error. We can bypass this by simply
|
||||
# setting CMAKE_CXX_COMPILER_WORKS, therefore tricking CMake into
|
||||
# performing a successful build. Yet another instance where the genie in
|
||||
# the bottle does exactly what we asked, and not what we wanted. ~ahill
|
||||
# NOTE: Not sure why this didn't show up before, but CMAKE_C_COMPILER_WORKS is
|
||||
# is manually set because the C compiler attempts to link with libgcc_s or
|
||||
# libunwind, even though it doesn't exist yet. ~ahill
|
||||
cd llvm-project-*/
|
||||
cmake -S runtimes -B build-runtimes \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER_WORKS=ON \
|
||||
-DCMAKE_CXX_COMPILER_WORKS=ON \
|
||||
-DCMAKE_INSTALL_INCLUDEDIR=$BOOTSTRAP/root/usr/include \
|
||||
-DCMAKE_INSTALL_PREFIX=$BOOTSTRAP/root \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$BOOTSTRAP/$TARGET.cmake \
|
||||
-DLIBCXX_CXX_ABI=libcxxabi \
|
||||
-DLIBCXX_HAS_MUSL_LIBC=ON \
|
||||
-DLIBCXX_USE_COMPILER_RT=ON \
|
||||
-DLIBCXXABI_USE_COMPILER_RT=ON \
|
||||
-DLIBCXXABI_USE_LLVM_UNWINDER=ON \
|
||||
-DLIBUNWIND_USE_COMPILER_RT=ON \
|
||||
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind"
|
||||
cmake --build build-runtimes --parallel $PROCS
|
||||
cmake --install build-runtimes --parallel $PROCS
|
||||
cd ..
|
||||
|
||||
# Now we can introduce libunwind and libc++ into the environment
|
||||
# NOTE: clang++ attempts to build with headers from the build system rather than
|
||||
# exclusively relying on the sysroot. Because of this, we must manually
|
||||
# define the proper include path. ~ahill
|
||||
export CFLAGS="$CFLAGS -unwindlib=libunwind"
|
||||
export CXXFLAGS="$CXXFLAGS -isystem $BOOTSTRAP/root/usr/include/c++/v1 -nostdinc++ -stdlib=libc++ -unwindlib=libunwind"
|
||||
|
||||
# Build clang/LLVM
|
||||
# NOTE: LLVM_ENABLE_ZSTD is disabled because we don't have zstd in the sysroot,
|
||||
# and because I don't believe that a library created by Facebook should
|
||||
# be required for an operating system to function. ~ahill
|
||||
# NOTE: LLVM attempts to build its own copy of tblgen, which will cause the
|
||||
# build to fail since we're cross-compiling and can't run programs built
|
||||
# for another platform. LLVM_NATIVE_TOOL_DIR, LLVM_TABLEGEN, and
|
||||
# CLANG_TABLEGEN are set to remedy this issue. ~ahill
|
||||
# NOTE: Without CLANG_DEFAULT_LINKER, clang attempts to invoke "ld" to link
|
||||
# programs, which doesn't exist on Maple Linux (at least not yet). ~ahill
|
||||
# NOTE: We're using sed to remove newlines instead of dirname's own -z switch
|
||||
# because -z adds a null byte, which messes with the files generated by
|
||||
# LLVM's build process. ~ahill
|
||||
# NOTE: Many build scripts still rely on the old Unix names for tools such as
|
||||
# cc and ld to function. Because of this, we enable
|
||||
# LLVM_INSTALL_BINUTILS_SYMLINKS and LLVM_INSTALL_CCTOOLS_SYMLINKS for
|
||||
# compatibility's sake. ~ahill
|
||||
NATIVE_TOOL_DIR=$(dirname $(which llvm-tblgen) | sed -z "s/\n//g")
|
||||
cd llvm-project-*/
|
||||
cmake -S llvm -B build-llvm \
|
||||
-DCLANG_DEFAULT_CXX_STDLIB=libc++ \
|
||||
-DCLANG_DEFAULT_LINKER=lld \
|
||||
-DCLANG_DEFAULT_RTLIB=compiler-rt \
|
||||
-DCLANG_DEFAULT_UNWINDLIB=libunwind \
|
||||
-DCLANG_TABLEGEN=$NATIVE_TOOL_DIR/clang-tblgen \
|
||||
-DCLANG_VENDOR=Maple \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=$BOOTSTRAP/root \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$BOOTSTRAP/$TARGET.cmake \
|
||||
-DLLVM_ENABLE_LIBCXX=ON \
|
||||
-DLLVM_ENABLE_PROJECTS="clang;lld;llvm" \
|
||||
-DLLVM_ENABLE_ZSTD=OFF \
|
||||
-DLLVM_HOST_TRIPLE=$TARGET \
|
||||
-DLLVM_INSTALL_BINUTILS_SYMLINKS=ON \
|
||||
-DLLVM_INSTALL_CCTOOLS_SYMLINKS=ON \
|
||||
-DLLVM_NATIVE_TOOL_DIR=$NATIVE_TOOL_DIR \
|
||||
-DLLVM_TABLEGEN=$NATIVE_TOOL_DIR/llvm-tblgen
|
||||
cmake --build build-llvm --parallel $PROCS
|
||||
cmake --install build-llvm --parallel $PROCS
|
||||
# NOTE: LLVM doesn't add symlinks for clang, so we'll make them ourselves.
|
||||
# ~ahill
|
||||
ln -sf clang $BOOTSTRAP/root/bin/cc
|
||||
ln -sf clang++ $BOOTSTRAP/root/bin/c++
|
||||
cd ..
|
||||
|
||||
# Build remaining software with treetap
|
||||
SOURCES=(coreutils dash diffutils findutils grep gzip make mawk patch sed tar)
|
||||
for name in $SOURCES; do
|
||||
$TREETAP fetch $SPEC/$name/$name.spec
|
||||
$TREETAP build $SPEC/$name/$name.spec
|
||||
$TREETAP install $($TREETAP variable $SPEC/$name/$name.spec TT_PACKAGE) $BOOTSTRAP/root
|
||||
done
|
||||
|
||||
# Install Treetap
|
||||
cp $TREETAP $BOOTSTRAP/root/bin/
|
||||
|
||||
# Prepare for chroot build
|
||||
mkdir -p $BOOTSTRAP/root/maple/
|
||||
cp $BOOTSTRAP/../scripts/rootbuild.sh $BOOTSTRAP/root/maple/
|
||||
export TT_DIR=$BOOTSTRAP/root/maple/.treetap
|
||||
SOURCES=(
|
||||
autoconf
|
||||
automake
|
||||
bc
|
||||
byacc
|
||||
bzip2
|
||||
cmake
|
||||
coreutils
|
||||
curl
|
||||
dash
|
||||
diffutils
|
||||
expat
|
||||
findutils
|
||||
flex
|
||||
fortune-mod
|
||||
gettext
|
||||
git
|
||||
grep
|
||||
groff
|
||||
gzip
|
||||
initramfs-tools
|
||||
kmod
|
||||
libarchive
|
||||
libcap2
|
||||
libelf
|
||||
libressl
|
||||
libtool
|
||||
limine
|
||||
linux
|
||||
llvm
|
||||
m4
|
||||
make
|
||||
mawk
|
||||
muon
|
||||
musl
|
||||
nano
|
||||
nasm
|
||||
ncurses
|
||||
openrc
|
||||
patch
|
||||
perl
|
||||
pkgconf
|
||||
python
|
||||
sed
|
||||
tar
|
||||
xz
|
||||
zlib
|
||||
zsh
|
||||
)
|
||||
for name in $SOURCES; do
|
||||
$TREETAP fetch $SPEC/$name/$name.spec
|
||||
done
|
||||
cp -r $SPEC $BOOTSTRAP/root/maple/
|
||||
36
scripts/licensebar.sh
Executable file
36
scripts/licensebar.sh
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/sh -e
|
||||
# Usage: ./licensebar.sh docs/SOFTWARE.md > licensebar.svg
|
||||
# Yes, this is cursed, but it was the simplest way I could think of automating this. ~ahill
|
||||
COPYLEFT_COUNT=$(grep "| Copyleft " $1 | wc -l)
|
||||
SLIGHTLY_COPYLEFT_COUNT=$(grep "| Slightly Copyleft " $1 | wc -l)
|
||||
FREE_COUNT=$(grep "| Free " $1 | wc -l)
|
||||
MIXED_COUNT=$(grep "| Mixed " $1 | wc -l)
|
||||
SLIGHTLY_COPYRIGHT_COUNT=$(grep "| Slightly Copyright |" $1 | wc -l)
|
||||
COPYRIGHT_COUNT=$(grep "| Copyright " $1 | wc -l)
|
||||
|
||||
BAR_BORDER=3
|
||||
BAR_HEIGHT=16
|
||||
BAR_TOTAL=$(expr $COPYLEFT_COUNT + $SLIGHTLY_COPYLEFT_COUNT + $FREE_COUNT + $MIXED_COUNT + $SLIGHTLY_COPYRIGHT_COUNT + $COPYRIGHT_COUNT)
|
||||
BAR_WIDTH=1024
|
||||
|
||||
BAR_END=$(expr $BAR_WIDTH - $BAR_BORDER)
|
||||
BAR_INNER=$(expr $BAR_WIDTH - \( 2 \* $BAR_BORDER \))
|
||||
BAR_OFFSET=$BAR_BORDER
|
||||
|
||||
render_segment() {
|
||||
size=$(printf %.0f $(echo "($BAR_INNER / $BAR_TOTAL) * $2" | bc -l))
|
||||
echo "<rect fill=\"$1\" height=\"$(expr $BAR_HEIGHT - \( 2 \* $BAR_BORDER \))\" width=\"$size\" x=\"$BAR_OFFSET\" y=\"$BAR_BORDER\" />"
|
||||
BAR_OFFSET=$(expr $BAR_OFFSET + $size)
|
||||
}
|
||||
|
||||
echo "<svg height=\"$BAR_HEIGHT\" version=\"1.1\" width=\"$BAR_WIDTH\" xmlns=\"http://www.w3.org/2000/svg\">"
|
||||
echo "<rect fill=\"black\" height=\"100%\" width=\"100%\" />"
|
||||
|
||||
render_segment blue $COPYLEFT_COUNT
|
||||
render_segment cornflowerblue $SLIGHTLY_COPYLEFT_COUNT
|
||||
render_segment white $FREE_COUNT
|
||||
render_segment mediumpurple $MIXED_COUNT
|
||||
render_segment indianred $SLIGHTLY_COPYRIGHT_COUNT
|
||||
render_segment crimson $COPYRIGHT_COUNT
|
||||
|
||||
echo "</svg>"
|
||||
25
scripts/maple-chroot
Executable file
25
scripts/maple-chroot
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -z "$1" ] && [ ! -d "$1" ]; then
|
||||
echo "Usage: $0 <root>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if mount --rbind /dev $1/dev && mount --make-rslave $1/dev; then
|
||||
if mount -t proc /proc $1/proc; then
|
||||
if mount --bind /run $1/run; then
|
||||
if mount --rbind /sys $1/sys && mount --make-rslave $1/sys; then
|
||||
if mount --rbind /tmp $1/tmp; then
|
||||
SHELL=$2
|
||||
[ -z "$SHELL" ] && SHELL=/bin/sh
|
||||
chroot $1 $SHELL
|
||||
umount -R $1/tmp
|
||||
fi
|
||||
umount -R $1/sys
|
||||
fi
|
||||
umount -R $1/run
|
||||
fi
|
||||
umount -R $1/proc
|
||||
fi
|
||||
umount -R $1/dev
|
||||
fi
|
||||
48
scripts/mapleconf
Executable file
48
scripts/mapleconf
Executable file
@ -0,0 +1,48 @@
|
||||
#!/bin/ruby
|
||||
|
||||
# Copyright (c) 2026 Alexander Hill
|
||||
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
require "liquid"
|
||||
require "psych"
|
||||
|
||||
# TODO: Tie these variables to command line arguments. ~ahill
|
||||
$config = Psych.safe_load_file "/etc/maple.yml"
|
||||
$sysroot = "/"
|
||||
$templates = "/usr/share/mapleconf"
|
||||
|
||||
def render_directory(stack)
|
||||
path = stack.empty? ? "/" : "/#{stack.join "/"}/"
|
||||
|
||||
Dir.foreach $templates + path do |entry|
|
||||
next if entry =~ /^\.+$/
|
||||
fullpath = path + entry
|
||||
|
||||
if File.directory? $templates + fullpath
|
||||
Dir.mkdir $sysroot + fullpath unless File.exist? $sysroot + fullpath
|
||||
render_directory stack + [entry]
|
||||
|
||||
elsif File.file? $templates + fullpath
|
||||
puts fullpath
|
||||
template = Liquid::Template.parse(File.read $templates + fullpath)
|
||||
File.write $sysroot + fullpath, template.render($config)
|
||||
|
||||
else
|
||||
puts "What even is #{fullpath}? If you know, yell at Alex."
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
render_directory []
|
||||
36
scripts/rescue.sh
Executable file
36
scripts/rescue.sh
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
# This file is made with lines from bootstrap.sh to create a shell in case the
|
||||
# bootstrap fails to build for whatever reason. Building a sysroot, especially
|
||||
# with LLVM, takes a stupid amount of time and it makes it unreasonable to
|
||||
# rebuild after something like diffutils fails to build. ~ahill
|
||||
|
||||
# The following script was created with:
|
||||
# sh -c "grep export scripts/bootstrap.sh | sed /CCACHE/d; echo zsh" >> scripts/rescue.sh
|
||||
|
||||
export MICROARCH=skylake
|
||||
export TARGET=x86_64-maple-linux-musl
|
||||
export ARCH=$(echo $TARGET | cut -d"-" -f1)
|
||||
export BOOTSTRAP=$(pwd)/.bootstrap
|
||||
export PROCS=$(nproc)
|
||||
export SOURCES=$(pwd)/.treetap/sources
|
||||
export SPEC=$(pwd)/sources
|
||||
export AR=llvm-ar
|
||||
export AS=llvm-as
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
export CFLAGS="-fuse-ld=lld -O3 -march=$MICROARCH -pipe --sysroot=$BOOTSTRAP/root -Wno-unused-command-line-argument"
|
||||
export CXXFLAGS=$CFLAGS
|
||||
export RANLIB=llvm-ranlib
|
||||
export LD=ld.lld
|
||||
export LDFLAGS="--sysroot=$BOOTSTRAP/root"
|
||||
export TREETAP=$(pwd)/scripts/treetap
|
||||
export TT_DIR=$(pwd)/.treetap
|
||||
export TT_MICROARCH=$MICROARCH
|
||||
export TT_SYSROOT=$BOOTSTRAP/root
|
||||
export TT_TARGET=$TARGET
|
||||
export CFLAGS="$CFLAGS -Qunused-arguments -rtlib=compiler-rt -Wl,--dynamic-linker=/lib/ld-musl-$ARCH.so.1"
|
||||
export CXXFLAGS="$CXXFLAGS -Qunused-arguments -rtlib=compiler-rt -Wl,--dynamic-linker=/lib/ld-musl-$ARCH.so.1"
|
||||
export CFLAGS="$CFLAGS -unwindlib=libunwind"
|
||||
export CXXFLAGS="$CXXFLAGS -isystem $BOOTSTRAP/root/usr/include/c++/v1 -nostdinc++ -stdlib=libc++ -unwindlib=libunwind"
|
||||
export TT_DIR=$BOOTSTRAP/root/maple/.treetap
|
||||
zsh
|
||||
79
scripts/rootbuild.sh
Executable file
79
scripts/rootbuild.sh
Executable file
@ -0,0 +1,79 @@
|
||||
#!/bin/sh -e
|
||||
export CC=clang
|
||||
export CFLAGS="-O3 -pipe"
|
||||
export CXX=clang++
|
||||
export CXXFLAGS=$CFLAGS
|
||||
export LD=ld.lld
|
||||
export TT_MICROARCH=skylake
|
||||
|
||||
# Temporary workaround since root is the only user. ~ahill
|
||||
export FORCE_UNSAFE_CONFIGURE=1
|
||||
|
||||
# xz Build
|
||||
# NOTE: xz is needed to run "treetap build", so we manually build. ~ahill
|
||||
cd /maple
|
||||
XZ_VERSION=$(treetap variable /maple/sources/xz/xz.spec SRC_VERSION)
|
||||
echo -n "Bootstrapping xz... "
|
||||
cd .treetap/sources/xz/$XZ_VERSION
|
||||
mkdir -p $TT_MICROARCH
|
||||
cd $TT_MICROARCH
|
||||
tar xf ../xz-*.tar*
|
||||
cd xz-*/
|
||||
./configure $(treetap variable /maple/sources/xz/xz.spec TT_AUTOCONF_COMMON) --disable-static --enable-year2038 > /maple/xz.log 2>&1
|
||||
make -j $(nproc) >> /maple/xz.log 2>&1
|
||||
make -j $(nproc) install DESTDIR=/ > /maple/xz.log 2>&1
|
||||
echo "Done!"
|
||||
|
||||
# libarchive Build
|
||||
# NOTE: bsdcpio is needed to run "treetap build", so we manually build.
|
||||
# ~ahill
|
||||
cd /maple
|
||||
LIBARCHIVE_VERSION=$(treetap variable /maple/sources/libarchive/libarchive.spec SRC_VERSION)
|
||||
echo -n "Bootstrapping libarchive... "
|
||||
cd .treetap/sources/libarchive/$LIBARCHIVE_VERSION
|
||||
mkdir -p $TT_MICROARCH
|
||||
cd $TT_MICROARCH
|
||||
tar xf ../libarchive-*.tar*
|
||||
cd libarchive-*/
|
||||
./configure $(treetap variable /maple/sources/libarchive/libarchive.spec TT_AUTOCONF_COMMON) --disable-static --enable-year2038 > /maple/libarchive.log 2>&1
|
||||
make -j $(nproc) > /maple/libarchive.log 2>&1
|
||||
make -j $(nproc) install DESTDIR=/ > /maple/libarchive.log 2>&1
|
||||
echo "Done!"
|
||||
|
||||
# Now we can build stuff exclusively with treetap
|
||||
# NOTE: bzip2, xz, and zlib need to be built before libarchive or we will be
|
||||
# missing functionality! ~ahill
|
||||
# NOTE: CMake requires LibreSSL and libarchive to function properly so it is
|
||||
# built after them. ~ahill
|
||||
# NOTE: flex requires byacc and m4 to build. ~ahill
|
||||
# NOTE: autoconf requires GNU m4 and perl to build. ~ahill
|
||||
# NOTE: automake requires m4 to build. ~ahill
|
||||
# NOTE: groff requires Perl to build. ~ahill
|
||||
# NOTE: nasm requires autoconf and automake to build. ~ahill
|
||||
# NOTE: dash requires flex and mawk to build. ~ahill
|
||||
# NOTE: libelf requires zlib to build. ~ahill
|
||||
# NOTE: fortune-mod requires cmake to build. ~ahill
|
||||
# NOTE: nano requires ncurses to build. ~ahill
|
||||
# NOTE: kmod requires autoconf, automake, libtool to build. ~ahill
|
||||
# NOTE: libcap2 requires zsh to build. ~ahill
|
||||
# NOTE: Linux requires bc, byacc, flex, kmod, ... ~ahill
|
||||
# NOTE: Limine requires nasm to build. ~ahill
|
||||
# NOTE: OpenRC requires libcap2 and muon to build. ~ahill
|
||||
# NOTE: curl requires LibreSSL and zlib to build. ~ahill
|
||||
# NOTE: gettext requires ncurses to build. ~ahill
|
||||
# NOTE: git requires curl, expat, and gettext to build. ~ahill
|
||||
# NOTE: Python requires bzip2, expat, LibreSSL, ncurses, xz, and zlib to build. ~ahill
|
||||
# NOTE: LLVM requires CMake and Python to build. ~ahill
|
||||
# NOTE: Ruby requires autoconf, libffi, and libyaml to build. ~ahill
|
||||
# NOTE: Liquid requires Ruby to build. ~ahill
|
||||
cd /maple
|
||||
LAYER0="bc byacc bzip2 coreutils diffutils expat findutils grep gzip initramfs-tools libressl m4 make mawk muon musl ncurses patch perl pkgconf sed tar xz zlib zsh"
|
||||
LAYER1="autoconf automake curl flex gettext groff libarchive libcap2 libelf libtool nano openrc python"
|
||||
LAYER2="cmake dash fortune-mod git kmod llvm nasm"
|
||||
LAYER3="limine linux"
|
||||
PACKAGES="$LAYER0 $LAYER1 $LAYER2 $LAYER3"
|
||||
for pkg in $PACKAGES; do
|
||||
treetap fetch /maple/sources/$pkg/$pkg.spec
|
||||
treetap build /maple/sources/$pkg/$pkg.spec
|
||||
treetap install $(treetap variable /maple/sources/$pkg/$pkg.spec TT_PACKAGE)
|
||||
done
|
||||
466
scripts/treetap
Executable file
466
scripts/treetap
Executable file
@ -0,0 +1,466 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
# Copyright (c) 2025-2026 Alexander Hill
|
||||
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
#############
|
||||
# Changelog #
|
||||
#############
|
||||
|
||||
# January 16, 2026 (1.5.0)
|
||||
# + Added TT_PACKAGE [ahill]
|
||||
# + Added variable subcommand [ahill]
|
||||
# * Converted the build log path to an absolute path [ahill]
|
||||
# * Merged the functionality of the package verb into the build command [ahill]
|
||||
# * Packages are no longer built if the package file exists already [ahill]
|
||||
# - Removed the purge subcommand in favor of clean [ahill]
|
||||
|
||||
# January 4, 2026 (1.4.1)
|
||||
# * Set LD to ld.lld after mold was removed from Maple Linux. [ahill]
|
||||
# - Replaced clean with purge, since the current implementation of clean isn't
|
||||
# effective. [ahill]
|
||||
|
||||
# December 6, 2025 (1.4.0)
|
||||
# + Added sane defaults for the environment if they are not defined [ahill]
|
||||
# + Added SRC_REVISION and SRC_FULLVERSION to prevent issues related to
|
||||
# SRC_VERSION [ahill]
|
||||
# * Fixed an issue where uninstalls fail due to spaces in the filename [ahill]
|
||||
|
||||
# November 29, 2025 (1.3.1)
|
||||
# + Added GNUInstallDirs to TT_CMAKE_COMMON [ahill]
|
||||
# * Tweaked the messages to make it easier to see that treetap exited
|
||||
# unexpectedly [ahill]
|
||||
|
||||
# November 24, 2025 (1.3.0)
|
||||
# + Added TT_DATADIR [ahill]
|
||||
# + Added TT_MESON_COMMON for easy Meson integration [ahill]
|
||||
# + Added TT_RUNDIR [ahill]
|
||||
# + Added TT_STATEDIR [ahill]
|
||||
# * Fixed a bug where applying TT_AUTOCONF_COMMON with some versions of autoconf
|
||||
# cause it to think we're cross-compiling when we're not. [ahill]
|
||||
# * Switched from GNU cpio to bsdcpio to function on Maple Linux [ahill]
|
||||
|
||||
# November 22, 2025 (1.2.0)
|
||||
# + Added support for the CCACHE environment variable [ahill]
|
||||
# + Added TT_ARCH [ahill]
|
||||
# + Added TT_AUTOCONF_COMMON for easy autoconf integration [ahill]
|
||||
# + Added TT_CMAKE_COMMON for easy CMake integration [ahill]
|
||||
# + Added TT_MICROARCH for micro-optimization support [ahill]
|
||||
# * Changed the build path to use TT_MICROARCH instead of TT_TARGET [ahill]
|
||||
# * Fixed "missing package" error when passing absolute paths to the install
|
||||
# subcommand [ahill]
|
||||
# * Prevented xz from deleting package files [ahill]
|
||||
# + Started printing the version number in the build logs [ahill]
|
||||
|
||||
# November 15, 2025 (1.1.0)
|
||||
# + Added the ability to incorporate patches into the build [ahill]
|
||||
# + Added TT_CONFDIR [ahill]
|
||||
# * Replaced curl with wget to rely purely on Busybox [ahill]
|
||||
|
||||
# November 13, 2025 (1.0.2)
|
||||
# + Added the target triple to the package path [ahill]
|
||||
# * Prevented fetch from re-downloading packages given a valid hash [ahill]
|
||||
# * Renamed all TREETAP_* variables to TT_* [ahill]
|
||||
|
||||
# November 11, 2025 (1.0.1)
|
||||
# - Removed bashisms to become POSIX compliant [ahill]
|
||||
|
||||
# November 9, 2025 (1.0.0)
|
||||
# * Initial release [ahill]
|
||||
|
||||
########################
|
||||
# .spec File Reference #
|
||||
########################
|
||||
|
||||
# For everyone trying to build .spec files (including myself), this is the list
|
||||
# of useful variables to take advantage of. ~ahill
|
||||
|
||||
# Specification Functions:
|
||||
# build - Builds the package and installs it to $TT_INSTALLDIR
|
||||
|
||||
# Specification Variables:
|
||||
# SRC_FILENAME - The name of the tarball to extract (optional)
|
||||
# SRC_FULLVERSION - The full version of the package, which is automatically
|
||||
# set to SRC_VERSION, or "(SRC_VERSION)r(SRC_REVISION)" if
|
||||
# SRC_REVISION is set.
|
||||
# SRC_HASH - The hash of the tarball for verification purposes
|
||||
# (required)
|
||||
# SRC_NAME - The name of the package being built (required)
|
||||
# SRC_PATCHES - A list of SHA256 hashes followed by their filenames to be
|
||||
# copied to the build directory (optional)
|
||||
# SRC_REVISION - The package revision number to denote changes specifically
|
||||
# made for Maple Linux (optional)
|
||||
# SRC_URL - The URL of the tarball to be downloaded (required)
|
||||
# SRC_VERSION - The version of the package being built (required)
|
||||
|
||||
# Treetap Variables:
|
||||
# TT_ARCH - The architecture portion of TT_TARGET
|
||||
# [scope: source]
|
||||
# TT_AUTOCONF_COMMON - The default autoconf arguments based on the environment
|
||||
# [scope: source]
|
||||
# TT_BINDIR - The desired path for binaries
|
||||
# [scope: source] [default: /bin]
|
||||
# TT_BUILD - The target triple of the build system
|
||||
# [scope: source]
|
||||
# TT_BUILDDIR - The path to the build directory
|
||||
# [scope: source]
|
||||
# TT_CMAKE_COMMON - The default CMake arguments based on the environment
|
||||
# [scope: source]
|
||||
# TT_CONFDIR - The desired path for configuration files
|
||||
# [scope: source] [default: /etc]
|
||||
# TT_DATADIR - The desired path for data files
|
||||
# [scope: source] [default: /usr/share]
|
||||
# TT_DIR - The path to the treetap directory
|
||||
# [scope: global]
|
||||
# TT_INCLUDEDIR - The desired path for header files
|
||||
# [scope: source] [default: /usr/include]
|
||||
# TT_INSTALLDIR - The path to the install directory
|
||||
# [scope: source]
|
||||
# TT_LIBDIR - The desired path for libraries
|
||||
# [scope: source] [default: /lib]
|
||||
# TT_MESON_COMMON - The default meson arguments based on the environment
|
||||
# [scope: source]
|
||||
# TT_MICROARCH - The microarchitecture to optimize for
|
||||
# [scope: source]
|
||||
# TT_PACKAGE - The path to the package being built
|
||||
# [scope: source]
|
||||
# TT_PKGDIR - The path to the package directory
|
||||
# [scope: global]
|
||||
# TT_PREFIX - The desired prefix for the package
|
||||
# [scope: source] [default: /]
|
||||
# TT_PROCS - The number of processors on the build system
|
||||
# [scope: source]
|
||||
# TT_RUNDIR - The desired path for temporary runtime information
|
||||
# [scope: source] [default: /run]
|
||||
# TT_STATEDIR - The desired path for persistent runtime information
|
||||
# [scope: source] [default: /var]
|
||||
# TT_SYSROOT - The sysroot of the target system
|
||||
# [scope: global]
|
||||
# TT_TARGET - The target triple of the target system
|
||||
# [scope: source]
|
||||
# TT_VERSION - The version of treetap being used
|
||||
# [scope: global]
|
||||
|
||||
####################
|
||||
# Global Variables #
|
||||
####################
|
||||
|
||||
[ -z "$TT_DIR" ] && TT_DIR="$(pwd)/.treetap"
|
||||
[ -z "$TT_PKGDIR" ] && TT_PKGDIR="$TT_DIR/packages"
|
||||
[ -z "$TT_SYSROOT" ] && TT_SYSROOT=/
|
||||
TT_VERSION="1.5.0"
|
||||
|
||||
#########################
|
||||
# Environment Variables #
|
||||
#########################
|
||||
|
||||
[ -z "$AR" ] && export AR=ar
|
||||
[ -z "$AS" ] && export AS=nasm
|
||||
[ -z "$CC" ] && export CC=clang
|
||||
[ -z "$CXX" ] && export CXX=clang++
|
||||
[ -z "$LD" ] && export LD=ld.lld
|
||||
[ -z "$NM" ] && export NM=nm
|
||||
[ -z "$OBJCOPY" ] && export OBJCOPY=objcopy
|
||||
[ -z "$OBJDUMP" ] && export OBJDUMP=objdump
|
||||
[ -z "$PKG_CONFIG" ] && export PKG_CONFIG=pkgconf
|
||||
[ -z "$STRIP" ] && export STRIP=strip
|
||||
|
||||
#####################
|
||||
# Utility Functions #
|
||||
#####################
|
||||
|
||||
# Displays the usage information for treetap
|
||||
help_message() {
|
||||
echo "treetap $TT_VERSION"
|
||||
echo
|
||||
echo "Package Commands:"
|
||||
echo " $0 install <package> [sysroot]"
|
||||
echo " $0 uninstall <package> [sysroot]"
|
||||
echo
|
||||
echo "Source Commands:"
|
||||
echo " $0 build <spec>"
|
||||
echo " $0 clean <spec>"
|
||||
echo " $0 fetch <spec>"
|
||||
echo " $0 variable <spec> <name>"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Confirms that the given strings are valid package and sysroot paths
|
||||
package_check() {
|
||||
[ -z "$1" ] && (echo "package_check: Missing package file"; exit 1)
|
||||
[ -z "$2" ] && (echo "package_check: Missing sysroot"; exit 1)
|
||||
[ ! -f "$1" ] && (echo "package_check: Package file \"$1\" not found"; exit 1)
|
||||
[ ! -d "$2" ] && (echo "package_check: Sysroot \"$2\" not found"; exit 1)
|
||||
case "$1" in
|
||||
"/"*) PKG_FULLPATH=$1 ;;
|
||||
*) PKG_FULLPATH=$(pwd)/$1 ;;
|
||||
esac
|
||||
true
|
||||
}
|
||||
|
||||
# Reads the source specification and ensures it includes the required data
|
||||
source_spec() {
|
||||
# Sanity Check
|
||||
[ -z "$1" ] && (echo "source_spec: Missing specification file"; exit 1)
|
||||
[ ! -f "$1" ] && (echo "source_spec: Specification file \"$1\" not found"; exit 1)
|
||||
|
||||
# Zhu Li, do the thing!
|
||||
. $1
|
||||
|
||||
# Required Fields
|
||||
[ -z "$SRC_HASH" ] && (echo "source_spec: SRC_HASH is required but not defined"; exit 1)
|
||||
[ -z "$SRC_NAME" ] && (echo "source_spec: SRC_NAME is required but not defined"; exit 1)
|
||||
[ -z "$SRC_URL" ] && (echo "source_spec: SRC_URL is required but not defined"; exit 1)
|
||||
[ -z "$SRC_VERSION" ] && (echo "source_spec: SRC_VERSION is required but not defined"; exit 1)
|
||||
if [ -z "$SRC_REVISION" ]; then
|
||||
SRC_FULLVERSION=$SRC_VERSION
|
||||
else
|
||||
SRC_FULLVERSION="${SRC_VERSION}r${SRC_REVISION}"
|
||||
fi
|
||||
|
||||
# Optional Fields
|
||||
[ -z "$SRC_FILENAME" ] && SRC_FILENAME=$(basename $SRC_URL)
|
||||
|
||||
# Environmental Variables
|
||||
[ -z "$TT_BINDIR" ] && TT_BINDIR=/bin
|
||||
TT_BUILD=$(clang -dumpmachine)
|
||||
[ -z "$TT_TARGET" ] && TT_TARGET=$TT_BUILD
|
||||
[ -z "$TT_CONFDIR" ] && TT_CONFDIR=/etc
|
||||
[ -z "$TT_DATADIR" ] && TT_DATADIR=/usr/share
|
||||
[ -z "$TT_INCLUDEDIR" ] && TT_INCLUDEDIR=/usr/include
|
||||
[ -z "$TT_LIBDIR" ] && TT_LIBDIR=/lib
|
||||
[ -z "$TT_PREFIX" ] && TT_PREFIX=/
|
||||
[ -z "$TT_PROCS" ] && TT_PROCS=$(nproc)
|
||||
[ -z "$TT_RUNDIR" ] && TT_RUNDIR=/run
|
||||
[ -z "$TT_STATEDIR" ] && TT_STATEDIR=/var
|
||||
|
||||
# Attempt to guess TT_MICROARCH if it isn't defined
|
||||
TT_ARCH=$(echo $TT_TARGET | cut -d"-" -f1)
|
||||
if [ -z "$TT_MICROARCH" ]; then
|
||||
case "$TT_ARCH" in
|
||||
"x86_64") TT_MICROARCH="skylake";;
|
||||
*)
|
||||
echo "TT_MICROARCH not defined for $TT_ARCH"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Apply TT_MICROARCH to CFLAGS/CXXFLAGS
|
||||
CFLAGS="-march=$TT_MICROARCH $CFLAGS"
|
||||
CXXFLAGS="-march=$TT_MICROARCH $CXXFLAGS"
|
||||
|
||||
# Last, but certainly not least, let's define where we want the build to
|
||||
# occur and where to put the artifacts. ~ahill
|
||||
TT_BUILDDIR="$TT_DIR/sources/$SRC_NAME/$SRC_VERSION/$TT_MICROARCH"
|
||||
TT_INSTALLDIR="$TT_BUILDDIR/install"
|
||||
TT_PACKAGE="$TT_PKGDIR/$TT_MICROARCH/$SRC_NAME-$SRC_FULLVERSION-$TT_MICROARCH.cpio.xz"
|
||||
|
||||
# Create convenience variables
|
||||
TT_AUTOCONF_COMMON=$(echo "--bindir=$TT_BINDIR \
|
||||
--build=$TT_BUILD \
|
||||
--datarootdir=$TT_DATADIR \
|
||||
--includedir=$TT_INCLUDEDIR \
|
||||
--libdir=$TT_LIBDIR \
|
||||
--libexecdir=$TT_LIBDIR \
|
||||
--localstatedir=$TT_STATEDIR \
|
||||
--prefix=$TT_PREFIX \
|
||||
--runstatedir=$TT_RUNDIR \
|
||||
--sbindir=$TT_BINDIR \
|
||||
--sysconfdir=$TT_CONFDIR \
|
||||
--with-sysroot=$TT_SYSROOT" | xargs)
|
||||
|
||||
# NOTE: Some versions of autoconf does not like having host/target set
|
||||
# unless we're actually cross-compiling.
|
||||
if [ ! "$TT_BUILD" = "$TT_TARGET" ]; then
|
||||
TT_AUTOCONF_COMMON=$(echo "$TT_AUTOCONF_COMMON \
|
||||
--host=$TT_TARGET \
|
||||
--target=$TT_TARGET" | xargs)
|
||||
fi
|
||||
|
||||
# TODO: What should CMAKE_INSTALL_SHAREDSTATEDIR be? ~ahill
|
||||
# NOTE: TT_INSTALLDIR is used here because CMake treats / as a special case
|
||||
# and sets the prefix to /usr anyways, completely defeating the point
|
||||
# of setting it to / to begin with. ~ahill
|
||||
# See also: https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html#special-cases
|
||||
TT_CMAKE_COMMON=$(echo "-DCMAKE_ASM_COMPILER_TARGET=$TT_TARGET \
|
||||
-DCMAKE_C_COMPILER_TARGET=$TT_TARGET \
|
||||
-DCMAKE_CXX_COMPILER_TARGET=$TT_TARGET \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_BINDIR=$TT_INSTALLDIR$TT_BINDIR \
|
||||
-DCMAKE_INSTALL_DATAROOTDIR=$TT_INSTALLDIR$TT_DATADIR \
|
||||
-DCMAKE_INSTALL_INCLUDEDIR=$TT_INSTALLDIR$TT_INCLUDEDIR \
|
||||
-DCMAKE_INSTALL_LIBDIR=$TT_INSTALLDIR$TT_LIBDIR \
|
||||
-DCMAKE_INSTALL_LIBEXECDIR=$TT_INSTALLDIR$TT_LIBDIR \
|
||||
-DCMAKE_INSTALL_LOCALSTATEDIR=$TT_INSTALLDIR$TT_STATEDIR \
|
||||
-DCMAKE_INSTALL_PREFIX=$TT_INSTALLDIR$TT_PREFIX \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR=$TT_INSTALLDIR$TT_RUNDIR \
|
||||
-DCMAKE_INSTALL_SBINDIR=$TT_INSTALLDIR$TT_BINDIR \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=$TT_INSTALLDIR$TT_CONFDIR" | xargs)
|
||||
|
||||
# NOTE: CMake doesn't like having a space in CC and CXX, so we manually
|
||||
# define a few things if CCACHE is set. ~ahill
|
||||
if [ ! -z "$CCACHE" ]; then
|
||||
TT_CMAKE_COMMON=$(echo "$TT_CMAKE_COMMON \
|
||||
-DCMAKE_C_COMPILER=$(echo $CC | cut -d" " -f2) \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=$CCACHE \
|
||||
-DCMAKE_CXX_COMPILER=$(echo $CXX | cut -d" " -f2)
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=$CCACHE" | xargs)
|
||||
fi
|
||||
|
||||
TT_MESON_COMMON=$(echo "-Dbindir=$TT_BINDIR \
|
||||
-Ddatadir=$TT_DATADIR \
|
||||
-Dincludedir=$TT_INCLUDEDIR \
|
||||
-Dinfodir=$TT_DATADIR/info \
|
||||
-Dlibdir=$TT_LIBDIR \
|
||||
-Dlibexecdir=$TT_LIBDIR \
|
||||
-Dlocaledir=$TT_DATADIR/locale \
|
||||
-Dlocalstatedir=$TT_STATEDIR \
|
||||
-Dmandir=$TT_DATADIR/man \
|
||||
-Dprefix=$TT_PREFIX \
|
||||
-Dsbindir=$TT_BINDIR \
|
||||
-Dsysconfdir=$TT_CONFDIR" | xargs)
|
||||
|
||||
true
|
||||
}
|
||||
|
||||
###############
|
||||
# Subcommands #
|
||||
###############
|
||||
|
||||
# Installs a package to the sysroot
|
||||
package_install() {
|
||||
[ ! -z "$2" ] && TT_SYSROOT=$2
|
||||
package_check $1 $TT_SYSROOT
|
||||
echo -n "Installing $(basename $1)... "
|
||||
PUSHD=$(pwd)
|
||||
cd $TT_SYSROOT
|
||||
bsdcpio -iJ < $PKG_FULLPATH
|
||||
cd $PUSHD
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Uninstalls a package from the sysroot
|
||||
package_uninstall() {
|
||||
[ ! -z "$2" ] && TT_SYSROOT=$2
|
||||
package_check $1 $TT_SYSROOT
|
||||
echo -n "Uninstalling $(basename $1)... "
|
||||
PUSHD=$(pwd)
|
||||
cd $TT_SYSROOT
|
||||
bsdcpio -iJt < $PKG_FULLPATH | tail -n +2 | sort -r | while read path; do
|
||||
if [ -d "$path" ]; then
|
||||
rmdir --ignore-fail-on-non-empty "$path"
|
||||
else
|
||||
rm -f "$path"
|
||||
fi
|
||||
done
|
||||
cd $PUSHD
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Builds the source from the previously fetched tarball
|
||||
source_build() {
|
||||
source_spec $1
|
||||
if [ -f "$TT_PACKAGE" ]; then
|
||||
echo "Skipping build for $SRC_NAME $SRC_FULLVERSION"
|
||||
exit 0
|
||||
fi
|
||||
mkdir -p $TT_BUILDDIR
|
||||
mkdir -p $TT_INSTALLDIR
|
||||
if [ ! -z "$SRC_PATCHES" ]; then
|
||||
echo -n "Validating patches for $SRC_NAME $SRC_FULLVERSION... "
|
||||
cd $(dirname $1)
|
||||
echo $SRC_PATCHES | sha256sum -c - > /dev/null
|
||||
# Is this even the right way to check a return value? ~ahill
|
||||
if [ ! "$?" = "0" ]; then
|
||||
echo "Failed to validate patches for $SRC_NAME $SRC_FULLVERSION for $TT_MICROARCH ($TT_TARGET)"
|
||||
exit 1
|
||||
fi
|
||||
echo $SRC_PATCHES | while read line; do
|
||||
cp $(echo $line | cut -d" " -f2) $TT_BUILDDIR/
|
||||
done
|
||||
echo "Done!"
|
||||
fi
|
||||
echo -n "Building $SRC_NAME $SRC_FULLVERSION for $TT_MICROARCH... "
|
||||
PUSHD=$(pwd)
|
||||
cd $TT_BUILDDIR
|
||||
# Please don't use this in your build script. This is meant for
|
||||
# troubleshooting purposes. ~ahill
|
||||
TT_BUILD_LOG=$TT_BUILDDIR/build-$(date +%Y%m%d%H%M%S).log
|
||||
echo "Build started with treetap $TT_VERSION at $(date)" > $TT_BUILD_LOG
|
||||
build >> $TT_BUILD_LOG 2>&1
|
||||
echo "Build finished at $(date)" >> $TT_BUILD_LOG
|
||||
echo "Done!"
|
||||
cd $TT_INSTALLDIR
|
||||
echo -n "Archiving $SRC_NAME $SRC_FULLVERSION for $TT_MICROARCH... "
|
||||
mkdir -p $TT_PKGDIR/$TT_MICROARCH
|
||||
find | bsdcpio -Jo > $TT_PACKAGE
|
||||
rm -rf $TT_INSTALLDIR
|
||||
echo "Done!"
|
||||
cd $PUSHD
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Fetches and verifies the integrity of the source tarball
|
||||
source_fetch() {
|
||||
source_spec $1
|
||||
mkdir -p $TT_BUILDDIR
|
||||
PUSHD=$(pwd)
|
||||
cd $TT_BUILDDIR/..
|
||||
if [ -f $SRC_FILENAME ]; then
|
||||
if (echo "$SRC_HASH $SRC_FILENAME" | sha256sum -c - > /dev/null); then
|
||||
echo "Skipping $SRC_FILENAME"
|
||||
exit 0
|
||||
else
|
||||
rm -f $SRC_FILENAME
|
||||
fi
|
||||
fi
|
||||
echo -n "Fetching $SRC_FILENAME... "
|
||||
wget -O $SRC_FILENAME $SRC_URL
|
||||
echo "Done!"
|
||||
echo -n "Verifying $SRC_FILENAME... "
|
||||
echo "$SRC_HASH $SRC_FILENAME" | sha256sum -c - > /dev/null
|
||||
cd $PUSHD
|
||||
echo "Done!"
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Purges the entire build directory for a source
|
||||
source_clean() {
|
||||
source_spec $1
|
||||
rm -rf $TT_BUILDDIR
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Prints a variable defined by treetap
|
||||
source_variable() {
|
||||
source_spec $1
|
||||
[ -z "$2" ] && (echo "source_variable: Variable name not given"; exit 1)
|
||||
eval "echo \${$2}"
|
||||
exit 0
|
||||
}
|
||||
|
||||
###############
|
||||
# Entry Point #
|
||||
###############
|
||||
|
||||
case "$1" in
|
||||
"build") source_build $2 ;;
|
||||
"clean") source_clean $2 ;;
|
||||
"fetch") source_fetch $2 ;;
|
||||
"install") package_install $2 $3 ;;
|
||||
"uninstall") package_uninstall $2 $3 ;;
|
||||
"variable") source_variable $2 $3 ;;
|
||||
*) help_message ;;
|
||||
esac
|
||||
144
sources.list
144
sources.list
@ -1,144 +0,0 @@
|
||||
ba885c1319578d6c94d46e9b0dceb4014caafe2490e437a0dbca3f270a223f5a,https://ftpmirror.gnu.org/gnu/autoconf/autoconf-2.72.tar.xz,
|
||||
168aa363278351b89af56684448f525a5bce5079d0b6842bd910fdd3f1646887,https://ftpmirror.gnu.org/gnu/automake/automake-1.18.1.tar.xz,
|
||||
0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d,https://files.pythonhosted.org/packages/7d/6b/d52e42361e1aa00709585ecc30b3f9684b3ab62530771402248b1b1d6240/babel-2.17.0.tar.gz,
|
||||
ae470fec429775653e042015edc928d07c8c3b2fc59765172a330d3d87785f86,https://ftpmirror.gnu.org/gnu/bc/bc-1.08.2.tar.gz,
|
||||
9bba0214ccf7f1079c5d59210045227bcf619519840ebfa80cd3849cff5a5bf2,https://ftpmirror.gnu.org/gnu/bison/bison-3.8.2.tar.xz,
|
||||
698edd0ea270bde950f53aed21f3a0135672206f3911e0176261a31e0e07b397,https://files.pythonhosted.org/packages/25/1c/23e33405a7c9eac261dff640926b8b5adaed6a6eb3e1767d441ed611d0c0/build-1.3.0.tar.gz,
|
||||
ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269,https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz,
|
||||
445ed8208a6e4823de1226a74ca319d3600e83f6369f99b14265006599c32ccb,https://cairographics.org/releases/cairo-1.18.4.tar.xz,
|
||||
33ea8eb2a4daeaa506e8fcafd5d6d89027ed6f2f0609645c6f149b560d301706,https://chrony-project.org/releases/chrony-4.8.tar.gz,
|
||||
ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a,https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz,
|
||||
b29f6f19733aa224b7763507a108a427ed48c688e1faf22b29c44e1c30549282,https://github.com/Kitware/CMake/releases/download/v4.1.1/cmake-4.1.1.tar.gz,
|
||||
e8bb26ad0293f9b5a1fc43fb42ba970e312c66ce92c1b0b16713d7500db251bf,https://ftpmirror.gnu.org/gnu/coreutils/coreutils-9.7.tar.xz,
|
||||
937610b97c329a1ec9268553fb780037bcfff0dcffe9725ebc4fd9c1aa9075db,https://ftpmirror.gnu.org/gnu/cpio/cpio-2.15.tar.bz2,
|
||||
6cd0a8a5b126ddfda61c94dc2c3fc53481ba7a35461cf7c5ab66aa9d6775b609,https://curl.se/download/curl-8.15.0.tar.xz,
|
||||
845fd61702ae5e53e09664faa450da82805958924b109b8c5b4777bd8551af00,https://salsa.debian.org/debian/dash/-/archive/debian/0.5.12-12/dash-debian-0.5.12-12.tar.gz,
|
||||
6721e606609226dbf4d864a78802a9e96beec0ee034a1bd84138b3e037bba7d9,https://github.com/NetworkConfiguration/dhcpcd/releases/download/v10.2.4/dhcpcd-10.2.4.tar.xz,
|
||||
7c8b7f9fc8609141fdea9cece85249d308624391ff61dedaf528fcb337727dfd,https://ftpmirror.gnu.org/gnu/diffutils/diffutils-3.12.tar.xz,
|
||||
64926eebf90092dca21b14259a5301b7b98e7b1943e8a201c7d726084809b527,https://github.com/dosfstools/dosfstools/releases/download/v4.2/dosfstools-4.2.tar.gz,
|
||||
93ebe1294ee3203d3bf548c78d51bde9494d3f24de64eaec380a2620f0431f20,https://github.com/mkj/dropbear/archive/refs/tags/DROPBEAR_2025.88.tar.gz,dropbear-2025.88.tar.gz
|
||||
354552544b8f99012e5062f7d570ec77f14b412a3ff5c7d8d0dae62c0d217c30,https://github.com/libexpat/libexpat/releases/download/R_2_7_1/expat-2.7.1.tar.xz,
|
||||
1387e0b67ff247d2abde998f90dfbf70c1491391a59ddfecb8ae698789f0a4f5,https://ftpmirror.gnu.org/gnu/findutils/findutils-4.10.0.tar.xz,
|
||||
1b1cde5b235d40479e91be2f0e88a309e3214c8ab470ec8a2744d82a5a9ea05c,https://github.com/fribidi/fribidi/releases/download/v1.0.16/fribidi-1.0.16.tar.xz,
|
||||
e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995,https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz,
|
||||
18f63100d6f94385c6ed57a72073443e1a71a4acb4339491615d0f16d6ff01b2,https://files.pythonhosted.org/packages/69/59/b6fc2188dfc7ea4f936cd12b49d707f66a1cb7a1d2c16172963534db741b/flit_core-3.12.0.tar.gz,
|
||||
f0129159515c13ebe53ba2a6a94755e98c266470e844ee0aacc6196fd62b44f0,https://gitlab.freedesktop.org/xorg/font/util/-/archive/font-util-1.4.1/util-font-util-1.4.1.tar.gz,
|
||||
82e73b26adad651b236e5f5d4b3074daf8ff0910188808496326bd3449e5261d,https://gitlab.freedesktop.org/fontconfig/fontconfig/-/archive/2.17.1/fontconfig-2.17.1.tar.gz,
|
||||
0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289,https://download.savannah.gnu.org/releases/freetype/freetype-2.13.3.tar.xz,
|
||||
f8c3486509de705192138b00ef2c00bbbdd0e84c30d5c07d23fc73a9dc4cc9cc,https://ftpmirror.gnu.org/gnu/gawk/gawk-5.3.2.tar.xz,
|
||||
9f3d0739bb02ce0e67872f2b54355017da622e7fb0dbeda998d46863f80dc3c2,https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/archive/2.43.5/gdk-pixbuf-2.43.5.tar.gz,
|
||||
d1fb86e260cfe7da6031f94d2e44c0da55903dbae0a2fa0fae78c91ae1b56f00,https://ftp.gnu.org/pub/gnu/gettext/gettext-0.26.tar.xz,
|
||||
3524fc5fd81f16f80e1696a8281bd8ad831048b67848015d7b7382bf365ae685,https://github.com/git/git/archive/refs/tags/v2.51.0.tar.gz,git-2.51.0.tar.gz
|
||||
56aef5791f402fff73a2de0664e573c5d00ef8cb71405eb76b388f44c6d78927,https://gitlab.gnome.org/GNOME/glib/-/archive/2.86.0/glib-2.86.0.tar.gz,
|
||||
b16c78e7604b9be9f546ee35ad8b6db6f39bbbbfb19e8d038b6fe2ea5bba4ff4,https://github.com/KhronosGroup/glslang/archive/refs/tags/15.4.0.tar.gz,glslang-15.4.0.tar.gz
|
||||
a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898,https://gmplib.org/download/gmp/gmp-6.3.0.tar.xz,
|
||||
fd87e0aba7e43ae054837afd6cd4db03a3f2693deb3619085e6ed9d8d9604ad8,https://ftp.gnu.org/pub/gnu/gperf/gperf-3.3.tar.gz,
|
||||
2649b27c0e90e632eadcd757be06c6e9a4f48d941de51e7c0f83ff76408a07b9,https://ftpmirror.gnu.org/gnu/grep/grep-3.12.tar.xz,
|
||||
069a00aa1fc893f18423602f4e095583be5a220429f6e8a58d70511490b4b019,https://gitlab.gnome.org/GNOME/gvdb/-/archive/2b42fc75f09dbe1cd1057580b5782b08f2dcb400/gvdb-2b42fc75f09dbe1cd1057580b5782b08f2dcb400.tar.gz,
|
||||
01a7b881bd220bfdf615f97b8718f80bdfd3f6add385b993dcf6efd14e8c0ac6,https://ftpmirror.gnu.org/gnu/gzip/gzip-1.14.tar.xz,
|
||||
0f052eb4ab01d8bae98ba971c954becb32be57d7250f18af343b1d27892e03fa,https://github.com/harfbuzz/harfbuzz/releases/download/11.4.5/harfbuzz-11.4.5.tar.xz,
|
||||
d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000,https://files.pythonhosted.org/packages/76/66/650a33bd90f786193e4de4b3ad86ea60b53c89b669a5c7be931fac31cdb0/importlib_metadata-8.7.0.tar.gz,
|
||||
5900ccc15f9ac3bf7b7eae81deb5937123df35e99347a7f11a22818482f0a8d0,https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-6.16.0.tar.xz,
|
||||
fb3197f17a99eb44d22a3a1a71f755f9622dd963e66acfdea1a45120951b02ed,https://www.kernel.org/pub/linux/utils/kbd/kbd-2.9.0.tar.xz,
|
||||
5a5d5073070cc7e0c7a7a3c6ec2a0e1780850c8b47b3e3892226b93ffcb9cb54,https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-34.2.tar.xz,
|
||||
19f917d42d530f98815ac824d90c7eaf648e9d9a50e4f309c812457ffa5496b5,https://libarchive.org/downloads/libarchive-3.8.1.tar.xz,
|
||||
b88cc9163d0c652aaf39a99991d974ddba1c3a9711db8f1b5838af2a14731014,https://libbsd.freedesktop.org/releases/libbsd-0.12.2.tar.xz,
|
||||
629da4ab29900d0f7fcc36227073743119925fd711c99a1689bbf5c9b40c8e6f,https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.76.tar.xz,
|
||||
d4bae92797a50f81a93524762e0410a49cd84cfa0f997795bc0172ac8fb1d96a,https://dri.freedesktop.org/libdrm/libdrm-2.4.125.tar.xz,
|
||||
6253395679c2bb2156d926b3d8b7e3b2bbeb40a56d2bea29e1c73e40ed9de4ba,https://github.com/arachsys/libelf/archive/refs/tags/v0.193.tar.gz,libelf-0.193.tar.gz
|
||||
0cfa48d1dddac26988ae9ce16282eff97683f1adcd3f5d4312f86d714565d890,https://gitlab.freedesktop.org/libevdev/libevdev/-/archive/libevdev-1.13.4/libevdev-libevdev-1.13.4.tar.gz,
|
||||
31dc201284fb5d2bec60b2ceee3126b5cf633c3de74151be44817890e8e7c581,https://gitlab.freedesktop.org/xorg/lib/libfontenc/-/archive/libfontenc-1.1.8/libfontenc-libfontenc-1.1.8.tar.gz,
|
||||
f3a3082a23b37c293a4fcd1053147b371f2ff91fa7ea1b2a52e335676bac82dc,https://github.com/libffi/libffi/releases/download/v3.5.2/libffi-3.5.2.tar.gz,
|
||||
7caf26a2202a4ca689df3fe4175dfa74e0faa18fcca07331bba934fd0ecb8f12,https://github.com/benhoyt/inih/archive/refs/tags/r61.tar.gz,libinih-r61.tar.gz
|
||||
98bb615d98ddc4607bddb13a7b7550d129eb8cd16f86cd5ca090207bc46b488b,https://gitlab.freedesktop.org/libinput/libinput/-/archive/1.29.1/libinput-1.29.1.tar.gz,
|
||||
8f0012234b464ce50890c490f18194f913a7b1f4e6a03d6644179fa0f867d0cf,https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.1.2/libjpeg-turbo-3.1.2.tar.gz,
|
||||
1bd6aa42275313af3141c7cf2e5b964e8b1fd488025caf2f971f43b00776b332,https://libbsd.freedesktop.org/releases/libmd-1.1.0.tar.xz,
|
||||
274b9b919ef3152bfb3da3a13c950dd60d6e2bcd54230ffeca298d03b40d0525,https://www.netfilter.org/pub/libmnl/libmnl-1.0.5.tar.bz2,
|
||||
0f4be47a8bb8b77a350ee58cbd4b5fae6260ad486a527706ab15cfe1dd55a3c4,https://www.netfilter.org/pub/libnftnl/libnftnl-1.3.0.tar.xz,
|
||||
a395317730e0e8d5e71419d4d1256a89e32c2fa793607b63c4d0fb497ae34602,https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/archive/libpciaccess-0.18.1/libpciaccess-libpciaccess-0.18.1.tar.gz,
|
||||
4df396518620a7aa3651443e87d1b2862e4e88cad135a8b93423e01706232307,https://download.sourceforge.net/libpng/libpng-1.6.50.tar.xz,
|
||||
0f71c16bd34bdaaccdcb96a5d94a4921bfb612ec6e0eba7a80d8854eefd8bb61,https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-4.1.0.tar.gz,
|
||||
f81f5860666b0bc7d84baddefa60d1cb9fa6fceb2398cc3baca6afaa60266675,https://ftpmirror.gnu.org/gnu/libtool/libtool-2.5.4.tar.xz,
|
||||
0bd89b657d62d019598e6c7ed726ff8fed80e8ba092a83b484d66afb80b77da5,https://github.com/illiliti/libudev-zero/archive/refs/tags/1.0.3.tar.gz,libudev-zero-1.0.3.tar.gz
|
||||
ea97bead1e8721d9002055970e8ad64ef79ee9dcee8595a3dae2cf5c2192a47f,https://gitlab.freedesktop.org/xorg/lib/libx11/-/archive/libX11-1.8.12/libx11-libX11-1.8.12.tar.gz,
|
||||
af261cc1b3b349cfe7a7899a48b4e4aa257b4d11bf2ea084fb3191df7d15fbe9,https://gitlab.freedesktop.org/xorg/lib/libxau/-/archive/libXau-1.0.12/libxau-libXau-1.0.12.tar.gz,
|
||||
113a6f8f614e037ff03cad218cdcbfe307dfc9d909a842b17276a694476ed639,https://gitlab.freedesktop.org/xorg/lib/libxcb/-/archive/libxcb-1.17.0/libxcb-libxcb-1.17.0.tar.gz,
|
||||
5edaa65f5abd94ae12030b52fda66828eb8a41396aa9c02fd2c6210445fff61e,https://gitlab.freedesktop.org/xorg/lib/libxcvt/-/archive/libxcvt-0.1.3/libxcvt-libxcvt-0.1.3.tar.gz,
|
||||
f5e93a7191e4ea2f43482e9c8470c5320e1bb7ee0070b72f97ad2d1141833cd4,https://gitlab.freedesktop.org/xorg/lib/libxdmcp/-/archive/libXdmcp-1.1.5/libxdmcp-libXdmcp-1.1.5.tar.gz,
|
||||
4e48ea271b5f53c3386018a6e0263454fe582a413fce0273ade601fbfe9e0c72,https://gitlab.freedesktop.org/xorg/lib/libxext/-/archive/libXext-1.3.6/libxext-libXext-1.3.6.tar.gz,
|
||||
1e7dfe2dd0eb2528fc21c2b1db64443b0f41e2ac623809939be6b4008c42ef5a,https://gitlab.freedesktop.org/xorg/lib/libxfixes/-/archive/libXfixes-6.0.2/libxfixes-libXfixes-6.0.2.tar.gz,
|
||||
fb0fab7745c4670cd3c49b0cd3965494a6bee3778f36a0385a3265e803fe4d70,https://gitlab.freedesktop.org/xorg/lib/libxfont/-/archive/libXfont2-2.0.7/libxfont-libXfont2-2.0.7.tar.gz,
|
||||
f033ea2b78d2b8f6c6fc4028aeace48f8d1b59d881d602a1d9418da69cc50200,https://gitlab.freedesktop.org/xorg/lib/libxkbfile/-/archive/libxkbfile-1.1.3/libxkbfile-libxkbfile-1.1.3.tar.gz,
|
||||
54968c8ab8723c2d75a38fc45810e8cf60d44991e0887661bf9905a4042ad108,https://gitlab.gnome.org/GNOME/libxml2/-/archive/v2.14.5/libxml2-v2.14.5.tar.gz,
|
||||
a1909cbe9ded94187b6420ae8c347153f8278955265cb80a64cdae5501433396,https://gitlab.freedesktop.org/xorg/lib/libxrandr/-/archive/libXrandr-1.5.4/libxrandr-libXrandr-1.5.4.tar.gz,
|
||||
470559df9e0e4dbc81d5855d3d364a17e12263600a08217232f8b1f6ef3cddbf,https://gitlab.freedesktop.org/xorg/lib/libxrender/-/archive/libXrender-0.9.12/libxrender-libXrender-0.9.12.tar.gz,
|
||||
61b90057e1cb1ec4688b2fd223f5008d637ab5a5e476ef3727543bb449c87697,https://gitlab.freedesktop.org/xorg/lib/libxshmfence/-/archive/libxshmfence-1.3.3/libxshmfence-libxshmfence-1.3.3.tar.gz,
|
||||
6def23c86de6ff72030b9971ed6ddec24ba9b47344237ab7b5abeb2f044c3332,https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/archive/xtrans-1.6.0/libxtrans-xtrans-1.6.0.tar.gz,
|
||||
a23745e7865f4aa2ee2610f289ed8081140580cbe577b46aa1a7fb28ab7192cf,https://gitlab.freedesktop.org/xorg/lib/libxxf86vm/-/archive/libXxf86vm-1.1.6/libxxf86vm-libXxf86vm-1.1.6.tar.gz,
|
||||
60e4f02f10f0c13249293471e1a95343865cfec63826a7e89d29f0ee34c03eaa,https://codeberg.org/Limine/Limine/releases/download/v9.6.6/limine-9.6.6.tar.xz,
|
||||
0e1a946741db288a40361ad04ff38fe04bf0819834b8abb84c4b535fed9ba4ef,https://files.pythonhosted.org/packages/ba/85/50f030e20ca64562ac8fd36b65338c4da626739afd49200936f3d99a6047/lingua-4.15.0.tar.gz,
|
||||
76bffbae7eab2a1de1ed05692bef709f43b02a52fe95ae655cacf0fa252213f3,https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.16.5.tar.xz,
|
||||
21dbcec6e01dd578f14789eac9024a18941e6f2702a05cf91b28c232eeb26ab0,https://github.com/linux-pam/linux-pam/releases/download/v1.7.1/Linux-PAM-1.7.1.tar.xz,
|
||||
1672e3efb4c2affd62dbbe12ea898b28a451416c7d95c1bd0190c26cbe878825,https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.0/llvm-project-21.1.0.src.tar.xz,
|
||||
e236ea3a1ccf5f6c270b1c4bb60726f371fa49459a8eaaebc90b216b328daf2b,https://ftpmirror.gnu.org/gnu/m4/m4-1.4.20.tar.xz,
|
||||
dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3,https://ftpmirror.gnu.org/gnu/make/make-4.4.1.tar.gz,
|
||||
99579a6f39583fa7e5630a28c3c1f440e4e97a414b80372649c0ce338da2ea28,https://files.pythonhosted.org/packages/9e/38/bd5b78a920a64d708fe6bc8e0a2c075e1389d53bef8413725c63ba041535/mako-1.3.10.tar.gz,
|
||||
ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0,https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz,
|
||||
ec966eec39879f33c785343373021c44f887c836a08fcaf1d63412e3bdbfca32,https://skarnet.org/software/mdevd/mdevd-0.1.7.0.tar.gz,
|
||||
8765bd25f7c3e61d7e963a7b2d312f743361d3187d3e3e6c0ade8e999d4b07bc,https://gitlab.freedesktop.org/mesa/mesa/-/archive/mesa-25.2.2/mesa-mesa-25.2.2.tar.gz,
|
||||
a55bd02a9af4dd266c0042ec608744fff3a017577614c057da09f1f4566ea32c,https://bitmath.se/org/code/mtdev/mtdev-1.1.7.tar.gz,
|
||||
565c1b6e1e58f7e90d8813fda0e2102df69fb493ddab4cf6a84ce3647466bee5,https://git.sr.ht/~lattis/muon/archive/0.5.0.tar.gz,muon-0.5.0.tar.gz
|
||||
a9a118bbe84d8764da0ea0d28b3ab3fae8477fc7e4085d90102b8596fc7c75e4,https://musl.libc.org/releases/musl-1.2.5.tar.gz,
|
||||
f7abfbf0eed5f573ab51bd77a458f32d82f9859c55e9689f819d96fe1437a619,https://nano-editor.org/dist/v8/nano-8.6.tar.xz,
|
||||
1412a1c760bbd05db026b6c0d1657affd6631cd0a63cddb6f73cc6d4aa616148,https://nasm.us/pub/nasm/releasebuilds/2.16.03/nasm-2.16.03.tar.xz,
|
||||
97fc51ac2b085d4cde31ef4d2c3122c21abc217e9090a43a30fc5ec21684e059,https://invisible-island.net/datafiles/release/ncurses.tar.gz,ncurses-6.3.tar.gz
|
||||
1daf10f322e14fd90a017538aaf2c034d7cc1eb1cc418ded47445d714ea168d4,https://www.netfilter.org/pub/nftables/nftables-1.1.5.tar.xz,
|
||||
af95c2527cdf5d953d544140d5e60b46a29c5c3259672f5839153158e3bdd112,https://codeload.github.com/OpenRC/openrc/tar.gz/refs/tags/0.62.8,openrc-0.62.8.tar.gz
|
||||
d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f,https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz,
|
||||
1b2e2f683dfb5adec3faf17087ade8c648f10a5d3d0e17e421e0ac1a39e6740e,https://gitlab.gnome.org/GNOME/pango/-/archive/1.57.0/pango-1.57.0.tar.gz,
|
||||
f87cee69eec2b4fcbf60a396b030ad6aa3415f192aa5f7ee84cad5e11f7f5ae3,https://ftpmirror.gnu.org/gnu/patch/patch-2.8.tar.xz,
|
||||
8d28d7f2c3b970c3a4bf3776bcbb5adfc923183ce74bc8df1ebaad8c1985bd07,https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.46/pcre2-10.46.tar.gz,
|
||||
e093ef184d7f9a1b9797e2465296f55510adb6dab8842b0c3ed53329663096dc,https://www.cpan.org/src/5.0/perl-5.42.0.tar.gz,
|
||||
a098c33924754ad43f981b740f6d576c70f9ed1006e12221b1845431ebce1239,https://cairographics.org/releases/pixman-0.46.4.tar.xz,
|
||||
cd05c9589b9f86ecf044c10a2269822bc9eb001eced2582cfffd658b0a50c243,https://distfiles.ariadne.space/pkgconf/pkgconf-2.5.1.tar.xz,
|
||||
f3ef94aefed6e183e342a8a269ae1fc4742ba193186ad76f175938621dbfc26b,https://files.pythonhosted.org/packages/10/9a/79b1067d27e38ddf84fe7da6ec516f1743f31f752c6122193e7bce38bdbf/polib-1.2.0.tar.gz,
|
||||
c2e6d193cc78f84cd6ddb72aaf6d5c6a9162f0470e5992092057f5ff518562fa,https://gigenet.dl.sourceforge.net/project/procps-ng/Production/procps-ng-4.0.5.tar.xz,
|
||||
1e859bd5c40fae9448642dd871adf459e5e2084186e8d2c2a79a824c970da1f8,https://files.pythonhosted.org/packages/e7/82/28175b2414effca1cdac8dc99f76d660e7a4fb0ceefa4b4ab8f5f6742925/pyproject_hooks-1.2.0.tar.gz,
|
||||
61a42919e13d539f7673cf11d1c404380e28e540510860b9d242196e165709c9,https://www.python.org/ftp/python/3.9.23/Python-3.9.23.tar.xz,
|
||||
70d4739585a7008f37bf4933c013fdb327b8878a5a69fcbb3316c88882f0f49b,https://files.pythonhosted.org/packages/d7/7d/60976d532519c3a0b41e06a59ad60949e2be1af937cf02738fec91bfd808/pytest-runner-6.0.1.tar.gz,
|
||||
d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e,https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz,
|
||||
3b8cf51548dfc49b7efe035e191ff5e1963ebc4fe8f6064a5eefc5343eaf78a5,https://github.com/michaelforney/samurai/releases/download/1.2/samurai-1.2.tar.gz,
|
||||
6e226b732e1cd739464ad6862bd1a1aba42d7982922da7a53519631d24975181,https://ftpmirror.gnu.org/gnu/sed/sed-4.9.tar.xz,
|
||||
f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c,https://files.pythonhosted.org/packages/18/5d/3bf57dcd21979b887f014ea83c24ae194cfcd12b9e0fda66b957c69d1fca/setuptools-80.9.0.tar.gz,
|
||||
6662c9b9497b6c9bf13bead9d7a9084756f68238302c5ed089fb4dbd29d102d7,https://files.pythonhosted.org/packages/8f/8d/ffdcace33d0480d591057a30285b7c33f8dc431fed3fff7dbadf5f9f128f/setuptools_scm-9.2.0.tar.gz,
|
||||
add4604d3bc410344433122a819ee4154b79dd8316a56298c60417e637c07608,https://github.com/shadow-maint/shadow/releases/download/4.18.0/shadow-4.18.0.tar.xz,
|
||||
531291d0387eb94e16e775d7e73788d06d2b2fdd8cd2ac6b6b15287593b6a2de,https://gitlab.freedesktop.org/xdg/shared-mime-info/-/archive/2.4/shared-mime-info-2.4.tar.gz,
|
||||
0e626261848cc920738f92fd50a24c14b21e30306dfed97b8435369f4bae00a5,https://skarnet.org/software/skalibs/skalibs-2.14.4.0.tar.gz,
|
||||
878fb5ab705442070e4dd1929bb5e2249511c0bcf2b0eeacf3bcd80875c82eff,https://files.pythonhosted.org/packages/85/ad/430fb60d90e1d112a62ff57bdd1f286ec73a2a0331272febfddd21f330e1/StrEnum-0.4.15.tar.gz,
|
||||
5bbea925663d4cd2bab23efad53874f2718248a73dcaf9dd21dff8cb48e602fc,https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/vulkan-sdk-1.4.321.0.tar.gz,SPIRV-Headers-vulkan-sdk-1.4.321.0.tar.gz
|
||||
4f7019a06c731daebbc18080db338964002493ead4cfb440fef95d120c50a170,https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/v21.1.0.tar.gz,spirv-llvm-translator-21.1.0.tar.gz
|
||||
6a9313fa68e061d463f616357cd24cdf1c3a27d906ea791d7ba67dd1b6666a40,https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/v2025.1.tar.gz,spirv-tools-2025.1.tar.gz
|
||||
4d62ff37342ec7aed748535323930c7cf94acf71c3591882b26a7ea50f3edc16,https://ftpmirror.gnu.org/gnu/tar/tar-1.35.tar.xz,
|
||||
273a0a73b1f0bed640afee4a5df0337357ced5b53d3d5d1c405b936501f71017,https://download.osgeo.org/libtiff/tiff-4.7.0.tar.xz,
|
||||
6ee152cfb083a378285a49c8e52294307458119147f795bfb7f460cb7ed1d659,https://github.com/illiliti/tinyramfs/archive/refs/tags/0.2.0.tar.gz,tinyramfs-0.2.0.tar.gz
|
||||
cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff,https://files.pythonhosted.org/packages/18/87/302344fed471e44a87289cf4967697d07e532f2421fdaf868a303cbae4ff/tomli-2.2.1.tar.gz,
|
||||
0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466,https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz,
|
||||
26687ec84e3e114759454c884a08abeaf79dec09b041895ddf4c45ec150acb6d,https://lttng.org/files/urcu/userspace-rcu-0.15.3.tar.bz2,
|
||||
be9ad9a276f4305ab7dd2f5225c8be1ff54352f565ff4dede9628c1aaa7dec57,https://www.kernel.org/pub/linux/utils/util-linux/v2.41/util-linux-2.41.1.tar.xz,
|
||||
beac7e00e5996bd0c9d9bd8cf62704583b22dbe8613bd768626b95fcac955744,https://gitlab.freedesktop.org/xorg/util/macros/-/archive/util-macros-1.20.2/macros-util-macros-1.20.2.tar.gz,
|
||||
661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729,https://files.pythonhosted.org/packages/8a/98/2d9906746cdc6a6ef809ae6338005b3f21bb568bea3165cfc6a243fdc25c/wheel-0.45.1.tar.gz,
|
||||
479447448281cfb6585ad780f23bd75311af20daf344fb9209c8a87ea77e296a,https://gitlab.freedesktop.org/xorg/proto/xcbproto/-/archive/xcb-proto-1.17.0/xcbproto-xcb-proto-1.17.0.tar.gz,
|
||||
7b56592b339d47809cbefb9f46721705c662de1a001bc773d335975cd2eba34f,https://gitlab.freedesktop.org/xorg/lib/libxcb-util/-/archive/xcb-util-0.4.1/libxcb-util-xcb-util-0.4.1.tar.gz,
|
||||
c1b792306874c36b535413a33edc71a0ac46e78adcf6ddb1a34090a07393d717,https://gitlab.freedesktop.org/xorg/lib/libxcb-wm/-/archive/xcb-util-wm-0.4.2/libxcb-wm-xcb-util-wm-0.4.2.tar.gz,
|
||||
dd18aece9b4e99e6b3d4d9d436cf0645ea31d11e142da193e8b01c23a8b097b2,https://gitlab.freedesktop.org/xorg/app/xkbcomp/-/archive/xkbcomp-1.4.7/xkbcomp-xkbcomp-1.4.7.tar.gz,
|
||||
9ab49abdae20545c8f215472d8537e0228635b7947d63e02592db24a5025ed6a,https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/archive/xkeyboard-config-2.45/xkeyboard-config-xkeyboard-config-2.45.tar.gz,
|
||||
6389dae32d7d772245fed7c76d3f83cb7ffa88eb447dbb4db8400c2220e42c2a,https://gitlab.freedesktop.org/xorg/util/xcb-util-m4/-/archive/c617eee22ae5c285e79e81ec39ce96862fd3262f/xcb-util-m4-c617eee22ae5c285e79e81ec39ce96862fd3262f.tar.gz,
|
||||
f1be5a443af78307af18103a6bb614021fe163380b0eb43dec820a2389fbd6c8,https://github.com/X11Libre/xf86-input-libinput/archive/refs/tags/xlibre-xf86-input-libinput-1.5.1.0.tar.gz,
|
||||
8a82efea51d363e887f5ea5efadcce201beed5cb344dbac03787fbbbf79c8a0f,https://github.com/X11Libre/xf86-video-vesa/archive/refs/tags/xlibre-xf86-video-vesa-2.6.0.2.tar.gz,
|
||||
fa7ba8c35cb988e7d65b7e7630fe9d0e17e8d79799d3b98db7e19f2b9b150506,https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/xfsprogs-6.16.0.tar.xz,
|
||||
87cd9aaf57ca5b9bc3c83a185ec11bc6e705c0c490219e5407bf94177db9fadf,https://github.com/X11Libre/xserver/archive/refs/tags/xlibre-xserver-25.0.0.11.tar.gz,
|
||||
c92466091663b68d93997eab4f329d0be511cb448a61b61fe74a738f2698b77c,https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/archive/xorgproto-2024.1/xorgproto-xorgproto-2024.1.tar.gz,
|
||||
0b54f79df85912504de0b14aec7971e3f964491af1812d83447005807513cd9e,https://github.com/tukaani-project/xz/releases/download/v5.8.1/xz-5.8.1.tar.xz,
|
||||
a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166,https://files.pythonhosted.org/packages/e3/02/0f2892c661036d50ede074e376733dca2ae7c6eb617489437771209d4180/zipp-3.23.0.tar.gz,
|
||||
9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23,https://www.zlib.net/zlib-1.3.1.tar.gz,
|
||||
9b8d1ecedd5b5e81fbf1918e876752a7dd948e05c1a0dba10ab863842d45acd5,https://www.zsh.org/pub/zsh-5.9.tar.xz,
|
||||
13
sources/autoconf/autoconf.spec
Normal file
13
sources/autoconf/autoconf.spec
Normal file
@ -0,0 +1,13 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="ba885c1319578d6c94d46e9b0dceb4014caafe2490e437a0dbca3f270a223f5a"
|
||||
SRC_NAME="autoconf"
|
||||
SRC_URL="https://ftp.gnu.org/gnu/autoconf/autoconf-2.72.tar.xz"
|
||||
SRC_VERSION="2.72"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd autoconf-*/
|
||||
./configure $TT_AUTOCONF_COMMON
|
||||
make -O -j $TT_PROCS
|
||||
make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
13
sources/automake/automake.spec
Normal file
13
sources/automake/automake.spec
Normal file
@ -0,0 +1,13 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="168aa363278351b89af56684448f525a5bce5079d0b6842bd910fdd3f1646887"
|
||||
SRC_NAME="automake"
|
||||
SRC_URL="https://ftp.gnu.org/gnu/automake/automake-1.18.1.tar.xz"
|
||||
SRC_VERSION="1.18.1"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd automake-*/
|
||||
./configure $TT_AUTOCONF_COMMON
|
||||
make -j $TT_PROCS
|
||||
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
17
sources/bc/bc.spec
Normal file
17
sources/bc/bc.spec
Normal file
@ -0,0 +1,17 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="ae470fec429775653e042015edc928d07c8c3b2fc59765172a330d3d87785f86"
|
||||
SRC_NAME="bc"
|
||||
SRC_URL="https://ftp.gnu.org/gnu/bc/bc-1.08.2.tar.gz"
|
||||
SRC_VERSION="1.08.2"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd bc-$SRC_VERSION/
|
||||
./configure $TT_AUTOCONF_COMMON
|
||||
# NOTE: We are setting MAKEINFO to true here because it is impossible to
|
||||
# build bc without Texinfo otherwise. Texinfo is not used by any other
|
||||
# package on Maple Linux, so it doesn't make sense to include it for
|
||||
# the sole purpose of building bc. ~ahill
|
||||
make -O -j $TT_PROCS MAKEINFO=true
|
||||
make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR MAKEINFO=true
|
||||
}
|
||||
21
sources/byacc/byacc.spec
Normal file
21
sources/byacc/byacc.spec
Normal file
@ -0,0 +1,21 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="192c2fae048d4e7f514ba451627f9c4e612765099f819c19191f9fde3e609673"
|
||||
SRC_NAME="byacc"
|
||||
SRC_URL="https://invisible-mirror.net/archives/byacc/byacc-20241231.tgz"
|
||||
SRC_VERSION="20241231"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd byacc-*/
|
||||
./configure $TT_AUTOCONF_COMMON
|
||||
make -O -j $TT_PROCS
|
||||
# NOTE: byacc's "make install" calls diff -c, which is unsupported by
|
||||
# Busybox. Unfortunately, our other implementation of diff requires
|
||||
# byacc to build, meaning we'll need to do a manual install to prevent
|
||||
# a circular dependency. ~ahill
|
||||
mkdir -p $TT_INSTALLDIR/bin
|
||||
cp yacc $TT_INSTALLDIR/bin/
|
||||
ln -s yacc $TT_INSTALLDIR/bin/byacc
|
||||
mkdir -p $TT_INSTALLDIR/usr/share/man/man1
|
||||
cp yacc.1 $TT_INSTALLDIR/usr/share/man/man1/
|
||||
}
|
||||
47
sources/bzip2/bzip2.spec
Normal file
47
sources/bzip2/bzip2.spec
Normal file
@ -0,0 +1,47 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269"
|
||||
SRC_NAME="bzip2"
|
||||
SRC_REVISION=2
|
||||
SRC_URL="https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz"
|
||||
SRC_VERSION="1.0.8"
|
||||
|
||||
# TODO: Install the man pages ~ahill
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd bzip2-*/
|
||||
# NOTE: bzip2 likes to hard-code CC, which won't work because gcc doesn't
|
||||
# exist here. ~ahill
|
||||
# NOTE: -D_FILE_OFFSET_BITS is present because it's present in the Makefile
|
||||
# and we're completely overriding its defaults. I don't actually know
|
||||
# if this will cause any issues if it's missing. ~ahill
|
||||
make -O -f Makefile-libbz2_so -j $TT_PROCS CC=$CC CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64"
|
||||
# NOTE: bzip2recover is part of the first Makefile, so we need to invoke
|
||||
# that to build the command. ~ahill
|
||||
make -O -j $TT_PROCS bzip2recover CC=$CC CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64"
|
||||
# NOTE: The shared Makefile doesn't have an "install" target, so we just
|
||||
# copy the files over ourselves. ~ahill
|
||||
mkdir -p $TT_INSTALLDIR$TT_BINDIR
|
||||
cp bzdiff $TT_INSTALLDIR$TT_BINDIR/
|
||||
chmod +x $TT_INSTALLDIR$TT_BINDIR/bzdiff
|
||||
ln -sf bzdiff $TT_INSTALLDIR$TT_BINDIR/bzcmp
|
||||
cp bzgrep $TT_INSTALLDIR$TT_BINDIR/
|
||||
chmod +x $TT_INSTALLDIR$TT_BINDIR/bzgrep
|
||||
ln -sf bzgrep $TT_INSTALLDIR$TT_BINDIR/bzegrep
|
||||
ln -sf bzgrep $TT_INSTALLDIR$TT_BINDIR/bzfgrep
|
||||
cp bzip2recover $TT_INSTALLDIR$TT_BINDIR/
|
||||
cp bzmore $TT_INSTALLDIR$TT_BINDIR/
|
||||
chmod +x $TT_INSTALLDIR$TT_BINDIR/bzmore
|
||||
ln -sf bzmore $TT_INSTALLDIR$TT_BINDIR/bzless
|
||||
cp bzip2-shared $TT_INSTALLDIR$TT_BINDIR/bzip2
|
||||
ln -sf bzip2 $TT_INSTALLDIR$TT_BINDIR/bunzip2
|
||||
ln -sf bzip2 $TT_INSTALLDIR$TT_BINDIR/bzcat
|
||||
mkdir -p $TT_INSTALLDIR$TT_LIBDIR
|
||||
SO_NAME=libbz2.so.$(echo $SRC_VERSION | cut -d"r" -f1)
|
||||
cp $SO_NAME $TT_INSTALLDIR$TT_LIBDIR/
|
||||
ln -sf $SO_NAME $TT_INSTALLDIR$TT_LIBDIR/libbz2.so.$(echo $SRC_VERSION | cut -d"." -f1,2)
|
||||
ln -sf $SO_NAME $TT_INSTALLDIR$TT_LIBDIR/libbz2.so.$(echo $SRC_VERSION | cut -d"." -f1)
|
||||
ln -sf $SO_NAME $TT_INSTALLDIR$TT_LIBDIR/libbz2.so
|
||||
mkdir -p $TT_INSTALLDIR$TT_INCLUDEDIR
|
||||
cp bzlib.h $TT_INSTALLDIR$TT_INCLUDEDIR/
|
||||
}
|
||||
26
sources/cmake/cmake.spec
Normal file
26
sources/cmake/cmake.spec
Normal file
@ -0,0 +1,26 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="414aacfac54ba0e78e64a018720b64ed6bfca14b587047b8b3489f407a14a070"
|
||||
SRC_NAME="cmake"
|
||||
SRC_URL="https://github.com/Kitware/CMake/releases/download/v4.2.1/cmake-4.2.1.tar.gz"
|
||||
SRC_VERSION="4.2.1"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd cmake-*/
|
||||
# NOTE: CMake's bootstrap script is autoconf-like, but we shouldn't use
|
||||
# TT_AUTOCONF_COMMON here because it would be incompatible. ~ahill
|
||||
./bootstrap \
|
||||
--bindir=$TT_BINDIR \
|
||||
--datadir=$TT_DATADIR/cmake-$(echo $SRC_VERSION | cut -d"." -f1,2) \
|
||||
--docdir=$TT_DATADIR/doc/cmake-$(echo $SRC_VERSION | cut -d"." -f1,2) \
|
||||
--mandir=$TT_DATADIR/man \
|
||||
--parallel=$TT_PROCS \
|
||||
--prefix=$TT_PREFIX \
|
||||
--system-bzip2 \
|
||||
--system-libarchive \
|
||||
--system-liblzma \
|
||||
--system-zlib \
|
||||
--xdgdatadir=$TT_DATADIR
|
||||
make -O -j $TT_PROCS
|
||||
make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
13
sources/coreutils/coreutils.spec
Normal file
13
sources/coreutils/coreutils.spec
Normal file
@ -0,0 +1,13 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="19bcb6ca867183c57d77155eae946c5eced88183143b45ca51ad7d26c628ca75"
|
||||
SRC_NAME="coreutils"
|
||||
SRC_URL="https://ftp.gnu.org/gnu/coreutils/coreutils-9.9.tar.xz"
|
||||
SRC_VERSION="9.9"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd coreutils-*/
|
||||
./configure $TT_AUTOCONF_COMMON --disable-year2038
|
||||
make -j $TT_PROCS
|
||||
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
18
sources/curl/curl.spec
Normal file
18
sources/curl/curl.spec
Normal file
@ -0,0 +1,18 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="40df79166e74aa20149365e11ee4c798a46ad57c34e4f68fd13100e2c9a91946"
|
||||
SRC_NAME="curl"
|
||||
SRC_URL="https://curl.se/download/curl-8.18.0.tar.xz"
|
||||
SRC_VERSION="8.18.0"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd curl-$SRC_VERSION/
|
||||
./configure $TT_AUTOCONF_COMMON \
|
||||
--disable-libgcc \
|
||||
--disable-static \
|
||||
--enable-optimize \
|
||||
--with-openssl \
|
||||
--without-libpsl
|
||||
make -j $TT_PROCS
|
||||
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
15
sources/dash/dash.spec
Normal file
15
sources/dash/dash.spec
Normal file
@ -0,0 +1,15 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_FILENAME="dash-0.5.12-12.tar.gz"
|
||||
SRC_HASH="845fd61702ae5e53e09664faa450da82805958924b109b8c5b4777bd8551af00"
|
||||
SRC_NAME="dash"
|
||||
SRC_URL="https://salsa.debian.org/debian/dash/-/archive/debian/0.5.12-12/dash-debian-0.5.12-12.tar.gz"
|
||||
SRC_VERSION="0.5.12-12"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd dash-*/
|
||||
./configure $TT_AUTOCONF_COMMON
|
||||
make -j $TT_PROCS
|
||||
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
ln -s dash $TT_INSTALLDIR/bin/sh
|
||||
}
|
||||
19
sources/diffutils/diffutils.spec
Normal file
19
sources/diffutils/diffutils.spec
Normal file
@ -0,0 +1,19 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="7c8b7f9fc8609141fdea9cece85249d308624391ff61dedaf528fcb337727dfd"
|
||||
SRC_NAME="diffutils"
|
||||
SRC_URL="https://ftp.gnu.org/gnu/diffutils/diffutils-3.12.tar.xz"
|
||||
SRC_VERSION="3.12"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd diffutils-$SRC_VERSION/
|
||||
# NOTE: GNU Diffutils 3.12 has a bug when cross-compiling, stating that it
|
||||
# can't run a test because it is cross-compiling. Rather than ignore
|
||||
# the issue, the configure script simply dies, preventing the build
|
||||
# from proceeding. Adding gl_cv_func_strcasecmp_works fixes the issue
|
||||
# without the need for a patch. ~ahill
|
||||
# See also: https://lists.gnu.org/archive/html/bug-gnulib/2025-04/msg00056.html
|
||||
./configure $TT_AUTOCONF_COMMON gl_cv_func_strcasecmp_works=y
|
||||
make -j $TT_PROCS
|
||||
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
13
sources/expat/expat.spec
Normal file
13
sources/expat/expat.spec
Normal file
@ -0,0 +1,13 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="71df8f40706a7bb0a80a5367079ea75d91da4f8c65c58ec59bcdfbf7decdab9f"
|
||||
SRC_NAME="expat"
|
||||
SRC_URL="https://github.com/libexpat/libexpat/releases/download/R_2_7_3/expat-2.7.3.tar.xz"
|
||||
SRC_VERSION="2.7.3"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd expat-$SRC_VERSION/
|
||||
./configure $TT_AUTOCONF_COMMON --disable-static
|
||||
make -O -j $TT_PROCS
|
||||
make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
13
sources/findutils/findutils.spec
Normal file
13
sources/findutils/findutils.spec
Normal file
@ -0,0 +1,13 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="1387e0b67ff247d2abde998f90dfbf70c1491391a59ddfecb8ae698789f0a4f5"
|
||||
SRC_NAME="findutils"
|
||||
SRC_URL="https://ftp.gnu.org/gnu/findutils/findutils-4.10.0.tar.xz"
|
||||
SRC_VERSION="4.10.0"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd findutils-*/
|
||||
./configure $TT_AUTOCONF_COMMON
|
||||
make -j $TT_PROCS
|
||||
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
13
sources/flex/flex.spec
Normal file
13
sources/flex/flex.spec
Normal file
@ -0,0 +1,13 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995"
|
||||
SRC_NAME="flex"
|
||||
SRC_URL="https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz"
|
||||
SRC_VERSION="2.6.4"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd flex-*/
|
||||
./configure $TT_AUTOCONF_COMMON --disable-static
|
||||
make -O -j $TT_PROCS
|
||||
make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
37
sources/fortune-mod/fortune-mod.spec
Normal file
37
sources/fortune-mod/fortune-mod.spec
Normal file
@ -0,0 +1,37 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="1f387877254e95eab61f937257b42609f29b994ef0571531655bbfc3a2ac74ac"
|
||||
SRC_NAME="fortune-mod"
|
||||
SRC_PATCHES="
|
||||
1dde7a66dcf9033227a4747b5e892cc1845a77f025d6c5d3c6f49c15dee7c239 maple
|
||||
"
|
||||
SRC_URL="https://github.com/shlomif/fortune-mod/releases/download/fortune-mod-3.24.0/fortune-mod-3.24.0.tar.xz"
|
||||
SRC_VERSION="3.24.0"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
# NOTE: There is no other way to prevent fortune from installing itself
|
||||
# under /games, so we have to modify the CMakeLists in this case.
|
||||
# ~ahill
|
||||
sed -i "/fortune\/fortune.c/{n; s/games/bin/}" fortune-mod-$SRC_VERSION/CMakeLists.txt
|
||||
# NOTE: Similarly, the same thing happens for man pages. ~ahill
|
||||
sed -i "s|share/man/man|usr/share/man/man|" fortune-mod-$SRC_VERSION/cmake/Shlomif_Common.cmake
|
||||
cat fortune-mod-3.24.0/cmake/Shlomif_Common.cmake
|
||||
# NOTE: I don't agree with the offensive jokes included in this distribution
|
||||
# but they are hidden behind the -o flag, and I want them to be seen
|
||||
# as "unfunny" before the next generation thinks they're funny. ~ahill
|
||||
cmake \
|
||||
-B build-$SRC_VERSION \
|
||||
-S fortune-mod-$SRC_VERSION \
|
||||
-DCMAKE_INSTALL_PREFIX=$TT_INSTALLDIR \
|
||||
-DCOOKIEDIR=$TT_INSTALLDIR/usr/share/games/fortunes \
|
||||
-DNO_OFFENSIVE=OFF
|
||||
cmake --build build-$SRC_VERSION --parallel $TT_PROCS
|
||||
# Finally, we add our custom fortunefile into the mix. ~ahill
|
||||
# NOTE: Is there a better way to do this? This probably won't survive
|
||||
# cross-compilation. ~ahill
|
||||
./build-$SRC_VERSION/strfile maple
|
||||
cmake --install build-$SRC_VERSION --parallel $TT_PROCS
|
||||
cp maple $TT_INSTALLDIR/usr/share/games/fortunes/
|
||||
cp maple.dat $TT_INSTALLDIR/usr/share/games/fortunes/
|
||||
ln -sf maple $TT_INSTALLDIR/usr/share/games/fortunes/maple.u8
|
||||
}
|
||||
10
sources/fortune-mod/maple
Normal file
10
sources/fortune-mod/maple
Normal file
@ -0,0 +1,10 @@
|
||||
I am the power user and the daemons are my friend!
|
||||
-- Alex
|
||||
%
|
||||
On a scale from telegraph to Pony Express, the carrier pigeons are freezing
|
||||
mid-transit in this storm.
|
||||
-- Alex
|
||||
%
|
||||
I'm just raw dogging it with the text editor.
|
||||
-- Alex
|
||||
%
|
||||
13
sources/gettext/gettext.spec
Normal file
13
sources/gettext/gettext.spec
Normal file
@ -0,0 +1,13 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="39acf4b0371e9b110b60005562aace5b3631fed9b1bb9ecccfc7f56e58bb1d7f"
|
||||
SRC_NAME="gettext"
|
||||
SRC_URL="https://ftp.gnu.org/pub/gnu/gettext/gettext-0.26.tar.gz"
|
||||
SRC_VERSION="0.26"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd gettext-$SRC_VERSION/
|
||||
./configure $TT_AUTOCONF_COMMON --disable-static --enable-year2038
|
||||
make -O -j $TT_PROCS
|
||||
make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
16
sources/git/git.spec
Normal file
16
sources/git/git.spec
Normal file
@ -0,0 +1,16 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="3cd8fee86f69a949cb610fee8cd9264e6873d07fa58411f6060b3d62729ed7c5"
|
||||
SRC_NAME="git"
|
||||
SRC_URL="https://www.kernel.org/pub/software/scm/git/git-2.52.0.tar.xz"
|
||||
SRC_VERSION="2.52.0"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd git-$SRC_VERSION/
|
||||
./configure $TT_AUTOCONF_COMMON --without-tcltk
|
||||
make -j $TT_PROCS NO_GITWEB=YesPlease NO_PERL=YesPlease NO_REGEX=NeedsStartEnd
|
||||
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR NO_GITWEB=YesPlease NO_PERL=YesPlease NO_REGEX=NeedsStartEnd
|
||||
# Another package ignoring proper paths? Unacceptable! ~ahill
|
||||
mv $TT_INSTALLDIR/share/* $TT_INSTALLDIR/usr/share/
|
||||
rm -rf $TT_INSTALLDIR/share
|
||||
}
|
||||
13
sources/grep/grep.spec
Normal file
13
sources/grep/grep.spec
Normal file
@ -0,0 +1,13 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="2649b27c0e90e632eadcd757be06c6e9a4f48d941de51e7c0f83ff76408a07b9"
|
||||
SRC_NAME="grep"
|
||||
SRC_URL="https://ftp.gnu.org/gnu/grep/grep-3.12.tar.xz"
|
||||
SRC_VERSION="3.12"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd grep-$SRC_VERSION/
|
||||
./configure $TT_AUTOCONF_COMMON
|
||||
make -j $TT_PROCS
|
||||
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
13
sources/groff/groff.spec
Normal file
13
sources/groff/groff.spec
Normal file
@ -0,0 +1,13 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="6b9757f592b7518b4902eb6af7e54570bdccba37a871fddb2d30ae3863511c13"
|
||||
SRC_NAME="groff"
|
||||
SRC_URL="https://ftp.gnu.org/gnu/groff/groff-1.23.0.tar.gz"
|
||||
SRC_VERSION="1.23.0"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd groff-*/
|
||||
./configure $TT_AUTOCONF_COMMON
|
||||
make -j $TT_PROCS
|
||||
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
13
sources/gzip/gzip.spec
Normal file
13
sources/gzip/gzip.spec
Normal file
@ -0,0 +1,13 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="01a7b881bd220bfdf615f97b8718f80bdfd3f6add385b993dcf6efd14e8c0ac6"
|
||||
SRC_NAME="gzip"
|
||||
SRC_URL="https://ftp.gnu.org/gnu/gzip/gzip-1.14.tar.xz"
|
||||
SRC_VERSION="1.14"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd gzip-$SRC_VERSION/
|
||||
./configure $TT_AUTOCONF_COMMON
|
||||
make -j $TT_PROCS
|
||||
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
47
sources/initramfs-tools/initramfs-tools.spec
Normal file
47
sources/initramfs-tools/initramfs-tools.spec
Normal file
@ -0,0 +1,47 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_FILENAME="initramfs-tools-0.150.tar.gz"
|
||||
SRC_HASH="d2578bed875b65962dfb51fae3bea8af11765ae76d1d66708fffef1fd3512a0c"
|
||||
SRC_NAME="initramfs-tools"
|
||||
SRC_URL="https://salsa.debian.org/kernel-team/initramfs-tools/-/archive/v0.150/initramfs-tools-v0.150.tar.gz"
|
||||
SRC_VERSION="0.150"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd initramfs-tools-*/
|
||||
# NOTE: Since this is for a single file, we don't pass TT_PROC. ~ahill
|
||||
make
|
||||
|
||||
# NOTE: There's no make install! ~ahill
|
||||
mkdir -p $TT_INSTALLDIR/bin
|
||||
cp lsinitramfs $TT_INSTALLDIR/bin/
|
||||
cp mkinitramfs $TT_INSTALLDIR/bin/
|
||||
cp unmkinitramfs $TT_INSTALLDIR/bin/
|
||||
cp update-initramfs $TT_INSTALLDIR/bin/
|
||||
|
||||
mkdir -p $TT_INSTALLDIR/etc/initramfs-tools
|
||||
cp conf/initramfs.conf $TT_INSTALLDIR/etc/initramfs-tools/
|
||||
cp conf/update-initramfs.conf $TT_INSTALLDIR/etc/initramfs-tools/
|
||||
|
||||
mkdir -p $TT_INSTALLDIR/usr/share/bash-completion/completions
|
||||
cp bash_completion.d/update-initramfs $TT_INSTALLDIR/usr/share/bash-completion/completions/
|
||||
|
||||
mkdir -p $TT_INSTALLDIR/usr/share/initramfs-tools
|
||||
cp hook-functions $TT_INSTALLDIR/usr/share/initramfs-tools/
|
||||
cp -r hooks $TT_INSTALLDIR/usr/share/initramfs-tools/
|
||||
cp init $TT_INSTALLDIR/usr/share/initramfs-tools/
|
||||
cp conf/modules $TT_INSTALLDIR/usr/share/initramfs-tools/
|
||||
cp -r scripts $TT_INSTALLDIR/usr/share/initramfs-tools/
|
||||
|
||||
mkdir -p $TT_INSTALLDIR/usr/share/man/man5
|
||||
cp initramfs.conf.5 $TT_INSTALLDIR/usr/share/man/man5/
|
||||
cp update-initramfs.conf.5 $TT_INSTALLDIR/usr/share/man/man5/
|
||||
|
||||
mkdir -p $TT_INSTALLDIR/usr/share/man/man7
|
||||
cp initramfs-tools.7 $TT_INSTALLDIR/usr/share/man/man7/
|
||||
|
||||
mkdir -p $TT_INSTALLDIR/usr/share/man/man8
|
||||
cp lsinitramfs.8 $TT_INSTALLDIR/usr/share/man/man8/
|
||||
cp mkinitramfs.8 $TT_INSTALLDIR/usr/share/man/man8/
|
||||
cp unmkinitramfs.8 $TT_INSTALLDIR/usr/share/man/man8/
|
||||
cp update-initramfs.8 $TT_INSTALLDIR/usr/share/man/man8/
|
||||
}
|
||||
20
sources/kmod/kmod.spec
Normal file
20
sources/kmod/kmod.spec
Normal file
@ -0,0 +1,20 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_FILENAME="kmod-34.tar.gz"
|
||||
SRC_HASH="cb47be49366b596e4554eeeb7595b128feb261619c7675603e004b07c5ebbd5b"
|
||||
SRC_NAME="kmod"
|
||||
SRC_URL="https://github.com/kmod-project/kmod/archive/refs/tags/v34.tar.gz"
|
||||
SRC_VERSION="34"
|
||||
|
||||
# TODO: Fix pkgconfig directory (/usr/share/pkgconfig -> /lib/pkgconfig)
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd kmod-$SRC_VERSION/
|
||||
./autogen.sh
|
||||
# NOTE: Building man pages requires scdoc. In an attempt to reduce the total
|
||||
# number of dependencies, documentation is temporarily disabled.
|
||||
# ~ahill
|
||||
./configure $TT_AUTOCONF_COMMON --disable-manpages --enable-year2038
|
||||
make -j $TT_PROCS
|
||||
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
13
sources/libarchive/libarchive.spec
Normal file
13
sources/libarchive/libarchive.spec
Normal file
@ -0,0 +1,13 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="c7b847b57feacf5e182f4d14dd6cae545ac6843d55cb725f58e107cdf1c9ad73"
|
||||
SRC_NAME="libarchive"
|
||||
SRC_URL="https://libarchive.org/downloads/libarchive-3.8.4.tar.xz"
|
||||
SRC_VERSION="3.8.4"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd libarchive-*/
|
||||
./configure $TT_AUTOCONF_COMMON --disable-static --enable-year2038
|
||||
make -j $TT_PROCS
|
||||
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
29
sources/libcap2/libcap2.spec
Normal file
29
sources/libcap2/libcap2.spec
Normal file
@ -0,0 +1,29 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="5e339f5ab434bf5b7979f65437ca24942ddcd6e6a3e57347370cd791bc0ea51c"
|
||||
SRC_NAME="libcap2"
|
||||
SRC_URL="https://git.kernel.org/pub/scm/libs/libcap/libcap.git/snapshot/libcap-2.77.tar.gz"
|
||||
SRC_VERSION="2.77"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd libcap-$SRC_VERSION/
|
||||
# NOTE: This Makefile assumes that GCC exists, which it doesn't here, so we
|
||||
# need to tell it to respect the CC environment variable to prevent
|
||||
# any issues. ~ahill
|
||||
make -O \
|
||||
-j $TT_PROCS \
|
||||
CC=$CC \
|
||||
LIBDIR=$TT_LIBDIR \
|
||||
INCDIR=$TT_INCLUDEDIR \
|
||||
exec_prefix=$TT_PREFIX \
|
||||
prefix=$TT_PREFIX
|
||||
make -O \
|
||||
-C libcap \
|
||||
-j $TT_PROCS \
|
||||
install-shared \
|
||||
FAKEROOT=$TT_INSTALLDIR \
|
||||
LIBDIR=$TT_LIBDIR \
|
||||
INCDIR=$TT_INCLUDEDIR \
|
||||
exec_prefix=$TT_PREFIX \
|
||||
prefix=$TT_PREFIX
|
||||
}
|
||||
23
sources/libelf/libelf.spec
Normal file
23
sources/libelf/libelf.spec
Normal file
@ -0,0 +1,23 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_FILENAME="libelf-0.193.tar.gz"
|
||||
SRC_HASH="6253395679c2bb2156d926b3d8b7e3b2bbeb40a56d2bea29e1c73e40ed9de4ba"
|
||||
SRC_NAME="libelf"
|
||||
SRC_URL="https://github.com/arachsys/libelf/archive/refs/tags/v0.193.tar.gz"
|
||||
SRC_VERSION="0.193"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd libelf-$SRC_VERSION/
|
||||
# NOTE: This version of libelf was extracted from elfutils, which means a
|
||||
# good chunk of the project is missing. We use this version instead of
|
||||
# elfutils since the original relies on libargp. Since Maple Linux is
|
||||
# a musl-based system and it lacks an implementation of libargp, I
|
||||
# chose this version. As a result, the source we are compiling is
|
||||
# pre-configured and lacks a proper configuration script. Since our
|
||||
# current configuration relies on libzstd, we need to manually modify
|
||||
# the configuration to remove it as a dependency. ~ahill
|
||||
sed -i "s/-lzstd//" Makefile
|
||||
sed -i "/#define USE_ZSTD/d" src/config.h
|
||||
make -O -j $TT_PROCS
|
||||
make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR INCDIR=$TT_INCLUDEDIR
|
||||
}
|
||||
13
sources/libffi/libffi.spec
Normal file
13
sources/libffi/libffi.spec
Normal file
@ -0,0 +1,13 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="f3a3082a23b37c293a4fcd1053147b371f2ff91fa7ea1b2a52e335676bac82dc"
|
||||
SRC_NAME="libffi"
|
||||
SRC_URL="https://github.com/libffi/libffi/releases/download/v3.5.2/libffi-3.5.2.tar.gz"
|
||||
SRC_VERSION="3.5.2"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd libffi-$SRC_VERSION/
|
||||
./configure $TT_AUTOCONF_COMMON --disable-static
|
||||
make -O -j $TT_PROCS
|
||||
make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
19
sources/libressl/libressl.spec
Normal file
19
sources/libressl/libressl.spec
Normal file
@ -0,0 +1,19 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="6d5c2f58583588ea791f4c8645004071d00dfa554a5bf788a006ca1eb5abd70b"
|
||||
SRC_NAME="libressl"
|
||||
SRC_URL="https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-4.2.1.tar.gz"
|
||||
SRC_VERSION="4.2.1"
|
||||
|
||||
# TODO: Should the openssl command be a symlink? For the sake of transparency,
|
||||
# it may make sense to rename the command to "libressl" and make "openssl"
|
||||
# a symlink for compatibility's sake. ~ahill
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd libressl-*/
|
||||
# TODO: What even is sharedstatedir and what should Maple Linux do with it?
|
||||
# ~ahill
|
||||
./configure $TT_AUTOCONF_COMMON --disable-static
|
||||
make -j $TT_PROCS
|
||||
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
19
sources/libtool/libtool.spec
Normal file
19
sources/libtool/libtool.spec
Normal file
@ -0,0 +1,19 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="f81f5860666b0bc7d84baddefa60d1cb9fa6fceb2398cc3baca6afaa60266675"
|
||||
SRC_NAME="libtool"
|
||||
SRC_URL="https://ftp.gnu.org/gnu/libtool/libtool-2.5.4.tar.xz"
|
||||
SRC_VERSION="2.5.4"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd libtool-*/
|
||||
./configure $TT_AUTOCONF_COMMON --disable-static
|
||||
make -j $TT_PROCS
|
||||
# NOTE: For some reason, libtoolize uses the env command to locate sh, but
|
||||
# we don't have the env command yet, because env is part of bsdutils,
|
||||
# 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
|
||||
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
13
sources/libyaml/libyaml.spec
Normal file
13
sources/libyaml/libyaml.spec
Normal file
@ -0,0 +1,13 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="c642ae9b75fee120b2d96c712538bd2cf283228d2337df2cf2988e3c02678ef4"
|
||||
SRC_NAME="libyaml"
|
||||
SRC_URL="https://github.com/yaml/libyaml/releases/download/0.2.5/yaml-0.2.5.tar.gz"
|
||||
SRC_VERSION="0.2.5"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd yaml-$SRC_VERSION/
|
||||
./configure $TT_AUTOCONF_COMMON --disable-static
|
||||
make -O -j $TT_PROCS
|
||||
make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
14
sources/limine/limine.spec
Normal file
14
sources/limine/limine.spec
Normal file
@ -0,0 +1,14 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="baf5bcbe7b04042d84fb47035aaf3312800c6d36a65fc411a3f74aba1c48c3c6"
|
||||
SRC_NAME="limine"
|
||||
SRC_URL="https://github.com/limine-bootloader/limine/releases/download/v10.6.3/limine-10.6.3.tar.xz"
|
||||
SRC_VERSION="10.6.3"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd limine-$SRC_VERSION/
|
||||
# TODO: How should other architectures be handled? ~ahill
|
||||
./configure $TT_AUTOCONF_COMMON --enable-uefi-x86-64
|
||||
make -O -j $TT_PROCS
|
||||
make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
21
sources/linux/linux.spec
Executable file
21
sources/linux/linux.spec
Executable file
@ -0,0 +1,21 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="f850139ca5f79c1bf6bb8b32f92e212aadca97bdaef8a83a7cf4ac4d6a525fab"
|
||||
SRC_NAME="linux"
|
||||
SRC_URL="https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.18.4.tar.xz"
|
||||
SRC_VERSION="6.18.4"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd linux-$SRC_VERSION/
|
||||
# NOTE: LLVM=1 is required for ALL invocations of the kernel's Makefile. GNU
|
||||
# tools are still used by default in a lot of places and this will
|
||||
# override them with LLVM tools wherever possible. ~ahill
|
||||
LLVM=1 make mrproper
|
||||
# NOTE: YACC defaults to bison, which doesn't exist here, so we tell it
|
||||
# where to find the parser generator manually. ~ahill
|
||||
LLVM=1 make -j $TT_PROCS defconfig YACC=byacc
|
||||
LLVM=1 make -j $TT_PROCS YACC=byacc
|
||||
make -j $TT_PROCS install INSTALL_PATH=$TT_INSTALLDIR/boot
|
||||
make -j $TT_PROCS modules_install INSTALL_MOD_PATH=$TT_INSTALLDIR
|
||||
# TODO: Run dtbs_install on non-x86 systems ~ahill
|
||||
}
|
||||
19
sources/liquid/liquid.spec
Normal file
19
sources/liquid/liquid.spec
Normal file
@ -0,0 +1,19 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="f3314240c846140d7be742e405882302f01dbecc51b8dd44d97cdad62d978f03"
|
||||
SRC_NAME="liquid"
|
||||
SRC_URL="https://github.com/Shopify/liquid/archive/refs/tags/v5.11.0.tar.gz"
|
||||
SRC_VERSION="5.11.0"
|
||||
|
||||
SRC_FILENAME="$SRC_NAME-$SRC_VERSION.tar.gz"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd liquid-$SRC_VERSION/
|
||||
gem build liquid.gemspec
|
||||
gem install \
|
||||
--install-dir $TT_INSTALLDIR/lib/ruby/gems/4.0.0 \
|
||||
--local \
|
||||
--ignore-dependencies \
|
||||
--verbose \
|
||||
./liquid-$SRC_VERSION.gem
|
||||
}
|
||||
81
sources/llvm/llvm.spec
Executable file
81
sources/llvm/llvm.spec
Executable file
@ -0,0 +1,81 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="4633a23617fa31a3ea51242586ea7fb1da7140e426bd62fc164261fe036aa142"
|
||||
SRC_NAME="llvm"
|
||||
SRC_PATCHES="
|
||||
1e52d86c422498ed5d926ad90e0787e79b8a02cb33cc916b1897c2a6ebfef9fc rtsan-127764.patch
|
||||
"
|
||||
SRC_URL="https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.8/llvm-project-21.1.8.src.tar.xz"
|
||||
SRC_VERSION="21.1.8"
|
||||
|
||||
# TODO: Figure out why libunwind installs headers at /include
|
||||
# TODO: Figure out why libc++ installs headers at /include
|
||||
# TODO: Fix data directory for libclc (/share/clc -> /usr/share/clc)
|
||||
# TODO: Fix pkgconfig directory for libclc (/share/pkgconfig -> /lib/pkgconfig)
|
||||
# TODO: Fix data directory for libc++ (/share/libc++ -> /usr/share/libc++)
|
||||
# TODO: Should /lib/cmake be moved to /usr/share?
|
||||
# TODO: Should /lib/$TT_TARGET simply be a symlink to /lib?
|
||||
# TODO: Should /usr/include/$TT_TARGET simply be a symlink to /usr/include?
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd llvm-project-$SRC_VERSION.src/
|
||||
# NOTE: This version of LLVM has an issue where compiler-rt attempts to use
|
||||
# a header before it is has been built. This patch fixes it. ~ahill
|
||||
# See also: https://github.com/llvm/llvm-project/issues/127764
|
||||
patch -p1 < ../rtsan-127764.patch
|
||||
# NOTE: compiler-rt fails to build on musl because execinfo.h is missing.
|
||||
# Disabling COMPILER_RT_BUILD_GWP_ASAN works. ~ahill
|
||||
# NOTE: LLVM_ENABLE_ZSTD is disabled because we don't have zstd in the
|
||||
# sysroot, and because I don't believe that a library created by
|
||||
# Facebook should be required for an operating system to function.
|
||||
# ~ahill
|
||||
# NOTE: Many build scripts still rely on the old Unix names for tools such
|
||||
# as cc and ld to function. Because of this, we enable
|
||||
# LLVM_INSTALL_BINUTILS_SYMLINKS and LLVM_INSTALL_CCTOOLS_SYMLINKS for
|
||||
# compatibility's sake. ~ahill
|
||||
# NOTE: LLVM uses the GNUInstallDirs module to determine where to write
|
||||
# files. ~ahill
|
||||
# See also: https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
|
||||
cmake -B build -S llvm \
|
||||
-DCLANG_DEFAULT_CXX_STDLIB=libc++ \
|
||||
-DCLANG_DEFAULT_LINKER=lld \
|
||||
-DCLANG_DEFAULT_RTLIB=compiler-rt \
|
||||
-DCLANG_DEFAULT_UNWINDLIB=libunwind \
|
||||
-DCLANG_VENDOR=Maple \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_DATAROOTDIR=$(echo $TT_DATADIR | cut -c 2-) \
|
||||
-DCMAKE_INSTALL_INCLUDEDIR=$(echo $TT_INCLUDEDIR | cut -c 2-) \
|
||||
-DCMAKE_INSTALL_LIBEXECDIR=$(echo $TT_LIBDIR | cut -c 2-) \
|
||||
-DCMAKE_INSTALL_PREFIX=$TT_INSTALLDIR \
|
||||
-DCMAKE_INSTALL_RUNSTATEDIR=$(echo $TT_RUNDIR | cut -c 2-) \
|
||||
-DCMAKE_INSTALL_SBINDIR=$(echo $TT_BINDIR | cut -c 2-) \
|
||||
-DCOMPILER_RT_BUILD_GWP_ASAN=OFF \
|
||||
-DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON \
|
||||
-DLIBCXX_CXX_ABI=libcxxabi \
|
||||
-DLIBCXX_HAS_MUSL_LIBC=ON \
|
||||
-DLIBCXX_USE_COMPILER_RT=ON \
|
||||
-DLIBCXXABI_USE_COMPILER_RT=ON \
|
||||
-DLIBCXXABI_USE_LLVM_UNWINDER=ON \
|
||||
-DLIBUNWIND_USE_COMPILER_RT=ON \
|
||||
-DLLVM_ENABLE_PROJECTS="clang;lld;llvm" \
|
||||
-DLLVM_ENABLE_RTTI=ON \
|
||||
-DLLVM_ENABLE_RUNTIMES="compiler-rt;libclc;libcxx;libcxxabi;libunwind" \
|
||||
-DLLVM_ENABLE_ZSTD=OFF \
|
||||
-DLLVM_HOST_TRIPLE=$TT_TARGET \
|
||||
-DLLVM_INSTALL_BINUTILS_SYMLINKS=ON \
|
||||
-DLLVM_INSTALL_CCTOOLS_SYMLINKS=ON
|
||||
cmake --build build --parallel $TT_PROCS
|
||||
cmake --install build --parallel $TT_PROCS
|
||||
# NOTE: LLVM doesn't add symlinks for clang or ld.lld, so I'll make them
|
||||
# myself. ~ahill
|
||||
ln -sf clang $TT_INSTALLDIR/bin/cc
|
||||
ln -sf clang++ $TT_INSTALLDIR/bin/c++
|
||||
ln -sf ld.lld $TT_INSTALLDIR/bin/ld
|
||||
# NOTE: Finally, LLVM really doesn't play nice with its own rules. If I tell
|
||||
# it to install in a certain directory, it *might* listen to me. This
|
||||
# takes care of all the stuff it didn't install correctly. ~ahill
|
||||
mv $TT_INSTALLDIR/include/* $TT_INSTALLDIR/usr/include/
|
||||
rm -rf $TT_INSTALLDIR/include
|
||||
mv $TT_INSTALLDIR/share/* $TT_INSTALLDIR/usr/share/
|
||||
rm -rf $TT_INSTALLDIR/share
|
||||
}
|
||||
22
sources/llvm/rtsan-127764.patch
Normal file
22
sources/llvm/rtsan-127764.patch
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
compiler-rt/lib/rtsan/CMakeLists.txt | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/compiler-rt/lib/rtsan/CMakeLists.txt b/compiler-rt/lib/rtsan/CMakeLists.txt
|
||||
index a4413d9992b6..40bcf7facad7 100644
|
||||
--- a/compiler-rt/lib/rtsan/CMakeLists.txt
|
||||
+++ b/compiler-rt/lib/rtsan/CMakeLists.txt
|
||||
@@ -37,6 +37,11 @@ set(RTSAN_DYNAMIC_LIBS
|
||||
${SANITIZER_CXX_ABI_LIBRARIES}
|
||||
${SANITIZER_COMMON_LINK_LIBS})
|
||||
|
||||
+if(TARGET cxx-headers OR HAVE_LIBCXX)
|
||||
+ # Rtsan uses C++ standard library headers.
|
||||
+ set(RTSAN_DEPS cxx-headers)
|
||||
+endif()
|
||||
+
|
||||
append_rtti_flag(OFF RTSAN_CFLAGS)
|
||||
|
||||
if(APPLE)
|
||||
--
|
||||
2.43.0
|
||||
13
sources/m4/m4.spec
Normal file
13
sources/m4/m4.spec
Normal file
@ -0,0 +1,13 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="e236ea3a1ccf5f6c270b1c4bb60726f371fa49459a8eaaebc90b216b328daf2b"
|
||||
SRC_NAME="m4"
|
||||
SRC_URL="https://ftp.gnu.org/gnu/m4/m4-1.4.20.tar.xz"
|
||||
SRC_VERSION="1.4.20"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd m4-*/
|
||||
./configure $TT_AUTOCONF_COMMON --enable-year2038
|
||||
make -j $TT_PROCS
|
||||
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
13
sources/make/make.spec
Normal file
13
sources/make/make.spec
Normal file
@ -0,0 +1,13 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3"
|
||||
SRC_NAME="make"
|
||||
SRC_URL="https://ftp.gnu.org/gnu/make/make-4.4.1.tar.gz"
|
||||
SRC_VERSION="4.4.1"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd make-*/
|
||||
./configure $TT_AUTOCONF_COMMON --enable-year2038
|
||||
make -O -j $TT_PROCS
|
||||
make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
15
sources/mawk/mawk.spec
Normal file
15
sources/mawk/mawk.spec
Normal file
@ -0,0 +1,15 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="51bcb82d577b141d896d9d9c3077d7aaa209490132e9f2b9573ba8511b3835be"
|
||||
SRC_NAME="mawk"
|
||||
SRC_REVISION=1
|
||||
SRC_URL="https://invisible-island.net/archives/mawk/mawk-1.3.4-20250131.tgz"
|
||||
SRC_VERSION="1.3.4-20250131"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd mawk-$SRC_VERSION/
|
||||
./configure $TT_AUTOCONF_COMMON
|
||||
make -O -j $TT_PROCS
|
||||
make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
ln -s mawk $TT_INSTALLDIR/bin/awk
|
||||
}
|
||||
18
sources/muon/muon.spec
Normal file
18
sources/muon/muon.spec
Normal file
@ -0,0 +1,18 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_FILENAME="muon-0.5.0.tar.gz"
|
||||
SRC_HASH="565c1b6e1e58f7e90d8813fda0e2102df69fb493ddab4cf6a84ce3647466bee5"
|
||||
SRC_NAME="muon"
|
||||
SRC_REVISION=1
|
||||
SRC_URL="https://git.sr.ht/~lattis/muon/archive/0.5.0.tar.gz"
|
||||
SRC_VERSION="0.5.0"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd muon-*/
|
||||
# NOTE: bootstrap.sh attempts to call "c99", which isn't a command. We'll
|
||||
# use CC here to define a suitable replacement. ~ahill
|
||||
CC="clang -std=c99" ./bootstrap.sh build
|
||||
./build/muon-bootstrap setup $TT_MESON_COMMON build
|
||||
./build/muon-bootstrap -C build samu
|
||||
DESTDIR=$TT_INSTALLDIR ./build/muon -C build install
|
||||
}
|
||||
74
sources/musl/CVE-2025-26519.patch
Normal file
74
sources/musl/CVE-2025-26519.patch
Normal file
@ -0,0 +1,74 @@
|
||||
>From e5adcd97b5196e29991b524237381a0202a60659 Mon Sep 17 00:00:00 2001
|
||||
From: Rich Felker <dalias@aerifal.cx>
|
||||
Date: Sun, 9 Feb 2025 10:07:19 -0500
|
||||
Subject: [PATCH] iconv: fix erroneous input validation in EUC-KR decoder
|
||||
|
||||
as a result of incorrect bounds checking on the lead byte being
|
||||
decoded, certain invalid inputs which should produce an encoding
|
||||
error, such as "\xc8\x41", instead produced out-of-bounds loads from
|
||||
the ksc table.
|
||||
|
||||
in a worst case, the loaded value may not be a valid unicode scalar
|
||||
value, in which case, if the output encoding was UTF-8, wctomb would
|
||||
return (size_t)-1, causing an overflow in the output pointer and
|
||||
remaining buffer size which could clobber memory outside of the output
|
||||
buffer.
|
||||
|
||||
bug report was submitted in private by Nick Wellnhofer on account of
|
||||
potential security implications.
|
||||
---
|
||||
src/locale/iconv.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/locale/iconv.c b/src/locale/iconv.c
|
||||
index 9605c8e9..008c93f0 100644
|
||||
--- a/src/locale/iconv.c
|
||||
+++ b/src/locale/iconv.c
|
||||
@@ -502,7 +502,7 @@ size_t iconv(iconv_t cd, char **restrict in, size_t *restrict inb, char **restri
|
||||
if (c >= 93 || d >= 94) {
|
||||
c += (0xa1-0x81);
|
||||
d += 0xa1;
|
||||
- if (c >= 93 || c>=0xc6-0x81 && d>0x52)
|
||||
+ if (c > 0xc6-0x81 || c==0xc6-0x81 && d>0x52)
|
||||
goto ilseq;
|
||||
if (d-'A'<26) d = d-'A';
|
||||
else if (d-'a'<26) d = d-'a'+26;
|
||||
--
|
||||
2.21.0
|
||||
|
||||
>From c47ad25ea3b484e10326f933e927c0bc8cded3da Mon Sep 17 00:00:00 2001
|
||||
From: Rich Felker <dalias@aerifal.cx>
|
||||
Date: Wed, 12 Feb 2025 17:06:30 -0500
|
||||
Subject: [PATCH] iconv: harden UTF-8 output code path against input decoder
|
||||
bugs
|
||||
|
||||
the UTF-8 output code was written assuming an invariant that iconv's
|
||||
decoders only emit valid Unicode Scalar Values which wctomb can encode
|
||||
successfully, thereby always returning a value between 1 and 4.
|
||||
|
||||
if this invariant is not satisfied, wctomb returns (size_t)-1, and the
|
||||
subsequent adjustments to the output buffer pointer and remaining
|
||||
output byte count overflow, moving the output position backwards,
|
||||
potentially past the beginning of the buffer, without storing any
|
||||
bytes.
|
||||
---
|
||||
src/locale/iconv.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/locale/iconv.c b/src/locale/iconv.c
|
||||
index 008c93f0..52178950 100644
|
||||
--- a/src/locale/iconv.c
|
||||
+++ b/src/locale/iconv.c
|
||||
@@ -545,6 +545,10 @@ size_t iconv(iconv_t cd, char **restrict in, size_t *restrict inb, char **restri
|
||||
if (*outb < k) goto toobig;
|
||||
memcpy(*out, tmp, k);
|
||||
} else k = wctomb_utf8(*out, c);
|
||||
+ /* This failure condition should be unreachable, but
|
||||
+ * is included to prevent decoder bugs from translating
|
||||
+ * into advancement outside the output buffer range. */
|
||||
+ if (k>4) goto ilseq;
|
||||
*out += k;
|
||||
*outb -= k;
|
||||
break;
|
||||
--
|
||||
2.21.0
|
||||
26
sources/musl/musl.spec
Executable file
26
sources/musl/musl.spec
Executable file
@ -0,0 +1,26 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="a9a118bbe84d8764da0ea0d28b3ab3fae8477fc7e4085d90102b8596fc7c75e4"
|
||||
SRC_NAME="musl"
|
||||
SRC_PATCHES="
|
||||
c0ffd0493dcde91850e39428a31577892aad20e83bc4bf4a5c37350649ce7932 CVE-2025-26519.patch
|
||||
"
|
||||
SRC_REVISION=1
|
||||
SRC_URL="https://musl.libc.org/releases/musl-1.2.5.tar.gz"
|
||||
SRC_VERSION="1.2.5"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd musl-*/
|
||||
# NOTE: CVE-2025-26519 patches are temporary and shouldn't be needed once
|
||||
# 1.2.6 or 1.3.0 is released. ~ahill
|
||||
# https://www.openwall.com/lists/musl/2025/02/13/1/1
|
||||
# https://www.openwall.com/lists/musl/2025/02/13/1/2
|
||||
patch -p1 < ../CVE-2025-26519.patch
|
||||
./configure $TT_AUTOCONF_COMMON
|
||||
make -O -j $TT_PROCS
|
||||
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
|
||||
}
|
||||
13
sources/nano/nano.spec
Normal file
13
sources/nano/nano.spec
Normal file
@ -0,0 +1,13 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="afd287aa672c48b8e1a93fdb6c6588453d527510d966822b687f2835f0d986e9"
|
||||
SRC_NAME="nano"
|
||||
SRC_URL="https://www.nano-editor.org/dist/v8/nano-8.7.tar.xz"
|
||||
SRC_VERSION="8.7"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd nano-$SRC_VERSION/
|
||||
./configure $TT_AUTOCONF_COMMON --enable-utf8 --enable-year2038
|
||||
make -O -j $TT_PROCS
|
||||
make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
18
sources/nasm/nasm.spec
Normal file
18
sources/nasm/nasm.spec
Normal file
@ -0,0 +1,18 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="b7324cbe86e767b65f26f467ed8b12ad80e124e3ccb89076855c98e43a9eddd4"
|
||||
SRC_NAME="nasm"
|
||||
SRC_URL="https://www.nasm.us/pub/nasm/releasebuilds/3.01/nasm-3.01.tar.xz"
|
||||
SRC_VERSION="3.01"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd nasm-$SRC_VERSION/
|
||||
./autogen.sh
|
||||
./configure $TT_AUTOCONF_COMMON --enable-suggestions --enable-year2038
|
||||
# NOTE: nasm redefines bool since they want it to be a typedef instead of a
|
||||
# macro. Unfortunately, this seems to break clang because it is
|
||||
# attempting to redefine a C++ keyword in include/compiler.h.
|
||||
sed -i "/# ifdef bool/,/# endif/d" include/compiler.h
|
||||
make -O -j $TT_PROCS
|
||||
make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
17
sources/ncurses/ncurses.spec
Normal file
17
sources/ncurses/ncurses.spec
Normal file
@ -0,0 +1,17 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="65681cb0d0f80ed95780e79cf03f93672d1c14e41e767efdcc826901ea214420"
|
||||
SRC_NAME="ncurses"
|
||||
SRC_URL="https://invisible-island.net/archives/ncurses/current/ncurses-6.6-20260103.tgz"
|
||||
SRC_VERSION="6.6-20260103"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd ncurses-$SRC_VERSION/
|
||||
./configure $TT_AUTOCONF_COMMON \
|
||||
--with-cxx-shared \
|
||||
--without-debug \
|
||||
--without-normal \
|
||||
--with-shared
|
||||
make -O -j $TT_PROCS
|
||||
make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
18
sources/openrc/openrc.spec
Normal file
18
sources/openrc/openrc.spec
Normal file
@ -0,0 +1,18 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_FILENAME="openrc-0.63.tar.gz"
|
||||
SRC_HASH="1b661016bd8cd4189be83b441dd7062c967b641fdc00f741e359e22d06857df8"
|
||||
SRC_NAME="openrc"
|
||||
SRC_URL="https://github.com/OpenRC/openrc/archive/refs/tags/0.63.tar.gz"
|
||||
SRC_VERSION="0.63"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd openrc-$SRC_VERSION/
|
||||
# TODO: Remove bash completions
|
||||
muon setup $TT_MESON_COMMON \
|
||||
-Dpam=false \
|
||||
-Dzsh-completions=true \
|
||||
build
|
||||
muon samu -C build
|
||||
muon -C build install -d $TT_INSTALLDIR
|
||||
}
|
||||
13
sources/patch/patch.spec
Normal file
13
sources/patch/patch.spec
Normal file
@ -0,0 +1,13 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="f87cee69eec2b4fcbf60a396b030ad6aa3415f192aa5f7ee84cad5e11f7f5ae3"
|
||||
SRC_NAME="patch"
|
||||
SRC_URL="https://ftp.gnu.org/gnu/patch/patch-2.8.tar.xz"
|
||||
SRC_VERSION="2.8"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd patch-$SRC_VERSION/
|
||||
./configure $TT_AUTOCONF_COMMON
|
||||
make -j $TT_PROCS
|
||||
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
24
sources/perl/perl.spec
Normal file
24
sources/perl/perl.spec
Normal file
@ -0,0 +1,24 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="e093ef184d7f9a1b9797e2465296f55510adb6dab8842b0c3ed53329663096dc"
|
||||
SRC_NAME="perl"
|
||||
SRC_REVISION=1
|
||||
SRC_URL="https://www.cpan.org/src/5.0/perl-5.42.0.tar.gz"
|
||||
SRC_VERSION="5.42.0"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd perl-*/
|
||||
# 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
|
||||
make -O -j $TT_PROCS install.perl DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
16
sources/pkgconf/pkgconf.spec
Normal file
16
sources/pkgconf/pkgconf.spec
Normal file
@ -0,0 +1,16 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="cd05c9589b9f86ecf044c10a2269822bc9eb001eced2582cfffd658b0a50c243"
|
||||
SRC_NAME="pkgconf"
|
||||
SRC_URL="https://distfiles.dereferenced.org/pkgconf/pkgconf-2.5.1.tar.xz"
|
||||
SRC_VERSION="2.5.1"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd pkgconf-*/
|
||||
./configure $TT_AUTOCONF_COMMON --disable-static --enable-year2038
|
||||
make -j $TT_PROCS
|
||||
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
# NOTE: Symlink for compatibility's sake. Currently being used by Muon.
|
||||
# ~ahill
|
||||
ln -sf pkgconf $TT_INSTALLDIR/bin/pkg-config
|
||||
}
|
||||
24
sources/python/python.spec
Normal file
24
sources/python/python.spec
Normal file
@ -0,0 +1,24 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="00e07d7c0f2f0cc002432d1ee84d2a40dae404a99303e3f97701c10966c91834"
|
||||
SRC_NAME="python"
|
||||
SRC_URL="https://www.python.org/ftp/python/3.9.25/Python-3.9.25.tar.xz"
|
||||
SRC_VERSION="3.9.25"
|
||||
|
||||
# NOTE: Yes, this is end-of-life, but it's the last version of Python that
|
||||
# supports LibreSSL, so we're stuck with it for now. ~ahill
|
||||
# See also: https://peps.python.org/pep-0644/
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd Python-$SRC_VERSION/
|
||||
# NOTE: Python must do some clang-specific checks because it attempts to
|
||||
# find and link with libclang_rt.profile.a, which unfortunately does
|
||||
# not exist at the moment. Since it only attempts to link when
|
||||
# CC=clang, we just override CC for the configuration portion. ~ahill
|
||||
CC=cc ./configure $TT_AUTOCONF_COMMON --enable-optimizations
|
||||
make -O -j $TT_PROCS
|
||||
make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
# Bad Python! Bad! ~ahill
|
||||
mv $TT_INSTALLDIR/include/python3.9/* $TT_INSTALLDIR/usr/include/python3.9/
|
||||
rm -rf $TT_INSTALLDIR/include
|
||||
}
|
||||
16
sources/ruby/ruby.spec
Normal file
16
sources/ruby/ruby.spec
Normal file
@ -0,0 +1,16 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="3924be2d05db30f4e35f859bf028be85f4b7dd01714142fd823e4af5de2faf9d"
|
||||
SRC_NAME="ruby"
|
||||
SRC_URL="https://cache.ruby-lang.org/pub/ruby/4.0/ruby-4.0.1.tar.gz"
|
||||
SRC_VERSION="4.0.1"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd ruby-$SRC_VERSION/
|
||||
# NOTE: Yes, Ruby has a configuration script already, but it lacks the
|
||||
# --enable-year2038 option, so we rebuild it. ~ahill
|
||||
./autogen.sh
|
||||
./configure $TT_AUTOCONF_COMMON --enable-year2038 --without-gcc
|
||||
make -O -j $TT_PROCS
|
||||
make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
13
sources/sed/sed.spec
Normal file
13
sources/sed/sed.spec
Normal file
@ -0,0 +1,13 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="6e226b732e1cd739464ad6862bd1a1aba42d7982922da7a53519631d24975181"
|
||||
SRC_NAME="sed"
|
||||
SRC_URL="https://ftp.gnu.org/gnu/sed/sed-4.9.tar.xz"
|
||||
SRC_VERSION="4.9"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd sed-$SRC_VERSION/
|
||||
./configure $TT_AUTOCONF_COMMON
|
||||
make -j $TT_PROCS
|
||||
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
13
sources/tar/tar.spec
Normal file
13
sources/tar/tar.spec
Normal file
@ -0,0 +1,13 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="4d62ff37342ec7aed748535323930c7cf94acf71c3591882b26a7ea50f3edc16"
|
||||
SRC_NAME="tar"
|
||||
SRC_URL="https://ftp.gnu.org/gnu/tar/tar-1.35.tar.xz"
|
||||
SRC_VERSION="1.35"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd tar-$SRC_VERSION/
|
||||
./configure $TT_AUTOCONF_COMMON
|
||||
make -j $TT_PROCS
|
||||
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
17
sources/xz/xz.spec
Normal file
17
sources/xz/xz.spec
Normal file
@ -0,0 +1,17 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="ce09c50a5962786b83e5da389c90dd2c15ecd0980a258dd01f70f9e7ce58a8f1"
|
||||
SRC_NAME="xz"
|
||||
SRC_URL="https://github.com/tukaani-project/xz/releases/download/v5.8.2/xz-5.8.2.tar.gz"
|
||||
SRC_VERSION="5.8.2"
|
||||
|
||||
# NOTE: It is important that the source tarball should remain gzip-compressed
|
||||
# rather than xz-compressed, because we are unable to extract
|
||||
# xz-compressed archives until this software is built. ~ahill
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd xz-*/
|
||||
./configure $TT_AUTOCONF_COMMON --disable-static --enable-year2038
|
||||
make -O -j $TT_PROCS
|
||||
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
28
sources/zlib/zlib.spec
Normal file
28
sources/zlib/zlib.spec
Normal file
@ -0,0 +1,28 @@
|
||||
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
|
||||
SRC_HASH="38ef96b8dfe510d42707d9c781877914792541133e1870841463bfa73f883e32"
|
||||
SRC_NAME="zlib"
|
||||
SRC_REVISION=1
|
||||
SRC_URL="https://www.zlib.net/zlib-1.3.1.tar.xz"
|
||||
SRC_VERSION="1.3.1"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd zlib-$SRC_VERSION/
|
||||
# NOTE: The prefix is set to /usr because man pages are stored under the
|
||||
# prefix whether you like it or not. ~ahill
|
||||
# NOTE: Zlib refuses to build a shared library if it can't pass the test.
|
||||
# Rather than stopping the build, it simply proceeds to build a static
|
||||
# library, which causes issues when building libarchive. The test is
|
||||
# failing due to it relying on undefined symbols that are referenced
|
||||
# in the linker script, which LLVM doesn't like at all. To tell LLVM
|
||||
# to ignore it, we pass --undefined-version to the linker. ~ahill
|
||||
CFLAGS="-Wl,--undefined-version $CFLAGS" \
|
||||
./configure \
|
||||
--eprefix=$TT_PREFIX \
|
||||
--includedir=$TT_INCLUDEDIR \
|
||||
--libdir=$TT_LIBDIR \
|
||||
--prefix=/usr \
|
||||
--shared
|
||||
make -O -j $TT_PROCS
|
||||
make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
}
|
||||
24
sources/zsh/zsh.spec
Normal file
24
sources/zsh/zsh.spec
Normal file
@ -0,0 +1,24 @@
|
||||
# Maintainer: Alexander Hill
|
||||
SRC_HASH="9b8d1ecedd5b5e81fbf1918e876752a7dd948e05c1a0dba10ab863842d45acd5"
|
||||
SRC_NAME="zsh"
|
||||
SRC_REVISION=1
|
||||
SRC_URL="https://www.zsh.org/pub/zsh-5.9.tar.xz"
|
||||
SRC_VERSION="5.9"
|
||||
|
||||
build() {
|
||||
tar xf ../$SRC_FILENAME
|
||||
cd zsh-$SRC_VERSION/
|
||||
# NOTE: Zsh uses a lot of tests made of main functions that are missing a
|
||||
# return type. Because of this, clang throws an error, causing the
|
||||
# test to fail. The result is a binary where command substitution
|
||||
# locks the shell up. To fix this, we pass -Wno-implicit-int to the
|
||||
# configure script. ~ahill
|
||||
CFLAGS="$CFLAGS -Wno-implicit-int" \
|
||||
./configure \
|
||||
$TT_AUTOCONF_COMMON \
|
||||
--enable-multibyte \
|
||||
--enable-libc-musl
|
||||
make -O -j $TT_PROCS
|
||||
make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
|
||||
ln -sf zsh $TT_INSTALLDIR/bin/bash
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user