Make sure the game can find the data files #58849 by Olivier.
authorMike Frysinger <vapier@gentoo.org>
Tue, 28 Dec 2004 06:29:25 +0000 (06:29 +0000)
committerMike Frysinger <vapier@gentoo.org>
Tue, 28 Dec 2004 06:29:25 +0000 (06:29 +0000)
games-fps/quake1/ChangeLog
games-fps/quake1/Manifest
games-fps/quake1/files/digest-quake1-2.40-r1 [moved from games-fps/quake1/files/digest-quake1-2.40 with 100% similarity]
games-fps/quake1/files/gentoo-paths.patch [new file with mode: 0644]
games-fps/quake1/files/makefile-cflags.patch [moved from games-fps/quake1/files/makefile-gcc3-cflags.patch with 68% similarity]
games-fps/quake1/files/makefile-gcc2-cflags.patch [deleted file]
games-fps/quake1/quake1-2.40-r1.ebuild [moved from games-fps/quake1/quake1-2.40.ebuild with 74% similarity]

index 78f91219d4e7b665312c0a3f4dc53db566920522..97ccc56739da9ba456e11433ca3e7d183e0245ac 100644 (file)
@@ -1,6 +1,14 @@
 # ChangeLog for games-fps/quake1
 # Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-fps/quake1/ChangeLog,v 1.5 2004/11/20 09:33:44 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-fps/quake1/ChangeLog,v 1.6 2004/12/28 06:29:25 vapier Exp $
+
+*quake1-2.40-r1 (28 Dec 2004)
+
+  28 Dec 2004; Mike Frysinger <vapier@gentoo.org> +files/gentoo-paths.patch,
+  +files/makefile-cflags.patch, -files/makefile-gcc2-cflags.patch,
+  -files/makefile-gcc3-cflags.patch, +quake1-2.40-r1.ebuild,
+  -quake1-2.40.ebuild:
+  Make sure the game can find the data files #58849 by Olivier.
 
   20 Nov 2004; Michael Sterrett <mr_bones_@gentoo.org> quake1-2.40.ebuild:
   tidy; error check
index db368e9451ec8c9d125f446aa79cc959921acadd..6b1e07b5a7f3268b1fd2acc697ebd0448ac58828 100644 (file)
@@ -1,9 +1,19 @@
-MD5 0150abc382202c8e977af7fe635dcccd ChangeLog 515
-MD5 8431d217352ffb495ca1e07c0c09767f quake1-2.40.ebuild 2298
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+MD5 aa5d579e53c4d36c6f7949c00f8ffca4 ChangeLog 836
 MD5 f17b9b8fa07a38914fe1c03268f51678 metadata.xml 158
-MD5 1234946f709d4f661a2030a3b01fab6b files/digest-quake1-2.40 58
+MD5 6b724a167adac33e4b2ab8b561bb0cb2 quake1-2.40-r1.ebuild 2373
 MD5 b9e1b8831a33b812643b9d5f3cab8cf2 files/fix-sys_printf.patch 666
-MD5 08770c3708ba8384c402179f0c247ded files/makefile-gcc2-cflags.patch 815
-MD5 b47df8c86116df21eb3c75ff8d8142e6 files/makefile-gcc3-cflags.patch 878
+MD5 1234946f709d4f661a2030a3b01fab6b files/digest-quake1-2.40-r1 58
 MD5 6a5b3a494d26b4f1b8d1063f9a0aa6e4 files/makefile-path-fixes.patch 1539
 MD5 6f4c55f7cf280c7c87e1e5a20934b813 files/makefile-sedable.patch 1064
+MD5 976762754aa92b2d6db912e4414ddf3b files/gentoo-paths.patch 1183
+MD5 b74e563d08363b8b88127fffaefb5944 files/makefile-cflags.patch 709
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.9.10 (GNU/Linux)
+
+iD8DBQFB0P1eroRuSHgZdywRAvdCAJwJqrGuHyjKTvml2JvuPmSR8z2vgACdEMMc
+YqNU8OcnHXn5VyQNLix+BpQ=
+=uQPj
+-----END PGP SIGNATURE-----
diff --git a/games-fps/quake1/files/gentoo-paths.patch b/games-fps/quake1/files/gentoo-paths.patch
new file mode 100644 (file)
index 0000000..e54b0a4
--- /dev/null
@@ -0,0 +1,32 @@
+--- WinQuake/common.c.orig     2004-12-28 01:13:18.982915064 -0500
++++ WinQuake/common.c  2004-12-28 01:16:01.038278904 -0500
+@@ -1775,11 +1775,16 @@
+ // start up with GAMENAME by default (id1)\r
+ //\r
+       COM_AddGameDirectory (va("%s/"GAMENAME, basedir) );\r
++      COM_AddGameDirectory (va("GENTOO_DATADIR/"GAMENAME) );
+ \r
+-      if (COM_CheckParm ("-rogue"))\r
++      if (COM_CheckParm ("-rogue")) {
+               COM_AddGameDirectory (va("%s/rogue", basedir) );\r
+-      if (COM_CheckParm ("-hipnotic"))\r
++              COM_AddGameDirectory (va("GENTOO_DATADIR/rogue") );
++      }
++      if (COM_CheckParm ("-hipnotic")) {
+               COM_AddGameDirectory (va("%s/hipnotic", basedir) );\r
++              COM_AddGameDirectory (va("GENTOO_DATADIR/hipnotic") );
++      }
+ \r
+ //\r
+ // -game <gamedir>\r
+--- QW/client/common.c.orig    2004-12-28 01:20:42.280523584 -0500
++++ QW/client/common.c 2004-12-28 01:21:14.960555464 -0500
+@@ -1845,6 +1845,8 @@
+ //
+       COM_AddGameDirectory (va("%s/id1", com_basedir) );
+       COM_AddGameDirectory (va("%s/qw", com_basedir) );
++      COM_AddGameDirectory (va("GENTOO_DATADIR/id1", com_basedir) );
++      COM_AddGameDirectory (va("GENTOO_DATADIR/qw", com_basedir) );
+ 
+       // any set gamedirs will be freed up to here
+       com_base_searchpaths = com_searchpaths;
similarity index 68%
rename from games-fps/quake1/files/makefile-gcc3-cflags.patch
rename to games-fps/quake1/files/makefile-cflags.patch
index 136c7a937fb680744f632345d8d6c8932ee7ea6e..9829ba7ffbfe9b79ae1e05078fa140861c83247c 100644 (file)
@@ -3,16 +3,14 @@
 @@ -39,3 +39,3 @@
  BASE_CFLAGS=-Dstricmp=strcasecmp
 -RELEASE_CFLAGS=$(BASE_CFLAGS) -g -mpentiumpro -O6 -ffast-math -funroll-loops \
-+RELEASE_CFLAGS=$(BASE_CFLAGS) GENTOO_CFLAGS -O6 -ffast-math -funroll-loops \
++RELEASE_CFLAGS=$(BASE_CFLAGS) GENTOO_CFLAGS \
        -fomit-frame-pointer -fexpensive-optimizations
 --- QW/Makefile.orig   2003-07-14 15:13:12.000000000 -0400
 +++ QW/Makefile        2003-07-14 15:15:41.000000000 -0400
-@@ -45,5 +45,5 @@
+@@ -45,5 +45,3 @@
  else
 -RELEASE_CFLAGS=$(BASE_CFLAGS) -m486 -O6 -ffast-math -funroll-loops \
 -      -fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
 -      -malign-jumps=2 -malign-functions=2
-+RELEASE_CFLAGS=$(BASE_CFLAGS) GENTOO_CFLAGS -O6 -ffast-math -funroll-loops \
-+      -fomit-frame-pointer -fexpensive-optimizations -falign-loops=2 \
-+      -falign-jumps=2 -falign-functions=2
++RELEASE_CFLAGS=$(BASE_CFLAGS) GENTOO_CFLAGS
  endif
diff --git a/games-fps/quake1/files/makefile-gcc2-cflags.patch b/games-fps/quake1/files/makefile-gcc2-cflags.patch
deleted file mode 100644 (file)
index 3b2f87d..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
---- WinQuake/Makefile.orig     2003-07-14 15:13:27.000000000 -0400
-+++ WinQuake/Makefile  2003-07-14 15:17:10.000000000 -0400
-@@ -39,3 +39,3 @@
- BASE_CFLAGS=-Dstricmp=strcasecmp
--RELEASE_CFLAGS=$(BASE_CFLAGS) -g -mpentiumpro -O6 -ffast-math -funroll-loops \
-+RELEASE_CFLAGS=$(BASE_CFLAGS) GENTOO_CFLAGS -O6 -ffast-math -funroll-loops \
-       -fomit-frame-pointer -fexpensive-optimizations
---- QW/Makefile.orig   2003-07-14 15:13:12.000000000 -0400
-+++ QW/Makefile        2003-07-14 15:15:41.000000000 -0400
-@@ -44,5 +44,5 @@
-       -fomit-frame-pointer -fexpensive-optimizations
- else
--RELEASE_CFLAGS=$(BASE_CFLAGS) -m486 -O6 -ffast-math -funroll-loops \
-+RELEASE_CFLAGS=$(BASE_CFLAGS) GENTOO_CFLAGS -O6 -ffast-math -funroll-loops \
-       -fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
-       -malign-jumps=2 -malign-functions=2
similarity index 74%
rename from games-fps/quake1/quake1-2.40.ebuild
rename to games-fps/quake1/quake1-2.40-r1.ebuild
index a48411c2dc0b4b507bc786538a2d45f270280394..bf334d14ac25286091cb92fa6b4f17ae7323ba7a 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-fps/quake1/quake1-2.40.ebuild,v 1.7 2004/11/20 09:33:44 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-fps/quake1/quake1-2.40-r1.ebuild,v 1.1 2004/12/28 06:29:25 vapier Exp $
 
 inherit eutils gcc games
 
@@ -32,21 +32,23 @@ pkg_setup() {
 src_unpack() {
        unpack ${A}
 
-       epatch "${FILESDIR}/fix-sys_printf.patch"
+       epatch "${FILESDIR}"/fix-sys_printf.patch
 
        mv WinQuake/Makefile{.linuxi386,}
        mv QW/Makefile{.Linux,}
 
-       epatch "${FILESDIR}/makefile-path-fixes.patch"
+       epatch "${FILESDIR}"/makefile-path-fixes.patch
+       epatch "${FILESDIR}"/gentoo-paths.patch
+       sed -i -e "s:GENTOO_DATADIR:${GAMES_DATADIR}/quake-data:" \
+               {QW/client,WinQuake}/common.c || die "setting data paths"
 
-       [ $(gcc-major-version) -eq 3 ] \
-               && epatch "${FILESDIR}/makefile-gcc3-cflags.patch" \
-               || epatch "${FILESDIR}/makefile-gcc2-cflags.patch"
+       epatch "${FILESDIR}"/makefile-cflags.patch
        sed -i "s:GENTOO_CFLAGS:${CFLAGS} -DGL_EXT_SHARED=1:" {WinQuake,QW}/Makefile
+
        cp QW/client/glquake.h{,.orig}
        (echo "#define APIENTRY";cat QW/client/glquake.h.orig) > QW/client/glquake.h
 
-       epatch "${FILESDIR}/makefile-sedable.patch"
+       epatch "${FILESDIR}"/makefile-sedable.patch
        if ! use 3dfx ; then
                sed -i 's:^   $(BUILDDIR)/bin/glquake ::' WinQuake/Makefile
                sed -i 's:^   $(BUILDDIR)/bin/glquake.3dfxgl ::' WinQuake/Makefile
@@ -67,8 +69,8 @@ src_unpack() {
 }
 
 src_compile() {
-       make -C "${S}/WinQuake" build_release || die "failed to build WinQuake"
-       make -C "${S}/QW" build_release || die "failed to build QW"
+       emake -j1 -C "${S}"/WinQuake build_release || die "failed to build WinQuake"
+       emake -j1 -C "${S}"/QW build_release || die "failed to build QW"
 }
 
 src_install() {