diff options
author | Miroslav Šulc <fordfrog@gentoo.org> | 2020-11-24 10:31:35 +0100 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2020-11-24 11:30:38 +0100 |
commit | 7eeb904ecaaef91de4c15d0989ec042801240385 (patch) | |
tree | e515dacf97f152fadd0d9308ac77002bfa73713b /dev-java | |
parent | net-libs/nghttp2: Bump to version 1.42.0 (diff) | |
download | gentoo-7eeb904ecaaef91de4c15d0989ec042801240385.tar.gz gentoo-7eeb904ecaaef91de4c15d0989ec042801240385.tar.bz2 gentoo-7eeb904ecaaef91de4c15d0989ec042801240385.zip |
dev-java/tomcat-servlet-api: bump to 9.0.40 + switch to java-pkg-simple
Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java')
3 files changed, 125 insertions, 0 deletions
diff --git a/dev-java/tomcat-servlet-api/Manifest b/dev-java/tomcat-servlet-api/Manifest index bf4067b1c5e3..23886f951672 100644 --- a/dev-java/tomcat-servlet-api/Manifest +++ b/dev-java/tomcat-servlet-api/Manifest @@ -4,3 +4,4 @@ DIST apache-tomcat-6.0.53-src.tar.gz 3522914 BLAKE2B 054b097c16861abaa8bdbeba713 DIST apache-tomcat-7.0.106-src.tar.gz 5302091 BLAKE2B f60975ef5570501b03e71645969170c44450f2b56f37688001ad1b4dce3a394f6800e9b28a8fabf59241116345fb7e2a287441f3eace020bc5c0203d57630c91 SHA512 5ce5a5af93c58e69c4758c2c0dedeadeceb6be920421b9d3b3d071d32fc8eb59ba8312c98d037b8434fe43d57a9f720ad8790de29a26ed2959f6c761fe1fd573 DIST apache-tomcat-8.5.59-src.tar.gz 5787634 BLAKE2B 8ca1aa8b4d12d0e73c0d7937e906530037168ac349b196e172935332e632b1e9ab15379f532cb8fb1b2f853d01567332af9c031393882c833dcea65f9e626b09 SHA512 bed80e86c4dc972fd6ad414a804ed2bffc797e22b0a5e0e6e93c8540fb87cffb2fd2f1f8d97873a3ee24397f7961a8fdeb6756c542a532e4b73468bccec6e626 DIST apache-tomcat-9.0.38-src.tar.gz 5948083 BLAKE2B ac076684f10a51bf0e0b5b0dbf18ee476ec900bead0089010de7b4a7d380a1e18035eaa0d0f661c863aa53491e51f719c2a5985e4791bcc9dada4c421db39fe7 SHA512 13c79abed71ead564b108ec8a046e78374611acd906f4b6e775ac0427446117192be6b25f29894e625e2dc13f79abbc97bc52b32120ce5701cbe0f5ae05bc57b +DIST apache-tomcat-9.0.40-src.tar.gz 6017562 BLAKE2B 1c90511911363bb3b154124382f6401851c3a0e7925e06cc8f2b4f02a7b4c1c59bc75007a8b387f06742cbeca7f840b6860d84dc7c6fdb1e7774b22dbca6082f SHA512 61b8e191315cee2bc0437013dbe7d1fb3451182e0b316fb377581c7d47a59cefb7f2ff30d96a2d6326a99c86f4151b26d1ef76bda5029b30d81c8297a0b362fb diff --git a/dev-java/tomcat-servlet-api/files/tomcat-servlet-api-9.0.40-patch-out-aQute.bnd.annotation.spi.ServiceConsumer.patch b/dev-java/tomcat-servlet-api/files/tomcat-servlet-api-9.0.40-patch-out-aQute.bnd.annotation.spi.ServiceConsumer.patch new file mode 100644 index 000000000000..86e9eeb8f19f --- /dev/null +++ b/dev-java/tomcat-servlet-api/files/tomcat-servlet-api-9.0.40-patch-out-aQute.bnd.annotation.spi.ServiceConsumer.patch @@ -0,0 +1,20 @@ +diff --git a/java/javax/el/ExpressionFactory.java b/java/javax/el/ExpressionFactory.java +index 2f42de7..5d52580 100644 +--- a/java/javax/el/ExpressionFactory.java ++++ b/java/javax/el/ExpressionFactory.java +@@ -36,13 +36,13 @@ import java.util.concurrent.locks.Lock; + import java.util.concurrent.locks.ReadWriteLock; + import java.util.concurrent.locks.ReentrantReadWriteLock; + +-import aQute.bnd.annotation.spi.ServiceConsumer; ++//import aQute.bnd.annotation.spi.ServiceConsumer; + + /** + * + * @since 2.1 + */ +-@ServiceConsumer(value=ExpressionFactory.class) ++//@ServiceConsumer(value=ExpressionFactory.class) + public abstract class ExpressionFactory { + + private static final boolean IS_SECURITY_ENABLED = diff --git a/dev-java/tomcat-servlet-api/tomcat-servlet-api-9.0.40.ebuild b/dev-java/tomcat-servlet-api/tomcat-servlet-api-9.0.40.ebuild new file mode 100644 index 000000000000..03de50ee0b26 --- /dev/null +++ b/dev-java/tomcat-servlet-api/tomcat-servlet-api-9.0.40.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +JAVA_PKG_IUSE="source" + +inherit eutils java-pkg-2 java-pkg-simple + +MY_A="apache-${PN}-${PV}-src" +MY_P="${MY_A/-servlet-api/}" +DESCRIPTION="Tomcat's Servlet API 4.0/JSP API 2.3/EL API 3.0 implementation" +HOMEPAGE="https://tomcat.apache.org/" +SRC_URI="mirror://apache/tomcat/tomcat-9/v${PV}/src/${MY_P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="4.0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris" +IUSE="" + +DEPEND=">=virtual/jdk-1.8" +RDEPEND=">=virtual/jre-1.8" + +S="${WORKDIR}/${MY_P}/" + +# we don't have the aQute.bnd.annotation.spi packaged +PATCHES=( + "${FILESDIR}/tomcat-servlet-api-9.0.40-patch-out-aQute.bnd.annotation.spi.ServiceConsumer.patch" +) + +JAVA_TEST_SRC_DIR="src/test" + +SERVLET_API_JAR="servlet-api.jar" +SERVLET_API_SRC="src/main/servlet-api" +SERVLET_API_RESOURCES="src/resources/servlet-api" +EL_API_JAR="el-api.jar" +EL_API_SRC="src/main/el-api" +EL_API_RESOURCES="src/resources/el-api" +JSP_API_JAR="jsp-api.jar" +JSP_API_SRC="src/main/jsp-api" +JSP_API_RESOURCES="src/resources/jsp-api" + +src_prepare() { + default + + # The sources and also resources are mixed together so we first give it a structure to make it easier to compila and package + + mkdir -p ${SERVLET_API_SRC} ${SERVLET_API_RESOURCES} \ + ${EL_API_SRC} ${EL_API_RESOURCES} \ + ${JSP_API_SRC}/javax/servlet ${JSP_API_RESOURCES} \ + ${JAVA_TEST_SRC_DIR} || die "Failed to create source directory" + + pushd java || die "Failed to cd to java dir" + + cp --parents -R javax/servlet "${S}/${SERVLET_API_SRC}/" || die "Failed to copy servlet-api sources" + mv "${S}/${SERVLET_API_SRC}/javax/servlet/jsp" "${S}/${JSP_API_SRC}/javax/servlet" || die "Failed to copy jsp-api sources" + cp --parents -R javax/el "${S}/${EL_API_SRC}/" || die "Failed to copy el-api sources" + + popd + + for file in $(find src -type f | grep -vE "\.java$"); do + target_dir=$(dirname $file | sed "s%src/main/%src/resources/%g") + mkdir -p ${target_dir} || die "Failed to create resource directory" + mv $file ${target_dir} || die "Failed to move resource file" + done + + mv test/javax ${JAVA_TEST_SRC_DIR} || die "Failed to copy test sources" + + java-pkg-2_src_prepare +} + +src_compile() { + JAVA_SRC_DIR="${SERVLET_API_SRC}" + JAVA_RESOURCE_DIRS="${SERVLET_API_RESOURCES}" + JAVA_JAR_FILENAME="${SERVLET_API_JAR}" + java-pkg-simple_src_compile + rm -fr target || die "Failed to remove compiled files" + + JAVA_SRC_DIR="${EL_API_SRC}" + JAVA_RESOURCE_DIRS="${EL_API_RESOURCES}" + JAVA_JAR_FILENAME="${EL_API_JAR}" + java-pkg-simple_src_compile + rm -fr target || die "Failed to remove compiled files" + + JAVA_SRC_DIR="${JSP_API_SRC}" + JAVA_RESOURCE_DIRS="${JSP_API_RESOURCES}" + JAVA_JAR_FILENAME="${JSP_API_JAR}" + JAVA_GENTOO_CLASSPATH_EXTRA="servlet-api.jar:el-api.jar" + java-pkg-simple_src_compile +} + +src_install() { + JAVA_SRC_DIR="${SERVLET_API_SRC}" + JAVA_JAR_FILENAME="${SERVLET_API_JAR}" + java-pkg-simple_src_install + + JAVA_SRC_DIR="${EL_API_SRC}" + JAVA_JAR_FILENAME="${EL_API_JAR}" + java-pkg-simple_src_install + + JAVA_SRC_DIR="${JSP_API_SRC}" + JAVA_JAR_FILENAME="${JSP_API_JAR}" + java-pkg-simple_src_install +} |