1 |
|
# Copyright 1999-2022 Gentoo Authors
|
|
1 |
# Copyright 1999-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
EAPI=7
|
5 |
|
|
6 |
|
# NOTE: Building the docs is much more hassle than it's worth. It
|
7 |
|
# requires com.sun.image.codec, which has long gone from JDKs, and
|
8 |
|
# Apache StyleBook, which is long dead though it is bundled here.
|
|
4 |
EAPI=8
|
9 |
5 |
|
10 |
6 |
JAVA_PKG_IUSE="doc source"
|
11 |
|
MAVEN_ID="xalan:xalan:2.7.2"
|
12 |
|
|
13 |
|
inherit java-pkg-2 java-ant-2
|
|
7 |
MAVEN_ID="xalan:xalan:2.7.3"
|
14 |
8 |
|
15 |
|
MY_PN="${PN}-j"
|
16 |
|
MY_PV="$(ver_rs 1- _)"
|
17 |
|
MY_P="${MY_PN}_${MY_PV}"
|
18 |
|
SRC_DIST="${MY_P}-src.tar.gz"
|
19 |
|
BIN_DIST="${MY_P}-bin.zip"
|
|
9 |
inherit java-pkg-2 java-pkg-simple verify-sig
|
20 |
10 |
|
21 |
11 |
DESCRIPTION="Transforming XML documents into HTML, text, or other XML document types"
|
22 |
12 |
HOMEPAGE="https://xalan.apache.org/"
|
23 |
|
SRC_URI="mirror://apache/${PN}/${MY_PN}/source/${SRC_DIST}
|
24 |
|
doc? ( mirror://apache/${PN}/${MY_PN}/binaries/${BIN_DIST} )"
|
|
13 |
SRC_URI="mirror://apache/xalan/xalan-j/source/xalan-j_${PV//./_}-src.tar.gz
|
|
14 |
verify-sig? ( https://downloads.apache.org/xalan/xalan-j/source/xalan-j_${PV//./_}-src.tar.gz.asc )"
|
|
15 |
|
|
16 |
S="${WORKDIR}/xalan-j_${PV//./_}"
|
|
17 |
|
25 |
18 |
LICENSE="Apache-2.0"
|
26 |
19 |
SLOT="0"
|
27 |
|
KEYWORDS="amd64 ~arm arm64 ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
|
28 |
|
|
29 |
|
CDEPEND="dev-java/javacup:0
|
30 |
|
dev-java/bcel:0"
|
|
20 |
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
|
31 |
21 |
|
32 |
|
BDEPEND="doc? ( app-arch/unzip )"
|
33 |
|
RDEPEND="${CDEPEND}
|
34 |
|
>=virtual/jre-1.8:*
|
35 |
|
~dev-java/xalan-serializer-${PV}:${SLOT}"
|
|
22 |
CP_DEPEND="
|
|
23 |
dev-java/bcel:0
|
|
24 |
dev-java/javacup:0
|
|
25 |
~dev-java/xalan-serializer-${PV}:${SLOT}
|
|
26 |
dev-java/xerces:2
|
|
27 |
"
|
36 |
28 |
|
37 |
|
DEPEND="${CDEPEND}
|
|
29 |
DEPEND="${CP_DEPEND}
|
38 |
30 |
virtual/jdk:1.8"
|
39 |
31 |
|
40 |
|
EANT_GENTOO_CLASSPATH="bcel,javacup"
|
41 |
|
EANT_BUILD_TARGET="unbundledjar"
|
42 |
|
EANT_DOC_TARGET=""
|
|
32 |
RDEPEND="${CP_DEPEND}
|
|
33 |
>=virtual/jre-1.8:*"
|
43 |
34 |
|
44 |
|
JAVA_ANT_REWRITE_CLASSPATH="true"
|
45 |
|
S="${WORKDIR}/${MY_P}"
|
|
35 |
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-apache-xalan-j )"
|
|
36 |
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/xalan-j.apache.org.asc"
|
46 |
37 |
|
47 |
|
src_prepare() {
|
48 |
|
default
|
49 |
|
|
50 |
|
# disable building of serializer.jar
|
51 |
|
sed -i -e 's/depends="prepare,serializer.jar"/depends="prepare"/' \
|
52 |
|
build.xml || die "sed build.xml failed"
|
53 |
|
|
54 |
|
# remove bundled jars
|
55 |
|
find -name "*.jar" -delete || die
|
56 |
|
rm src/*.tar.gz || die
|
57 |
|
}
|
|
38 |
JAVA_MAIN_CLASS="org.apache.xalan.xslt.Process"
|
|
39 |
JAVA_SRC_DIR="src"
|
58 |
40 |
|
59 |
|
src_install() {
|
60 |
|
java-pkg_newjar build/${PN}-unbundled.jar
|
61 |
|
java-pkg_dolauncher ${PN} --main org.apache.xalan.xslt.Process
|
62 |
|
java-pkg_register-dependency ${PN}-serializer
|
63 |
|
|
64 |
|
dodoc NOTICE.txt readme.html
|
65 |
|
use doc && java-pkg_dohtml -r docs/*
|
66 |
|
use source && java-pkg_dosrc src/org
|
|
41 |
src_prepare() {
|
|
42 |
java-pkg-2_src_prepare
|
|
43 |
# serializer is packaged separately
|
|
44 |
rm -r src/org/apache/xml/serializer || die "cannot remove serializer"
|
67 |
45 |
}
|