summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2008-08-21 10:18:47 +0000
committerPeter Volkov <pva@gentoo.org>2008-08-21 10:18:47 +0000
commitf18edd155dd73ce62527836169730650feac41ff (patch)
treeb4ca88c6fb2ea2429772fa0b4f1454827bf9b519 /media-gfx/opcion/opcion-1.1.1-r2.ebuild
parentversion bump, thanks Josh, bug #235346. (diff)
downloadgentoo-2-f18edd155dd73ce62527836169730650feac41ff.tar.gz
gentoo-2-f18edd155dd73ce62527836169730650feac41ff.tar.bz2
gentoo-2-f18edd155dd73ce62527836169730650feac41ff.zip
Added desktop menu entry.
(Portage version: 2.2_rc8/cvs/Linux 2.6.25-gentoo-r7 i686)
Diffstat (limited to 'media-gfx/opcion/opcion-1.1.1-r2.ebuild')
-rw-r--r--media-gfx/opcion/opcion-1.1.1-r2.ebuild59
1 files changed, 59 insertions, 0 deletions
diff --git a/media-gfx/opcion/opcion-1.1.1-r2.ebuild b/media-gfx/opcion/opcion-1.1.1-r2.ebuild
new file mode 100644
index 000000000000..0f529e2d9400
--- /dev/null
+++ b/media-gfx/opcion/opcion-1.1.1-r2.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/opcion/opcion-1.1.1-r2.ebuild,v 1.1 2008/08/21 10:18:47 pva Exp $
+
+inherit eutils java-pkg-2
+
+MY_P="Opcion_v${PV}"
+
+DESCRIPTION="Free font viewer written in Java"
+HOMEPAGE="http://opcion.sourceforge.net/"
+SRC_URI="mirror://sourceforge/opcion/${MY_P}_src.zip"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+COMMON_DEP="=dev-java/jgoodies-looks-1.2*"
+RDEPEND=">=virtual/jre-1.4
+ ${COMMON_DEP}"
+DEPEND=">=virtual/jdk-1.4
+ ${COMMON_DEP}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # add missing constructor
+ epatch "${FILESDIR}/${P}-fix-source.patch"
+
+ # calls nonexisting constructor and seems unused
+ rm FontViewer/windows/test.java || die
+
+ rm -rf com/jgoodies || die
+ find . -name '*.class' -delete || die
+ rm *.txt || die
+}
+
+src_compile() {
+ find . -name '*.java' > "${T}/src.list"
+ local cp="$(java-pkg_getjars jgoodies-looks-1.2)"
+ mkdir build || die
+ # quite icky way to copy resources
+ cp -R FontViewer com build || die
+ find build -name '*.java' -delete
+ ejavac -nowarn -classpath "${cp}" -d build "@${T}/src.list"
+ jar cf ${PN}.jar -C build . || die
+}
+
+src_install() {
+ java-pkg_dojar ${PN}.jar
+
+ java-pkg_dolauncher ${PN} --main FontViewer.Opcion
+
+ insinto /usr/share/pixmaps
+ newins FontViewer/resources/icons/IconSmall.png ${PN}-icon.png
+ make_desktop_entry ${PN} opcion ${PN}-icon.png
+}