diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..0975e57 --- /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 24bc31c..ef9602c 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 e0d6f45..86c1757 100755 --- a/download.sh +++ b/download.sh @@ -1,13 +1,27 @@ #!/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 done + for i in ../submodules/*/download.sh; do + if [ -x "$i" ]; then + CONFIGS_DIR="$(pwd)" "$i" + fi + done exit fi diff --git a/scripts/013-sdl_psl1ght.sh b/scripts/013-sdl_psl1ght.sh index 981d9b9..a29dafa 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 ee44f64..b7b25de 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 22ac846..7a59ed3 100755 --- a/scripts/015-sdl_psl1ght_libs.sh +++ b/scripts/015-sdl_psl1ght_libs.sh @@ -2,18 +2,27 @@ # 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 + +## 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. diff --git a/scripts/023-NoRSX.sh b/scripts/023-NoRSX.sh index d4e05ea..46cffcd 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 f916ab6..71696c5 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 b70eafb..b7f8c32 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 1299041..194d7ca 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 e02ad49..6fc05e3 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 67dcd3e..93a0939 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 3e471f8..ed1c305 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 0000000..d93953f --- /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 0000000..b81fbad --- /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 0000000..641a8ca --- /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 0000000..6c67fbb --- /dev/null +++ b/submodules/SDL_PSL1GHT_Libs @@ -0,0 +1 @@ +Subproject commit 6c67fbba71e85145db21a37ec37e4a06395870d0 diff --git a/submodules/libnfs b/submodules/libnfs new file mode 160000 index 0000000..f0b109d --- /dev/null +++ b/submodules/libnfs @@ -0,0 +1 @@ +Subproject commit f0b109df8fd865a2f8d39e78310fd875e15f3ac1 diff --git a/submodules/libsmb2 b/submodules/libsmb2 new file mode 160000 index 0000000..133c6bb --- /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 0000000..43ded7b --- /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 0000000..47c3644 --- /dev/null +++ b/submodules/ps3debugnet @@ -0,0 +1 @@ +Subproject commit 47c3644af08836109d6845afb2d3eeebdb8807de diff --git a/submodules/ps3soundlib b/submodules/ps3soundlib new file mode 160000 index 0000000..262ea20 --- /dev/null +++ b/submodules/ps3soundlib @@ -0,0 +1 @@ +Subproject commit 262ea20d4e4e3fb5d0aca8a60d09d631c0e17fb8 diff --git a/submodules/tiny3d b/submodules/tiny3d new file mode 160000 index 0000000..9b02ae6 --- /dev/null +++ b/submodules/tiny3d @@ -0,0 +1 @@ +Subproject commit 9b02ae6e9f21ff15185f8a3846bdca5304d7e0ae