Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ac00f97
reviewing scripts
humbertodias Mar 2, 2024
8300b6a
add github action for testing
humbertodias Mar 2, 2024
14e68f9
readme markdown
humbertodias Mar 3, 2024
b02d5ca
badge ci/cd
humbertodias Mar 3, 2024
470a06e
define workdir
humbertodias Mar 3, 2024
f04f5b0
add sdl2_psl1ght_libs
humbertodias Mar 3, 2024
e9d3cc0
Update 040-sdl2_psl1ght.sh
humbertodias Mar 3, 2024
08dd324
libxml2-2.9.12.sh
humbertodias Mar 3, 2024
aa5788b
ignore .DS_Store
humbertodias Mar 3, 2024
5823130
add yaml-cpp-0.8.0
humbertodias Mar 4, 2024
dd2355c
exit 1 when fail pthreads-emb
humbertodias Mar 4, 2024
147275d
rename singular
humbertodias Mar 4, 2024
7e67cb0
libxml2 --without-lzma
humbertodias Mar 11, 2024
c930464
psl1ght-2.30.1
humbertodias Mar 12, 2024
cc675f8
Update check-wget.sh
humbertodias Mar 14, 2024
9b62534
Update 041-sdl2_psl1ght_libs.sh
humbertodias Mar 14, 2024
f924107
Update 041-sdl2_psl1ght_libs.sh
humbertodias Mar 14, 2024
5871f58
check-cmake
humbertodias Apr 6, 2024
bc86d43
merge master into psl1ght-2.30.1
humbertodias Sep 5, 2026
3b7de88
add 041-sdl2_psl1ght_libs.sh
humbertodias Sep 5, 2026
decaf04
Merge branch 'master' into psl1ght-2.30.1
humbertodias Sep 5, 2026
37bb005
Build SDL 1.3/2.31 and add-on libraries from upstream tarballs with P…
humbertodias Sep 5, 2026
72078b9
Fix host xz/lzma leak in libxml2 macOS cross-builds.
humbertodias Sep 5, 2026
f7bdf11
Build SDL3 3.5.0 and add-on libraries from upstream tarballs with a P…
humbertodias Sep 5, 2026
430e445
Build SDL3_image 3.4.6 from the official tarball with a PPU patch
humbertodias Sep 5, 2026
f50f47a
Group SDL, SDL2, and SDL3 scripts in core/mixer/image order
humbertodias Sep 5, 2026
b48576a
Load SDL3_image PNG through stb; portlibs libpng 1.4 is too old for …
humbertodias Sep 5, 2026
c463267
Fix host libavif leak in 021-SDL2_image-2.8.2.sh macOS cross-builds
humbertodias Sep 5, 2026
6878a75
Build SDL 1.2.15 from libsdl-org/SDL-1.2 with a PPU patch
humbertodias Sep 5, 2026
2fe31ae
Build SDL3_net 3.2.0 from the official tarball with a PPU patch
humbertodias Sep 6, 2026
2ff5f04
Build SDL3_gfx 1.0.1 with a PPU patch
humbertodias Sep 6, 2026
e81e07a
Increasing timeout=30
humbertodias Sep 6, 2026
d3d55ea
Drop the duplicate mbedTLS 2.28.10 script
humbertodias Sep 6, 2026
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
108 changes: 84 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- runner: ubuntu-latest
os: linux

- runner: macos-15-intel
- runner: macos-26-intel
os: macos

- runner: macos-26
Expand All @@ -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'
Expand All @@ -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: |
Expand Down Expand Up @@ -132,69 +132,129 @@ 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
- name: Build SDL 1.2.15
run: ./libraries.sh 013

- name: Build Sdl2_psl1ght
- name: Build SDL_mixer 1.2.11
run: ./libraries.sh 014

- name: Build Sdl_psl1ght_libs
- name: Build SDL_image 1.2.10
run: ./libraries.sh 015

- name: Build SDL2_mixer 2.0.4
- name: Build SDL_gfx 2.0.27
run: ./libraries.sh 016

- name: Build Polarssl 1.3.9
- name: Build SDL_net 1.2.7
run: ./libraries.sh 017

- name: Build MbedTLS 2.28.10
- name: Build SDL_ttf 2.0.10
run: ./libraries.sh 018

- name: Build Libmad 0.15.1b
- name: Build SDL2 2.31.0
run: ./libraries.sh 019

- name: Build Flac 1.2.1
- name: Build SDL2_mixer 2.8.0
run: ./libraries.sh 020

- name: Build Faad2 2.7
- name: Build SDL2_image 2.8.2
run: ./libraries.sh 021

- name: Build Libtheora 1.1.1
- name: Build SDL2_ttf 2.22.0
run: ./libraries.sh 022

- name: Build NoRSX
- name: Build SDL2_gfx 1.0.4
run: ./libraries.sh 023

- name: Build Libjson
- name: Build SDL3 3.5.0
run: ./libraries.sh 024

- name: Build Debugnet
- name: Build SDL3_mixer 3.2.4
run: ./libraries.sh 025

- name: Build Ps3soundlib
- name: Build SDL3_image 3.4.6
run: ./libraries.sh 026

- name: Build Tiny3d_libfont
- name: Build SDL3_net 3.2.0
run: ./libraries.sh 027

- name: Build Libcurl 7.64.1
- name: Build SDL3_ttf 3.2.2
run: ./libraries.sh 028

- name: Build Libunrar
- name: Build SDL3_gfx 1.0.1
run: ./libraries.sh 029

- name: Build Libnfs
- name: Build Polarssl 1.3.9
run: ./libraries.sh 030

- name: Build Libsmb2
- name: Build MbedTLS 2.28.10
run: ./libraries.sh 031

- name: Build Pthread-emb
- name: Build Libmad 0.15.1b
run: ./libraries.sh 032

- name: Build Flac 1.2.1
run: ./libraries.sh 033

- name: Build Faad2 2.7
run: ./libraries.sh 034

- name: Build Libtheora 1.1.1
run: ./libraries.sh 035

- name: Build NoRSX
run: ./libraries.sh 036

- name: Build Libjson
run: ./libraries.sh 037

- name: Build Debugnet
run: ./libraries.sh 038

- name: Build Ps3soundlib
run: ./libraries.sh 039

- name: Build Tiny3d_libfont
run: ./libraries.sh 040

- name: Build Libcurl 7.64.1
run: ./libraries.sh 041

- name: Build Libunrar
run: ./libraries.sh 042

- name: Build Libnfs
run: ./libraries.sh 043

- name: Build Libsmb2
run: ./libraries.sh 044

- name: Build Pthread-emb
run: ./libraries.sh 045

- name: Build Libun7zip
run: ./libraries.sh 046

- name: Build Libtinytar
run: ./libraries.sh 047

- name: Build Libya2d
run: ./libraries.sh 048

- name: Build Dbglogger
run: ./libraries.sh 049

- name: Build Mini18n
run: ./libraries.sh 050

- name: Build Libansilove
run: ./libraries.sh 051

- name: Build Yaml-cpp 0.9.0
run: ./libraries.sh 052

- name: Build Package
run: |
cd $PSL1GHT
Expand Down
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
build
.DS_Store
/build
/archives/*
!/archives/archives.txt
Expand Down
33 changes: 27 additions & 6 deletions archives/archives.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,18 @@ 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
b4cf5a382c061cd75081cf246c2aa2f9df8db04bdda8dcdc6b6cca55bede2419 11125077 https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.4.tar.gz
c8d6681e38c56f172892c85ddc0852e1fd4b53b4209e7f4ebf17f7e2eae71d92 5681632 http://xmlsoft.org/sources/libxml2-2.9.12.tar.gz
dfb15ac5f8ce7a4952dc12d2aed9747518c5e6b335c0e31636d23f93c630f419 1693451 http://www.ferzkopp.net/Software/SDL_gfx-2.0/SDL_gfx-2.0.27.tar.gz
75e05d1e95f6277b44797157d9e25a908ba8d08a393216ffb019b0d74de11876 1332906 https://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.10.tar.gz
86145ac39cac6d2c6169c226f937648dca5e89dcd828751763dd174fa9af9cf9 2690654 https://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.11.tar.gz
2ce7c84e62ff8117b9f205758bcce68ea603e08bc9d6936ded343735b8b77c53 373866 https://www.libsdl.org/projects/SDL_net/release/SDL_net-1.2.7.tar.gz
7d38704bcc7c34029c2dcb73b2d4857e8ad76341c6e0faed279eb9f743c66c6a 1326737 https://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.10.tar.gz
8f486bbfbcf8464dd58c9e5d93394ab0255ce68b51c5a966a918244820a76ddc 11362515 https://github.com/libsdl-org/SDL_image/releases/download/release-2.8.2/SDL2_image-2.8.2.tar.gz
1cfb34c87b26dbdbc7afd68c4f545c0116ab5f90bbfecc5aebe2a9cb4bb31549 10874471 https://github.com/libsdl-org/SDL_mixer/releases/download/release-2.8.0/SDL2_mixer-2.8.0.tar.gz
d48cbd1ce475b9e178206bf3b72d56b66d84d44f64ac05803328396234d67723 14314901 https://github.com/libsdl-org/SDL_ttf/releases/download/release-2.22.0/SDL2_ttf-2.22.0.tar.gz
63e0e01addedc9df2f85b93a248f06e8a04affa014a835c2ea34bfe34e576262 1230588 http://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-1.0.4.tar.gz
5172f97606100080603a48e5279a2b90213905c77e17953ce2a13cff03e10bef 3743019 https://github.com/libsdl-org/SDL-1.2/archive/refs/tags/release-1.2.15.tar.gz -> SDL-1.2.15.tar.gz
01215ffbc8cfc4ad165ba7573750f15ddda1f971d5a66e9dcaffd37c587f473a 7428023 https://github.com/libsdl-org/SDL/releases/download/release-2.30.1/SDL2-2.30.1.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
bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690 502379 https://downloads.sourceforge.net/project/mad/libmad/0.15.1b/libmad-0.15.1b.tar.gz
Expand All @@ -19,15 +29,26 @@ ee26ed1e177c0cd8fa8458a481b14a0b24ca0b51468c8b4c8b676fd3ceccd330 1137407 https:
b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc 1903175 https://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2
9988283408c71838d8d62e5418e5abb5eb5300bd84c385fdc96143b5e8f10ed5 455089 https://codeload.github.com/json-c/json-c/tar.gz/json-c-0.11-20130402 -> json-c-0.11-20130402.tar.gz
19e5b81fdac0fe22009b9e2bdcd52d7dcafbf62bc67fc59cf0a76b5b5540d149 3489179 https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-2.28.10/mbedtls-2.28.10.tar.bz2
- - 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/shagkur/SDL_PSL1GHT/archive/refs/heads/sdl2_master.tar.gz -> sdl2_psl1ght.tar.gz
- - 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
b7eef526854ca06935fa3c235467914c521ef3584c28914820ec6342fcaf9c5a 16502097 https://github.com/libsdl-org/SDL/archive/f2c4ef111d9892f0332f60568b1e646fa51cdf98.tar.gz -> SDL3-3.5.0.tar.gz
d2e4637ae700f72e5196b8fbd749850ed2e5e1e09c5a5be8d06ff55aaccf3b01 8604748 https://github.com/libsdl-org/SDL_image/releases/download/release-3.4.6/SDL3_image-3.4.6.tar.gz
182a07c745375e113dc740d43964ff21b0be29f29f59876c4dbc4db3d32f6901 5161139 https://github.com/libsdl-org/SDL_mixer/releases/download/release-3.2.4/SDL3_mixer-3.2.4.tar.gz
63547d58d0185c833213885b635a2c0548201cc8f301e6587c0be1a67e1e045d 1545950 https://github.com/libsdl-org/SDL_ttf/releases/download/release-3.2.2/SDL3_ttf-3.2.2.tar.gz
098522fc26d4e302ef9348aee6e76e67fe504dfefd7f596236568f8330570c41 1497570 https://github.com/libsdl-org/SDL_net/releases/download/release-3.2.0/SDL3_net-3.2.0.tar.gz
b92e6002825f92b19e10abe8a974f0c38839f6bfb9b065f2d8dd14c51bf12a77 5139685 https://github.com/sabdul-khabir/SDL3_gfx/archive/refs/tags/v1.0.1.tar.gz -> SDL3_gfx-1.0.1.tar.gz
92 changes: 92 additions & 0 deletions cmake/ps3dev.toolchain.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#
# CMake toolchain for the PS3 PPU (powerpc64-ps3-elf).
#
# Use:
# cmake -DCMAKE_TOOLCHAIN_FILE=$PS3DEV/share/cmake/ps3dev.toolchain.cmake ...
#

cmake_minimum_required(VERSION 3.12)

if(DEFINED ENV{PS3DEV})
set(PS3DEV $ENV{PS3DEV})
else()
message(FATAL_ERROR "The environment variable PS3DEV needs to be defined.")
endif()

set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR powerpc64)
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)

set(CMAKE_C_COMPILER powerpc64-ps3-elf-gcc)
set(CMAKE_CXX_COMPILER powerpc64-ps3-elf-g++)
set(CMAKE_ASM_COMPILER powerpc64-ps3-elf-g++)

set(PPC_INC
${PS3DEV}/ppu/include
${PS3DEV}/ppu/include/simdmath
${PS3DEV}/portlibs/ppu/include
)
set(PPC_LIB
${PS3DEV}/ppu/lib
${PS3DEV}/ppu/ppu/lib
${PS3DEV}/portlibs/ppu/lib
)

set(PPC_MACHDEP -mhard-float -fmodulo-sched -ffunction-sections -fdata-sections)
set(PPC_CFLAGS -O2 -Wall -mcpu=cell ${PPC_MACHDEP})
set(PPC_LDFLAGS -Wl,-zmax-page-size=128)
set(PPC_LIBS -lgcm_sys -lrsx -lsysutil -lio -lm -lz -lrt -llv2 -laudio)

string(JOIN " " PPC_CFLAGS_STR ${PPC_CFLAGS})
string(JOIN " " PPC_LDFLAGS_STR ${PPC_LDFLAGS})
string(JOIN " " PPC_LIBS_STR ${PPC_LIBS})
list(TRANSFORM PPC_INC PREPEND "-I" OUTPUT_VARIABLE PPC_INC_FLAGS)
string(JOIN " " PPC_INC_STR ${PPC_INC_FLAGS})
list(TRANSFORM PPC_LIB PREPEND "-L" OUTPUT_VARIABLE PPC_LIB_FLAGS)
string(JOIN " " PPC_LIB_STR ${PPC_LIB_FLAGS})

set(CMAKE_C_FLAGS_INIT "${PPC_CFLAGS_STR} ${PPC_INC_STR}")
set(CMAKE_CXX_FLAGS_INIT ${CMAKE_C_FLAGS_INIT})
set(CMAKE_EXE_LINKER_FLAGS_INIT "${PPC_LDFLAGS_STR} ${PPC_LIB_STR}")
set(CMAKE_SHARED_LINKER_FLAGS "${PPC_LIBS_STR}")

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

set(CMAKE_INSTALL_PREFIX "${PS3DEV}/portlibs/ppu" CACHE PATH "" FORCE)
set(CMAKE_PREFIX_PATH "${PS3DEV}/portlibs/ppu" CACHE PATH "" FORCE)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)

set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)

add_compile_definitions(PS3 __PS3__)
set(PS3 TRUE)

macro(ps3_target_setup target)
target_compile_options(${target} PRIVATE ${PPC_CFLAGS})
target_link_options(${target} PRIVATE ${PPC_LDFLAGS})
target_link_directories(${target} PRIVATE ${PPC_LIB})
target_include_directories(${target} PUBLIC ${PPC_INC})
target_link_libraries(${target} PUBLIC ${PPC_LIBS})
endmacro()

function(ps3_build_self target)
set(ELF_FILE $<TARGET_FILE:${target}>)
set(STRIPPED_ELF ${ELF_FILE}.stripped.elf)
set(SELF_FILE ${ELF_FILE}.self)
set(FSELF_FILE ${ELF_FILE}.fake.self)

add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND echo "Running PS3 post-build steps..."
COMMAND ${PS3DEV}/bin/sprxlinker ${ELF_FILE}
COMMAND ${PS3DEV}/ppu/bin/powerpc64-ps3-elf-strip --strip-debug ${ELF_FILE} -o ${STRIPPED_ELF}
COMMAND ${PS3DEV}/bin/make_self ${STRIPPED_ELF} ${SELF_FILE}
COMMAND ${PS3DEV}/bin/fself ${STRIPPED_ELF} ${FSELF_FILE}
COMMAND echo "Done: ${SELF_FILE}"
)
endfunction()
Loading
Loading