aboutsummaryrefslogtreecommitdiff
path: root/gis/osm2pgsql/osm2pgsql.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'gis/osm2pgsql/osm2pgsql.SlackBuild')
-rw-r--r--gis/osm2pgsql/osm2pgsql.SlackBuild19
1 files changed, 16 insertions, 3 deletions
diff --git a/gis/osm2pgsql/osm2pgsql.SlackBuild b/gis/osm2pgsql/osm2pgsql.SlackBuild
index 66c63ff65a..d5dc21fa25 100644
--- a/gis/osm2pgsql/osm2pgsql.SlackBuild
+++ b/gis/osm2pgsql/osm2pgsql.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for osm2pgsql
# Copyright 2013-2021 Benjamin Trigona-Harany
-# Copyright 2024 Giancarlo Dessi, Cagliari, IT
+# Copyright 2024-2025 Giancarlo Dessi, Cagliari, IT
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -28,8 +28,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=osm2pgsql
-VERSION=${VERSION:-1.11.0}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-2.1.1}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -70,6 +70,16 @@ if [ $ARCH64 = "no" ]; then
exit 1
fi
+CMAKEVER=$(cmake --version | head -1 | cut -f3 -d" ")
+CMAKEVER=${CMAKEVER:2:2}
+
+# Prevent cmake warnings in current
+if [ $CMAKEVER = "21" ]; then
+ CMAKE_POLICY=""
+else
+ CMAKE_POLICY="-DCMAKE_POLICY_DEFAULT_CMP0167=OLD "
+fi
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -82,6 +92,8 @@ find -L . \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+
+sed -i CMakeLists.txt -e "s/VERSION 3.8/VERSION 3.10/g"
mkdir -p build
cd build
@@ -91,6 +103,7 @@ cd build
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_TESTS=OFF \
-DWITH_LUAJIT=ON \
+ $CMAKE_POLICY \
-DCMAKE_BUILD_TYPE=Release ..
make
make install DESTDIR=$PKG