Skip to content

Commit

Permalink
touchups; better libsdl use deps; add mmx use flag support
Browse files Browse the repository at this point in the history
Package-Manager: portage-2.2.20.1
  • Loading branch information
Michael Sterrett committed Nov 5, 2015
1 parent 1c3c8c9 commit f300b4d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 deletions.
13 changes: 13 additions & 0 deletions games-emulation/vbam/files/vbam-2.0.0_pre1507-man.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--- CMakeLists.txt.orig 2015-11-03 20:19:34.092188350 -0500
+++ CMakeLists.txt 2015-11-03 20:20:17.176302442 -0500
@@ -384,7 +384,9 @@

# manual pages
IF( UNIX )
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/debian/vbam.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1)
+ IF( ENABLE_SDL )
+ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/debian/vbam.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1)
+ ENDIF( ENABLE_SDL )
IF( ENABLE_GTK )
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/debian/gvbam.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1)
ENDIF( ENABLE_GTK )
37 changes: 16 additions & 21 deletions games-emulation/vbam/vbam-2.0.0_pre1507.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,33 @@ fi
DESCRIPTION="Game Boy, GBC, and GBA emulator forked from VisualBoyAdvance"
HOMEPAGE="http://sourceforge.net/projects/vbam/"

LICENSE="GPL-2"
LICENSE="GPL-2+"
SLOT="0"
IUSE="cairo ffmpeg gtk link lirc nls openal +sdl wxwidgets"
IUSE="cairo cpu_flags_x86_mmx ffmpeg gtk link lirc nls openal +sdl wxwidgets"
REQUIRED_USE="|| ( sdl gtk wxwidgets )"

RDEPEND=">=media-libs/libpng-1.4:0=
media-libs/libsdl[joystick]
link? ( >=media-libs/libsfml-2.0 )
media-libs/libsdl[sound]
sys-libs/zlib
virtual/glu
virtual/opengl
link? ( >=media-libs/libsfml-2.0 )
ffmpeg? ( virtual/ffmpeg[-libav] )
lirc? ( app-misc/lirc )
nls? ( virtual/libintl )
sdl? ( media-libs/libsdl[joystick,opengl] )
gtk? ( >=dev-cpp/glibmm-2.4.0:2
>=dev-cpp/gtkmm-2.4.0:2.4
>=dev-cpp/gtkglextmm-1.2.0 )
lirc? ( app-misc/lirc )
nls? ( virtual/libintl )
wxwidgets? (
cairo? ( x11-libs/cairo )
openal? ( media-libs/openal )
x11-libs/wxGTK:${WX_GTK_VER}[X,opengl]
)"
DEPEND="${RDEPEND}
wxwidgets? ( || ( media-gfx/imagemagick media-gfx/graphicsmagick[imagemagick] ) )
wxwidgets? ( || (
media-gfx/imagemagick
media-gfx/graphicsmagick[imagemagick] ) )
x86? ( || ( dev-lang/nasm dev-lang/yasm ) )
nls? ( sys-devel/gettext )
virtual/pkgconfig"
Expand All @@ -52,10 +55,8 @@ src_prepare() {
sed -i '1i#define OF(x) x' src/common/memgzio.c || die

sed -i "s:\(DESTINATION\) bin:\1 ${GAMES_BINDIR}:" \
CMakeLists.txt src/wx/CMakeLists.txt || die

# fix desktop file QA warnings
edos2unix src/gtk/gvbam.desktop src/wx/wxvbam.desktop
CMakeLists.txt src/{wx,gtk}/CMakeLists.txt || die
epatch "${FILESDIR}"/${P}-man.patch
}

src_configure() {
Expand All @@ -71,6 +72,7 @@ src_configure() {
$(cmake-utils_use_enable wxwidgets WX)
$(cmake-utils_use_enable x86 ASM_CORE)
$(cmake-utils_use_enable x86 ASM_SCALERS)
$(cmake-utils_use_enable cpu_flags_x86_mmx MMX)
-DCMAKE_SKIP_RPATH=ON
-DDATA_INSTALL_DIR=share/games/${PN}
)
Expand All @@ -83,14 +85,7 @@ src_compile() {

src_install() {
cmake-utils_src_install

if use sdl ; then
dodoc doc/ReadMe.SDL.txt
doman src/debian/vbam.1
fi
use wxwidgets && doman src/debian/wxvbam.1
use gtk && doman src/debian/gvbam.1

use sdl && dodoc doc/ReadMe.SDL.txt
prepgamesdirs
}

Expand All @@ -107,13 +102,13 @@ pkg_postinst() {
games_pkg_postinst
if use gtk || use wxwidgets ; then
gnome2_icon_cache_update
use gtk && fdo-mime_desktop_database_update
fi
use gtk && fdo-mime_desktop_database_update
}

pkg_postrm() {
if use gtk || use wxwidgets ; then
gnome2_icon_cache_update
use gtk && fdo-mime_desktop_database_update
fi
use gtk && fdo-mime_desktop_database_update
}

0 comments on commit f300b4d

Please sign in to comment.