diff options
author | neeshy <neeshy@tfwno.gf> | 2023-07-22 13:37:38 -0400 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2024-01-17 10:30:38 +0100 |
commit | b70d3e827752ad24b82115d826a45f486e47846c (patch) | |
tree | f1d5e5c30218d684b853ef5a6439f483959d35db /dev-java/xerces/xerces-2.12.2-r2.ebuild | |
parent | dev-java/xalan-serializer: dropped 2.7.3-r1 to unstable (diff) | |
download | gentoo-b70d3e827752ad24b82115d826a45f486e47846c.tar.gz gentoo-b70d3e827752ad24b82115d826a45f486e47846c.tar.bz2 gentoo-b70d3e827752ad24b82115d826a45f486e47846c.zip |
dev-java/xerces: build against java >=8
Signed-off-by: Nima Sadeghi <neeshy@tfwno.gf>
Closes: https://github.com/gentoo/gentoo/pull/34853
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java/xerces/xerces-2.12.2-r2.ebuild')
-rw-r--r-- | dev-java/xerces/xerces-2.12.2-r2.ebuild | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/dev-java/xerces/xerces-2.12.2-r2.ebuild b/dev-java/xerces/xerces-2.12.2-r2.ebuild new file mode 100644 index 000000000000..aa988db5789b --- /dev/null +++ b/dev-java/xerces/xerces-2.12.2-r2.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc source" +MAVEN_ID="xerces:xercesImpl:2.12.2" + +inherit java-pkg-2 java-pkg-simple verify-sig + +DESCRIPTION="Xerces Java XML parser" +HOMEPAGE="https://xerces.apache.org/xerces2-j/index.html" +SRC_URI="mirror://apache/xerces/j/source/Xerces-J-src.${PV}.tar.gz + verify-sig? ( https://downloads.apache.org/xerces/j/source/Xerces-J-src.${PV}.tar.gz.asc )" + +LICENSE="Apache-2.0" +SLOT="2" +KEYWORDS="amd64 ~arm arm64 ppc64 x86" + +CP_DEPEND=" + dev-java/xml-commons-external:1.4 + dev-java/xml-commons-resolver:0" + +# JDK 11+ already privides the following file and the compilation +# fails if xerces provides it too. On contrary, compilation on 1.8 +# fails if we don't provide the file because it's not part of 1.8. +# By restricting compilation to 1.8 and providing the file we build +# a jar that should work both on 1.8 and also on the newer versions +# of JDK. +# the file: "org/w3c/dom/html/HTMLDOMImplementation.class" +DEPEND=" + ${CP_DEPEND} + >=virtual/jdk-1.8:*" + +RDEPEND=" + ${CP_DEPEND} + >=virtual/jre-1.8:*" + +BDEPEND="verify-sig? ( sec-keys/openpgp-keys-apache-xerces-j )" +VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/xerces-j.apache.org.asc" + +DOCS=( LICENSE NOTICE README {LICENSE.resolver,LICENSE.serializer,NOTICE.resolver,NOTICE.serializer}.txt ) +HTML_DOCS=( {LICENSE.DOM-documentation,LICENSE.DOM-software,LICENSE-SAX,Readme}.html ) + +S="${WORKDIR}/${P//./_}" + +JAVA_SRC_DIR="src" +JAVA_RESOURCE_DIRS="resources" + +src_prepare() { + java-pkg-2_src_prepare + # java-pkg-simple.eclass wants resources in JAVA_RESOURCE_DIRS + mkdir -p "resources/META-INF/services"|| die + pushd "src" > /dev/null || die + find -type f \ + \( -name 'javax.xml.*Factory' \ + -or -name '*DOMImplementationSourceList' \ + -or -name 'org.xml.sax.driver' \) \ + | xargs mv -t ../resources/META-INF/services || die + find -type f \ + ! -name '*.java' \ + ! -name 'manifest.xerces' \ + ! -name 'package.html' \ + ! -name '*Configuration' \ + ! -name '*DOMImplementationSourceImpl' \ + | xargs cp --parent -t ../resources || die + popd > /dev/null || die +} |