Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build
downloads
22 changes: 22 additions & 0 deletions download-manifest.txt
Original file line number Diff line number Diff line change
@@ -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/clienthax/SDL_PSL1GHT_Libs/tarball/master sdl_psl1ght_libs.tar.gz
https://github.com/wargio/NoRSX/tarball/master NoRSX.tar.gz
12 changes: 8 additions & 4 deletions libraries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
65 changes: 65 additions & 0 deletions scripts/000-download-files.sh
Original file line number Diff line number Diff line change
@@ -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."
8 changes: 4 additions & 4 deletions scripts/001-zlib-1.2.13.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 5 additions & 8 deletions scripts/002-libpng-1.4.4.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 5 additions & 8 deletions scripts/003-jpeg-8b.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 5 additions & 8 deletions scripts/004-freetype-2.4.3.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 5 additions & 8 deletions scripts/005-pixman-0.20.0.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 5 additions & 8 deletions scripts/006-cairo-1.10.0.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 5 additions & 8 deletions scripts/007-libogg-1.2.1.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 5 additions & 8 deletions scripts/008-libvorbis-1.3.2.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 5 additions & 8 deletions scripts/009-libzip-0.9.3.sh
Original file line number Diff line number Diff line change
@@ -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.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
Expand Down
16 changes: 5 additions & 11 deletions scripts/010-tiff-3.9.4.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
#!/bin/sh -e
# tiff-3.9.4.sh by Jon Limle <jonlimle123@yahoo.com>

## 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
Expand Down
8 changes: 4 additions & 4 deletions scripts/011-libmikmod-3.1.11.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/sh -e
# libmikmod-3.1.11.sh by Marcus Comstedt <marcus@mc.pp.se>

## 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
Expand Down
Loading