/[gentoo-x86]/sci-mathematics/kodkodi/kodkodi-1.5.2.ebuild
Gentoo

Contents of /sci-mathematics/kodkodi/kodkodi-1.5.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sun Aug 10 20:23:30 2014 UTC (6 years, 3 months ago) by slyfox
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +3 -3 lines
QA: drop trailing '.' from DESCRIPTION

(Portage version: 2.2.11_p9/cvs/Linux x86_64, signed Manifest commit with key 611FF3AA)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-mathematics/kodkodi/kodkodi-1.5.2.ebuild,v 1.2 2013/08/17 02:59:08 gienah Exp $
4
5 EAPI="5"
6
7 JAVA_PKG_IUSE="doc source"
8
9 inherit java-pkg-2 java-pkg-simple multilib
10
11 DESCRIPTION="A text front-end for the Kodkod Java library"
12 HOMEPAGE="http://www21.in.tum.de/~blanchet/#software"
13 SRC_URI="http://www21.in.tum.de/~blanchet/${P}.tgz"
14
15 LICENSE="BSD"
16 SLOT="0/${PV}"
17 KEYWORDS="~amd64 ~x86"
18 IUSE="isabelle examples"
19
20 COMMON_DEP="dev-java/antlr:3
21 =sci-mathematics/kodkod-1.5*:="
22 RDEPEND="${COMMON_DEP}
23 isabelle? (
24 >=sci-mathematics/isabelle-2011-r1:=
25 )
26 >=virtual/jre-1.6"
27 DEPEND="${COMMON_DEP}
28 >=virtual/jdk-1.6
29 app-arch/unzip"
30
31 S="${WORKDIR}/${P}"
32
33 JAVA_GENTOO_CLASSPATH="kodkod,antlr-3"
34
35 java_prepare() {
36 sed -e 's@exec "$ISABELLE_TOOL" java $KODKODI_JAVA_OPT@java@' \
37 -i "${S}/bin/kodkodi" || die "Could not patch bin/kodkodi"
38 rm -f jar/*.jar || die "Could not rm jar files"
39 }
40
41 src_compile() {
42 JAVA_SRC_DIR="src"
43 TARGETDIR="/usr/share/${P}"
44 KODKOD_LIBDIR="/usr/"$(get_libdir)"/kodkod"
45
46 java-pkg-simple_src_compile
47
48 pushd "${S}/target/classes" > /dev/null || die
49 jar -uf "${S}"/${PN}.jar $(find -name '*.class') || die
50 popd > /dev/null
51 }
52
53 src_install() {
54 java-pkg-simple_src_install
55 dodoc README HISTORY manual/${PN}.pdf LICENSES/Kodkodi
56 insinto ${TARGETDIR}
57 if use examples; then
58 doins -r examples
59 fi
60
61 if use isabelle; then
62 ISABELLE_HOME="$(isabelle getenv ISABELLE_HOME | cut -d'=' -f 2)" \
63 || die "isabelle getenv ISABELLE_HOME failed"
64 [[ -n "${ISABELLE_HOME}" ]] || die "ISABELLE_HOME empty"
65 dodir "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
66 cat <<- EOF >> "${S}/settings"
67 KODKODI="\$COMPONENT"
68 KODKODI_VERSION="${PV}"
69 KODKODI_PLATFORM=\$ISABELLE_PLATFORM
70 KODKODI_CLASSPATH="$(java-config --classpath=antlr:3):${ROOT}usr/share/${PN}-${SLOT}/lib/kodkodi.jar:$(java-config --classpath=kodkod)"
71 KODKODI_JAVA_LIBRARY_PATH="${KODKOD_LIBDIR}"
72 EOF
73 insinto "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
74 doins "${S}/settings"
75 dodir "${ISABELLE_HOME}/contrib/${PN}-${PV}/bin"
76 exeinto "${ISABELLE_HOME}/contrib/${PN}-${PV}/bin"
77 doexe bin/kodkodi
78 fi
79 }
80
81 pkg_postinst() {
82 if use isabelle; then
83 if [ -f "${ROOT}etc/isabelle/components" ]; then
84 if egrep "contrib/${PN}-[0-9.]*" "${ROOT}etc/isabelle/components"; then
85 sed -e "/contrib\/${PN}-[0-9.]*/d" \
86 -i "${ROOT}etc/isabelle/components"
87 fi
88 cat <<- EOF >> "${ROOT}etc/isabelle/components"
89 contrib/${PN}-${PV}
90 EOF
91 fi
92 fi
93 }
94
95 pkg_postrm() {
96 if use isabelle; then
97 if [ ! -f "${ROOT}usr/bin/kodkodi" ]; then
98 if [ -f "${ROOT}etc/isabelle/components" ]; then
99 # Note: this sed should only match the version of this ebuild
100 # Which is what we want as we do not want to remove the line
101 # of a new kodkodi being installed during an upgrade.
102 sed -e "/contrib\/${PN}-${PV}/d" \
103 -i "${ROOT}etc/isabelle/components"
104 fi
105 fi
106 fi
107 }

  ViewVC Help
Powered by ViewVC 1.1.20