blob: 6f9e4f72779536ee256882f2c771da948622490c (
plain)
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
|
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/josm/josm-4203.ebuild,v 1.1 2011/07/31 14:10:38 scarabeus Exp $
EAPI=4
JAVA_ANT_ENCODING=UTF-8
[[ ${PV} == "9999" ]] && SUBVERSION_ECLASS="subversion"
ESVN_REPO_URI="http://josm.openstreetmap.de/svn/trunk"
inherit eutils java-pkg-2 java-ant-2 ${SUBVERSION_ECLASS}
unset SUBVERSION_ECLASS
DESCRIPTION="Java-based editor for the OpenStreetMap project"
HOMEPAGE="http://josm.openstreetmap.de/"
[[ ${PV} == "9999" ]] || SRC_URI="http://josm.fabian-fingerle.de/${P}.tar.xz"
LICENSE="GPL-2"
SLOT="0"
[[ ${PV} == "9999" ]] || KEYWORDS="~amd64 ~x86"
DEPEND=">=virtual/jdk-1.6"
RDEPEND=">=virtual/jre-1.6"
S="${WORKDIR}/${PN}"
IUSE=""
src_prepare() {
if [[ ${PV} == "9999" ]]; then
sed -i \
-e "s:josm-custom.jar:josm.jar:" \
-e "s:josm-custom-optimized.jar:josm-optimized.jar:" \
build.xml || die "Sed failed"
# create-revision needs the compile directory to be a svn directory
# see also http://lists.openstreetmap.org/pipermail/dev/2009-March/014182.html
sed -i \
-e "s:arg[ ]value=\".\":arg value=\"${ESVN_STORE_DIR}\/${PN}\/trunk\":" \
build.xml || die "Sed failed"
fi
}
src_compile() {
eant dist
}
src_install() {
java-pkg_newjar "dist/${PN}.jar" || die "java-pkg_newjar failed"
java-pkg_dolauncher "${PN}" --jar "${PN}.jar" || die "java-pkg_dolauncher failed"
newicon images/logo.png josm.png || die "newicon failed"
make_desktop_entry "${PN}" "Java OpenStreetMap Editor" josm "Science;Geoscience"
}
|