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