From 3503760674fade97d3146f34be56cb1035afa562 Mon Sep 17 00:00:00 2001 From: Marcus Comstedt Date: Fri, 18 Sep 2020 20:13:15 +0200 Subject: [PATCH 1/3] Change downloads of tarball/master from github into submodules This allows the version to be pinned and the download to be validated, as well as allowing for download.sh to perform all networking operations ahead of time. --- .gitmodules | 31 +++++++++++++++++++++++++++++++ archives/archives.txt | 10 ---------- download.sh | 9 +++++++++ scripts/013-sdl_psl1ght.sh | 4 ++-- scripts/014-sdl2_psl1ght.sh | 4 ++-- scripts/015-sdl_psl1ght_libs.sh | 4 ++-- scripts/023-NoRSX.sh | 4 ++-- scripts/025-debugnet.sh | 4 ++-- scripts/026-ps3soundlib.sh | 4 ++-- scripts/027-tiny3d_libfont.sh | 4 ++-- scripts/029-libunrar.sh | 4 ++-- scripts/030-libnfs.sh | 4 ++-- scripts/031-libsmb2.sh | 4 ++-- submodules/NoRSX | 1 + submodules/SDL2_PSL1GHT | 1 + submodules/SDL_PSL1GHT | 1 + submodules/SDL_PSL1GHT_Libs | 1 + submodules/libnfs | 1 + submodules/libsmb2 | 1 + submodules/libunrar-ps3 | 1 + submodules/ps3debugnet | 1 + submodules/ps3soundlib | 1 + submodules/tiny3d | 1 + 23 files changed, 70 insertions(+), 30 deletions(-) create mode 100644 .gitmodules create mode 160000 submodules/NoRSX create mode 160000 submodules/SDL2_PSL1GHT create mode 160000 submodules/SDL_PSL1GHT create mode 160000 submodules/SDL_PSL1GHT_Libs create mode 160000 submodules/libnfs create mode 160000 submodules/libsmb2 create mode 160000 submodules/libunrar-ps3 create mode 160000 submodules/ps3debugnet create mode 160000 submodules/ps3soundlib create mode 160000 submodules/tiny3d diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..0975e578 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,31 @@ +[submodule "submodules/SDL_PSL1GHT"] + path = submodules/SDL_PSL1GHT + url = https://github.com/zeldin/SDL_PSL1GHT +[submodule "submodules/SDL2_PSL1GHT"] + branch = sdl2_master + path = submodules/SDL2_PSL1GHT + url = https://github.com/shagkur/SDL_PSL1GHT +[submodule "submodules/SDL_PSL1GHT_Libs"] + path = submodules/SDL_PSL1GHT_Libs + url = https://github.com/zeldin/SDL_PSL1GHT_Libs +[submodule "submodules/NoRSX"] + path = submodules/NoRSX + url = https://github.com/wargio/NoRSX +[submodule "submodules/ps3debugnet"] + path = submodules/ps3debugnet + url = https://github.com/sergiou87/ps3debugnet +[submodule "submodules/ps3soundlib"] + path = submodules/ps3soundlib + url = https://github.com/wargio/ps3soundlib +[submodule "submodules/tiny3d"] + path = submodules/tiny3d + url = https://github.com/wargio/tiny3d +[submodule "submodules/libunrar-ps3"] + path = submodules/libunrar-ps3 + url = https://github.com/bucanero/libunrar-ps3 +[submodule "submodules/libnfs"] + path = submodules/libnfs + url = https://github.com/sahlberg/libnfs +[submodule "submodules/libsmb2"] + path = submodules/libsmb2 + url = https://github.com/sahlberg/libsmb2 diff --git a/archives/archives.txt b/archives/archives.txt index 24bc31c9..ef9602c8 100644 --- a/archives/archives.txt +++ b/archives/archives.txt @@ -19,13 +19,3 @@ ee1b4d67ea2d76ee52c5621bc6dbf61e 1137407 http://downloads.sourceforge.net/faac/ 292ab65cedd5021d6b7ddd117e07cd8e 1903175 http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2 7013b2471a507942eb8ed72a5d872d16 455089 https://codeload.github.com/json-c/json-c/tar.gz/json-c-0.11-20130402 4ba3d1a090159486394ba6e46f95bf6c 2706375 https://down.vpsaff.net/linux/mbedtls/mbedtls-2.16.6-gpl.tgz -- - 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/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 diff --git a/download.sh b/download.sh index e0d6f452..d080ca9f 100755 --- a/download.sh +++ b/download.sh @@ -1,9 +1,18 @@ #!/bin/sh +submodule_options='--init --depth 1 --recursive --single-branch' + cd `dirname $0` + +if expr "$1" : submodules/ >/dev/null; then + test -d "$1"/.git -o -f "$1"/.git || exec git submodule update $submodule_options -- "$1" + exit +fi + cd archives || exit if [ $# -eq 0 ]; then + git submodule update $submodule_options ../scripts/get-config-scripts.sh sed -e 's:^.*/::g' -e 's/.* -> //g' < archives.txt | while read file; do ../download.sh "$file" || exit diff --git a/scripts/013-sdl_psl1ght.sh b/scripts/013-sdl_psl1ght.sh index 981d9b94..a29dafaa 100755 --- a/scripts/013-sdl_psl1ght.sh +++ b/scripts/013-sdl_psl1ght.sh @@ -2,10 +2,10 @@ # sdl_psl1ght.sh by Naomi Peori (naomi@peori.ca) ## Download the source code. -../download.sh sdl_psl1ght.tar.gz +../download.sh submodules/SDL_PSL1GHT ## Unpack the source code. -rm -Rf sdl_psl1ght && mkdir sdl_psl1ght && tar --strip-components=1 --directory=sdl_psl1ght -xvzf ../archives/sdl_psl1ght.tar.gz +rm -Rf sdl_psl1ght && mkdir sdl_psl1ght && git --git-dir=../submodules/SDL_PSL1GHT/.git --work-tree=sdl_psl1ght checkout-index -a ## Create the build directory. cd sdl_psl1ght diff --git a/scripts/014-sdl2_psl1ght.sh b/scripts/014-sdl2_psl1ght.sh index ee44f64e..b7b25de5 100755 --- a/scripts/014-sdl2_psl1ght.sh +++ b/scripts/014-sdl2_psl1ght.sh @@ -2,10 +2,10 @@ # sdl_psl1ght.sh by Naomi Peori (naomi@peori.ca) ## Download the source code. -../download.sh sdl2_psl1ght.tar.gz +../download.sh submodules/SDL2_PSL1GHT ## Unpack the source code. -rm -Rf sdl2_psl1ght && mkdir sdl2_psl1ght && tar --strip-components=1 --directory=sdl2_psl1ght -xvzf ../archives/sdl2_psl1ght.tar.gz +rm -Rf sdl2_psl1ght && mkdir sdl2_psl1ght && git --git-dir=../submodules/SDL2_PSL1GHT/.git --work-tree=sdl2_psl1ght checkout-index -a ## Create the build directory. cd sdl2_psl1ght diff --git a/scripts/015-sdl_psl1ght_libs.sh b/scripts/015-sdl_psl1ght_libs.sh index 22ac8463..ab947222 100755 --- a/scripts/015-sdl_psl1ght_libs.sh +++ b/scripts/015-sdl_psl1ght_libs.sh @@ -2,13 +2,13 @@ # sdl_psl1ght_libs.sh by Naomi Peori (naomi@peori.ca) ## Download the source code. -../download.sh sdl_psl1ght_libs.tar.gz +../download.sh submodules/SDL_PSL1GHT_Libs ## 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 sdl_psl1ght_libs && mkdir sdl_psl1ght_libs && tar --strip-components=1 --directory=sdl_psl1ght_libs -xvzf ../archives/sdl_psl1ght_libs.tar.gz +rm -Rf sdl_psl1ght_libs && mkdir sdl_psl1ght_libs && git --git-dir=../submodules/SDL_PSL1GHT_Libs/.git --work-tree=sdl_psl1ght_libs checkout-index -a ## Create the build directory. cd sdl_psl1ght_libs diff --git a/scripts/023-NoRSX.sh b/scripts/023-NoRSX.sh index d4e05ea1..46cffcd1 100755 --- a/scripts/023-NoRSX.sh +++ b/scripts/023-NoRSX.sh @@ -2,10 +2,10 @@ # libNoRSX.sh by wargio (wargio@libero.it) ## Download the source code. -../download.sh NoRSX.tar.gz +../download.sh submodules/NoRSX ## Unpack the source code. -rm -Rf NoRSX && mkdir NoRSX && tar --strip-components=1 --directory=NoRSX -xvzf ../archives/NoRSX.tar.gz && cd NoRSX +rm -Rf NoRSX && mkdir NoRSX && git --git-dir=../submodules/NoRSX/.git --work-tree=NoRSX checkout-index -a && cd NoRSX ## Compile and install. ${MAKE:-make} diff --git a/scripts/025-debugnet.sh b/scripts/025-debugnet.sh index f916ab61..71696c5f 100755 --- a/scripts/025-debugnet.sh +++ b/scripts/025-debugnet.sh @@ -2,10 +2,10 @@ # debugnet.sh by Sergio Padrino (@sergiou87) ## Download the source code. -../download.sh ps3debugnet.tar.gz +../download.sh submodules/ps3debugnet ## Unpack the source code. -rm -Rf ps3debugnet && mkdir ps3debugnet && tar --strip-components=1 --directory=ps3debugnet -xvzf ../archives/ps3debugnet.tar.gz +rm -Rf ps3debugnet && mkdir ps3debugnet && git --git-dir=../submodules/ps3debugnet/.git --work-tree=ps3debugnet checkout-index -a cd ps3debugnet/libdebugnet diff --git a/scripts/026-ps3soundlib.sh b/scripts/026-ps3soundlib.sh index b70eafbb..b7f8c32b 100755 --- a/scripts/026-ps3soundlib.sh +++ b/scripts/026-ps3soundlib.sh @@ -3,10 +3,10 @@ # PS3 SOUNDLIB Credits: Hermes, HACKERCHANNEL, Xiph.Org, mpg123 project and Wargio/deroad ## Download the source code. -../download.sh ps3soundlib.tar.gz +../download.sh submodules/ps3soundlib ## Unpack the source code. -rm -Rf ps3soundlib && mkdir ps3soundlib && tar --strip-components=1 --directory=ps3soundlib -xvzf ../archives/ps3soundlib.tar.gz && cd ps3soundlib +rm -Rf ps3soundlib && mkdir ps3soundlib && git --git-dir=../submodules/ps3soundlib/.git --work-tree=ps3soundlib checkout-index -a && cd ps3soundlib ## Compile and install. ${MAKE:-make} diff --git a/scripts/027-tiny3d_libfont.sh b/scripts/027-tiny3d_libfont.sh index 1299041d..194d7caf 100755 --- a/scripts/027-tiny3d_libfont.sh +++ b/scripts/027-tiny3d_libfont.sh @@ -10,10 +10,10 @@ # Bucanero, CrystalCT, Miigotu, Shagkur, Wargio and Zeldin to update Tiny3D for GCC 7.2.0 ## Download the source code. -../download.sh tiny3d.tar.gz +../download.sh submodules/tiny3d ## Unpack the source code. -rm -Rf tiny3d && mkdir tiny3d && tar --strip-components=1 --directory=tiny3d -xvzf ../archives/tiny3d.tar.gz && cd tiny3d +rm -Rf tiny3d && mkdir tiny3d && git --git-dir=../submodules/tiny3d/.git --work-tree=tiny3d checkout-index -a && cd tiny3d ## Compile and install. ${MAKE:-make} install -C lib --no-print-directory diff --git a/scripts/029-libunrar.sh b/scripts/029-libunrar.sh index e02ad49c..6fc05e32 100755 --- a/scripts/029-libunrar.sh +++ b/scripts/029-libunrar.sh @@ -3,10 +3,10 @@ # unRAR library ported to PS3 by Bucanero ## Download the source code. -../download.sh libunrar.tar.gz +../download.sh submodules/libunrar-ps3 ## Unpack the source code. -rm -Rf libunrar && mkdir libunrar && tar --strip-components=1 --directory=libunrar -xvzf ../archives/libunrar.tar.gz && cd libunrar +rm -Rf libunrar && mkdir libunrar && git --git-dir=../submodules/libunrar-ps3/.git --work-tree=libunrar checkout-index -a && cd libunrar ## Compile and install. ${MAKE:-make} install diff --git a/scripts/030-libnfs.sh b/scripts/030-libnfs.sh index 67dcd3e2..93a0939d 100755 --- a/scripts/030-libnfs.sh +++ b/scripts/030-libnfs.sh @@ -4,10 +4,10 @@ # ported to PS3 by Bucanero ## Download the source code. -../download.sh libnfs.tar.gz +../download.sh submodules/libnfs ## Unpack the source code. -rm -Rf libnfs && mkdir libnfs && tar --strip-components=1 --directory=libnfs -xvzf ../archives/libnfs.tar.gz && cd libnfs +rm -Rf libnfs && mkdir libnfs && git --git-dir=../submodules/libnfs/.git --work-tree=libnfs checkout-index -a && cd libnfs ## Compile and install. ${MAKE:-make} -f ps3_ppu/Makefile.PS3_PPU install diff --git a/scripts/031-libsmb2.sh b/scripts/031-libsmb2.sh index 3e471f8e..ed1c305c 100755 --- a/scripts/031-libsmb2.sh +++ b/scripts/031-libsmb2.sh @@ -4,10 +4,10 @@ # ported to PS3 by Bucanero ## Download the source code. -../download.sh libsmb2.tar.gz +../download.sh submodules/libsmb2 ## Unpack the source code. -rm -Rf libsmb2 && mkdir libsmb2 && tar --strip-components=1 --directory=libsmb2 -xvzf ../archives/libsmb2.tar.gz && cd libsmb2/lib +rm -Rf libsmb2 && mkdir libsmb2 && git --git-dir=../submodules/libsmb2/.git --work-tree=libsmb2 checkout-index -a && cd libsmb2/lib ## Compile and install. ${MAKE:-make} -f Makefile.PS3_PPU install diff --git a/submodules/NoRSX b/submodules/NoRSX new file mode 160000 index 00000000..d93953f5 --- /dev/null +++ b/submodules/NoRSX @@ -0,0 +1 @@ +Subproject commit d93953f5df3e151eec512a22356b87895f14c435 diff --git a/submodules/SDL2_PSL1GHT b/submodules/SDL2_PSL1GHT new file mode 160000 index 00000000..b81fbad4 --- /dev/null +++ b/submodules/SDL2_PSL1GHT @@ -0,0 +1 @@ +Subproject commit b81fbad4489918f5ed9c9c052238d7a25da9bab9 diff --git a/submodules/SDL_PSL1GHT b/submodules/SDL_PSL1GHT new file mode 160000 index 00000000..641a8ca2 --- /dev/null +++ b/submodules/SDL_PSL1GHT @@ -0,0 +1 @@ +Subproject commit 641a8ca2efa3f775d489daa37878ada1d92c24ab diff --git a/submodules/SDL_PSL1GHT_Libs b/submodules/SDL_PSL1GHT_Libs new file mode 160000 index 00000000..5732608d --- /dev/null +++ b/submodules/SDL_PSL1GHT_Libs @@ -0,0 +1 @@ +Subproject commit 5732608d69e0e7f6fc9ac2b6af906c38ab1d9475 diff --git a/submodules/libnfs b/submodules/libnfs new file mode 160000 index 00000000..f0b109df --- /dev/null +++ b/submodules/libnfs @@ -0,0 +1 @@ +Subproject commit f0b109df8fd865a2f8d39e78310fd875e15f3ac1 diff --git a/submodules/libsmb2 b/submodules/libsmb2 new file mode 160000 index 00000000..133c6bb6 --- /dev/null +++ b/submodules/libsmb2 @@ -0,0 +1 @@ +Subproject commit 133c6bb65f054553c7ca1ace01045f4c9c8b459a diff --git a/submodules/libunrar-ps3 b/submodules/libunrar-ps3 new file mode 160000 index 00000000..43ded7b0 --- /dev/null +++ b/submodules/libunrar-ps3 @@ -0,0 +1 @@ +Subproject commit 43ded7b024b75ad08c5e3f56d41942fc950e0b95 diff --git a/submodules/ps3debugnet b/submodules/ps3debugnet new file mode 160000 index 00000000..47c3644a --- /dev/null +++ b/submodules/ps3debugnet @@ -0,0 +1 @@ +Subproject commit 47c3644af08836109d6845afb2d3eeebdb8807de diff --git a/submodules/ps3soundlib b/submodules/ps3soundlib new file mode 160000 index 00000000..262ea20d --- /dev/null +++ b/submodules/ps3soundlib @@ -0,0 +1 @@ +Subproject commit 262ea20d4e4e3fb5d0aca8a60d09d631c0e17fb8 diff --git a/submodules/tiny3d b/submodules/tiny3d new file mode 160000 index 00000000..9b02ae6e --- /dev/null +++ b/submodules/tiny3d @@ -0,0 +1 @@ +Subproject commit 9b02ae6e9f21ff15185f8a3846bdca5304d7e0ae From ad86d70bb3d9c653002e429aac64db5177583ef4 Mon Sep 17 00:00:00 2001 From: Marcus Comstedt Date: Sat, 19 Sep 2020 08:04:17 +0200 Subject: [PATCH 2/3] Call submodule download scripts from download.sh Now the complete build can run without network access if download.sh is executed first. --- download.sh | 5 +++++ scripts/015-sdl_psl1ght_libs.sh | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/download.sh b/download.sh index d080ca9f..3480e9f8 100755 --- a/download.sh +++ b/download.sh @@ -17,6 +17,11 @@ if [ $# -eq 0 ]; then sed -e 's:^.*/::g' -e 's/.* -> //g' < archives.txt | while read file; do ../download.sh "$file" || exit done + for i in ../submodules/*/download.sh; do + if [ -x "$i" ]; then + "$i" + fi + done exit fi diff --git a/scripts/015-sdl_psl1ght_libs.sh b/scripts/015-sdl_psl1ght_libs.sh index ab947222..7a59ed31 100755 --- a/scripts/015-sdl_psl1ght_libs.sh +++ b/scripts/015-sdl_psl1ght_libs.sh @@ -10,10 +10,19 @@ ## Unpack the source code. rm -Rf sdl_psl1ght_libs && mkdir sdl_psl1ght_libs && git --git-dir=../submodules/SDL_PSL1GHT_Libs/.git --work-tree=sdl_psl1ght_libs checkout-index -a +## Use any already downloaded archives from submodules dir +for i in ../submodules/SDL_PSL1GHT_Libs/archives/*; do + case "$i" in + */archives.txt) ;; + *) [ -f "$i" ] && ln "$i" sdl_psl1ght_libs/archives/ ;; + esac +done + ## Create the build directory. cd sdl_psl1ght_libs ## Preload config.guess and config.sub +rm -f archives/config.guess archives/config.sub cp ../../archives/config.guess ../../archives/config.sub archives/ ## Compile and install. From 0cbe136d8477f2d1152b1d7750a0d0cc639d381f Mon Sep 17 00:00:00 2001 From: Marcus Comstedt Date: Sun, 7 Jun 2026 15:08:19 +0200 Subject: [PATCH 3/3] Bump SDL_PSL1GHT_Libs, and provide its download script with location of config.{sub,guess} --- download.sh | 2 +- submodules/SDL_PSL1GHT_Libs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/download.sh b/download.sh index 3480e9f8..86c1757e 100755 --- a/download.sh +++ b/download.sh @@ -19,7 +19,7 @@ if [ $# -eq 0 ]; then done for i in ../submodules/*/download.sh; do if [ -x "$i" ]; then - "$i" + CONFIGS_DIR="$(pwd)" "$i" fi done exit diff --git a/submodules/SDL_PSL1GHT_Libs b/submodules/SDL_PSL1GHT_Libs index 5732608d..6c67fbba 160000 --- a/submodules/SDL_PSL1GHT_Libs +++ b/submodules/SDL_PSL1GHT_Libs @@ -1 +1 @@ -Subproject commit 5732608d69e0e7f6fc9ac2b6af906c38ab1d9475 +Subproject commit 6c67fbba71e85145db21a37ec37e4a06395870d0