summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2017-11-18 23:12:33 +0100
committerDavid Seifert <soap@gentoo.org>2017-11-19 10:11:57 +0100
commitbb5563b8c08a584d4e186027eba7469aa5c89ac0 (patch)
tree83c7212bab5eaf0eafd4779c93bf4f055ce20577 /games-arcade
parentmedia-libs/portmidi: [QA] Add cmake-utils_src_prepare (diff)
downloadgentoo-bb5563b8c08a584d4e186027eba7469aa5c89ac0.tar.gz
gentoo-bb5563b8c08a584d4e186027eba7469aa5c89ac0.tar.bz2
gentoo-bb5563b8c08a584d4e186027eba7469aa5c89ac0.zip
games-arcade/jvgs: Update to EAPI 6
* Remove games.eclass * Allow out-of-source building Closes: https://bugs.gentoo.org/636820 Package-Manager: Portage-2.3.14, Repoman-2.3.6
Diffstat (limited to 'games-arcade')
-rw-r--r--games-arcade/jvgs/files/jvgs-0.5-fix-build-system.patch43
-rw-r--r--games-arcade/jvgs/jvgs-0.5-r1.ebuild39
2 files changed, 82 insertions, 0 deletions
diff --git a/games-arcade/jvgs/files/jvgs-0.5-fix-build-system.patch b/games-arcade/jvgs/files/jvgs-0.5-fix-build-system.patch
new file mode 100644
index 000000000000..5f5ba191bb7e
--- /dev/null
+++ b/games-arcade/jvgs/files/jvgs-0.5-fix-build-system.patch
@@ -0,0 +1,43 @@
+* Respect user CXXFLAGS
+* Build out-of-source
+
+--- a/src/bind/CMakeLists.txt
++++ b/src/bind/CMakeLists.txt
+@@ -1,16 +1,25 @@
+-ADD_CUSTOM_TARGET(
+- swig
+- ${SWIG_EXECUTABLE} -lua -c++ -o ${JVGS_BINARY_DIR}/src/bind/jvgslua.cpp ${JVGS_BINARY_DIR}/src/bind/jvgslua.i
++ADD_CUSTOM_COMMAND(
++ OUTPUT
++ ${CMAKE_CURRENT_BINARY_DIR}/jvgslua.cpp
++ COMMAND
++ ${SWIG_EXECUTABLE} -lua -c++ -o ${CMAKE_CURRENT_BINARY_DIR}/jvgslua.cpp ${CMAKE_CURRENT_SOURCE_DIR}/jvgslua.i
++ VERBATIM
+ )
+
+ ADD_LIBRARY(
+ bind STATIC
+- jvgslua.cpp
++ ${CMAKE_CURRENT_BINARY_DIR}/jvgslua.cpp
+ ScriptManager.cpp
+ )
+
+ ADD_DEPENDENCIES( bind swig )
+
++TARGET_INCLUDE_DIRECTORIES(
++ bind
++ PRIVATE
++ ${CMAKE_CURRENT_SOURCE_DIR}
++)
++
+ TARGET_LINK_LIBRARIES(
+ bind
+ ${LUA_LIBRARIES}
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-SET( CMAKE_CXX_FLAGS "-DTIXML_USE_STL -ggdb" )
++SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTIXML_USE_STL" )
+
+ INCLUDE_DIRECTORIES(
+ ${SDL_INCLUDE_DIR}
diff --git a/games-arcade/jvgs/jvgs-0.5-r1.ebuild b/games-arcade/jvgs/jvgs-0.5-r1.ebuild
new file mode 100644
index 000000000000..779b57dd7400
--- /dev/null
+++ b/games-arcade/jvgs/jvgs-0.5-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils eutils
+
+DESCRIPTION="An open-source platform game with a sketched and minimalistic look"
+HOMEPAGE="http://jvgs.sourceforge.net/"
+SRC_URI="mirror://sourceforge/jvgs/${P}-src.tar.gz"
+
+LICENSE="WTFPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ dev-lang/lua:0
+ media-libs/libsdl[video]
+ media-libs/sdl-mixer[vorbis]
+ media-libs/freetype:2
+ sys-libs/zlib:=
+ virtual/opengl"
+DEPEND="${RDEPEND}
+ dev-lang/swig"
+
+S=${WORKDIR}/${P}-src
+PATCHES=( "${FILESDIR}"/${PN}-0.5-fix-build-system.patch )
+
+src_install() {
+ dobin src/${PN}
+
+ insinto /usr/share/${PN}
+ doins -r main.lua resources
+
+ newicon resources/drawing.svg ${PN}.svg
+ make_desktop_entry ${PN} ${PN}
+
+ einstalldocs
+}