1 # Copyright 1999-2015 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
="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"
26 #KEYWORDS="-* ~amd64 ~arm ~ppc ~x86"
27 KEYWORDS
="~amd64 ~x86"
33 # i7 is written in perl, and uses uuidgen from e2fsprogs
34 RDEPEND
="dev-lang/perl
36 games-engines/glkfrotz
38 >=dev-lang/inform-6.33:0"
40 S
=${WORKDIR}/inform7-
${MY_PV}
50 # XXX if the arm team wants to keyword this, someone who knows
51 # how these things work should probably restrict this to
53 arm
*-*) MY_ARCH
=armv6lhf
;;
54 i?
86-*) MY_ARCH
=i386
;;
55 # XXX does it work on ppc64? (statically linked, so doesn't
57 powerpc
*-*) MY_ARCH
=ppc
;;
58 x86_64-
*) MY_ARCH
=x86_64
;;
59 *) die
"unsupported CHOST"
62 unpack .
/..
/inform7-common_
${MY_PV}_all.
tar.gz
63 unpack .
/..
/inform7-compilers_
${MY_PV}_
${MY_ARCH}.
tar.gz
64 # We don't currently use anything from here, but a future version
65 # might include more interpreters.
66 unpack .
/..
/inform7-interpreters_
${MY_PV}_
${MY_ARCH}.
tar.gz
68 epatch
"${FILESDIR}"/inform7-6L02-paths-r1.
patch
69 epatch
"${FILESDIR}"/inform7-6L02-readonly-var.
patch
70 epatch
"${FILESDIR}"/inform7-6L02-pager-exit-status.
patch
74 cp -pPR usr
"${D}" || die
"cp usr failed"
77 dodoc
share
/doc
/inform
7/README || die
"dodoc README failed"
78 rm share
/doc
/inform
7/README
80 dodoc
share
/doc
/inform
7/ChangeLogs
/*.txt || die
"dodoc ChangeLogs failed"
81 rm share
/doc
/inform
7/ChangeLogs
/*.txt
82 rmdir share
/doc
/inform
7/ChangeLogs
83 rm share
/doc
/inform
7/INSTALL
84 rmdir share
/doc
/inform7 || die
"rmdir doc/inform7 failed"
87 mv share
/inform
7/Documentation
share
/doc
/${PF}/html || die
"mv Documentation failed"
88 dosym
/usr
/share
/doc
/${PF}/html
/usr
/share
/inform
7/Documentation || die
"dosym Documentation failed"
89 dodir
/usr
/share
/doc
/${PF}/html
/Documentation || die
"dodir failed"
90 dosym ..
/doc_images
/usr
/share
/doc
/${PF}/html
/Documentation
/Images || die
"dosym doc_images failed"
91 rm -r "${D}"/usr
/share
/doc
/${PF}/html
/English.lproj || die
"rm -r English.lproj failed"
93 rm -r share
/inform
7/Documentation || die
"rm -r Documentation failed"
96 # Don't use the bundled interpreter binaries or Inform 6 compiler.
98 # The binaries that we do keep are unpacked into /usr/share with
99 # symlinks in /usr/libexec, which is silly; move them to libexec
100 # (there doesn't seem to be any need to recreate the symlinks
101 # going the other way: the i7 script accesses them from libexec).
102 # List the kept binaries explicitly (instead of using a wildcard)
103 # so that if a future version adds more, the rmdir will fail and
104 # alert the maintainer that changes (new dependencies etc) might
106 rm libexec
/* || die
"rm libexec failed"
107 mv share
/inform
7/Compilers
/{ni
,cBlorb
} libexec || die
"mv Compilers failed"
108 rm share
/inform
7/Compilers
/inform6
109 rmdir share
/inform
7/Compilers || die
"rmdir Compilers failed"
110 rm share
/inform
7/Interpreters
/{dumb-frotz
,dumb-glulxe
,dumb-git
}
111 rmdir share
/inform
7/Interpreters || die
"rmdir Interpreters failed"
113 mv man
share
/man || die
"mv man failed"