From 95259c512c8a3819ff6df5b50412e4b8dba04141 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Tue, 30 Sep 2025 16:30:47 +0200 Subject: [PATCH] sci-geosciences/osm2pgsql: 2.2.0 version bump, bump EAPI 7 -> 8 Add live ebuild switch Drop no-op slot op from DEPEND-only dev-libs/boost Signed-off-by: Andreas Sturmlechner --- sci-geosciences/osm2pgsql/Manifest | 1 + .../osm2pgsql-2.2.0-cmake-boost-warning.patch | 14 +++++ .../osm2pgsql/osm2pgsql-2.2.0.ebuild | 58 +++++++++++++++++++ .../osm2pgsql/osm2pgsql-99999999.ebuild | 30 +++++----- 4 files changed, 90 insertions(+), 13 deletions(-) create mode 100644 sci-geosciences/osm2pgsql/files/osm2pgsql-2.2.0-cmake-boost-warning.patch create mode 100644 sci-geosciences/osm2pgsql/osm2pgsql-2.2.0.ebuild diff --git a/sci-geosciences/osm2pgsql/Manifest b/sci-geosciences/osm2pgsql/Manifest index e7b266c69e164..3c31702461f20 100644 --- a/sci-geosciences/osm2pgsql/Manifest +++ b/sci-geosciences/osm2pgsql/Manifest @@ -1 +1,2 @@ DIST osm2pgsql-2.0.0.tar.gz 2712209 BLAKE2B 064bca5796f8ede6f6fb816c8fa3758f066788c8e41c300b4a9cadd8058ca9bed49379a260ee8e5990d7a38061808f7ec78d2895c4964e5546b2ed3862d74239 SHA512 24310f0370fe5e5f87f81f553c61cc24ec80d29054f0679a2d34a3f1d72eacff93ef59611ba0938e552c9faf167f187d7117f5a08f0c0c26f258d95ebee86743 +DIST osm2pgsql-2.2.0.tar.gz 2729137 BLAKE2B 70d3ec394638bb02e613b7796e239e02748436452cbf8c672459c968ce11c2352b76ec153c82dc8905a3a6f01e9fb6a4a8775e064b4dfb8cf4f10c35481f5ace SHA512 873d6fb6470f2a61ec5243e20faa556739122de55b90770ab8df62d3a86a9751875e1f036c3fca3836354c39a690729f712265df1151f169ed988589139e5cb2 diff --git a/sci-geosciences/osm2pgsql/files/osm2pgsql-2.2.0-cmake-boost-warning.patch b/sci-geosciences/osm2pgsql/files/osm2pgsql-2.2.0-cmake-boost-warning.patch new file mode 100644 index 0000000000000..e6ac5a4635f63 --- /dev/null +++ b/sci-geosciences/osm2pgsql/files/osm2pgsql-2.2.0-cmake-boost-warning.patch @@ -0,0 +1,14 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,10 @@ +- + cmake_minimum_required(VERSION 3.10.0) + ++# FIXME: Replace with >=Boost-1.70 shipped BoostConfig.cmake ++if (POLICY CMP0167) ++ cmake_policy(SET CMP0167 OLD) # since 3.30 ++endif() ++ + project(osm2pgsql VERSION 2.2.0 LANGUAGES CXX C) + + set(CMAKE_EXPORT_COMPILE_COMMANDS ON) diff --git a/sci-geosciences/osm2pgsql/osm2pgsql-2.2.0.ebuild b/sci-geosciences/osm2pgsql/osm2pgsql-2.2.0.ebuild new file mode 100644 index 0000000000000..f1187ea129e36 --- /dev/null +++ b/sci-geosciences/osm2pgsql/osm2pgsql-2.2.0.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{1..4} luajit ) + +if [[ ${PV} == *9999* ]]; then + EGIT_REPO_URI="https://github.com/openstreetmap/${PN}.git" + inherit git-r3 +else + SRC_URI="https://github.com/openstreetmap/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi +inherit cmake lua-single + +DESCRIPTION="Converts OSM planet.osm data to a PostgreSQL/PostGIS database" +HOMEPAGE="https://osm2pgsql.org/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="" +REQUIRED_USE="${LUA_REQUIRED_USE}" + +# Tries to connect to local postgres server and other shenanigans +RESTRICT="test" + +COMMON_DEPEND=" + app-arch/bzip2 + dev-db/postgresql:= + dev-libs/expat + sci-libs/proj:= + sys-libs/zlib + ${LUA_DEPS} +" +DEPEND="${COMMON_DEPEND} + dev-cpp/nlohmann_json + dev-libs/boost +" +RDEPEND="${COMMON_DEPEND} + dev-db/postgis +" + +PATCHES=( + "${FILESDIR}"/${PN}-2.0.0-cmake_lua_version.patch + "${FILESDIR}"/${P}-cmake-boost-warning.patch +) + +src_configure() { + local mycmakeargs=( + -DWITH_LUAJIT=$(usex lua_single_target_luajit) + -DBUILD_TESTS=OFF + ) + # To prevent the "unused variable" QA warning + use lua_single_target_luajit || mycmakeargs+=( -DLUA_VERSION=$(lua_get_version) ) + + cmake_src_configure +} diff --git a/sci-geosciences/osm2pgsql/osm2pgsql-99999999.ebuild b/sci-geosciences/osm2pgsql/osm2pgsql-99999999.ebuild index fc19645cfbce9..56ed99a5a93f3 100644 --- a/sci-geosciences/osm2pgsql/osm2pgsql-99999999.ebuild +++ b/sci-geosciences/osm2pgsql/osm2pgsql-99999999.ebuild @@ -1,24 +1,30 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 LUA_COMPAT=( lua5-{1..4} luajit ) -inherit cmake git-r3 lua-single - -EGIT_REPO_URI="https://github.com/openstreetmap/${PN}.git" +if [[ ${PV} == *9999* ]]; then + EGIT_REPO_URI="https://github.com/openstreetmap/${PN}.git" + inherit git-r3 +else + SRC_URI="https://github.com/openstreetmap/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi +inherit cmake lua-single DESCRIPTION="Converts OSM planet.osm data to a PostgreSQL/PostGIS database" HOMEPAGE="https://osm2pgsql.org/" -SRC_URI="" LICENSE="GPL-2" SLOT="0" -KEYWORDS="" IUSE="" REQUIRED_USE="${LUA_REQUIRED_USE}" +# Tries to connect to local postgres server and other shenanigans +RESTRICT="test" + COMMON_DEPEND=" app-arch/bzip2 dev-db/postgresql:= @@ -29,15 +35,12 @@ COMMON_DEPEND=" " DEPEND="${COMMON_DEPEND} dev-cpp/nlohmann_json - dev-libs/boost:= + dev-libs/boost " RDEPEND="${COMMON_DEPEND} dev-db/postgis " -# Tries to connect to local postgres server and other shenanigans -RESTRICT="test" - PATCHES=( "${FILESDIR}"/${PN}-2.0.0-cmake_lua_version.patch ) @@ -45,9 +48,10 @@ PATCHES=( src_configure() { local mycmakeargs=( -DWITH_LUAJIT=$(usex lua_single_target_luajit) - # To prevent the "unused variable" QA warning - $(usex !lua_single_target_luajit "-DLUA_VERSION=$(lua_get_version)" "") -DBUILD_TESTS=OFF ) + # To prevent the "unused variable" QA warning + use lua_single_target_luajit || mycmakeargs+=( -DLUA_VERSION=$(lua_get_version) ) + cmake_src_configure }