Gentoo Archives: gentoo-commits

From: Arthur Zamarin <arthurzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/jffi/
Date: Thu, 25 Aug 2022 18:52:43
Message-Id: 1661453550.4c37294de4ddb2980476127d37bef5eb4d279608.arthurzam@gentoo
1 commit: 4c37294de4ddb2980476127d37bef5eb4d279608
2 Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
3 AuthorDate: Thu Aug 25 05:12:27 2022 +0000
4 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 25 18:52:30 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c37294d
7
8 dev-java/jffi: drop 1.3.9
9
10 Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
11 Closes: https://github.com/gentoo/gentoo/pull/27009
12 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
13
14 dev-java/jffi/jffi-1.3.9.ebuild | 97 -----------------------------------------
15 1 file changed, 97 deletions(-)
16
17 diff --git a/dev-java/jffi/jffi-1.3.9.ebuild b/dev-java/jffi/jffi-1.3.9.ebuild
18 deleted file mode 100644
19 index d74a2940741e..000000000000
20 --- a/dev-java/jffi/jffi-1.3.9.ebuild
21 +++ /dev/null
22 @@ -1,97 +0,0 @@
23 -# Copyright 1999-2022 Gentoo Authors
24 -# Distributed under the terms of the GNU General Public License v2
25 -
26 -# Skeleton command:
27 -# java-ebuilder --generate-ebuild --workdir . --pom pom.xml --download-uri https://github.com/jnr/jffi/archive/jffi-1.3.9.tar.gz --slot 1.3 --keywords "~amd64 ~arm64 ~ppc64 ~x86" --ebuild jffi-1.3.9.ebuild
28 -
29 -EAPI=8
30 -
31 -JAVA_PKG_IUSE="doc source test"
32 -MAVEN_ID="com.github.jnr:jffi:1.3.9"
33 -JAVA_TESTING_FRAMEWORKS="junit-4"
34 -
35 -inherit java-pkg-2 java-pkg-simple
36 -
37 -DESCRIPTION="Java Foreign Function Interface"
38 -HOMEPAGE="https://github.com/jnr/jffi"
39 -SRC_URI="https://github.com/jnr/${PN}/archive/refs/tags/${P}.tar.gz"
40 -
41 -LICENSE="Apache-2.0"
42 -SLOT="1.3"
43 -KEYWORDS="amd64 arm64 ~ppc64 x86"
44 -
45 -DEPEND=">=virtual/jdk-1.8:*"
46 -RDEPEND=">=virtual/jre-1.8:*"
47 -
48 -PATCHES=( "${FILESDIR}"/jffi-1.3.8-GNUmakefile.patch )
49 -
50 -S="${WORKDIR}/${PN}-${P}"
51 -
52 -JAVA_SRC_DIR="src/main/java"
53 -
54 -# https://github.com/jnr/jffi/blob/b6ad5c066a6346072ea04f8ffa8177204aadcb13/build.xml#L26
55 -JAVA_TEST_EXTRA_ARGS="-Djffi.library.path=${S}/build/jni -Djffi.boot.library.path=${S}/build/jni"
56 -JAVA_TEST_GENTOO_CLASSPATH="junit-4"
57 -JAVA_TEST_SRC_DIR="src/test/java"
58 -
59 -src_prepare() {
60 - default
61 - cat > src/main/java/com/kenai/jffi/Version.java <<-EOF
62 - package com.kenai.jffi;
63 - import java.lang.annotation.Native;
64 - public final class Version {
65 - private Version() {}
66 - @Native
67 - public static final int MAJOR = $(ver_cut 1);
68 - @Native
69 - public static final int MINOR = $(ver_cut 2);
70 - @Native
71 - public static final int MICRO = $(ver_cut 3);
72 - }
73 - EOF
74 -}
75 -
76 -src_compile() {
77 - java-pkg-simple_src_compile
78 -
79 - # generate headers
80 - mkdir -p build/jni
81 - javac -h build/jni -classpath target/classes \
82 - ${JAVA_SRC_DIR}/com/kenai/jffi/{Foreign,ObjectBuffer,Version}.java \
83 - || die
84 -
85 - #build native library.
86 - local args=(
87 - SRC_DIR=jni
88 - JNI_DIR=jni
89 - BUILD_DIR=build/jni
90 - VERSION=$(ver_cut 1-2)
91 - USE_SYSTEM_LIBFFI=1
92 - CCACHE=
93 - -f jni/GNUmakefile
94 - )
95 - emake "${args[@]}"
96 -}
97 -
98 -src_test() {
99 - # build native test library
100 - emake BUILD_DIR=build -f libtest/GNUmakefile
101 -
102 - # https://github.com/jnr/jffi/issues/60
103 - LC_ALL=C java-pkg-simple_src_test
104 -}
105 -
106 -src_install() {
107 - default
108 -
109 - local libname=".so"
110 - java-pkg_doso build/jni/lib${PN}-$(ver_cut 1-2)${libname}
111 -
112 - # must be after _doso to have JAVA_PKG_LIBDEST set
113 - cat > boot.properties <<-EOF
114 - jffi.boot.library.path = ${JAVA_PKG_LIBDEST}
115 - EOF
116 - jar -uf ${PN}.jar boot.properties || die
117 -
118 - java-pkg-simple_src_install
119 -}