summaryrefslogtreecommitdiff
path: root/games-fps/tenebrae
diff options
context:
space:
mode:
Diffstat (limited to 'games-fps/tenebrae')
-rw-r--r--games-fps/tenebrae/Manifest7
-rw-r--r--games-fps/tenebrae/files/1.04-glhax.patch32
-rw-r--r--games-fps/tenebrae/files/tenebrae-1.04-exec-stack.patch36
-rw-r--r--games-fps/tenebrae/files/tenebrae-1.04-redef.patch19
-rw-r--r--games-fps/tenebrae/metadata.xml18
-rw-r--r--games-fps/tenebrae/tenebrae-1.04-r1.ebuild71
6 files changed, 183 insertions, 0 deletions
diff --git a/games-fps/tenebrae/Manifest b/games-fps/tenebrae/Manifest
new file mode 100644
index 000000000000..fea075644218
--- /dev/null
+++ b/games-fps/tenebrae/Manifest
@@ -0,0 +1,7 @@
+AUX 1.04-glhax.patch 1086 BLAKE2B 10e1ac1e10070c23deada452c6b4d69fac860e8cedbf80d317cf0c28d5316e50c2f59c815dea8bf366e41c8181dc801e9f0c6dec4e32851fc3a9ab50b2740714 SHA512 6641a82ba17909aa3ab1d583595d45d0abb1ac34cb8997dc17d1bda736b6a07417276f6ec358b73c08f74d84ca9168e76ed224d2d5220ec773f4a2077dd09800
+AUX tenebrae-1.04-exec-stack.patch 658 BLAKE2B 0b6dc3dd385f3bb7d00748e7c32c3e2ec135359427b4766c27314056fc2cdcf657018be05c04d95b6ac53ccb86da8a56b8b59624e50df9d73a44bb2d7fcc0b29 SHA512 d3b6c712f79612265a31eaeccae3b9688bcfb7916be34e1b9dc6e698c33750f82b323fa51cb09768546c3cdf55bc80fadf0cbc46d4e478ca126ac4124fa06765
+AUX tenebrae-1.04-redef.patch 393 BLAKE2B 3ea2d06e37dc2a33a8766de606480b027f0d4d6334410d551cdf44d817424f72fccaa7d44e97d8ca1bf36e47aa515a2511a9b495d0494353715a086a0b706cba SHA512 57f63560f3cdf3f0070954109f753cad5ace8828d5f81dc87044a37ac2144594e6bca68d12de186077349c9f42ea17bacbf32a2481216be79569e27bfe1065a6
+DIST tenebrae-1.04.tbz2 625988 BLAKE2B f6eebd483c9dc7d4df3484e6dc55cde6d4d6166c029ff73133217d36c8064175e57bc1a3578f6119884f2d4d471cf717902b490c9a308ea38414c60d1d0a1909 SHA512 f74d1dcaf5b29fcc047f93e4c99c8b5264751c5687370ba4605cad76f85fe346e0e17a6546b8766acedabf23fed69d6894dda6499c854ef0736dddeddc89e18e
+DIST tenebraedata.zip 3989498 BLAKE2B 3f78240c0c3be4b265f4d8d1fc53f0ed331b01097afdb77c1146eef667330ae7ce8965a12a974ee23133a183e3dd92d39de320937cab2fcf10659d1d97f5162a SHA512 c69e8e18ab0c7d10b5e1c9ad3b396b0906302e6d75c0969d8c2b513df0a11b410de86736a67632378bf28d564c04c3e937f164cb3850742e183616ddc8ac4742
+EBUILD tenebrae-1.04-r1.ebuild 1503 BLAKE2B 85579ddab05c2ba454ee844b6753c2fa5e0b7c2073a62768d6f04d12d0ac6b103a6dfaa3b3c7d30fa3a3f016c00387b4c5d9e3e5bb566b5e6b3a0bb2e878fd91 SHA512 814ed0cdd765a5030392e3d0dd4928ed13e558901153c8d3bb0b70ad2147a58d6b7fae33d87c5e0d3ac67fa302c3f350b1e7603805eedcb5a9d9cd96fd9f21ac
+MISC metadata.xml 709 BLAKE2B 65e253236ac1af184022f0f648cc38781ec78bd5c8d75134bfb238fab26cc299d2f82beb5d31c90196c564ff3799260444430658128ddf2754c68b6a62bc0da7 SHA512 15881aa13e08c8803a638ff40c022871116ffdd6de8141b149433d09c98055163f0661aa299ad041215612fe2ea149a5e04e44dbb1afb1de18a53cadcd196107
diff --git a/games-fps/tenebrae/files/1.04-glhax.patch b/games-fps/tenebrae/files/1.04-glhax.patch
new file mode 100644
index 000000000000..a185d8e10c7d
--- /dev/null
+++ b/games-fps/tenebrae/files/1.04-glhax.patch
@@ -0,0 +1,32 @@
+--- tenebrae_0/glquake.h 2004-12-25 00:28:28.707288592 -0500
++++ tenebrae_0/glquake.h 2004-12-25 00:27:35.000000000 -0500
+@@ -34,6 +34,7 @@
+ #else
+ #include <GL/gl.h>
+ #include <GL/glu.h>
++#include <GL/glext.h>
+ #endif /* __APPLE__ ||ÊMACOSX */
+
+ /* use the correct dynamic function address binder */
+@@ -420,8 +421,10 @@
+ void GL_Bind (int texnum);
+
+ #ifndef _WIN32
++#ifndef APIENTRY
+ #define APIENTRY /* */
+ #endif
++#endif
+
+ #if !defined (__APPLE__) && !defined (MACOSX)
+
+@@ -1134,8 +1137,10 @@
+ // <AWE> There are some diffs with the function parameters. wgl stuff not present with MacOS X. -DC- and SDL
+ #if defined (__APPLE__) || defined (MACOSX) || defined(SDL) || defined (__glx__)
+
++#ifndef GL_APPLE_vertex_array_range
+ typedef void (APIENTRY * PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, const GLvoid *pointer);
+ typedef void (APIENTRY * PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei size, const GLvoid *pointer);
++#endif
+
+ extern PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC qglFlushVertexArrayRangeAPPLE;
+ extern PFNGLVERTEXARRAYRANGEAPPLEPROC qglVertexArrayRangeAPPLE;
diff --git a/games-fps/tenebrae/files/tenebrae-1.04-exec-stack.patch b/games-fps/tenebrae/files/tenebrae-1.04-exec-stack.patch
new file mode 100644
index 000000000000..abc8bd4a2b87
--- /dev/null
+++ b/games-fps/tenebrae/files/tenebrae-1.04-exec-stack.patch
@@ -0,0 +1,36 @@
+--- a/math.s
++++ b/math.s
+@@ -416,3 +416,6 @@
+ call C(BOPS_Error)
+
+ #endif // id386
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+--- a/snd_mixa.s
++++ b/snd_mixa.s
+@@ -216,3 +216,6 @@
+
+ #endif // id386
+
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+--- a/sys_dosa.s
++++ b/sys_dosa.s
+@@ -93,3 +93,6 @@
+
+ ret
+
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+--- a/worlda.s
++++ b/worlda.s
+@@ -142,3 +142,6 @@
+
+ #endif // id386
+
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
diff --git a/games-fps/tenebrae/files/tenebrae-1.04-redef.patch b/games-fps/tenebrae/files/tenebrae-1.04-redef.patch
new file mode 100644
index 000000000000..8bd89aa18e6f
--- /dev/null
+++ b/games-fps/tenebrae/files/tenebrae-1.04-redef.patch
@@ -0,0 +1,19 @@
+--- a/sys_dosa.s 2017-09-06 16:41:31.875358788 -0500
++++ b/sys_dosa.s 2017-09-06 16:41:35.947376646 -0500
+@@ -44,6 +44,8 @@
+
+ .text
+
++// Falls back to an empty stub on non-i386, in sys_linux.c
++#if id386
+ .globl C(Sys_LowFPPrecision)
+ C(Sys_LowFPPrecision):
+ fldcw single_cw
+@@ -55,6 +57,7 @@
+ fldcw full_cw
+
+ ret
++#endif
+
+ .globl C(Sys_PushFPCW_SetHigh)
+ C(Sys_PushFPCW_SetHigh):
diff --git a/games-fps/tenebrae/metadata.xml b/games-fps/tenebrae/metadata.xml
new file mode 100644
index 000000000000..04edb8b61c7e
--- /dev/null
+++ b/games-fps/tenebrae/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <longdescription>
+Tenebrae is a modification of the quake source that adds stencil shadows
+and per pixel lights to quake. Stencil shadows allow for realistic
+shadow effects on every object in the game world. Per pixel lighting
+allows you to have fine surface details correctly lit. These are
+essentially the same algorithms as used by the new Doom game.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">tenebrae</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-fps/tenebrae/tenebrae-1.04-r1.ebuild b/games-fps/tenebrae/tenebrae-1.04-r1.ebuild
new file mode 100644
index 000000000000..85a7552e4015
--- /dev/null
+++ b/games-fps/tenebrae/tenebrae-1.04-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+#ECVS_SERVER="cvs.tenebrae.sourceforge.net:/cvsroot/tenebrae"
+#ECVS_MODULE="tenebrae_0"
+#inherit cvs
+inherit eutils
+
+DESCRIPTION="adds stencil shadows and per pixel lights to quake"
+HOMEPAGE="http://tenebrae.sourceforge.net/"
+SRC_URI="mirror://sourceforge/tenebrae/tenebraedata.zip
+ mirror://gentoo/${P}.tbz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+RDEPEND="
+ virtual/glu
+ virtual/opengl
+ media-libs/libpng:0
+ x11-libs/libXxf86dga
+ x11-libs/libXxf86vm"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ x11-base/xorg-proto"
+
+S=${WORKDIR}
+
+src_unpack() {
+ if [[ -z ${ECVS_MODULE} ]] ; then
+ unpack ${A}
+ else
+ cvs_src_unpack
+ fi
+}
+
+src_prepare() {
+ cd tenebrae_0 || die "cd failed"
+
+ sed -i \
+ -e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:g' \
+ gl_warp.c || die
+
+ eapply "${FILESDIR}"/${PV}-glhax.patch
+ eapply "${FILESDIR}"/${P}-exec-stack.patch
+ eapply "${FILESDIR}"/${P}-redef.patch
+
+ default
+
+ cd linux || die "cd failed"
+ sed \
+ -e "/^LDFLAGS/s:=:+=:" \
+ -e "s:-mpentiumpro -O6:${CFLAGS}:" \
+ Makefile.i386linux > Makefile || die
+}
+
+src_compile() {
+ cd "${S}"/tenebrae_0/linux || die "cd failed"
+ emake MASTER_DIR="/usr/share/quake1" build_release
+}
+
+src_install() {
+ newbin tenebrae_0/linux/release*/bin/tenebrae.run tenebrae
+ insinto "/usr/share/quake1/tenebrae"
+ doins "${WORKDIR}"/tenebrae/*
+ dodoc tenebrae_0/linux/README "${WORKDIR}"/Tenebrae_Readme.txt
+}