hugor: not compatible with qt-gstreamer 1.*
[gentoo-interactive-fiction.git] / dev-lang / inform / inform-7.6l_p02.ebuild
blob6d254e224153cd7fb8bb67f1c2dbb6c004dda92b
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
5 EAPI=1
7 inherit eutils versionator
9 MY_MAJOR=$(get_version_component_range 2)
10 MY_LETTER=$(get_version_component_range 3)
11 MY_MINOR=$(get_version_component_range 4)
13 MY_LOWERS=abcdefghijklmnopqrstuvwxyz
14 MY_UPPERS=ABCDEFGHIJKLMNOPQRSTUVWXYZ
15 MY_INDEX=${MY_LOWERS%${MY_LETTER}*}
16 MY_UPPER=${MY_UPPERS:${#MY_INDEX}:1}
18 MY_PV=${MY_MAJOR}${MY_UPPER}${MY_MINOR#p}
19 DESCRIPTION="Design system for interactive fiction"
20 HOMEPAGE="http://inform7.com/"
21 SRC_URI="http://inform7.com/download/content/${MY_PV}/I7_${MY_PV}_Linux_all.tar.gz"
23 # "Inform" for the core, "GPL-2" for the i7 user-interface script
24 LICENSE="Inform GPL-2"
25 SLOT="7"
26 #KEYWORDS="-* ~amd64 ~arm ~ppc ~x86"
27 KEYWORDS="~amd64 ~x86"
28 IUSE="doc"
30 RESTRICT="strip"
32 DEPEND=""
33 # i7 is written in perl, and uses uuidgen from e2fsprogs
34 RDEPEND="dev-lang/perl
35 sys-fs/e2fsprogs
36 games-engines/glkfrotz
37 games-engines/glulxe"
39 S=${WORKDIR}/inform7-${MY_PV}
41 src_unpack() {
42 unpack ${A}
43 cd "${S}"
45 mkdir usr
46 cd usr
48 case ${CHOST} in
49 # XXX if the arm team wants to keyword this, someone who knows
50 # how these things work should probably restrict this to
51 # compatible CHOSTS
52 arm*-*) MY_ARCH=armv6lhf ;;
53 i?86-*) MY_ARCH=i386 ;;
54 # XXX does it work on ppc64? (statically linked, so doesn't
55 # need 32bit libs)
56 powerpc*-*) MY_ARCH=ppc ;;
57 x86_64-*) MY_ARCH=x86_64 ;;
58 *) die "unsupported CHOST"
59 esac
61 unpack ./../inform7-common_${MY_PV}_all.tar.gz
62 unpack ./../inform7-compilers_${MY_PV}_${MY_ARCH}.tar.gz
63 # We don't currently use anything from here, but a future version
64 # might include more interpreters.
65 unpack ./../inform7-interpreters_${MY_PV}_${MY_ARCH}.tar.gz
67 epatch "${FILESDIR}"/inform7-6L02-paths.patch
68 epatch "${FILESDIR}"/inform7-6L02-readonly-var.patch
69 epatch "${FILESDIR}"/inform7-6L02-pager-exit-status.patch
72 src_install() {
73 cp -pPR usr "${D}" || die "cp usr failed"
74 cd "${D}"/usr
76 dodoc share/doc/inform7/README || die "dodoc README failed"
77 rm share/doc/inform7/README
78 docinto ChangeLogs
79 dodoc share/doc/inform7/ChangeLogs/*.txt || die "dodoc ChangeLogs failed"
80 rm share/doc/inform7/ChangeLogs/*.txt
81 rmdir share/doc/inform7/ChangeLogs
82 rm share/doc/inform7/INSTALL
83 rmdir share/doc/inform7 || die "rmdir doc/inform7 failed"
85 if use doc; then
86 mv share/inform7/Documentation share/doc/${PF}/html || die "mv Documentation failed"
87 dosym /usr/share/doc/${PF}/html /usr/share/inform7/Documentation || die "dosym Documentation failed"
88 dodir /usr/share/doc/${PF}/html/Documentation || die "dodir failed"
89 dosym ../doc_images /usr/share/doc/${PF}/html/Documentation/Images || die "dosym doc_images failed"
90 rm -r "${D}"/usr/share/doc/${PF}/html/English.lproj || die "rm -r English.lproj failed"
91 else
92 rm -r share/inform7/Documentation || die "rm -r Documentation failed"
95 # Don't use the bundled interpreter binaries.
97 # The binaries that we do keep are unpacked into /usr/share with
98 # symlinks in /usr/libexec, which is silly; move them to libexec
99 # (there doesn't seem to be any need to recreate the symlinks
100 # going the other way: the i7 script accesses them from libexec).
101 # List the kept binaries explicitly (instead of using a wildcard)
102 # so that if a future version adds more, the rmdir will fail and
103 # alert the maintainer that changes (new dependencies etc) might
104 # be required.
105 rm libexec/* || die "rm libexec failed"
106 mv share/inform7/Compilers/{ni,cBlorb,inform6} libexec || die "mv Compilers failed"
107 rmdir share/inform7/Compilers || die "rmdir Compilers failed"
108 rm share/inform7/Interpreters/{dumb-frotz,dumb-glulxe,dumb-git}
109 rmdir share/inform7/Interpreters || die "rmdir Interpreters failed"
111 mv man share/man || die "mv man failed"