forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information
Showing
2 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |