Diff tomcat-servlet-api-5.5.34 with a tomcat-servlet-api-6.0.44-r1

/usr/portage/dev-java/tomcat-servlet-api/tomcat-servlet-api-6.0.44-r1.ebuild 2018-03-01 12:08:00.000000000 +0300
1 1
# Copyright 1999-2018 Gentoo Foundation
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=0
4
EAPI="5"
5
JAVA_PKG_IUSE="source"
5 6

  
6
inherit eutils java-pkg-2 java-ant-2 java-osgi
7
inherit eutils java-pkg-2 java-ant-2
7 8

  
8
MY_P="apache-${P/-servlet-api/}-src"
9
DESCRIPTION="Tomcat's Servlet API 2.4/JSP API 2.0 implementation"
9
MY_A="apache-${P}-src"
10
MY_P="${MY_A/-servlet-api/}"
11
DESCRIPTION="Tomcat's Servlet API 2.5/JSP API 2.1 implementation"
10 12
HOMEPAGE="http://tomcat.apache.org/"
11
SRC_URI="mirror://apache/tomcat/tomcat-5/v${PV/_/-}/src/${MY_P}.tar.gz"
13
SRC_URI="mirror://apache/tomcat/tomcat-6/v${PV}/src/${MY_P}.tar.gz"
12 14

  
13 15
LICENSE="Apache-2.0"
14
SLOT="2.4"
15
KEYWORDS="amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
16
IUSE="doc source"
17

  
18
DEPEND=">=virtual/jdk-1.5
19
	source? ( app-arch/zip )"
20
RDEPEND=">=virtual/jdk-1.5"
21

  
22
S="${WORKDIR}/${MY_P}/servletapi"
23

  
24
src_compile() {
25
	local antflags="jar $(use_doc javadoc examples)"
26
	eant ${antflags} -f jsr154/build.xml
27
	eant ${antflags} -f jsr152/build.xml
16
SLOT="2.5"
17
KEYWORDS="amd64 ~arm ppc64 x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
18
IUSE=""
19

  
20
DEPEND=">=virtual/jdk-1.6"
21
RDEPEND=">=virtual/jre-1.6"
22

  
23
S="${WORKDIR}/${MY_P}"
24

  
25
java_prepare() {
26
	cp "${FILESDIR}/${SLOT}-build-r1.xml" build.xml || die "Could not replace build.xml"
27
	rm -r */*/build.xml java/javax/{annotation,ejb,mail,persistence,xml}/ || die
28
	find -name '*.jar' -delete || die
28 29
}
29 30

  
30 31
src_install() {
31
	mv jsr{154,152}/dist/lib/*.jar "${S}"
32

  
33
	if use doc ; then
34
		mkdir docs
35
		cd "${S}/jsr154/build"
36
		mv docs "${S}/docs/servlet"
37
		mv examples "${S}/docs/servlet/examples"
38

  
39
		cd "${S}/jsr152/build"
40
		mv docs "${S}/docs/jsp"
41
		mv examples "${S}/docs/jsp/examples"
42
	fi
43

  
44
	cd "${S}"
45
	java-osgi_dojar-fromfile --no-auto-version "jsp-api.jar" "${FILESDIR}/jsp-api-2.0-manifest" "Java Server Pages API Bundle"
46
	java-osgi_dojar-fromfile --no-auto-version "servlet-api.jar" "${FILESDIR}/servlet-api-2.4-manifest" "Servlet API Bundle"
47
	use doc && java-pkg_dohtml -r docs/*
48
	use source && java-pkg_dosrc jsr{152,154}/src/share/javax
32
	java-pkg_dojar "${S}"/output/build/lib/*.jar
33
	use source && java-pkg_dosrc java/javax
49 34
}
Thank you!