qtads: add 2.1.0
[gentoo-interactive-fiction.git] / dev-lang / inform / inform-7.6e_p72.ebuild
blob44b39bbe70fc074bfd453f751229c158f24e269e
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="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 ~s390 ~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"
38 # Not released yet, use bundled for now
39 #>=dev-lang/inform-6.32:6
41 S=${WORKDIR}/inform7-${MY_PV}
43 src_unpack() {
44 unpack ${A}
45 cd "${S}"
47 mkdir usr
48 cd usr
50 case ${CHOST} in
51 # XXX if the arm team wants to keyword this, someone who knows
52 # how these things work should probably restrict this to
53 # compatible CHOSTS
54 arm*-*) MY_ARCH=armv5tel ;;
55 i?86-*) MY_ARCH=i386 ;;
56 # XXX does it work on ppc64? (statically linked, so doesn't
57 # need 32bit libs)
58 powerpc*-*) MY_ARCH=ppc ;;
59 s390-*) MY_ARCH=s390 ;;
60 s390x-*) MY_ARCH=s390x ;;
61 x86_64-*) MY_ARCH=x86_64 ;;
62 *) die "unsupported CHOST"
63 esac
65 unpack ./../inform7-common_${MY_PV}_all.tar.gz
66 unpack ./../inform7-compilers_${MY_PV}_${MY_ARCH}.tar.gz
67 # We don't currently use anything from here, but a future version
68 # might include more interpreters.
69 unpack ./../inform7-interpreters_${MY_PV}_${MY_ARCH}.tar.gz
71 epatch "${FILESDIR}"/inform7-5J39-paths.patch
73 find . -name '._*' -delete -or -name '.DS_Store' -delete || die "find failed"
76 src_install() {
77 cp -pPR usr "${D}" || die "cp usr failed"
78 cd "${D}"/usr
80 dodoc share/doc/inform7/README || die "dodoc README failed"
81 rm share/doc/inform7/README
82 docinto ChangeLogs
83 dodoc share/doc/inform7/ChangeLogs/*.txt || die "dodoc ChangeLogs failed"
84 rm share/doc/inform7/ChangeLogs/*.txt
85 rmdir share/doc/inform7/ChangeLogs
86 rm share/doc/inform7/INSTALL
87 rmdir share/doc/inform7 || die "rmdir doc/inform7 failed"
89 # These seem to be useless with the CLI version.
90 rm share/inform7/{,{map,scene}_icons}/*.png || die "rm *.png failed"
91 rm share/inform7/*.gif || die "rm *.gif failed"
92 rmdir share/inform7/{map,scene}_icons || die "rmdir icons failed"
93 rm -r share/inform7/English.lproj || die "rm -r English.lproj failed"
95 if use doc; then
96 mv share/inform7/Documentation share/doc/${PF}/html || die "mv Documentation failed"
97 dosym /usr/share/doc/${PF}/html /usr/share/inform7/Documentation || die "dosym Documentation failed"
98 else
99 rm -r share/inform7/Documentation || die "rm -r Documentation failed"
102 # Don't use the bundled interpreter binaries. We do, however,
103 # keep the bundled Inform 6 compiler, because it has some
104 # modifications to work with Inform 7-generated code (these will
105 # be released with Inform 6.32).
107 # The binaries that we do keep are unpacked into /usr/share with
108 # symlinks in /usr/libexec, which is silly; move them to libexec
109 # (there doesn't seem to be any need to recreate the symlinks
110 # going the other way: the i7 script accesses them from libexec).
111 # List the kept binaries explicitly (instead of using a wildcard)
112 # so that if a future version adds more, the rmdir will fail and
113 # alert the maintainer that changes (new dependencies etc) might
114 # be required.
115 rm libexec/* || die "rm libexec failed"
116 mv share/inform7/Compilers/{ni,cBlorb,inform-6.31-biplatform} libexec || die "mv Compilers failed"
117 rmdir share/inform7/Compilers || die "rmdir Compilers failed"
118 rm share/inform7/Interpreters/{dumb-frotz,dumb-glulxe,dumb-git}
119 rmdir share/inform7/Interpreters || die "rmdir Interpreters failed"
121 mv man share/man || die "mv man failed"