/[gentoo-x86]/sci-chemistry/jmol/jmol-12.2.27.ebuild
Gentoo

Contents of /sci-chemistry/jmol/jmol-12.2.27.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Thu Jun 21 14:41:23 2012 UTC (2 years, 4 months ago) by je_fro
Branch: MAIN
Changes since 1.2: +2 -2 lines
Add --build-only to saxon, fix bug 422757 thanks to Diego Elio Petteno

(Portage version: 2.1.10.65/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/jmol/jmol-12.2.27.ebuild,v 1.2 2012/05/31 21:16:59 je_fro Exp $
4
5 EAPI=1
6 WEBAPP_OPTIONAL="yes"
7
8 inherit eutils webapp java-pkg-2 java-ant-2
9
10 MY_P="Jmol"
11
12 DESCRIPTION="Jmol is a java molecular viever for 3-D chemical structures."
13 SRC_URI="
14 mirror://sourceforge/${PN}/${MY_P}-${PV}-full.tar.gz
15 http://dev.gentoo.org/~jlec/distfiles/${PN}-selfSignedCertificate.store.tar"
16
17 HOMEPAGE="http://jmol.sourceforge.net/"
18 KEYWORDS="~x86 ~amd64"
19 LICENSE="LGPL-2.1"
20
21 IUSE="+client-only vhosts"
22
23 WEBAPP_MANUAL_SLOT="yes"
24 SLOT="0"
25
26 COMMON_DEP="dev-java/commons-cli
27 dev-java/itext:0
28 sci-libs/jmol-acme
29 sci-libs/vecmath-objectclub
30 sci-libs/naga"
31 RDEPEND=">=virtual/jre-1.5
32 ${COMMON_DEP}"
33 DEPEND=">=virtual/jdk-1.5
34 dev-java/saxon:6.5
35 !client-only? ( ${WEBAPP_DEPEND} )
36 ${COMMON_DEP}"
37
38 pkg_setup() {
39
40 use client-only || webapp_pkg_setup
41 java-pkg-2_pkg_setup
42 }
43
44 src_unpack() {
45
46 unpack ${A}
47 cd "${S}"
48
49 epatch "${FILESDIR}"/${P}-nointl.patch
50
51 rm -v "${S}"/*.jar "${S}"/plugin-jars/*.jar || die
52 cd "${S}/jars"
53
54 # We still have to use netscape.jar on amd64 until a nice way to include plugin.jar comes along.
55 if use amd64; then
56 mv -v netscape.jar netscape.tempjar || die "Failed to move netscape.jar."
57 rm -v *.jar *.tar.gz || die "Failed to remove jars."
58 mv -v netscape.tempjar netscape.jar || die "Failed to move netscape.tempjar."
59 fi
60
61 java-pkg_jar-from vecmath-objectclub vecmath-objectclub.jar vecmath1.2-1.14.jar
62 java-pkg_jar-from itext iText.jar itext-1.4.5.jar
63 java-pkg_jar-from jmol-acme jmol-acme.jar Acme.jar
64 java-pkg_jar-from commons-cli-1 commons-cli.jar commons-cli-1.0.jar
65 java-pkg_jar-from naga
66 java-pkg_jar-from --build-only saxon-6.5 saxon.jar
67
68 mkdir -p "${S}/build/appjars" || die
69 }
70
71 src_compile() {
72 # prevent absorbing dep's classes
73 eant -Dlibjars.uptodate=true main
74 }
75
76 src_install() {
77
78 java-pkg_dojar build/Jmol.jar
79 dohtml -r build/doc/* || die "Failed to install html docs."
80 dodoc *.txt doc/*license* || die "Failed to install licenses."
81
82 java-pkg_dolauncher ${PN} --main org.openscience.jmol.app.Jmol \
83 --java_args "-Xmx512m"
84
85 if ! use client-only ; then
86 webapp_src_preinst || die "Failed webapp_src_preinst."
87 cmd="cp Jmol.js build/Jmol.jar "${D}${MY_HTDOCSDIR}"" ; ${cmd} \
88 || die "${cmd} failed."
89 cmd="cp build/JmolApplet*.jar "${D}${MY_HTDOCSDIR}"" ; ${cmd} \
90 || die "${cmd} failed."
91 cmd="cp applet.classes "${D}${MY_HTDOCSDIR}"" ; ${cmd} \
92 || die "${cmd} failed."
93 cmd="cp -r build/classes/* "${D}${MY_HTDOCSDIR}"" ; ${cmd} \
94 || die "${cmd} failed."
95 cmd="cp -r build/appletjars/* "${D}${MY_HTDOCSDIR}"" ; ${cmd} \
96 || die "${cmd} failed."
97 cmd="cp "${FILESDIR}"/caffeine.xyz "${D}${MY_HTDOCSDIR}"" ; ${cmd} \
98 || die "${cmd} failed."
99 cmd="cp "${FILESDIR}"/index.html "${D}${MY_HTDOCSDIR}"" ; ${cmd} \
100 || die "${cmd} failed."
101
102 webapp_src_install || die "Failed running webapp_src_install"
103 fi
104 }
105
106 pkg_postinst() {
107
108 if ! use client-only ; then
109 webapp_pkg_postinst || die "webapp_pkg_postinst failed"
110 fi
111
112 }
113
114 pkg_prerm() {
115
116 if ! use client-only ; then
117 webapp_pkg_prerm || die "webapp_pkg_prerm failed"
118 fi
119
120 }

  ViewVC Help
Powered by ViewVC 1.1.20