summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2021-07-18 04:36:23 -0400
committerIonen Wolkens <ionen@gentoo.org>2021-07-18 05:34:17 -0400
commitde5530983b6c1e7fa9bbaade0d924671123c1466 (patch)
tree5941c170249f10cbc46bea99b7fbc9b592b583c8 /games-rpg
parentgames-rpg/openglad: add github remote-id (diff)
downloadgentoo-de5530983b6c1e7fa9bbaade0d924671123c1466.tar.gz
gentoo-de5530983b6c1e7fa9bbaade0d924671123c1466.tar.bz2
gentoo-de5530983b6c1e7fa9bbaade0d924671123c1466.zip
games-rpg/openglad: add 0.98_p20200907 snapshot
openglad-0.98 dates back to 2003, is prone to segfaults, and stuck on SDL1. With no release in sight, use snapshot of seemingly stable SDL2 version. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-rpg')
-rw-r--r--games-rpg/openglad/Manifest1
-rw-r--r--games-rpg/openglad/openglad-0.98_p20200907.ebuild73
2 files changed, 74 insertions, 0 deletions
diff --git a/games-rpg/openglad/Manifest b/games-rpg/openglad/Manifest
index cf749afecb06..031d8ed8b48f 100644
--- a/games-rpg/openglad/Manifest
+++ b/games-rpg/openglad/Manifest
@@ -1,2 +1,3 @@
DIST openglad-0.98.tar.gz 724106 BLAKE2B 6cd9df5fd260af9902997bc0708c8285e48081e52fff7af05f432ae94f2f6fdbfba162c664ac4f531796a0372f1be3be064843dad75163e68b7e324b9b6d506d SHA512 3f9165fbf8fff081a862bfe81401a3b2ac227da58b84409beee8b0441f88b1a6deb3d24a1af6e71bd3a3484fc90de5574950fd54be82d837021a07f06302f0e1
+DIST openglad-0.98_p20200907.tar.gz 2060013 BLAKE2B 5ea16c0ab13e45f1723ceb0b4167fcbf5863d040e1fc54cd27fa59df14200f84e0e22c0cba87f9ad3294a90850d5b36199cba8e78804d1994fb2dea6ea493fff SHA512 b3bf582a780d90408fc585b28418f462602ec35434c018d6315fb8b119b34cb0dceabcd6b5a6450ba6beb2ab5dc931d6e21ecf46e76853c7f5051c9b3be9014c
DIST openglad.png 5593 BLAKE2B 1fbc5a32861dc4cc5bb4aae4b1b42e92411756618ccfa4172e1494c4f98eb527f6bd36273a250cd7ce721baa76ba80548d75ec1e89b3da134c78d0a7b415b6bd SHA512 27419fcbbbf8640718968304a4824101860736c2091f494defcd111b5cc252856b5373c0e7a2bca1c79f9c7551012b0ba04577f9ed97769e436637ee25f5caeb
diff --git a/games-rpg/openglad/openglad-0.98_p20200907.ebuild b/games-rpg/openglad/openglad-0.98_p20200907.ebuild
new file mode 100644
index 000000000000..132a5ea39795
--- /dev/null
+++ b/games-rpg/openglad/openglad-0.98_p20200907.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop flag-o-matic toolchain-funcs
+
+MY_COMMIT="80e33b15cfa6d7d288b4b3db4dcca0349f13691f"
+
+DESCRIPTION="SDL clone of Gladiator, a classic RPG game"
+HOMEPAGE="http://snowstorm.sourceforge.net/"
+SRC_URI="
+ https://github.com/openglad/openglad/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz
+ mirror://gentoo/${PN}.png"
+S="${WORKDIR}/${PN}-${MY_COMMIT}"
+
+LICENSE="Boost-1.0 GPL-2+ ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ dev-libs/libyaml
+ dev-libs/libzip:=
+ media-libs/libpng:=
+ media-libs/libsdl2[joystick,opengl,sound,video]
+ media-libs/sdl2-mixer"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-util/premake:4
+ virtual/pkgconfig"
+
+src_prepare() {
+ default
+
+ # game uses the binary's location for assets even with a wrapper
+ sed -e '/^std::string get_asset_path/!b;n' \
+ -e "a\\return \"${EPREFIX}/usr/share/${PN}/\";" \
+ -i src/io.cpp || die
+
+ # unbundle (delete + add to pkg-config below is enough)
+ # physfs: need missing physfsrwops.h matching system's to unbundle
+ rm -r src/external/{libyaml,libzip} || die
+
+ # cleanup not to install
+ rm sound/Makefile.am || die
+}
+
+src_configure() {
+ # premake4.lua assumes a lot (e.g. no SDL2 include path), check ourselves
+ local pkgs=( SDL2_mixer libpng libzip sdl2 yaml-0.1 )
+ append-cppflags $($(tc-getPKG_CONFIG) --cflags "${pkgs[@]}" || die)
+ append-libs $($(tc-getPKG_CONFIG) --libs "${pkgs[@]}" || die)
+
+ premake4 gmake || die
+}
+
+src_compile() {
+ emake verbose=y ARCH= CC="$(tc-getCC)" CXX="$(tc-getCXX)" LIBS="${LIBS}"
+}
+
+src_install() {
+ dobin ${PN}
+
+ insinto /usr/share/${PN}
+ doins -r builtin cfg extra_campaigns pix sound
+ # note: extra_campaigns not directly used, but users may want them
+
+ dodoc {cheats,classes,scen}.txt
+ einstalldocs
+
+ doicon "${DISTDIR}"/${PN}.png
+ make_desktop_entry openglad Openglad
+}