summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2018-05-01 10:16:16 +0200
committerPacho Ramos <pacho@gentoo.org>2018-05-01 21:31:26 +0200
commit997e5225e588712dcec9440b0911b989f94a4159 (patch)
treeb3d12c99f314f8596a4eb9d82c9d0f89bbc2568a /games-fps
parentgames-fps/duke3d: Adapt patches for future eapi6 bump (diff)
downloadgentoo-997e5225e588712dcec9440b0911b989f94a4159.tar.gz
gentoo-997e5225e588712dcec9440b0911b989f94a4159.tar.bz2
gentoo-997e5225e588712dcec9440b0911b989f94a4159.zip
games-fps/prboom: Stop using games.eclass
Package-Manager: Portage-2.3.31, Repoman-2.3.9
Diffstat (limited to 'games-fps')
-rw-r--r--games-fps/prboom/files/prboom-2.5.0-libpng14.patch4
-rw-r--r--games-fps/prboom/files/prboom-2.5.0-nvidia.patch12
-rw-r--r--games-fps/prboom/prboom-2.5.0-r1.ebuild92
3 files changed, 100 insertions, 8 deletions
diff --git a/games-fps/prboom/files/prboom-2.5.0-libpng14.patch b/games-fps/prboom/files/prboom-2.5.0-libpng14.patch
index d0e3c48299f0..3dea0e7a983b 100644
--- a/games-fps/prboom/files/prboom-2.5.0-libpng14.patch
+++ b/games-fps/prboom/files/prboom-2.5.0-libpng14.patch
@@ -1,7 +1,7 @@
https://bugs.gentoo.org/show_bug.cgi?id=308739
---- src/SDL/i_sshot.c
-+++ src/SDL/i_sshot.c
+--- a/src/SDL/i_sshot.c
++++ b/src/SDL/i_sshot.c
@@ -231,7 +231,7 @@
if (fp)
{
diff --git a/games-fps/prboom/files/prboom-2.5.0-nvidia.patch b/games-fps/prboom/files/prboom-2.5.0-nvidia.patch
index 2b7aa9b32d46..c602c784c13f 100644
--- a/games-fps/prboom/files/prboom-2.5.0-nvidia.patch
+++ b/games-fps/prboom/files/prboom-2.5.0-nvidia.patch
@@ -1,5 +1,5 @@
---- src/gl_intern.h.orig 2003-09-21 16:39:30.247451624 -0400
-+++ src/gl_intern.h 2003-09-21 16:39:41.610724144 -0400
+--- a/src/gl_intern.h.orig 2003-09-21 16:39:30.247451624 -0400
++++ b/src/gl_intern.h 2003-09-21 16:39:41.610724144 -0400
@@ -84,6 +84,6 @@
#define min(a,b) ((a)<(b)?(a):(b))
#endif
@@ -8,8 +8,8 @@
+//PFNGLCOLORTABLEEXTPROC gld_ColorTableEXT;
#endif // _GL_INTERN_H
---- src/gl_main.c.orig 2003-09-21 16:39:55.436622288 -0400
-+++ src/gl_main.c 2003-09-21 16:43:00.943420968 -0400
+--- a/src/gl_main.c.orig 2003-09-21 16:39:55.436622288 -0400
++++ b/src/gl_main.c 2003-09-21 16:43:00.943420968 -0400
@@ -285,6 +285,7 @@
if (strcasecmp(extension, "GL_EXT_texture_filter_anisotropic") == 0)
@@ -35,8 +35,8 @@
W_UnlockLumpName("PLAYPAL");
} else {
if (palette>0)
---- src/gl_texture.c.orig 2003-09-21 16:43:18.450759448 -0400
-+++ src/gl_texture.c 2003-09-21 16:43:39.549551944 -0400
+--- a/src/gl_texture.c.orig 2003-09-21 16:43:18.450759448 -0400
++++ b/src/gl_texture.c 2003-09-21 16:43:39.549551944 -0400
@@ -178,7 +178,7 @@
pal[transparent_pal_index*4+1]=0;
pal[transparent_pal_index*4+2]=0;
diff --git a/games-fps/prboom/prboom-2.5.0-r1.ebuild b/games-fps/prboom/prboom-2.5.0-r1.ebuild
new file mode 100644
index 000000000000..64e989542a24
--- /dev/null
+++ b/games-fps/prboom/prboom-2.5.0-r1.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop readme.gentoo-r1 toolchain-funcs
+
+DESCRIPTION="Port of ID's doom to SDL and OpenGL"
+HOMEPAGE="http://prboom.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+ mirror://gentoo/${PN}.png"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+RDEPEND="
+ media-libs/libsdl[joystick,video]
+ media-libs/sdl-mixer
+ media-libs/sdl-net
+ !<games-fps/lsdldoom-1.5
+ virtual/opengl
+ virtual/glu
+"
+DEPEND="${RDEPEND}"
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+To play the original Doom levels, place doom.wad and/or doom2.wad
+into ${GAMES_DATADIR}/doom-data
+Then run ${PN} accordingly.
+
+doom1.wad is the shareware demo wad consisting of 1 episode,
+and doom.wad is the full Doom 1 set of 3 episodes
+(or 4 in the Ultimate Doom wad).
+
+You can even emerge doom-data and/or freedoom to play for free.
+"
+
+src_prepare() {
+ default
+
+ ebegin "Detecting NVidia GL/prboom bug"
+ $(tc-getCC) "${FILESDIR}"/${P}-nvidia-test.c 2> /dev/null
+ local ret=$?
+ eend ${ret} "NVidia GL/prboom bug found ;("
+ [ ${ret} -eq 0 ] || eapply "${FILESDIR}"/${P}-nvidia.patch
+
+ eapply "${FILESDIR}"/${P}-libpng14.patch
+
+ sed -i \
+ -e '/^gamesdir/ s/\/games/\/bin/' \
+ src/Makefile.in \
+ || die "sed failed"
+ sed -i \
+ -e 's/: install-docDATA/:/' \
+ -e '/^SUBDIRS/ s/doc//' \
+ Makefile.in \
+ || die "sed failed"
+ sed -i \
+ -e 's:-ffast-math $CFLAGS_OPT::' \
+ configure \
+ || die "sed configure failed"
+}
+
+src_configure() {
+ # leave --disable-cpu-opt in otherwise the configure script
+ # will append -march=i686 and crap ... let the user's CFLAGS
+ # handle this ...
+ econf \
+ --enable-gl \
+ --disable-i386-asm \
+ --disable-cpu-opt \
+ --with-waddir="/usr/share/doom-data"
+}
+
+src_install() {
+ default
+ emake DESTDIR="${D}" install
+
+ doman doc/*.{5,6}
+
+ dodoc doc/README.* doc/*.txt
+ readme.gentoo_create_doc
+
+ doicon "${DISTDIR}"/${PN}.png
+ make_desktop_entry ${PN} "PrBoom"
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}