aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2023-11-14 12:33:39 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2023-11-20 18:26:08 +0000
commit13c8c4f947740904f45b0f7c2a16fbae7464a919 (patch)
tree696eeb7bb2d60e556aff6d42793fe0328a4a6918
parent7ceb5686af679c5232ecfc5532226808429b5d98 (diff)
astro/osmosis: update 0.48.3 → 0.49.0
-rw-r--r--astro/osmosis/Makefile22
-rw-r--r--astro/osmosis/distinfo6
-rw-r--r--astro/osmosis/files/patch-bin_osmosis57
-rw-r--r--astro/osmosis/files/test.osm17
4 files changed, 89 insertions, 13 deletions
diff --git a/astro/osmosis/Makefile b/astro/osmosis/Makefile
index 60474290c716..bfd42e293229 100644
--- a/astro/osmosis/Makefile
+++ b/astro/osmosis/Makefile
@@ -1,5 +1,5 @@
PORTNAME= osmosis
-PORTVERSION= 0.48.3
+PORTVERSION= 0.49.0
CATEGORIES= astro java
MASTER_SITES= https://github.com/openstreetmap/osmosis/releases/download/${PORTVERSION}/
@@ -10,11 +10,11 @@ WWW= https://wiki.openstreetmap.org/wiki/Osmosis
LICENSE= PD
LICENSE_FILE= ${WRKSRC}/copying.txt
-USES= tar:tgz
+USES= tar
USE_JAVA= yes
+JAVA_VERSION= 17+
NO_BUILD= yes
NO_ARCH= yes
-NO_WRKSUBDIR= yes
PLIST_FILES= bin/${PORTNAME}
PORTDATA= *
@@ -23,11 +23,12 @@ PORTDOCS= *
OPTIONS_DEFINE= DOCS
post-patch:
- @${REINPLACE_CMD} -e 's|^\(MYAPP_HOME=\).*|\1${DATADIR}|' ${WRKSRC}/bin/osmosis
+ @${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|; s|%%JAVA%%|${JAVA}|' \
+ ${WRKSRC}/bin/osmosis
do-install:
@${MKDIR} ${STAGEDIR}${DATADIR}
- @cd ${WRKSRC} && ${COPYTREE_SHARE} "script config lib" ${STAGEDIR}${DATADIR}/
+ @cd ${WRKSRC} && ${COPYTREE_SHARE} "script lib" ${STAGEDIR}${DATADIR}/
${INSTALL_SCRIPT} ${WRKSRC}/bin/osmosis ${STAGEDIR}${PREFIX}/bin/
do-install-DOCS-on:
@@ -35,10 +36,11 @@ do-install-DOCS-on:
${INSTALL_DATA} ${WRKSRC}/changes.txt ${WRKSRC}/readme.txt ${STAGEDIR}${DOCSDIR}
do-test:
- ${JAVA} \
- -cp ${STAGEDIR}${DATADIR}/lib/default/plexus-classworlds-*.jar \
- -Dapp.home=${STAGEDIR}${DATADIR} \
- -Dclassworlds.conf=${STAGEDIR}${DATADIR}/config/plexus.conf \
- org.codehaus.classworlds.Launcher
+ @${STAGEDIR}${PREFIX}/bin/osmosis \
+ --read-xml ${FILESDIR}/test.osm \
+ --tf accept-ways highway='*' \
+ --used-node \
+ --write-xml ${WRKDIR}/test-out.osm
+ ${TEST} -s ${WRKDIR}/test-out.osm
.include <bsd.port.mk>
diff --git a/astro/osmosis/distinfo b/astro/osmosis/distinfo
index 1ce85b100903..4883d2151202 100644
--- a/astro/osmosis/distinfo
+++ b/astro/osmosis/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1599859191
-SHA256 (osmosis-0.48.3.tgz) = b24c601578ea4cb0ca88302be6768fd0602bde86c254a0e0b90513581dba67ff
-SIZE (osmosis-0.48.3.tgz) = 15169299
+TIMESTAMP = 1699954417
+SHA256 (osmosis-0.49.0.tar) = d2a35bdbff190ffa66a6304ea1f73db9e7048c55340306e569086730518675ae
+SIZE (osmosis-0.49.0.tar) = 15555072
diff --git a/astro/osmosis/files/patch-bin_osmosis b/astro/osmosis/files/patch-bin_osmosis
new file mode 100644
index 000000000000..54d8fe0b065a
--- /dev/null
+++ b/astro/osmosis/files/patch-bin_osmosis
@@ -0,0 +1,57 @@
+--- bin/osmosis.orig 2023-11-03 11:05:00 UTC
++++ bin/osmosis
+@@ -67,23 +67,10 @@
+ # Resolve links: $0 may be a link
+ app_path=$0
+
+-# Need this for daisy-chained symlinks.
+-while
+- APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
+- [ -h "$app_path" ]
+-do
+- ls=$( ls -ld "$app_path" )
+- link=${ls#*' -> '}
+- case $link in #(
+- /*) app_path=$link ;; #(
+- *) app_path=$APP_HOME$link ;;
+- esac
+-done
+-
+ # This is normally unused
+ # shellcheck disable=SC2034
+ APP_BASE_NAME=${0##*/}
+-APP_HOME=$( cd "${APP_HOME:-./}.." && pwd -P ) || exit
++APP_HOME=%%DATADIR%%
+
+ # Use the maximum available, or set MAX_FD != -1 to use that value.
+ MAX_FD=maximum
+@@ -113,28 +100,7 @@ esac
+
+ CLASSPATH=$APP_HOME/lib/osmosis-0.49.0.jar:$APP_HOME/lib/osmosis-extract-0.49.0.jar:$APP_HOME/lib/osmosis-apidb-0.49.0.jar:$APP_HOME/lib/osmosis-areafilter-0.49.0.jar:$APP_HOME/lib/osmosis-dataset-0.49.0.jar:$APP_HOME/lib/osmosis-pbf-0.49.0.jar:$APP_HOME/lib/osmosis-pbf2-0.49.0.jar:$APP_HOME/lib/osmosis-pgsimple-0.49.0.jar:$APP_HOME/lib/osmosis-pgsnapshot-0.49.0.jar:$APP_HOME/lib/osmosis-replication-0.49.0.jar:$APP_HOME/lib/osmosis-set-0.49.0.jar:$APP_HOME/lib/osmosis-tagfilter-0.49.0.jar:$APP_HOME/lib/osmosis-tagtransform-0.49.0.jar:$APP_HOME/lib/osmosis-xml-0.49.0.jar:$APP_HOME/lib/osmosis-core-0.49.0.jar:$APP_HOME/lib/commons-dbcp-1.4.jar:$APP_HOME/lib/spring-jdbc-5.3.30.jar:$APP_HOME/lib/postgis-jdbc-2021.1.0.jar:$APP_HOME/lib/osmosis-hstore-jdbc-0.49.0.jar:$APP_HOME/lib/postgresql-42.6.0.jar:$APP_HOME/lib/osmpbf-1.5.0.jar:$APP_HOME/lib/mysql-connector-j-8.0.33.jar:$APP_HOME/lib/protobuf-java-3.25.0.jar:$APP_HOME/lib/guava-32.1.3-jre.jar:$APP_HOME/lib/commons-io-2.15.0.jar:$APP_HOME/lib/commons-csv-1.10.0.jar:$APP_HOME/lib/commons-codec-1.16.0.jar:$APP_HOME/lib/commons-compress-1.24.0.jar:$APP_HOME/lib/commons-pool-1.5.4.jar:$APP_HOME/lib/spring-tx-5.3.30.jar:$APP_HOME/lib/spring-beans-5.3.30.jar:$APP_HOME/lib/spring-core-5.3.30.jar:$APP_HOME/lib/checker-qual-3.37.0.jar:$APP_HOME/lib/failureaccess-1.0.1.jar:$APP_HOME/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:$APP_HOME/lib/jsr305-3.0.2.jar:$APP_HOME/lib/error_prone_annotations-2.21.1.jar:$APP_HOME/lib/postgis-geometry-2021.1.0.jar:$APP_HOME/lib/slf4j-api-1.7.32.jar:$APP_HOME/lib/spring-jcl-5.3.30.jar
+
+-
+-# Determine the Java command to use to start the JVM.
+-if [ -n "$JAVA_HOME" ] ; then
+- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+- # IBM's JDK on AIX uses strange locations for the executables
+- JAVACMD=$JAVA_HOME/jre/sh/java
+- else
+- JAVACMD=$JAVA_HOME/bin/java
+- fi
+- if [ ! -x "$JAVACMD" ] ; then
+- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+-
+-Please set the JAVA_HOME variable in your environment to match the
+-location of your Java installation."
+- fi
+-else
+- JAVACMD=java
+- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+-
+-Please set the JAVA_HOME variable in your environment to match the
+-location of your Java installation."
+-fi
++JAVACMD=%%JAVA%%
+
+ # Increase the maximum file descriptors if we can.
+ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
diff --git a/astro/osmosis/files/test.osm b/astro/osmosis/files/test.osm
new file mode 100644
index 000000000000..d02b02f0d4ee
--- /dev/null
+++ b/astro/osmosis/files/test.osm
@@ -0,0 +1,17 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<osm version='0.6'>
+ <node id='1' lat='45' lon='35' version='1' timestamp='2023-01-01T00:00:00Z'/>
+ <node id='2' lat='45' lon='35' version='1' timestamp='2023-01-01T00:00:00Z'/>
+ <node id='3' lat='46' lon='34' version='1' timestamp='2023-01-01T00:00:00Z'/>
+ <node id='4' lat='46' lon='36' version='1' timestamp='2023-01-01T00:00:00Z'/>
+ <way id='5' version='1' timestamp='2023-01-01T00:00:00Z'>
+ <nd ref='1'/>
+ <nd ref='3'/>
+ <tag k='waterway' v='river'/>
+ </way>
+ <way id='6' version='1' timestamp='2023-01-01T00:00:00Z'>
+ <nd ref='2'/>
+ <nd ref='4'/>
+ <tag k='highway' v='primary'/>
+ </way>
+</osm>