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/java-service-wrapper/java-service-wrapper-3.5.50.ebuild
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/java-service-wrapper/java-service-wrapper-3.5.50.ebuild')
-rw-r--r--dev-java/java-service-wrapper/java-service-wrapper-3.5.50.ebuild88
1 files changed, 88 insertions, 0 deletions
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
+}