summaryrefslogtreecommitdiff
path: root/games-emulation/ps2emu-zerogs
diff options
context:
space:
mode:
author(no author) <(no author)@4d9a9b59-111c-4e0b-8f7a-7640551abb98>2009-03-16 07:55:01 +0000
committer(no author) <(no author)@4d9a9b59-111c-4e0b-8f7a-7640551abb98>2009-03-16 07:55:01 +0000
commitf1e95daae05c57d935b00e611c624c5e75cd21ec (patch)
tree4065ab51d9e64882d9001a59ede7d9a4e372a4a6 /games-emulation/ps2emu-zerogs
uploading my overlay ), initial commit
git-svn-id: http://172.18.13.13/svn/sss_overlay@1 4d9a9b59-111c-4e0b-8f7a-7640551abb98
Diffstat (limited to 'games-emulation/ps2emu-zerogs')
-rw-r--r--games-emulation/ps2emu-zerogs/files/ps2emu-zerogs-consistent-naming.patch14
-rw-r--r--games-emulation/ps2emu-zerogs/files/ps2emu-zerogs-devbuild-paths.patch44
-rw-r--r--games-emulation/ps2emu-zerogs/files/ps2emu-zerogs-gcc43.patch12
-rw-r--r--games-emulation/ps2emu-zerogs/ps2emu-zerogs-0.96.7.ebuild72
-rw-r--r--games-emulation/ps2emu-zerogs/ps2emu-zerogs-9999.ebuild70
5 files changed, 212 insertions, 0 deletions
diff --git a/games-emulation/ps2emu-zerogs/files/ps2emu-zerogs-consistent-naming.patch b/games-emulation/ps2emu-zerogs/files/ps2emu-zerogs-consistent-naming.patch
new file mode 100644
index 0000000..bbcf0d6
--- /dev/null
+++ b/games-emulation/ps2emu-zerogs/files/ps2emu-zerogs-consistent-naming.patch
@@ -0,0 +1,14 @@
+--- opengl/Makefile.am.orig 2008-06-08 11:50:59.000000000 -0400
++++ opengl/Makefile.am 2008-06-08 11:51:16.000000000 -0400
+@@ -14,11 +14,6 @@
+ # Create a shared object by faking an exe (thanks to ODE makefiles)
+ traplibdir=$(prefix)
+
+-
+-if RELEASE_TO_PUBLIC
+-preext=r
+-endif
+-
+ EXEEXT=$(preext)@so_ext@
+
+ traplib_PROGRAMS=libZeroGSogl
diff --git a/games-emulation/ps2emu-zerogs/files/ps2emu-zerogs-devbuild-paths.patch b/games-emulation/ps2emu-zerogs/files/ps2emu-zerogs-devbuild-paths.patch
new file mode 100644
index 0000000..5fce13a
--- /dev/null
+++ b/games-emulation/ps2emu-zerogs/files/ps2emu-zerogs-devbuild-paths.patch
@@ -0,0 +1,44 @@
+--- opengl/zerogs.cpp.orig 2008-06-08 22:12:33.000000000 -0400
++++ opengl/zerogs.cpp 2008-06-08 22:15:37.000000000 -0400
+@@ -112,8 +112,8 @@
+ char* EFFECT_DIR = "C:\\programming\\ps2dev\\zerogs\\opengl\\";
+ char* EFFECT_NAME = "C:\\programming\\ps2dev\\zerogs\\opengl\\ps2hw.fx";
+ #else
+-char EFFECT_DIR[255] = "~/pcsx2/plugins/gs/zerogs/opengl/";
+-char EFFECT_NAME[255] = "~/pcsx2/plugins/gs/zerogs/opengl/ps2hw.fx";
++char EFFECT_DIR[255] = "~/.pcsx2/";
++char EFFECT_NAME[255] = "ps2hw.fx";
+ #endif
+
+ #endif
+@@ -1335,25 +1335,17 @@
+ char curwd[255];
+ getcwd(curwd, ARRAY_SIZE(curwd));
+
+- strcpy(tempstr, "../plugins/gs/zerogs/opengl/");
+- sprintf(EFFECT_NAME, "%sps2hw.fx", tempstr);
++ strcpy(tempstr, curwd);
++ sprintf(EFFECT_NAME, "%s/ps2hw.fx", tempstr);
+ FILE* f = fopen(EFFECT_NAME, "r");
+ if( f == NULL ) {
+-
+- strcpy(tempstr, "../../plugins/gs/zerogs/opengl/");
+- sprintf(EFFECT_NAME, "%sps2hw.fx", tempstr);
+- f = fopen(EFFECT_NAME, "r");
+-
+- if( f == NULL ) {
+- ERROR_LOG("Failed to find %s, try compiling a non-devbuild\n", EFFECT_NAME);
+- return false;
+- }
++ return false;
+ }
+
+ fclose(f);
+
+- sprintf(EFFECT_DIR, "%s/%s", curwd, tempstr);
+- sprintf(EFFECT_NAME, "%sps2hw.fx", EFFECT_DIR);
++ sprintf(EFFECT_DIR, "%s", tempstr);
++ sprintf(EFFECT_NAME, "%s/ps2hw.fx", EFFECT_DIR);
+ #endif
+
+ #endif // RELEASE_TO_PUBLIC
diff --git a/games-emulation/ps2emu-zerogs/files/ps2emu-zerogs-gcc43.patch b/games-emulation/ps2emu-zerogs/files/ps2emu-zerogs-gcc43.patch
new file mode 100644
index 0000000..8d28eea
--- /dev/null
+++ b/games-emulation/ps2emu-zerogs/files/ps2emu-zerogs-gcc43.patch
@@ -0,0 +1,12 @@
+diff -Nur opengl.orig/Mem.h opengl/Mem.h
+--- opengl.orig/Mem.h 2008-06-03 11:28:33.000000000 +0200
++++ opengl/Mem.h 2008-06-03 11:35:17.000000000 +0200
+@@ -21,6 +21,8 @@
+
+ #include <assert.h>
+ #include <vector>
++#include <cstring>
++#include <cstdlib>
+
+ // works only when base is a power of 2
+ #define ROUND_UPPOW2(val, base) (((val)+(base-1))&~(base-1))
diff --git a/games-emulation/ps2emu-zerogs/ps2emu-zerogs-0.96.7.ebuild b/games-emulation/ps2emu-zerogs/ps2emu-zerogs-0.96.7.ebuild
new file mode 100644
index 0000000..fc9a801
--- /dev/null
+++ b/games-emulation/ps2emu-zerogs/ps2emu-zerogs-0.96.7.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit games autotools eutils
+
+PCSX2="pcsx2-0.9.4"
+
+DESCRIPTION="PS2Emu ZeroGS OpenGL plugin"
+HOMEPAGE="http://www.pcsx2.net/"
+SRC_URI="mirror://sourceforge/pcsx2/${PCSX2}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+# I'm seeing better grahics with devbuild on.
+IUSE="debug +devbuild sse2"
+
+RDEPEND="media-gfx/nvidia-cg-toolkit
+ media-libs/glew
+ media-libs/jpeg
+ sys-libs/zlib
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXxf86vm
+ >=x11-libs/gtk+-2"
+DEPEND="${RDEPEND}
+ x11-proto/xproto
+ x11-proto/xf86vidmodeproto"
+
+S="${WORKDIR}/${PCSX2}/plugins/gs/zerogs/opengl"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${PN}-gcc43.patch"
+ epatch "${FILESDIR}/${PN}-devbuild-paths.patch"
+ epatch "${FILESDIR}/${PN}-consistent-naming.patch"
+
+ sed -r -i \
+ -e 's/-O[0-9]\b//g' \
+ -e 's/-fomit-frame-pointer\b//g' \
+ -e 's/C(..)?FLAGS=/C\1FLAGS+=/' \
+ configure.ac || die
+
+ eautoreconf -v --install || die
+ chmod +x configure
+}
+
+src_compile() {
+ egamesconf \
+ $(use_enable devbuild) \
+ $(use_enable debug) \
+ $(use_enable sse2) \
+ || die
+
+ emake || die
+}
+
+src_install() {
+ exeinto "$(games_get_libdir)/ps2emu/plugins"
+ insinto "$(games_get_libdir)/ps2emu/plugins"
+ doexe libZeroGSogl.so.* || die
+ if use devbuild; then
+ doins ps2hw.fx || die
+ doins ctx1/ps2hw_ctx.fx || die
+ else
+ doins Win32/ps2hw.dat || die
+ fi
+ prepgamesdirs
+}
diff --git a/games-emulation/ps2emu-zerogs/ps2emu-zerogs-9999.ebuild b/games-emulation/ps2emu-zerogs/ps2emu-zerogs-9999.ebuild
new file mode 100644
index 0000000..51b186e
--- /dev/null
+++ b/games-emulation/ps2emu-zerogs/ps2emu-zerogs-9999.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+ESVN_REPO_URI="https://pcsx2.svn.sourceforge.net/svnroot/pcsx2/plugins/gs/zerogs/opengl"
+inherit eutils games subversion autotools
+
+DESCRIPTION="PS2Emu ZeroGS OpenGL plugin"
+HOMEPAGE="http://www.pcsx2.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+# I'm seeing better grahics with devbuild on.
+IUSE="debug +devbuild sse2"
+
+RDEPEND="media-gfx/nvidia-cg-toolkit
+ media-libs/glew
+ media-libs/jpeg
+ sys-libs/zlib
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXxf86vm
+ >=x11-libs/gtk+-2"
+DEPEND="${RDEPEND}
+ x11-proto/xproto
+ x11-proto/xf86vidmodeproto"
+
+S="${WORKDIR}/opengl"
+
+src_unpack() {
+ subversion_src_unpack
+ cd "${S}"
+
+ epatch "${FILESDIR}/${PN}-gcc43.patch"
+ epatch "${FILESDIR}/${PN}-devbuild-paths.patch"
+ epatch "${FILESDIR}/${PN}-consistent-naming.patch"
+
+ sed -r -i \
+ -e 's/-O[0-9]\b//g' \
+ -e 's/-fomit-frame-pointer\b//g' \
+ -e 's/C(..)?FLAGS=/C\1FLAGS+=/' \
+ configure.ac || die
+
+ eautoreconf -v --install || die
+ chmod +x configure
+}
+
+src_compile() {
+ egamesconf \
+ $(use_enable devbuild) \
+ $(use_enable debug) \
+ $(use_enable sse2) \
+ || die
+
+ emake || die
+}
+
+src_install() {
+ exeinto "$(games_get_libdir)/ps2emu/plugins"
+ insinto "$(games_get_libdir)/ps2emu/plugins"
+ doexe libZeroGSogl.so.* || die
+ if use devbuild; then
+ doins ps2hw.fx || die
+ doins ctx1/ps2hw_ctx.fx || die
+ else
+ doins Win32/ps2hw.dat || die
+ fi
+ prepgamesdirs
+}