diff options
author | Volkmar W. Pogatzki <gentoo@pogatzki.net> | 2023-02-11 20:28:57 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-03-11 17:15:09 +0000 |
commit | 42e9cb1b9df3c3b073c9f4280444d7d214c0bf1f (patch) | |
tree | a4c8e70a59045cd5531e23abe471a8e87d74a501 | |
parent | games-strategy/freecol: update upstream metadata (diff) | |
download | gentoo-42e9cb1b9df3c3b073c9f4280444d7d214c0bf1f.tar.gz gentoo-42e9cb1b9df3c3b073c9f4280444d7d214c0bf1f.tar.bz2 gentoo-42e9cb1b9df3c3b073c9f4280444d7d214c0bf1f.zip |
dev-java/miglayout: add 5.3
Thia package is needed by >=games-strategy/freecol-1.0.0 and it contains
only those 2 modules needed there:
- miglayout-core
- miglayout-swing
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | dev-java/miglayout/Manifest | 1 | ||||
-rw-r--r-- | dev-java/miglayout/miglayout-5.3.ebuild | 78 |
2 files changed, 79 insertions, 0 deletions
diff --git a/dev-java/miglayout/Manifest b/dev-java/miglayout/Manifest index dbb4d9c86ef1..c7e87d781ecf 100644 --- a/dev-java/miglayout/Manifest +++ b/dev-java/miglayout/Manifest @@ -1 +1,2 @@ DIST miglayout-4.0-sources.jar 194675 BLAKE2B 9d0a4fce1b76e49f4a2962fccf323676172fc9fa084060d8b3507031635b7979d8b29ce598a0a484e3707eefdf90721162e67d36be5702e9309ef067fd39aab3 SHA512 27284ceac254707428351fb2451ffd5f2ebd580374df59624bb6af06011f70d87b27849900c2573aff782ebe6d84e1806c18a59741213948f0b238ee5a51ec2f +DIST miglayout-5.3.tar.gz 627150 BLAKE2B 2b28b3dd95d84db1665308a2908c6ddf8f0e285431ffc03af0275f7005d98117f873b0752f9b1f428b213a30c9e020b626eb0e6709470c62eac46480c3aab542 SHA512 ee711a453a9e2962017eed9363e4b8c2fb1fb28d9b36455d928b60db40262be310e6d2ab6c9f3ac286f3975e9927f8a8a77827a27cd1cb2238b2033c38a67cdb diff --git a/dev-java/miglayout/miglayout-5.3.ebuild b/dev-java/miglayout/miglayout-5.3.ebuild new file mode 100644 index 000000000000..26caf78554f7 --- /dev/null +++ b/dev-java/miglayout/miglayout-5.3.ebuild @@ -0,0 +1,78 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc source test" +MAVEN_ID="com.miglayout:miglayout-core:5.0 com.miglayout:miglayout-swing:5.0" +JAVA_TESTING_FRAMEWORKS="junit-4" + +inherit java-pkg-2 java-pkg-simple + +DESCRIPTION="MiGLayout - Java Layout Manager for Swing, SWT and JavaFX" +HOMEPAGE="https://miglayout.com/" +SRC_URI="https://github.com/mikaelgrev/miglayout/archive/V${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${P}" + +LICENSE="BSD" +SLOT="5" +KEYWORDS="~amd64 ~x86" + +RDEPEND=">=virtual/jre-1.8:*" +DEPEND=">=virtual/jdk-1.8:*" + +JAVA_TEST_GENTOO_CLASSPATH="junit-4" +JAVA_TEST_RUN_ONLY="net.miginfocom.swing.MigLayoutTest" +JAVA_TEST_SRC_DIR="swing/src/test/java" + +src_compile() { + einfo "Compiling miglayout-core.jar" + JAVA_JAR_FILENAME="miglayout-core.jar" + JAVA_SRC_DIR="core/src/main/java" + java-pkg-simple_src_compile + JAVA_GENTOO_CLASSPATH_EXTRA+=":miglayout-core.jar" + rm -r target || die + + einfo "Compiling miglayout-wingore.jar" + JAVA_JAR_FILENAME="miglayout-swing.jar" + JAVA_SRC_DIR="swing/src/main/java" + java-pkg-simple_src_compile + JAVA_GENTOO_CLASSPATH_EXTRA+=":miglayout-swing.jar" + rm -r target || die + + if use doc; then + einfo "Compiling javadocs" + JAVA_SRC_DIR=( + "core/src/main/java" + "swing/src/main/java" + ) + JAVA_JAR_FILENAME="ignoreme.jar" + java-pkg-simple_src_compile + fi +} + +src_test() { + # There was 1 failure: + # 1) testDPIScaling(net.miginfocom.swing.MigLayoutTest) + # java.awt.HeadlessException + # at java.desktop/sun.awt.HeadlessToolkit.getScreenResolution(HeadlessToolkit.java:122) + # at net.miginfocom.swing.MigLayoutTest.testDPIScaling(MigLayoutTest.java:28) + sed \ + -e '/import org.junit.Test/a import org.junit.Ignore;' \ + -e '/testDPIScaling()/i @Ignore' \ + -i swing/src/test/java/net/miginfocom/swing/MigLayoutTest.java || die +} + +src_install() { + java-pkg_dojar "miglayout-core.jar" + java-pkg_dojar "miglayout-swing.jar" + + if use doc; then + java-pkg_dojavadoc target/api + fi + + if use source; then + java-pkg_dosrc "core/src/main/java/*" + java-pkg_dosrc "swing/src/main/java/*" + fi +} |