1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 JAVA_ANT_ENCODING=UTF-8
8 [[ ${PV} == "9999" ]] && SUBVERSION_ECLASS="subversion"
9 ESVN_REPO_URI="https://josm.openstreetmap.de/svn/trunk"
10 inherit eutils java-pkg-2 java-ant-2 ${SUBVERSION_ECLASS}
11 unset SUBVERSION_ECLASS
13 DESCRIPTION="Java-based editor for the OpenStreetMap project"
14 HOMEPAGE="https://josm.openstreetmap.de/"
15 # Upstream doesn't provide versioned tarballs, so we'll have to create one on our own:
17 # mkdir -p josm-${REVISION}
18 # svn co -r ${REVISION} https://josm.openstreetmap.de/svn/trunk/ josm-${REVISION}
19 # cd josm-${REVISION} && ant init-svn-revision-xml && cd -
20 # tar -cz --exclude=.svn -f /usr/portage/distfiles/josm-${REVISION}.tar.gz josm-${REVISION}
21 [[ ${PV} == "9999" ]] || SRC_URI="mirror://gentoo/${P}.tar.gz"
26 # Don't move KEYWORDS on the previous line or ekeyword won't work # 399061
27 [[ ${PV} == "9999" ]] || \
30 DEPEND=">=virtual/jdk-1.8"
31 RDEPEND=">=virtual/jre-1.8"
37 if [[ ${PV} == "9999" ]]; then
39 # create-revision needs the compile directory to be a svn directory
40 # see also https://lists.openstreetmap.org/pipermail/dev/2009-March/014182.html
42 -e "s:arg[ ]value=\".\":arg value=\"${ESVN_STORE_DIR}\/${PN}\/trunk\":" \
43 build.xml || die "sed failed"
47 # Remove dependency on git and svn just for generating a
48 # revision - the tarball should already have REVISION.XML
49 sed -i -e 's:, *init-git-revision-xml::g' \
50 -e '/<exec[ \t].*"svn"[ \t].*/,+5{d;n;}' \
51 -e 's:${svn.info.result}:1:' \
52 build.xml || die "sed failed"
63 java-pkg_newjar "dist/${PN}-custom-optimized.jar" "${PN}.jar" || die "java-pkg_newjar failed"
64 java-pkg_dolauncher "${PN}" --jar "${PN}.jar" || die "java-pkg_dolauncher failed"
66 newicon images/logo.png josm.png || die "newicon failed"
67 make_desktop_entry "${PN}" "Java OpenStreetMap Editor" josm "Utility;Science;Geoscience"