diff --git a/packages/frogcomposband/LICENSE b/packages/frogcomposband/LICENSE new file mode 100644 index 000000000..b3c7b225f --- /dev/null +++ b/packages/frogcomposband/LICENSE @@ -0,0 +1,3 @@ +Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke + +This software may be copied and distributed for educational, research, and not for profit purposes provided that this copyright and statement are included in all such copies. Other copyrights may also apply. diff --git a/packages/frogcomposband/autoconf.h.in.patch b/packages/frogcomposband/autoconf.h.in.patch new file mode 100644 index 000000000..277694ef6 --- /dev/null +++ b/packages/frogcomposband/autoconf.h.in.patch @@ -0,0 +1,12 @@ +diff --git a/src/autoconf.h.in b/src/autoconf.h.in +index 3ea96d74..069e6452 100644 +--- a/src/autoconf.h.in ++++ b/src/autoconf.h.in +@@ -20,7 +20,6 @@ + #undef HAVE_FCNTL_H + + /* Define to 1 if you have the `fdopen' function. */ +-#undef HAVE_FDOPEN + + /* Define to 1 if you have the header file. */ + #undef HAVE_INTTYPES_H diff --git a/packages/frogcomposband/build.sh b/packages/frogcomposband/build.sh new file mode 100644 index 000000000..ba4ea0563 --- /dev/null +++ b/packages/frogcomposband/build.sh @@ -0,0 +1,23 @@ +TERMUX_PKG_HOMEPAGE=https://github.com/sulkasormi/frogcomposband/ +TERMUX_PKG_DESCRIPTION="Open world Angband variant with many additions" +TERMUX_PKG_LICENSE="custom" +TERMUX_PKG_SRCURL=https://github.com/sulkasormi/frogcomposband.git +TERMUX_PKG_VERSION=7.1.salmiak +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/frogcomposband" +TERMUX_PKG_RM_AFTER_INSTALL="share/angband/xtra share/angband/icons" + +termux_step_pre_configure () { + ./autogen.sh + perl -p -i -e 's|ncursesw5-config|ncursesw6-config|g' configure +} + +termux_step_post_make_install () { + rm -Rf $TERMUX_PREFIX/share/frogcomposband/fonts +} + +termux_step_install_license() { + install -Dm600 $TERMUX_PKG_BUILDER_DIR/LICENSE \ + $TERMUX_PREFIX/share/doc/frogcomposband/LICENSE +} diff --git a/packages/frogcomposband/h-config.h.patch b/packages/frogcomposband/h-config.h.patch new file mode 100644 index 000000000..ce750dacb --- /dev/null +++ b/packages/frogcomposband/h-config.h.patch @@ -0,0 +1,14 @@ +diff --git a/src/h-config.h b/src/h-config.h +index b6cf6081..44b8f240 100644 +--- a/src/h-config.h ++++ b/src/h-config.h +@@ -207,7 +207,8 @@ + */ + #if !defined(MACINTOSH) && !defined(WINDOWS) && \ + !defined(MSDOS) && !defined(USE_EMX) && !defined(MACH_O_CARBON) && \ +- !defined(AMIGA) && !defined(ACORN) && !defined(VM) ++ !defined(AMIGA) && !defined(ACORN) && !defined(VM) && \ ++ !defined(__ANDROID__) + # define SET_UID + #endif + diff --git a/packages/frogcomposband/util.c.patch b/packages/frogcomposband/util.c.patch new file mode 100644 index 000000000..131aa1feb --- /dev/null +++ b/packages/frogcomposband/util.c.patch @@ -0,0 +1,22 @@ +diff --git a/src/util.c b/src/util.c +index dcfebf9c..977611c6 100644 +--- a/src/util.c ++++ b/src/util.c +@@ -977,7 +977,7 @@ errr fd_read(int fd, char *buf, huge n) + while (n >= 16384) + { + /* Read a piece */ +- if (_read(fd, buf, 16384) != 16384) return (1); ++ if (read(fd, buf, 16384) != 16384) return (1); + + /* Shorten the task */ + buf += 16384; +@@ -1010,7 +1010,7 @@ errr fd_write(int fd, cptr buf, huge n) + while (n >= 16384) + { + /* Write a piece */ +- if (_write(fd, buf, 16384) != 16384) return (1); ++ if (write(fd, buf, 16384) != 16384) return (1); + + /* Shorten the task */ + buf += 16384;