games-engines/hugor: enable OPL3 emulation, fix metadata.xml
[gentoo-interactive-fiction.git] / dev-games / gnome-inform7 / gnome-inform7-7.5z_p71.ebuild
blobb260b5e6ae69154dbe75aacf9b6f8a0d42057167
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
5 EAPI=1
7 inherit eutils versionator autotools gnome2-utils
9 MY_MAJOR=$(get_version_component_range 2)
10 MY_LETTER=$(get_version_component_range 3)
11 MY_MINOR=$(get_version_component_range 4)
12 MY_PATCH=$(get_version_component_range 5)
14 MY_LOWERS=abcdefghijklmnopqrstuvwxyz
15 MY_UPPERS=ABCDEFGHIJKLMNOPQRSTUVWXYZ
16 MY_INDEX=${MY_LOWERS%${MY_LETTER}*}
17 MY_UPPER=${MY_UPPERS:${#MY_INDEX}:1}
19 MY_PV=${MY_MAJOR}${MY_UPPER}${MY_MINOR#p}${MY_PATCH:+.${MY_PATCH#p}}
20 DESCRIPTION="GNOME user interface for Inform 7"
21 HOMEPAGE="http://inform7.com/ http://sourceforge.net/projects/gnome-inform7/"
22 SRC_URI="mirror://sourceforge/${PN}/I7_${MY_PV}_GNOME_Source.tar.gz"
24 LICENSE="GPL-3 LICENSE-BITSTREAM font-bh-ttf"
25 SLOT="0"
26 KEYWORDS="~amd64 ~x86"
27 IUSE="linguas_es" # optional nls seems broken
29 RESTRICT="test" # intltool silliness
31 DEPEND="=app-text/gtkspell-2*
32 dev-libs/dbus-glib
33 >=dev-libs/glib-2.4.0:2
34 dev-libs/libxml2
35 gnome-base/gconf:2
36 >=gnome-base/libbonobo-2
37 >=gnome-base/libgnome-2
38 >=gnome-base/libgnomeui-2
39 gnome-base/gnome-vfs:2
40 gnome-extra/gtkhtml:3.14
41 media-libs/freetype:2
42 media-libs/libpng
43 media-libs/libsdl
44 media-libs/sdl-mixer
45 media-libs/sdl-sound
46 || ( >=sys-apps/util-linux-2.16
47 <sys-libs/e2fsprogs-libs-1.41.8
48 <sys-fs/e2fsprogs-1.41.0 )
49 virtual/jpeg:0
50 virtual/libintl
51 >=x11-libs/gtk+-2.8:2
52 x11-libs/gtksourceview:2.0
53 x11-libs/pango"
54 RDEPEND="${DEPEND}
55 ~dev-lang/inform-${PV%${MY_PATCH:+_${MY_PATCH}}}
56 games-engines/glkfrotz
57 games-engines/glulxe"
58 DEPEND="${DEPEND}
59 dev-games/glk-headers
60 >=dev-util/intltool-0.35.0
61 virtual/pkgconfig
62 sys-devel/gettext"
64 S=${WORKDIR}/${PN}-${MY_PV}
66 src_unpack() {
67 unpack ${A}
68 cd "${S}"
70 epatch "${FILESDIR}"/gnome-inform7-5Z71-unbundling.patch
72 eautoreconf
74 rm src/gtkterp/garglk/{glk,gi_blorb,gi_dispa,glkstart}.h || die "rm glk headers failed"
77 src_compile() {
78 # Don't build libgtkerp-garglk.a: the library is useless except
79 # when running under the IDE, and the IDE uses the glkfrotz and
80 # glulxe binaries linked against glkloader.
81 econf --disable-static || die "econf failed"
82 emake || die "emake failed"
85 src_install() {
86 emake DESTDIR="${D}" GCONFTOOL=true install || die "emake install failed"
87 dodoc AUTHORS ChangeLog NEWS README THANKS TODO src/gtkterp/garglk/CharterBT.txt || die "dodoc failed"
88 newdoc src/gtkterp/garglk/TODO TODO-garglk || die "newdoc failed"
90 cd "${D}"/usr/share
91 rm -r doc/gnome-inform7 || die "rm doc failed"
92 rm -r gnome-inform7/Extensions || die "rm Extensions failed"
93 rm gnome-inform7/uninstall_manifest.txt || die "rm uninstall_manifest.txt failed"
94 mv gnome-inform7/Documentation doc/${PF}/html || die "mv Documentation failed"
95 dosym /usr/share/doc/${PF}/html /usr/share/gnome-inform7/Documentation || die "dosym Documentation failed"
97 dodir /usr/libexec/gnome-inform7 || die "dodir failed"
98 dosym /usr/libexec{,/gnome-inform7}/cBlorb || die "dosym cBlorb failed"
99 dosym /usr/libexec{,/gnome-inform7}/inform-6.31-biplatform || die "dosym inform-6.31-biplatform failed"
100 dosym /usr/libexec{,/gnome-inform7}/ni || die "dosym ni failed"
102 dosym /usr/share/{inform7/Inform7,gnome-inform7}/Extensions || die "dosym Inform7 failed"
105 pkg_preinst() {
106 gnome2_gconf_savelist
109 pkg_postinst() {
110 gnome2_gconf_install
113 #pkg_prerm() {
114 # gnome2_gconf_uninstall