forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-java/xalan: for x86 use precompiled java-cup
Signed-off-by: Volkmar W. Pogatzki <[email protected]> Signed-off-by: Arthur Zamarin <[email protected]>
- Loading branch information
Showing
2 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
DIST java-cup-bin-11b-20160615.tar.gz 144985 BLAKE2B fba4109a4999d6f5a678265d2374bc305fc9fe8b724a0af5fb60402d612904447ebe9285e8672652c492cd2e630752eb9ffeb8017be1dea081ddcb30f815a687 SHA512 edba197bfe0638838ad2e9cb7342ffcbbec4f2a71436fc4bf82ff0e1987fe9f490849c644945cf7e7deade9f12f458e019410a2d9c1f22c0182137fe5ad2349f | ||
DIST xalan-j_2_7_3-src.tar.gz 13686458 BLAKE2B e19373aa22dad13945917d8f041f56e6ff9cc434a70e88b96764e0547a0a122a9197eeb23bb7757a5483beead334f4af62e7e1b70531b23c31199ec4733756ef SHA512 fe4b2b9471f95a2cd3607550a6c97b46b7d2576d1e814305f4564df88aaf4fdc9f88ba43dad4a5741521b2c2f5137e3e70d2d4e31b232d403a66dc1e889c8b6b | ||
DIST xalan-j_2_7_3-src.tar.gz.asc 849 BLAKE2B 623fefefa3ab88bfdef5376101f26a9c6602c30a34c0db369159bdb7af34ccb2602011071dd3e79304e6dd4e8b8a198729347f5dbee9a06ae12af12d351de82a SHA512 5c7ed7e71f8a0c2739a64f9ba34edb28d749924d1a581b9963bed3376151a090c2c1af2b1111612822cf20d27a814e22917660f034912e8e5fa913b434e66bf2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Copyright 1999-2024 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
JAVA_PKG_IUSE="doc source" | ||
MAVEN_ID="xalan:xalan:2.7.3" | ||
|
||
inherit java-pkg-2 java-pkg-simple verify-sig | ||
|
||
DESCRIPTION="Transforming XML documents into HTML, text, or other XML document types" | ||
HOMEPAGE="https://xalan.apache.org/" | ||
SRC_URI="mirror://apache/xalan/xalan-j/source/xalan-j_${PV//./_}-src.tar.gz | ||
verify-sig? ( https://downloads.apache.org/xalan/xalan-j/source/xalan-j_${PV//./_}-src.tar.gz.asc ) | ||
x86? ( https://www2.cs.tum.edu/projects/cup/releases/java-cup-bin-11b-20160615.tar.gz )" | ||
|
||
S="${WORKDIR}/xalan-j_${PV//./_}" | ||
|
||
LICENSE="Apache-2.0" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" | ||
|
||
# https://bugs.gentoo.org/936274 - for x86 we provide the precompiled java-cup | ||
COMMON_DEPEND=" | ||
!x86? ( dev-java/javacup:0 ) | ||
" | ||
|
||
CP_DEPEND=" | ||
dev-java/bcel:0 | ||
~dev-java/xalan-serializer-${PV}:${SLOT} | ||
dev-java/xerces:2 | ||
" | ||
|
||
DEPEND=" | ||
${COMMON_DEPEND} | ||
${CP_DEPEND} | ||
>=virtual/jdk-1.8:* | ||
" | ||
|
||
RDEPEND=" | ||
${COMMON_DEPEND} | ||
${CP_DEPEND} | ||
>=virtual/jre-1.8:* | ||
" | ||
|
||
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-apache-xalan-j )" | ||
VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/xalan-j.apache.org.asc" | ||
|
||
JAVA_MAIN_CLASS="org.apache.xalan.xslt.Process" | ||
JAVA_SRC_DIR="src" | ||
|
||
src_unpack() { | ||
if use verify-sig; then | ||
verify-sig_verify_detached \ | ||
"${DISTDIR}/xalan-j_${PV//./_}-src.tar.gz" \ | ||
"${DISTDIR}/xalan-j_${PV//./_}-src.tar.gz.asc" | ||
fi | ||
unpack "xalan-j_${PV//./_}-src.tar.gz" | ||
use x86 && unpack java-cup-bin-11b-20160615.tar.gz | ||
} | ||
|
||
src_prepare() { | ||
java-pkg-2_src_prepare | ||
# serializer is packaged separately | ||
rm -r src/org/apache/xml/serializer || die "cannot remove serializer" | ||
use !x86 && JAVA_GENTOO_CLASSPATH="javacup" | ||
use x86 && JAVA_GENTOO_CLASSPATH_EXTRA="${WORKDIR}/java-cup-11b-runtime.jar:${WORKDIR}/java-cup-11b.jar" | ||
} | ||
|
||
src_install() { | ||
java-pkg-simple_src_install | ||
if use x86; then | ||
java-pkg_newjar "${WORKDIR}/java-cup-11b-runtime.jar" java-cup-runtime.jar | ||
java-pkg_newjar "${WORKDIR}/java-cup-11b.jar" java-cup.jar | ||
java-pkg_regjar "${ED}/usr/share/${PN}/lib/java-cup-runtime.jar" | ||
java-pkg_regjar "${ED}/usr/share/${PN}/lib/java-cup.jar" | ||
fi | ||
} |