aboutsummaryrefslogtreecommitdiff
blob: 465f6f5bfd351304dbcb7b7fe4e7762d843b82a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4

JAVA_PKG_IUSE="examples source"

inherit java-pkg-2 java-ant-2

MY_PN="${PN/-fop/}"
MY_P="${P/-fop/}"

DESCRIPTION="jlatexmath plugin for dev-java/fop"
SRC_URI="http://forge.scilab.org/upload/jlatexmath/files/${MY_PN}-src-all-${PV}.zip"
HOMEPAGE="http://forge.scilab.org/index.php/p/jlatexmath"

IUSE=""
CDEPEND="dev-java/jlatexmath:1
	dev-java/avalon-framework
	dev-java/fop"
REPEND=">=virtual/jdk-1.5
	${CDEPEND}"
RDEPEND=">=virtual/jre-1.5
	${CDEPEND}"

LICENSE="GPL-2"
SLOT="1"
KEYWORDS="~amd64 ~x86"

EANT_BUILD_TARGET="buildJar"

S="${WORKDIR}/${MY_P}/plugin/fop"

src_prepare() {
	cd "${WORKDIR}/${MY_P}"
	sed -i \
		-e "s:/usr/share/java/fop.jar:$(java-pkg_getjar fop fop.jar):g" \
		-e "s:/usr/share/java/xmlgraphics-commons.jar:$(java-pkg_getjar xmlgraphics-commons-1.3 xmlgraphics-commons.jar):g" \
		-e "s:/usr/share/java/batik.jar:$(java-pkg_getjar batik-1.7 batik-all.jar):g" \
		-e "s:/usr/share/java/avalon-framework.jar:$(java-pkg_getjar avalon-framework-4.2 avalon-framework.jar):g" \
		-e "s:/usr/share/java/commons-io.jar:$(java-pkg_getjar commons-io-1 commons-io.jar):g" \
		-e "s:/usr/share/java/commons-logging.jar:$(java-pkg_getjar commons-logging commons-logging.jar):g" \
		-e "s:/usr/share/java/xml-apis-ext.jar:$(java-pkg_getjar xml-commons-external-1.3 xml-apis-ext.jar):g" \
		fop.properties || die
}

src_install() {
	java-pkg_newjar dist/${P}.jar ${PN}.jar
	use source && java-pkg_dosrc src/org
	use examples && java-pkg_doexamples examples
}