game-repo: merge with main repository
We created additional repositories back in the day when network bandwidth was an issue. Today we do not have this problem thanks to fosshost, so there is not really any reason to keep games in another repo. Removing game-repo also simplifies for mirror maintainers slightly, there is one less repo to check the status of. Plan is to merge science-repo as well, but keep termux-root-packages as a separate repository. %ci:no-build
This commit is contained in:
commit
a016229734
14
packages/0verkill/build.sh
Normal file
14
packages/0verkill/build.sh
Normal file
@ -0,0 +1,14 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://github.com/hackndev/0verkill
|
||||
TERMUX_PKG_DESCRIPTION="Bloody 2D action deathmatch-like game in ASCII-ART"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=0.16-git
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=https://github.com/ravener/0verkill/archive/refs/tags/v${TERMUX_PKG_VERSION:0:4}.tar.gz
|
||||
TERMUX_PKG_SHA256=d337e4a7dd91f26c837e96492d960c7fd77c75bc24bcc6ed8d350df39edf8bb8
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
termux_step_pre_configure() {
|
||||
autoreconf -vfi
|
||||
CFLAGS+=" -fcommon"
|
||||
}
|
26
packages/angband/build.sh
Normal file
26
packages/angband/build.sh
Normal file
@ -0,0 +1,26 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://rephial.org/
|
||||
TERMUX_PKG_DESCRIPTION="Dungeon exploration adventure game"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=4.2.3
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SHA256=f001299283fb8a81865e07983d54cf04cd0f9addfeb7daeef75ed60f6ca417ff
|
||||
TERMUX_PKG_SRCURL=https://github.com/angband/angband/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_DEPENDS="ncurses"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
--disable-x11
|
||||
--bindir=$TERMUX_PREFIX/bin
|
||||
--sysconfdir=$TERMUX_PREFIX/share/angband
|
||||
"
|
||||
TERMUX_PKG_RM_AFTER_INSTALL="
|
||||
share/angband/fonts
|
||||
share/angband/icons
|
||||
share/angband/sounds
|
||||
share/angband/xtra
|
||||
"
|
||||
|
||||
termux_step_pre_configure () {
|
||||
./autogen.sh
|
||||
perl -p -i -e 's|ncursesw5-config|ncursesw6-config|g' configure
|
||||
}
|
23
packages/angband/src-main.c.patch
Normal file
23
packages/angband/src-main.c.patch
Normal file
@ -0,0 +1,23 @@
|
||||
--- ./src/main.c.orig 2021-08-01 00:28:01.000000000 +0200
|
||||
+++ ./src/main.c 2021-09-10 09:34:27.031713786 +0200
|
||||
@@ -36,7 +36,7 @@
|
||||
*/
|
||||
#include "locale.h"
|
||||
|
||||
-#if !defined(WINDOWS)
|
||||
+#if !defined(WINDOWS) && !defined(__ANDROID__)
|
||||
#include "langinfo.h"
|
||||
#endif
|
||||
|
||||
@@ -497,9 +497,11 @@
|
||||
ANGBAND_SYS = mstr;
|
||||
#if !defined(WINDOWS)
|
||||
if (setlocale(LC_CTYPE, "")) {
|
||||
+#ifndef __ANDROID__
|
||||
/* Require UTF-8 */
|
||||
if (!streq(nl_langinfo(CODESET), "UTF-8"))
|
||||
quit("Angband requires UTF-8 support");
|
||||
+#endif
|
||||
}
|
||||
#endif
|
||||
|
20
packages/bastet/BastetBlockChooser.hpp.patch
Normal file
20
packages/bastet/BastetBlockChooser.hpp.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- ../cache/bastet-0.43.2/BastetBlockChooser.hpp 2015-08-30 07:04:24.000000000 +0000
|
||||
+++ ./BastetBlockChooser.hpp 2017-09-25 03:10:40.601198625 +0000
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "Well.hpp"
|
||||
|
||||
-#include <boost/tr1/tr1/unordered_set>
|
||||
+#include <boost/unordered/unordered_set.hpp>
|
||||
#include <set>
|
||||
#include <boost/functional/hash.hpp>
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
public:
|
||||
Searcher(BlockType b, const Well *well, Vertex v, WellVisitor *visitor);
|
||||
private:
|
||||
- std::tr1::unordered_set<Vertex> _visited;
|
||||
+ boost::unordered::unordered_set<Vertex> _visited;
|
||||
//std::set<Vertex> _visited; ^^ the above is more efficient, we need to do many inserts
|
||||
BlockType _block;
|
||||
const Well *_well;
|
11
packages/bastet/Config.cpp.patch
Normal file
11
packages/bastet/Config.cpp.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ../cache/bastet-0.43.2/Config.cpp 2015-08-30 07:04:24.000000000 +0000
|
||||
+++ ./Config.cpp 2017-09-19 08:56:50.122235753 +0000
|
||||
@@ -38,7 +38,7 @@
|
||||
const size_t HowManyHighScores=10;
|
||||
const std::string RcFileName="/.bastetrc";
|
||||
const std::string LocalHighScoresFileName="/.bastetscores";
|
||||
- const std::string GlobalHighScoresFileName="/var/games/bastet.scores2";
|
||||
+ const std::string GlobalHighScoresFileName="/data/data/com.termux/files/usr/var/games/bastet.scores2";
|
||||
|
||||
bool HighScores::Qualifies(int score){
|
||||
stable_sort(begin(),end());
|
12
packages/bastet/build.sh
Normal file
12
packages/bastet/build.sh
Normal file
@ -0,0 +1,12 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://fph.altervista.org/prog/bastet.html
|
||||
TERMUX_PKG_DESCRIPTION="Tetris clone with 'bastard' block-choosing AI"
|
||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
||||
TERMUX_PKG_VERSION=0.43.2
|
||||
TERMUX_PKG_REVISION=7
|
||||
TERMUX_PKG_SRCURL=https://github.com/fph/bastet/archive/$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=f219510afc1d83e4651fbffd5921b1e0b926d5311da4f8fa7df103dc7f2c403f
|
||||
TERMUX_PKG_DEPENDS="libc++, ncurses"
|
||||
TERMUX_PKG_BUILD_DEPENDS="boost-static"
|
||||
TERMUX_PKG_EXTRA_MAKE_ARGS=" BOOST_PO=$TERMUX_PREFIX/lib/libboost_program_options.a"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
24
packages/bastet/makefile.patch
Normal file
24
packages/bastet/makefile.patch
Normal file
@ -0,0 +1,24 @@
|
||||
--- ../cache/bastet-0.43.2/Makefile 2015-08-30 07:04:24.000000000 +0000
|
||||
+++ ./Makefile 2017-09-19 09:09:21.992227135 +0000
|
||||
@@ -17,11 +17,19 @@
|
||||
depend: *.hpp $(SOURCES) $(MAIN) $(TESTS)
|
||||
$(CXX) -MM $(SOURCES) $(MAIN) $(TESTS)> depend
|
||||
|
||||
-include depend
|
||||
+#include depend
|
||||
|
||||
$(PROGNAME): $(SOURCES:.cpp=.o) $(MAIN:.cpp=.o)
|
||||
$(CXX) -ggdb -o $(PROGNAME) $(SOURCES:.cpp=.o) $(MAIN:.cpp=.o) $(LDFLAGS)
|
||||
-
|
||||
+install:
|
||||
+ cp bastet $(PREFIX)/bin
|
||||
+ chmod +x $(PREFIX)/bin/bastet
|
||||
+ mkdir -p $(PREFIX)/var/games
|
||||
+ touch $(PREFIX)/var/games/bastet.scores2
|
||||
+ chmod +w $(PREFIX)/var/games/bastet.scores2
|
||||
+ mkdir -p $(PREFIX)/share/man/man6/
|
||||
+ cp bastet.6 $(PREFIX)/share/man/man6/
|
||||
+
|
||||
clean:
|
||||
rm -f $(SOURCES:.cpp=.o) $(TESTS:.cpp=.o) $(MAIN:.cpp=.o) $(PROGNAME)
|
||||
|
20
packages/brogue/build.sh
Normal file
20
packages/brogue/build.sh
Normal file
@ -0,0 +1,20 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://sites.google.com/site/broguegame/
|
||||
TERMUX_PKG_DESCRIPTION="Roguelike dungeon crawling game"
|
||||
TERMUX_PKG_LICENSE="AGPL-V3"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=1.7.5
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SRCURL=https://github.com/termux/distfiles/releases/download/2021.01.04/brogue-${TERMUX_PKG_VERSION}-linux-amd64.tbz2
|
||||
TERMUX_PKG_SHA256=a74ff18139564c597d047cfb167f74ab1963dd8608b6fb2e034e7635d6170444
|
||||
TERMUX_PKG_DEPENDS="ncurses"
|
||||
TERMUX_PKG_EXTRA_MAKE_ARGS="curses"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
termux_step_pre_configure () {
|
||||
CFLAGS+=" -fcommon"
|
||||
CC="$CC $CFLAGS $CPPFLAGS $LDFLAGS"
|
||||
}
|
||||
|
||||
termux_step_make_install () {
|
||||
install -m700 bin/brogue $TERMUX_PREFIX/bin
|
||||
}
|
28
packages/brogue/curses-platform.c.patch
Normal file
28
packages/brogue/curses-platform.c.patch
Normal file
@ -0,0 +1,28 @@
|
||||
In Android the <sys/timeb.h> header and associated ftime(3) has been
|
||||
removed in android-21 since it is deprecated and removed from POSIX.
|
||||
|
||||
diff -u -r ../brogue-1.7.4/src/platform/curses-platform.c ./src/platform/curses-platform.c
|
||||
--- ../brogue-1.7.4/src/platform/curses-platform.c 2014-07-03 15:19:10.000000000 -0400
|
||||
+++ ./src/platform/curses-platform.c 2014-12-20 03:47:20.303572495 -0500
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include "term.h"
|
||||
-#include <sys/timeb.h>
|
||||
+#include <sys/time.h>
|
||||
#include <stdint.h>
|
||||
#include <signal.h>
|
||||
#include "platform.h"
|
||||
@@ -109,9 +109,9 @@
|
||||
#define PAUSE_BETWEEN_EVENT_POLLING 34//17
|
||||
|
||||
static uint32_t getTime() {
|
||||
- struct timeb time;
|
||||
- ftime(&time);
|
||||
- return 1000 * time.time + time.millitm;
|
||||
+ struct timeval tv;
|
||||
+ gettimeofday(&tv, NULL);
|
||||
+ return 1000 * tv.tv_sec + tv.tv_usec / 1000;
|
||||
}
|
||||
|
||||
static boolean curses_pauseForMilliseconds(short milliseconds) {
|
12
packages/brogue/no_i586.patch
Normal file
12
packages/brogue/no_i586.patch
Normal file
@ -0,0 +1,12 @@
|
||||
--- ../brogue-linux-1.7.3/brogue-1.7.3/Makefile 2013-09-11 07:38:48.000000000 +0200
|
||||
+++ ./Makefile 2014-01-28 07:57:06.000000000 +0100
|
||||
@@ -81,7 +81,7 @@
|
||||
.PHONY : clean both curses tcod tar
|
||||
|
||||
bin/brogue : ${DEPENDENCIES} ${BROGUEFILES}
|
||||
- $(CC) -O2 -march=i586 -o bin/brogue ${BROGUEFILES} ${LIBRARIES} -Wl,-rpath,.
|
||||
+ $(CC) -o bin/brogue ${BROGUEFILES} ${LIBRARIES} -Wl,-rpath,.
|
||||
|
||||
clean :
|
||||
rm -f src/brogue/*.o src/platform/*.o bin/brogue
|
||||
|
11
packages/brogue/src-platform-platformdependent.c.patch
Normal file
11
packages/brogue/src-platform-platformdependent.c.patch
Normal file
@ -0,0 +1,11 @@
|
||||
diff -u -r ../brogue-1.7.4/src/platform/platformdependent.c ./src/platform/platformdependent.c
|
||||
--- ../brogue-1.7.4/src/platform/platformdependent.c 2014-07-03 19:19:10.000000000 +0000
|
||||
+++ ./src/platform/platformdependent.c 2017-07-07 07:09:10.116242335 +0000
|
||||
@@ -21,6 +21,7 @@
|
||||
* along with Brogue. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
+#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
10
packages/cavez-of-phear/build.sh
Normal file
10
packages/cavez-of-phear/build.sh
Normal file
@ -0,0 +1,10 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://github.com/AMDmi3/cavezofphear
|
||||
TERMUX_PKG_DESCRIPTION="A Boulder Dash like game for consoles/terminals"
|
||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="Dmitry Marakasov <amdmi3@amdmi3.ru>"
|
||||
TERMUX_PKG_VERSION=0.5.3
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/AMDmi3/cavezofphear/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=428ba84db4e43d4f258e912882fdb3ca6c8844447099b60cde8199e76169f439
|
||||
TERMUX_PKG_DEPENDS="ncurses"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-DSYSTEMWIDE=ON"
|
21
packages/cboard/build.sh
Normal file
21
packages/cboard/build.sh
Normal file
@ -0,0 +1,21 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://benkibbey.wordpress.com/cboard/
|
||||
TERMUX_PKG_DESCRIPTION="PGN browser, editor and chess engine frontend"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=0.7.5
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/project/c-board/${TERMUX_PKG_VERSION}/cboard-${TERMUX_PKG_VERSION}.tar.bz2
|
||||
TERMUX_PKG_SHA256=dd748039f3531653e1573577cd814741524e1b16e16e3a841ef512e5150da6a0
|
||||
TERMUX_PKG_DEPENDS="libandroid-support,libandroid-glob,gnuchess, ncurses, ncurses-ui-libs"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
CFLAGS+=" -DLINE_MAX=_POSIX2_LINE_MAX -fcommon"
|
||||
LDFLAGS+=" -landroid-glob"
|
||||
|
||||
if $TERMUX_DEBUG_BUILD; then
|
||||
# When doing debug build, -D_FORTIFY_SOURCE=2 gives this error:
|
||||
# /home/builder/.termux-build/cboard/src/libchess/pgn.c:2235:33: error: 'umask' called with invalid mode
|
||||
# mode = umask(600);
|
||||
export CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/}
|
||||
fi
|
||||
}
|
60
packages/cboard/configure.patch
Normal file
60
packages/cboard/configure.patch
Normal file
@ -0,0 +1,60 @@
|
||||
diff -uNr cboard-0.7.5/configure cboard-0.7.5.mod/configure
|
||||
--- cboard-0.7.5/configure 2018-09-27 17:48:24.000000000 +0300
|
||||
+++ cboard-0.7.5.mod/configure 2019-08-16 14:05:44.294565834 +0300
|
||||
@@ -12194,13 +12194,8 @@
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Unix98 pty support" >&5
|
||||
$as_echo_n "checking for Unix98 pty support... " >&6; }
|
||||
-if test -c "/dev/ptmx"; then
|
||||
- have_ptmx=yes
|
||||
-else
|
||||
- have_ptmx=no
|
||||
-fi
|
||||
-
|
||||
-ptmx_works=no
|
||||
+have_ptmx=yes
|
||||
+ptmx_works=yes
|
||||
|
||||
if test "x$have_ptmx" = "xyes"; then
|
||||
ac_ext=c
|
||||
@@ -12210,40 +12205,7 @@
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
if test "$cross_compiling" = yes; then :
|
||||
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
-as_fn_error $? "cannot run test program while cross compiling
|
||||
-See \`config.log' for more details" "$LINENO" 5; }
|
||||
-else
|
||||
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
-/* end confdefs.h. */
|
||||
-\
|
||||
- #include <stdio.h>
|
||||
- #include <sys/types.h>
|
||||
- #include <sys/stat.h>
|
||||
- #include <fcntl.h>
|
||||
-
|
||||
- int main()
|
||||
- {
|
||||
- int fd;
|
||||
-
|
||||
- if ((fd = open("/dev/ptmx", O_RDWR)) == -1)
|
||||
- exit(1);
|
||||
-
|
||||
- if (ptsname(fd) == NULL)
|
||||
- exit(1);
|
||||
-
|
||||
- exit(0);
|
||||
- }
|
||||
-
|
||||
-_ACEOF
|
||||
-if ac_fn_c_try_run "$LINENO"; then :
|
||||
ptmx_works=yes
|
||||
-else
|
||||
- ptmx_works=no
|
||||
-fi
|
||||
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
- conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
fi
|
||||
|
||||
|
20
packages/cboard/libchess-pgn.c.patch
Normal file
20
packages/cboard/libchess-pgn.c.patch
Normal file
@ -0,0 +1,20 @@
|
||||
diff -u -r ../cboard-0.7.5/libchess/pgn.c ./libchess/pgn.c
|
||||
--- ../cboard-0.7.5/libchess/pgn.c 2018-09-17 15:58:48.000000000 +0000
|
||||
+++ ./libchess/pgn.c 2018-12-19 00:16:27.204984323 +0000
|
||||
@@ -883,7 +883,6 @@
|
||||
time_t now;
|
||||
char tbuf[11] = { 0 };
|
||||
struct tm *tp;
|
||||
- struct passwd *pw = getpwuid (getuid ());
|
||||
char host[64] = { 0 };
|
||||
|
||||
time (&now);
|
||||
@@ -904,7 +903,7 @@
|
||||
if (pgn_tag_add (&g->tag, (char *) "Round", (char *) "-") != E_PGN_OK)
|
||||
warn ("pgn_tag_add()");
|
||||
|
||||
- if (pgn_tag_add (&g->tag, (char *) "White", pw->pw_gecos) != E_PGN_OK)
|
||||
+ if (pgn_tag_add (&g->tag, (char *) "White", (char *) "You") != E_PGN_OK)
|
||||
warn ("pgn_tag_add()");
|
||||
|
||||
if (pgn_tag_add (&g->tag, (char *) "Black", (char *) "?") != E_PGN_OK)
|
16
packages/curseofwar/CMakeLists.txt.patch
Normal file
16
packages/curseofwar/CMakeLists.txt.patch
Normal file
@ -0,0 +1,16 @@
|
||||
Pretending that the source is c++ instead of c is apparently needed to make visual studio happy: https://github.com/a-nikolaev/curseofwar/commit/ca752d9af5a7616ef9faca6cd79c3de6f5a07aa9
|
||||
|
||||
clang gives warnings that the source is actually c though, and we get lots of:
|
||||
warning: ISO C++11 does not allow conversion from string literal to 'char *'
|
||||
--- ../CMakeLists.txt.orig 2020-08-16 19:49:42.870095140 +0200
|
||||
+++ ./CMakeLists.txt 2020-08-16 19:50:02.580234051 +0200
|
||||
@@ -32,8 +32,7 @@
|
||||
client.c
|
||||
server.c)
|
||||
|
||||
-SET (SOURCES ${SOURCE_COMMON} ${SOURCE_SDL} ${SOURCE_NCURSES} ${SOURCE_NETWORK})
|
||||
-set_source_files_properties( ${SOURCES} PROPERTIES LANGUAGE "CXX" )
|
||||
+SET (SOURCES ${SOURCE_COMMON} ${SOURCE_SDL} ${SOURCE_NCURSES} ${SOURCE_NETWORK})
|
||||
|
||||
if(WIN32)
|
||||
# Windows includes the math lib by default, no need to add them
|
15
packages/curseofwar/build.sh
Normal file
15
packages/curseofwar/build.sh
Normal file
@ -0,0 +1,15 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://a-nikolaev.github.io/curseofwar/
|
||||
TERMUX_PKG_DESCRIPTION="Fast-paced action strategy game focusing on high-level strategic planning"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=1.3.0
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=https://github.com/a-nikolaev/curseofwar/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=2a90204d95a9f29a0e5923f43e65188209dc8be9d9eb93576404e3f79b8a652b
|
||||
TERMUX_PKG_DEPENDS="libc++, ncurses"
|
||||
|
||||
termux_step_make_install () {
|
||||
mkdir -p $TERMUX_PREFIX/share/man/man6
|
||||
cp curseofwar $TERMUX_PREFIX/bin
|
||||
cp $TERMUX_PKG_SRCDIR/curseofwar.6 $TERMUX_PREFIX/share/man/man6
|
||||
}
|
11
packages/curseofwar/include_arpa_inet_h.patch
Normal file
11
packages/curseofwar/include_arpa_inet_h.patch
Normal file
@ -0,0 +1,11 @@
|
||||
diff -u -r ../curseofwar-1.2.0/network.h ./network.h
|
||||
--- ../curseofwar-1.2.0/network.h 2013-08-16 07:57:44.000000000 +0200
|
||||
+++ ./network.h 2014-01-29 01:09:19.000000000 +0100
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
+#include <arpa/inet.h>
|
||||
|
||||
#define MSG_BUF_SIZE 50000
|
||||
|
9
packages/curseofwar/no_hardcoded_cc.patch
Normal file
9
packages/curseofwar/no_hardcoded_cc.patch
Normal file
@ -0,0 +1,9 @@
|
||||
diff -u -r ../curseofwar-1.2.0/Makefile ./Makefile
|
||||
--- ../curseofwar-1.2.0/Makefile 2013-08-16 07:57:44.000000000 +0200
|
||||
+++ ./Makefile 2014-01-29 01:07:04.000000000 +0100
|
||||
@@ -1,5 +1,4 @@
|
||||
SHELL = /bin/sh
|
||||
-CC = gcc
|
||||
INSTALL = install
|
||||
EXEC_NCURSES = curseofwar
|
||||
EXEC_SDL = curseofwar-sdl
|
19
packages/curseofwar/path.c.patch
Normal file
19
packages/curseofwar/path.c.patch
Normal file
@ -0,0 +1,19 @@
|
||||
--- ../path.c.orig 2020-08-16 19:40:30.098928495 +0200
|
||||
+++ ./path.c 2020-08-16 19:41:56.786161977 +0200
|
||||
@@ -77,11 +77,11 @@
|
||||
path[1] = concat(s, suffix);
|
||||
free(s);
|
||||
path[2] = concat(getenv("HOME"), "/.curseofwar/");
|
||||
- path[3] = strdup("/usr/local/share/curseofwar/");
|
||||
- path[4] = strdup("/usr/share/curseofwar/");
|
||||
- path[5] = strdup("/usr/share/curseofwar-sdl/");
|
||||
- path[6] = strdup("/usr/share/curseofwar-common/");
|
||||
- path[7] = strdup(INSTALL_DATA);
|
||||
+ path[3] = strdup("@TERMUX_PREFIX@/local/share/curseofwar/");
|
||||
+ path[4] = strdup("@TERMUX_PREFIX@/share/curseofwar/");
|
||||
+ path[5] = strdup("@TERMUX_PREFIX@/share/curseofwar-sdl/");
|
||||
+ path[6] = strdup("@TERMUX_PREFIX@/share/curseofwar-common/");
|
||||
+ path[7] = strdup("@TERMUX_PREFIX@/share/curseofwar/");
|
||||
#else
|
||||
int dirs_num = 1;
|
||||
char **path = (char**) malloc(sizeof(char*) * (dirs_num + 1));
|
11
packages/dmagnetic/Makefile.patch
Normal file
11
packages/dmagnetic/Makefile.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ./Makefile.orig 2021-07-24 10:36:40.069413331 +0200
|
||||
+++ ./Makefile 2021-07-24 10:40:29.069413167 +0200
|
||||
@@ -99,7 +99,7 @@
|
||||
cp dMagneticini.5 $(INSTALLMAN)/man5/
|
||||
cp README.txt $(INSTALLSHARE)/dMagnetic/
|
||||
cp LICENSE.txt $(INSTALLSHARE)/dMagnetic/
|
||||
- cp dMagnetic.ini $(INSTALLSHARE)/dMagnetic/
|
||||
+ cp dMagnetic.ini $(INSTALLSHARE)/
|
||||
|
||||
|
||||
dMagnetic: $(OBJ_LOADER) $(OBJ_LINEA) $(OBJ_VM68K) $(OBJ_GUI) $(OBJ_TOPLEVEL)
|
28
packages/dmagnetic/build.sh
Normal file
28
packages/dmagnetic/build.sh
Normal file
@ -0,0 +1,28 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.dettus.net/dMagnetic
|
||||
TERMUX_PKG_DESCRIPTION="Interpreter for classic text adventure games and interactive fiction"
|
||||
TERMUX_PKG_LICENSE="BSD 2-Clause"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=0.32
|
||||
TERMUX_PKG_SRCURL=https://www.dettus.net/dMagnetic/dMagnetic_${TERMUX_PKG_VERSION}.tar.bz2
|
||||
TERMUX_PKG_SHA256=9671b863cbb126e122923fa974806ff0e998af471c98e878c1392c20a3606206
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_HOSTBUILD=true
|
||||
|
||||
termux_step_host_build() {
|
||||
cd $TERMUX_PKG_BUILDDIR
|
||||
make -j $TERMUX_MAKE_PROCESSES dMagnetic
|
||||
mv dMagnetic $TERMUX_PKG_HOSTBUILD_DIR/
|
||||
make clean
|
||||
}
|
||||
|
||||
termux_step_post_configure() {
|
||||
# find our host-built dMagnetic
|
||||
export PATH=$TERMUX_PKG_HOSTBUILD_DIR:$PATH
|
||||
}
|
||||
|
||||
termux_step_post_make_install() {
|
||||
sed "s%@TERMUX_PREFIX@%$TERMUX_PREFIX%g" \
|
||||
$TERMUX_PKG_BUILDER_DIR/magnetic-scrolls.in \
|
||||
> $TERMUX_PREFIX/bin/magnetic-scrolls
|
||||
chmod 700 $TERMUX_PREFIX/bin/magnetic-scrolls
|
||||
}
|
29
packages/dmagnetic/change-prefix.patch.beforehostbuild
Normal file
29
packages/dmagnetic/change-prefix.patch.beforehostbuild
Normal file
@ -0,0 +1,29 @@
|
||||
--- ./src/toplevel/dMagnetic_pathnames.h.orig 2021-07-24 11:07:51.905404851 +0200
|
||||
+++ ./src/toplevel/dMagnetic_pathnames.h 2021-07-24 11:08:56.145404805 +0200
|
||||
@@ -33,16 +33,16 @@
|
||||
// some distributions require a specific prefix before the pathnames.
|
||||
// those macros allow them to patch the prefixes in a centralized location.
|
||||
|
||||
-#define PATH_ETC "/etc/"
|
||||
-#define PATH_USR "/usr/"
|
||||
-#define PATH_USR_LOCAL "/usr/local/"
|
||||
-#define PATH_USR_LOCAL_SHARE "/usr/local/share/"
|
||||
-#define PATH_USR_LOCAL_SHARE_GAMES "/usr/local/share/games/"
|
||||
-#define PATH_USR_LOCAL_GAMES "/usr/local/games/"
|
||||
-#define PATH_USR_SHARE "/usr/share/"
|
||||
-#define PATH_USR_SHARE_GAMES "/usr/share/games/"
|
||||
-#define PATH_USR_GAMES "/usr/games/"
|
||||
-#define PATH_USR_PKG_SHARE "/usr/pkg/share/"
|
||||
+#define PATH_ETC "@TERMUX_PREFIX@/etc/"
|
||||
+#define PATH_USR "@TERMUX_PREFIX@/"
|
||||
+#define PATH_USR_LOCAL "@TERMUX_PREFIX@/local/"
|
||||
+#define PATH_USR_LOCAL_SHARE "@TERMUX_PREFIX@/local/share/"
|
||||
+#define PATH_USR_LOCAL_SHARE_GAMES "@TERMUX_PREFIX@/local/share/games/"
|
||||
+#define PATH_USR_LOCAL_GAMES "@TERMUX_PREFIX@/local/games/"
|
||||
+#define PATH_USR_SHARE "@TERMUX_PREFIX@/share/"
|
||||
+#define PATH_USR_SHARE_GAMES "@TERMUX_PREFIX@/share/games/"
|
||||
+#define PATH_USR_GAMES "@TERMUX_PREFIX@/games/"
|
||||
+#define PATH_USR_PKG_SHARE "@TERMUX_PREFIX@/pkg/share/"
|
||||
|
||||
|
||||
#endif
|
@ -0,0 +1,28 @@
|
||||
--- ./src/toplevel/dMagnetic_helpscreens.c.orig 2021-07-22 23:13:51.000000000 +0200
|
||||
+++ ./src/toplevel/dMagnetic_helpscreens.c 2021-07-24 11:23:49.169384729 +0200
|
||||
@@ -70,10 +70,10 @@
|
||||
} tGameInfo;
|
||||
|
||||
const tPlatformInfo cdMagnetic_platformInfo[NUMPLATFORMS]={
|
||||
- {"mag", PATH_USR_LOCAL_SHARE_GAMES"magneticscrolls/", ".mag" ,0,0,1,1, PLATFORM_MAG, "-mag MAGFILE.mag"},
|
||||
- {"gfx", PATH_USR_LOCAL_SHARE_GAMES"magneticscrolls/", ".gfx" ,0,0,1,1, PLATFORM_GFX, "-gfx GFXFILE.gfx"},
|
||||
+ {"mag", PATH_USR_SHARE_GAMES"magneticscrolls/", ".mag" ,0,0,1,1, PLATFORM_MAG, "-mag MAGFILE.mag"},
|
||||
+ {"gfx", PATH_USR_SHARE_GAMES"magneticscrolls/", ".gfx" ,0,0,1,1, PLATFORM_GFX, "-gfx GFXFILE.gfx"},
|
||||
{"msdos", "/MSDOS/C/", "" ,1,0,1,0, PLATFORM_MSDOS, "-msdosdir DIRECTORY/"},
|
||||
- {"tworsc", PATH_USR_LOCAL_SHARE"games/", "TWO.RSC",0,1,1,0, PLATFORM_TWORSC, "-tworsc DIRECTORY/TWO.RSC"},
|
||||
+ {"tworsc", PATH_USR_SHARE"games/", "TWO.RSC",0,1,1,0, PLATFORM_TWORSC, "-tworsc DIRECTORY/TWO.RSC"},
|
||||
{"d64", "/8/", ".D64" ,1,0,2,0, PLATFORM_D64, "-d64 IMAGE1.d64,IMAGE2.d64"},
|
||||
{"amstradcpc", "/dsk/amstradcpc/", ".DSK" ,1,0,2,0, PLATFORM_AMSTRADCPC, "-amstradcpc IMAGE1.DSK,IMAGE2.DSK"},
|
||||
{"spectrum", "/dsk/spectrum/", ".DSK" ,0,0,1,0, PLATFORM_SPECTRUM, "-spectrum IMAGE.DSK"},
|
||||
@@ -286,8 +286,9 @@
|
||||
fprintf(stderr,"%s %s\n",argv0,cdMagnetic_platformInfo[i].cmdline);
|
||||
}
|
||||
fprintf(stderr,"\n");
|
||||
- fprintf(stderr,"You can get the .mag and .gfx files from\n");
|
||||
- fprintf(stderr," https://msmemorial.if-legends.org/\n");
|
||||
+ fprintf(stderr,"You can download the .mag and .gfx files using the\n");
|
||||
+ fprintf(stderr,"'magnetic-scrolls'-script, or manually by visiting\n");
|
||||
+ fprintf(stderr,"https://msmemorial.if-legends.org/\n");
|
||||
fprintf(stderr,"\n");
|
||||
fprintf(stderr,"To get a more detailed help, please run\n");
|
||||
fprintf(stderr," %s --help\n",argv0);
|
87
packages/dmagnetic/magnetic-scrolls.in
Normal file
87
packages/dmagnetic/magnetic-scrolls.in
Normal file
@ -0,0 +1,87 @@
|
||||
# Tool for downloading scrolls for dMagnetic from
|
||||
# https://msmemorial.if-legends.org/memorial.php
|
||||
|
||||
set -e -u
|
||||
|
||||
: "${TMPDIR:="@TERMUX_PREFIX@/tmp"}"
|
||||
|
||||
FG_GAMEFOLDER=@TERMUX_PREFIX@/share/games/magneticscrolls
|
||||
mkdir -p $FG_GAMEFOLDER
|
||||
|
||||
FG_TMPFILE=$TMPDIR/dmagnetic
|
||||
|
||||
#--backtitle "dMagnetic scrolls" \
|
||||
set +e
|
||||
dialog \
|
||||
--title "Select scroll" --clear \
|
||||
--radiolist "Choose scroll to play, select with space" 0 0 0 \
|
||||
"The Pawn" "Trapped - Destiny of Good...or Evil?" off \
|
||||
"The Guild of Thieves" "Why buy this game when you can steal it?" off \
|
||||
"Jinxter" "Every silver lining has a cloud..." off \
|
||||
"Corruption" "In the real world the good guys rarely win." off \
|
||||
"Fish!" "One Nibble and You're Hooked." off \
|
||||
"Myth" "It's not easy being a God..." off \
|
||||
"Wonderland" "Dream the dream... Live the dream..." off \
|
||||
2> $FG_TMPFILE
|
||||
|
||||
retval=$?
|
||||
set -e
|
||||
clear
|
||||
|
||||
case $retval in
|
||||
0)
|
||||
FG_GAME=`cat $FG_TMPFILE`;;
|
||||
1)
|
||||
# Cancel pressed
|
||||
exit;;
|
||||
255)
|
||||
# Esc pressed
|
||||
exit;;
|
||||
esac
|
||||
|
||||
case $FG_GAME in
|
||||
"The Pawn")
|
||||
FG_FILEDOWNLOAD=https://msmemorial.if-legends.org/download.php?pawnall.zip
|
||||
FG_GAMENAME=pawn
|
||||
;;
|
||||
"The Guild of Thieves")
|
||||
FG_FILEDOWNLOAD=https://msmemorial.if-legends.org/download.php?guildall.zip
|
||||
FG_GAMENAME=guild
|
||||
;;
|
||||
"Jinxter")
|
||||
FG_FILEDOWNLOAD=https://msmemorial.if-legends.org/download.php?jinxterall.zip
|
||||
FG_GAMENAME=jinxter
|
||||
;;
|
||||
"Corruption")
|
||||
FG_FILEDOWNLOAD=https://msmemorial.if-legends.org/download.php?corrmwall.zip
|
||||
FG_GAMENAME=corruption
|
||||
;;
|
||||
"Fish!")
|
||||
FG_FILEDOWNLOAD=https://msmemorial.if-legends.org/download.php?fishall.zip
|
||||
FG_GAMENAME=fish
|
||||
;;
|
||||
"Myth")
|
||||
FG_FILEDOWNLOAD=https://msmemorial.if-legends.org/download.php?mythall.zip
|
||||
FG_GAMENAME=myth
|
||||
;;
|
||||
"Wonderland")
|
||||
FG_FILEDOWNLOAD=https://msmemorial.if-legends.org/download.php?wonderall.zip
|
||||
FG_GAMENAME=wonderland
|
||||
;;
|
||||
*)
|
||||
echo "Error: unknown game."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
FG_FILENAME=`basename $FG_FILEDOWNLOAD`
|
||||
mkdir -p $FG_GAMEFOLDER/saves
|
||||
cd $FG_GAMEFOLDER
|
||||
if [ ! -f "${FG_FILEDOWNLOAD#*\?}" ]; then
|
||||
curl --referer https://msmemorial.if-legends.org/memorial.php \
|
||||
"$FG_FILEDOWNLOAD" -o "${FG_FILEDOWNLOAD#*\?}"
|
||||
fi
|
||||
unzip -o "${FG_FILEDOWNLOAD#*\?}"
|
||||
|
||||
echo "${FG_GAME} has been downloaded and installed!"
|
||||
echo "You can now start the game with \"dMagnetic ${FG_GAMENAME}\""
|
11
packages/dmagnetic/use-dMagnetic-from-PATH.patch
Normal file
11
packages/dmagnetic/use-dMagnetic-from-PATH.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ./Makefile.orig 2021-06-23 20:13:37.000000000 +0000
|
||||
+++ ./Makefile 2021-07-10 21:09:12.768295842 +0000
|
||||
@@ -106,7 +106,7 @@
|
||||
$(LINK) $(LDFLAGS) -o $@ $(OBJ_LOADER) $(OBJ_LINEA) $(OBJ_VM68K) $(OBJ_GUI) $(OBJ_TOPLEVEL)
|
||||
|
||||
dMagnetic.ini: dMagnetic
|
||||
- ./dMagnetic -helpini >dMagnetic.ini
|
||||
+ dMagnetic -helpini >dMagnetic.ini
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_EXTRA) $(INCFLAGS) -c -o $@ $<
|
17
packages/dopewars/build.sh
Normal file
17
packages/dopewars/build.sh
Normal file
@ -0,0 +1,17 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://dopewars.sourceforge.io
|
||||
TERMUX_PKG_DESCRIPTION="Drug-dealing game set in streets of New York City"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=1.6.1
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=https://prdownloads.sourceforge.net/dopewars/dopewars-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=83127903a61d81cda251a022f9df150d11e27bdd040e858c09c57927cc0edea6
|
||||
TERMUX_PKG_DEPENDS="ncurses, glib, pcre, curl"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
--without-sdl
|
||||
"
|
||||
TERMUX_PKG_RM_AFTER_INSTALL="share/gnome"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
autoreconf -vfi
|
||||
}
|
8
packages/dopewars/find-configfile.h.patch
Normal file
8
packages/dopewars/find-configfile.h.patch
Normal file
@ -0,0 +1,8 @@
|
||||
--- ../src-curses_client-Makefile.am.orig 2021-02-13 11:27:53.001589614 +0000
|
||||
+++ ./src/curses_client/Makefile.am 2021-02-13 11:28:07.268708391 +0000
|
||||
@@ -1,4 +1,4 @@
|
||||
noinst_LIBRARIES = libcursesclient.a
|
||||
libcursesclient_a_SOURCES = curses_client.c curses_client.h
|
||||
-AM_CPPFLAGS= -I${srcdir} @GLIB_CFLAGS@
|
||||
+AM_CPPFLAGS= -I${srcdir} -I$(top_srcdir)/src @GLIB_CFLAGS@
|
||||
DEFS = @DEFS@
|
30
packages/dopewars/serverside.c.patch
Normal file
30
packages/dopewars/serverside.c.patch
Normal file
@ -0,0 +1,30 @@
|
||||
diff -uNr dopewars-1.5.12/src/serverside.c dopewars-1.5.12.mod/src/serverside.c
|
||||
--- dopewars-1.5.12/src/serverside.c 2005-12-30 23:26:13.000000000 +0200
|
||||
+++ dopewars-1.5.12.mod/src/serverside.c 2020-04-28 03:01:36.285480545 +0300
|
||||
@@ -800,7 +800,7 @@
|
||||
dopelog(1, LF_SERVER, _("Maintaining pid file %s"), PidFile);
|
||||
fprintf(fp, "%ld\n", (long)getpid());
|
||||
fclose(fp);
|
||||
- chmod(PidFile, S_IREAD | S_IWRITE);
|
||||
+ chmod(PidFile, S_IRUSR | S_IWUSR);
|
||||
} else {
|
||||
gchar *OpenError = ErrStrFromErrno(errno);
|
||||
g_warning(_("Cannot create pid file %s: %s"), PidFile, OpenError);
|
||||
@@ -1089,7 +1089,7 @@
|
||||
}
|
||||
|
||||
#ifndef CYGWIN
|
||||
-static gchar sockpref[] = "/tmp/.dopewars";
|
||||
+static gchar sockpref[] = "@TERMUX_PREFIX@/tmp/.dopewars";
|
||||
|
||||
static gchar *GetLocalSockDir(void)
|
||||
{
|
||||
@@ -1192,7 +1192,7 @@
|
||||
if (localsock == -1) {
|
||||
dopelog(0, LF_SERVER,
|
||||
_("Could not set up Unix domain socket for admin "
|
||||
- "connections - check permissions on /tmp!"));
|
||||
+ "connections - check permissions on @TERMUX_PREFIX@/tmp!"));
|
||||
}
|
||||
#endif
|
||||
|
11
packages/dopewars/setregid.patch
Normal file
11
packages/dopewars/setregid.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ../serverside.c.orig 2021-02-12 21:30:27.870154851 +0000
|
||||
+++ ./src/serverside.c 2021-02-12 21:31:05.391626081 +0000
|
||||
@@ -1807,7 +1807,7 @@
|
||||
*/
|
||||
void DropPrivileges()
|
||||
{
|
||||
-#ifndef CYGWIN
|
||||
+#if !defined(CYGWIN) && !defined(__ANDROID__)
|
||||
|
||||
#ifdef HAVE_ISSETUGID
|
||||
if (issetugid() == 0) return;
|
20
packages/frotz/build.sh
Normal file
20
packages/frotz/build.sh
Normal file
@ -0,0 +1,20 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://gitlab.com/DavidGriffith/frotz
|
||||
TERMUX_PKG_DESCRIPTION="Interpreter for Infocom and other Z-machine interactive fiction (IF) games"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
# frotz does not depend on dialog or curl, but the zgames script we bundle below in termux_step_make_install() do.
|
||||
TERMUX_PKG_VERSION=2.53
|
||||
TERMUX_PKG_SRCURL=https://gitlab.com/DavidGriffith/frotz/-/archive/${TERMUX_PKG_VERSION}/frotz-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=ed288b2ddad6c100f7ad7cb6ee8c867053d75144e96160b5ba00abb8969cdf30
|
||||
TERMUX_PKG_DEPENDS="ncurses, dialog, curl"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
termux_step_pre_configure () {
|
||||
export CURSES_CFLAGS="-I$TERMUX_PREFIX/include"
|
||||
export SYSCONFDIR="$TERMUX_PREFIX/include"
|
||||
export SOUND_TYPE="none"
|
||||
}
|
||||
|
||||
termux_step_post_make_install () {
|
||||
install -m755 $TERMUX_PKG_BUILDER_DIR/zgames $TERMUX_PREFIX/bin/zgames
|
||||
}
|
11
packages/frotz/ux_frotz.h.patch
Normal file
11
packages/frotz/ux_frotz.h.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ../ux_frotz.h.orig 2019-12-21 18:00:15.498402287 +0100
|
||||
+++ ./src/curses/ux_frotz.h 2019-12-21 18:00:32.478537779 +0100
|
||||
@@ -40,7 +40,7 @@
|
||||
#define ERR_REPORT_DEF ERR_REPORT_ONCE
|
||||
#define QUETZAL_DEF 1
|
||||
#define SAVEDIR_DEF "if-saves"
|
||||
-#define ZCODEPATH_DEF "/usr/games/zcode:/usr/local/games/zcode"
|
||||
+#define ZCODEPATH_DEF "@TERMUX_PREFIX@/usr/games/zcode:@TERMUX_PREFIX@/usr/local/games/zcode"
|
||||
|
||||
|
||||
#define LINELEN 256 /* for getconfig() */
|
88
packages/frotz/zgames
Normal file
88
packages/frotz/zgames
Normal file
@ -0,0 +1,88 @@
|
||||
# Lots of resources at: http://www.ifarchive.org/indexes/if-archiveXgamesXzcode.html
|
||||
|
||||
set -e -u
|
||||
|
||||
FG_FOLDER=$HOME/.zgames
|
||||
mkdir -p $FG_FOLDER
|
||||
|
||||
FG_TMPFILE=$FG_FOLDER/tmp
|
||||
|
||||
#--backtitle "Frotz games" \
|
||||
set +e
|
||||
dialog \
|
||||
--title "Select Game" --clear \
|
||||
--radiolist "Choose game to play, select with space" 0 0 0 \
|
||||
"Adventure" "Welcome to Adventure" off \
|
||||
"Castle Adventure!" "Old-school style" off \
|
||||
"Zork I" "The game that started it all" off \
|
||||
"Zork II" "The next step downward to danger" off \
|
||||
"Zork III" "It all comes down to this" off \
|
||||
"Super Z Trek" "The classic Star Trek" off \
|
||||
"The Hitchhiker's Guide to the Galaxy" "Don't Panic!" off \
|
||||
"zRogue" "Port of the classic game Rogue" off \
|
||||
"Z Racer" "Real-time racing game" off \
|
||||
2> $FG_TMPFILE
|
||||
retval=$?
|
||||
set -e
|
||||
clear
|
||||
|
||||
case $retval in
|
||||
0)
|
||||
FG_GAME=`cat $FG_TMPFILE`;;
|
||||
1)
|
||||
# Cancel pressed
|
||||
exit;;
|
||||
255)
|
||||
# Esc pressed
|
||||
exit;;
|
||||
esac
|
||||
|
||||
case $FG_GAME in
|
||||
"Adventure")
|
||||
FG_FILEDOWNLOAD=http://www.ifarchive.org/if-archive/games/zcode/advent.z8
|
||||
FG_GAMEFOLDER=$FG_FOLDER/adventure;;
|
||||
"Castle Adventure!")
|
||||
FG_FILEDOWNLOAD=http://www.ifarchive.org/if-archive/games/zcode/castle.z8
|
||||
FG_GAMEFOLDER=$FG_FOLDER/castle_adventure;;
|
||||
"Zork I")
|
||||
FG_FILEDOWNLOAD=http://www.infocom-if.org/downloads/zork1.zip
|
||||
FG_GAMEFILE=DATA/ZORK1.DAT
|
||||
FG_GAMEFOLDER=$FG_FOLDER/zork1;;
|
||||
"Zork II")
|
||||
FG_FILEDOWNLOAD=http://www.infocom-if.org/downloads/zork2.zip
|
||||
FG_GAMEFILE=DATA/ZORK2.DAT
|
||||
FG_GAMEFOLDER=$FG_FOLDER/zork2;;
|
||||
"Zork III")
|
||||
FG_FILEDOWNLOAD=http://www.infocom-if.org/downloads/zork3.zip
|
||||
FG_GAMEFILE=DATA/ZORK3.DAT
|
||||
FG_GAMEFOLDER=$FG_FOLDER/zork3;;
|
||||
"Super Z Trek")
|
||||
FG_FILEDOWNLOAD=http://www.ifarchive.org/if-archive/games/zcode/ztrek.z5
|
||||
FG_GAMEFOLDER=$FG_FOLDER/superztrek;;
|
||||
"The Hitchhiker's Guide to the Galaxy")
|
||||
FG_FILEDOWNLOAD=http://www.douglasadams.com/creations/hhgg.z3
|
||||
FG_GAMEFOLDER=$FG_FOLDER/hhgg;;
|
||||
"zRogue")
|
||||
FG_FILEDOWNLOAD=http://www.ifarchive.org/if-archive/games/zcode/rogue.z5
|
||||
FG_GAMEFOLDER=$FG_FOLDER/zrogue;;
|
||||
"Z Racer")
|
||||
FG_FILEDOWNLOAD=http://www.ifarchive.org/if-archive/games/zcode/zracer.z5
|
||||
FG_GAMEFOLDER=$FG_FOLDER/zracer;;
|
||||
*)
|
||||
exit;;
|
||||
esac
|
||||
|
||||
FG_FILENAME=`basename $FG_FILEDOWNLOAD`
|
||||
mkdir -p $FG_GAMEFOLDER/saves
|
||||
cd $FG_GAMEFOLDER
|
||||
if [ ! -f $FG_FILENAME ]; then
|
||||
curl $FG_FILEDOWNLOAD -o $FG_FILENAME
|
||||
if [ "${FG_FILENAME#*.}" = "zip" ]; then
|
||||
unzip $FG_FILENAME;
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${FG_FILENAME#*.}" != "zip" ]; then FG_GAMEFILE=`basename $FG_FILEDOWNLOAD`; fi
|
||||
|
||||
cd saves
|
||||
frotz ../$FG_GAMEFILE
|
26
packages/glulxe/Makefile.patch
Normal file
26
packages/glulxe/Makefile.patch
Normal file
@ -0,0 +1,26 @@
|
||||
--- ../Makefile.orig 2017-01-23 20:14:37.000000000 +0100
|
||||
+++ ./Makefile 2019-10-24 21:25:57.022914016 +0200
|
||||
@@ -7,9 +7,9 @@
|
||||
# sets of values appear below; uncomment one of them and change the
|
||||
# directories appropriately.
|
||||
|
||||
-GLKINCLUDEDIR = ../cheapglk
|
||||
-GLKLIBDIR = ../cheapglk
|
||||
-GLKMAKEFILE = Make.cheapglk
|
||||
+GLKINCLUDEDIR = glkterm
|
||||
+GLKLIBDIR = glkterm
|
||||
+GLKMAKEFILE = Make.glktermw
|
||||
|
||||
#GLKINCLUDEDIR = ../glkterm
|
||||
#GLKLIBDIR = ../glkterm
|
||||
@@ -29,9 +29,8 @@
|
||||
|
||||
# Pick a C compiler.
|
||||
#CC = cc
|
||||
-CC = gcc
|
||||
|
||||
-OPTIONS = -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-unused -DOS_UNIX
|
||||
+OPTIONS := $(CFLAGS) -DOS_UNIX
|
||||
|
||||
# Locate the libxml2 library. You only need these lines if you are using
|
||||
# the VM_DEBUGGER option. If so, uncomment these and set appropriately.
|
21
packages/glulxe/build.sh
Normal file
21
packages/glulxe/build.sh
Normal file
@ -0,0 +1,21 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.eblong.com/zarf/glulx/
|
||||
TERMUX_PKG_DESCRIPTION="Interpreter for the Glulx portable VM for interactive fiction (IF) games"
|
||||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=(0.5.4
|
||||
1.0.4)
|
||||
TERMUX_PKG_REVISION=4
|
||||
TERMUX_PKG_SRCURL=(https://www.eblong.com/zarf/glulx/glulxe-${TERMUX_PKG_VERSION[0]//.}.tar.gz
|
||||
https://www.eblong.com/zarf/glk/glktermw-${TERMUX_PKG_VERSION[1]//.}.tar.gz)
|
||||
TERMUX_PKG_SHA256=(1fc26f8aa31c880dbc7c396ede196c5d2cdff9bdefc6b192f320a96c5ef3376e
|
||||
5968630b45e2fd53de48424559e3579db0537c460f4dc2631f258e1c116eb4ea)
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_DEPENDS="ncurses"
|
||||
|
||||
termux_step_post_configure () {
|
||||
CC="$CC $CFLAGS $CPPFLAGS $LDFLAGS" PREFIX=$TERMUX_PREFIX make -C glkterm
|
||||
}
|
||||
|
||||
termux_step_make_install () {
|
||||
install glulxe $TERMUX_PREFIX/bin
|
||||
}
|
80
packages/glulxe/glkterm.patch
Normal file
80
packages/glulxe/glkterm.patch
Normal file
@ -0,0 +1,80 @@
|
||||
diff -u -r ../../glkterm/Makefile ./glkterm/Makefile
|
||||
--- ../../glkterm/Makefile 2012-10-14 19:21:09.000000000 +0200
|
||||
+++ ./glkterm/Makefile 2014-02-15 13:43:48.000000000 +0100
|
||||
@@ -10,21 +10,21 @@
|
||||
|
||||
# Pick a C compiler.
|
||||
#CC = cc
|
||||
-CC = gcc -ansi
|
||||
+#CC = gcc -ansi
|
||||
|
||||
# You may need to set directories to pick up the ncursesw library.
|
||||
#INCLUDEDIRS = -I/usr/5include
|
||||
#LIBDIRS = -L/usr/5lib
|
||||
-LIBS = -lncursesw
|
||||
+LIBS = $(LDFLAGS) -lncursesw
|
||||
|
||||
# Use this LIBS line instead of the above if you do not have ncursesw
|
||||
# available. For example, on a standard Mac OSX setup. (You will
|
||||
# probably also have to set LOCAL_NCURSESW in CFLAGS or in gtoption.h.)
|
||||
#LIBS = -lncurses
|
||||
|
||||
-OPTIONS = -g -Wall
|
||||
+#OPTIONS = -g -Wall
|
||||
|
||||
-CFLAGS = $(OPTIONS) $(INCLUDEDIRS)
|
||||
+#CFLAGS = $(OPTIONS) $(INCLUDEDIRS)
|
||||
|
||||
GLKLIB = libglktermw.a
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
cgunicod.o: cgunigen.c
|
||||
|
||||
$(GLKLIB): $(GLKTERM_OBJS)
|
||||
- ar r $(GLKLIB) $(GLKTERM_OBJS)
|
||||
- ranlib $(GLKLIB)
|
||||
+ $(AR) r $(GLKLIB) $(GLKTERM_OBJS)
|
||||
+ $(RANLIB) $(GLKLIB)
|
||||
|
||||
Make.glktermw:
|
||||
echo LINKLIBS = $(LIBDIRS) $(LIBS) > Make.glktermw
|
||||
diff -u -r ../../glkterm/cgdate.c ./glkterm/cgdate.c
|
||||
--- ../../glkterm/cgdate.c 2012-10-14 19:21:09.000000000 +0200
|
||||
+++ ./glkterm/cgdate.c 2014-02-15 13:45:27.000000000 +0100
|
||||
@@ -7,6 +7,24 @@
|
||||
#include "glk.h"
|
||||
#include "glkterm.h"
|
||||
|
||||
+#ifdef __ANDROID__
|
||||
+time_t timegm (struct tm *tm) {
|
||||
+ time_t ret;
|
||||
+ char *tz;
|
||||
+
|
||||
+ tz = getenv("TZ");
|
||||
+ setenv("TZ", "", 1);
|
||||
+ tzset();
|
||||
+ ret = mktime(tm);
|
||||
+ if (tz)
|
||||
+ setenv("TZ", tz, 1);
|
||||
+ else
|
||||
+ unsetenv("TZ");
|
||||
+ tzset();
|
||||
+ return ret;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/* This file is copied directly from the cheapglk package.
|
||||
(Except that warning string constants are changed to L"..." constants.) */
|
||||
|
||||
diff -u -r ../../glkterm/gtncursesw.c ./glkterm/gtncursesw.c
|
||||
--- ../../glkterm/gtncursesw.c 2012-10-14 19:21:09.000000000 +0200
|
||||
+++ ./glkterm/gtncursesw.c 2014-02-15 13:43:48.000000000 +0100
|
||||
@@ -92,7 +92,7 @@
|
||||
#else /* LOCAL_NCURSESW */
|
||||
|
||||
#define _XOPEN_SOURCE_EXTENDED /* ncursesw *wch* and *wstr* functions */
|
||||
-#include <ncursesw/ncurses.h>
|
||||
+#include <ncurses.h>
|
||||
|
||||
int local_get_wch (wint_t *ch)
|
||||
{
|
10
packages/gnuchess/build.sh
Normal file
10
packages/gnuchess/build.sh
Normal file
@ -0,0 +1,10 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/chess/
|
||||
TERMUX_PKG_DESCRIPTION="Chess-playing program"
|
||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=6.2.8
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/chess/gnuchess-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=d50446cda8012240321da39cddbb4df4d08458a8d538a4738882814139583847
|
||||
TERMUX_PKG_DEPENDS="libc++, ncurses, readline"
|
||||
TERMUX_PKG_RM_AFTER_INSTALL="bin/gnuchessu bin/gnuchessx"
|
11
packages/gnuchess/components.cc.patch
Normal file
11
packages/gnuchess/components.cc.patch
Normal file
@ -0,0 +1,11 @@
|
||||
diff -uNr gnuchess-6.2.5/src/components.cc gnuchess-6.2.5.mod/src/components.cc
|
||||
--- gnuchess-6.2.5/src/components.cc 2017-06-11 18:17:14.000000000 +0300
|
||||
+++ gnuchess-6.2.5.mod/src/components.cc 2018-11-09 14:17:10.952608702 +0200
|
||||
@@ -171,6 +171,6 @@
|
||||
|
||||
void TerminateInput()
|
||||
{
|
||||
- pthread_cancel( input_thread );
|
||||
+ pthread_kill( input_thread, 0 );
|
||||
pthread_join( input_thread, NULL );
|
||||
}
|
14
packages/gnuchess/main.cc.patch
Normal file
14
packages/gnuchess/main.cc.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff -u -r ../gnuchess-6.2.1/src/main.cc ./src/main.cc
|
||||
--- ../gnuchess-6.2.1/src/main.cc 2015-01-04 05:10:41.000000000 -0500
|
||||
+++ ./src/main.cc 2015-01-05 20:40:16.816570715 -0500
|
||||
@@ -237,8 +237,8 @@
|
||||
char opt_addbook[MAXSTR+1] = "";
|
||||
char *endptr;
|
||||
|
||||
- /*disable graphic output by default */
|
||||
- graphicmodeoutput = 0;
|
||||
+ /*enable graphic output by default */
|
||||
+ graphicmodeoutput = 1;
|
||||
|
||||
|
||||
progname = argv[0]; /* Save in global for cmd_usage */
|
24
packages/gnugo/build.sh
Normal file
24
packages/gnugo/build.sh
Normal file
@ -0,0 +1,24 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/gnugo/
|
||||
TERMUX_PKG_DESCRIPTION="Program that plays the game of Go"
|
||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=3.8
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/gnugo/gnugo-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=da68d7a65f44dcf6ce6e4e630b6f6dd9897249d34425920bfdd4e07ff1866a72
|
||||
TERMUX_PKG_DEPENDS="ncurses, readline"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-readline"
|
||||
TERMUX_PKG_HOSTBUILD=true
|
||||
|
||||
termux_step_pre_configure() {
|
||||
CFLAGS+=" -Wno-overflow -fcommon"
|
||||
}
|
||||
|
||||
termux_step_post_configure () {
|
||||
cp $TERMUX_PKG_HOSTBUILD_DIR/patterns/mkeyes $TERMUX_PKG_BUILDDIR/patterns/mkeyes
|
||||
cp $TERMUX_PKG_HOSTBUILD_DIR/patterns/uncompress_fuseki $TERMUX_PKG_BUILDDIR/patterns/uncompress_fuseki
|
||||
cp $TERMUX_PKG_HOSTBUILD_DIR/patterns/joseki $TERMUX_PKG_BUILDDIR/patterns/joseki
|
||||
cp $TERMUX_PKG_HOSTBUILD_DIR/patterns/mkmcpat $TERMUX_PKG_BUILDDIR/patterns/mkmcpat
|
||||
cp $TERMUX_PKG_HOSTBUILD_DIR/patterns/mkpat $TERMUX_PKG_BUILDDIR/patterns/mkpat
|
||||
touch -d "next hour" $TERMUX_PKG_BUILDDIR/patterns/*
|
||||
}
|
22
packages/gnushogi/build.sh
Normal file
22
packages/gnushogi/build.sh
Normal file
@ -0,0 +1,22 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/gnushogi/
|
||||
TERMUX_PKG_DESCRIPTION="Program that plays the game of Shogi, also known as Japanese Chess"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=1.4.2
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/gnushogi/gnushogi-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=1ecc48a866303c63652552b325d685e7ef5e9893244080291a61d96505d52b29
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_lib_curses_clrtoeol=yes --with-curses"
|
||||
TERMUX_PKG_RM_AFTER_INSTALL="info/gnushogi.info"
|
||||
TERMUX_PKG_DEPENDS="ncurses"
|
||||
TERMUX_PKG_HOSTBUILD=true
|
||||
|
||||
termux_step_pre_configure() {
|
||||
CFLAGS+=" $CPPFLAGS -fcommon"
|
||||
}
|
||||
|
||||
termux_step_post_configure () {
|
||||
cp $TERMUX_PKG_HOSTBUILD_DIR/gnushogi/pat2inc $TERMUX_PKG_BUILDDIR/gnushogi/pat2inc
|
||||
# Update timestamps so that the binaries does not get rebuilt:
|
||||
touch -d "next hour" $TERMUX_PKG_BUILDDIR/gnushogi/pat2inc
|
||||
}
|
21
packages/gnushogi/gnushogi-makefile-in.patch
Normal file
21
packages/gnushogi/gnushogi-makefile-in.patch
Normal file
@ -0,0 +1,21 @@
|
||||
diff -u -r ../gnushogi-1.4.2/gnushogi/Makefile.in ./gnushogi/Makefile.in
|
||||
--- ../gnushogi-1.4.2/gnushogi/Makefile.in 2014-02-17 21:26:59.000000000 +0100
|
||||
+++ ./gnushogi/Makefile.in 2014-03-10 00:07:58.821997498 +0100
|
||||
@@ -54,7 +54,7 @@
|
||||
LIBDIR = $(prefix)/lib/$(PROGNAME)
|
||||
|
||||
# Where the man page goes.
|
||||
-MANDIR = $(prefix)/man/man6
|
||||
+MANDIR = @mandir@/man6
|
||||
|
||||
# Where the info file goes.
|
||||
INFODIR = $(prefix)/info
|
||||
@@ -241,7 +241,7 @@
|
||||
#
|
||||
|
||||
install: $(PROGNAME)
|
||||
- strip $(PROGNAME)
|
||||
+ $(STRIP) $(PROGNAME)
|
||||
$(INSTALL_PROGRAM) -d $(BINDIR)
|
||||
$(INSTALL_PROGRAM) -d $(LIBDIR)
|
||||
$(INSTALL_PROGRAM) -d $(MANDIR)
|
12
packages/gnushogi/use_libncurses.patch
Normal file
12
packages/gnushogi/use_libncurses.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -u -r ../gnushogi-1.4.2/configure ./configure
|
||||
--- ../gnushogi-1.4.2/configure 2014-02-17 21:30:14.000000000 +0100
|
||||
+++ ./configure 2014-02-25 23:37:49.000000000 +0100
|
||||
@@ -3315,7 +3315,7 @@
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_clrtoeol" >&5
|
||||
$as_echo "$ac_cv_lib_curses_clrtoeol" >&6; }
|
||||
if test "x$ac_cv_lib_curses_clrtoeol" = xyes; then :
|
||||
- LIBCURSES=-lcurses
|
||||
+ LIBCURSES=-lncurses
|
||||
|
||||
CURSESDSP=cursesdsp.o
|
||||
|
19
packages/gnuski/Makefile.patch
Normal file
19
packages/gnuski/Makefile.patch
Normal file
@ -0,0 +1,19 @@
|
||||
--- ../Makefile.orig 2020-05-09 17:15:03.947271379 +0200
|
||||
+++ ./Makefile 2020-05-09 17:16:08.437076432 +0200
|
||||
@@ -1,10 +1,12 @@
|
||||
-CC=gcc
|
||||
-FLAGS=-O2 -o gnuski
|
||||
-LIBS=-lncurses
|
||||
+CC ?= gcc
|
||||
+LIBS = -lncurses
|
||||
FILES=main.c objects.c
|
||||
|
||||
all:
|
||||
- $(CC) $(FLAGS) $(FILES) $(LIBS)
|
||||
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(FILES) $(LIBS) -o gnuski
|
||||
|
||||
clean:
|
||||
rm *~ gnuski
|
||||
+
|
||||
+install:
|
||||
+ install -Dm700 gnuski $(PREFIX)/bin/
|
10
packages/gnuski/build.sh
Normal file
10
packages/gnuski/build.sh
Normal file
@ -0,0 +1,10 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://sourceforge.net/projects/gnuski
|
||||
TERMUX_PKG_DESCRIPTION="Open source clone of Skifree, the old Windows game"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="Henrik Grimler @Grimler91"
|
||||
TERMUX_PKG_VERSION=0.3
|
||||
TERMUX_PKG_REVISION=5
|
||||
TERMUX_PKG_SRCURL=https://sourceforge.net/projects/gnuski/files/gnuski/gnuski-${TERMUX_PKG_VERSION}/gnuski-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=1b629bd29dd6ad362b56055ccdb4c7ad462ff39d7a0deb915753c2096f5f959d
|
||||
TERMUX_PKG_DEPENDS="ncurses"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
10
packages/gnuski/objects.h.patch
Normal file
10
packages/gnuski/objects.h.patch
Normal file
@ -0,0 +1,10 @@
|
||||
This patch just silences a warning about implicit declaration of setupColors
|
||||
--- ../objects.h.orig 2020-05-09 17:21:04.179875753 +0200
|
||||
+++ ./objects.h 2020-05-09 17:20:45.526561303 +0200
|
||||
@@ -49,4 +49,6 @@
|
||||
/* Checks for collision between a player object and a target */
|
||||
int collision (struct Object player, struct Object target);
|
||||
|
||||
+void setupColors ();
|
||||
+
|
||||
#endif
|
10
packages/greed/build.sh
Normal file
10
packages/greed/build.sh
Normal file
@ -0,0 +1,10 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://www.catb.org/~esr/greed/
|
||||
TERMUX_PKG_DESCRIPTION="Game where you try to eat as much as possible of the board before munching yourself into a corner"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=4.2
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=http://www.catb.org/~esr/greed/greed-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=702bc0314ddedb2ba17d4b55d873384a1606886e8d69f35ce67f6e3024a8d3fd
|
||||
TERMUX_PKG_DEPENDS="ncurses"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
12
packages/greed/lockfile_path.patch
Normal file
12
packages/greed/lockfile_path.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -u -r ../greed-3.9/greed.c ./greed.c
|
||||
--- ../greed-3.9/greed.c 2013-10-23 18:40:41.000000000 +0200
|
||||
+++ ./greed.c 2014-02-22 11:00:49.000000000 +0100
|
||||
@@ -69,7 +69,7 @@
|
||||
/* rnd() returns a random number between 1 and x */
|
||||
#define rnd(x) (int) ((lrand48() % (x))+1)
|
||||
|
||||
-#define LOCKPATH "/tmp/Greed.lock" /* lock path for high score file */
|
||||
+#define LOCKPATH "@TERMUX_PREFIX@/tmp/Greed.lock" /* lock path for high score file */
|
||||
|
||||
/*
|
||||
* changing stuff in this struct
|
29
packages/greed/makefile.patch
Normal file
29
packages/greed/makefile.patch
Normal file
@ -0,0 +1,29 @@
|
||||
diff -u -r ../greed-3.9/Makefile ./Makefile
|
||||
--- ../greed-3.9/Makefile 2013-10-23 18:57:16.000000000 +0200
|
||||
+++ ./Makefile 2014-02-12 14:33:14.000000000 +0100
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
VERS=3.9
|
||||
|
||||
-SFILE=/usr/games/lib/greed.hs
|
||||
+SFILE=@TERMUX_PREFIX@/var/greed.hs
|
||||
# Location of game executable
|
||||
-BIN=/usr/games
|
||||
+BIN=@TERMUX_PREFIX@/bin
|
||||
|
||||
greed: greed.c
|
||||
- $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -DSCOREFILE=\"$(SFILE)\" -DRELEASE=\"$(VERS)\" -o greed greed.c -O3 -lcurses
|
||||
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -DSCOREFILE=\"$(SFILE)\" -DRELEASE=\"$(VERS)\" -o greed greed.c -lncurses
|
||||
|
||||
greed.6: greed.xml
|
||||
xmlto man greed.xml
|
||||
@@ -17,7 +17,8 @@
|
||||
|
||||
install: greed.6 uninstall
|
||||
cp greed $(BIN)
|
||||
- cp greed.6 /usr/share/man/man6/greed.6
|
||||
+ mkdir -p @TERMUX_PREFIX@/share/man/man6
|
||||
+ cp greed.6 @TERMUX_PREFIX@/share/man/man6/greed.6
|
||||
|
||||
uninstall:
|
||||
rm -f $(BIN)/install /usr/share/man/man6/greed.6
|
40
packages/lexter/acinclude.m4.patch
Normal file
40
packages/lexter/acinclude.m4.patch
Normal file
@ -0,0 +1,40 @@
|
||||
--- ../acinclude.m4.orig 2020-05-10 13:41:17.038645158 +0200
|
||||
+++ ./acinclude.m4 2020-05-10 13:43:55.788790346 +0200
|
||||
@@ -43,6 +43,37 @@
|
||||
fi
|
||||
])
|
||||
|
||||
+# AM_LC_MESSAGES version: 5 updated: 2015/05/10 19:52:14
|
||||
+# --------------
|
||||
+# Inserted as requested by gettext 0.10.40
|
||||
+# File from /usr/share/aclocal
|
||||
+# lcmessage.m4
|
||||
+# ====================
|
||||
+# Check whether LC_MESSAGES is available in <locale.h>.
|
||||
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
+#
|
||||
+# This file can be copied and used freely without restrictions. It can
|
||||
+# be used in projects which are not available under the GNU General Public
|
||||
+# License or the GNU Library General Public License but which still want
|
||||
+# to provide support for the GNU gettext functionality.
|
||||
+# Please note that the actual code of the GNU gettext library is covered
|
||||
+# by the GNU Library General Public License, and the rest of the GNU
|
||||
+# gettext package package is covered by the GNU General Public License.
|
||||
+# They are *not* in the public domain.
|
||||
+
|
||||
+# serial 2
|
||||
+
|
||||
+AC_DEFUN([AM_LC_MESSAGES],
|
||||
+[if test $ac_cv_header_locale_h = yes; then
|
||||
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
|
||||
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
|
||||
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
|
||||
+ if test $am_cv_val_LC_MESSAGES = yes; then
|
||||
+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
|
||||
+ [Define if your <locale.h> file defines LC_MESSAGES.])
|
||||
+ fi
|
||||
+fi])
|
||||
+
|
||||
# Macro to add for using GNU gettext.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
#
|
14
packages/lexter/build.sh
Normal file
14
packages/lexter/build.sh
Normal file
@ -0,0 +1,14 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.kyne.com.au/~mark/software/lexter.php
|
||||
TERMUX_PKG_DESCRIPTION="A real-time word puzzle for text terminals"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="Henrik Grimler @Grimler91"
|
||||
TERMUX_PKG_VERSION=1.0.3
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=https://www.kyne.com.au/~mark/software/download/lexter-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=b61a28fd5249b7d6c0df9be91c97c2acd00ccd9ad1e7b0c99808f6cdc96d5188
|
||||
TERMUX_PKG_DEPENDS="ncurses, gettext"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--datadir=$TERMUX_PREFIX/share/lexter"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
autoreconf -vfi
|
||||
}
|
11
packages/lexter/configure.in.patch
Normal file
11
packages/lexter/configure.in.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ../configure.in.orig 2020-05-10 14:28:06.173300836 +0200
|
||||
+++ ./configure.in 2020-05-10 14:36:06.592909972 +0200
|
||||
@@ -44,7 +44,7 @@
|
||||
AC_HEADER_TIME
|
||||
|
||||
dnl Checks for library functions.
|
||||
-AC_CHECK_FUNCS(getcwd gettimeofday getwd putenv select strdup strerror,,
|
||||
+AC_CHECK_FUNCS(getcwd gettimeofday putenv select strdup strerror,,
|
||||
AC_MSG_ERROR([Missing required function]))
|
||||
AC_FUNC_ALLOCA
|
||||
AC_FUNC_MMAP
|
18
packages/moon-buggy/build.sh
Normal file
18
packages/moon-buggy/build.sh
Normal file
@ -0,0 +1,18 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://github.com/seehuhn/moon-buggy
|
||||
TERMUX_PKG_DESCRIPTION="Simple game where you drive a car across the moon's surface"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_DEPENDS="ncurses"
|
||||
TERMUX_PKG_VERSION=1.0.51
|
||||
TERMUX_PKG_REVISION=4
|
||||
# Main site down 2017-01-06.
|
||||
# TERMUX_PKG_SRCURL=http://m.seehuhn.de/programs/moon-buggy-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SRCURL=ftp://ftp.netbsd.org/pub/pkgsrc/distfiles/moon-buggy-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=352dc16ccae4c66f1e87ab071e6a4ebeb94ff4e4f744ce1b12a769d02fe5d23f
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--sharedstatedir=$TERMUX_PREFIX/var"
|
||||
|
||||
termux_step_make_install () {
|
||||
mkdir -p $TERMUX_PREFIX/share/man/man6
|
||||
cp moon-buggy $TERMUX_PREFIX/bin
|
||||
cp moon-buggy.6 $TERMUX_PREFIX/share/man/man6
|
||||
}
|
25
packages/moon-buggy/no_pw_gecos.patch
Normal file
25
packages/moon-buggy/no_pw_gecos.patch
Normal file
@ -0,0 +1,25 @@
|
||||
diff -u -r ../moon-buggy-1.0.51/realname.c ./realname.c
|
||||
--- ../moon-buggy-1.0.51/realname.c 2006-03-19 20:28:18.000000000 +0100
|
||||
+++ ./realname.c 2014-02-22 18:14:49.000000000 +0100
|
||||
@@ -37,18 +37,9 @@
|
||||
char *tmp;
|
||||
|
||||
if (buffer[0] == '\0') {
|
||||
- uid_t me = geteuid ();
|
||||
- struct passwd *my_passwd = getpwuid (me);
|
||||
- if (my_passwd) {
|
||||
- int i;
|
||||
- strncpy (buffer, my_passwd->pw_gecos, size);
|
||||
- for (i=0; i<size; ++i) {
|
||||
- if (buffer[i] == ',') {
|
||||
- buffer[i] = '\0';
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
+ char* name_default = getenv("USER");
|
||||
+ if (name_default == NULL) name_default = "Droid";
|
||||
+ strncpy(buffer, name_default, size);
|
||||
}
|
||||
|
||||
werase (message);
|
35
packages/moria/CMakeLists.txt.patch
Normal file
35
packages/moria/CMakeLists.txt.patch
Normal file
@ -0,0 +1,35 @@
|
||||
diff -uNr umoria-5.7.11/CMakeLists.txt umoria-5.7.11.mod/CMakeLists.txt
|
||||
--- umoria-5.7.11/CMakeLists.txt 2020-02-26 22:59:33.000000000 +0200
|
||||
+++ umoria-5.7.11.mod/CMakeLists.txt 2020-03-20 15:49:55.823149195 +0200
|
||||
@@ -161,11 +161,10 @@
|
||||
#
|
||||
# Set up the install paths and files
|
||||
#
|
||||
-set(build_dir "umoria")
|
||||
+option(build_dir "Directory for build files" "umoria")
|
||||
set(data_dir "${build_dir}/data")
|
||||
|
||||
|
||||
-set(EXECUTABLE_OUTPUT_PATH ${build_dir})
|
||||
|
||||
# Core game data files
|
||||
set(
|
||||
@@ -237,7 +236,7 @@
|
||||
set(resources ${data_files} ${support_files})
|
||||
|
||||
# Also add resources to the target so they are visible in the IDE
|
||||
-add_executable(umoria ${source_files} ${resources})
|
||||
+add_executable(moria ${source_files} ${resources})
|
||||
|
||||
|
||||
# This is horrible, but needed bacause `find_package()` doesn't use the
|
||||
@@ -262,4 +261,8 @@
|
||||
endif ()
|
||||
|
||||
include_directories(${CURSES_INCLUDE_DIR})
|
||||
-target_link_libraries(umoria ${CURSES_LIBRARIES})
|
||||
+target_link_libraries(moria ${CURSES_LIBRARIES})
|
||||
+
|
||||
+install(TARGETS moria DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
+install(FILES historical/manual.md historical/faq.md LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/moria/)
|
||||
+INSTALL(DIRECTORY ${build_dir}/data DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/games/moria/ FILES_MATCHING PATTERN "*.txt")
|
17
packages/moria/build.sh
Normal file
17
packages/moria/build.sh
Normal file
@ -0,0 +1,17 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://umoria.org
|
||||
TERMUX_PKG_DESCRIPTION="Rogue-like game with an infinite dungeon"
|
||||
TERMUX_PKG_LICENSE="GPL-3.0-or-later"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=5.7.15
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/dungeons-of-moria/umoria/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=97f76a68b856dd5df37c20fc57c8a51017147f489e8ee8866e1764778b2e2d57
|
||||
TERMUX_PKG_DEPENDS="libc++, ncurses"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-Dbuild_dir=$TERMUX_PKG_BUILDDIR"
|
||||
|
||||
termux_step_create_debscripts() {
|
||||
# Create scores file in a debscript, so an update to the package wouldn't erease any scores
|
||||
echo "mkdir -p $TERMUX_PREFIX/lib/games/moria/" > postinst
|
||||
echo "touch $TERMUX_PREFIX/lib/games/moria/scores.dat" >> postinst
|
||||
chmod 0755 postinst
|
||||
}
|
33
packages/moria/config.cpp.patch
Normal file
33
packages/moria/config.cpp.patch
Normal file
@ -0,0 +1,33 @@
|
||||
--- ../config.cpp.orig 2020-06-06 14:29:46.809335434 +0200
|
||||
+++ ./src/config.cpp 2020-06-06 09:57:26.580039189 +0200
|
||||
@@ -13,18 +13,18 @@
|
||||
// Data files used by Umoria
|
||||
// NOTE: use relative paths to the executable binary.
|
||||
namespace files {
|
||||
- const std::string splash_screen = "data/splash.txt";
|
||||
- const std::string welcome_screen = "data/welcome.txt";
|
||||
- const std::string license = "LICENSE";
|
||||
- const std::string versions_history = "data/versions.txt";
|
||||
- const std::string help = "data/help.txt";
|
||||
- const std::string help_wizard = "data/help_wizard.txt";
|
||||
- const std::string help_roguelike = "data/rl_help.txt";
|
||||
- const std::string help_roguelike_wizard = "data/rl_help_wizard.txt";
|
||||
- const std::string death_tomb = "data/death_tomb.txt";
|
||||
- const std::string death_royal = "data/death_royal.txt";
|
||||
- const std::string scores = "scores.dat";
|
||||
- std::string save_game = "game.sav";
|
||||
+ const std::string splash_screen = "@TERMUX_PREFIX@/lib/games/moria/data/splash.txt";
|
||||
+ const std::string welcome_screen = "@TERMUX_PREFIX@/lib/games/moria/data/welcome.txt";
|
||||
+ const std::string license = "@TERMUX_PREFIX@/share/doc/moria/LICENSE";
|
||||
+ const std::string versions_history = "@TERMUX_PREFIX@/lib/games/moria/data/versions.txt";
|
||||
+ const std::string help = "@TERMUX_PREFIX@/lib/games/moria/data/help.txt";
|
||||
+ const std::string help_wizard = "@TERMUX_PREFIX@/lib/games/moria/data/help_wizard.txt";
|
||||
+ const std::string help_roguelike = "@TERMUX_PREFIX@/lib/games/moria/data/rl_help.txt";
|
||||
+ const std::string help_roguelike_wizard = "@TERMUX_PREFIX@/lib/games/moria/data/rl_help_wizard.txt";
|
||||
+ const std::string death_tomb = "@TERMUX_PREFIX@/lib/games/moria/data/death_tomb.txt";
|
||||
+ const std::string death_royal = "@TERMUX_PREFIX@/lib/games/moria/data/death_royal.txt";
|
||||
+ const std::string scores = "@TERMUX_PREFIX@/lib/games/moria/scores.dat";
|
||||
+ std::string save_game = "@TERMUX_PREFIX@/lib/games/moria/game.sav";
|
||||
} // namespace files
|
||||
|
||||
// Game options as set on startup and with `=` set options command -CJS-
|
40
packages/moria/struct.patch
Normal file
40
packages/moria/struct.patch
Normal file
@ -0,0 +1,40 @@
|
||||
--- ./src/player.h.orig 2021-10-23 14:44:11.656638085 +0200
|
||||
+++ ./src/player.h 2021-10-23 14:46:57.335574900 +0200
|
||||
@@ -45,7 +45,7 @@
|
||||
typedef const char *ClassRankTitle_t;
|
||||
|
||||
// Player_t contains everything to be known about our player character
|
||||
-typedef struct {
|
||||
+struct Player_t {
|
||||
struct {
|
||||
char name[PLAYER_NAME_SIZE]; // Name of character
|
||||
bool gender; // Gender of character (Female = 0, Male = 1)
|
||||
@@ -174,7 +174,7 @@
|
||||
int16_t equipment_count = 0; // Number of equipped items
|
||||
bool weapon_is_heavy = false; // Weapon is too heavy -CJS-
|
||||
bool carrying_light = false; // `true` when player is carrying light
|
||||
-} Player_t;
|
||||
+};
|
||||
|
||||
extern Player_t py;
|
||||
|
||||
--- ./src/game.h.orig 2021-10-23 14:45:38.026225236 +0200
|
||||
+++ ./src/game.h 2021-10-23 14:46:35.921517023 +0200
|
||||
@@ -32,7 +32,7 @@
|
||||
Wrong,
|
||||
};
|
||||
|
||||
-typedef struct {
|
||||
+struct Game_t {
|
||||
uint32_t magic_seed = 0; // Seed for initializing magic items (Potions, Wands, Staves, Scrolls, etc.)
|
||||
uint32_t town_seed = 0; // Seed for town generation
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
int wear_low_id = 0;
|
||||
int wear_high_id = 0;
|
||||
} screen;
|
||||
-} Game_t;
|
||||
+};
|
||||
|
||||
extern Game_t game;
|
||||
|
36
packages/moria/ui_io.cpp.patch
Normal file
36
packages/moria/ui_io.cpp.patch
Normal file
@ -0,0 +1,36 @@
|
||||
Fix error
|
||||
```
|
||||
/storage/termux-build/moria/src/src/ui_io.cpp:524:19: error: cast from 'int *' to 'fd_set *' increases required alignment from 4 to 8 [-Werror,-Wcast-align]
|
||||
if (select(1, (fd_set *) &smask, (fd_set *) nullptr, (fd_set *) nullptr, &tbuf) == 1) {
|
||||
^~~~~~~~~~~~~~~~~
|
||||
```
|
||||
--- ../ui_io.cpp.orig 2020-06-06 09:51:45.583712965 +0200
|
||||
+++ ./src/ui_io.cpp 2020-06-06 09:50:23.113801315 +0200
|
||||
@@ -514,14 +514,15 @@
|
||||
#else
|
||||
struct timeval tbuf {};
|
||||
int ch;
|
||||
- int smask;
|
||||
+ fd_set readfds;
|
||||
+
|
||||
+ FD_SET(1, &readfds);
|
||||
|
||||
// Return true if a read on descriptor 1 will not block.
|
||||
tbuf.tv_sec = 0;
|
||||
tbuf.tv_usec = microseconds;
|
||||
|
||||
- smask = 1; // i.e. (1 << 0)
|
||||
- if (select(1, (fd_set *) &smask, (fd_set *) nullptr, (fd_set *) nullptr, &tbuf) == 1) {
|
||||
+ if (select(1, &readfds, (fd_set *) nullptr, (fd_set *) nullptr, &tbuf) == 1) {
|
||||
ch = getch();
|
||||
// check for EOF errors here, select sometimes works even when EOF
|
||||
if (ch == -1) {
|
||||
@@ -636,7 +637,7 @@
|
||||
// Check user permissions on Unix based systems,
|
||||
// or if on Windows just return. -MRC-
|
||||
bool checkFilePermissions() {
|
||||
-#ifndef _WIN32
|
||||
+#if !defined(_WIN32) && !defined(__ANDROID__)
|
||||
if (0 != setuid(getuid())) {
|
||||
perror("Can't set permissions correctly! Setuid call failed.\n");
|
||||
return false;
|
96
packages/myman/Makefile.patch
Normal file
96
packages/myman/Makefile.patch
Normal file
@ -0,0 +1,96 @@
|
||||
--- ../Makefile.orig 2020-05-09 11:22:42.148997286 +0200
|
||||
+++ ./Makefile 2020-05-09 21:15:52.803520582 +0200
|
||||
@@ -1682,7 +1682,7 @@
|
||||
endif
|
||||
else
|
||||
ifeq ($(subst default,undefined,$(origin HOSTCC)),undefined)
|
||||
-HOSTCC = ${hostprefix}gcc
|
||||
+HOSTCC = ${hostprefix}clang
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -1748,11 +1748,11 @@
|
||||
ifneq (,$(findstring bcc32,${CC}))
|
||||
LINK = ${CC} ${CFLAGS} ${EXTRACFLAGS} -e$(call q,$@) $(call q,$<)
|
||||
else
|
||||
-LINK = ${CC} ${CFLAGS} ${EXTRACFLAGS} -o $(call q,$@) $(call q,$<)
|
||||
+LINK = ${CC} ${CFLAGS} $(LDFLAGS) ${EXTRACFLAGS} -o $(call q,$@) $(call q,$<)
|
||||
endif
|
||||
endif
|
||||
else
|
||||
-LINK = ${LD} ${LDFLAGS} ${EXTRALDFLAGS} -o $(call q,$@) $(call q,$<)
|
||||
+LINK = ${CC} ${LDFLAGS} $(LDFLAGS) ${EXTRALDFLAGS} -o $(call q,$@) $(call q,$<)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(subst default,undefined,$(origin HOSTLINK)),undefined)
|
||||
@@ -1763,11 +1763,11 @@
|
||||
ifneq (,$(findstring bcc32,${HOSTCC}))
|
||||
HOSTLINK = ${HOSTCC} ${HOSTCFLAGS} -e$(call q,$@) $(call q,$<)
|
||||
else
|
||||
-HOSTLINK = ${HOSTCC} ${HOSTCFLAGS} -o $(call q,$@) $(call q,$<)
|
||||
+HOSTLINK = ${HOSTCC} $(LDFLAGS) ${HOSTCFLAGS} -o $(call q,$@) $(call q,$<)
|
||||
endif
|
||||
endif
|
||||
else
|
||||
-HOSTLINK = ${HOSTLD} ${HOSTLDFLAGS} ${EXTRAHOSTLDFLAGS} -o $(call q,$@) $(call q,$<)
|
||||
+HOSTLINK = ${HOSTLD} $(LDFLAGS) ${HOSTLDFLAGS} ${EXTRAHOSTLDFLAGS} -o $(call q,$@) $(call q,$<)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -3127,7 +3127,7 @@
|
||||
|
||||
all install uninstall clean bindist:: gnumake.ok configure.ok
|
||||
|
||||
-all install:: $(call mw,${obj}compiler.ok)
|
||||
+all install::
|
||||
|
||||
all uninstall:: coreutils.ok sed.ok
|
||||
|
||||
@@ -3246,39 +3246,6 @@
|
||||
exit 1; \
|
||||
fi)
|
||||
|
||||
-# this rule is depended upon by the principal targets to perform a
|
||||
-# sanity check of the compiler and linker for the build machine
|
||||
-${obj}compiler.ok: $(call mw,${MAKEFILE})
|
||||
- @${MAKE} ${MAKELOOP} \
|
||||
- sanity_return=0 \
|
||||
- _sanity0$X
|
||||
- @ ./_sanity0
|
||||
- @${REMOVE} $(call q,${obj}_sanity0.c) _sanity0 $(call q,${obj}_sanity0$O)
|
||||
- @${MAKE} ${MAKELOOP} \
|
||||
- sanity_return=1 \
|
||||
- _sanity1$X
|
||||
- @( ./_sanity1 && exit 1 || : )
|
||||
- @${REMOVE} $(call q,${obj}_sanity1.c) _sanity1 $(call q,${obj}_sanity1$O)
|
||||
- @${ECHOLINEX} your compiler appears to work, so creating $(call q,$@)
|
||||
- @${ECHOLINEX} You may safely remove this file with \`$(call q,${REMOVE} $@)\'. > $(call q,$@)
|
||||
-
|
||||
-ifneq (,${sanity_return})
|
||||
-
|
||||
-${obj}_sanity${sanity_return}.c: $(call mw,${MAKEFILE})
|
||||
- @${MKPARENTDIR}
|
||||
- @(${ECHOLINEX} '/* '$(call q,$(call ccq,$@))': compiler sanity check */'; \
|
||||
- echo '/* you may safely delete this file */'; \
|
||||
- echo 'int main(int argc, char **argv) { return '$(call q,${sanity_return})'; }') > $(call q,$@)
|
||||
-
|
||||
-${obj}_sanity${sanity_return}$O: $(call mw,${obj}_sanity${sanity_return}.c)
|
||||
- @${MKPARENTDIR}
|
||||
- @${COMPILE}
|
||||
-
|
||||
-_sanity${sanity_return}$X: $(call mw,${obj}_sanity${sanity_return}$O)
|
||||
- @${LINK} ${LIBS}
|
||||
-
|
||||
-endif
|
||||
-
|
||||
.PHONY: all clean install uninstall
|
||||
.PHONY: installdirs uninstalldirs
|
||||
.PHONY: install-files uninstall-files
|
||||
@@ -3292,7 +3259,6 @@
|
||||
.PHONY: distclean mostlyclean maintainer-clean
|
||||
|
||||
distclean::
|
||||
- -${REMOVE} $(call q,${obj}compiler.ok)
|
||||
@${MAKE} ${MAKELOOP} \
|
||||
uninstall-optional-dir-xq-$(call qxq,${objdir})
|
||||
|
33
packages/myman/build.sh
Normal file
33
packages/myman/build.sh
Normal file
@ -0,0 +1,33 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://sourceforge.net/projects/myman/
|
||||
TERMUX_PKG_DESCRIPTION="Video game for color and monochrome text terminals in the genre of Namco's Pac-Man"
|
||||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_MAINTAINER="Henrik Grimler @Grimler91"
|
||||
TERMUX_PKG_VERSION=0.7.1
|
||||
TERMUX_PKG_REVISION=5
|
||||
TERMUX_PKG_SRCURL=https://sourceforge.net/projects/myman/files/myman-cvs/myman-cvs-2009-10-30/myman-cvs-2009-10-30.tar.gz
|
||||
TERMUX_PKG_SHA256=253e22f26dc95c63388bc4cb81075a05f77f7709d1d64ed9fde7aae38a7fc962
|
||||
TERMUX_PKG_DEPENDS="ncurses"
|
||||
TERMUX_PKG_HOSTBUILD=true
|
||||
# myman is installed twice for no reason
|
||||
TERMUX_PKG_RM_AFTER_INSTALL="bin/myman-$TERMUX_PKG_VERSION"
|
||||
|
||||
termux_step_get_source() {
|
||||
cd $TERMUX_PKG_CACHEDIR
|
||||
termux_download "${TERMUX_PKG_SRCURL}" "$(basename ${TERMUX_PKG_SRCURL})" "${TERMUX_PKG_SHA256}"
|
||||
tar -xf "$(basename ${TERMUX_PKG_SRCURL})"
|
||||
mkdir -p $TERMUX_PKG_SRCDIR
|
||||
cd $TERMUX_PKG_SRCDIR
|
||||
cvs -d$TERMUX_PKG_CACHEDIR/myman-cvs co -P myman
|
||||
mv myman/* .
|
||||
}
|
||||
|
||||
termux_step_host_build() {
|
||||
$TERMUX_PKG_SRCDIR/configure
|
||||
make obj/s1game
|
||||
}
|
||||
|
||||
termux_step_post_configure() {
|
||||
mkdir -p obj
|
||||
cp $TERMUX_PKG_HOSTBUILD_DIR/obj/s1game obj/
|
||||
touch -d "next hour" obj/s1game
|
||||
}
|
54
packages/nethack/build.sh
Normal file
54
packages/nethack/build.sh
Normal file
@ -0,0 +1,54 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://www.nethack.org/
|
||||
TERMUX_PKG_DESCRIPTION="Dungeon crawl game"
|
||||
TERMUX_PKG_LICENSE="Nethack"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
||||
TERMUX_PKG_VERSION=3.6.6
|
||||
TERMUX_PKG_REVISION=4
|
||||
TERMUX_PKG_SRCURL=http://www.nethack.org/download/${TERMUX_PKG_VERSION}/nethack-${TERMUX_PKG_VERSION//./}-src.tgz
|
||||
TERMUX_PKG_SHA256=cfde0c3ab6dd7c22ae82e1e5a59ab80152304eb23fb06e3129439271e5643ed2
|
||||
TERMUX_PKG_DEPENDS="gzip, ncurses"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_HOSTBUILD=true
|
||||
|
||||
termux_step_host_build() {
|
||||
cp -r $TERMUX_PKG_SRCDIR/* .
|
||||
pushd sys/unix
|
||||
sh setup.sh hints/linux
|
||||
popd && cd util
|
||||
if [ $TERMUX_ARCH_BITS = 32 ]; then
|
||||
HOST_CC="gcc -m32"
|
||||
else
|
||||
HOST_CC="gcc"
|
||||
fi
|
||||
CFLAGS="" CC="$HOST_CC" LD="ld" make makedefs
|
||||
CFLAGS="" CC="$HOST_CC" LD="ld" make lev_comp
|
||||
CFLAGS="" CC="$HOST_CC" LD="ld" make dgn_comp dlb recover
|
||||
}
|
||||
|
||||
termux_step_pre_configure() {
|
||||
WINTTYLIB="$LDFLAGS -lcurses"
|
||||
export LFLAGS="$LDFLAGS"
|
||||
export CFLAGS="$CPPFLAGS $CFLAGS"
|
||||
cd sys/unix
|
||||
sh setup.sh hints/linux
|
||||
}
|
||||
|
||||
termux_step_post_configure() {
|
||||
# cp hostbuilt tools from hostbuild dir
|
||||
cp $TERMUX_PKG_HOSTBUILD_DIR/util/{makedefs,lev_comp,dgn_comp,dlb} \
|
||||
util/
|
||||
touch -d "next hour" util/*
|
||||
}
|
||||
|
||||
termux_step_post_make_install() {
|
||||
cd doc
|
||||
mkdir -p $TERMUX_PREFIX/share/man/man6
|
||||
install -m600 nethack.6 $TERMUX_PREFIX/share/man/man6/
|
||||
ln -sf $TERMUX_PREFIX/games/nethack $TERMUX_PREFIX/bin/
|
||||
}
|
||||
|
||||
termux_step_create_debscripts() {
|
||||
echo "#!$TERMUX_PREFIX/bin/sh" > postinst
|
||||
echo "mkdir -p $TERMUX_PREFIX/games/nethackdir/save" >> postinst
|
||||
echo "exit 0" >> postinst
|
||||
}
|
22
packages/nethack/src-files.c.patch
Normal file
22
packages/nethack/src-files.c.patch
Normal file
@ -0,0 +1,22 @@
|
||||
--- ../NetHack-NetHack-3.6.6_Released/src/files.c 2020-03-08 18:29:31.000000000 +0100
|
||||
+++ ./src/files.c 2020-10-11 16:23:20.809498886 +0200
|
||||
@@ -86,7 +86,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(UNIX) || defined(__BEOS__)
|
||||
-#define SAVESIZE (PL_NSIZ + 13) /* save/99999player.e */
|
||||
+#define SAVESIZE 128
|
||||
#else
|
||||
#ifdef VMS
|
||||
#define SAVESIZE (PL_NSIZ + 22) /* [.save]<uid>player.e;1 */
|
||||
@@ -966,9 +966,7 @@
|
||||
Sprintf(SAVEF, "%s%s", encodedfnamebuf, SAVE_EXTENSION);
|
||||
}
|
||||
#else /* not VMS or MICRO or WIN32 */
|
||||
- Sprintf(SAVEF, "save/%d%s", (int) getuid(), plname);
|
||||
- if (regularize_it)
|
||||
- regularize(SAVEF + 5); /* avoid . or / in name */
|
||||
+ Sprintf(SAVEF, "@TERMUX_PREFIX@/games/nethackdir/save/termux_%s", plname);
|
||||
#endif /* WIN32 */
|
||||
#endif /* MICRO */
|
||||
#endif /* VMS */
|
14
packages/nethack/sys-unix-Makefile.src.patch
Normal file
14
packages/nethack/sys-unix-Makefile.src.patch
Normal file
@ -0,0 +1,14 @@
|
||||
--- ../unix-Makefile.src.orig 2021-11-27 11:02:18.000794086 +0000
|
||||
+++ ./sys/unix/Makefile.src 2021-11-27 11:03:29.084386408 +0000
|
||||
@@ -589,11 +589,9 @@
|
||||
# below in the 'make depend' output.
|
||||
monst.o:
|
||||
$(CC) $(CFLAGS) -c monst.c
|
||||
- @rm -f $(MAKEDEFS)
|
||||
|
||||
objects.o:
|
||||
$(CC) $(CFLAGS) -c objects.c
|
||||
- @rm -f $(MAKEDEFS)
|
||||
|
||||
# Qt 3 windowport meta-object-compiler output
|
||||
qt_kde0.moc: ../include/qt_kde0.h
|
18
packages/nethack/sys-unix-Makefile.utl.patch
Normal file
18
packages/nethack/sys-unix-Makefile.utl.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- ../Makefile.utl.orig 2020-10-11 10:23:01.057406272 +0200
|
||||
+++ ./sys/unix/Makefile.utl 2020-10-11 10:25:46.353406154 +0200
|
||||
@@ -111,11 +111,11 @@
|
||||
|
||||
# yacc/lex programs to use to generate *_comp.h, *_lex.c, and *_yacc.c.
|
||||
# if, instead of yacc/lex you have bison/flex, comment/uncomment the following.
|
||||
-YACC = yacc
|
||||
-LEX = lex
|
||||
-# YACC = bison -y
|
||||
+# YACC = yacc
|
||||
+# LEX = lex
|
||||
+YACC = bison -y
|
||||
# YACC = byacc
|
||||
-# LEX = flex
|
||||
+LEX = flex
|
||||
|
||||
# these are the names of the output files from YACC/LEX. Under MS-DOS
|
||||
# and similar systems, they may differ
|
39
packages/nethack/sys-unix-hints-linux.patch
Normal file
39
packages/nethack/sys-unix-hints-linux.patch
Normal file
@ -0,0 +1,39 @@
|
||||
--- ../NetHack-NetHack-3.6.6_Released/sys/unix/hints/linux 2020-03-08 18:29:31.000000000 +0100
|
||||
+++ ./sys/unix/hints/linux 2020-10-11 15:24:45.859200937 +0200
|
||||
@@ -9,20 +9,20 @@
|
||||
# for Ubuntu dapper.
|
||||
|
||||
|
||||
-#PREFIX=/usr
|
||||
-PREFIX=$(wildcard ~)/nh/install
|
||||
+GAME=nethack
|
||||
+PREFIX=@TERMUX_PREFIX@
|
||||
HACKDIR=$(PREFIX)/games/lib/$(GAME)dir
|
||||
-SHELLDIR = $(PREFIX)/games
|
||||
-INSTDIR=$(HACKDIR)
|
||||
-VARDIR = $(HACKDIR)
|
||||
+SHELLDIR = $(DESTDIR)$(PREFIX)/games
|
||||
+INSTDIR = $(DESTDIR)$(HACKDIR)
|
||||
+VARDIR = $(DESTDIR)$(HACKDIR)
|
||||
|
||||
|
||||
|
||||
POSTINSTALL=cp -n sys/unix/sysconf $(INSTDIR)/sysconf; $(CHOWN) $(GAMEUID) $(INSTDIR)/sysconf; $(CHGRP) $(GAMEGRP) $(INSTDIR)/sysconf; chmod $(VARFILEPERM) $(INSTDIR)/sysconf;
|
||||
|
||||
-CFLAGS=-g -O -I../include -DNOTPARMDECL
|
||||
+CFLAGS+= -I../include -DNOTPARMDECL
|
||||
CFLAGS+=-DDLB
|
||||
-CFLAGS+=-DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\"
|
||||
+CFLAGS+=-DCOMPRESS=\"@TERMUX_PREFIX@/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\"
|
||||
CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE
|
||||
CFLAGS+=-DTIMED_DELAY
|
||||
CFLAGS+=-DHACKDIR=\"$(HACKDIR)\"
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
LINK=$(CC)
|
||||
# Only needed for GLIBC stack trace:
|
||||
-LFLAGS=-rdynamic
|
||||
+LFLAGS+=-rdynamic
|
||||
|
||||
WINSRC = $(WINTTYSRC) $(WINCURSESSRC)
|
||||
WINOBJ = $(WINTTYOBJ) $(WINCURSESOBJ)
|
21
packages/nethack/util-recover.c.patch
Normal file
21
packages/nethack/util-recover.c.patch
Normal file
@ -0,0 +1,21 @@
|
||||
--- ../NetHack-NetHack-3.6.6_Released/util/recover.c 2020-03-08 18:29:31.000000000 +0100
|
||||
+++ ./util/recover.c 2020-10-11 16:08:08.285499539 +0200
|
||||
@@ -13,7 +13,8 @@
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
-#if !defined(O_WRONLY) && !defined(LSC) && !defined(AZTEC_C)
|
||||
+#if (!defined(O_WRONLY) && !defined(LSC) && !defined(AZTEC_C)) \
|
||||
+ || defined(USE_FCNTL)
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
@@ -38,7 +39,7 @@
|
||||
#define Close (void) close
|
||||
|
||||
#ifdef UNIX
|
||||
-#define SAVESIZE (PL_NSIZ + 13) /* save/99999player.e */
|
||||
+#define SAVESIZE 128
|
||||
#else
|
||||
#ifdef VMS
|
||||
#define SAVESIZE (PL_NSIZ + 22) /* [.save]<uid>player.e;1 */
|
9
packages/ninvaders/build.sh
Normal file
9
packages/ninvaders/build.sh
Normal file
@ -0,0 +1,9 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://ninvaders.sourceforge.net
|
||||
TERMUX_PKG_DESCRIPTION="Space Invaders clone based on ncurses for ASCII output"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=0.1.2
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/sf-refugees/ninvaders/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=80fbdfd396efc3674c0a697e0d7c219647518cefd22e948d504bb3a677e58df3
|
||||
TERMUX_PKG_DEPENDS="ncurses"
|
22
packages/npush/build.sh
Normal file
22
packages/npush/build.sh
Normal file
@ -0,0 +1,22 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://npush.sourceforge.net/
|
||||
TERMUX_PKG_DESCRIPTION="Curses-based logic game similar to Sokoban and Boulder Dash"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="Dmitry Marakasov <amdmi3@amdmi3.ru>"
|
||||
TERMUX_PKG_VERSION=0.7
|
||||
TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/project/npush/npush/${TERMUX_PKG_VERSION}/npush-${TERMUX_PKG_VERSION}.tgz
|
||||
TERMUX_PKG_SHA256=f216d2b3279e8737784f77d4843c9e6f223fa131ce1ebddaf00ad802aba2bcd9
|
||||
TERMUX_PKG_DEPENDS="ncurses"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
termux_step_post_get_source() {
|
||||
sed -i -e "s|\"levels|\"${TERMUX_PREFIX}/share/npush/levels|" npush.cpp
|
||||
}
|
||||
|
||||
termux_step_make() {
|
||||
$CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -lncurses -o npush npush.cpp
|
||||
}
|
||||
|
||||
termux_step_make_install() {
|
||||
install -Dm755 -t $TERMUX_PREFIX/bin/ npush
|
||||
install -Dm644 -t $TERMUX_PREFIX/share/npush/levels levels/*
|
||||
}
|
33
packages/nsnake/Makefile.patch
Normal file
33
packages/nsnake/Makefile.patch
Normal file
@ -0,0 +1,33 @@
|
||||
--- ../cache/nSnake-3.0.1/Makefile 2014-07-31 05:02:32.000000000 +0000
|
||||
+++ ./Makefile 2017-05-27 10:13:56.771649741 +0000
|
||||
@@ -42,7 +42,7 @@
|
||||
DATE = $(shell date "+%b%Y")
|
||||
|
||||
# Install dirs
|
||||
-PREFIX = /usr
|
||||
+PREFIX ?= /usr
|
||||
EXEC_PREFIX = $(PREFIX)
|
||||
DATAROOTDIR = $(PREFIX)/share
|
||||
BINDIR = $(EXEC_PREFIX)/bin
|
||||
@@ -63,9 +63,9 @@
|
||||
# Build info
|
||||
EXE = $(PACKAGE)
|
||||
CDEBUG = -O2
|
||||
-CXXFLAGS = $(CDEBUG) -Wall -Wextra $(CFLAGS_PLATFORM)
|
||||
-LDFLAGS = -lncurses $(LDFLAGS_PLATFORM)
|
||||
-INCLUDESDIR = -I"src/" -I"deps/"
|
||||
+CXXFLAGS ?= $(CDEBUG) -Wall -Wextra $(CFLAGS_PLATFORM)
|
||||
+LDFLAGS ?= -lncurses $(LDFLAGS_PLATFORM)
|
||||
+INCLUDESDIR = -I"src/" -I"deps/" $(CPPFLAGS)
|
||||
LIBSDIR =
|
||||
|
||||
# All source files
|
||||
@@ -147,7 +147,7 @@
|
||||
|
||||
$(EXE): $(OBJECTS) $(COMMANDER_OBJS)
|
||||
# Linking...
|
||||
- $(MUTE)$(CXX) $(OBJECTS) $(COMMANDER_OBJS) -o bin/$(EXE) $(LIBSDIR) $(LDFLAGS)
|
||||
+ $(MUTE)$(CXX) $(OBJECTS) $(COMMANDER_OBJS) -o bin/$(EXE) $(LIBSDIR) $(LDFLAGS) -lncurses
|
||||
|
||||
src/%.o: src/%.cpp
|
||||
# Compiling $<...
|
10
packages/nsnake/build.sh
Normal file
10
packages/nsnake/build.sh
Normal file
@ -0,0 +1,10 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://github.com/alexdantas/nSnake
|
||||
TERMUX_PKG_DESCRIPTION="The classic snake game with textual interface"
|
||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=3.0.1
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SRCURL=https://github.com/alexdantas/nSnake/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=7240dafe35e17b01134591d7ae8f09f5a375cded8b01e43ba97ca3610a09ea61
|
||||
TERMUX_PKG_DEPENDS="libc++, ncurses"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
14
packages/nudoku/build.sh
Normal file
14
packages/nudoku/build.sh
Normal file
@ -0,0 +1,14 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://jubalh.github.io/nudoku/
|
||||
TERMUX_PKG_DESCRIPTION="ncurses based sudoku game"
|
||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=2.0.0
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/jubalh/nudoku/archive/$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=44d3ec1ff34a010910ac7a92f6d84e8a7a4678a966999b7be27d224609ae54e1
|
||||
TERMUX_PKG_DEPENDS="ncurses"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
termux_step_pre_configure() {
|
||||
autoreconf -i
|
||||
}
|
13
packages/open-adventure/build.sh
Normal file
13
packages/open-adventure/build.sh
Normal file
@ -0,0 +1,13 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://www.catb.org/~esr/open-adventure/
|
||||
TERMUX_PKG_DESCRIPTION="Forward-port of the original Colossal Cave Adventure from 1976-77"
|
||||
TERMUX_PKG_LICENSE="BSD 3-Clause"
|
||||
TERMUX_PKG_MAINTAINER="Henrik Grimler @Grimler91"
|
||||
TERMUX_PKG_VERSION=1.9
|
||||
TERMUX_PKG_SHA256=13a8bf9556014021b0e1f144f23e00afc05e92e4952b2ee7ad1dab0c079a6694
|
||||
TERMUX_PKG_SRCURL=https://gitlab.com/esr/open-adventure/-/archive/${TERMUX_PKG_VERSION}/open-adventure-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_DEPENDS="libedit"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
termux_step_make_install () {
|
||||
install -m 0755 advent $TERMUX_PREFIX/bin
|
||||
}
|
30
packages/pacman4console/1-pacman.c.patch
Normal file
30
packages/pacman4console/1-pacman.c.patch
Normal file
@ -0,0 +1,30 @@
|
||||
--- ../pacman.c.orig 2019-08-11 11:04:35.143786214 +0200
|
||||
+++ ./pacman.c 2019-08-11 11:10:17.706727190 +0200
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
-#include <sys/timeb.h>
|
||||
+#include <sys/time.h>
|
||||
#include "pacman.h"
|
||||
|
||||
#define EXIT_MSG "Good bye!"
|
||||
@@ -231,14 +231,14 @@
|
||||
void Delay() {
|
||||
|
||||
//Needed to get time
|
||||
- struct timeb t_start, t_current;
|
||||
- ftime(&t_start);
|
||||
+ struct timeval t_start, t_current;
|
||||
+ gettimeofday(&t_start, NULL);
|
||||
|
||||
//Slow down the game a little bit
|
||||
do {
|
||||
GetInput(); //Still get the input from keyboard
|
||||
- ftime(&t_current); //Update time and check if enough time has overlapped
|
||||
- } while (abs(t_start.millitm - t_current.millitm) < SpeedOfGame);
|
||||
+ gettimeofday(&t_current, NULL); //Update time and check if enough time has overlapped
|
||||
+ } while (labs(t_start.tv_usec - t_current.tv_usec)/1000 < SpeedOfGame);
|
||||
}
|
||||
|
||||
/****************************************************************
|
260
packages/pacman4console/2-pacman.c.patch
Normal file
260
packages/pacman4console/2-pacman.c.patch
Normal file
@ -0,0 +1,260 @@
|
||||
Subject: Fix some problems and add features.
|
||||
|
||||
- Problems fixed:
|
||||
* Changed screen/window resolution error message.
|
||||
* Bugfix for possible buffer overflow when choosing a
|
||||
level. (Closes #641652)
|
||||
* Bugfix for possible index out of bound when going through
|
||||
a border while playing. (Closes #641657)
|
||||
- Feature to allow create a menu icon for X (Closes: #737997):
|
||||
* Game Over screen which allows to exit or to restart.
|
||||
- Another features:
|
||||
* Added a help option (documents before undocumented level
|
||||
choosing option).
|
||||
* Changed option syntax for level choosing.
|
||||
|
||||
Author: Yannic Scheper <ys42@cd42.de>
|
||||
Author: Alexandre Dantas <eu@alexdantas.net>
|
||||
Last-Update: 2014-08-13
|
||||
--- pacman4console.orig/pacman.c
|
||||
+++ pacman4console/pacman.c
|
||||
@@ -31,7 +31,7 @@
|
||||
* PROTOTYPES *
|
||||
*************/
|
||||
void IntroScreen(); //Show introduction screen and menu
|
||||
-void CheckCollision(); //See if Pacman and Ghosts collided
|
||||
+int CheckCollision(); //See if Pacman and Ghosts collided
|
||||
void CheckScreenSize(); //Make sure resolution is at least 32x29
|
||||
void CreateWindows(int y, int x, int y0, int x0); //Make ncurses windows
|
||||
void Delay(); //Slow down game for better control
|
||||
@@ -40,11 +40,11 @@ void ExitProgram(const char *message);
|
||||
void GetInput(); //Get user input
|
||||
void InitCurses(); //Start up ncurses
|
||||
void LoadLevel(char *levelfile); //Load level into memory
|
||||
-void MainLoop(); //Main program function
|
||||
+int MainLoop(); //Main program function
|
||||
void MoveGhosts(); //Update Ghosts' location
|
||||
void MovePacman(); //Update Pacman's location
|
||||
void PauseGame(); //Pause
|
||||
-
|
||||
+void PrintHelp(char* name); //Print help and exit
|
||||
|
||||
/*******************
|
||||
* GLOBAL VARIABLES *
|
||||
@@ -76,41 +76,71 @@ int tleft = 0;
|
||||
****************************************************************/
|
||||
int main(int argc, char *argv[100]) {
|
||||
|
||||
- int j = 0;
|
||||
+ int loop = 1; //loop program? 0 = no, 1 = yes
|
||||
+ char* level = NULL; //level to load
|
||||
+ int j = 1;
|
||||
+ int i;
|
||||
+ for(i = 1; i < argc; ++i) {
|
||||
+ if(strcmp(argv[i], "--help") == 0 || strcmp(argv[i], "-h") == 0) {
|
||||
+ PrintHelp(argv[0]);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ else if(strncmp(argv[i], "--level=", 8) == 0) {
|
||||
+ level = argv[i];
|
||||
+ level += 8;
|
||||
+ int len = strlen(level);
|
||||
+ if(len == 0) {
|
||||
+ level = NULL;
|
||||
+ }
|
||||
+ else if(len == 1) {
|
||||
+ for(LevelNumber = '1'; LevelNumber <= '9'; LevelNumber++) {
|
||||
+ if(LevelNumber == level[0]) {
|
||||
+ j = LevelNumber - '0';
|
||||
+ level = NULL;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ else {
|
||||
+ PrintHelp(argv[0]);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
srand( (unsigned)time( NULL ) );
|
||||
|
||||
InitCurses(); //Must be called to start ncurses
|
||||
CheckScreenSize(); //Make sure screen is big enough
|
||||
CreateWindows(29, 28, 1, 1); //Create the main and status windows
|
||||
|
||||
- //If they specified a level to load
|
||||
- if((argc > 1) && (strlen(argv[1]) > 1)) {
|
||||
- argv[1][99] = '\0';
|
||||
- LoadLevel(argv[1]); //Load it and...
|
||||
- MainLoop(); //Start the game
|
||||
- }
|
||||
-
|
||||
- //If they did not enter a level, display intro screen then use default levels
|
||||
- else {
|
||||
- IntroScreen(); //Show intro "movie"
|
||||
- j = 1; //Set initial level to 1
|
||||
-
|
||||
- if(argc > 1) j = argv[1][0] - '0'; //They specified a level on which to start (1-9)
|
||||
-
|
||||
- //Load 9 levels, 1 by 1, if you can beat all 9 levels in a row, you're awesome
|
||||
- for(LevelNumber = j; LevelNumber < 10; LevelNumber++) {
|
||||
-
|
||||
- //Replace level string underscore with the actual level number (see pacman.h)
|
||||
- LevelFile[strlen(LevelFile) - 6] = '0';
|
||||
- LevelFile[strlen(LevelFile) - 5] = LevelNumber + '0';
|
||||
-
|
||||
- LoadLevel(LevelFile); //Load level into memory
|
||||
- Invincible = 0; //Reset invincibility with each new level
|
||||
- MainLoop(); //Start the level
|
||||
+ IntroScreen(); //Show intro "movie"
|
||||
|
||||
+ int start_lives = Lives;
|
||||
+ int start_points = Points;
|
||||
+ do {
|
||||
+ Lives = start_lives;
|
||||
+ Points = start_points;
|
||||
+ if(level == NULL) {
|
||||
+ //j = 1;
|
||||
+ //Load levels, 1 by 1, if you can beat all 9 levels in a row, you're awesome
|
||||
+ for(LevelNumber = j; LevelNumber < 10; LevelNumber++) {
|
||||
+ LevelFile[strlen(LevelFile) - 6] = '0';
|
||||
+ LevelFile[strlen(LevelFile) - 5] = LevelNumber + '0';
|
||||
+ LoadLevel(LevelFile);
|
||||
+ Invincible = 0; //Reset invincibility
|
||||
+ if(MainLoop() == 1) break;
|
||||
+ }
|
||||
}
|
||||
+ else {
|
||||
+ //Load special non-standard level
|
||||
+ LoadLevel(level);
|
||||
+ Invincible = 0; //Reset invincibility
|
||||
+ MainLoop();
|
||||
+ }
|
||||
|
||||
- }
|
||||
+ if(GameOverScreen() == 1) loop = 0;
|
||||
+ } while(loop == 1);
|
||||
|
||||
//Game has ended, deactivate and end program
|
||||
ExitProgram(EXIT_MSG);
|
||||
@@ -125,7 +155,7 @@ int main(int argc, char *argv[100]) {
|
||||
* Returns: none *
|
||||
* Description: Check and handle if Pacman collided with a ghost *
|
||||
****************************************************************/
|
||||
-void CheckCollision() {
|
||||
+int CheckCollision() {
|
||||
|
||||
//Temporary variable
|
||||
int a = 0;
|
||||
@@ -165,7 +195,7 @@ void CheckCollision() {
|
||||
usleep(1000000);
|
||||
|
||||
//If no more lives, game over
|
||||
- if(Lives == -1) ExitProgram(END_MSG);
|
||||
+ if(Lives == -1) return 1;
|
||||
|
||||
//If NOT game over...
|
||||
|
||||
@@ -187,6 +217,7 @@ void CheckCollision() {
|
||||
}
|
||||
}
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
@@ -203,13 +234,41 @@ void CheckScreenSize() {
|
||||
if((h < 32) || (w < 29)) {
|
||||
endwin();
|
||||
fprintf(stderr, "\nSorry.\n");
|
||||
- fprintf(stderr, "To play Pacman for Console, your console window must be at least 32x29\n");
|
||||
+ fprintf(stderr, "To play Pacman for Console, your console window must be at least 29x32\n");
|
||||
fprintf(stderr, "Please resize your window/resolution and re-run the game.\n\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+int GameOverScreen() {
|
||||
+ char chr = ' ';
|
||||
+ int a, b;
|
||||
+ for(a = 0; a < 29; a++) for(b = 0; b < 28; b++) {
|
||||
+ mvwaddch(win, a, b, chr);
|
||||
+ }
|
||||
+
|
||||
+ wattron(win, COLOR_PAIR(Pacman));
|
||||
+ mvwprintw(win, 8, 11, "Game Over");
|
||||
+
|
||||
+ wattron(win, COLOR_PAIR(Normal));
|
||||
+ mvwprintw(win, 14, 2, "Press q to quit ...");
|
||||
+ mvwprintw(win, 16, 2, "... or any other key");
|
||||
+ mvwprintw(win, 17, 6, "to play again");
|
||||
+
|
||||
+ wrefresh(win);
|
||||
+
|
||||
+ //And wait
|
||||
+ int chtmp;
|
||||
+ do {
|
||||
+ chtmp = getch();
|
||||
+ } while (chtmp == ERR);
|
||||
+
|
||||
+ if(chtmp == 'q' || chtmp == 'Q')
|
||||
+ return 1;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
/****************************************************************
|
||||
* Function: CreateWindows() *
|
||||
* Parameters: y, x, y0, x0 (coords and size of window) *
|
||||
@@ -494,7 +553,7 @@ void IntroScreen() {
|
||||
* Returns: none *
|
||||
* Description: Open level file and load it into memory *
|
||||
****************************************************************/
|
||||
-void LoadLevel(char levelfile[100]) {
|
||||
+void LoadLevel(char* levelfile) {
|
||||
|
||||
int a = 0; int b = 0;
|
||||
size_t l;
|
||||
@@ -555,7 +614,7 @@ void LoadLevel(char levelfile[100]) {
|
||||
* Returns: none *
|
||||
* Description: Control the main execution of the game *
|
||||
****************************************************************/
|
||||
-void MainLoop() {
|
||||
+int MainLoop() {
|
||||
|
||||
DrawWindow(); //Draw the screen
|
||||
wrefresh(win); wrefresh(status); //Refresh it just to make sure
|
||||
@@ -564,15 +623,15 @@ void MainLoop() {
|
||||
/* Move Pacman. Move ghosts. Check for extra life awarded
|
||||
from points. Pause for a brief moment. Repeat until all pellets are eaten */
|
||||
do {
|
||||
- MovePacman(); DrawWindow(); CheckCollision();
|
||||
- MoveGhosts(); DrawWindow(); CheckCollision();
|
||||
+ MovePacman(); DrawWindow(); if (CheckCollision() == 1) return 1;
|
||||
+ MoveGhosts(); DrawWindow(); if (CheckCollision() == 1) return 1;
|
||||
if(Points > FreeLife) { Lives++; FreeLife *= 2;}
|
||||
Delay();
|
||||
} while (Food > 0);
|
||||
|
||||
DrawWindow(); //Redraw window and...
|
||||
usleep(1000000); //Pause, level complete
|
||||
-
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
@@ -748,3 +807,12 @@ void PauseGame() {
|
||||
} while (chtmp == ERR);
|
||||
|
||||
}
|
||||
+
|
||||
+void PrintHelp(char* name) {
|
||||
+ printf("Usage: %s [OPTION]\n\n", name);
|
||||
+ printf("Options:\n");
|
||||
+ printf(" -h, --help print help\n");
|
||||
+ printf(" --level=[1..9] start at specified standard level\n");
|
||||
+ printf(" --level=LEVEL play specified non-standard LEVEL\n");
|
||||
+}
|
||||
+
|
10
packages/pacman4console/3-pacman.c.patch
Normal file
10
packages/pacman4console/3-pacman.c.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- ./pacman.c~ 2019-08-11 11:40:25.424773750 +0200
|
||||
+++ ./pacman.c 2019-08-11 11:46:32.051044212 +0200
|
||||
@@ -33,6 +33,7 @@
|
||||
void IntroScreen(); //Show introduction screen and menu
|
||||
int CheckCollision(); //See if Pacman and Ghosts collided
|
||||
void CheckScreenSize(); //Make sure resolution is at least 32x29
|
||||
+int GameOverScreen();
|
||||
void CreateWindows(int y, int x, int y0, int x0); //Make ncurses windows
|
||||
void Delay(); //Slow down game for better control
|
||||
void DrawWindow(); //Refresh display
|
31
packages/pacman4console/Makefile.patch
Normal file
31
packages/pacman4console/Makefile.patch
Normal file
@ -0,0 +1,31 @@
|
||||
--- ../Makefile.orig 2019-08-11 10:45:43.818342372 +0200
|
||||
+++ ./Makefile 2019-08-11 11:22:54.202576206 +0200
|
||||
@@ -1,20 +1,18 @@
|
||||
-prefix=/usr/local
|
||||
-bindir=$(prefix)/bin
|
||||
-datarootdir=$(prefix)/share
|
||||
+CC?=gcc
|
||||
+prefix?=/usr/local
|
||||
+bindir?=$(prefix)/bin
|
||||
+datarootdir?=$(prefix)/share
|
||||
|
||||
all:
|
||||
- gcc pacman.c -o pacman -DDATAROOTDIR=\"$(datarootdir)\" $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -lncurses
|
||||
- gcc pacmanedit.c -o pacmanedit -DDATAROOTDIR=\"$(datarootdir)\" $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -lncurses
|
||||
+ $(CC) pacman.c -o pacmanplay -DDATAROOTDIR=\"$(datarootdir)\" $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -lncurses
|
||||
+ $(CC) pacmanedit.c -o pacmanedit -DDATAROOTDIR=\"$(datarootdir)\" $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -lncurses
|
||||
|
||||
install: all
|
||||
mkdir -p $(DESTDIR)$(bindir)
|
||||
mkdir -p $(DESTDIR)$(datarootdir)/pacman
|
||||
cp -fR Levels/ $(DESTDIR)$(datarootdir)/pacman/
|
||||
- -chown root:games $(DESTDIR)$(bindir)/pacman
|
||||
- -chown root:games $(DESTDIR)$(datarootdir)/pacman -R
|
||||
- chmod 750 $(DESTDIR)$(bindir)/pacman
|
||||
- chmod 750 $(DESTDIR)$(bindir)/pacmanedit
|
||||
- chmod 750 $(DESTDIR)$(datarootdir)/pacman/ -R
|
||||
+ install -Dm755 pacmanplay pacmanedit $(DESTDIR)$(bindir)/
|
||||
+ chmod 755 $(DESTDIR)$(datarootdir)/pacman/ -R
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(bindir)/pacman
|
16
packages/pacman4console/build.sh
Normal file
16
packages/pacman4console/build.sh
Normal file
@ -0,0 +1,16 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://sites.google.com/site/doctormike/pacman.html
|
||||
TERMUX_PKG_DESCRIPTION="A 9 level ncurses pacman game with editor"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=1.3
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=https://sites.google.com/site/doctormike/pacman-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=9a5c4a96395ce4a3b26a9896343a2cdf488182da1b96374a13bf5d811679eb90
|
||||
TERMUX_PKG_DEPENDS="ncurses"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
termux_step_post_make_install() {
|
||||
mkdir -p "$TERMUX_PREFIX"/share/man/man1 "$TERMUX_PREFIX"/share/man/man6
|
||||
install -Dm600 $TERMUX_PKG_BUILDER_DIR/pacmanedit.1 "$TERMUX_PREFIX"/share/man/man1/
|
||||
install -Dm600 $TERMUX_PKG_BUILDER_DIR/pacman.6 "$TERMUX_PREFIX"/share/man/man6/
|
||||
}
|
24
packages/pacman4console/pacman.6
Normal file
24
packages/pacman4console/pacman.6
Normal file
@ -0,0 +1,24 @@
|
||||
.TH PACMAN 6 "december 8, 2006"
|
||||
.SH NAME
|
||||
pacman \- a console based pacman game
|
||||
.SH SYNOPSIS
|
||||
.B pacman
|
||||
.RB [
|
||||
.I OPTION
|
||||
.RB ]
|
||||
.SH DESCRIPTION
|
||||
This manual page documents briefly the
|
||||
.B pacman.
|
||||
.PP
|
||||
\fBpacman\fP is an ASCII character based game. This game haves nine levels.
|
||||
.SH OPTION
|
||||
.B n
|
||||
- Start level n
|
||||
.SH SEE ALSO
|
||||
pacmanedit(1)
|
||||
.SH AUTHOR
|
||||
pacman was written by Michael Billars (aka Dr. Mike) and is available at http://doctormike.googlepages.com/pacman.html.
|
||||
.PP
|
||||
.nh
|
||||
.ad l
|
||||
This manual page was written by Joao Eriberto Mota Filho <eriberto@eriberto.pro.br>, for the Debian project (but may be used by others).
|
47
packages/pacman4console/pacmanedit.1
Normal file
47
packages/pacman4console/pacmanedit.1
Normal file
@ -0,0 +1,47 @@
|
||||
.TH PACMANEDIT 1 "january 4, 2007"
|
||||
.SH NAME
|
||||
pacmanedit \- an editor to make pacman mazes
|
||||
.SH SYNOPSIS
|
||||
.B pacmanedit
|
||||
file
|
||||
.SH DESCRIPTION
|
||||
This manual page documents briefly the
|
||||
.B pacmanedit.
|
||||
.PP
|
||||
\fBpacmanedit\fP is an editor used to make new pacman mazes.
|
||||
.SH KEYS
|
||||
0 Insert space (way)
|
||||
.br
|
||||
1 Insert wall
|
||||
.br
|
||||
2 Insert pill
|
||||
.br
|
||||
3 Insert vitamin
|
||||
.br
|
||||
4 Insert an exit for fantasms
|
||||
.br
|
||||
5 Change position of the red fantasm
|
||||
.br
|
||||
6 Change position of the cyan fantasm
|
||||
.br
|
||||
7 Change position of the magenta fantasm
|
||||
.br
|
||||
8 Change position of the orange fantasm
|
||||
.br
|
||||
9 Change position of the Pacman
|
||||
.br
|
||||
f Change all spaces to pills
|
||||
.br
|
||||
c Change all pills to spaces
|
||||
.br
|
||||
q Save and exit
|
||||
.SH MAZE FILE LOCATION
|
||||
The maze files are localized at /usr/share/pacman/Levels.
|
||||
.SH SEE ALSO
|
||||
pacman(6)
|
||||
.SH AUTHOR
|
||||
pacman was written by Michael Billars (aka Dr. Mike) and is available at http://doctormike.googlepages.com/pacman.html.
|
||||
.PP
|
||||
.nh
|
||||
.ad l
|
||||
This manual page was written by Joao Eriberto Mota Filho <eriberto@eriberto.pro.br>, for the Debian project (but may be used by others).
|
19
packages/snake/LICENSE
Normal file
19
packages/snake/LICENSE
Normal file
@ -0,0 +1,19 @@
|
||||
(c) Copyright 2017 @gogakoreli (https://github.com/gogakoreli)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
18
packages/snake/build.sh
Normal file
18
packages/snake/build.sh
Normal file
@ -0,0 +1,18 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://github.com/gogakoreli/snake
|
||||
TERMUX_PKG_DESCRIPTION="Eat as much as you want while avoiding walls."
|
||||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_MAINTAINER="Tipz Team @TipzTeam"
|
||||
TERMUX_PKG_VERSION=2017.06.09
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/gogakoreli/snake/archive/4ccdf33feaa0a24578f3ddcf8137e52c93444f15.tar.gz
|
||||
TERMUX_PKG_SHA256=f99212d620ac593272a0489a7d83b44f92a39bcd11c299c728ea08f1eee656a6
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
termux_step_make_install() {
|
||||
install -Dm755 -t $TERMUX_PREFIX/bin/ snake
|
||||
}
|
||||
|
||||
termux_step_install_license() {
|
||||
install -Dm644 -t $TERMUX_PREFIX/share/doc/snake/ \
|
||||
$TERMUX_PKG_BUILDER_DIR/LICENSE
|
||||
}
|
35
packages/snake/iostream.patch
Normal file
35
packages/snake/iostream.patch
Normal file
@ -0,0 +1,35 @@
|
||||
--- ./main.cpp~ 2017-06-09 13:15:17.000000000 +0200
|
||||
+++ ./main.cpp 2020-09-08 13:59:59.758203243 +0200
|
||||
@@ -4,7 +4,6 @@
|
||||
#include <cstdio>
|
||||
#include <algorithm>
|
||||
#include <unistd.h>
|
||||
-#include <bits/stdc++.h>
|
||||
#include "input.h"
|
||||
#include "snake.h"
|
||||
#include "snake_map.h"
|
||||
@@ -65,4 +65,4 @@
|
||||
initialize();
|
||||
start_game();
|
||||
return 0;
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
--- ./input.cpp~ 2017-06-09 13:15:17.000000000 +0200
|
||||
+++ ./input.cpp 2020-09-08 14:00:10.035093940 +0200
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "input.h"
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
-#include <bits/stdc++.h>
|
||||
+#include <iostream>
|
||||
#include <string>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -52,4 +51,4 @@
|
||||
void input_init()
|
||||
{
|
||||
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
7
packages/snake/makefile.patch
Normal file
7
packages/snake/makefile.patch
Normal file
@ -0,0 +1,7 @@
|
||||
--- ./makefile~ 2017-06-09 13:15:17.000000000 +0200
|
||||
+++ ./makefile 2020-09-08 13:59:03.970320442 +0200
|
||||
@@ -1,2 +1,2 @@
|
||||
all:
|
||||
- g++ -std=c++11 main.cpp snake.cpp input.cpp snake_map.cpp -o snake -lpthread
|
||||
\ No newline at end of file
|
||||
+ $(CXX) $(CFLAGS) $(CXXFLAGS) $(LDFLAGS) -std=c++11 main.cpp snake.cpp input.cpp snake_map.cpp -o snake
|
12
packages/tty-solitaire/Makefile.patch
Normal file
12
packages/tty-solitaire/Makefile.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -u -r ../tty-solitaire-1.1.0/Makefile ./Makefile
|
||||
--- ../tty-solitaire-1.1.0/Makefile 2018-08-12 22:05:12.000000000 +0000
|
||||
+++ ./Makefile 2018-08-13 20:22:37.063193979 +0000
|
||||
@@ -45,7 +45,7 @@
|
||||
all: ${EXECUTABLE}
|
||||
|
||||
ttysolitaire: $(SRC_OBJECTS)
|
||||
- $(CC) $(CFLAGS) $(SRC) -o $(EXECUTABLE) $(SRC_OBJECTS) $(LDFLAGS)
|
||||
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(SRC) -o $(EXECUTABLE) $(SRC_OBJECTS) $(LDFLAGS)
|
||||
|
||||
test: $(SRC_OBJECTS) $(TESTS_OBJECTS)
|
||||
@$(CC) $(CFLAGS) $(TESTS_SRC) -o $(TESTS_EXECUTABLE) $(TESTS_OBJECTS) $(SRC_OBJECTS) $(LDFLAGS)
|
10
packages/tty-solitaire/build.sh
Normal file
10
packages/tty-solitaire/build.sh
Normal file
@ -0,0 +1,10 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://github.com/mpereira/tty-solitaire
|
||||
TERMUX_PKG_DESCRIPTION="Klondike solitaire game"
|
||||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=1.3.0
|
||||
TERMUX_PKG_REVISION=4
|
||||
TERMUX_PKG_SHA256=a270ee639e911a89add6a3c765b0548c9d762e0388c323807708d2509cfa64a0
|
||||
TERMUX_PKG_SRCURL=https://github.com/mpereira/tty-solitaire/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_DEPENDS="ncurses"
|
90
packages/tty-solitaire/tty-solitaire.patch
Normal file
90
packages/tty-solitaire/tty-solitaire.patch
Normal file
@ -0,0 +1,90 @@
|
||||
diff -ruN soli-const/src/gui.c soli-custom/src/gui.c
|
||||
--- soli-const/src/gui.c 2020-06-01 17:03:35.000000000 +0200
|
||||
+++ soli-custom/src/gui.c 2020-07-02 14:03:00.720000434 +0200
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "game.h"
|
||||
#include "gui.h"
|
||||
|
||||
-static const char *card_suits[4] = {"\u2666", "\u2660", "\u2665", "\u2663"};
|
||||
+static const char *card_suits[4] = {"D", "S", "H", "C"};
|
||||
static const char *card_values[13] = {"A", "2", "3", "4", "5", "6", "7",
|
||||
"8", "9", "10", "J", "Q", "K"};
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
static void draw_suit(struct card *card) {
|
||||
if (game.four_color_deck == 0) {
|
||||
if (card->suit % 2 == 0) {
|
||||
- wattron(card->frame->window, COLOR_PAIR(RED_ON_WHITE));
|
||||
+ wattron(card->frame->window, COLOR_PAIR(WHITE_ON_RED));
|
||||
} else {
|
||||
- wattron(card->frame->window, COLOR_PAIR(BLACK_ON_WHITE));
|
||||
+ wattron(card->frame->window, COLOR_PAIR(WHITE_ON_BLACK));
|
||||
}
|
||||
} else {
|
||||
switch (card->suit) {
|
||||
@@ -47,14 +47,18 @@
|
||||
mvwprintw(card->frame->window, 4, 6 - strlen(card_values[card->value]),
|
||||
card_suits[card->suit]);
|
||||
if (card->suit % 2 == 0) {
|
||||
- wattroff(card->frame->window, COLOR_PAIR(RED_ON_WHITE));
|
||||
+ wattroff(card->frame->window, COLOR_PAIR(WHITE_ON_RED));
|
||||
} else {
|
||||
- wattroff(card->frame->window, COLOR_PAIR(BLACK_ON_WHITE));
|
||||
+ wattroff(card->frame->window, COLOR_PAIR(WHITE_ON_BLACK));
|
||||
}
|
||||
}
|
||||
|
||||
static void draw_front(struct card *card) {
|
||||
- wbkgd(card->frame->window, COLOR_PAIR(BLACK_ON_WHITE));
|
||||
+ if (card->suit % 2 == 0) {
|
||||
+ wbkgd(card->frame->window, COLOR_PAIR(WHITE_ON_RED));
|
||||
+ } else {
|
||||
+ wbkgd(card->frame->window, COLOR_PAIR(WHITE_ON_BLACK));
|
||||
+ }
|
||||
wborder(card->frame->window, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ');
|
||||
draw_value(card);
|
||||
draw_suit(card);
|
||||
diff -ruN soli-const/src/gui.h soli-custom/src/gui.h
|
||||
--- soli-const/src/gui.h 2020-06-01 17:03:35.000000000 +0200
|
||||
+++ soli-custom/src/gui.h 2020-07-02 13:55:46.310000408 +0200
|
||||
@@ -12,6 +12,8 @@
|
||||
#define YELLOW_ON_WHITE 4
|
||||
#define WHITE_ON_BLUE 5
|
||||
#define WHITE_ON_GREEN 6
|
||||
+#define WHITE_ON_RED 7
|
||||
+#define WHITE_ON_BLACK 8
|
||||
|
||||
extern struct game game;
|
||||
|
||||
diff -ruN soli-const/src/keyboard.c soli-custom/src/keyboard.c
|
||||
--- soli-const/src/keyboard.c 2020-06-01 17:03:35.000000000 +0200
|
||||
+++ soli-custom/src/keyboard.c 2020-07-02 12:12:58.900000040 +0200
|
||||
@@ -257,6 +257,7 @@
|
||||
handle_card_movement(cursor);
|
||||
}
|
||||
}
|
||||
+ handle_term_resize();
|
||||
break;
|
||||
case KEY_RESIZE:
|
||||
handle_term_resize();
|
||||
diff -ruN soli-const/src/ttysolitaire.c soli-custom/src/ttysolitaire.c
|
||||
--- soli-const/src/ttysolitaire.c 2020-06-01 17:03:35.000000000 +0200
|
||||
+++ soli-custom/src/ttysolitaire.c 2020-07-02 14:13:34.435000004 +0200
|
||||
@@ -68,7 +68,7 @@
|
||||
curs_set(FALSE);
|
||||
set_escdelay(0);
|
||||
if (no_background_color) {
|
||||
- use_default_colors();
|
||||
+ assume_default_colors(COLOR_BLACK, COLOR_WHITE);
|
||||
} else {
|
||||
assume_default_colors(COLOR_WHITE, COLOR_GREEN);
|
||||
}
|
||||
@@ -78,6 +78,8 @@
|
||||
init_pair(4, COLOR_YELLOW, COLOR_WHITE);
|
||||
init_pair(5, COLOR_WHITE, COLOR_BLUE);
|
||||
init_pair(6, COLOR_WHITE, COLOR_GREEN);
|
||||
+ init_pair(7, COLOR_WHITE, COLOR_RED);
|
||||
+ init_pair(8, COLOR_WHITE, COLOR_BLACK);
|
||||
|
||||
int key;
|
||||
|
18
packages/vitetris/build.sh
Normal file
18
packages/vitetris/build.sh
Normal file
@ -0,0 +1,18 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://victornils.net/tetris/
|
||||
TERMUX_PKG_DESCRIPTION="Virtual terminal *tris clone"
|
||||
TERMUX_PKG_LICENSE="BSD 2-Clause"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_LICENSE_FILE="licence.txt"
|
||||
TERMUX_PKG_VERSION=0.59.1
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/vicgeralds/vitetris/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=699443df03c8d4bf2051838c1015da72039bbbdd0ab0eede891c59c840bdf58d
|
||||
TERMUX_PKG_DEPENDS="ncurses"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_REMOVE_AFTER_INSTALL="share/applications/vitetris.desktop"
|
||||
|
||||
termux_step_configure() {
|
||||
"$TERMUX_PKG_SRCDIR/configure" \
|
||||
--prefix=$TERMUX_PREFIX \
|
||||
$TERMUX_PKG_EXTRA_CONFIGURE_ARGS
|
||||
}
|
92
packages/vitetris/configure.patch
Normal file
92
packages/vitetris/configure.patch
Normal file
@ -0,0 +1,92 @@
|
||||
--- ../configure.orig 2019-10-03 20:46:03.724288763 +0200
|
||||
+++ ./configure 2019-10-03 20:45:33.167665636 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
#
|
||||
|
||||
# You may comment out/uncomment any of these lines to change defaults.
|
||||
-PREFIX=/usr/local
|
||||
+PREFIX=@TERMUX_PREFIX@/local
|
||||
ENABLE_2P=y # 2-player
|
||||
ENABLE_JS=y # joystick
|
||||
ENABLE_NETWORK=y
|
||||
@@ -209,7 +209,7 @@
|
||||
fi
|
||||
|
||||
|
||||
-DPREFIX=/usr
|
||||
+DPREFIX=@TERMUX_PREFIX@
|
||||
if [ -n "$DJDIR" ]; then
|
||||
echo "DJDIR is set to $DJDIR"
|
||||
DPREFIX=$DJDIR
|
||||
@@ -305,7 +305,7 @@
|
||||
done
|
||||
|
||||
in_inc_search() {
|
||||
- if [ $DPREFIX = /usr ] && [ $path = /usr/include ]; then
|
||||
+ if [ $DPREFIX = @TERMUX_PREFIX@ ] && [ $path = @TERMUX_PREFIX@/include ]; then
|
||||
return 0
|
||||
fi
|
||||
for path in $INC_SEARCH 1; do
|
||||
@@ -315,7 +315,7 @@
|
||||
}
|
||||
|
||||
add_path_ldflags() {
|
||||
- if [ $DPREFIX = /usr ] && [ ${1#/usr} = /lib ]; then
|
||||
+ if [ $DPREFIX = @TERMUX_PREFIX@ ] && [ ${1#@TERMUX_PREFIX@} = /lib ]; then
|
||||
return 1
|
||||
fi
|
||||
libpath=-L$1
|
||||
@@ -337,7 +337,7 @@
|
||||
else
|
||||
echo $n "checking for linux/joystick.h... $c"
|
||||
linux_inc=
|
||||
- for path in $INC_SEARCH /usr/include; do
|
||||
+ for path in $INC_SEARCH @TERMUX_PREFIX@/include; do
|
||||
if [ -d $path/linux ]; then
|
||||
linux_inc=$path/linux
|
||||
break
|
||||
@@ -382,7 +382,7 @@
|
||||
echo $n "checking for curses... $c"
|
||||
WITH_CURSES=
|
||||
if [ $OS = unix ]; then
|
||||
- search="/lib /usr/lib /usr/local/lib"
|
||||
+ search="/lib @TERMUX_PREFIX@/lib @TERMUX_PREFIX@/local/lib"
|
||||
else
|
||||
search=$DPREFIX/lib
|
||||
fi
|
||||
@@ -406,7 +406,7 @@
|
||||
if [ -n "$WITH_CURSES" ]; then
|
||||
echo $n "checking for curses.h... $c"
|
||||
CURSES_INC=
|
||||
- for path in $INC_SEARCH $DPREFIX/include /usr/local/include; do
|
||||
+ for path in $INC_SEARCH $DPREFIX/include @TERMUX_PREFIX@/local/include; do
|
||||
if [ -f $path/ncurses/curses.h ]; then
|
||||
path=$path/ncurses
|
||||
fi
|
||||
@@ -432,7 +432,7 @@
|
||||
if [ -n "$WITH_X" ]; then
|
||||
echo $n "checking for Xlib... $c"
|
||||
WITH_X=
|
||||
- xpath='/usr /usr/X11R6 /usr/X11 /usr/local /usr/X11R7'
|
||||
+ xpath='@TERMUX_PREFIX@ @TERMUX_PREFIX@/X11R6 @TERMUX_PREFIX@/X11 @TERMUX_PREFIX@/local @TERMUX_PREFIX@/X11R7'
|
||||
search=$LIB_SEARCH
|
||||
for path in $xpath; do
|
||||
search="$search $path/lib"
|
||||
@@ -442,7 +442,7 @@
|
||||
if check_dynlib $path X11; then
|
||||
echo found in $path
|
||||
WITH_X=-lX11
|
||||
- if [ $path != /usr ]; then
|
||||
+ if [ $path != @TERMUX_PREFIX@ ]; then
|
||||
libpath=$path
|
||||
fi
|
||||
break
|
||||
@@ -570,7 +570,7 @@
|
||||
TTY_SOCKET=
|
||||
if [ $OS = unix ] && [ -n "$ENABLE_NETWORK" ]; then
|
||||
echo $n "checking for sys/un.h... $c"
|
||||
- if [ -f /usr/include/sys/un.h ]
|
||||
+ if [ -f @TERMUX_PREFIX@/include/sys/un.h ]
|
||||
then echo yes ; TTY_SOCKET=y
|
||||
else echo no
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user