summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatoro <matoro@users.noreply.github.com>2022-06-29 17:48:52 -0400
committerFlorian Schmaus <flow@gentoo.org>2022-07-05 14:02:35 +0200
commite11afbfd0b521aa9e9849a99429b5c07e76fba49 (patch)
treeae214dc243475c3c6c5e35e08fd4b54681d9ea95 /dev-java
parentapp-editors/emacs: Don't call eautoreconf for pretest version (diff)
downloadgentoo-e11afbfd0b521aa9e9849a99429b5c07e76fba49.tar.gz
gentoo-e11afbfd0b521aa9e9849a99429b5c07e76fba49.tar.bz2
gentoo-e11afbfd0b521aa9e9849a99429b5c07e76fba49.zip
dev-java/java-service-wrapper: add 3.5.50
Replaces as-needed patch with a sed. Also fixes bitness detection to reflect actual use in ant build.xml. Bug: https://bugs.gentoo.org/834926 Closes: https://bugs.gentoo.org/786378 Signed-off-by: matoro <matoro@users.noreply.github.com> Closes: https://github.com/gentoo/gentoo/pull/26156 Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/java-service-wrapper/Manifest1
-rw-r--r--dev-java/java-service-wrapper/java-service-wrapper-3.5.50.ebuild88
2 files changed, 89 insertions, 0 deletions
diff --git a/dev-java/java-service-wrapper/Manifest b/dev-java/java-service-wrapper/Manifest
index 4d19c3dcacee..684084d87d08 100644
--- a/dev-java/java-service-wrapper/Manifest
+++ b/dev-java/java-service-wrapper/Manifest
@@ -1 +1,2 @@
DIST wrapper_3.5.25_src.tar.gz 556678 BLAKE2B bead95eb2feebe0c22f8c66ca948185c320a979e498fb5156de576d443ba6e3375efb6244a66db6af101fa7dc459d983b51631fc237ad4578505be47059cf2c7 SHA512 4ce8ab5dc7acc4d78e7b902a61bb1e3785b5455f81438aa61a877107647e88ade595075ff0b8d5db0ff2b33bb94d70c2b1331561d6d282e497998eea9494c6f4
+DIST wrapper_3.5.50_src.tar.gz 779253 BLAKE2B 64863e408c2147014946f869bbd98775d1d23d4cd63ef562167f40191febf87cc72697a55fe2ec6a5d085f3df4897cc4485f4ed88a3ee3a7f7930215448972f7 SHA512 403deec1bcc70a93ce0b0749bf2d5bc27a4a540d07785bc3ac83b38257cc5e8247a784f646770c96ac318f22d30c463dafb2f002720041b93443b292d6669c09
diff --git a/dev-java/java-service-wrapper/java-service-wrapper-3.5.50.ebuild b/dev-java/java-service-wrapper/java-service-wrapper-3.5.50.ebuild
new file mode 100644
index 000000000000..7b3ea7c6098b
--- /dev/null
+++ b/dev-java/java-service-wrapper/java-service-wrapper-3.5.50.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+inherit java-pkg-2 java-pkg-simple toolchain-funcs java-ant-2
+JAVA_TESTING_FRAMEWORKS="junit-4"
+
+MY_P="wrapper_${PV}_src"
+DESCRIPTION="A wrapper that makes it possible to install a Java Application as daemon"
+HOMEPAGE="https://wrapper.tanukisoftware.org/"
+SRC_URI="https://download.tanukisoftware.com/wrapper/${PV}/wrapper_${PV}_src.tar.gz"
+
+LICENSE="tanuki-community"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=virtual/jre-1.8:*"
+DEPEND="
+ >=virtual/jdk-1.8:*
+ test? (
+ dev-java/junit:4
+ dev-util/cunit
+ )"
+BDEPEND="virtual/jdk"
+
+S="${WORKDIR}/${MY_P}"
+
+JAVA_SRC_DIR="src/java/"
+JAVA_JAR_FILENAME="wrapper.jar"
+JAVA_TEST_SRC_DIR="src/test"
+JAVA_TEST_GENTOO_CLASSPATH="junit-4"
+
+src_prepare() {
+ default
+
+ # replaces as-needed.patch
+ sed -i \
+ -e 's/gcc/$(CC)/g' \
+ -e 's/$(COMPILE) -pthread/$(COMPILE) $(CFLAGS) $(LDFLAGS) -pthread/g' \
+ -e 's/${COMPILE} -shared/${COMPILE} $(LDFLAGS) -shared/g' \
+ -e 's/$(COMPILE) -c/$(COMPILE) $(CFLAGS) -c/g' \
+ -e 's/$(COMPILE) $(DEFS)/$(COMPILE) $(CFLAGS) $(DEFS)/g' \
+ -e 's/$(COMPILE) -DCUNIT/$(COMPILE) $(CFLAGS) $(LDFLAGS) -DCUNIT/g' \
+ -e 's/$(TEST)\/testsuite/testsuite/g' \
+ src/c/Makefile-*.make || die
+
+ cp "${S}/src/c/Makefile-linux-armel-32.make" "${S}/src/c/Makefile-linux-arm-32.make"
+ java-pkg-2_src_prepare
+
+ # enable tests on all platforms
+ grep "testsuite_SOURCE" "src/c/Makefile-linux-x86-64.make" | tee -a src/c/Makefile-*.make || die
+ if use test; then
+ echo 'all: testsuite' | tee -a src/c/Makefile-*.make
+ assert
+ fi
+}
+
+src_compile() {
+ tc-export CC
+ pushd "${T}" || die
+ echo 'public class GetArchDataModel{public static void main(String[] args){System.out.println(System.getProperty("sun.arch.data.model"));}}' \
+ > GetArchDataModel.java || die
+ ejavac GetArchDataModel.java
+ local BITS
+ BITS="$(java GetArchDataModel)"
+ [[ "${?}" == "0" ]] || die "Failed to identify sun.arch.data.model property"
+ popd || die
+ eant -Dbits="${BITS}" compile-c
+ java-pkg-simple_src_compile
+}
+
+src_test() {
+ src/c/testsuite --basic || die
+ java-pkg-simple_src_test
+}
+
+src_install() {
+ java-pkg-simple_src_install
+ java-pkg_doso lib/libwrapper.so
+
+ dobin bin/wrapper
+ dodoc README*.txt
+ dodoc doc/revisions.txt
+}