commit:     54e123ebc9020f0ae7c93dd972ad970049ad38c7
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 26 22:07:19 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Wed Aug 26 22:07:19 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54e123eb

games-board/xgammon: Fix building against glibc 2.32

Closes: https://bugs.gentoo.org/715452
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../xgammon/files/xgammon-0.98-glibc-2.32.patch    | 19 +++++++++++++++
 games-board/xgammon/xgammon-0.98-r1.ebuild         | 27 +++++++++++++---------
 2 files changed, 35 insertions(+), 11 deletions(-)

diff --git a/games-board/xgammon/files/xgammon-0.98-glibc-2.32.patch 
b/games-board/xgammon/files/xgammon-0.98-glibc-2.32.patch
new file mode 100644
index 00000000000..538f873b413
--- /dev/null
+++ b/games-board/xgammon/files/xgammon-0.98-glibc-2.32.patch
@@ -0,0 +1,19 @@
+--- a/save.c
++++ b/save.c
+@@ -20,6 +20,7 @@
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <signal.h>
+ #include <X11/Intrinsic.h>
+ 
+@@ -142,7 +143,7 @@
+       fclose(save_file);
+ 
+ #ifndef AIX
+-      fprintf (stderr, "xgammon: %s.  Sorry and bye!\n", sys_siglist[n]);
++      fprintf (stderr, "xgammon: %s.  Sorry and bye!\n", strsignal(n));
+ #else
+       fprintf (stderr, "xgammon: Caught signal %d.   Sorry and bye!\n", n);
+ #endif

diff --git a/games-board/xgammon/xgammon-0.98-r1.ebuild 
b/games-board/xgammon/xgammon-0.98-r1.ebuild
index d00b4f94fe5..cdbeed6484b 100644
--- a/games-board/xgammon/xgammon-0.98-r1.ebuild
+++ b/games-board/xgammon/xgammon-0.98-r1.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
-inherit toolchain-funcs eutils
+EAPI=7
+
+inherit toolchain-funcs
 
 DESCRIPTION="very nice backgammon game for X"
 HOMEPAGE="http://fawn.unibw-hamburg.de/steuer/xgammon/xgammon.html";
@@ -11,19 +12,23 @@ 
SRC_URI="http://fawn.unibw-hamburg.de/steuer/xgammon/Downloads/${P}a.tar.gz";
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE=""
 
-RDEPEND="x11-libs/libXaw"
-DEPEND="${RDEPEND}
+RDEPEND="
+       x11-libs/libX11
+       x11-libs/libXaw
+       x11-libs/libXt"
+DEPEND="${RDEPEND}"
+BDEPEND="
        app-text/rman
        x11-misc/imake"
 
-S=${WORKDIR}/${P}a
+S="${WORKDIR}/${P}a"
 
 PATCHES=(
-       "${FILESDIR}/${P}-broken.patch"
-       "${FILESDIR}/${P}-config.patch"
-       "${FILESDIR}/gcc33.patch"
+       "${FILESDIR}"/${P}-broken.patch
+       "${FILESDIR}"/${P}-config.patch
+       "${FILESDIR}"/gcc33.patch
+       "${FILESDIR}"/${P}-glibc-2.32.patch
 )
 
 src_configure() {
@@ -34,7 +39,7 @@ src_compile() {
        env PATH=".:${PATH}" emake \
                EXTRA_LDOPTIONS="${LDFLAGS}" \
                CDEBUGFLAGS="${CFLAGS}" \
-               CC=$(tc-getCC)
+               CC="$(tc-getCC)"
 }
 
 pkg_postinst() {

Reply via email to