commit:     ea58134712a258ee1db3a1da79677b3c8a463e3f
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  5 14:14:25 2021 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Mon Jul  5 14:15:18 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea581347

dev-java/tomcat-servlet-api: bump to 9.0.50

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 dev-java/tomcat-servlet-api/Manifest               |  1 +
 .../tomcat-servlet-api-9.0.50.ebuild               | 99 ++++++++++++++++++++++
 2 files changed, 100 insertions(+)

diff --git a/dev-java/tomcat-servlet-api/Manifest 
b/dev-java/tomcat-servlet-api/Manifest
index 62e1860557e..8fbc2f2efce 100644
--- a/dev-java/tomcat-servlet-api/Manifest
+++ b/dev-java/tomcat-servlet-api/Manifest
@@ -8,3 +8,4 @@ DIST apache-tomcat-8.5.66-src.tar.gz 5879748 BLAKE2B 
bfef20872bd19ffa2bb34b98a1d
 DIST apache-tomcat-8.5.68-src.tar.gz 5907026 BLAKE2B 
2312edb94f98ee98b594325fbc32521776e9cadc4422a3a46f3651f1fee072a99c5f6874378ac06215396504d34ad750edd6ec3399a3931554068195a8ee15ef
 SHA512 
579a35f944ead756995d288b66ea8a4ab30289a90c32aa01119abcea85a8524f6594ce5cb7ac9df6d352c1e3b54a18c814b5d3a6409dce6a43614e3a89284066
 DIST apache-tomcat-9.0.46-src.tar.gz 6068533 BLAKE2B 
400814281aedd588c008a1363199f8602e856870d4c39d536b13f8a357c2390d2db689940f4a6971ec74a84e8e400174e72610e0d64a220de41f2dff419dda3c
 SHA512 
dc380e23aa87273c6ba32e79659e768c551b07812635c2f1c62d2c34b493b1d3d51b4548fec5014fdb36f8461fc90942aa7917874ddf3d6f5c5345d8ca02dfc1
 DIST apache-tomcat-9.0.48-src.tar.gz 6080015 BLAKE2B 
9b2cac8143ca8186857d7d53e8737f2f7d2ec8e0ca03d32447ad25b429cbf37c1c7b39bc6e4b93679c08bd5f4940280d00946a70e9fa82f8c2a596ea18a2a4c6
 SHA512 
9b762f6d1a1f6c75e10f1bc05c39a647ae2165f3b81c09ff73cc286f3c487b034b9d14c73b808c73b35f55f642848831a0329d9d611c8bbb3928559e552a3ff3
+DIST apache-tomcat-9.0.50-src.tar.gz 6086608 BLAKE2B 
59b5eb1616d377193f330fd8c5abb6e98926ab0a2f75b1ea14251d249837aad733f55a0b79f2a67de57f612dd1afdeae53836be97e81701d8dc27ecb0a381d4a
 SHA512 
1032d2d5c342fb495b76426fdc301e0e5546815e709e604061d7aa2cdab19bcd376adc957fd25dee1d574306186eafd2e9d24140dd5e725b130128592cac47a2

diff --git a/dev-java/tomcat-servlet-api/tomcat-servlet-api-9.0.50.ebuild 
b/dev-java/tomcat-servlet-api/tomcat-servlet-api-9.0.50.ebuild
new file mode 100644
index 00000000000..4a8d22d1286
--- /dev/null
+++ b/dev-java/tomcat-servlet-api/tomcat-servlet-api-9.0.50.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+JAVA_PKG_IUSE="source"
+
+inherit 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 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x64-solaris 
~x86-solaris"
+IUSE=""
+
+DEPEND=">=virtual/jdk-1.8:*"
+RDEPEND=">=virtual/jre-1.8:*"
+
+S="${WORKDIR}/${MY_P}/"
+
+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
+}

Reply via email to