new package: xboard

This commit is contained in:
Tee KOBAYASHI 2022-04-29 06:39:38 +09:00 committed by xtkoba
parent e91d0897e9
commit d618ff0012
3 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,15 @@
TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/xboard/
TERMUX_PKG_DESCRIPTION="A graphical chessboard for the X Window System"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=4.9.1
TERMUX_PKG_SRCURL=https://ftp.gnu.org/gnu/xboard/xboard-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=2b2e53e8428ad9b6e8dc8a55b3a5183381911a4dae2c0072fa96296bbb1970d6
TERMUX_PKG_DEPENDS="glib, libcairo, librsvg, libx11, libxaw, libxmu, libxt, pango"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--without-gtk
"
termux_step_pre_configure() {
CFLAGS+=" -fcommon"
}

View File

@ -0,0 +1,13 @@
--- a/menus.c
+++ b/menus.c
@@ -1252,8 +1252,8 @@
static void
AutoInstallProtocol (char *settingsFile, char *protocol)
{ // install new engines for given protocol (both from package and source)
- InstallFromDir("/usr/local/share/games/plugins", protocol, settingsFile);
- InstallFromDir("/usr/share/games/plugins", protocol, settingsFile);
+ InstallFromDir("@TERMUX_PREFIX@/local/share/games/plugins", protocol, settingsFile);
+ InstallFromDir("@TERMUX_PREFIX@/share/games/plugins", protocol, settingsFile);
}
void

View File

@ -0,0 +1,31 @@
--- a/xaw/xboard.c
+++ b/xaw/xboard.c
@@ -1048,7 +1048,7 @@
appData.boardSize = "";
InitAppData(ConvertToLine(argc, argv));
p = getenv("HOME");
- if (p == NULL) p = "/tmp";
+ if (p == NULL) p = "@TERMUX_PREFIX@/tmp";
i = strlen(p) + strlen("/.xboardXXXXXx.pgn") + 1;
gameCopyFilename = (char*) malloc(i);
gamePasteFilename = (char*) malloc(i);
@@ -1296,7 +1296,7 @@
if(appData.logoSize)
{ // locate and read user logo
char buf[MSG_SIZ], name[MSG_SIZ];
- snprintf(name, MSG_SIZ, "/home/%s", UserName());
+ snprintf(name, MSG_SIZ, "@TERMUX_HOME@");
if(!FindLogo(name, ".logo", buf))
FindLogo(appData.logoDir, name + 6, buf);
ASSIGN(userLogo, buf);
@@ -2535,8 +2535,8 @@
} else { // engine; cascade
if(!FindLogo(appData.logoDir, cps->tidy, buf) && // first try user log folder
!FindLogo(appData.directory[n], "logo", buf) && // then engine directory
- !FindLogo("/usr/local/share/games/plugins/logos", cps->tidy, buf) ) // then system folders
- FindLogo("/usr/share/games/plugins/logos", cps->tidy, buf);
+ !FindLogo("@TERMUX_PREFIX@/local/share/games/plugins/logos", cps->tidy, buf) ) // then system folders
+ FindLogo("@TERMUX_PREFIX@/share/games/plugins/logos", cps->tidy, buf);
}
}
if(logoName[0])