summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolic <jakov.smolic@sartura.hr>2021-02-20 20:31:11 +0100
committerDavid Seifert <soap@gentoo.org>2021-02-20 20:31:11 +0100
commit0eb5945523b372ac326be69382e32d067358486b (patch)
tree62e2e3fd872944b85a847b2a2dffce915417192e /games-engines/gargoyle
parentgames-emulation/pcsxr: Apply gcc-10 workaround (diff)
downloadgentoo-0eb5945523b372ac326be69382e32d067358486b.tar.gz
gentoo-0eb5945523b372ac326be69382e32d067358486b.tar.bz2
gentoo-0eb5945523b372ac326be69382e32d067358486b.zip
games-engines/gargoyle: Bump to 2019.1.1
* Fix build with gcc-10 Closes: https://bugs.gentoo.org/750404 Bug: https://bugs.gentoo.org/739206 Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr> Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'games-engines/gargoyle')
-rw-r--r--games-engines/gargoyle/Manifest1
-rw-r--r--games-engines/gargoyle/files/gargoyle-2019.1.1-QA-desktop.patch11
-rw-r--r--games-engines/gargoyle/files/gargoyle-2019.1.1-fno-common.patch168
-rw-r--r--games-engines/gargoyle/gargoyle-2019.1.1.ebuild109
-rw-r--r--games-engines/gargoyle/metadata.xml2
5 files changed, 290 insertions, 1 deletions
diff --git a/games-engines/gargoyle/Manifest b/games-engines/gargoyle/Manifest
index 1be9eb20f805..63d013dc8748 100644
--- a/games-engines/gargoyle/Manifest
+++ b/games-engines/gargoyle/Manifest
@@ -1 +1,2 @@
DIST gargoyle-2011.1-sources.zip 11291660 BLAKE2B aac47c41bd02e772c4717dfdeae8678105f72704641ea3df39105d412afe61734cc43f863b9556e38ea34287259df9f4d72ae93b3092d0372434b9f59f99483d SHA512 65159580cf3494944f841c44320135580557258e37ad5523ae3ea30555c19834a2793231a8e42c217e5c1d055d50ed6a20d372d6302e880a2818bc4ea59b226f
+DIST gargoyle-2019.1.1.tar.gz 14700448 BLAKE2B b5e6d43349d01fe3484abc7779cfe3f1e94c3f6d647d338f8acbfe97d160da53b6297273e67f84eb0409623bbb4c0d8e3008d42b16a800d756be71a02538969a SHA512 0d1f2724bd6227142eb67c146557a992a6d62af172398c9961511ce5c080e517d1e12ca9bc6be27c1893e404026256257bf3a04cb05923723c0886f111adc4e3
diff --git a/games-engines/gargoyle/files/gargoyle-2019.1.1-QA-desktop.patch b/games-engines/gargoyle/files/gargoyle-2019.1.1-QA-desktop.patch
new file mode 100644
index 000000000000..be4667e3908e
--- /dev/null
+++ b/games-engines/gargoyle/files/gargoyle-2019.1.1-QA-desktop.patch
@@ -0,0 +1,11 @@
+--- a/garglk/gargoyle.desktop
++++ b/garglk/gargoyle.desktop
+@@ -4,7 +4,7 @@ Type=Application
+ Name=Gargoyle
+ GenericName=Interactive Fiction interpreter
+ Comment=Interactive Fiction multi-interpreter that supports all major IF formats
+-Icon=gargoyle-house.png
++Icon=gargoyle-house
+ Exec=gargoyle
+ Categories=Game;
+ MimeType=application/x-adrift;application/x-advsys;application/x-agt;application/x-alan;application/x-blorb;application/x-glulx;application/x-hugo;application/x-level9;application/x-magscroll;application/x-tads;application/x-t3vm-image;application/x-zmachine;
diff --git a/games-engines/gargoyle/files/gargoyle-2019.1.1-fno-common.patch b/games-engines/gargoyle/files/gargoyle-2019.1.1-fno-common.patch
new file mode 100644
index 000000000000..50870a03e371
--- /dev/null
+++ b/games-engines/gargoyle/files/gargoyle-2019.1.1-fno-common.patch
@@ -0,0 +1,168 @@
+Author: Chris Spiegel <cspiegel@gmail.com>
+Taken from: https://sources.debian.org/patches/gargoyle-free/2019.1.1-2/gcc-10.patch/
+--- a/garglk/launcher.c
++++ b/garglk/launcher.c
+@@ -48,10 +48,10 @@
+ #define ID_GLUL (giblorb_make_id('G','L','U','L'))
+
+ #define MaxBuffer 1024
+-char tmp[MaxBuffer];
+-char terp[MaxBuffer];
+-char exe[MaxBuffer];
+-char flags[MaxBuffer];
++static char tmp[MaxBuffer];
++static char terp[MaxBuffer];
++static char exe[MaxBuffer];
++static char flags[MaxBuffer];
+
+ int runblorb(char *path, char *game)
+ {
+--- a/garglk/launchgtk.c
++++ b/garglk/launchgtk.c
+@@ -41,9 +41,9 @@ static const char * AppName = "Gargoyle " VERSION;
+ static const char * LaunchingTemplate = "%s/%s";
+ static const char * DirSeparator = "/";
+
+-char dir[MaxBuffer];
+-char buf[MaxBuffer];
+-char tmp[MaxBuffer];
++static char dir[MaxBuffer];
++static char buf[MaxBuffer];
++static char tmp[MaxBuffer];
+
+ struct filter
+ {
+--- a/garglk/launchmac.m
++++ b/garglk/launchmac.m
+@@ -40,13 +40,13 @@
+ static const char * LaunchingTemplate = "%s/%s";
+ static const char * DirSeparator = "/";
+
+-char dir[MaxBuffer];
+-char buf[MaxBuffer];
+-char tmp[MaxBuffer];
+-char etc[MaxBuffer];
++static char dir[MaxBuffer];
++static char buf[MaxBuffer];
++static char tmp[MaxBuffer];
++static char etc[MaxBuffer];
+
+ enum FILEFILTERS { FILTER_SAVE, FILTER_TEXT, FILTER_ALL };
+-char *winfilters[] =
++static char *winfilters[] =
+ {
+ "sav",
+ "txt",
+--- a/garglk/launchwin.c
++++ b/garglk/launchwin.c
+@@ -33,11 +33,11 @@ static const char * AppName = "Gargoyle " VERSION;
+ static const char * LaunchingTemplate = "\"%s\\%s.exe\" %s \"%s\"";
+ static const char * DirSeparator = "\\";
+
+-char dir[MaxBuffer];
+-char buf[MaxBuffer];
+-char tmp[MaxBuffer];
++static char dir[MaxBuffer];
++static char buf[MaxBuffer];
++static char tmp[MaxBuffer];
+
+-char filterlist[] =
++static char filterlist[] =
+ "All Games\0*.taf;*.agx;*.d$$;*.acd;*.a3c;*.asl;*.cas;*.ulx;*.hex;*.jacl;*.j2;*.gam;*.t3;*.z?;*.l9;*.sna;*.mag;*.dat;*.saga;*.blb;*.glb;*.zlb;*.blorb;*.gblorb;*.zblorb\0"
+ "Adrift Games (*.taf)\0*.taf\0"
+ "AdvSys Games (*.dat)\0*.dat\0"
+@@ -65,7 +65,7 @@ void winmsg(const char *msg)
+ MessageBox(NULL, msg, AppName, MB_ICONERROR);
+ }
+
+-int urldecode(char *decoded, unsigned int maxlen, const char *encoded)
++static int urldecode(char *decoded, unsigned int maxlen, const char *encoded)
+ {
+ unsigned int i;
+ int convert, ascii;
+
+--- a/terps/alan2/glkio.h
++++ b/terps/alan2/glkio.h
+@@ -11,8 +11,8 @@
+
+ #include "glk.h"
+
+-winid_t glkMainWin;
+-winid_t glkStatusWin;
++extern winid_t glkMainWin;
++extern winid_t glkStatusWin;
+
+ /* NB: this header must be included in any file which calls printf() */
+
+--- a/terps/alan2/main.c
++++ b/terps/alan2/main.c
+@@ -43,6 +43,9 @@
+
+ /* PUBLIC DATA */
+
++winid_t glkMainWin;
++winid_t glkStatusWin;
++
+ /* The Amachine memory */
+ Aword *memory;
+ static AcdHdr dummyHeader; /* Dummy to use until memory allocated */
+--- a/terps/alan3/glkio.h
++++ b/terps/alan3/glkio.h
+@@ -11,8 +11,8 @@
+
+ #include "glk.h"
+
+-winid_t glkMainWin;
+-winid_t glkStatusWin;
++static winid_t glkMainWin;
++static winid_t glkStatusWin;
+
+ /* NB: this header must be included in any file which calls printf() */
+
+--- a/terps/alan3/output.h
++++ b/terps/alan3/output.h
+@@ -22,9 +22,9 @@ extern bool capitalize;
+ /* Log file */
+ #ifdef HAVE_GLK
+ #include "glk.h"
+-strid_t logFile;
++extern strid_t logFile;
+ #else
+-FILE *logFile;
++extern FILE *logFile;
+ #endif
+
+
+--- a/terps/alan3/term.h
++++ b/terps/alan3/term.h
+@@ -10,7 +10,7 @@
+
+
+ /* DATA */
+-bool onStatusLine;
++extern bool onStatusLine;
+
+
+ /* FUNCTIONS */
+--- a/terps/jacl/glk_startup.c
++++ b/terps/jacl/glk_startup.c
+@@ -31,7 +31,7 @@ extern short int release;
+ glkunix_startup_t *arguments;
+
+ /* THE STREAM FOR OPENING UP THE ARCHIVE CONTAINING GRAPHICS AND SOUND */
+-strid_t blorb_stream;
++extern strid_t blorb_stream;
+
+ /* PROTOTYPE FOR NEEDED UTILITY FUNCTION */
+ void create_paths();
+--- a/terps/jacl/parser.c
++++ b/terps/jacl/parser.c
+@@ -62,7 +62,7 @@ char *from_word;
+
+ int object_expected = FALSE;
+
+-char default_function[84];
++extern char default_function[84];
+ char object_name[84];
+
+ char base_function[84];
diff --git a/games-engines/gargoyle/gargoyle-2019.1.1.ebuild b/games-engines/gargoyle/gargoyle-2019.1.1.ebuild
new file mode 100644
index 000000000000..cfd146901b63
--- /dev/null
+++ b/games-engines/gargoyle/gargoyle-2019.1.1.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Regarding licenses: libgarglk is licensed under the GPLv2. Bundled
+# interpreters are licensed under GPLv2, BSD or MIT license, except:
+# - glulxe: custom license, see "terps/glulxle/README"
+# - hugo: custom license, see "licenses/HUGO License.txt"
+# Since we don't compile or install any of the bundled fonts, their licenses
+# don't apply. (Fonts are installed through dependencies instead.)
+
+EAPI=7
+
+inherit desktop edos2unix flag-o-matic multiprocessing toolchain-funcs xdg
+
+DESCRIPTION="An Interactive Fiction (IF) player supporting all major formats"
+HOMEPAGE="http://ccxvii.net/gargoyle/"
+SRC_URI="https://github.com/garglk/garglk/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD GPL-2 MIT Hugo Glulxe"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ media-fonts/libertine
+ media-fonts/liberation-fonts
+ media-libs/freetype:2
+ media-libs/libpng:0
+ media-libs/sdl-mixer
+ media-libs/sdl-sound[modplug,mp3,vorbis]
+ sys-libs/zlib
+ virtual/jpeg:0
+ x11-libs/gtk+:2"
+DEPEND="${RDEPEND}"
+BDEPEBD="
+ app-arch/unzip
+ dev-util/ftjam
+ virtual/pkgconfig"
+
+S="${WORKDIR}/garglk-${PV}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fno-common.patch
+ "${FILESDIR}"/${P}-QA-desktop.patch
+)
+
+src_prepare() {
+ default
+ # Substitute custom CFLAGS/LDFLAGS.
+ sed -i -e \
+ "/^\s*OPTIM = / {
+ s/ \(-O.*\)\? ;/ ;/
+ a LINKFLAGS = ${LDFLAGS} ;
+ a SHRLINKFLAGS = ${LDFLAGS} ;
+ }" Jamrules || die
+
+ # Don't link against libraries used indirectly through SDL_sound.
+ sed -i -e "/GARGLKLIBS/s/-lsmpeg -lvorbisfile//g" Jamrules || die
+
+ # Convert garglk.ini to UNIX format.
+ edos2unix garglk/garglk.ini
+
+ append-cflags -std=gnu89 # build with gcc5 (bug #573378)
+ append-cxxflags -std=gnu++11 # code assumes C++11 semantics (bug #642996)
+}
+
+src_compile() {
+ # build system messes up flags and toolchain completely
+ # append flags to compiler commands to have consistent behavior
+ jam \
+ -sAR="$(tc-getAR) cru" \
+ -sCC="$(tc-getCC) ${CFLAGS}" \
+ -sCCFLAGS="" \
+ -sC++="$(tc-getCXX) ${CXXFLAGS}" \
+ -sCXX="$(tc-getCXX) ${CXXFLAGS}" \
+ -sC++FLAGS="" \
+ -sGARGLKINI="/etc/garglk.ini" \
+ -sUSESDL=yes \
+ -sBUNDLEFONTS=no \
+ -dx \
+ -j$(makeopts_jobs) || die
+}
+
+src_install() {
+ DESTDIR="${D}" \
+ _BINDIR="${EPREFIX}/usr/libexec/${PN}" \
+ _APPDIR="${EPREFIX}/usr/libexec/${PN}" \
+ _LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ EXEMODE=755 \
+ FILEMODE=755 \
+ jam install || die
+
+ # Install config file.
+ insinto /etc
+ newins garglk/garglk.ini garglk.ini
+
+ # Install application entry and icon.
+ domenu garglk/${PN}.desktop
+ doicon -s 32 garglk/${PN}-house.png
+
+ # Symlink binaries to avoid name clashes.
+ local terp
+ for terp in advsys agility alan2 alan3 bocfel frotz geas git glulxe hugo jacl \
+ level9 magnetic nitfol scare scott tadsr; do
+ dosym ../libexec/${PN}/${terp} /usr/bin/${PN}-${terp}
+ done
+
+ # Also symlink the main binary since it resides in libexec.
+ dosym ../libexec/${PN}/${PN} /usr/bin/${PN}
+}
diff --git a/games-engines/gargoyle/metadata.xml b/games-engines/gargoyle/metadata.xml
index 6842fdda8f83..23812106384b 100644
--- a/games-engines/gargoyle/metadata.xml
+++ b/games-engines/gargoyle/metadata.xml
@@ -6,6 +6,6 @@
<name>Gentoo Games Project</name>
</maintainer>
<upstream>
- <remote-id type="google-code">garglk</remote-id>
+ <remote-id type="github">garglk/garglk</remote-id>
</upstream>
</pkgmetadata>