commit: 1c5dd02604ecf4615dc0f5deb1a7c1fde502614e Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at> AuthorDate: Thu Dec 26 12:33:28 2024 +0000 Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> CommitDate: Thu Jan 2 00:11:38 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c5dd026
games-arcade/jvgs: add 0.5.1 Closes: https://bugs.gentoo.org/775182 Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at> Closes: https://github.com/gentoo/gentoo/pull/39846 Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> games-arcade/jvgs/Manifest | 1 + games-arcade/jvgs/files/jvgs-0.5-path.patch | 32 +++++++++++++++ games-arcade/jvgs/jvgs-0.5.1.ebuild | 60 +++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+) diff --git a/games-arcade/jvgs/Manifest b/games-arcade/jvgs/Manifest index 09541dc37621..348533cf5720 100644 --- a/games-arcade/jvgs/Manifest +++ b/games-arcade/jvgs/Manifest @@ -1 +1,2 @@ DIST jvgs-0.5-src.tar.gz 25917861 BLAKE2B 8b7716a16cd7dfdb3f8f7eb2292a121b142a4487f8fb58d046db81cc579b61b3db56728f5ecef8272ec74d8cf898da5c3ee12fa7c492fd219de977ea37bc9ee9 SHA512 0a0a8e7a0e7dce6f61bcd328f579212115eb95e3dce8ca223c1d8a3432d9083bf9a313f02f46b799991aa32f10cb9c14e8ecb63a4578b1ffaabc374ba139b28d +DIST jvgs-0.5.1-src.tar.gz 25932185 BLAKE2B 317e1005fd6107c6ef9ddd9d5614df0e889d4f7a529b39a2b00bb1d6ec81d6cfe101af31b7b17873ea224b28148c9c19eb2618f194a12b6ca5b4b7fc5c9f97d4 SHA512 f1a9cb96a1a40f1a27fced0aa1809c06d4fef79d88508d1503bfa3e35f58255673d900ea4f8902b65b3fa63c029423b622e96b14c9aa71e5825c907a4b59e1af diff --git a/games-arcade/jvgs/files/jvgs-0.5-path.patch b/games-arcade/jvgs/files/jvgs-0.5-path.patch new file mode 100644 index 000000000000..30e5cf8cdb97 --- /dev/null +++ b/games-arcade/jvgs/files/jvgs-0.5-path.patch @@ -0,0 +1,32 @@ +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -6,6 +6,7 @@ + + #include <string> + using namespace std; ++#include <unistd.h> + + /* Needed on windows to link main with SDLmain. */ + #include <SDL/SDL.h> +@@ -20,9 +21,20 @@ + + if(argc < 2) { + /* Some default. */ ++ chdir("/usr/share/jvgs/"); + fileName = "main.lua"; + } else { +- fileName = argv[1]; ++ char *pos; ++ pos = strrchr(argv[1],'/'); ++ if(pos) { ++ *pos='\0'; ++ pos++; ++ chdir(argv[1]); ++ fileName=pos; ++ } ++ else { ++ fileName = argv[1]; ++ } + } + + scriptManager->runScript(fileName); diff --git a/games-arcade/jvgs/jvgs-0.5.1.ebuild b/games-arcade/jvgs/jvgs-0.5.1.ebuild new file mode 100644 index 000000000000..1268a12b2be5 --- /dev/null +++ b/games-arcade/jvgs/jvgs-0.5.1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-1 ) + +inherit cmake desktop lua-single + +DESCRIPTION="Open-source platform game with a sketched and minimalistic look" +HOMEPAGE="https://jvgs.sourceforge.net/" +SRC_URI="https://downloads.sourceforge.net/jvgs/${P}-src.tar.gz" +S="${WORKDIR}/${P}-src" + +LICENSE="WTFPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +REQUIRED_USE="${LUA_REQUIRED_USE}" + +RDEPEND="${LUA_DEPS} + dev-libs/tinyxml[stl] + media-libs/libsdl[video] + media-libs/sdl-mixer[vorbis] + media-libs/freetype:2 + sys-libs/zlib:= + x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + x11-libs/libXext + virtual/opengl + virtual/glu +" +DEPEND="${RDEPEND}" +BDEPEND="dev-lang/swig" + +PATCHES=( + "${FILESDIR}"/${PN}-0.5-fix-build-system.patch + "${FILESDIR}"/${PN}-0.5-unbundle-tinyxml.patch + "${FILESDIR}"/${PN}-0.5-path.patch +) + +src_prepare() { + # Make sure we don't use bundled copy + rm -r src/tinyxml/ || die + + cmake_src_prepare +} + +src_install() { + dobin "${BUILD_DIR}"/src/${PN} + + insinto /usr/share/${PN} + doins -r main.lua resources + + newicon resources/drawing.svg ${PN}.svg + make_desktop_entry ${PN} ${PN} + + einstalldocs +}
