1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=4
#WANT_ANT_TASKS="dev-java/jarbundler:0"
#docs aren't builded correctly?
JAVA_PKG_IUSE=""
inherit eutils java-pkg-2 java-ant-2
DESCRIPTION="GUI frontend for BibTeX, written in Java"
HOMEPAGE="http://jabref.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/JabRef-${PV}-src.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE="mysql"
#don't include, use shipped: antlr-3.4-complete.jar, jpfcodegen
# >=dev-java/antlr-2.7.3:0[java]
CDEPEND="dev-java/spin:0
dev-java/glazedlists:1.8
dev-java/jempbox:1.7
dev-java/pdfbox:1.7
>=dev-java/jgoodies-common-1.4.0:0
dev-java/jgoodies-forms:1.6
dev-java/jgoodies-looks:2.5
>=dev-java/microba-0.4.3:0
dev-java/commons-logging:0
dev-java/jpf:1.5
mysql? ( dev-java/jdbc-mysql:0 )"
RDEPEND=">=virtual/jre-1.6
${CDEPEND}"
DEPEND=">=virtual/jdk-1.6
${CDEPEND}"
S="${WORKDIR}/${P}"
JAVA_ANT_REWRITE_CLASSPATH="true"
#EANT_ANT_TASKS="jarbundler"
EANT_BUILD_TARGET="jars"
EANT_DOC_TARGET="docs"
#do not include antlr-3, use shipped antlr-3.0b5.jar
EANT_GENTOO_CLASSPATH="commons-logging,glazedlists-1.8,jempbox-1.7,jgoodies-common,jgoodies-forms-1.6,jgoodies-looks-2.5,jpf-1.5,microba,pdfbox-1.7,spin"
EANT_GENTOO_CLASSPATH_EXTRA="${S}/lib/antlr-3.4-complete.jar"
#for codegenerator
JAVA_ANT_CLASSPATH_TAGS+=" java"
java_prepare() {
# moves jarbundler definition to where it's needed (not by us) --- ???
# don't call unjarlib, don't want to absorb deps
# failonerror in jpfcodegen
epatch "${FILESDIR}/${P}-build.xml.patch"
#ubuntu-specific and shipped with so-files...
epatch "${FILESDIR}/${P}-remove-ayatana.patch"
#preserve some libraries
mkdir libs
mv lib/{plugin,antlr-3.4-complete.jar} libs/
find "${S}/"{lib,gradle,buildlib} -name '*.jar' -delete
mv libs/{plugin,antlr-3.4-complete.jar} lib/
#drop open office support
rm -rfv src/java/net/sf/jabref/oo || die
epatch "${FILESDIR}"/${P}-remove-oo-support.patch
#drop sciplore support
rm -rfv src/java/spl/ src/java/net/sf/jabref/ImportSettingsTab.java || die
epatch "${FILESDIR}"/${P}-remove-sciplore-support.patch
}
src_install() {
java-pkg_newjar build/lib/JabRef-${PV}.jar
java-pkg_dojar lib/antlr-3.4-complete.jar
java-pkg_dojar lib/plugin/JPFCodeGenerator-rt.jar
#are not builded? Investigate why
#use doc && java-pkg_dojavadoc build/docs/API
dodoc src/txt/README
java-pkg_dolauncher ${PN} \
--main net.sf.jabref.JabRef
dodir /usr/share/${PN}/lib/plugins
keepdir /usr/share/${PN}/lib/plugins
java-pkg_register-optional-dependency jdbc-mysql
newicon src/images/JabRef-icon-48.png JabRef-icon.png || die
make_desktop_entry ${PN} JabRef JabRef-icon Office
echo "MimeType=text/x-bibtex;" >> "${D}/usr/share/applications/${PN}-${PN}.desktop"
}
|