| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/josm/josm-5485.ebuild,v 1.1 2012/09/19 10:20:59 hanno Exp $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
|
| 7 |
JAVA_ANT_ENCODING=UTF-8
|
| 8 |
|
| 9 |
[[ ${PV} == "9999" ]] && SUBVERSION_ECLASS="subversion"
|
| 10 |
ESVN_REPO_URI="http://josm.openstreetmap.de/svn/trunk"
|
| 11 |
inherit eutils java-pkg-2 java-ant-2 ${SUBVERSION_ECLASS}
|
| 12 |
unset SUBVERSION_ECLASS
|
| 13 |
|
| 14 |
DESCRIPTION="Java-based editor for the OpenStreetMap project"
|
| 15 |
HOMEPAGE="http://josm.openstreetmap.de/"
|
| 16 |
[[ ${PV} == "9999" ]] || SRC_URI="http://josm.fabian-fingerle.de/${P}.tar.xz"
|
| 17 |
|
| 18 |
LICENSE="GPL-2"
|
| 19 |
SLOT="0"
|
| 20 |
|
| 21 |
# Don't move KEYWORDS on the previous line or ekeyword won't work # 399061
|
| 22 |
[[ ${PV} == "9999" ]] || \
|
| 23 |
KEYWORDS="~amd64 ~x86"
|
| 24 |
|
| 25 |
DEPEND=">=virtual/jdk-1.6
|
| 26 |
>=dev-vcs/subversion-1.7"
|
| 27 |
RDEPEND=">=virtual/jre-1.6"
|
| 28 |
|
| 29 |
S="${WORKDIR}/${PN}"
|
| 30 |
|
| 31 |
IUSE=""
|
| 32 |
|
| 33 |
src_prepare() {
|
| 34 |
if [[ ${PV} == "9999" ]]; then
|
| 35 |
sed -i \
|
| 36 |
-e "s:josm-custom.jar:josm.jar:" \
|
| 37 |
-e "s:josm-custom-optimized.jar:josm-optimized.jar:" \
|
| 38 |
build.xml || die "Sed failed"
|
| 39 |
|
| 40 |
# create-revision needs the compile directory to be a svn directory
|
| 41 |
# see also http://lists.openstreetmap.org/pipermail/dev/2009-March/014182.html
|
| 42 |
sed -i \
|
| 43 |
-e "s:arg[ ]value=\".\":arg value=\"${ESVN_STORE_DIR}\/${PN}\/trunk\":" \
|
| 44 |
build.xml || die "Sed failed"
|
| 45 |
fi
|
| 46 |
}
|
| 47 |
|
| 48 |
src_compile() {
|
| 49 |
eant dist-optimized
|
| 50 |
}
|
| 51 |
|
| 52 |
src_install() {
|
| 53 |
java-pkg_newjar "dist/${PN}-optimized.jar" "${PN}.jar" || die "java-pkg_newjar failed"
|
| 54 |
java-pkg_dolauncher "${PN}" --jar "${PN}.jar" || die "java-pkg_dolauncher failed"
|
| 55 |
|
| 56 |
newicon images/logo.png josm.png || die "newicon failed"
|
| 57 |
make_desktop_entry "${PN}" "Java OpenStreetMap Editor" josm "Utility;Science;Geoscience"
|
| 58 |
}
|