From 052aafb60214cbf224df6ae71dd16eec51f7dffc Mon Sep 17 00:00:00 2001 From: Nikos Chantziaras Date: Wed, 4 Jul 2018 20:03:20 +0300 Subject: games-engines/gargoyle: fix build on recent GCC, ebuild improvements Bumped EAPI, removed the use of games.eclass, fixed a runtime error due to a no longer needed sed, create relative instead of absolute symlinks. Revbump due to a file location change. Closes: https://bugs.gentoo.org/642996 Package-Manager: Portage-2.3.42, Repoman-2.3.9 Closes: https://github.com/gentoo/gentoo/pull/9052 Closes: https://bugs.gentoo.org/642996 --- games-engines/gargoyle/gargoyle-2011.1-r1.ebuild | 118 ++++++++++++++++++++++ games-engines/gargoyle/gargoyle-2011.1.ebuild | 123 ----------------------- 2 files changed, 118 insertions(+), 123 deletions(-) create mode 100644 games-engines/gargoyle/gargoyle-2011.1-r1.ebuild delete mode 100644 games-engines/gargoyle/gargoyle-2011.1.ebuild diff --git a/games-engines/gargoyle/gargoyle-2011.1-r1.ebuild b/games-engines/gargoyle/gargoyle-2011.1-r1.ebuild new file mode 100644 index 000000000000..82e11b237828 --- /dev/null +++ b/games-engines/gargoyle/gargoyle-2011.1-r1.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2018 Gentoo Foundation +# 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=6 +inherit eutils flag-o-matic gnome2-utils multilib multiprocessing toolchain-funcs + +DESCRIPTION="An Interactive Fiction (IF) player supporting all major formats" +HOMEPAGE="http://ccxvii.net/gargoyle/" +SRC_URI="https://garglk.googlecode.com/files/${P}-sources.zip" + +LICENSE="BSD GPL-2 MIT Hugo Glulxe" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +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} + app-arch/unzip + dev-util/ftjam + virtual/pkgconfig" + +S=${WORKDIR} + +src_prepare() { + # 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 + + epatch "${FILESDIR}"/${P}-desktopfile.patch + append-cflags -std=gnu89 # build with gcc5 (bug #573378) + append-cxxflags -std=gnu++11 # code assumes C++11 semantics (bug #642996) + default +} + +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="/usr/libexec/${PN}" \ + _APPDIR="/usr/libexec/${PN}" \ + _LIBDIR="/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. + for terp in advsys agility alan2 alan3 frotz geas git glulxe hugo jacl \ + level9 magnetic nitfol scare 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}" +} + +pkg_preinst() { + gnome2_icon_savelist +} + +pkg_postinst() { + gnome2_icon_cache_update +} + +pkg_postrm() { + gnome2_icon_cache_update +} diff --git a/games-engines/gargoyle/gargoyle-2011.1.ebuild b/games-engines/gargoyle/gargoyle-2011.1.ebuild deleted file mode 100644 index 640adac5fa7e..000000000000 --- a/games-engines/gargoyle/gargoyle-2011.1.ebuild +++ /dev/null @@ -1,123 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# 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=5 -inherit eutils flag-o-matic multiprocessing toolchain-funcs gnome2-utils games - -DESCRIPTION="An Interactive Fiction (IF) player supporting all major formats" -HOMEPAGE="http://ccxvii.net/gargoyle/" -SRC_URI="https://garglk.googlecode.com/files/${P}-sources.zip" - -LICENSE="BSD GPL-2 MIT Hugo Glulxe" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND=" - >=media-fonts/libertine-5 - 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} - app-arch/unzip - dev-util/ftjam - virtual/pkgconfig" - -S=${WORKDIR} - -src_prepare() { - # 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 - - # The font name of Linux Libertine changed in version 5. - sed -i -e 's/Linux Libertine O/Linux Libertine/g' garglk/garglk.ini || die - - epatch "${FILESDIR}"/${P}-desktopfile.patch - append-cflags -std=gnu89 # build with gcc5 (bug #573378) -} - -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="${GAMES_SYSCONFDIR}/garglk.ini" \ - -sUSESDL=yes \ - -sBUNDLEFONTS=no \ - -dx \ - -j$(makeopts_jobs) || die -} - -src_install() { - DESTDIR="${D}" \ - _BINDIR="${GAMES_PREFIX}/libexec/${PN}" \ - _APPDIR="${GAMES_PREFIX}/libexec/${PN}" \ - _LIBDIR="$(games_get_libdir)" \ - EXEMODE=755 \ - FILEMODE=755 \ - jam install || die - - # Install config file. - insinto "${GAMES_SYSCONFDIR}" - 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. - for terp in advsys agility alan2 alan3 frotz geas git glulxe hugo jacl \ - level9 magnetic nitfol scare tadsr - do - dosym "${GAMES_PREFIX}/libexec/${PN}/${terp}" \ - "${GAMES_BINDIR}/${PN}-${terp}" - done - - # Also symlink the main binary since it resides in libexec. - dosym "${GAMES_PREFIX}/libexec/${PN}/${PN}" \ - "${GAMES_BINDIR}/${PN}" - - prepgamesdirs -} - -pkg_preinst() { - games_pkg_preinst - gnome2_icon_savelist -} - -pkg_postinst() { - games_pkg_postinst - gnome2_icon_cache_update -} - -pkg_postrm() { - gnome2_icon_cache_update -} -- cgit v1.2.3-65-gdbad