From 4addc71df4f8f9f65fd179a767e210127f00d9e6 Mon Sep 17 00:00:00 2001 From: Haxy Date: Sat, 6 Jun 2026 13:40:17 +0100 Subject: [PATCH 1/4] Build refactoring, all downloads take place before any build attempts and are cached where possible. --- .github/workflows/CI.yml | 8 ---- .gitignore | 1 + download-manifest.txt | 22 +++++++++++ libraries.sh | 12 ++++-- readme.md | 2 +- scripts/000-download-files.sh | 65 +++++++++++++++++++++++++++++++++ scripts/001-zlib-1.2.13.sh | 8 ++-- scripts/002-libpng-1.4.4.sh | 13 +++---- scripts/003-jpeg-8b.sh | 13 +++---- scripts/004-freetype-2.4.3.sh | 13 +++---- scripts/005-pixman-0.20.0.sh | 13 +++---- scripts/006-cairo-1.10.0.sh | 13 +++---- scripts/007-libogg-1.2.1.sh | 13 +++---- scripts/008-libvorbis-1.3.2.sh | 13 +++---- scripts/009-libzip-0.9.3.sh | 13 +++---- scripts/010-tiff-3.9.4.sh | 16 +++----- scripts/011-libmikmod-3.1.11.sh | 8 ++-- scripts/012-libxml2-2.7.8.sh | 14 +++---- scripts/013-sdl_psl1ght.sh | 10 ++--- scripts/014-sdl_psl1ght_libs.sh | 9 ++--- scripts/015-polarssl.sh | 8 ++-- scripts/016-libcurl-7.31.0.sh | 13 +++---- scripts/017-libmad-0.15.1b.sh | 13 +++---- scripts/018-flac-1.2.1.sh | 13 +++---- scripts/019-faad2-2.7.sh | 13 +++---- scripts/020-libtheora-1.1.1.sh | 13 +++---- scripts/021-NoRSX.sh | 9 +++-- scripts/022-libjson.sh | 14 +++---- scripts/get-config-scripts.sh | 38 ------------------- 29 files changed, 202 insertions(+), 211 deletions(-) create mode 100644 download-manifest.txt create mode 100755 scripts/000-download-files.sh delete mode 100755 scripts/get-config-scripts.sh diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1730322..cc2c8b1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -17,14 +17,6 @@ jobs: test -x scripts/get-config-scripts.sh find scripts depends -name '*.sh' -exec test -x {} \; - - name: Check config helper fallback path - run: | - mkdir -p build - cd build - CONFIG_BASE_URL="https://127.0.0.1/does-not-exist" CONFIG_TIMEOUT=1 ../scripts/get-config-scripts.sh - test -s config.guess - test -s config.sub - - name: Check no direct Savannah config downloads remain run: | ! grep -R "git.savannah.gnu.org.*config\.\(guess\|sub\)" -n scripts depends \ No newline at end of file diff --git a/.gitignore b/.gitignore index 378eac2..80cfb55 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ build +downloads diff --git a/download-manifest.txt b/download-manifest.txt new file mode 100644 index 0000000..fa32b06 --- /dev/null +++ b/download-manifest.txt @@ -0,0 +1,22 @@ +https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz zlib-1.2.13.tar.gz b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30 +http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.gz libvorbis-1.3.2.tar.gz eeb4dcada143846dfba760d982954a02f82e08845cbc33871f5dac547b8b6124 +http://www.nih.at/libzip/libzip-0.9.3.tar.bz2 libzip-0.9.3.tar.bz2 e63f5dc1b33fd1c02a881d5a819620634a69d1e4ce8637261ca0cb0fbc9f9dca +http://download.osgeo.org/libtiff/old/tiff-3.9.4.tar.gz tiff-3.9.4.tar.gz 67b76d075fb74f7cb32e7e4b217701674755fe6cee0f463b259a753fce691da6 +http://mikmod.raphnet.net/files/libmikmod-3.1.11.tar.gz libmikmod-3.1.11.tar.gz 2d7598cd2a8c61c023f27c9c7c1aca8bbfd92aadbee2f98b7a6d421eae35c929 +http://xmlsoft.org/sources/libxml2-2.7.8.tar.gz libxml2-2.7.8.tar.gz cda23bc9ebd26474ca8f3d67e7d1c4a1f1e7106364b690d822e009fdc3c417ec +https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/polarssl-1.2.8.tar.gz polarssl-1.2.8.tgz 832f645de0bd2a1767f04bbaac41e46a7e6393c274f6ac666f840e63154502b7 +http://curl.haxx.se/download/curl-7.31.0.tar.gz curl-7.31.0.tar.gz 2c3a65eecca799f57f57163d40644ba642426230274a2dc51d0a6d049a63616a +http://downloads.sourceforge.net/project/mad/libmad/0.15.1b/libmad-0.15.1b.tar.gz libmad-0.15.1b.tar.gz bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690 +http://downloads.sourceforge.net/project/flac/flac-src/flac-1.2.1-src/flac-1.2.1.tar.gz flac-1.2.1.tar.gz 9635a44bceb478bbf2ee8a785cf6986fba525afb5fad1fd4bba73cf71f2d3edf +http://downloads.sourceforge.net/faac/faad2-2.7.tar.gz faad2-2.7.tar.gz ee26ed1e177c0cd8fa8458a481b14a0b24ca0b51468c8b4c8b676fd3ceccd330 +http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2 libtheora-1.1.1.tar.bz2 b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc +https://codeload.github.com/json-c/json-c/tar.gz/json-c-0.11-20130402 jsonc.tar.gz 9988283408c71838d8d62e5418e5abb5eb5300bd84c385fdc96143b5e8f10ed5 +http://download.sourceforge.net/libpng/libpng-1.4.4.tar.gz libpng-1.4.4.tar.gz d07616ba1e9c161017384feb3b576d70c160b970abfd9549ad39a622284b574a +http://www.ijg.org/files/jpegsrc.v8b.tar.gz jpegsrc.v8b.tar.gz 64be2429346b1aa84a014fc47264661ca2e6c786aea25afecb363d5973b4e6a9 +http://download.savannah.gnu.org/releases/freetype/freetype-old/freetype-2.4.3.tar.gz freetype-2.4.3.tar.gz 33ec92273c2d809e51dece879c09d206e5dfa3d6deb7ce9e4c2bf0891b8111f9 +http://cairographics.org/releases/pixman-0.20.0.tar.gz pixman-0.20.0.tar.gz 9c02c22c6cc3f28f3633d02ef6f0cac130518f621edb011ebbbf08cd1a81251a +http://cairographics.org/releases/cairo-1.10.0.tar.gz cairo-1.10.0.tar.gz 0f2ce4cc4615594088d74eb8b5360bad7c3cc3c3da9b61af9bfd979ed1ed94b2 +http://downloads.xiph.org/releases/ogg/libogg-1.2.1.tar.gz libogg-1.2.1.tar.gz 6858848617bca6eab01e7d8526bc0d2a417e95070a255cbf9c881881365e36c0 +https://github.com/zeldin/SDL_PSL1GHT/tarball/master sdl_psl1ght.tar.gz +https://github.com/zeldin/SDL_PSL1GHT_Libs/tarball/master sdl_psl1ght_libs.tar.gz +https://github.com/wargio/NoRSX/tarball/master NoRSX.tar.gz diff --git a/libraries.sh b/libraries.sh index 6076f8b..fd2ef1a 100755 --- a/libraries.sh +++ b/libraries.sh @@ -10,11 +10,15 @@ mkdir -p build || { echo "ERROR: Could not create the build directory."; exit 1; ## Enter the build directory. cd build || { echo "ERROR: Could not enter the build directory."; exit 1; } -## Fetch the depend scripts. -DEPEND_SCRIPTS=`ls ../depends/*.sh | sort` - ## Run all the depend scripts. -for SCRIPT in $DEPEND_SCRIPTS; do "$SCRIPT" || { echo "$SCRIPT: Failed."; exit 1; } done +failed=0 +for SCRIPT in $(ls ../depends/*.sh | sort); do + "$SCRIPT" || { + echo "$SCRIPT: Failed." + failed=1 + } +done +[ "$failed" -ne 0 ] && exit "$failed" ## Fetch the build scripts. BUILD_SCRIPTS=`ls ../scripts/*.sh | sort` diff --git a/readme.md b/readme.md index 5bdf931..57be083 100644 --- a/readme.md +++ b/readme.md @@ -10,7 +10,7 @@ 1) Set up your environment by installing the following software: ``` - autoconf, automake, libtool, make, pkg-config, ps3toolchain, psl1ght, wget + autoconf, automake, libtool, make, pkg-config, ps3toolchain, psl1ght, wget, pv ``` 2) Run the library script: diff --git a/scripts/000-download-files.sh b/scripts/000-download-files.sh new file mode 100755 index 0000000..a0fcc6f --- /dev/null +++ b/scripts/000-download-files.sh @@ -0,0 +1,65 @@ +#!/bin/bash +set -euo pipefail + +MANIFEST="../download-manifest.txt" +DOWNLOAD_DIR="../downloads" + +echo "Downloading files to ${DOWNLOAD_DIR}" + +mkdir -p "$DOWNLOAD_DIR" + +while IFS= read -r line || [[ -n "$line" ]]; do + # handle Windows line endings + line="${line%$'\r'}" + + # skip blanks/comments + [[ -z "$line" || "$line" == \#* ]] && continue + + url=$(awk '{print $1}' <<< "$line") + filename=$(awk '{print $2}' <<< "$line") + expected_sha=$(awk '{print $3}' <<< "$line") + + filepath="$DOWNLOAD_DIR/$filename" + tmpfile="${filepath}.tmp" + + # URL + filename only → always download + if [[ -z "${expected_sha:-}" ]]; then + echo "No SHA provided, force downloading: $filepath" + curl -L -o "$tmpfile" "$url" + mv "$tmpfile" "$filepath" + echo "Downloaded: $filepath" + continue + fi + + # SHA mode → cache check + if [[ -f "$filepath" ]]; then + actual_sha=$(sha256sum "$filepath" | awk '{print $1}') + + if [[ "$actual_sha" == "$expected_sha" ]]; then + echo "OK (cached): $filepath" + continue + else + echo "SHA mismatch, re-downloading: $filepath" + fi + else + echo "Missing file, downloading: $filepath" + fi + + curl -L -o "$tmpfile" "$url" + + actual_sha=$(sha256sum "$tmpfile" | awk '{print $1}') + + if [[ "$actual_sha" == "$expected_sha" ]]; then + mv "$tmpfile" "$filepath" + echo "OK: $filepath" + else + echo "FAIL: $filepath" + echo "Expected: $expected_sha" + echo "Got: $actual_sha" + rm -f "$tmpfile" + exit 1 + fi + +done < "$MANIFEST" + +echo "All files verified." \ No newline at end of file diff --git a/scripts/001-zlib-1.2.13.sh b/scripts/001-zlib-1.2.13.sh index 9e3a26d..16721a9 100755 --- a/scripts/001-zlib-1.2.13.sh +++ b/scripts/001-zlib-1.2.13.sh @@ -2,11 +2,11 @@ # zlib-1.2.13.sh by Naomi Peori (naomi@peori.ca) ZLIB="zlib-1.2.13" -## Download the source code. -wget --continue https://github.com/madler/zlib/releases/download/v1.2.13/${ZLIB}.tar.gz - ## Unpack the source code. -rm -Rf ${ZLIB} && tar xfvz ${ZLIB}.tar.gz && cd ${ZLIB} +rm -Rf ${ZLIB} +echo "Unpacking %{ZLIB}" +pv -pterab ../downloads/${ZLIB}.tar.gz | tar xzf - +cd ${ZLIB} ## Patch the source code. cat ../../patches/${ZLIB}-PPU.patch | patch -p1 diff --git a/scripts/002-libpng-1.4.4.sh b/scripts/002-libpng-1.4.4.sh index 4a6626e..03f4033 100755 --- a/scripts/002-libpng-1.4.4.sh +++ b/scripts/002-libpng-1.4.4.sh @@ -1,17 +1,14 @@ #!/bin/sh -e # libpng-1.4.4.sh by Naomi Peori (naomi@peori.ca) -## Download the source code. -wget --continue http://download.sourceforge.net/libpng/libpng-1.4.4.tar.gz - -## Fetch config.guess and config.sub, falling back to copies if Savannah is unavailable -../scripts/get-config-scripts.sh - ## Unpack the source code. -rm -Rf libpng-1.4.4 && tar xfvz libpng-1.4.4.tar.gz && cd libpng-1.4.4 +rm -Rf libpng-1.4.4 +echo "Unpacking libpng-1.4.4" +pv -pterab ../downloads/libpng-1.4.4.tar.gz | tar xzf - +cd libpng-1.4.4 ## Replace config.guess and config.sub -cp ../config.guess ../config.sub . +cp "$(automake --print-libdir)"/config.guess "$(automake --print-libdir)"/config.sub . ## Create the build directory. mkdir build-ppu && cd build-ppu diff --git a/scripts/003-jpeg-8b.sh b/scripts/003-jpeg-8b.sh index 9786497..3c9cb46 100755 --- a/scripts/003-jpeg-8b.sh +++ b/scripts/003-jpeg-8b.sh @@ -1,17 +1,14 @@ #!/bin/sh -e # jpeg-8b.sh by Naomi Peori (naomi@peori.ca) -## Download the source code. -wget --continue http://www.ijg.org/files/jpegsrc.v8b.tar.gz - -## Fetch config.guess and config.sub, falling back to copies if Savannah is unavailable -../scripts/get-config-scripts.sh - ## Unpack the source code. -rm -Rf jpeg-8b && tar xfvz jpegsrc.v8b.tar.gz && cd jpeg-8b +rm -Rf jpeg-8b +echo "Unpacking jpeg-8b" +pv -pterab ../downloads/jpegsrc.v8b.tar.gz | tar xzf - +cd jpeg-8b ## Replace config.guess and config.sub -cp ../config.guess ../config.sub . +cp "$(automake --print-libdir)"/config.guess "$(automake --print-libdir)"/config.sub . ## Patch the source code. cat ../../patches/jpeg-8b-PPU.patch | patch -p1 diff --git a/scripts/004-freetype-2.4.3.sh b/scripts/004-freetype-2.4.3.sh index 4294697..02334c3 100755 --- a/scripts/004-freetype-2.4.3.sh +++ b/scripts/004-freetype-2.4.3.sh @@ -1,17 +1,14 @@ #!/bin/sh -e # freetype-2.4.3.sh by Naomi Peori (naomi@peori.ca) -## Download the source code. -wget --continue http://download.savannah.gnu.org/releases/freetype/freetype-old/freetype-2.4.3.tar.gz - -## Fetch config.guess and config.sub, falling back to copies if Savannah is unavailable -../scripts/get-config-scripts.sh - ## Unpack the source code. -rm -Rf freetype-2.4.3 && tar xfvz freetype-2.4.3.tar.gz && cd freetype-2.4.3 +rm -Rf freetype-2.4.3 +echo "Unpacking freetype-2.4.3" +pv -pterab ../downloads/freetype-2.4.3.tar.gz | tar xzf - +cd freetype-2.4.3 ## Replace config.guess and config.sub -cp ../config.guess ../config.sub builds/unix/ +cp "$(automake --print-libdir)"/config.guess "$(automake --print-libdir)"/config.sub builds/unix/ ## Create the build directory. mkdir build-ppu && cd build-ppu diff --git a/scripts/005-pixman-0.20.0.sh b/scripts/005-pixman-0.20.0.sh index 577b970..23514a5 100755 --- a/scripts/005-pixman-0.20.0.sh +++ b/scripts/005-pixman-0.20.0.sh @@ -1,17 +1,14 @@ #!/bin/sh -e # pixman-0.20.0.sh by Naomi Peori (naomi@peori.ca) -## Download the source code. -wget --continue http://cairographics.org/releases/pixman-0.20.0.tar.gz - -## Fetch config.guess and config.sub, falling back to copies if Savannah is unavailable -../scripts/get-config-scripts.sh - ## Unpack the source code. -rm -Rf pixman-0.20.0 && tar xfvz pixman-0.20.0.tar.gz && cd pixman-0.20.0 +rm -Rf pixman-0.20.0 +echo "Unpacking pixman-0.20.0" +pv -pterab ../downloads/pixman-0.20.0.tar.gz | tar xzf - +cd pixman-0.20.0 ## Replace config.guess and config.sub -cp ../config.guess ../config.sub . +cp "$(automake --print-libdir)"/config.guess "$(automake --print-libdir)"/config.sub . ## Create the build directory. mkdir build-ppu && cd build-ppu diff --git a/scripts/006-cairo-1.10.0.sh b/scripts/006-cairo-1.10.0.sh index 8be9b24..051dc52 100755 --- a/scripts/006-cairo-1.10.0.sh +++ b/scripts/006-cairo-1.10.0.sh @@ -1,17 +1,14 @@ #!/bin/sh -e # cairo-1.10.0.sh by Naomi Peori (naomi@peori.ca) -## Download the source code. -wget --continue http://cairographics.org/releases/cairo-1.10.0.tar.gz - -## Fetch config.guess and config.sub, falling back to copies if Savannah is unavailable -../scripts/get-config-scripts.sh - ## Unpack the source code. -rm -Rf cairo-1.10.0 && tar xfvz cairo-1.10.0.tar.gz && cd cairo-1.10.0 +rm -Rf cairo-1.10.0 +echo "Unpacking cairo-1.10.0" +pv -pterab ../downloads/cairo-1.10.0.tar.gz | tar xzf - +cd cairo-1.10.0 ## Replace config.guess and config.sub -cp ../config.guess ../config.sub build/ +cp "$(automake --print-libdir)"/config.guess "$(automake --print-libdir)"/config.sub build/ ## Patch the source code. cat ../../patches/cairo-1.10.0.patch | patch -p1 diff --git a/scripts/007-libogg-1.2.1.sh b/scripts/007-libogg-1.2.1.sh index 924ed3c..66a6b53 100755 --- a/scripts/007-libogg-1.2.1.sh +++ b/scripts/007-libogg-1.2.1.sh @@ -1,17 +1,14 @@ #!/bin/sh -e # libogg-1.2.1.sh by Naomi Peori (naomi@peori.ca) -## Download the source code. -wget --continue http://downloads.xiph.org/releases/ogg/libogg-1.2.1.tar.gz - -## Fetch config.guess and config.sub, falling back to copies if Savannah is unavailable -../scripts/get-config-scripts.sh - ## Unpack the source code. -rm -Rf libogg-1.2.1 && tar xfvz libogg-1.2.1.tar.gz && cd libogg-1.2.1 +rm -Rf libogg-1.2.1 +echo "Unpacking libogg-1.2.1" +pv -pterab ../downloads/libogg-1.2.1.tar.gz | tar xzf - +cd libogg-1.2.1 ## Replace config.guess and config.sub -cp ../config.guess ../config.sub . +cp "$(automake --print-libdir)"/config.guess "$(automake --print-libdir)"/config.sub . ## Create the build directory. mkdir build-ppu && cd build-ppu diff --git a/scripts/008-libvorbis-1.3.2.sh b/scripts/008-libvorbis-1.3.2.sh index 6d4fea7..18cf42b 100755 --- a/scripts/008-libvorbis-1.3.2.sh +++ b/scripts/008-libvorbis-1.3.2.sh @@ -1,17 +1,14 @@ #!/bin/sh -e # libvorbis-1.3.2.sh by Naomi Peori (naomi@peori.ca) -## Download the source code. -wget --continue http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.gz - -## Fetch config.guess and config.sub, falling back to copies if Savannah is unavailable -../scripts/get-config-scripts.sh - ## Unpack the source code. -rm -Rf libvorbis-1.3.2 && tar xfvz libvorbis-1.3.2.tar.gz && cd libvorbis-1.3.2 +rm -Rf libvorbis-1.3.2 +echo "Unpacking libvorbis-1.3.2" +pv -pterab ../downloads/libvorbis-1.3.2.tar.gz | tar xzf - +cd libvorbis-1.3.2 ## Replace config.guess and config.sub -cp ../config.guess ../config.sub . +cp "$(automake --print-libdir)"/config.guess "$(automake --print-libdir)"/config.sub . ## Create the build directory. mkdir build-ppu && cd build-ppu diff --git a/scripts/009-libzip-0.9.3.sh b/scripts/009-libzip-0.9.3.sh index 9439fc5..7b9cd05 100755 --- a/scripts/009-libzip-0.9.3.sh +++ b/scripts/009-libzip-0.9.3.sh @@ -1,17 +1,14 @@ #!/bin/sh -e # libzip-0.9.3.sh by Naomi Peori (naomi@peori.ca) -## Download the source code. -wget --continue http://www.nih.at/libzip/libzip-0.9.3.tar.bz2 - -## Fetch config.guess and config.sub, falling back to copies if Savannah is unavailable -../scripts/get-config-scripts.sh - ## Unpack the source code. -rm -Rf libzip-0.9.3 && tar xfvj libzip-0.9.3.tar.bz2 && cd libzip-0.9.3 +rm -Rf libzip-0.9.3 +echo "Unpacking libzip-0.9.3.tar" +pv -pterab ../downloads/libzip-0.9.3.tar.tar.bz2 | tar xjf - +cd libzip-0.9.3 ## Replace config.guess and config.sub -cp ../config.guess ../config.sub . +cp "$(automake --print-libdir)"/config.guess "$(automake --print-libdir)"/config.sub . ## Create the build directory. mkdir build-ppu && cd build-ppu diff --git a/scripts/010-tiff-3.9.4.sh b/scripts/010-tiff-3.9.4.sh index fb9d595..7358f9f 100755 --- a/scripts/010-tiff-3.9.4.sh +++ b/scripts/010-tiff-3.9.4.sh @@ -1,20 +1,14 @@ #!/bin/sh -e # tiff-3.9.4.sh by Jon Limle -## Download the source code. -wget --tries 5 --timeout 15 --continue \ - http://download.osgeo.org/libtiff/old/tiff-3.9.4.tar.gz \ -|| wget --continue \ - https://github.com/downloads/ps3dev/ps3libraries/tiff-3.9.4.tar.gz - -## Fetch config.guess and config.sub, falling back to copies if Savannah is unavailable -../scripts/get-config-scripts.sh - ## Unpack the source code. -rm -Rf tiff-3.9.4 && tar xfvz ./tiff-3.9.4.tar.gz && cd tiff-3.9.4 +rm -Rf tiff-3.9.4 +echo "Unpacking tiff-3.9.4.tar.gz" +pv -pterab ../downloads/tiff-3.9.4.tar.gz | tar xzf - +cd tiff-3.9.4 ## Replace config.guess and config.sub -cp ../config.guess ../config.sub config/ +cp "$(automake --print-libdir)"/config.guess "$(automake --print-libdir)"/config.sub config/ ## Patch the source code. cat ../../patches/tiff-3.9.4-PPU.patch | patch -p1 diff --git a/scripts/011-libmikmod-3.1.11.sh b/scripts/011-libmikmod-3.1.11.sh index 79b3352..499f55d 100755 --- a/scripts/011-libmikmod-3.1.11.sh +++ b/scripts/011-libmikmod-3.1.11.sh @@ -1,11 +1,11 @@ #!/bin/sh -e # libmikmod-3.1.11.sh by Marcus Comstedt -## Download the source code. -wget --continue http://mikmod.raphnet.net/files/libmikmod-3.1.11.tar.gz - ## Unpack the source code. -rm -Rf libmikmod-3.1.11 && tar xfvz ./libmikmod-3.1.11.tar.gz && cd libmikmod-3.1.11 +rm -Rf libmikmod-3.1.11 +echo "Unpacking libmikmod-3.1.11" +pv -pterab ../downloads/libmikmod-3.1.11.tar.gz | tar xzf - +cd libmikmod-3.1.11 ## Patch the source code. cat ../../patches/libmikmod-3.1.11-PPU.patch | patch -p1 diff --git a/scripts/012-libxml2-2.7.8.sh b/scripts/012-libxml2-2.7.8.sh index cbfb43d..5286a1c 100755 --- a/scripts/012-libxml2-2.7.8.sh +++ b/scripts/012-libxml2-2.7.8.sh @@ -1,17 +1,15 @@ #!/bin/sh -e # libxml2-2.7.8.sh by Naomi Peori (naomi@peori.ca) -## Download the source code. -wget --continue http://xmlsoft.org/sources/libxml2-2.7.8.tar.gz -O libxml2-2.7.8.tar.gz - -## Fetch config.guess and config.sub, falling back to copies if Savannah is unavailable -../scripts/get-config-scripts.sh - ## Unpack the source code. -rm -Rf libxml2-2.7.8 && mkdir libxml2-2.7.8 && tar --strip-components=1 -xvzf libxml2-2.7.8.tar.gz -C libxml2-2.7.8 && cd libxml2-2.7.8 +rm -Rf libxml2-2.7.8 +mkdir libxml2-2.7.8 +echo "Unpacking libxml2-2.7.8" +pv -pterb ../downloads/libxml2-2.7.8.tar.gz | tar --strip-components=1 -xzf - +cd libxml2-2.7.8 ## Replace config.guess and config.sub -cp ../config.guess ../config.sub . +cp "$(automake --print-libdir)"/config.guess "$(automake --print-libdir)"/config.sub . ## Create the build directory. mkdir build-ppu && cd build-ppu diff --git a/scripts/013-sdl_psl1ght.sh b/scripts/013-sdl_psl1ght.sh index 2c0f439..ac97bbf 100755 --- a/scripts/013-sdl_psl1ght.sh +++ b/scripts/013-sdl_psl1ght.sh @@ -1,13 +1,11 @@ #!/bin/sh -e # sdl_psl1ght.sh by Naomi Peori (naomi@peori.ca) -## Download the source code. -wget --no-check-certificate https://github.com/zeldin/SDL_PSL1GHT/tarball/master -O sdl_psl1ght.tar.gz - ## Unpack the source code. -rm -Rf sdl_psl1ght && mkdir sdl_psl1ght && tar --strip-components=1 --directory=sdl_psl1ght -xvzf sdl_psl1ght.tar.gz - -## Create the build directory. +rm -Rf sdl_psl1ght +mkdir sdl_psl1ght +echo "Unpacking sdl_psl1ght" +pv -pterb ../downloads/sdl_psl1ght.tar.gz | tar --strip-components=1 --directory=sdl_psl1ght -xzf - cd sdl_psl1ght ## Compile and install. diff --git a/scripts/014-sdl_psl1ght_libs.sh b/scripts/014-sdl_psl1ght_libs.sh index e34f6a2..6e34264 100755 --- a/scripts/014-sdl_psl1ght_libs.sh +++ b/scripts/014-sdl_psl1ght_libs.sh @@ -1,13 +1,10 @@ #!/bin/sh -e # sdl_psl1ght_libs.sh by Naomi Peori (naomi@peori.ca) -## Download the source code. -wget --no-check-certificate https://github.com/zeldin/SDL_PSL1GHT_Libs/tarball/master -O sdl_psl1ght_libs.tar.gz - ## Unpack the source code. -rm -Rf sdl_psl1ght_libs && mkdir sdl_psl1ght_libs && tar --strip-components=1 --directory=sdl_psl1ght_libs -xvzf sdl_psl1ght_libs.tar.gz - -## Create the build directory. +rm -Rf sdl_psl1ght_libs +mkdir sdl_psl1ght_libs +pv -pterb ../downloads/sdl_psl1ght_libs.tar.gz | tar --strip-components=1 --directory=sdl_psl1ght_libs -xzf - cd sdl_psl1ght_libs ## Compile and install. diff --git a/scripts/015-polarssl.sh b/scripts/015-polarssl.sh index d9daf8e..7622cc2 100755 --- a/scripts/015-polarssl.sh +++ b/scripts/015-polarssl.sh @@ -31,11 +31,11 @@ CURRENTPATH=`pwd` ARCH="powerpc64" PLATFORM="PS3" -## Download the source code. -wget --continue --no-check-certificate -O polarssl-${VERSION}.tgz https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/polarssl-${VERSION}.tar.gz - ## Unpack the source code. -rm -Rf polarssl-${VERSION} && tar xfvz polarssl-${VERSION}.tgz && cd mbedtls-polarssl-${VERSION}/library +rm -Rf polarssl-${VERSION} +echo "Unpacking polarssl-${VERSION}" +pv -pterab ../downloads/polarssl-${VERSION}.tgz | tar xzf - +cd mbedtls-polarssl-${VERSION}/library ## Patch the source code. echo "Patching net.c and timing.c for compatibility..." diff --git a/scripts/016-libcurl-7.31.0.sh b/scripts/016-libcurl-7.31.0.sh index 86f54b4..e40d3d7 100755 --- a/scripts/016-libcurl-7.31.0.sh +++ b/scripts/016-libcurl-7.31.0.sh @@ -2,17 +2,14 @@ # libcurl-7.31.0 by KaKaRoTo # modified by mhaqs for 7.31.0 release and cpp compatibility -## Download the source code. -wget --continue http://curl.haxx.se/download/curl-7.31.0.tar.gz - -## Fetch config.guess and config.sub, falling back to copies if Savannah is unavailable -../scripts/get-config-scripts.sh - ## Unpack the source code. -rm -Rf curl-7.31.0 && tar xfvz curl-7.31.0.tar.gz && cd curl-7.31.0 +rm -Rf curl-7.31.0 +echo "Unpacking curl-7.31.0" +pv -pterab ../downloads/curl-7.31.0.tar.gz | tar xzf - +cd curl-7.31.0 ## Replace config.guess and config.sub -cp ../config.guess ../config.sub . +cp "$(automake --print-libdir)"/config.guess "$(automake --print-libdir)"/config.sub . ## Patch the source code. cat ../../patches/libcurl-7.31.0.patch | patch -p1 diff --git a/scripts/017-libmad-0.15.1b.sh b/scripts/017-libmad-0.15.1b.sh index ebb59f6..ebe558e 100755 --- a/scripts/017-libmad-0.15.1b.sh +++ b/scripts/017-libmad-0.15.1b.sh @@ -1,17 +1,14 @@ #!/bin/sh -e # libmad-0.15.1b.sh by dhewg (dhewg@wiibrew.org) -## Download the source code. -wget --continue http://downloads.sourceforge.net/project/mad/libmad/0.15.1b/libmad-0.15.1b.tar.gz - -## Fetch config.guess and config.sub, falling back to copies if Savannah is unavailable -../scripts/get-config-scripts.sh - ## Unpack the source code. -rm -Rf libmad-0.15.1b && tar xfvz libmad-0.15.1b.tar.gz && cd libmad-0.15.1b +rm -Rf libmad-0.15.1b +echo "Unpacking libmad-0.15.1b" +pv -pterab ../downloads/libmad-0.15.1b.tar.gz | tar xzf - +cd libmad-0.15.1b ## Replace config.guess and config.sub -cp ../config.guess ../config.sub . +cp "$(automake --print-libdir)"/config.guess "$(automake --print-libdir)"/config.sub . ## Create the build directory. mkdir build-ppu && cd build-ppu diff --git a/scripts/018-flac-1.2.1.sh b/scripts/018-flac-1.2.1.sh index 8e493dd..74ffc33 100755 --- a/scripts/018-flac-1.2.1.sh +++ b/scripts/018-flac-1.2.1.sh @@ -1,17 +1,14 @@ #!/bin/sh -e # flac-1.2.1.sh by dhewg (dhewg@wiibrew.org) -## Download the source code. -wget --continue http://downloads.sourceforge.net/project/flac/flac-src/flac-1.2.1-src/flac-1.2.1.tar.gz - -## Fetch config.guess and config.sub, falling back to copies if Savannah is unavailable -../scripts/get-config-scripts.sh - ## Unpack the source code. -rm -Rf flac-1.2.1 && tar xfvz flac-1.2.1.tar.gz && cd flac-1.2.1 +rm -Rf flac-1.2.1 +echo "Unpacking flac-1.2.1" +pv -pterab ../downloads/flac-1.2.1.tar.gz | tar xzf - +cd flac-1.2.1 ## Replace config.guess and config.sub -cp ../config.guess ../config.sub . +cp "$(automake --print-libdir)"/config.guess "$(automake --print-libdir)"/config.sub . ## Create the build directory. mkdir build-ppu && cd build-ppu diff --git a/scripts/019-faad2-2.7.sh b/scripts/019-faad2-2.7.sh index d5eed3e..7df7547 100755 --- a/scripts/019-faad2-2.7.sh +++ b/scripts/019-faad2-2.7.sh @@ -1,17 +1,14 @@ #!/bin/sh -e # faad2-2.7.sh by dhewg (dhewg@wiibrew.org) -## Download the source code. -wget --continue http://downloads.sourceforge.net/faac/faad2-2.7.tar.gz - -## Fetch config.guess and config.sub, falling back to copies if Savannah is unavailable -../scripts/get-config-scripts.sh - ## Unpack the source code. -rm -Rf faad2-2.7 && tar xfvz faad2-2.7.tar.gz && cd faad2-2.7 +rm -Rf faad2-2.7 +echo "Unpacking faad2-2.7" +pv -pterab ../downloads/faad2-2.7.tar.gz | tar xzf - +cd faad2-2.7 ## Replace config.guess and config.sub -cp ../config.guess ../config.sub . +cp "$(automake --print-libdir)"/config.guess "$(automake --print-libdir)"/config.sub . ## Create the build directory. mkdir build-ppu && cd build-ppu diff --git a/scripts/020-libtheora-1.1.1.sh b/scripts/020-libtheora-1.1.1.sh index 06245b2..dc75b8f 100755 --- a/scripts/020-libtheora-1.1.1.sh +++ b/scripts/020-libtheora-1.1.1.sh @@ -1,17 +1,14 @@ #!/bin/sh -e # libtheora-1.1.1.sh by dhewg (dhewg@wiibrew.org) -## Download the source code. -wget --continue http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2 - -## Fetch config.guess and config.sub, falling back to copies if Savannah is unavailable -../scripts/get-config-scripts.sh - ## Unpack the source code. -rm -Rf libtheora-1.1.1 && tar xfvj libtheora-1.1.1.tar.bz2 && cd libtheora-1.1.1 +rm -Rf libtheora-1.1.1 +echo "Unpacking libtheora-1.1.1" +pv -pterab ../downloads/libtheora-1.1.1.tar.bz2 | tar xjf - +cd libtheora-1.1.1 ## Replace config.guess and config.sub -cp ../config.guess ../config.sub . +cp "$(automake --print-libdir)"/config.guess "$(automake --print-libdir)"/config.sub . ## Create the build directory. mkdir build-ppu && cd build-ppu diff --git a/scripts/021-NoRSX.sh b/scripts/021-NoRSX.sh index ea0505d..da79907 100755 --- a/scripts/021-NoRSX.sh +++ b/scripts/021-NoRSX.sh @@ -1,11 +1,12 @@ #!/bin/sh -e # libNoRSX.sh by wargio (wargio@libero.it) -## Download the source code. -wget --no-check-certificate https://github.com/wargio/NoRSX/tarball/master -O NoRSX.tar.gz - ## Unpack the source code. -rm -Rf NoRSX && mkdir NoRSX && tar --strip-components=1 --directory=NoRSX -xvzf NoRSX.tar.gz && cd NoRSX +rm -Rf NoRSX +mkdir NoRSX +echo "Unpacking NoRSX" +pv -pterb ../downloads/NoRSX-master.tar.gz | tar --strip-components=1 --directory=psl1ght -xzf - +cd NoRSX ## Compile and install. ${MAKE:-make} diff --git a/scripts/022-libjson.sh b/scripts/022-libjson.sh index 20c2338..1b06b06 100755 --- a/scripts/022-libjson.sh +++ b/scripts/022-libjson.sh @@ -1,19 +1,15 @@ #!/bin/sh -e # libjson-c.sh by Mohammad Haseeb (mmhaqs@gmail.com) -wget --no-check-certificate https://codeload.github.com/json-c/json-c/tar.gz/json-c-0.11-20130402 -O jsonc.tar.gz - -## Fetch config.guess and config.sub, falling back to copies if Savannah is unavailable -../scripts/get-config-scripts.sh - ## Unpack the source code. -rm -Rf jsonc && mkdir jsonc && tar --strip-components=1 --directory=jsonc -xvzf jsonc.tar.gz - -## Create the build directory. +rm -Rf jsonc +mkdir jsonc +echo "Unpacking jsonc" +pv -pterab ../downloads/jsonc.tar.gz | tar xzf - cd jsonc ## Replace config.guess and config.sub -cp ../config.guess ../config.sub . +cp "$(automake --print-libdir)"/config.guess "$(automake --print-libdir)"/config.sub . ## Configure the build. CFLAGS="-Wno-error -I$PSL1GHT/ppu/include -I$PS3DEV/portlibs/ppu/include" \ diff --git a/scripts/get-config-scripts.sh b/scripts/get-config-scripts.sh deleted file mode 100755 index 306d7e5..0000000 --- a/scripts/get-config-scripts.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -e - -CONFIG_TIMEOUT="${CONFIG_TIMEOUT:-15}" -CONFIG_BASE_URL="https://git.savannah.gnu.org/cgit/config.git/plain" - -SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -ROOT_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)" -ASSET_DIR="${ROOT_DIR}/assets" - -fetch_config_file() { - file="$1" - url="${CONFIG_BASE_URL}/${file}" - tmp="${file}.tmp" - - echo "Fetching ${file} from Savannah, timeout ${CONFIG_TIMEOUT}s..." - - if command -v curl >/dev/null 2>&1; then - if curl -fsSL --connect-timeout 5 --max-time "${CONFIG_TIMEOUT}" "${url}" -o "${tmp}"; then - mv "${tmp}" "${file}" - chmod +x "${file}" - return 0 - fi - elif command -v wget >/dev/null 2>&1; then - if wget --timeout="${CONFIG_TIMEOUT}" --tries=1 -O "${tmp}" "${url}"; then - mv "${tmp}" "${file}" - chmod +x "${file}" - return 0 - fi - fi - - echo "Falling back to safe ${file}." - rm -f "${tmp}" - cp "${ASSET_DIR}/${file}" "${file}" - chmod +x "${file}" -} - -fetch_config_file config.guess -fetch_config_file config.sub \ No newline at end of file From b8ec907ed618c5da08ad3ab9b26ba5ab43059b5a Mon Sep 17 00:00:00 2001 From: Haxy Date: Sat, 6 Jun 2026 17:21:03 +0100 Subject: [PATCH 2/4] Fix --- scripts/009-libzip-0.9.3.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/009-libzip-0.9.3.sh b/scripts/009-libzip-0.9.3.sh index 7b9cd05..686b973 100755 --- a/scripts/009-libzip-0.9.3.sh +++ b/scripts/009-libzip-0.9.3.sh @@ -4,7 +4,7 @@ ## Unpack the source code. rm -Rf libzip-0.9.3 echo "Unpacking libzip-0.9.3.tar" -pv -pterab ../downloads/libzip-0.9.3.tar.tar.bz2 | tar xjf - +pv -pterab ../downloads/libzip-0.9.3.tar.bz2 | tar xjf - cd libzip-0.9.3 ## Replace config.guess and config.sub From 3345a7e248aaf55a3a30fa4bf53afedf6acf0afc Mon Sep 17 00:00:00 2001 From: Haxy Date: Sat, 6 Jun 2026 17:58:38 +0100 Subject: [PATCH 3/4] Fix --- scripts/012-libxml2-2.7.8.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/012-libxml2-2.7.8.sh b/scripts/012-libxml2-2.7.8.sh index 5286a1c..b45e659 100755 --- a/scripts/012-libxml2-2.7.8.sh +++ b/scripts/012-libxml2-2.7.8.sh @@ -5,7 +5,7 @@ rm -Rf libxml2-2.7.8 mkdir libxml2-2.7.8 echo "Unpacking libxml2-2.7.8" -pv -pterb ../downloads/libxml2-2.7.8.tar.gz | tar --strip-components=1 -xzf - +pv -pterb ../downloads/libxml2-2.7.8.tar.gz | tar --strip-components=1 -C libxml2-2.7.8 -xzf - cd libxml2-2.7.8 ## Replace config.guess and config.sub From cfb063aa9a5525e7157fcb00e1c98d9ebee7add2 Mon Sep 17 00:00:00 2001 From: Haxy Date: Sat, 6 Jun 2026 20:35:32 +0100 Subject: [PATCH 4/4] temp --- download-manifest.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/download-manifest.txt b/download-manifest.txt index fa32b06..4fb7a41 100644 --- a/download-manifest.txt +++ b/download-manifest.txt @@ -18,5 +18,5 @@ http://cairographics.org/releases/pixman-0.20.0.tar.gz pixman-0.20.0.tar.gz 9c02 http://cairographics.org/releases/cairo-1.10.0.tar.gz cairo-1.10.0.tar.gz 0f2ce4cc4615594088d74eb8b5360bad7c3cc3c3da9b61af9bfd979ed1ed94b2 http://downloads.xiph.org/releases/ogg/libogg-1.2.1.tar.gz libogg-1.2.1.tar.gz 6858848617bca6eab01e7d8526bc0d2a417e95070a255cbf9c881881365e36c0 https://github.com/zeldin/SDL_PSL1GHT/tarball/master sdl_psl1ght.tar.gz -https://github.com/zeldin/SDL_PSL1GHT_Libs/tarball/master sdl_psl1ght_libs.tar.gz +https://github.com/clienthax/SDL_PSL1GHT_Libs/tarball/master sdl_psl1ght_libs.tar.gz https://github.com/wargio/NoRSX/tarball/master NoRSX.tar.gz