summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2019-12-06 12:04:21 +0100
committerLars Wendler <polynomial-c@gentoo.org>2019-12-06 12:04:21 +0100
commite4658a559cc8782d012c43cfefdaaac1d335974d (patch)
treeea2e0d06dfc4e5f05dde164519eb54aaf9967a29 /games-emulation
parentdev-perl/File-Slurp: m68k stable wrt bug #698542 (diff)
downloadgentoo-e4658a559cc8782d012c43cfefdaaac1d335974d.tar.gz
gentoo-e4658a559cc8782d012c43cfefdaaac1d335974d.tar.bz2
gentoo-e4658a559cc8782d012c43cfefdaaac1d335974d.zip
games-emulation/vbam: Bump to version 2.1.4
Thanks-to: Witcher 7 <witcher-echoes@a2.topaz.ne.jp> Closes: https://bugs.gentoo.org/699606 Package-Manager: Portage-2.3.81, Repoman-2.3.19 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/vbam/Manifest1
-rw-r--r--games-emulation/vbam/files/vbam-2.1.4-cmake_fix.patch163
-rw-r--r--games-emulation/vbam/vbam-2.1.4.ebuild94
3 files changed, 258 insertions, 0 deletions
diff --git a/games-emulation/vbam/Manifest b/games-emulation/vbam/Manifest
index 03eb7c47000a..63f0ffb5f7bf 100644
--- a/games-emulation/vbam/Manifest
+++ b/games-emulation/vbam/Manifest
@@ -1,2 +1,3 @@
DIST vbam-2.0.2.tar.gz 2959204 BLAKE2B 79b288e59a843d2065eac63e74984bf134d9f5dadbc687da245030ad16b138125baab0fe1fb19acac9c117e30b95e57f1880b43817f75361600fb62efd1d5272 SHA512 9aafb8ef307fbbfbc5ae6dc35bc3042934e25a30069a71949e4c8e777fd862d94ec60c189823f4acdea4cb1338098fa85a55e090fa6023c07368cbb7638dd910
DIST vbam-2.1.0.tar.gz 2977888 BLAKE2B 48884b10d13cdeddfae1dc5a94a4576ebfd7aab263225650a7d4f7138854da3c8bbffa4a8f08e9da001cd967f0e85a7beb82f86350031264a66bfdd5403d36dd SHA512 e4489c84880a7a70e7e94104ffbbdd805e9f15d5c962c0c13a7470496d2fdad8e21c1ddb161b776eb0b1a0c7583182df5838da5a523ce31dac620aa2a7842321
+DIST vbam-2.1.4.tar.gz 3891574 BLAKE2B 5255fe814ab583c433f273c31b36933c09301330b47b2deefa453453c1d127c29a1b9de2e945e6706b1f9d9ec517444989818f3db329b96c106bf5d51ec71ae3 SHA512 9070715797c6be1648661019f236eb9328eb409f52e80e15aac52d814cf4155cf1ea37c230557c1288f152f0d27d838b11bee38679787a8d5198ca81f173d896
diff --git a/games-emulation/vbam/files/vbam-2.1.4-cmake_fix.patch b/games-emulation/vbam/files/vbam-2.1.4-cmake_fix.patch
new file mode 100644
index 000000000000..d801b08317a3
--- /dev/null
+++ b/games-emulation/vbam/files/vbam-2.1.4-cmake_fix.patch
@@ -0,0 +1,163 @@
+From ae7349b06f86ff60b0d14dfa01b3fe2163dcfbab Mon Sep 17 00:00:00 2001
+From: Rafael Kitover <rkitover@gmail.com>
+Date: Wed, 13 Nov 2019 02:56:06 +0000
+Subject: [PATCH] cmake: Use list var VBAM_LIBS for link libs.
+
+Accumulate link libraries for wxvbam in the VBAM_LIBS list variable
+instead of listing every possible library variable in the
+target_link_libraries() call.
+
+This fixes the issue with trying to use OPENAL_LIBRARIES when it's set
+to NOTFOUND which generates a cmake error.
+
+Fix #563.
+
+Signed-off-by: Rafael Kitover <rkitover@gmail.com>
+---
+ src/wx/CMakeLists.txt | 43 ++++++++++++++++++++++---------------------
+ 1 file changed, 22 insertions(+), 21 deletions(-)
+
+diff --git a/src/wx/CMakeLists.txt b/src/wx/CMakeLists.txt
+index 13e0cea7..d37c1cdd 100644
+--- a/src/wx/CMakeLists.txt
++++ b/src/wx/CMakeLists.txt
+@@ -15,6 +15,8 @@ endif()
+
+ include(VbamFunctions)
+
++set(VBAM_LIBS ${VBAMCORE_LIBS})
++
+ if(WIN32)
+ # not yet implemented
+ option(ENABLE_DIRECT3D "Enable Direct3D rendering for the wxWidgets port" OFF)
+@@ -46,6 +48,8 @@ if(ENABLE_OPENAL)
+ if(OPENAL_STATIC OR (WIN32 AND ((NOT (MINGW AND MSYS)) OR CMAKE_TOOLCHAIN_FILE MATCHES mxe)))
+ add_definitions(-DAL_LIBTYPE_STATIC)
+ endif()
++
++ list(APPEND VBAM_LIBS ${OPENAL_LIBRARY})
+ else()
+ add_definitions(-DNO_OAL)
+ endif()
+@@ -58,18 +62,15 @@ if(NOT ENABLE_XAUDIO2)
+ add_definitions(-DNO_XAUDIO2)
+ endif()
+
+-if(NOT ENABLE_FAUDIO)
+- add_definitions(-DNO_FAUDIO)
+-endif()
+-
+ if(NOT ENABLE_DIRECT3D)
+ add_definitions(-DNO_D3D)
+ endif()
+
+-unset(FAUDIO_LIBS)
+ if(ENABLE_FAUDIO)
+ find_package(FAudio REQUIRED)
+- set(FAUDIO_LIBS FAudio)
++ list(APPEND VBAM_LIBS FAudio)
++else()
++ add_definitions(-DNO_FAUDIO)
+ endif()
+
+ # on unix we have to check for X11 before we overwrite all the compile/link
+@@ -79,7 +80,7 @@ if(NOT WIN32 AND NOT APPLE)
+
+ if(X11_X11_LIB AND X11_Xscreensaver_LIB)
+ include_directories(${X11_INCLUDE_DIR})
+- set(EXTRA_X11_LIBS ${X11_X11_LIB} ${X11_Xscreensaver_LIB})
++ list(APPEND VBAM_LIBS ${X11_X11_LIB} ${X11_Xscreensaver_LIB})
+ add_definitions(-DHAVE_XSS)
+ endif()
+ endif()
+@@ -419,7 +420,7 @@ int main(int argc, char** argv) {
+ include_directories(${GTK4_INCLUDE_DIRS})
+ link_directories(${GTK4_LIBRARY_DIRS})
+ add_compile_options(${GTK4_CFLAGS_OTHER})
+- set(GTK_LIBRARIES ${GTK4_LIBRARIES})
++ list(APPEND VBAM_LIBS ${GTK4_LIBRARIES})
+ elseif(WX_USING_GTK3)
+ pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
+ if(NOT GTK3_INCLUDE_DIRS)
+@@ -428,7 +429,7 @@ int main(int argc, char** argv) {
+ include_directories(${GTK3_INCLUDE_DIRS})
+ link_directories(${GTK3_LIBRARY_DIRS})
+ add_compile_options(${GTK3_CFLAGS_OTHER})
+- set(GTK_LIBRARIES ${GTK3_LIBRARIES})
++ list(APPEND VBAM_LIBS ${GTK3_LIBRARIES})
+ else()
+ check_cxx_symbol_exists(__WXGTK20__ ${WX_CONFIG_H} WX_USING_GTK2)
+ if(WX_USING_GTK2)
+@@ -438,7 +439,7 @@ int main(int argc, char** argv) {
+ include_directories(${GTK2_INCLUDE_DIRS})
+ link_directories(${GTK2_LIBRARY_DIRS})
+ add_compile_options(${GTK2_CFLAGS_OTHER})
+- set(GTK_LIBRARIES ${GTK2_LIBRARIES})
++ list(APPEND VBAM_LIBS ${GTK2_LIBRARIES})
+ else()
+ # and if that fails, use the cmake module
+ find_package(GTK2 REQUIRED gtk)
+@@ -447,7 +448,7 @@ int main(int argc, char** argv) {
+ endif()
+ include_directories(${GTK2_INCLUDE_DIRS})
+ add_compile_options(${GTK2_DEFINITIONS})
+- set(GTK_LIBRARIES ${GTK2_LIBRARIES})
++ list(APPEND VBAM_LIBS ${GTK2_LIBRARIES})
+ endif()
+ else()
+ find_package(GTK REQUIRED gtk)
+@@ -456,6 +457,7 @@ int main(int argc, char** argv) {
+ endif()
+ include_directories(${GTK_INCLUDE_DIRS})
+ add_compile_options(${GTK_DEFINITIONS})
++ list(APPEND VBAM_LIBS ${GTK_LIBRARIES})
+ endif()
+ endif()
+ endif()
+@@ -729,14 +731,14 @@ endif()
+
+ if(WIN32)
+ set(SRC_WX ${SRC_WX} wxvbam.rc dsound.cpp)
+- set(DIRECTX_LIBRARIES dxguid dsound ws2_32)
++ list(APPEND VBAM_LIBS dxguid dsound ws2_32)
+ if(MSVC)
+ # workaround for some symbols needed by static SDL2.lib
+- set(DIRECTX_LIBRARIES ${DIRECTX_LIBRARIES} imm32 version)
++ list(APPEND VBAM_LIBS imm32 version)
+ endif()
+ # not strictly directx, but win32-related
+ if(ENABLE_DEBUGGER)
+- set(DIRECTX_LIBRARIES ${DIRECTX_LIBRARIES} wsock32)
++ list(APPEND VBAM_LIBS wsock32)
+ endif()
+ endif()
+
+@@ -783,19 +785,18 @@ endif()
+
+ target_link_libraries(
+ visualboyadvance-m
+- ${VBAMCORE_LIBS}
+ ${wxWidgets_LIBRARIES}
+- ${FFMPEG_LIBRARIES}
+- ${DIRECTX_LIBRARIES}
+- ${GTK_LIBRARIES}
+- ${OPENAL_LIBRARY}
+- ${FAUDIO_LIBS}
+- ${EXTRA_X11_LIBS}
++ ${VBAM_LIBS}
+ )
+
+ if(ENABLE_FFMPEG)
+ join("${FFMPEG_LDFLAGS}" " " FFMPEG_LDFLAGS_STR)
+
++ target_link_libraries(
++ visualboyadvance-m
++ ${FFMPEG_LIBRARIES}
++ )
++
+ set_target_properties(
+ visualboyadvance-m
+ PROPERTIES LINK_FLAGS ${FFMPEG_LDFLAGS_STR}
+--
+2.24.0
+
diff --git a/games-emulation/vbam/vbam-2.1.4.ebuild b/games-emulation/vbam/vbam-2.1.4.ebuild
new file mode 100644
index 000000000000..a8a2590c1f1e
--- /dev/null
+++ b/games-emulation/vbam/vbam-2.1.4.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+WX_GTK_VER="3.0-gtk3"
+inherit wxwidgets xdg cmake-utils
+
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/visualboyadvance-m/visualboyadvance-m.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/visualboyadvance-m/visualboyadvance-m/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+ S="${WORKDIR}/visualboyadvance-m-${PV}"
+fi
+
+DESCRIPTION="Game Boy, GBC, and GBA emulator forked from VisualBoyAdvance"
+HOMEPAGE="https://github.com/visualboyadvance-m/visualboyadvance-m"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="ffmpeg link lirc nls openal +sdl wxwidgets"
+REQUIRED_USE="openal? ( wxwidgets ) || ( sdl wxwidgets )"
+
+RDEPEND="
+ >=media-libs/libpng-1.4:0=
+ media-libs/libsdl2[joystick]
+ link? ( >=media-libs/libsfml-2.0:= )
+ sys-libs/zlib:=
+ virtual/glu
+ virtual/opengl
+ ffmpeg? ( =media-video/ffmpeg-3*:= )
+ lirc? ( app-misc/lirc )
+ nls? ( virtual/libintl )
+ wxwidgets? (
+ openal? ( media-libs/openal )
+ x11-libs/wxGTK:${WX_GTK_VER}[X,opengl]
+ )"
+DEPEND="${RDEPEND}
+ app-arch/zip
+ wxwidgets? ( virtual/imagemagick-tools )
+ x86? ( || ( dev-lang/nasm dev-lang/yasm ) )
+ nls? ( sys-devel/gettext )
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-cmake_fix.patch
+)
+
+src_configure() {
+ use wxwidgets && setup-wxwidgets
+ local mycmakeargs=(
+ -DENABLE_FFMPEG=$(usex ffmpeg)
+ -DENABLE_LINK=$(usex link)
+ -DENABLE_LIRC=$(usex lirc)
+ -DENABLE_NLS=$(usex nls)
+ -DENABLE_OPENAL=$(usex openal)
+ -DENABLE_SDL=$(usex sdl)
+ -DENABLE_WX=$(usex wxwidgets)
+ -DENABLE_ASM_CORE=$(usex x86)
+ -DENABLE_ASM_SCALERS=$(usex x86)
+ -DCMAKE_SKIP_RPATH=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if use sdl ; then
+ dodoc doc/ReadMe.SDL.txt
+ doman src/debian/vbam.6
+ fi
+ use wxwidgets && doman src/debian/visualboyadvance-m.6
+}
+
+pkg_preinst() {
+ if use wxwidgets ; then
+ xdg_pkg_preinst
+ fi
+}
+
+pkg_postinst() {
+ if use wxwidgets ; then
+ xdg_pkg_postinst
+ fi
+}
+
+pkg_postrm() {
+ if use wxwidgets ; then
+ xdg_pkg_postrm
+ fi
+}