diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f34734d..b119b3bb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: - runner: ubuntu-latest os: linux - - runner: macos-15-intel + - runner: macos-26-intel os: macos - runner: macos-26 @@ -31,7 +31,7 @@ jobs: - name: Install Linux requirements if: matrix.os == 'linux' run: | - sudo apt-get -y install gcc libelf-dev autoconf automake bison flex make texinfo patch wget zlib1g-dev libtool-bin bzip2 pkg-config libssl-dev + sudo apt-get -y install gcc libelf-dev autoconf automake bison flex make cmake texinfo patch wget zlib1g-dev libtool-bin bzip2 pkg-config libssl-dev - name: Install MacOS requirements if: matrix.os == 'macos' @@ -42,7 +42,7 @@ jobs: HOMEBREW_NO_ENV_HINTS: 1 run: | eval "$(brew shellenv)" - brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config texinfo + brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config texinfo cmake - name: Create build folder run: | @@ -132,7 +132,7 @@ jobs: - name: Build Libmikmod 3.1.11 run: ./libraries.sh 011 - - name: Build Libxml2 2.7.8 + - name: Build Libxml2 2.9.12 run: ./libraries.sh 012 - name: Build Sdl_psl1ght @@ -195,6 +195,30 @@ jobs: - name: Build Pthread-emb run: ./libraries.sh 032 + - name: Build Libun7zip + run: ./libraries.sh 033 + + - name: Build Libtinytar + run: ./libraries.sh 034 + + - name: Build Libya2d + run: ./libraries.sh 035 + + - name: Build Dbglogger + run: ./libraries.sh 036 + + - name: Build Mini18n + run: ./libraries.sh 037 + + - name: Build Libansilove + run: ./libraries.sh 038 + + - name: Build Yaml-cpp 0.9.0 + run: ./libraries.sh 039 + + - name: Build SDL2 Libs + run: ./libraries.sh 040 + - name: Build Package run: | cd $PSL1GHT diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..c0a8c721 --- /dev/null +++ b/.github/workflows/test.yml @@ -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 \ No newline at end of file diff --git a/.gitignore b/.gitignore index aa650ef0..9d575249 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +build +.DS_Store /build /archives/* !/archives/archives.txt diff --git a/archives/archives.txt b/archives/archives.txt index d0f49b9d..7a865364 100644 --- a/archives/archives.txt +++ b/archives/archives.txt @@ -9,7 +9,7 @@ fe5670640bd49e828d64d2879c31cb4dde9758681bb664f9bdbf159a01b0c76e 589570 https: e63f5dc1b33fd1c02a881d5a819620634a69d1e4ce8637261ca0cb0fbc9f9dca 304965 https://www.nih.at/libzip/libzip-0.9.3.tar.bz2 67b76d075fb74f7cb32e7e4b217701674755fe6cee0f463b259a753fce691da6 1436968 https://download.osgeo.org/libtiff/old/tiff-3.9.4.tar.gz 2d7598cd2a8c61c023f27c9c7c1aca8bbfd92aadbee2f98b7a6d421eae35c929 611590 https://mikmod.raphnet.net/files/libmikmod-3.1.11.tar.gz -cda23bc9ebd26474ca8f3d67e7d1c4a1f1e7106364b690d822e009fdc3c417ec 4881808 http://xmlsoft.org/sources/libxml2-2.7.8.tar.gz +c8d6681e38c56f172892c85ddc0852e1fd4b53b4209e7f4ebf17f7e2eae71d92 5681632 http://xmlsoft.org/sources/libxml2-2.9.12.tar.gz b4cf5a382c061cd75081cf246c2aa2f9df8db04bdda8dcdc6b6cca55bede2419 11125077 https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.4.tar.gz d3605afc28ed4b7d1d9e3142d72e42855e4a23c07c951bbb0299556b02d36755 1741396 https://mirror2.openwrt.org/sources/polarssl-1.3.9-gpl.tgz 432d3f466644b9416bc5b649d344116a753aeaa520c8beaf024a90cba9d3d35d 4008103 https://curl.haxx.se/download/curl-7.64.1.tar.gz @@ -25,9 +25,18 @@ b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc 1903175 https: - - https://github.com/wargio/NoRSX/tarball/master -> NoRSX.tar.gz - - https://github.com/sergiou87/ps3debugnet/tarball/master -> ps3debugnet.tar.gz - - https://github.com/wargio/ps3soundlib/tarball/master -> ps3soundlib.tar.gz -- - https://github.com/wargio/tiny3d/tarball/master -> tiny3d.tar.gz +- - https://github.com/wargio/tiny3d/tarball/master -> tiny3d.tar.gz - - https://github.com/bucanero/libunrar-ps3/tarball/master -> libunrar.tar.gz - - https://github.com/sahlberg/libnfs/tarball/master -> libnfs.tar.gz - - https://github.com/sahlberg/libsmb2/tarball/master -> libsmb2.tar.gz - - https://github.com/clienthax/psl1ght/tarball/master -> psl1ght.tar.gz - - https://github.com/bucanero/pthread-emb-ps3/tarball/master -> pthread-emb-ps3.tar.gz +- - https://github.com/bucanero/libun7zip/tarball/master -> libun7zip.tar.gz +- - https://github.com/bucanero/libtinytar/tarball/master -> libtinytar.tar.gz +- - https://github.com/bucanero/ya2d_ps3/tarball/master -> ya2d.tar.gz +- - https://github.com/bucanero/psl1ght-libs/tarball/master -> psl1ght-libs.tar.gz +- - https://github.com/bucanero/dbglogger/tarball/master -> dbglogger.tar.gz +- - https://github.com/bucanero/mini18n/tarball/master -> mini18n.tar.gz +- - https://github.com/bucanero/libansilove/tarball/master -> libansilove.tar.gz +25cb043240f828a8c51beb830569634bc7ac603978e0f69d6b63558dadefd49a 1056093 https://github.com/jbeder/yaml-cpp/archive/refs/tags/yaml-cpp-0.9.0.tar.gz -> yaml-cpp.tar.gz +- - https://github.com/humbertodias/SDL2_PSL1GHT_Libs/tarball/psl1ght-2.30.1 -> sdl2_psl1ght_libs.tar.gz diff --git a/depends/check-cmake.sh b/depends/check-cmake.sh new file mode 100755 index 00000000..5c6a7c7c --- /dev/null +++ b/depends/check-cmake.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +## Check for cmake. +which cmake 1> /dev/null || { echo "ERROR: Install cmake before continuing."; exit 1; } diff --git a/depends/check-wget.sh b/depends/check-wget.sh index 23576e12..231e3a04 100755 --- a/depends/check-wget.sh +++ b/depends/check-wget.sh @@ -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 diff --git a/download.sh b/download.sh index 3c2c5d6b..6815c3e1 100755 --- a/download.sh +++ b/download.sh @@ -4,7 +4,7 @@ cd "$(dirname "$0")" cd archives || exit 1 ARCHIVE="archives.txt" -WGET="wget --tries=5 --timeout=15 --quiet --show-progress" +WGET="wget --tries=5 --timeout=30 --quiet --show-progress" # ----------------------------------------------------------------------------- # verify_sha256 @@ -146,4 +146,4 @@ if [ "$#" -eq 0 ]; then run_all else run_one "$1" -fi \ No newline at end of file +fi diff --git a/libraries-sudo.sh b/libraries-sudo.sh index ab6ce3a0..b3469b10 100755 --- a/libraries-sudo.sh +++ b/libraries-sudo.sh @@ -6,7 +6,7 @@ cd "`dirname $0`" || { echo "ERROR: Could not enter the ps3libraries directory." ## Set up the environment. export PS3DEV=/usr/local/ps3dev -export PSL1GHT=/usr/local/ps3dev +export PSL1GHT=$PS3DEV export PATH=$PATH:$PS3DEV/bin export PATH=$PATH:$PS3DEV/ppu/bin export PATH=$PATH:$PS3DEV/spu/bin diff --git a/makefile b/makefile new file mode 100644 index 00000000..9a9b964c --- /dev/null +++ b/makefile @@ -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 + +ps3dev/shell: + DOCKER_DEFAULT_PLATFORM=linux/amd64 docker run -it --rm -v "`pwd`:/src" -w /src ${IMAGE} bash + +clean: + rm -rf build diff --git a/scripts/012-libxml2-2.7.8.sh b/scripts/012-libxml2-2.9.12.sh similarity index 79% rename from scripts/012-libxml2-2.7.8.sh rename to scripts/012-libxml2-2.9.12.sh index c59dbb79..78cdf08b 100755 --- a/scripts/012-libxml2-2.7.8.sh +++ b/scripts/012-libxml2-2.9.12.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash set -eo pipefail -# libxml2-2.7.8.sh by Naomi Peori (naomi@peori.ca) -LIBXML2="libxml2-2.7.8" +# libxml2-2.9.12.sh by Naomi Peori (naomi@peori.ca) +LIBXML2="libxml2-2.9.12" ## Source util functions source ../utils/utils.sh @@ -28,8 +28,12 @@ mkdir build-ppu && cd build-ppu ## Configure the build. CFLAGS="-I$PSL1GHT/ppu/include -I$PS3DEV/portlibs/ppu/include" \ LDFLAGS="-L$PSL1GHT/ppu/lib -L$PS3DEV/portlibs/ppu/lib -lrt -llv2" \ +PKG_CONFIG_LIBDIR="$PS3DEV/portlibs/ppu/lib/pkgconfig" \ 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. jobs=$(nproc 2>/dev/null || sysctl -n hw.ncpu) diff --git a/scripts/015-sdl_psl1ght_libs.sh b/scripts/015-sdl_psl1ght_libs.sh index 1cd1e60e..a8338a82 100755 --- a/scripts/015-sdl_psl1ght_libs.sh +++ b/scripts/015-sdl_psl1ght_libs.sh @@ -22,5 +22,9 @@ cd sdl_psl1ght_libs ## Preload config.guess and config.sub cp ../../archives/config.guess ../../archives/config.sub archives/ +## Host Homebrew .pc files must not leak into PPU configure/link. +export PKG_CONFIG_LIBDIR="${PS3DEV}/portlibs/ppu/lib/pkgconfig" +export PKG_CONFIG_PATH="${PS3DEV}/portlibs/ppu/lib/pkgconfig" + ## Compile and install. ./make_SDL_Libs.sh diff --git a/scripts/033-libun7zip.sh b/scripts/033-libun7zip.sh new file mode 100755 index 00000000..85a118b7 --- /dev/null +++ b/scripts/033-libun7zip.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -eo pipefail +# un7Zip library by Bucanero + +## Source util functions +source ../utils/utils.sh + +## Download the source code. +../download.sh libun7zip.tar.gz + +## Unpack the source code. +rm -Rf libun7zip +mkdir libun7zip +echo "Unpacking libun7zip" +extract ../archives/libun7zip.tar.gz --strip-components=1 --directory=libun7zip +cd libun7zip + +## Compile and install. +jobs=$(nproc 2>/dev/null || sysctl -n hw.ncpu) +${MAKE:-make} -j"$jobs" install diff --git a/scripts/034-libtinytar.sh b/scripts/034-libtinytar.sh new file mode 100755 index 00000000..2f9782da --- /dev/null +++ b/scripts/034-libtinytar.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -eo pipefail +# tar/tar.gz/tar.bz2 library by Bucanero + +## Source util functions +source ../utils/utils.sh + +## Download the source code. +../download.sh libtinytar.tar.gz + +## Unpack the source code. +rm -Rf libtinytar +mkdir libtinytar +echo "Unpacking libtinytar" +extract ../archives/libtinytar.tar.gz --strip-components=1 --directory=libtinytar +cd libtinytar + +## Compile and install. +jobs=$(nproc 2>/dev/null || sysctl -n hw.ncpu) +${MAKE:-make} -j"$jobs" install diff --git a/scripts/035-libya2d.sh b/scripts/035-libya2d.sh new file mode 100755 index 00000000..fa1786f7 --- /dev/null +++ b/scripts/035-libya2d.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +set -eo pipefail +# ya2d_ps3 by xerpi +# fork by Bucanero + +## Source util functions +source ../utils/utils.sh + +## Download the source code. +../download.sh ya2d.tar.gz + +## Unpack the source code. +rm -Rf ya2d +mkdir ya2d +echo "Unpacking ya2d" +extract ../archives/ya2d.tar.gz --strip-components=1 --directory=ya2d +cd ya2d/libya2d + +## Compile and install. +jobs=$(nproc 2>/dev/null || sysctl -n hw.ncpu) +${MAKE:-make} -j"$jobs" install diff --git a/scripts/036-dbglogger.sh b/scripts/036-dbglogger.sh new file mode 100755 index 00000000..a033c72c --- /dev/null +++ b/scripts/036-dbglogger.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -eo pipefail +# dbglogger by Bucanero + +## Source util functions +source ../utils/utils.sh + +## Download the source code. +../download.sh dbglogger.tar.gz + +## Unpack the source code. +rm -Rf dbglogger +mkdir dbglogger +echo "Unpacking dbglogger" +extract ../archives/dbglogger.tar.gz --strip-components=1 --directory=dbglogger +cd dbglogger + +## Compile and install. +jobs=$(nproc 2>/dev/null || sysctl -n hw.ncpu) +${MAKE:-make} -j"$jobs" install diff --git a/scripts/037-mini18n.sh b/scripts/037-mini18n.sh new file mode 100755 index 00000000..43a6e567 --- /dev/null +++ b/scripts/037-mini18n.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +set -eo pipefail +# mini18n by Yabause team +# ported to PS3 by Bucanero + +## Source util functions +source ../utils/utils.sh + +## Download the source code. +../download.sh mini18n.tar.gz + +## Unpack the source code. +rm -Rf mini18n +mkdir mini18n +echo "Unpacking mini18n" +extract ../archives/mini18n.tar.gz --strip-components=1 --directory=mini18n +cd mini18n + +## Compile and install. +jobs=$(nproc 2>/dev/null || sysctl -n hw.ncpu) +${MAKE:-make} -j"$jobs" install diff --git a/scripts/038-libansilove.sh b/scripts/038-libansilove.sh new file mode 100755 index 00000000..50fe3d3d --- /dev/null +++ b/scripts/038-libansilove.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +set -eo pipefail +# libansilove by Stefan Vogt, Brian Cassidy, and Frederic Cambus +# ported to PS3 by Bucanero + +## Source util functions +source ../utils/utils.sh + +## Download the source code. +../download.sh libansilove.tar.gz + +## Unpack the source code. +rm -Rf libansilove +mkdir libansilove +echo "Unpacking libansilove" +extract ../archives/libansilove.tar.gz --strip-components=1 --directory=libansilove +cd libansilove + +## Compile and install. +jobs=$(nproc 2>/dev/null || sysctl -n hw.ncpu) +${MAKE:-make} -j"$jobs" install diff --git a/scripts/039-yaml-cpp.sh b/scripts/039-yaml-cpp.sh new file mode 100755 index 00000000..76a5f5ef --- /dev/null +++ b/scripts/039-yaml-cpp.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash +set -eo pipefail +# yaml-cpp-0.9.0.sh by Humberto Dias + +## Source util functions +source ../utils/utils.sh + +## Download the source code. +../download.sh yaml-cpp.tar.gz + +## Unpack the source code. +rm -Rf yaml-cpp +mkdir yaml-cpp +echo "Unpacking yaml-cpp" +extract ../archives/yaml-cpp.tar.gz --strip-components=1 --directory=yaml-cpp +cd yaml-cpp + +## Compile and install. +mkdir -p build +cd build +cmake -Wno-dev \ + -DCMAKE_SYSTEM_NAME=Generic \ + -DCMAKE_SYSTEM_PROCESSOR=powerpc64 \ + -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY \ + -DCMAKE_INSTALL_PREFIX="${PS3DEV}/portlibs/ppu" \ + -DCMAKE_C_COMPILER=ppu-gcc \ + -DCMAKE_CXX_COMPILER=ppu-g++ \ + -DBUILD_SHARED_LIBS=OFF \ + -DYAML_BUILD_SHARED_LIBS=OFF \ + -DYAML_ENABLE_PIC=OFF \ + -DYAML_CPP_BUILD_TOOLS=OFF \ + -DYAML_CPP_BUILD_TESTS=OFF \ + -DYAML_CPP_INSTALL=ON \ + .. +jobs=$(nproc 2>/dev/null || sysctl -n hw.ncpu) +${MAKE:-make} -j"$jobs" yaml-cpp +${MAKE:-make} -j"$jobs" install diff --git a/scripts/040-sdl2_psl1ght_libs.sh b/scripts/040-sdl2_psl1ght_libs.sh new file mode 100755 index 00000000..042540f9 --- /dev/null +++ b/scripts/040-sdl2_psl1ght_libs.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +set -eo pipefail + +# sdl2_psl1ght_libs.sh by Humberto Dias + +## Source util functions +source ../utils/utils.sh + +## Download the source code. +../download.sh sdl2_psl1ght_libs.tar.gz + +## Fetch config.guess and config.sub, falling back to copies if Savannah is unavailable +../config/get-config-scripts.sh + +## Unpack the source code. +rm -Rf sdl2_psl1ght_libs +mkdir sdl2_psl1ght_libs +echo "Unpacking sdl2_psl1ght_libs" +extract ../archives/sdl2_psl1ght_libs.tar.gz --strip-components=1 --directory=sdl2_psl1ght_libs +cd sdl2_psl1ght_libs + +## Preload config.guess and config.sub +cp ../../archives/config.guess ../../archives/config.sub archives/ + +## Host Homebrew .pc files must not leak into PPU configure/link. +export PKG_CONFIG_LIBDIR="${PS3DEV}/portlibs/ppu/lib/pkgconfig" +export PKG_CONFIG_PATH="${PS3DEV}/portlibs/ppu/lib/pkgconfig" + +## Compile and install. +./make_SDL_Libs.sh