1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
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
="amd64? ( http://inform7.com/download/content/${MY_PV}/I7_${MY_PV}_Linux_x86_64.tar.gz )
22 x86? ( http://inform7.com/download/content/${MY_PV}/I7_${MY_PV}_Linux_i386.tar.gz )
23 !amd64? ( !x86? ( http://inform7.com/download/content/${MY_PV}/I7_${MY_PV}_Linux_all.tar.gz ) )"
25 # "Inform" for the core, "GPL-2" for the i7 user-interface script
26 LICENSE
="Inform GPL-2"
28 #KEYWORDS="-* ~amd64 ~arm ~ppc ~s390 ~x86"
29 KEYWORDS
="~amd64 ~x86"
35 # i7 is written in perl, and uses uuidgen from e2fsprogs
36 RDEPEND
="dev-lang/perl
38 games-engines/glkfrotz
40 # Not released yet, use bundled for now
41 #>=dev-lang/inform-6.32:6
43 S
=${WORKDIR}/inform7-
${MY_PV}
53 # XXX if the arm team wants to keyword this, someone who knows
54 # how these things work should probably restrict this to
56 arm
*-*) MY_ARCH
=armv5tel
;;
57 i?
86-*) MY_ARCH
=i386
;;
58 # XXX does it work on ppc64? (statically linked, so doesn't
60 powerpc
*-*) MY_ARCH
=ppc
;;
61 s390-
*) MY_ARCH
=s390
;;
62 s390x-
*) MY_ARCH
=s390x
;;
63 x86_64-
*) MY_ARCH
=x86_64
;;
64 *) die
"unsupported CHOST"
67 unpack .
/..
/inform7-common_
${MY_PV}_all.
tar.gz
68 unpack .
/..
/inform7-compilers_
${MY_PV}_
${MY_ARCH}.
tar.gz
69 # We don't currently use anything from here, but a future version
70 # might include more interpreters.
71 unpack .
/..
/inform7-interpreters_
${MY_PV}_
${MY_ARCH}.
tar.gz
73 epatch
"${FILESDIR}"/inform7-5J39-paths.
patch
77 cp -pPR usr
"${D}" || die
"cp usr failed"
80 dodoc
share
/doc
/inform
7/README || die
"dodoc README failed"
81 rm share
/doc
/inform
7/README
83 dodoc
share
/doc
/inform
7/ChangeLogs
/*.txt || die
"dodoc ChangeLogs failed"
84 rm share
/doc
/inform
7/ChangeLogs
/*.txt
85 rmdir share
/doc
/inform
7/ChangeLogs
86 rm share
/doc
/inform
7/INSTALL
87 rmdir share
/doc
/inform7 || die
"rmdir doc/inform7 failed"
89 # These seem to be useless with the CLI version.
90 rm share
/inform
7/Documentation
/{,{map
,scene
}_icons
}/*.png || die
"rm *.png failed"
91 rm share
/inform
7/Documentation
/*.gif || die
"rm *.gif failed"
92 rmdir share
/inform
7/Documentation
/{map
,scene
}_icons || die
"rmdir icons failed"
95 mv share
/inform
7/Documentation
share
/doc
/${PF}/html || die
"mv Documentation failed"
96 dosym
/usr
/share
/doc
/${PF}/html
/usr
/share
/inform
7/Documentation || die
"dosym Documentation failed"
98 rm -r share
/inform
7/Documentation || die
"rm -r Documentation failed"
101 # Don't use the bundled interpreter binaries. We do, however,
102 # keep the bundled Inform 6 compiler, because it has some
103 # modifications to work with Inform 7-generated code (these will
104 # be released with Inform 6.32).
106 # The binaries that we do keep are unpacked into /usr/share with
107 # symlinks in /usr/libexec, which is silly; move them to libexec
108 # (there doesn't seem to be any need to recreate the symlinks
109 # going the other way: the i7 script accesses them from libexec).
110 # List the kept binaries explicitly (instead of using a wildcard)
111 # so that if a future version adds more, the rmdir will fail and
112 # alert the maintainer that changes (new dependencies etc) might
114 rm libexec
/* || die
"rm libexec failed"
115 mv share
/inform
7/Compilers
/{ni
,cBlorb
,inform-6.31
-biplatform} libexec || die
"mv Compilers failed"
116 rmdir share
/inform
7/Compilers || die
"rmdir Compilers failed"
117 rm share
/inform
7/Interpreters
/{dumb-frotz
,dumb-glulxe
,dumb-git
}
118 rmdir share
/inform
7/Interpreters || die
"rmdir Interpreters failed"
120 mv man
share
/man || die
"mv man failed"