From 0b4c45d133db2cb05738de8d7a7a141ec5e7c7d1 Mon Sep 17 00:00:00 2001 From: Robert Kirkman Date: Thu, 24 Oct 2024 15:13:33 -0500 Subject: [PATCH] TEST COMMIT do not merge related to #21966 validation that gnushogi upstream master branch fixes errors. I understand that termux-packages does not accept packages of unreleased versions, so waiting for ydirson to officially release an update to gnushogi will be required. --- packages/gnushogi/build.sh | 28 +++++++++++++------- packages/gnushogi/gnushogi-makefile-in.patch | 21 --------------- packages/gnushogi/use_libncurses.patch | 12 --------- 3 files changed, 18 insertions(+), 43 deletions(-) delete mode 100644 packages/gnushogi/gnushogi-makefile-in.patch delete mode 100644 packages/gnushogi/use_libncurses.patch diff --git a/packages/gnushogi/build.sh b/packages/gnushogi/build.sh index 1ffc287604b7aea..0009401016a68e5 100644 --- a/packages/gnushogi/build.sh +++ b/packages/gnushogi/build.sh @@ -2,22 +2,30 @@ 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=4 -TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/gnushogi/gnushogi-${TERMUX_PKG_VERSION}.tar.gz -TERMUX_PKG_SHA256=1ecc48a866303c63652552b325d685e7ef5e9893244080291a61d96505d52b29 +TERMUX_PKG_VERSION=1.5pre +TERMUX_PKG_SRCURL=https://git.savannah.gnu.org/cgit/gnushogi.git/snapshot/gnushogi-5bb0b5b2f6953b3250e965c7ecaf108215751a74.tar.gz +TERMUX_PKG_SHA256=3d3e4c0d7ce29cd0c18bcd2020a7330dd7d4b15b18b08ec493fffa13cc92a5f9 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_PKG_GROUPS="games" -termux_step_pre_configure() { - CFLAGS+=" $CPPFLAGS -fcommon" +termux_step_host_build() { + # "don't build pat2inc when cross-compiling, we don't need it" (sic) + # according to the comment found in the configure.ac file in the + # unreleased master branch dating to circa late 2014 + # of the upstream gnushogi source code (found and installed from + # something never-released that might have once gone by the name + # "gnushogi 1.5pre") + # http://git.savannah.gnu.org/cgit/gnushogi.git/commit/configure.ac?id=189697ca6f9cbe3e2e3c0800c37ea13a0aa181c8 + # https://git.savannah.gnu.org/cgit/gnushogi.git/commit?id=586cbf3d7b87b8bae3154695cc1f6dda396cca7e + # https://git.savannah.gnu.org/cgit/gnushogi.git/log/ + # apply cross_compiling logic found within the upstream source code: + cd "$TERMUX_PKG_SRCDIR" + cross_compiling=yes ./autogen.sh } -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 +termux_step_pre_configure() { + CFLAGS+=" $CPPFLAGS -fcommon" } diff --git a/packages/gnushogi/gnushogi-makefile-in.patch b/packages/gnushogi/gnushogi-makefile-in.patch deleted file mode 100644 index f8ffe1eea5cb171..000000000000000 --- a/packages/gnushogi/gnushogi-makefile-in.patch +++ /dev/null @@ -1,21 +0,0 @@ -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) diff --git a/packages/gnushogi/use_libncurses.patch b/packages/gnushogi/use_libncurses.patch deleted file mode 100644 index baecc6121fdecf8..000000000000000 --- a/packages/gnushogi/use_libncurses.patch +++ /dev/null @@ -1,12 +0,0 @@ -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 -