summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgdt <gdt@pkgsrc.org>2017-09-22 17:18:42 +0000
committergdt <gdt@pkgsrc.org>2017-09-22 17:18:42 +0000
commitaa4a3bd0e084be4322c4353c7472575c8683bd7c (patch)
tree8c3d7ce559e170fa16f90676eb58ba882319cc26
parent1d35ec90faa0bb41945851d3441e1407d56abb59 (diff)
downloadpkgsrc-aa4a3bd0e084be4322c4353c7472575c8683bd7c.tar.gz
postgresql-postgis2: Work around an upstream configure bug
Upstream has very complicated ifdefs that try to define UNIX everywhere but windows, except that it fails to include NetBSD. Then, it uses UNIX to avoid using the non-standard stricmp and instead use the POSIX-conforming strcasecmp. For pkgsrc, rip out an entire screenful of complexity and just define UNIX if not defined. Resolves build on NetBSD 7, and probably other places.
-rw-r--r--databases/postgresql-postgis2/Makefile3
-rw-r--r--databases/postgresql-postgis2/distinfo3
-rw-r--r--databases/postgresql-postgis2/patches/patch-raster_rt__core_librtcore.h74
3 files changed, 78 insertions, 2 deletions
diff --git a/databases/postgresql-postgis2/Makefile b/databases/postgresql-postgis2/Makefile
index ad71cac90cb..c26f5c80765 100644
--- a/databases/postgresql-postgis2/Makefile
+++ b/databases/postgresql-postgis2/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.29 2017/09/02 16:53:29 gdt Exp $
+# $NetBSD: Makefile,v 1.30 2017/09/22 17:18:42 gdt Exp $
DISTNAME= postgis-2.3.3
PKGNAME= postgresql${PGSQL_VERSION}-${DISTNAME}
+PKGREVISION= 1
CATEGORIES= databases geography
MASTER_SITES= http://download.osgeo.org/postgis/source/
diff --git a/databases/postgresql-postgis2/distinfo b/databases/postgresql-postgis2/distinfo
index 7906652df01..46f5531e561 100644
--- a/databases/postgresql-postgis2/distinfo
+++ b/databases/postgresql-postgis2/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.10 2017/09/02 16:53:29 gdt Exp $
+$NetBSD: distinfo,v 1.11 2017/09/22 17:18:42 gdt Exp $
SHA1 (postgis-2.3.3.tar.gz) = 9be0c182bc50a99a89f7190ea9ab5053647c2e2b
RMD160 (postgis-2.3.3.tar.gz) = 12724a16d41131c322c55fdd40bfc2e6fe0fdd95
@@ -6,3 +6,4 @@ SHA512 (postgis-2.3.3.tar.gz) = c0ec4b4b5c470e5f88d1bb72c528269a0cf954981385580d
Size (postgis-2.3.3.tar.gz) = 11342032 bytes
SHA1 (patch-extensions_address__standardizer_Makefile.in) = e560e734b3652b5ae4c539af8f077754979f2f29
SHA1 (patch-extensions_postgis__topology_Makefile.in) = f1095e0a852d746027417d49a0c14bf00a5da00f
+SHA1 (patch-raster_rt__core_librtcore.h) = 4dd79beda6e8213addbe6280e1d1b90d5277e18f
diff --git a/databases/postgresql-postgis2/patches/patch-raster_rt__core_librtcore.h b/databases/postgresql-postgis2/patches/patch-raster_rt__core_librtcore.h
new file mode 100644
index 00000000000..0a6b049fe18
--- /dev/null
+++ b/databases/postgresql-postgis2/patches/patch-raster_rt__core_librtcore.h
@@ -0,0 +1,74 @@
+$NetBSD: patch-raster_rt__core_librtcore.h,v 1.1 2017/09/22 17:18:42 gdt Exp $
+
+Work around configure code that fails to check HAVE_STRNICMP because
+the previous twisty maze of defines do not define UNIX. Complaint
+submitted upstream; this patch would break Windows (which is ok in
+pkgsrc).
+
+--- raster/rt_core/librtcore.h.orig 2016-07-04 15:45:56.000000000 +0000
++++ raster/rt_core/librtcore.h
+@@ -58,61 +58,10 @@
+ #ifndef LIBRTCORE_H_INCLUDED
+ #define LIBRTCORE_H_INCLUDED
+
+-/* define the systems */
+-#if defined(__linux__) /* (predefined) */
+-#if !defined(LINUX)
+-#define LINUX
+-#endif
+-#if !defined(UNIX)
+-#define UNIX /* make sure this is defined */
+-#endif
+-#endif
+-
+-
+-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) /* seems to work like Linux... */
+-#if !defined(LINUX)
+-#define LINUX
+-#endif
+-#if !defined(UNIX)
+-#define UNIX /* make sure this is defined */
+-#endif
+-#endif
+-
+-#if defined(__GNU__) /* GNU/Hurd is also like Linux */
+-#if !defined(LINUX)
+-#define LINUX
+-#endif
+-#if !defined(UNIX)
+-#define UNIX /* make sure this is defined */
+-#endif
+-#endif
+-
+-#if defined(__MSDOS__)
+-#if !defined(MSDOS)
+-#define MSDOS /* make sure this is defined */
+-#endif
+-#endif
+-
+-#if defined(__WIN32__) || defined(__NT__) || defined(_WIN32)
+-#if !defined(WIN32)
+-#define WIN32
+-#endif
+-#if defined(__BORLANDC__) && defined(MSDOS) /* Borland always defines MSDOS */
+-#undef MSDOS
+-#endif
+-#endif
+-
+-#if defined(__APPLE__)
+-#if !defined(UNIX)
++/* For pkgsrc, assume POSIX. */
++#ifndef UNIX
+ #define UNIX
+-#endif
+-#endif
+-
+-#if defined(sun) || defined(__sun)
+-#if !defined(UNIX)
+-#define UNIX
+-#endif
+-#endif
++#endif /* UNIX */
+
+ /* if we are in Unix define stricmp to be strcasecmp and strnicmp to */
+ /* be strncasecmp. I'm not sure if all Unices have these, but Linux */