summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-java/owasp-java-encoder/Manifest1
-rw-r--r--dev-java/owasp-java-encoder/owasp-java-encoder-1.3.1.ebuild34
2 files changed, 35 insertions, 0 deletions
diff --git a/dev-java/owasp-java-encoder/Manifest b/dev-java/owasp-java-encoder/Manifest
index 5e218dde6c1d..6aa812578540 100644
--- a/dev-java/owasp-java-encoder/Manifest
+++ b/dev-java/owasp-java-encoder/Manifest
@@ -1,2 +1,3 @@
DIST owasp-java-encoder-1.2.3.tar.gz 134303 BLAKE2B 76b9652863fcdfdce82bd26062fa500bb92b21ba6edff7b3f409a1375e135176f826dca4bb02b4dd48905112ae20a0af0a1f09cb4e21ea41c672a44c52fea209 SHA512 19c13894ce68325553bdbee41190cb113d698c79ec74885604fd9db4f083efe0fcdc4313b7191014bfd972d0ee52f0fbe0621d7bb407745bd1feeb2ac9e49783
DIST owasp-java-encoder-1.3.0.tar.gz 150029 BLAKE2B 31e350f02a7374f809e435d90ee9b4b1424cd9cb2da7d4062dfe0fc5898e02623496e464483bafd550b82b926260ab4df918f9be776e47f66587c6bc3829ebba SHA512 0ccdd6ae63e657ee28a4d9de7664269eff57802bddb03c7163fdb27326668256573d995b0111dc83cc1e5a6acc247e03da443f4b34c08cf99b085ec0a383a439
+DIST owasp-java-encoder-1.3.1.tar.gz 150103 BLAKE2B 6fc372364a13df497b1f5380d1d9b1c90e0981bfa059c31f2d138a3d0db3210105d0055b2a39a341cb3374b8149c5d61e1f967677e1159e843bb0143713e58b2 SHA512 9a75dea53e2859a4a213e2a511440c1bcbaea6c7a13fece674d155bc859f049fd45bbbd83fd6869a792af3b0e3f447e90ab450545684aa5ccc5b88a051114cdc
diff --git a/dev-java/owasp-java-encoder/owasp-java-encoder-1.3.1.ebuild b/dev-java/owasp-java-encoder/owasp-java-encoder-1.3.1.ebuild
new file mode 100644
index 000000000000..84640fdb1e59
--- /dev/null
+++ b/dev-java/owasp-java-encoder/owasp-java-encoder-1.3.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 2023-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="org.owasp.encoder:encoder:${PV}"
+JAVA_TESTING_FRAMEWORKS="junit-4"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="OWASP Java Encoder"
+HOMEPAGE="https://owasp.org/www-project-java-encoder/"
+SRC_URI="https://github.com/OWASP/owasp-java-encoder/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${P}/core"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND=">=virtual/jdk-1.8:*"
+RDEPEND=">=virtual/jre-1.8:*"
+
+# skipping 10 tests because they seem to be unreliable depending on hardware used
+# as some of them fail on some setups because the benchmark results don't align
+# with the hardcoded value 200 for the expected results. here are some examples:
+# Benchmarked Encode.forJavaScript: 442,382250 ns/op (+253,85% on baseline)
+# Benchmarked Encode.forCssString: 446,929231 ns/op (+257,49% on baseline)
+# Benchmarked Encode.forJava: 409,038065 ns/op (+227,18% on baseline)
+JAVA_RM_FILES=( src/test/java/org/owasp/encoder/BenchmarkTest.java )
+JAVA_SRC_DIR="src/main/java"
+JAVA_TEST_GENTOO_CLASSPATH="junit-4"
+JAVA_TEST_RESOURCE_DIRS="src/test/resources"
+JAVA_TEST_SRC_DIR="src/test/java"