nominatim: import 3.2.0

Nominatim (from the Latin, 'by name') is a tool to search OpenStreetMap data by
name and address (geocoding) and to generate synthetic addresses of OSM points
(reverse geocoding).
This commit is contained in:
Sebastian Wiedenroth 2019-03-14 10:36:28 +01:00
parent 48fa483584
commit 9148501edf
6 changed files with 3446 additions and 0 deletions

View File

@ -2332,6 +2332,7 @@ SUBDIR+= nodm
SUBDIR+= noip
SUBDIR+= noiptun
SUBDIR+= nomadio
SUBDIR+= nominatim
SUBDIR+= nongnu-libunwind-git
SUBDIR+= noor
SUBDIR+= nos-tun

3
nominatim/DESCR Normal file
View File

@ -0,0 +1,3 @@
Nominatim (from the Latin, 'by name') is a tool to search OpenStreetMap data by
name and address (geocoding) and to generate synthetic addresses of OSM points
(reverse geocoding).

80
nominatim/Makefile Normal file
View File

@ -0,0 +1,80 @@
# $NetBSD$
DISTNAME= Nominatim-3.2.0
PKGNAME= ${DISTNAME:tl}
CATEGORIES= geography
MASTER_SITES= http://www.nominatim.org/release/
EXTRACT_SUFX= .tar.bz2
MAINTAINER= wiedi@frubar.net
HOMEPAGE= http://www.nominatim.org/
COMMENT= Open Source search based on OpenStreetMap data
LICENSE= gnu-gpl-v2
USE_TOOLS+= bash gmake pax
USE_CMAKE= yes
USE_LANGUAGES= c c++
.include "../../lang/php/phpversion.mk"
DEPENDS+= ${PHP_PKG_PREFIX}-intl-[0-9]*:../../textproc/php-intl
DEPENDS+= ${PHP_PKG_PREFIX}-json-[0-9]*:../../textproc/php-json
DEPENDS+= ${PHP_PKG_PREFIX}-pear-DB-[0-9]*:../../databases/pear-DB
DEPENDS+= ${PHP_PKG_PREFIX}-pgsql*-[0-9]*:../../databases/php-pgsql
DEPENDS+= postgresql${PGSQL_VERSION}-contrib-[0-9]*:../../databases/postgresql${PGSQL_VERSION}-contrib
DEPENDS+= postgresql${PGSQL_VERSION}-postgis-[0-9]*:../../databases/postgresql-postgis2
CONFIGURE_DIRS= ${WRKDIR}/build
CMAKE_ARG_PATH= ${WRKSRC}
CMAKE_FLAGS+= -DPHP_BIN=${PREFIX}/bin/php
REPLACE_BASH+= utils/import_wikipedia.sh
REPLACE_PYTHON+= utils/*.py
REPLACE_INTERPRETER+= php
REPLACE.php.old= [^[:space:]]*[pP][hH][pP][^[:space:]]*
REPLACE.php.new= ${PREFIX}/bin/php
REPLACE_FILES.php= utils/*.php
NDIR= ${PREFIX}/share/nominatim
MODDIR= ${PREFIX}/lib/nominatim
INSTALLATION_DIRS= bin ${MODDIR}
INSTALLATION_DIRS+= ${NDIR}/data
INSTALLATION_DIRS+= ${NDIR}/lib
INSTALLATION_DIRS+= ${NDIR}/nominatim
INSTALLATION_DIRS+= ${NDIR}/osm2pgsql
INSTALLATION_DIRS+= ${NDIR}/settings
INSTALLATION_DIRS+= ${NDIR}/sql
INSTALLATION_DIRS+= ${NDIR}/utils
INSTALLATION_DIRS+= ${NDIR}/website
SUBST_CLASSES+= paths
SUBST_FILES.paths+= ${WRKSRC}/settings/defaults.php
SUBST_SED.paths+= -e "s|@CMAKE_SOURCE_DIR@|${NDIR}|g"
SUBST_SED.paths+= -e "s|@CMAKE_BINARY_DIR@|${NDIR}|g"
SUBST_SED.paths+= -e "s|CONST_InstallPath.'/module'|'${MODDIR}'|g"
SUBST_STAGE.paths= post-configure
.include "../../lang/python/application.mk"
post-extract:
${RUN} mkdir -p ${WRKDIR}/build
do-install:
.for d in data lib sql utils website
cd ${WRKSRC}/${d} && pax -rw . ${DESTDIR}${NDIR}/${d}
.endfor
${INSTALL_LIB} ${WRKDIR}/build/module/nominatim.so ${DESTDIR}${MODDIR}
${INSTALL_PROGRAM} ${WRKDIR}/build/nominatim/nominatim ${DESTDIR}${PREFIX}/bin/
${INSTALL_PROGRAM} ${WRKDIR}/build/osm2pgsql/osm2pgsql ${DESTDIR}${NDIR}/osm2pgsql/
ln -f -s ${DESTDIR}${PREFIX}/bin/nominatim ${DESTDIR}${NDIR}/nominatim/
${INSTALL_DATA} ${WRKDIR}/build/settings/*.php ${DESTDIR}${NDIR}/settings/
.include "../../geography/proj/buildlink3.mk"
.include "../../archivers/bzip2/buildlink3.mk"
.include "../../devel/boost-libs/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../lang/lua/buildlink3.mk"
.include "../../mk/pgsql.buildlink3.mk"
.include "../../textproc/expat/buildlink3.mk"
.include "../../textproc/libxml2/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

3330
nominatim/PLIST Normal file

File diff suppressed because it is too large Load Diff

7
nominatim/distinfo Normal file
View File

@ -0,0 +1,7 @@
$NetBSD$
SHA1 (Nominatim-3.2.0.tar.bz2) = 068f1d2c1aeefc30cc4089afae586f1a27443c8f
RMD160 (Nominatim-3.2.0.tar.bz2) = 068ac839932796d86d6ad372af3fd5a299f3bbc1
SHA512 (Nominatim-3.2.0.tar.bz2) = 41c152efa07f164dd09745f7813818be46ee67a0267ada289c1df58d38793a5a00e6b2e2f5ead0130f379aac5883f2bf670bc8e010af2f9c47b04348302321e8
Size (Nominatim-3.2.0.tar.bz2) = 47890007 bytes
SHA1 (patch-nominatim_postgresql.h) = ce5b05b5eac34464734684f37fe725d2eacc3c32

View File

@ -0,0 +1,25 @@
$NetBSD$
Add byteswap support on SunOS
--- nominatim/postgresql.h.orig 2018-08-26 15:35:08.000000000 +0000
+++ nominatim/postgresql.h
@@ -7,6 +7,11 @@
#define PG_OID_INT8 20
#define PG_OID_INT4 23
+#if defined(__sun)
+#include <endian.h>
+#define PGint32(x) (htobe32(x))
+#define PGint64(x) (htobe64(x))
+#else
#if HAVE_BYTESWAP
#include <byteswap.h>
#define PG_BSWAP32(x) bswap_32(x)
@@ -34,6 +39,7 @@
#else
#error "Cannot determine byte order."
#endif
+#endif
const char *build_conninfo(const char *db, const char *username, const char *password, const char *host, const char *port);