Skip to content

Commit

Permalink
Add live ebuild of zzogl.
Browse files Browse the repository at this point in the history
  • Loading branch information
Russell Harmon committed Dec 28, 2009
1 parent 77db234 commit 3002b0b
Show file tree
Hide file tree
Showing 2 changed files with 119 additions and 0 deletions.
1 change: 1 addition & 0 deletions games-emulation/ps2emu-zzogl/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ MISC metadata.xml 359 RMD160 aa811da978a36e86e732198143c4c562f71bade7 SHA1 4519e
EBUILD ps2emu-zzogl-0.1.166-r1.ebuild 2674 RMD160 535b8ed561dc02bbc13771144263a00543132ce2 SHA1 6c35e38654b40e3138e26d60691acf758dc81a5a SHA256 b1bb73f78541b21f154c909ee8bbbbb45bca44dba36a3d0ce979bb226134b83d
EBUILD ps2emu-zzogl-0.1.166.ebuild 2754 RMD160 44f2604d35158241cf4341ae8ef03d990b0a9092 SHA1 165c34f804a60e44ffb60523730d08679e593661 SHA256 81fefb12cb07342a866217bf01a0a13e4e2f0535029cf6e87e14e6d40f28ab46
EBUILD ps2emu-zzogl-0.1.205.ebuild 2728 RMD160 7fb3f281189ac3e32a8338cebc7017c49b7870a5 SHA1 c2a8d7ae4b762c579a09af499e2217f362b821bf SHA256 f5aa3966c5b2222f53b9e77996412cff3a2ad303d9f539bc9d75ebd341602295
EBUILD ps2emu-zzogl-9999.ebuild 2647 RMD160 3d1f5253424894868c9c57c3a8a33ad953b9cdd1 SHA1 ce9e7bb322d3d852d251d73895c1f91c956abecd SHA256 51158c8816889e38a2d2772bcd753d59adbe97fce3c820d501314d476688cbcb
118 changes: 118 additions & 0 deletions games-emulation/ps2emu-zzogl/ps2emu-zzogl-9999.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2

ESVN_REPO_URI="http://sanechka.spb.ru/svnroot/ruslan/zerogs/"
inherit eutils games flag-o-matic multilib autotools subversion

DESCRIPTION="PS2Emu ZZogl OpenGL plugin"
HOMEPAGE="http://www.pcsx2.net/"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
RESTRICT="primaryuri"
IUSE="debug sse2 shaders"

DEPEND="
x86? (
x11-libs/libX11
media-libs/glew
virtual/opengl
media-libs/jpeg
sys-libs/zlib
x11-libs/libXxf86vm
x11-proto/xproto
x11-proto/xf86vidmodeproto
>=x11-libs/gtk+-2
)
amd64? (
>=app-emulation/emul-linux-x86-xlibs-20091226[opengl]
>=app-emulation/emul-linux-x86-baselibs-20081109
app-emulation/emul-linux-x86-gtklibs
>=media-gfx/nvidia-cg-toolkit-2.1.0017[multilib]
)
!amd64? (
>=media-gfx/nvidia-cg-toolkit-2.1.0016
)
!games-emulation/ps2emu-zerogs"

RDEPEND="${DEPEND}
games-emulation/pcsx2"

S="${WORKDIR}/opengl"

pkg_setup() {
games_pkg_setup

# Fix for compile error.
append-flags "-I${S}/common"
append-ldflags -Wl,--no-as-needed

if use amd64 && ! has_multilib_profile; then
eerror "You must be on a multilib profile to use pcsx2!"
die "No multilib profile."
fi
use amd64 && multilib_toolchain_setup x86
}

src_unpack() {
local S="${WORKDIR}"
subversion_src_unpack
}

src_prepare() {
epatch "${FILESDIR}/${PN}-0.1.166_gcc43.patch"
epatch "${FILESDIR}/${PN}-0.1.166_consistent-naming.patch"
epatch "${FILESDIR}/${PN}-0.1.205_gentoo.patch"
epatch "${FILESDIR}/${PN}-0.1.166_ambiguous-abs.patch"
epatch "${FILESDIR}/${PN}-0.1.166_include-paths.patch"
epatch "${FILESDIR}/${PN}-0.1.166_required-libraries.patch"

eautoreconf -v --install || die
chmod +x configure
}

src_configure() {
egamesconf \
$(use_enable debug devbuild) \
$(use_enable debug) \
$(use_enable sse2) \
|| die
}

src_compile() {
if ! emake; then
if use shaders; then
eerror "Tips for debugging your build failure:"
eerror " Try building with USE=\"-shaders\""
fi
die "emake failed"
fi

if ! use debug && use shaders; then
einfo "Compiling shaders..."
emake -C ZeroGSShaders || die "Unable to compile shader compiler."
./ZeroGSShaders/zgsbuild ps2hw.fx ps2hw.dat || \
die "Unable to compile shaders"
fi
}

src_install() {
exeinto "$(games_get_libdir)/ps2emu/plugins"
insinto "$(games_get_libdir)/ps2emu/plugins"
newexe libZeroGSogl.so.* libZZogl.so || die
if use debug; then
doins ps2hw.fx || die
doins ctx1/ps2hw_ctx.fx || die
else
if use shaders; then
doins ps2hw.dat || die
else
doins Win32/ps2hw.dat || die
fi
fi
prepgamesdirs
}

0 comments on commit 3002b0b

Please sign in to comment.