Skip to content

Commit

Permalink
bump(main/gnushogi): update to commit 5bb0b5b from Nov 2014
Browse files Browse the repository at this point in the history
Fixes #21966 by adding improved support for cross-compiling, preventing
errors from happening during the hostbuild step.
Inspired by the version of gnushogi packaged by Fedora: https://src.fedoraproject.org/rpms/gnushogi/blob/rawhide/f/gnushogi.spec
  • Loading branch information
robertkirkman committed Oct 27, 2024
1 parent b8746d4 commit de31300
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 43 deletions.
30 changes: 20 additions & 10 deletions packages/gnushogi/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,32 @@ 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
_COMMIT=5bb0b5b2f6953b3250e965c7ecaf108215751a74
TERMUX_PKG_VERSION=1.4.2-p20141119
TERMUX_PKG_SRCURL=git+https://git.savannah.gnu.org/git/gnushogi.git
TERMUX_PKG_GIT_BRANCH=master
TERMUX_PKG_SHA256=7743bef7ca9d412e2e2d2c111c24ff23c934b53134a3eb7f477c05139dba9299
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_post_get_source() {
git fetch --unshallow
git checkout $_COMMIT

local s=$(find . -type f ! -path '*/.git/*' -print0 | xargs -0 sha256sum | LC_ALL=C sort | sha256sum)
if [[ "${s}" != "${TERMUX_PKG_SHA256} "* ]]; then
termux_error_exit "Checksum mismatch for source files."
fi
}

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_host_build() {
cd "$TERMUX_PKG_SRCDIR"
./autogen.sh
}

termux_step_pre_configure() {
CFLAGS+=" $CPPFLAGS -fcommon"
}
21 changes: 0 additions & 21 deletions packages/gnushogi/gnushogi-makefile-in.patch

This file was deleted.

12 changes: 0 additions & 12 deletions packages/gnushogi/use_libncurses.patch

This file was deleted.

0 comments on commit de31300

Please sign in to comment.