summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolkmar W. Pogatzki <gentoo@pogatzki.net>2021-05-18 12:49:47 +0200
committerMiroslav Šulc <fordfrog@gentoo.org>2021-05-23 11:16:18 +0200
commitb626517c282eade5b800010505b13e32a01c7122 (patch)
treed42926da93a7af486032e2252f3656faf891a6bc /dev-java/miglayout
parentmedia-libs/libpgf: drop v7.19.3 (diff)
downloadgentoo-b626517c282eade5b800010505b13e32a01c7122.tar.gz
gentoo-b626517c282eade5b800010505b13e32a01c7122.tar.bz2
gentoo-b626517c282eade5b800010505b13e32a01c7122.zip
dev-java/miglayout: swt:4.10 slot update
Package-Manager: Portage-3.0.18, Repoman-3.0.2 Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Closes: https://github.com/gentoo/gentoo/pull/20865/commits/542538ea900969a67202a5d9bc876c71cb0dec27 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java/miglayout')
-rw-r--r--dev-java/miglayout/miglayout-4.0-r2.ebuild64
1 files changed, 64 insertions, 0 deletions
diff --git a/dev-java/miglayout/miglayout-4.0-r2.ebuild b/dev-java/miglayout/miglayout-4.0-r2.ebuild
new file mode 100644
index 000000000000..863e44285ea3
--- /dev/null
+++ b/dev-java/miglayout/miglayout-4.0-r2.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+JAVA_PKG_IUSE="doc examples source"
+
+inherit java-pkg-2
+
+DESCRIPTION="Easy to use yet very powerful Java Swing layout manager"
+HOMEPAGE="http://www.miglayout.com/"
+SRC_URI="http://www.migcalendar.com/miglayout/versions/${PV}/${P}-sources.jar"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="swt"
+
+COMMON_DEPEND="swt? ( dev-java/swt:4.10 )"
+BDEPEND="app-arch/unzip"
+RDEPEND="
+ ${COMMON_DEPEND}
+ >=virtual/jre-1.8:*
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ >=virtual/jdk-1.8:*
+"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ default
+
+ mv net/miginfocom/{demo,examples} . || die
+ mv demo/* examples || die
+
+ if ! use swt; then
+ rm -r net/miginfocom/swt || die
+ fi
+
+ find net -name '*.java' > sources.lst
+}
+
+src_compile() {
+ local classpath
+ use swt && classpath=( -classpath "$(java-pkg_getjars swt-4.10)" )
+
+ mkdir classes || die
+ ejavac "${classpath[@]}" -d classes @sources.lst || die
+ jar -cf ${PN}.jar -C classes . || die
+
+ if use doc; then
+ javadoc "${classpath[@]}" -author -version -d api @sources.lst || die
+ fi
+}
+
+src_install() {
+ java-pkg_dojar ${PN}.jar
+
+ use doc && java-pkg_dojavadoc api
+ use examples && java-pkg_doexamples examples
+ use source && java-pkg_dosrc net
+}