mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-16 14:29:05 -07:00
games-arcade/jvgs: add 0.5.1
Closes: https://bugs.gentoo.org/775182 Signed-off-by: Michael Mair-Keimberger <mmk@levelnine.at> Closes: https://github.com/gentoo/gentoo/pull/39846 Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
This commit is contained in:
committed by
Conrad Kostecki
parent
9a9fe589ea
commit
1c5dd02604
@@ -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
|
||||
|
||||
32
games-arcade/jvgs/files/jvgs-0.5-path.patch
Normal file
32
games-arcade/jvgs/files/jvgs-0.5-path.patch
Normal file
@@ -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);
|
||||
60
games-arcade/jvgs/jvgs-0.5.1.ebuild
Normal file
60
games-arcade/jvgs/jvgs-0.5.1.ebuild
Normal file
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user