summaryrefslogtreecommitdiff
path: root/games-engines/gargoyle
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-03-03 10:28:17 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-03-03 10:28:17 +0000
commitd99093fb4bb5652015c06274d64083daa2439e4f (patch)
treecf61513204d97974179580065e85df5c8009087c /games-engines/gargoyle
parent463397cf1e064185110fe57c568d73f99a06f5d1 (diff)
gentoo resync : 03.03.2021
Diffstat (limited to 'games-engines/gargoyle')
-rw-r--r--games-engines/gargoyle/Manifest6
-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, 294 insertions, 2 deletions
diff --git a/games-engines/gargoyle/Manifest b/games-engines/gargoyle/Manifest
index 44fcb1627a6a..ba384f5fd5aa 100644
--- a/games-engines/gargoyle/Manifest
+++ b/games-engines/gargoyle/Manifest
@@ -1,4 +1,8 @@
AUX gargoyle-2011.1-desktopfile.patch 1265 BLAKE2B 1fcbc1eded032ef11ef357e03c614067b18c21a268b4a3bebe4516a0ed196660292b311c9769d66853ffbbf2535808d014991bd42155919b913965223a4523dc SHA512 ed31bc711b52b5d231f130956d7d07cb9080747e6d53c85b379aa413582f8e4ffe825298bc86180ec7d1eadff5e6bffc6e49b3ff7a2607f612dcf81a6c1af22e
+AUX gargoyle-2019.1.1-QA-desktop.patch 575 BLAKE2B cce93727f67123cfe2b51003f11e1e61eff08cf3444aa7e07c174b332f5b060bc88f32ddc592ba9011ac19d8db264c883bbc0d559a8eb0107190c8ec1323cd24 SHA512 95a796e74edc7e40fe93359c069423c34129b4f21077d8af009eb9ba87427aeea92717fc20530ad3c2df657241f9e6a703c860c3c20d9025a4cb374a932ddb44
+AUX gargoyle-2019.1.1-fno-common.patch 4214 BLAKE2B b7ad557f850ef719dd946a33f8878307d6480fea4858cb4638e3ae3074730af157d8dca8ad744c19e22ad144d319bb3bc4f48adeecb08bb3e8455f8ad1130b86 SHA512 57edc11c3403930009ccfa7d583b1553bcc1f4cd5f9d5ae455c48dc24d9bf9b0328d4cb0dad59b1791fcd9d5dfadfe94fdad6af6d514abfd50de8e054edc5b36
DIST gargoyle-2011.1-sources.zip 11291660 BLAKE2B aac47c41bd02e772c4717dfdeae8678105f72704641ea3df39105d412afe61734cc43f863b9556e38ea34287259df9f4d72ae93b3092d0372434b9f59f99483d SHA512 65159580cf3494944f841c44320135580557258e37ad5523ae3ea30555c19834a2793231a8e42c217e5c1d055d50ed6a20d372d6302e880a2818bc4ea59b226f
+DIST gargoyle-2019.1.1.tar.gz 14700448 BLAKE2B b5e6d43349d01fe3484abc7779cfe3f1e94c3f6d647d338f8acbfe97d160da53b6297273e67f84eb0409623bbb4c0d8e3008d42b16a800d756be71a02538969a SHA512 0d1f2724bd6227142eb67c146557a992a6d62af172398c9961511ce5c080e517d1e12ca9bc6be27c1893e404026256257bf3a04cb05923723c0886f111adc4e3
EBUILD gargoyle-2011.1-r1.ebuild 3017 BLAKE2B 12371e41ca78403ba1452da2a2c5dbac287912b8dbcd7afe524984b8442bb4cf5701f3073f27a64c5adadccfebfaaef9e543b883026b4eae4b185cc151eac6b7 SHA512 0daa2b0ef761c935d0e7d47fd42060ebf5db4331634bba8e1812a619d8fb31cdb0f2aec197cf7d30e1bff357ccd60888ac5107c7e9644f8ddeed9520a9b1ac9e
-MISC metadata.xml 329 BLAKE2B cc77f8750b5385687d311159b8edbf296284013812d4be5fe0076468c02758dcac19c77b5e6f38c4fbdac51f1c69b34cfd39d5d19235d18ec80076ceba98e2b3 SHA512 f6b913db889e2434a76d61526ff2cf3f719322991bb26891ac0383fcb8f11cf69cfc895a7cddd35074c2dee9a5ceac0fd8c0172542401d302ec39e9cac180b2c
+EBUILD gargoyle-2019.1.1.ebuild 2989 BLAKE2B 7712b3e50dacac2367255255c397efa8464926c11818d0107ccca1a508b5e5d042876d9c8d2b5945a72a5e4f991aec3489691a43a3e3177c2b6204cfe7062c93 SHA512 1e99de443969ce19b920a88d0804678413ff100b7e10b87820e11e342d9eb4ca8d4450c0f7b26c3ac78e311f485e7df927e1860117245a5ecf2f511890141366
+MISC metadata.xml 331 BLAKE2B d9f9a1a7d19b6e1a3dba3dffa81ac1c2518a4d942eaf65dc782f7dc7b0082adb67323ad4a07eb51bfe4f87f8f0ead0e1881d8b52dcd674979fb02b3e3c95fcb1 SHA512 3ef20c56a0d8d2faa87531fe4049f045840a629e3994fa4b90f6ba2c30629747a64fa372fc37ab77df74656823cc3e09ba809c6cc0c1e7c96ace482c75daf712
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..167f28407813
--- /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}"
+BDEPEND="
+ 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>