Сравнение tomcat-8.5.93 с tomcat-9.0.80

/usr/portage/www-servers/tomcat/tomcat-9.0.80.ebuild 2023-10-09 14:52:35.900368512 +0300
7 7

  
8 8
inherit java-pkg-2 java-ant-2 prefix verify-sig
9 9

  
10
MY_P="apache-${P}-src"
10
MY_P="apache-${PN}-${PV}-src"
11 11

  
12
DESCRIPTION="Tomcat Servlet-3.1/JSP-2.3/EL-3.0/WebSocket-1.1/JASPIC-1.1 Container"
12
# Currently we bundle binary versions of bnd.jar
13
# See bugs #203080 and #676116
14
BND_VERSION="6.4.0"
15
BND="biz.aQute.bnd-${BND_VERSION}.jar"
16

  
17
DESCRIPTION="Tomcat Servlet-4.0/JSP-2.3/EL-3.0/WebSocket-1.1/JASPIC-1.1 Container"
13 18
HOMEPAGE="https://tomcat.apache.org/"
14
SRC_URI="mirror://apache/${PN}/tomcat-8/v${PV}/src/${MY_P}.tar.gz
19
SRC_URI="mirror://apache/${PN}/tomcat-9/v${PV}/src/${MY_P}.tar.gz
20
	https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bnd/${BND_VERSION}/${BND}
15 21
	verify-sig? ( https://downloads.apache.org/tomcat/tomcat-$(ver_cut 1)/v${PV}/src/apache-tomcat-${PV}-src.tar.gz.asc )"
16 22

  
17 23
LICENSE="Apache-2.0"
18
SLOT="8.5"
19
KEYWORDS="amd64 ~x86 ~amd64-linux ~x86-linux"
24
SLOT="9"
25
KEYWORDS="amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
20 26
IUSE="extra-webapps"
21 27

  
22 28
RESTRICT="test" # can we run them on a production system?
23 29

  
30
# though it could work with 4.22 and upstream uses 4.20,
31
# we still use 4.15 because 4.20+ is currently built with java 11
32
# and it would force Tomcat to use at least java 11 too
24 33
ECJ_SLOT="4.15"
25 34

  
26
# we don't use ~ for el and jsp because the same implementation
27
# is also present in tomcat 9 and it would be impossible to install
28
# both tomcat 8.5 and 9 at the same time
29
COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT}"
35
COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT}
36
	dev-java/jax-rpc-api:0
37
	dev-java/wsdl4j:0"
30 38
RDEPEND="${COMMON_DEP}
31 39
	acct-group/tomcat
32 40
	acct-user/tomcat
......
35 43
	app-admin/pwgen
36 44
	dev-java/ant-core
37 45
	>=virtual/jdk-1.8:*
38
	doc? (
39
		dev-java/jax-rpc-api:0
40
		dev-java/wsdl4j:0
41
	)
42 46
	test? (
43
		>=dev-java/ant-junit-1.9:0
47
		dev-java/ant-junit
44 48
		dev-java/easymock:3.2
45 49
	)"
46 50

  
47 51
BDEPEND="verify-sig? ( ~sec-keys/openpgp-keys-apache-tomcat-${PV}:${PV} )"
48 52
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/tomcat-${PV}.apache.org.asc"
49 53

  
50
PATCHES=( "${FILESDIR}/${PN}-8.5.86-build.xml.patch" )
51

  
52 54
S=${WORKDIR}/${MY_P}
53 55

  
56
PATCHES=(
57
	"${FILESDIR}/${PN}-9.0.50-insufficient-ecj.patch"
58
	"${FILESDIR}/${PN}-9.0.72-build.xml.patch"
59
)
60

  
61
BND_HOME="${S}/tomcat-build-libs/bnd"
62
BND_JAR="${BND_HOME}/${BND}"
63

  
64
src_unpack() {
65
	if use verify-sig; then
66
		verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.asc}
67
	fi
68

  
69
	unpack ${MY_P}.tar.gz
70

  
71
	mkdir -p "${BND_HOME}" || die "Failed to create dir"
72
	ln -s "${DISTDIR}/${BND}" "${BND_HOME}/" || die "Failed to symlink bnd-*.jar"
73
}
74

  
54 75
src_prepare() {
55 76
	default
56 77

  
......
67 88
JAVA_ANT_REWRITE_CLASSPATH="true"
68 89

  
69 90
EANT_BUILD_TARGET="deploy"
70
EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT}"
91
EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},wsdl4j"
71 92
EANT_TEST_GENTOO_CLASSPATH="easymock-3.2"
72 93
EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes"
73 94
EANT_NEEDS_TOOLS="true"
74
EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false -Dexecute.validate=false"
95
EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false -Dbnd.jar=${BND_JAR}"
75 96

  
76 97
# revisions of the scripts
77 98
IM_REV="-r2"
78 99
INIT_REV="-r1"
79 100

  
101
src_configure() {
102
	java-ant-2_src_configure
103

  
104
	eapply "${FILESDIR}/${PN}-9.0.37-fix-build-rewrite.patch"
105
}
106

  
80 107
src_compile() {
81
	EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)"
82
	use doc && EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjars --build-only jax-rpc-api):$(java-pkg_getjars --build-only wsdl4j)"
108
	EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar):$(java-pkg_getjars --build-only jax-rpc-api)"
83 109
	LC_ALL=C java-pkg-2_src_compile
84 110
}
85 111

  
Спасибо!