summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2020-07-05 22:05:47 +0200
committerDavid Seifert <soap@gentoo.org>2020-07-05 22:05:47 +0200
commit47f2ac9b3c23d50db4bda479d3bf47d8077ce545 (patch)
tree817e25bf0649dbc4323d96fc8aa135f2ffdc3791 /games-arcade
parentgames-board/xmahjongg: Call AM_PROG_AR (diff)
downloadgentoo-47f2ac9b3c23d50db4bda479d3bf47d8077ce545.tar.gz
gentoo-47f2ac9b3c23d50db4bda479d3bf47d8077ce545.tar.bz2
gentoo-47f2ac9b3c23d50db4bda479d3bf47d8077ce545.zip
games-arcade/xtux: Fix build system
Closes: https://bugs.gentoo.org/710722 Closes: https://bugs.gentoo.org/716872 Closes: https://bugs.gentoo.org/730812 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'games-arcade')
-rw-r--r--games-arcade/xtux/files/xtux-20030306-Makefile.patch190
-rw-r--r--games-arcade/xtux/files/xtux-20030306-ldflags.patch22
-rw-r--r--games-arcade/xtux/files/xtux-20030306-missing-include.patch29
-rw-r--r--games-arcade/xtux/files/xtux-20030306-tux_serv-path.patch13
-rw-r--r--games-arcade/xtux/xtux-20030306-r1.ebuild42
5 files changed, 254 insertions, 42 deletions
diff --git a/games-arcade/xtux/files/xtux-20030306-Makefile.patch b/games-arcade/xtux/files/xtux-20030306-Makefile.patch
new file mode 100644
index 000000000000..7340dbfd187a
--- /dev/null
+++ b/games-arcade/xtux/files/xtux-20030306-Makefile.patch
@@ -0,0 +1,190 @@
+--- a/src/client/Makefile
++++ b/src/client/Makefile
+@@ -16,13 +16,12 @@
+
+ # Programs used in building process
+ MAKE = make
+-CC = gcc
+
+ # Where to put the XTux client binary.
+ BINARY = $(TOPLEVEL_PATH)/xtux
+
+ # Flags used when compiling
+-CFLAGS = -g -Wall -O2 -DDATADIR=\"$(DATADIR)\"
++CPPFLAGS += -DDATADIR=\"$(DATADIR)\"
+
+ # Paths to header files
+ X11_INC = -I$(X11_PATH)/include
+@@ -48,8 +47,8 @@
+
+ #Apps
+ client: $(OBJECTS)
+- $(CC) -o $(BINARY) $(CFLAGS) $(OBJECTS) $(XTUXLIB) $(MATHLIB) $(X11LIB) $(XPMLIB) $(SOCKLIB) $(GGZLIB)
++ $(CC) $(LDFLAGS) -o $(BINARY) $(CFLAGS) $(OBJECTS) $(XTUXLIB) $(MATHLIB) $(X11LIB) $(XPMLIB) $(SOCKLIB) $(GGZLIB)
+
+ # OBJECTS
+ .c.o: client.h $*.c
+- $(CC) $(CFLAGS) -c $*.c $(COMMON_INC) $(X11_INC) $(GGZ_INC)
++ $(CC) $(CFLAGS) $(CPPFLAGS) -c $*.c $(COMMON_INC) $(X11_INC) $(GGZ_INC)
+--- a/src/common/Makefile
++++ b/src/common/Makefile
+@@ -1,9 +1,6 @@
+ # Makefile for stuff that's common between server & client.
+
+-CC = gcc
+-CFLAGS = -g -Wall -O2 -DDATADIR=\"$(DATADIR)\"
+-AR = ar
+-RANLIB = ranlib
++CPPFLAGS += -DDATADIR=\"$(DATADIR)\"
+
+ OBJECTS = common.o timing.o net.o entity_type.o weapon_type.o map.o maths.o datafile.o
+ XTUXLIB = xtuxlib.a
+@@ -18,4 +15,4 @@
+ ${RANLIB} $@
+
+ .c.o: xtux.h $*.c $*.h
+- $(CC) $(CFLAGS) -c $*.c $(COMMON_INC)
++ $(CC) $(CFLAGS) $(CPPFLAGS) -c $*.c $(COMMON_INC)
+--- a/src/ggz/client/Makefile
++++ b/src/ggz/client/Makefile
+@@ -61,7 +61,6 @@
+ host_alias = i586-pc-linux-gnu
+ host_triplet = i586-pc-linux-gnu
+ AS = @AS@
+-CC = gcc
+ CPP = gcc -E
+ DLLTOOL = @DLLTOOL@
+ EASYSOCK_MAJOR_VERSION = 0
+@@ -79,7 +78,6 @@
+ NM = /usr/bin/nm -B
+ OBJDUMP = @OBJDUMP@
+ PACKAGE = easysock
+-RANLIB = ranlib
+ VERSION = 0.2.0
+
+ noinst_LIBRARIES = libggz.a
+@@ -92,13 +90,9 @@
+
+
+ DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I..
+-CPPFLAGS =
+-LDFLAGS =
+ LIBS =
+ libggz_a_LIBADD =
+ libggz_a_OBJECTS = ggz.o
+-AR = ar
+-CFLAGS = -g -O2
+ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+ LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+ CCLD = $(CC)
+--- a/src/ggz/easysock/Makefile
++++ b/src/ggz/easysock/Makefile
+@@ -61,7 +61,6 @@
+ host_alias = i586-pc-linux-gnu
+ host_triplet = i586-pc-linux-gnu
+ AS = @AS@
+-CC = gcc
+ CPP = gcc -E
+ DLLTOOL = @DLLTOOL@
+ EASYSOCK_MAJOR_VERSION = 0
+@@ -79,7 +78,6 @@
+ NM = /usr/bin/nm -B
+ OBJDUMP = @OBJDUMP@
+ PACKAGE = easysock
+-RANLIB = ranlib
+ VERSION = 0.2.0
+
+ noinst_LIBRARIES = libeasysock.a
+@@ -92,13 +90,9 @@
+
+
+ DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I..
+-CPPFLAGS =
+-LDFLAGS =
+ LIBS =
+ libeasysock_a_LIBADD =
+ libeasysock_a_OBJECTS = easysock.o
+-AR = ar
+-CFLAGS = -g -O2
+ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+ LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+ CCLD = $(CC)
+--- a/src/ggz/Makefile
++++ b/src/ggz/Makefile
+@@ -61,7 +61,6 @@
+ host_alias = i586-pc-linux-gnu
+ host_triplet = i586-pc-linux-gnu
+ AS = @AS@
+-CC = gcc
+ CPP = gcc -E
+ DLLTOOL = @DLLTOOL@
+ EASYSOCK_MAJOR_VERSION = 0
+@@ -79,7 +78,6 @@
+ NM = /usr/bin/nm -B
+ OBJDUMP = @OBJDUMP@
+ PACKAGE = easysock
+-RANLIB = ranlib
+ VERSION = 0.2.0
+
+ SUBDIRS = easysock server client
+--- a/src/ggz/server/Makefile
++++ b/src/ggz/server/Makefile
+@@ -61,7 +61,6 @@
+ host_alias = i586-pc-linux-gnu
+ host_triplet = i586-pc-linux-gnu
+ AS = @AS@
+-CC = gcc
+ CPP = gcc -E
+ DLLTOOL = @DLLTOOL@
+ EASYSOCK_MAJOR_VERSION = 0
+@@ -79,7 +78,6 @@
+ NM = /usr/bin/nm -B
+ OBJDUMP = @OBJDUMP@
+ PACKAGE = easysock
+-RANLIB = ranlib
+ VERSION = 0.2.0
+
+ INCLUDES = -I$(top_srcdir)/easysock
+@@ -94,13 +92,9 @@
+
+
+ DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I..
+-CPPFLAGS =
+-LDFLAGS =
+ LIBS =
+ libggzd_a_LIBADD =
+ libggzd_a_OBJECTS = ggz.o
+-AR = ar
+-CFLAGS = -g -O2
+ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+ LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+ CCLD = $(CC)
+--- a/src/server/Makefile
++++ b/src/server/Makefile
+@@ -11,14 +11,11 @@
+ COMMON_PATH = $(TOPLEVEL_PATH)/src/common
+ GGZ_PATH= $(TOPLEVEL_PATH)/src/ggz
+
+-# Programs used in building process
+-CC = gcc
+-
+ # Where to put the XTux client binary.
+ BINARY = $(TOPLEVEL_PATH)/tux_serv
+
+ # Flags used when compiling
+-CFLAGS = -g -Wall -O2 -DDATADIR=\"$(DATADIR)\"
++CPPFLAGS += -DDATADIR=\"$(DATADIR)\"
+
+ # Paths to header files
+ COMMON_INC = -I$(COMMON_PATH)
+@@ -41,8 +38,8 @@
+
+ #Apps
+ server: $(OBJECTS)
+- $(CC) -o $(BINARY) $(OBJECTS) $(XTUXLIB) $(MATHLIB) $(SOCKLIB) $(GGZLIB)
++ $(CC) $(LDFLAGS) -o $(BINARY) $(OBJECTS) $(XTUXLIB) $(MATHLIB) $(SOCKLIB) $(GGZLIB)
+
+ # OBJECTS
+ .c.o: server.h $*.h $*.c
+- $(CC) $(CFLAGS) -c $*.c $(COMMON_INC) $(GGZ_INC)
++ $(CC) $(CFLAGS) $(CPPFLAGS) -c $*.c $(COMMON_INC) $(GGZ_INC)
diff --git a/games-arcade/xtux/files/xtux-20030306-ldflags.patch b/games-arcade/xtux/files/xtux-20030306-ldflags.patch
deleted file mode 100644
index 4a4877a6d65a..000000000000
--- a/games-arcade/xtux/files/xtux-20030306-ldflags.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/src/client/Makefile.old 2010-09-30 18:08:16.000000000 +0200
-+++ b/src/client/Makefile 2010-09-30 18:08:41.000000000 +0200
-@@ -48,7 +48,7 @@
-
- #Apps
- client: $(OBJECTS)
-- $(CC) -o $(BINARY) $(CFLAGS) $(OBJECTS) $(XTUXLIB) $(MATHLIB) $(X11LIB) $(XPMLIB) $(SOCKLIB) $(GGZLIB)
-+ $(CC) -o $(BINARY) $(LDFLAGS) $(CFLAGS) $(OBJECTS) $(XTUXLIB) $(MATHLIB) $(X11LIB) $(XPMLIB) $(SOCKLIB) $(GGZLIB)
-
- # OBJECTS
- .c.o: client.h $*.c
---- a/src/server/Makefile.old 2010-09-30 18:09:55.000000000 +0200
-+++ b/src/server/Makefile 2010-09-30 18:10:16.000000000 +0200
-@@ -41,7 +41,7 @@
-
- #Apps
- server: $(OBJECTS)
-- $(CC) -o $(BINARY) $(OBJECTS) $(XTUXLIB) $(MATHLIB) $(SOCKLIB) $(GGZLIB)
-+ $(CC) $(LDFLAGS) -o $(BINARY) $(OBJECTS) $(XTUXLIB) $(MATHLIB) $(SOCKLIB) $(GGZLIB)
-
- # OBJECTS
- .c.o: server.h $*.h $*.c
diff --git a/games-arcade/xtux/files/xtux-20030306-missing-include.patch b/games-arcade/xtux/files/xtux-20030306-missing-include.patch
new file mode 100644
index 000000000000..f7a655eecadb
--- /dev/null
+++ b/games-arcade/xtux/files/xtux-20030306-missing-include.patch
@@ -0,0 +1,29 @@
+--- a/src/client/cl_net.c
++++ b/src/client/cl_net.c
+@@ -4,7 +4,7 @@
+ */
+
+ #include <unistd.h>
+-#include <sys/signal.h>
++#include <signal.h>
+ #include <fcntl.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+--- a/src/client/misc.c
++++ b/src/client/misc.c
+@@ -1,4 +1,5 @@
+ #include <X11/Xlib.h>
++#include <limits.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+--- a/src/ggz/client/ggz.c
++++ b/src/ggz/client/ggz.c
+@@ -33,6 +33,7 @@
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+
+ static char *name=NULL;
+ static int ggz_sock;
diff --git a/games-arcade/xtux/files/xtux-20030306-tux_serv-path.patch b/games-arcade/xtux/files/xtux-20030306-tux_serv-path.patch
new file mode 100644
index 000000000000..87e6043f2178
--- /dev/null
+++ b/games-arcade/xtux/files/xtux-20030306-tux_serv-path.patch
@@ -0,0 +1,13 @@
+--- a/src/client/menu.c
++++ b/src/client/menu.c
+@@ -726,8 +726,8 @@
+ for( i=0 ; i<3 ; i++ )
+ close(i); /* Close STD-IN, -OUT, -ERR */
+
+- system("./tux_serv -e");
+- /* execlp( "./tux_serv", "-e" );
++ system("tux_serv -e");
++ /* execlp( "tux_serv", "-e" );
+ perror("execlp"); */
+ exit(-1);
+ }
diff --git a/games-arcade/xtux/xtux-20030306-r1.ebuild b/games-arcade/xtux/xtux-20030306-r1.ebuild
index 929e81c88666..55e94f38231a 100644
--- a/games-arcade/xtux/xtux-20030306-r1.ebuild
+++ b/games-arcade/xtux/xtux-20030306-r1.ebuild
@@ -1,8 +1,9 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
-inherit desktop
+EAPI=7
+
+inherit desktop toolchain-funcs
DESCRIPTION="Multiplayer Gauntlet-style arcade game"
HOMEPAGE="http://xtux.sourceforge.net/"
@@ -11,30 +12,27 @@ SRC_URI="mirror://sourceforge/xtux/xtux-src-${PV}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE=""
DEPEND="x11-libs/libXpm"
RDEPEND="${DEPEND}
- media-fonts/font-adobe-75dpi
-"
+ media-fonts/font-adobe-75dpi"
S="${WORKDIR}/${PN}"
+PATCHES=(
+ "${FILESDIR}"/${P}-Makefile.patch
+ "${FILESDIR}"/${P}-particles.patch
+ "${FILESDIR}"/${P}-tux_serv-path.patch
+ "${FILESDIR}"/${P}-missing-include.patch
+)
+
src_prepare() {
default
+ find data/ -type d -name .xvpics -exec rm -rf \{\} + || die
+}
- find data/ -type d -name .xvpics -exec rm -rf \{\} +
- sed -i \
- -e "s:-g -Wall -O2:${CFLAGS}:" \
- src/{client,common,server}/Makefile \
- || die "sed failed"
- sed -i \
- -e "s:./tux_serv:tux_serv:" \
- src/client/menu.c \
- || die "sed failed"
-
- eapply "${FILESDIR}/${P}-particles.patch" \
- "${FILESDIR}"/${P}-ldflags.patch
+src_configure() {
+ tc-export AR CC RANLIB
}
src_compile() {
@@ -47,9 +45,13 @@ src_compile() {
src_install() {
dobin xtux tux_serv
- insinto "/usr/share/xtux"
- doins -r data/
- dodoc AUTHORS CHANGELOG README README.GGZ doc/*
+
+ einstalldocs
+ dodoc -r doc/.
+
+ insinto /usr/share/xtux
+ doins -r data
+
newicon data/images/icon.xpm ${PN}.xpm
make_desktop_entry xtux "Xtux"
}