You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
119 lines
2.9 KiB
119 lines
2.9 KiB
6 years ago
|
# Copyright 1999-2018 Gentoo Foundation
|
||
13 years ago
|
# 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.)
|
||
|
|
||
6 years ago
|
EAPI=6
|
||
|
inherit eutils flag-o-matic gnome2-utils multilib multiprocessing toolchain-funcs
|
||
13 years ago
|
|
||
|
DESCRIPTION="An Interactive Fiction (IF) player supporting all major formats"
|
||
|
HOMEPAGE="http://ccxvii.net/gargoyle/"
|
||
9 years ago
|
SRC_URI="https://garglk.googlecode.com/files/${P}-sources.zip"
|
||
13 years ago
|
|
||
|
LICENSE="BSD GPL-2 MIT Hugo Glulxe"
|
||
|
SLOT="0"
|
||
7 years ago
|
KEYWORDS="~amd64 ~x86"
|
||
13 years ago
|
IUSE=""
|
||
|
|
||
12 years ago
|
RDEPEND="
|
||
6 years ago
|
media-fonts/libertine
|
||
12 years ago
|
media-fonts/liberation-fonts
|
||
|
media-libs/freetype:2
|
||
|
media-libs/libpng:0
|
||
13 years ago
|
media-libs/sdl-mixer
|
||
12 years ago
|
media-libs/sdl-sound[modplug,mp3,vorbis]
|
||
|
sys-libs/zlib
|
||
9 years ago
|
virtual/jpeg:0
|
||
12 years ago
|
x11-libs/gtk+:2"
|
||
13 years ago
|
DEPEND="${RDEPEND}
|
||
|
app-arch/unzip
|
||
12 years ago
|
dev-util/ftjam
|
||
|
virtual/pkgconfig"
|
||
13 years ago
|
|
||
12 years ago
|
S=${WORKDIR}
|
||
|
|
||
13 years ago
|
src_prepare() {
|
||
|
# Substitute custom CFLAGS/LDFLAGS.
|
||
|
sed -i -e \
|
||
|
"/^\s*OPTIM = / {
|
||
12 years ago
|
s/ \(-O.*\)\? ;/ ;/
|
||
13 years ago
|
a LINKFLAGS = ${LDFLAGS} ;
|
||
|
a SHRLINKFLAGS = ${LDFLAGS} ;
|
||
|
}" Jamrules || die
|
||
|
|
||
|
# Don't link against libraries used indirectly through SDL_sound.
|
||
12 years ago
|
sed -i -e "/GARGLKLIBS/s/-lsmpeg -lvorbisfile//g" Jamrules || die
|
||
13 years ago
|
|
||
|
# Convert garglk.ini to UNIX format.
|
||
|
edos2unix garglk/garglk.ini
|
||
|
|
||
12 years ago
|
epatch "${FILESDIR}"/${P}-desktopfile.patch
|
||
9 years ago
|
append-cflags -std=gnu89 # build with gcc5 (bug #573378)
|
||
6 years ago
|
append-cxxflags -std=gnu++11 # code assumes C++11 semantics (bug #642996)
|
||
|
default
|
||
13 years ago
|
}
|
||
|
|
||
|
src_compile() {
|
||
12 years ago
|
# build system messes up flags and toolchain completely
|
||
|
# append flags to compiler commands to have consistent behavior
|
||
13 years ago
|
jam \
|
||
12 years ago
|
-sAR="$(tc-getAR) cru" \
|
||
12 years ago
|
-sCC="$(tc-getCC) ${CFLAGS}" \
|
||
|
-sCCFLAGS="" \
|
||
|
-sC++="$(tc-getCXX) ${CXXFLAGS}" \
|
||
|
-sCXX="$(tc-getCXX) ${CXXFLAGS}" \
|
||
|
-sC++FLAGS="" \
|
||
6 years ago
|
-sGARGLKINI="/etc/garglk.ini" \
|
||
13 years ago
|
-sUSESDL=yes \
|
||
|
-sBUNDLEFONTS=no \
|
||
12 years ago
|
-dx \
|
||
13 years ago
|
-j$(makeopts_jobs) || die
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
DESTDIR="${D}" \
|
||
6 years ago
|
_BINDIR="/usr/libexec/${PN}" \
|
||
|
_APPDIR="/usr/libexec/${PN}" \
|
||
|
_LIBDIR="/usr/$(get_libdir)" \
|
||
13 years ago
|
EXEMODE=755 \
|
||
|
FILEMODE=755 \
|
||
|
jam install || die
|
||
|
|
||
|
# Install config file.
|
||
6 years ago
|
insinto "/etc"
|
||
12 years ago
|
newins garglk/garglk.ini garglk.ini
|
||
13 years ago
|
|
||
|
# Install application entry and icon.
|
||
12 years ago
|
domenu garglk/${PN}.desktop
|
||
|
doicon -s 32 garglk/${PN}-house.png
|
||
13 years ago
|
|
||
|
# 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
|
||
6 years ago
|
dosym "../libexec/${PN}/${terp}" \
|
||
|
"/usr/bin/${PN}-${terp}"
|
||
13 years ago
|
done
|
||
|
|
||
|
# Also symlink the main binary since it resides in libexec.
|
||
6 years ago
|
dosym "../libexec/${PN}/${PN}" \
|
||
|
"/usr/bin/${PN}"
|
||
13 years ago
|
}
|
||
12 years ago
|
|
||
|
pkg_preinst() {
|
||
|
gnome2_icon_savelist
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
gnome2_icon_cache_update
|
||
|
}
|
||
|
|
||
|
pkg_postrm() {
|
||
|
gnome2_icon_cache_update
|
||
|
}
|