landry 9d0d5e506b geo/osm2pgsql: update to 1.4.1.
new website at https://osm2pgsql.org/

https://github.com/openstreetmap/osm2pgsql/issues/922 was fixed so this
now builds against upcoming devel/proj 8 update.

use MODPOSTGRESQL_TEST_CMD = ${MODCMAKE_TEST_TARGET} to run the tests
using the cmake goop, pleasantly surprised to see that this works !
2021-03-07 17:33:37 +00:00

67 lines
1.5 KiB
Makefile

# $OpenBSD: Makefile,v 1.17 2021/03/07 17:33:37 landry Exp $
COMMENT = OSM data to PostgreSQL converter
GH_TAGNAME = 1.4.1
GH_PROJECT = osm2pgsql
GH_ACCOUNT = openstreetmap
CATEGORIES = geo databases
HOMEPAGE = https://osm2pgsql.org/
# GPLv2
PERMIT_PACKAGE = Yes
USE_GMAKE = Yes
WANTLIB += boost_system-mt boost_filesystem-mt bz2 c expat
WANTLIB += m pthread pq proj z ${MODLUA_WANTLIB} ${COMPILER_LIBCXX}
# postgresql needs to be first otherwise tests are done by cmake module
MODULES = databases/postgresql \
devel/cmake \
lang/python \
lang/lua
MODPY_VERSION = ${MODPY_DEFAULT_VERSION_2}
LIB_DEPENDS = databases/postgresql \
devel/proj \
devel/boost \
BUILD_DEPENDS = devel/libtool \
devel/protozero \
geo/libosmium>=2.15.6
# postgresql,-contrib is needed for hstore extension
TEST_DEPENDS = databases/py-psycopg2 \
geo/postgis \
databases/postgresql,-contrib
COMPILER = base-clang ports-gcc
MODPY_ADJ_FILES = tests/regression-test.py
MODLUA_VERSION = 5.2
MODLUA_SA = Yes
CONFIGURE_ARGS = -DBUILD_TESTS=ON \
-DEXTERNAL_LIBOSMIUM=ON \
-DEXTERNAL_PROTOZERO=ON \
-DCMAKE_CXX_FLAGS="-I${LOCALBASE}/include/utfcpp \
${CXXFLAGS}"
# bump postgresql,-server limits according to its README otherwise some
# tests fail
MODPOSTGRESQL_TEST_DBNAME = osm2pgsql-test
MODPOSTGRESQL_TEST_CMD = ${MODCMAKE_TEST_TARGET}
pre-configure:
${SUBST_CMD} ${WRKSRC}/CMakeLists.txt
rm -f ${WRKSRC}/cmake/FindLua.cmake
post-patch:
@${SUBST_CMD} ${WRKSRC}/docs/osm2pgsql.1
.include <bsd.port.mk>