From 86df2512beda69e3747444a1cd48967f00b31f31 Mon Sep 17 00:00:00 2001 From: ag-tsotetsi Date: Sun, 8 Feb 2026 12:02:54 +0200 Subject: [PATCH] added patch toolchain step --- build/patch/build.bash | 48 +++++++++++++++++++++++++++++++++++++++++ build/patch/package.env | 7 ++++++ 2 files changed, 55 insertions(+) create mode 100644 build/patch/build.bash create mode 100644 build/patch/package.env diff --git a/build/patch/build.bash b/build/patch/build.bash new file mode 100644 index 0000000..c7a11fa --- /dev/null +++ b/build/patch/build.bash @@ -0,0 +1,48 @@ +`. "$PROJECTDIR/build/patch/package.env" + +fetch $PATCH_URL + + +cd "$SOURCES" && tar xf patch-$PATCH_VERSION.tar.xz && cd patch-$PATCH_VERSION + + +bootstrap() { + echo bootstrap +} + + +toolchain() { + ./configure \ + --prefix=/usr \ + --host=$TARGET \ + --build=$(build-aux/config.guess) > /dev/null + + make > /dev/null && make DESTDIR="$SYSROOT" install > /dev/null +} + +setup() { + echo setup +} + +final() { + echo final +} + +case $1 in + bootstrap) + bootstrap + ;; + toolchain) + toolchain + ;; + setup) + setup + ;; + final) + final + ;; +esac + + +rm -rf "$SOURCES/patch-$PATCH_VERSION" +` \ No newline at end of file diff --git a/build/patch/package.env b/build/patch/package.env new file mode 100644 index 0000000..fc03faa --- /dev/null +++ b/build/patch/package.env @@ -0,0 +1,7 @@ +export PATCH_VERSION=2.8 + +IFS='.' read -r PATCH_VERSION_MAJOR PATCH_VERSION_MINOR <<< $PATCH_VERSION +export PATCH_VERSION_MAJOR PATCH_VERSION_MINOR + +export PATCH_URL=https://mirror.ufs.ac.za/gnu/patch/patch-$PATCH_VERSION.tar.xz +