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.diff -r1.29 -r1.30 pkgsrc/databases/postgresql-postgis2/Makefile
(gdt)
@@ -1,17 +1,18 @@ | @@ -1,17 +1,18 @@ | |||
1 | # $NetBSD: Makefile,v 1.29 2017/09/02 16:53:29 gdt Exp $ | 1 | # $NetBSD: Makefile,v 1.30 2017/09/22 17:18:42 gdt Exp $ | |
2 | 2 | |||
3 | DISTNAME= postgis-2.3.3 | 3 | DISTNAME= postgis-2.3.3 | |
4 | PKGNAME= postgresql${PGSQL_VERSION}-${DISTNAME} | 4 | PKGNAME= postgresql${PGSQL_VERSION}-${DISTNAME} | |
5 | PKGREVISION= 1 | |||
5 | CATEGORIES= databases geography | 6 | CATEGORIES= databases geography | |
6 | MASTER_SITES= http://download.osgeo.org/postgis/source/ | 7 | MASTER_SITES= http://download.osgeo.org/postgis/source/ | |
7 | 8 | |||
8 | MAINTAINER= gdt@NetBSD.org | 9 | MAINTAINER= gdt@NetBSD.org | |
9 | HOMEPAGE= http://postgis.net/ | 10 | HOMEPAGE= http://postgis.net/ | |
10 | COMMENT= Spatial database capabilities for PostgreSQL | 11 | COMMENT= Spatial database capabilities for PostgreSQL | |
11 | 12 | |||
12 | LICENSE= gnu-gpl-v2 | 13 | LICENSE= gnu-gpl-v2 | |
13 | 14 | |||
14 | DEPENDS+= postgresql${PGSQL_VERSION}-server>=0:../../databases/postgresql${PGSQL_VERSION}-server | 15 | DEPENDS+= postgresql${PGSQL_VERSION}-server>=0:../../databases/postgresql${PGSQL_VERSION}-server | |
15 | BUILD_DEPENDS+= docbook-xsl-[0-9]*:../../textproc/docbook-xsl | 16 | BUILD_DEPENDS+= docbook-xsl-[0-9]*:../../textproc/docbook-xsl | |
16 | 17 | |||
17 | CONFLICTS= postgis-[0-9]* | 18 | CONFLICTS= postgis-[0-9]* |
@@ -1,8 +1,9 @@ | @@ -1,8 +1,9 @@ | |||
1 | $NetBSD: distinfo,v 1.10 2017/09/02 16:53:29 gdt Exp $ | 1 | $NetBSD: distinfo,v 1.11 2017/09/22 17:18:42 gdt Exp $ | |
2 | 2 | |||
3 | SHA1 (postgis-2.3.3.tar.gz) = 9be0c182bc50a99a89f7190ea9ab5053647c2e2b | 3 | SHA1 (postgis-2.3.3.tar.gz) = 9be0c182bc50a99a89f7190ea9ab5053647c2e2b | |
4 | RMD160 (postgis-2.3.3.tar.gz) = 12724a16d41131c322c55fdd40bfc2e6fe0fdd95 | 4 | RMD160 (postgis-2.3.3.tar.gz) = 12724a16d41131c322c55fdd40bfc2e6fe0fdd95 | |
5 | SHA512 (postgis-2.3.3.tar.gz) = c0ec4b4b5c470e5f88d1bb72c528269a0cf954981385580db3333502c2da74e431b5a86e3d6427c839c3d4440122be18a69261c8205aa71c8aa4b790550c5e9c | 5 | SHA512 (postgis-2.3.3.tar.gz) = c0ec4b4b5c470e5f88d1bb72c528269a0cf954981385580db3333502c2da74e431b5a86e3d6427c839c3d4440122be18a69261c8205aa71c8aa4b790550c5e9c | |
6 | Size (postgis-2.3.3.tar.gz) = 11342032 bytes | 6 | Size (postgis-2.3.3.tar.gz) = 11342032 bytes | |
7 | SHA1 (patch-extensions_address__standardizer_Makefile.in) = e560e734b3652b5ae4c539af8f077754979f2f29 | 7 | SHA1 (patch-extensions_address__standardizer_Makefile.in) = e560e734b3652b5ae4c539af8f077754979f2f29 | |
8 | SHA1 (patch-extensions_postgis__topology_Makefile.in) = f1095e0a852d746027417d49a0c14bf00a5da00f | 8 | SHA1 (patch-extensions_postgis__topology_Makefile.in) = f1095e0a852d746027417d49a0c14bf00a5da00f | |
9 | SHA1 (patch-raster_rt__core_librtcore.h) = 4dd79beda6e8213addbe6280e1d1b90d5277e18f |
$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 */