From f2c770c591ede1d1d3e6a3074c29ee76d58b57d5 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sat, 16 Feb 2013 12:05:57 +0100 Subject: dev-java/substance: 3.3 --- dev-java/substance/Manifest | 2 + .../substance/files/substance-3.3-build-xml.patch | 69 +++++++++++++++ ...substance-swingx-3.3-SubstanceMonthViewUI.patch | 31 +++++++ dev-java/substance/substance-3.3.ebuild | 97 ++++++++++++++++++++++ 4 files changed, 199 insertions(+) create mode 100644 dev-java/substance/files/substance-3.3-build-xml.patch create mode 100644 dev-java/substance/files/substance-swingx-3.3-SubstanceMonthViewUI.patch create mode 100644 dev-java/substance/substance-3.3.ebuild (limited to 'dev-java') diff --git a/dev-java/substance/Manifest b/dev-java/substance/Manifest index 40cb74d..07c4d2d 100644 --- a/dev-java/substance/Manifest +++ b/dev-java/substance/Manifest @@ -1 +1,3 @@ +DIST substance-3.3.tar.xz 35619616 SHA256 05c7285af704712e5567e13a53cf7a09cbffe28f3b855c47a3990a5f1387e28c SHA512 42bfce8993a7345f716675f858292cd317c486675dbb229712ce32d0e4a5d29c80760ca4d8c7a87bfced4ef6f196c379f9ab1d075c43807e221311955df25b29 WHIRLPOOL 4705537174b5278ced205d4b9281bc2a622a606e4ee657daf923d34fa8550821d5483a9bfc6452a924cc85958559690fe8aa8202138b2fbc4bdf79ee7088bf56 DIST substance-5.3.tar.bz2 63627491 SHA256 1189fe97bbbd678ced801ed37d04a8b8e665f39eeee4896553c1c9658941d7ec SHA512 430377d1ee7acb5154b683b8183b0f591e434836d9e1095651561d1762085562b2d636c8bd1ca1f4a893b9f52caa44fd958627bce0e69aec546fe034871d922a WHIRLPOOL 7caaf19cb951ea1d01995e0f0d229289171b0f635640fd08583d103763df535fdc73256e72a312b312e1349b3ca6ddfbfd618863d7ffa3b299774da2b61fdfc4 +DIST substance-swingx-3.3.tar.xz 1247244 SHA256 ec19e6e4d644ae5f7ad0f637ca5eaf5618f2ba4a14f7bd97652187a146ef2e1c SHA512 669dd6ac74465813c4f2f55cfa37bb09a512b559a344f8fed6d3ac7968c55036eeb2914a2fd297273b84743dd6f26662bcf6054b8d6992461ced0a9d19a8a93a WHIRLPOOL 88fb10c25b3a923b0a04829a760cdbef059388a40ae1afbc58046610fb79bcbe0b1b48373f2825f1f09e5ccda62fd9fded1e6633c8c679048fdd5c5a1c75bac8 diff --git a/dev-java/substance/files/substance-3.3-build-xml.patch b/dev-java/substance/files/substance-3.3-build-xml.patch new file mode 100644 index 0000000..c8fbb1d --- /dev/null +++ b/dev-java/substance/files/substance-3.3-build-xml.patch @@ -0,0 +1,69 @@ +From 82f2ddc7193372efc78ba756a927f6e90962f88d Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping +Date: Sat, 16 Feb 2013 08:39:06 +0100 +Subject: [PATCH] Fix build.xml + +--- + substance-3.3/build.xml | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) + +diff --git a/build.xml b/build.xml +index 01802cb..1664469 100644 +--- a/substance-3.3/build.xml ++++ b/substance-3.3/build.xml +@@ -2,6 +2,7 @@ + + + ++ + + + +@@ -63,8 +64,9 @@ + + + +- +- ++ ++ ++ + + + +@@ -136,10 +138,10 @@ + + + +- +- +- +- ++ ++ ++ ++ + + + +@@ -157,7 +159,7 @@ + + + +- ++ + + + +@@ -251,7 +253,7 @@ + + + +- ++ + + + +-- +1.8.1.2 + diff --git a/dev-java/substance/files/substance-swingx-3.3-SubstanceMonthViewUI.patch b/dev-java/substance/files/substance-swingx-3.3-SubstanceMonthViewUI.patch new file mode 100644 index 0000000..2498330 --- /dev/null +++ b/dev-java/substance/files/substance-swingx-3.3-SubstanceMonthViewUI.patch @@ -0,0 +1,31 @@ +From 616981f16a43f485421f4523b37d3ef2c31e2900 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping +Date: Sat, 16 Feb 2013 20:52:53 +0100 +Subject: [PATCH] Add workaround casts to SubstanceMonthViewUI + +--- + substance-swingx-3.3/src/org/jvnet/substance/swingx/SubstanceMonthViewUI.java | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/substance-swingx-3.3/src/org/jvnet/substance/swingx/SubstanceMonthViewUI.java b/substance-swingx-3.3/src/org/jvnet/substance/swingx/SubstanceMonthViewUI.java +index 3d757ad..d4615b7 100644 +--- a/substance-swingx-3.3/src/org/jvnet/substance/swingx/SubstanceMonthViewUI.java ++++ b/substance-swingx-3.3/src/org/jvnet/substance/swingx/SubstanceMonthViewUI.java +@@ -33,12 +33,12 @@ public class SubstanceMonthViewUI extends BasicMonthViewUI { + @Override + protected void installDefaults() { + super.installDefaults(); +- this.monthDownImage = SubstanceImageCreator.getArrowIcon( ++ this.monthDownImage = (javax.swing.ImageIcon)SubstanceImageCreator.getArrowIcon( + SubstanceSizeUtils.getArrowIconWidth(), SubstanceSizeUtils + .getArrowIconHeight(), SubstanceSizeUtils + .getArrowStrokeWidth(), SwingConstants.WEST, + SubstanceCoreUtilities.getActiveTheme(this.monthView, true)); +- this.monthUpImage = SubstanceImageCreator.getArrowIcon( ++ this.monthUpImage = (javax.swing.ImageIcon)SubstanceImageCreator.getArrowIcon( + SubstanceSizeUtils.getArrowIconWidth(), SubstanceSizeUtils + .getArrowIconHeight(), SubstanceSizeUtils + .getArrowStrokeWidth(), SwingConstants.EAST, +-- +1.8.1.2 + diff --git a/dev-java/substance/substance-3.3.ebuild b/dev-java/substance/substance-3.3.ebuild new file mode 100644 index 0000000..55f64af --- /dev/null +++ b/dev-java/substance/substance-3.3.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="3" + +inherit eutils java-pkg-2 java-ant-2 + +SUBX_P=${PN}-swingx-${PV} + +DESCRIPTION="Swing look-and-feel library" +HOMEPAGE="https://github.com/kirillcool/substance" +SRC_URI="http://www.hartwork.org/public/${P}.tar.xz + http://www.hartwork.org/public/${SUBX_P}.tar.xz" +# i.e. a snapshot of https://svn.java.net/svn/substance~svn/tags/release_3_3_japan/ +# .. and https://svn.java.net/svn/substance-swingx~svn/tags/release_3_3_japan/ + +LICENSE="|| ( LGPL-2.1 BSD ) BSD CC-BY-SA-2.5 public-domain" # TODO have a closer look +SLOT="3.3" +KEYWORDS="~amd64 ~x86" +IUSE="" + +COMMON_DEPEND="dev-java/laf-widget:3.0 + dev-java/laf-plugin:1.0 + dev-java/asm:2.2 + dev-java/jgoodies-forms:0 + >=dev-java/swingx-0.8.20070125-r1:0.8" + +DEPEND=">=virtual/jdk-1.5 ${COMMON_DEPEND}" +RDEPEND=">=virtual/jre-1.5 ${COMMON_DEPEND}" + +S=${WORKDIR} + +src_prepare() { + epatch "${FILESDIR}"/${P}-build-xml.patch + epatch "${FILESDIR}"/${SUBX_P}-SubstanceMonthViewUI.patch + + einfo "Deleting bundled .jar files..." + einfo "$(find -type f -name '*.jar' -delete -print | sort)" + + java-pkg_jar-from laf-widget-3.0 laf-widget.jar ${P}/lib/laf-widget.jar || die + java-pkg_jar-from laf-plugin-1.0 laf-plugin.jar ${P}/lib/laf-plugin-50.jar || die + java-pkg_jar-from asm-2.2 asm.jar ${P}/lib/asm.jar || die + java-pkg_jar-from asm-2.2 asm-commons.jar ${P}/lib/asm-commons.jar || die + java-pkg_jar-from jgoodies-forms forms.jar ${P}/lib/forms.jar || die + java-pkg_jar-from swingx-0.8 swingx.jar ${P}/lib/swingx.jar || die + + # Bypass ant for substance-swingx + rm ${SUBX_P}/build.xml || die + + # Fix java home + sed \ + -e 's|\(\)|\1'"${JAVA_HOME}\2|" \ + -i ${P}/build.xml || die + + # Remove hard-coded memory limits + sed \ + -e 's|memoryMaximumSize="[^"]*" *||g' \ + -i ${P}/build.xml || die + + # Workaround: Ensure valid UTF-8 input + for i in \ + ${P}/src/contrib/net/xoetrope/editor/color/ColorWheelPanel.java \ + ${P}/src/test/check/AKDockLayout.java \ + ; do + mv "${i}" "${i}".orig || die + iconv -f iso-8859-1 -t utf-8 "${i}".orig > "${i}" || die + done +} + +src_compile() { + local swingx_jar=$(java-pkg_getjar swingx-0.8 swingx.jar) + local laf_widget_jar=$(java-pkg_getjar laf-widget-3.0 laf-widget.jar) + local laf_plugin_jar=$(java-pkg_getjar laf-plugin-1.0 laf-plugin.jar) + + # Compile substance-swing code + find "${SUBX_P}" -type f -name '*.java' | fgrep -v /src/test/ | while read i ; do + local source=${i##./} + local binary=${source%%.java}.class + [[ -e "${binary}" ]] && continue + + echo " JAVAC ${binary}" + ejavac -sourcepath "${P}/src/" -classpath "${swingx_jar}:${laf_widget_jar}:${laf_plugin_jar}" "${i}" || die + done + + # Build substance-swing .jar + ( cd "${SUBX_P}"/src \ + && jar cf "${S}"/${PN}-swingx.jar META-INF $(find . -type f -name '*.class') \ + ) || die + + # Build substance + ( cd ${P} && eant -verbose ) || die +} + +src_install() { + java-pkg_dojar $(find -type f -name '*.jar') || die +} -- cgit v1.2.3-65-gdbad