qtads: add 2.1.0
[gentoo-interactive-fiction.git] / dev-lang / inform / inform-7.5u_p92-r2.ebuild
blobd9675d84c1d8a1c4697c824671db43ef1843fa26
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
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="x86? ( http://inform7.com/download/content/${MY_PV}/I7_${MY_PV}_Linux_i386.tar.gz )
22 !x86? ( http://inform7.com/download/content/${MY_PV}/I7_${MY_PV}_Linux_all.tar.gz )"
24 # "Inform" for the core, "GPL-2" for the i7 user-interface script
25 LICENSE="Inform GPL-2"
26 SLOT="7"
27 #KEYWORDS="-* ~amd64 ~arm ~ppc ~s390 ~x86"
28 KEYWORDS="~amd64 ~x86"
29 IUSE="doc"
31 RESTRICT="strip"
33 DEPEND=""
34 # i7 is written in perl, and uses uuidgen from e2fsprogs
35 RDEPEND="dev-lang/perl
36 sys-fs/e2fsprogs
37 games-engines/glkfrotz
38 games-engines/glulxe"
39 # Not released yet, use bundled for now
40 #>=dev-lang/inform-6.32:6
42 S=${WORKDIR}/inform7-${MY_PV}
44 src_unpack() {
45 unpack ${A}
46 cd "${S}"
48 mkdir usr
49 cd usr
51 case ${CHOST} in
52 # XXX if the arm team wants to keyword this, someone who knows
53 # how these things work should probably restrict this to
54 # compatible CHOSTS
55 arm*-*) MY_ARCH=armv5tel ;;
56 i?86-*) MY_ARCH=i386 ;;
57 # XXX does it work on ppc64? (statically linked, so doesn't
58 # need 32bit libs)
59 powerpc*-*) MY_ARCH=ppc ;;
60 s390-*) MY_ARCH=s390 ;;
61 s390x-*) MY_ARCH=s390x ;;
62 x86_64-*) MY_ARCH=x86_64 ;;
63 *) die "unsupported CHOST"
64 esac
66 unpack ./../inform7-common_${MY_PV}_all.tar.gz
67 unpack ./../inform7-compilers_${MY_PV}_${MY_ARCH}.tar.gz
68 # We don't currently use anything from here, but a future version
69 # might include more interpreters.
70 unpack ./../inform7-interpreters_${MY_PV}_${MY_ARCH}.tar.gz
72 epatch "${FILESDIR}"/inform7-5J39-paths.patch
73 cd share/inform7/Inform7/Extensions # grumble
74 epatch "${FILESDIR}"/glulx-statuswin.patch
77 src_install() {
78 cp -pPR usr "${D}" || die "cp usr failed"
79 cd "${D}"/usr
81 dodoc share/doc/inform7/README || die "dodoc README failed"
82 rm share/doc/inform7/README
83 docinto ChangeLogs
84 dodoc share/doc/inform7/ChangeLogs/*.txt || die "dodoc ChangeLogs failed"
85 rm share/doc/inform7/ChangeLogs/*.txt
86 rmdir share/doc/inform7/ChangeLogs
87 rm share/doc/inform7/INSTALL
88 rmdir share/doc/inform7 || die "rmdir doc/inform7 failed"
90 # These seem to be useless with the CLI version.
91 rm share/inform7/{map,scene}_icons/*.png || die "rm *.png failed"
92 rmdir share/inform7/{map,scene}_icons || die "rmdir icons failed"
93 rm share/inform7/Welcome\ Background.png || die "rm failed"
95 mv share/inform7/{doc_images,Documentation} || die "mv failed"
96 if use doc; then
97 mv share/inform7/Documentation share/doc/${PF}/html || die "mv Documentation failed"
98 dosym /usr/share/doc/${PF}/html /usr/share/inform7/Documentation || die "dosym Documentation failed"
99 else
100 rm -r share/inform7/Documentation || die "rm -r Documentation failed"
103 # Don't use the bundled interpreter binaries. We do, however,
104 # keep the bundled Inform 6 compiler, because it has some
105 # modifications to work with Inform 7-generated code (these will
106 # be released with Inform 6.32).
108 # The binaries that we do keep are unpacked into /usr/share with
109 # symlinks in /usr/libexec, which is silly; move them to libexec
110 # (there doesn't seem to be any need to recreate the symlinks
111 # going the other way: the i7 script accesses them from libexec).
112 # List the kept binaries explicitly (instead of using a wildcard)
113 # so that if a future version adds more, the rmdir will fail and
114 # alert the maintainer that changes (new dependencies etc) might
115 # be required.
116 rm libexec/* || die "rm libexec failed"
117 mv share/inform7/Compilers/{ni,cBlorb,inform-6.31-biplatform} libexec || die "mv Compilers failed"
118 rmdir share/inform7/Compilers || die "rmdir Compilers failed"
119 rm share/inform7/Interpreters/{dumb-frotz,dumb-glulxe}
120 rmdir share/inform7/Interpreters || die "rmdir Interpreters failed"
122 mv man share/man || die "mv man failed"