Diff jansi-1.13 with a jansi-2.4.0-r1

/usr/portage/dev-java/jansi/jansi-2.4.0-r1.ebuild 2023-10-09 14:52:29.428368349 +0300
1
# Copyright 1999-2021 Gentoo Authors
1
# Copyright 1999-2022 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
# Skeleton command:
5
# java-ebuilder --generate-ebuild --workdir . --pom pom.xml --download-uri https://github.com/fusesource/jansi/archive/refs/tags/jansi-2.4.0.tar.gz --slot 0 --keywords "~amd64 ~arm ~arm64 ~ppc64 ~x86" --ebuild jansi-2.4.0.ebuild
5 6

  
6
JAVA_PKG_IUSE="doc source test"
7
MAVEN_ID="org.fusesource.jansi:jansi:1.13"
8
JAVA_TESTING_FRAMEWORKS="junit-4"
7
EAPI=8
9 8

  
10
inherit java-pkg-2 java-pkg-simple
9
JAVA_PKG_IUSE="doc source"
10
MAVEN_ID="org.fusesource.jansi:jansi:2.4.0"
11 11

  
12
DESCRIPTION="A library that allows you to use ANSI escape sequences in your console output"
13
HOMEPAGE="https://fusesource.github.io/jansi/"
14
SRC_URI="https://github.com/fusesource/${PN}/archive/${PN}-project-${PV}.tar.gz -> ${P}.tar.gz"
12
inherit java-pkg-2 java-pkg-simple toolchain-funcs
13

  
14
DESCRIPTION="Jansi is a java library for generating and interpreting ANSI escape sequences."
15
HOMEPAGE="http://fusesource.github.io/jansi"
16
SRC_URI="https://github.com/fusesource/${PN}/archive/refs/tags/${P}.tar.gz"
15 17

  
16 18
LICENSE="Apache-2.0"
17
SLOT="0"
19
SLOT="2"
18 20
KEYWORDS="amd64 ~arm arm64 ppc64 x86"
19 21

  
20
CDEPEND="dev-java/jansi-native:0"
22
# Compile dependencies
23
# POM: pom.xml
24
# test? info.picocli:picocli-codegen:4.5.2 -> !!!artifactId-not-found!!!
25
# test? org.junit.jupiter:junit-jupiter:5.7.0 -> !!!groupId-not-found!!!
26
# test? org.junit.jupiter:junit-jupiter-params:5.7.0 -> !!!groupId-not-found!!!
27

  
28
DEPEND=">=virtual/jdk-1.8:*"
29

  
30
# junit-jupiter is not available in ::gentoo
31
#	test? (
32
#		!!!artifactId-not-found!!!
33
#		!!!groupId-not-found!!!
34
#	)
35
#"
21 36

  
22
DEPEND="${CDEPEND}
23
	test? (
24
		dev-java/junit:4
25
	)
26
	>=virtual/jdk-1.8:*"
37
RDEPEND=">=virtual/jre-1.8:*"
27 38

  
28
RDEPEND="${CDEPEND}
29
	>=virtual/jre-1.8:*"
39
DOCS=( {changelog,readme}.md license.txt )
30 40

  
31
S="${WORKDIR}/jansi-jansi-project-${PV}/jansi"
41
S="${WORKDIR}/${PN}-${P}"
32 42

  
33
JAVA_GENTOO_CLASSPATH="jansi-native"
34 43
JAVA_SRC_DIR="src/main/java"
44
JAVA_RESOURCE_DIRS="src/main/resources"
45
JAVA_MAIN_CLASS="org.fusesource.jansi.AnsiMain"
46

  
47
# junit-jupiter is not available in ::gentoo
48
#JAVA_TEST_GENTOO_CLASSPATH="!!!artifactId-not-found!!!,!!!groupId-not-found!!!,!!!groupId-not-found!!!"
49
#JAVA_TEST_SRC_DIR="src/test/java"
50
#JAVA_TEST_RESOURCE_DIRS="src/test/resources"
51

  
52
src_prepare() {
53
	default
54
	# Remove this directory containing libjansi.so, libjansi.jnilib and jansi.dll
55
	rm -r "${JAVA_RESOURCE_DIRS}/org/fusesource/jansi/internal/native" || die
56
}
57

  
58
src_compile() {
59
	java-pkg-simple_src_compile
60

  
61
	# build native library.
62
	local args=(
63
		CCFLAGS="${CFLAGS} ${CXXFLAGS} -Os -fPIC -fvisibility=hidden"
64
		LINKFLAGS="-shared ${LDFLAGS}"
65
		CC="$(tc-getCC)"
66
		STRIP="$(tc-getSTRIP)"
67
		LIBNAME="libjansi-$(ver_cut 1-2).so"
68
	)
69
	emake "${args[@]}" native
70
}
35 71

  
36
JAVA_TEST_GENTOO_CLASSPATH="junit-4"
37
JAVA_TEST_SRC_DIR="src/test/java"
38
JAVA_TEST_RESOURCE_DIRS="src/test/resources"
72
src_install() {
73
	# default # https://bugs.gentoo.org/789582
74
	# default fails with
75
	# make: *** No rule to make target 'install'.  Stop.
76
	java-pkg_doso target/native--/libjansi-$(ver_cut 1-2).so
77
	java-pkg-simple_src_install
78
}
Thank you!