Skip to content
Open
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
14 changes: 14 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Run Tests

on: [push, pull_request, workflow_dispatch]

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Run Tests
run: make test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build
.DS_Store
4 changes: 4 additions & 0 deletions depends/check-cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

## Check for cmake.
which cmake 1> /dev/null || { echo "ERROR: Install cmake before continuing."; exit 1; }
21 changes: 21 additions & 0 deletions depends/check-wget.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,24 @@

## Check for wget.
wget -V 1> /dev/null || { echo "ERROR: Install wget before continuing."; exit 1; }

## Setup global wget configuration
## https://www.gnu.org/software/wget/manual/html_node/Wgetrc-Commands.html
echo "
# If this is set to off, the server certificate is not checked against the specified client authorities. The default is “on”
check_certificate = off
# Tune HTTPS security (auto, SSLv2, SSLv3, TLSv1, PFS)
secureprotocol = auto
# You can lower (or raise) the default number of retries when downloading a file (default is 20).
tries = 30
# Set all applicable timeout values to n, the same as ‘-T n’.
timeout = 15
# Specifies the maximum number of redirections to follow for a resource. See ‘--max-redirect=number’.
max_redirect = 50
# no_clobber option, will not overwrite existing files. Instead, it will skip downloading files that already exist locally.
no_clobber = on
# If set to on, force continuation of preexistent partially retrieved files. See ‘-c’ before setting it.
continue = on
# quiet (default is no)
quiet = on
" > ~/.wgetrc
1 change: 1 addition & 0 deletions libraries-sudo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cd "`dirname $0`" || { echo "ERROR: Could not enter the ps3libraries directory."

## Set up the environment.
export PS3DEV=/usr/local/ps3dev
export PSL1GHT=$PS3DEV
export PATH=$PATH:$PS3DEV/bin
export PATH=$PATH:$PS3DEV/ppu/bin
export PATH=$PATH:$PS3DEV/spu/bin
Expand Down
10 changes: 10 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
IMAGE=hldtux/ps3dev

test:
DOCKER_DEFAULT_PLATFORM=linux/amd64 docker run -i --rm -v "`pwd`:/src" -w /src ${IMAGE} ./libraries.sh

run:
DOCKER_DEFAULT_PLATFORM=linux/amd64 docker run -it --rm -v "`pwd`:/src" -w /src ${IMAGE} bash

clean:
rm -rf build
20 changes: 0 additions & 20 deletions patches/libcurl-7.31.0.patch

This file was deleted.

12 changes: 12 additions & 0 deletions patches/polarssl-1.3.9-ipv6.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- a/include/polarssl/config.h
+++ b/include/polarssl/config.h
@@ -112,7 +112,7 @@
*
* Comment if your system does not support the IPv6 socket interface
*/
-#define POLARSSL_HAVE_IPV6
+//#define POLARSSL_HAVE_IPV6

/**
* \def POLARSSL_PLATFORM_MEMORY

File renamed without changes.
25 changes: 25 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[![Run Tests](https://github.com/humbertodias/ps3libraries/actions/workflows/test.yml/badge.svg)](https://github.com/humbertodias/ps3libraries/actions/workflows/test.yml)

### What does this do?

This program will automatically build and install libraries used in the creation
of homebrew software for the Sony Playstation 3 videogame system.

### How do I use it?

1. Set up your environment by installing the following software:

- autoconf
- automake
- libtool
- make
- pkg-config
- ps3toolchain
- psl1ght-sdl1
- wget

2. Run the library script:

```sh
./libraries.sh
```
19 changes: 0 additions & 19 deletions readme.txt

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/001-zlib-1.2.11.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# zlib-1.2.11.sh by Naomi Peori ([email protected])

## Download the source code.
wget --continue https://www.zlib.net/fossils/zlib-1.2.11.tar.gz
wget https://www.zlib.net/fossils/zlib-1.2.11.tar.gz

## Unpack the source code.
rm -Rf zlib-1.2.11 && tar xfvz zlib-1.2.11.tar.gz && cd zlib-1.2.11
Expand Down
6 changes: 3 additions & 3 deletions scripts/002-libpng-1.4.4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# libpng-1.4.4.sh by Naomi Peori ([email protected])

## Download the source code.
wget --continue http://download.sourceforge.net/libpng/libpng-1.4.4.tar.gz
wget http://phoenixnap.dl.sourceforge.net/project/libpng/libpng14/older-releases/1.4.4/libpng-1.4.4.tar.gz

## Download an up-to-date config.guess and config.sub
if [ ! -f config.guess ]; then wget --continue http://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget --continue http://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi
if [ ! -f config.guess ]; then wget http://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget http://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi

## Unpack the source code.
rm -Rf libpng-1.4.4 && tar xfvz libpng-1.4.4.tar.gz && cd libpng-1.4.4
Expand Down
6 changes: 3 additions & 3 deletions scripts/003-jpeg-8b.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# jpeg-8b.sh by Naomi Peori ([email protected])

## Download the source code.
wget --continue http://www.ijg.org/files/jpegsrc.v8b.tar.gz
wget http://www.ijg.org/files/jpegsrc.v8b.tar.gz

## Download an up-to-date config.guess and config.sub
if [ ! -f config.guess ]; then wget --continue http://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget --continue http://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi
if [ ! -f config.guess ]; then wget http://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget http://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi

## Unpack the source code.
rm -Rf jpeg-8b && tar xfvz jpegsrc.v8b.tar.gz && cd jpeg-8b
Expand Down
6 changes: 3 additions & 3 deletions scripts/004-freetype-2.4.3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# freetype-2.4.3.sh by Naomi Peori ([email protected])

## Download the source code.
wget --continue http://download.savannah.gnu.org/releases/freetype/freetype-old/freetype-2.4.3.tar.gz
wget http://download.savannah.gnu.org/releases/freetype/freetype-old/freetype-2.4.3.tar.gz

## Download an up-to-date config.guess and config.sub
if [ ! -f config.guess ]; then wget --continue http://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget --continue http://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi
if [ ! -f config.guess ]; then wget http://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget http://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi

## Unpack the source code.
rm -Rf freetype-2.4.3 && tar xfvz freetype-2.4.3.tar.gz && cd freetype-2.4.3
Expand Down
6 changes: 3 additions & 3 deletions scripts/005-pixman-0.20.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# pixman-0.20.0.sh by Naomi Peori ([email protected])

## Download the source code.
wget --continue http://cairographics.org/releases/pixman-0.20.0.tar.gz
wget http://cairographics.org/releases/pixman-0.20.0.tar.gz

## Download an up-to-date config.guess and config.sub
if [ ! -f config.guess ]; then wget --continue http://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget --continue http://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi
if [ ! -f config.guess ]; then wget http://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget http://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi

## Unpack the source code.
rm -Rf pixman-0.20.0 && tar xfvz pixman-0.20.0.tar.gz && cd pixman-0.20.0
Expand Down
6 changes: 3 additions & 3 deletions scripts/006-cairo-1.10.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# cairo-1.10.0.sh by Naomi Peori ([email protected])

## Download the source code.
wget --continue http://cairographics.org/releases/cairo-1.10.0.tar.gz
wget http://cairographics.org/releases/cairo-1.10.0.tar.gz

## Download an up-to-date config.guess and config.sub
if [ ! -f config.guess ]; then wget --continue http://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget --continue http://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi
if [ ! -f config.guess ]; then wget http://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget http://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi

## Unpack the source code.
rm -Rf cairo-1.10.0 && tar xfvz cairo-1.10.0.tar.gz && cd cairo-1.10.0
Expand Down
6 changes: 3 additions & 3 deletions scripts/007-libogg-1.2.1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# libogg-1.2.1.sh by Naomi Peori ([email protected])

## Download the source code.
wget --continue http://downloads.xiph.org/releases/ogg/libogg-1.2.1.tar.gz
wget http://downloads.xiph.org/releases/ogg/libogg-1.2.1.tar.gz

## Download an up-to-date config.guess and config.sub
if [ ! -f config.guess ]; then wget --continue http://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget --continue http://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi
if [ ! -f config.guess ]; then wget http://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget http://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi

## Unpack the source code.
rm -Rf libogg-1.2.1 && tar xfvz libogg-1.2.1.tar.gz && cd libogg-1.2.1
Expand Down
6 changes: 3 additions & 3 deletions scripts/008-libvorbis-1.3.2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# libvorbis-1.3.2.sh by Naomi Peori ([email protected])

## Download the source code.
wget --continue http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.gz
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.gz

## Download an up-to-date config.guess and config.sub
if [ ! -f config.guess ]; then wget --continue http://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget --continue http://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi
if [ ! -f config.guess ]; then wget http://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget http://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi

## Unpack the source code.
rm -Rf libvorbis-1.3.2 && tar xfvz libvorbis-1.3.2.tar.gz && cd libvorbis-1.3.2
Expand Down
6 changes: 3 additions & 3 deletions scripts/009-libzip-0.9.3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# libzip-0.9.3.sh by Naomi Peori ([email protected])

## Download the source code.
wget --continue http://www.nih.at/libzip/libzip-0.9.3.tar.bz2
wget https://libzip.org/download/libzip-0.9.3.tar.bz2

## Download an up-to-date config.guess and config.sub
if [ ! -f config.guess ]; then wget --continue http://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget --continue http://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi
if [ ! -f config.guess ]; then wget http://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget http://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi

## Unpack the source code.
rm -Rf libzip-0.9.3 && tar xfvj libzip-0.9.3.tar.bz2 && cd libzip-0.9.3
Expand Down
9 changes: 3 additions & 6 deletions scripts/010-tiff-3.9.4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
# tiff-3.9.4.sh by Jon Limle <[email protected]>

## 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
wget --tries 5 --timeout 15 https://ftp.osuosl.org/pub/blfs/conglomeration/tiff/tiff-3.9.4.tar.gz

## Download an up-to-date config.guess and config.sub
if [ ! -f config.guess ]; then wget --continue http://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget --continue http://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi
if [ ! -f config.guess ]; then wget http://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget http://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi

## Unpack the source code.
rm -Rf tiff-3.9.4 && tar xfvz ./tiff-3.9.4.tar.gz && cd tiff-3.9.4
Expand Down
2 changes: 1 addition & 1 deletion scripts/011-libmikmod-3.1.11.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# libmikmod-3.1.11.sh by Marcus Comstedt <[email protected]>

## Download the source code.
wget --continue http://mikmod.raphnet.net/files/libmikmod-3.1.11.tar.gz
wget 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
Expand Down
15 changes: 9 additions & 6 deletions scripts/012-libxml2-2.7.8.sh → scripts/012-libxml2-2.9.12.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
#!/bin/sh -e
# libxml2-2.7.8.sh by Naomi Peori ([email protected])
# libxml2-2.9.12.sh by Naomi Peori ([email protected])

## Download the source code.
wget --continue http://xmlsoft.org/download/libxml2-2.7.8.tar.gz
wget http://xmlsoft.org/download/libxml2-2.9.12.tar.gz -O libxml2.tar.gz

## Download an up-to-date config.guess and config.sub
if [ ! -f config.guess ]; then wget --continue http://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget --continue http://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi
if [ ! -f config.guess ]; then wget http://git.savannah.gnu.org/cgit/config.git/plain/config.guess; fi
if [ ! -f config.sub ]; then wget http://git.savannah.gnu.org/cgit/config.git/plain/config.sub; fi

## Unpack the source code.
rm -Rf libxml2-2.7.8 && tar xfvz libxml2-2.7.8.tar.gz && cd libxml2-2.7.8
rm -Rf libxml2 && mkdir libxml2 && tar --strip-components=1 --directory=libxml2 -xvzf libxml2.tar.gz

## Create the build directory.
cd libxml2

## Replace config.guess and config.sub
cp ../config.guess ../config.sub .
Expand All @@ -21,7 +24,7 @@ mkdir build-ppu && cd build-ppu
CFLAGS="-I$PSL1GHT/ppu/include -I$PS3DEV/portlibs/ppu/include" \
LDFLAGS="-L$PSL1GHT/ppu/lib -L$PS3DEV/portlibs/ppu/lib -lrt -llv2" \
PKG_CONFIG_PATH="$PS3DEV/portlibs/ppu/lib/pkgconfig" \
../configure --prefix="$PS3DEV/portlibs/ppu" --host="powerpc64-ps3-elf" --enable-static --disable-shared --without-ftp --without-http --without-python
../configure --prefix="$PS3DEV/portlibs/ppu" --host="powerpc64-ps3-elf" --enable-static --disable-shared --without-ftp --without-http --without-python --without-lzma

## Compile and install.
${MAKE:-make} -j4 && ${MAKE:-make} install
3 changes: 2 additions & 1 deletion scripts/013-sdl_psl1ght.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# sdl_psl1ght.sh by Naomi Peori ([email protected])

## Download the source code.
wget --no-check-certificate https://github.com/zeldin/SDL_PSL1GHT/tarball/master -O sdl_psl1ght.tar.gz
# SDL1
wget 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
Expand Down
3 changes: 2 additions & 1 deletion scripts/014-sdl_psl1ght_libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# sdl_psl1ght_libs.sh by Naomi Peori ([email protected])

## Download the source code.
wget --no-check-certificate https://github.com/zeldin/SDL_PSL1GHT_Libs/tarball/master -O sdl_psl1ght_libs.tar.gz
# SDL1
wget 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
Expand Down
14 changes: 8 additions & 6 deletions scripts/015-polarssl.sh → scripts/015-polarssl-1.3.9.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
###########################################################################
# Change values here
#
VERSION="1.2.8"
VERSION="1.3.9"
#
###########################################################################
#
Expand All @@ -32,20 +32,22 @@ 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
wget -O polarssl-${VERSION}.gpl.tgz https://src.fedoraproject.org/repo/pkgs/polarssl/polarssl-1.3.9-gpl.tgz/48af7d1f0d5de512cbd6dacf5407884c/polarssl-${VERSION}-gpl.tgz

## Unpack the source code.
rm -Rf polarssl-${VERSION} && tar xfvz polarssl-${VERSION}.tgz && cd mbedtls-polarssl-${VERSION}/library
rm -Rf polarssl-${VERSION} && tar xfvz polarssl-${VERSION}.gpl.tgz && cd polarssl-${VERSION}

## Patch the source code.
echo "Patching net.c and timing.c for compatibility..."
cat ../../../patches/polarssl-1.2.8-net.patch | patch -p1
cat ../../../patches/polarssl-1.2.8-timing.patch | patch -p1
cat ../../patches/polarssl-1.3.9-ipv6.patch | patch -p1
cd library
cat ../../../patches/polarssl-1.3.9-net.patch | patch -p1
cat ../../../patches/polarssl-1.3.9-timing.patch | patch -p1

echo "Building polarssl for ${PLATFORM} ${SDKVERSION} ${ARCH}"

echo "Patching Makefile..."
sed -i.bak '4d' ${CURRENTPATH}/mbedtls-polarssl-${VERSION}/library/Makefile
sed -i.bak '4d' ${CURRENTPATH}/polarssl-${VERSION}/library/Makefile

echo "Please stand by..."

Expand Down
Loading