From 65cb6adde984fa352f20a065c2c83a6607352af2 Mon Sep 17 00:00:00 2001 From: "Fervi (IntinteDAO)" Date: Wed, 4 Mar 2026 21:55:42 +0100 Subject: [PATCH 1/2] addpkg(tur/freegish): 1.53-git --- tur/freegish/build.sh | 12 + tur/freegish/custom_level_loading.patch | 306 ++++++++++++++++++++++++ 2 files changed, 318 insertions(+) create mode 100644 tur/freegish/build.sh create mode 100644 tur/freegish/custom_level_loading.patch diff --git a/tur/freegish/build.sh b/tur/freegish/build.sh new file mode 100644 index 0000000000..b20ac69f3f --- /dev/null +++ b/tur/freegish/build.sh @@ -0,0 +1,12 @@ +TERMUX_PKG_HOMEPAGE=https://github.com/freegish/freegish +TERMUX_PKG_DESCRIPTION="A physics based platformer" +TERMUX_PKG_LICENSE="GPL-2.0" +TERMUX_PKG_MAINTAINER="IntinteDAO" +_COMMIT=f6a92933c9ba584214304b12405a6fd6ab0c3cdf +TERMUX_PKG_VERSION="1.53-p20240323" +TERMUX_PKG_SRCURL="https://github.com/freegish/freegish/archive/$_COMMIT.tar.gz" +TERMUX_PKG_SHA256=39f26294705e845e4c9bc0c6e55a11b93e9ec8ce984ec783835336f5f6679629 +TERMUX_PKG_DEPENDS="libvorbis, openal-soft, sdl2, libpng, zlib" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-DINSTALL_FHS=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5" +TERMUX_PKG_AUTO_UPDATE=true +TERMUX_PKG_GROUPS="games" diff --git a/tur/freegish/custom_level_loading.patch b/tur/freegish/custom_level_loading.patch new file mode 100644 index 0000000000..8a17d85c61 --- /dev/null +++ b/tur/freegish/custom_level_loading.patch @@ -0,0 +1,306 @@ +Loading custom levels from ~/.freegish/level/ +Index: freegish-1.53+git20101011+dfsg/src/game/editor.c +=================================================================== +--- freegish-1.53+git20101011+dfsg.orig/src/game/editor.c 2014-02-23 23:06:53.000000000 +0100 ++++ freegish-1.53+git20101011+dfsg/src/game/editor.c 2014-02-23 23:19:52.000000000 +0100 +@@ -420,7 +420,7 @@ + { + if (keyboard[SCAN_F7] && !prevkeyboard[SCAN_F7]) + { +- loadlevel(editor.filename); ++ loadlevelcustom(editor.filename); + setuplevel(); + setupgame(); + } +Index: freegish-1.53+git20101011+dfsg/src/game/level.c +=================================================================== +--- freegish-1.53+git20101011+dfsg.orig/src/game/level.c 2014-02-23 23:06:53.000000000 +0100 ++++ freegish-1.53+git20101011+dfsg/src/game/level.c 2014-02-23 23:19:52.000000000 +0100 +@@ -286,7 +286,51 @@ + } + } + ++/* ++void printcwd(void) ++{ ++ char path [PATH_MAX]; ++ getcwd(path,PATH_MAX); ++ printf ("cwd: %s\n", path); ++} ++*/ ++ + void loadlevel(char *filename) ++{ ++ int changeddir; ++ int retval; ++ ++// printcwd(); ++ ++ changeddir=chdir("level"); ++ retval = loadlevelprivate(filename, NULL, NULL); ++// if (changeddir==0) ++// chdir(".."); ++ ++// printf ("loadlevelprivate: %d\n", retval); ++ ++ return; ++} ++ ++void loadlevelcustom(char *filename) ++{ ++ char levelpath [PATH_MAX]; ++#ifdef DATAPATH ++ char *datapath=DATAPATH; ++#else ++ char datapath[PATH_MAX]; ++ ++ getcwd(datapath,PATH_MAX); ++#endif ++ ++ chdir(userpath(levelpath,"level",NULL)); ++ loadlevelprivate(filename, levelpath, datapath); ++// chdir(datapath); ++ ++ return; ++} ++ ++int loadlevelprivate(char *filename, char *levelpath, char *datapath) + { + int count,count2; + int changeddir; +@@ -296,11 +340,10 @@ + + x=0x17AF2E03; + +- changeddir=chdir("level"); +- + if ((fp=fopen(filename,"rb"))!=NULL) + { + fread2(&version,4,1,fp); ++ printf ( "ver: %i - %s\n", version, filename ); + + if (version==9) + { +@@ -334,9 +377,7 @@ + if (level.numofobjects<0 || level.numofobjects>=256) + { + fclose(fp); +- if (changeddir==0) +- chdir(".."); +- return; ++ return 1; + } + for (count=0;count=1024) + { + fclose(fp); +- if (changeddir==0) +- chdir(".."); +- return; ++ return 2; + } + for (count=0;count=1024) + { + fclose(fp); +- if (changeddir==0) +- chdir(".."); +- return; ++ return 3; + } + if (texture[count].sizex!=0) + { +@@ -411,9 +448,7 @@ + if (block[count].numoflines<0 || block[count].numoflines>=64) + { + fclose(fp); +- if (changeddir==0) +- chdir(".."); +- return; ++ return 4; + } + for (count2=0;count2=256) + { + fclose(fp); +- if (changeddir==0) +- chdir(".."); +- return; ++ return 5; + } + for (count=0;count=1024) + { + fclose(fp); +- if (changeddir==0) +- chdir(".."); +- return; ++ return 6; + } + for (count=0;count=1024) + { + fclose(fp); +- if (changeddir==0) +- chdir(".."); +- return; ++ return 7; + } + if (texture[count].sizex!=0) + { +@@ -524,9 +553,7 @@ + if (block[count].numoflines<0 || block[count].numoflines>=64) + { + fclose(fp); +- if (changeddir==0) +- chdir(".."); +- return; ++ return 8; + } + for (count2=0;count2=256) + { + fclose(fp); +- if (changeddir==0) +- chdir(".."); +- return; ++ return 9; + } + for (count=0;count=1024) + { + fclose(fp); +- if (changeddir==0) +- chdir(".."); +- return; ++ return 10; + } + for (count=0;count=64) + { + fclose(fp); +- if (changeddir==0) +- chdir(".."); +- return; ++ return 13; + } + for (count2=0;count2 Date: Thu, 5 Mar 2026 10:57:43 +0100 Subject: [PATCH 2/2] Add newest-tag --- tur/freegish/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tur/freegish/build.sh b/tur/freegish/build.sh index b20ac69f3f..99dd0a1200 100644 --- a/tur/freegish/build.sh +++ b/tur/freegish/build.sh @@ -9,4 +9,5 @@ TERMUX_PKG_SHA256=39f26294705e845e4c9bc0c6e55a11b93e9ec8ce984ec783835336f5f66796 TERMUX_PKG_DEPENDS="libvorbis, openal-soft, sdl2, libpng, zlib" TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-DINSTALL_FHS=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5" TERMUX_PKG_AUTO_UPDATE=true +TERMUX_PKG_UPDATE_TAG_TYPE=newest-tag TERMUX_PKG_GROUPS="games"