From bb5563b8c08a584d4e186027eba7469aa5c89ac0 Mon Sep 17 00:00:00 2001 From: David Seifert Date: Sat, 18 Nov 2017 23:12:33 +0100 Subject: 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 --- .../jvgs/files/jvgs-0.5-fix-build-system.patch | 43 ++++++++++++++++++++++ games-arcade/jvgs/jvgs-0.5-r1.ebuild | 39 ++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 games-arcade/jvgs/files/jvgs-0.5-fix-build-system.patch create mode 100644 games-arcade/jvgs/jvgs-0.5-r1.ebuild 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 +} -- cgit v1.2.3-65-gdbad