pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases/postgresql-postgis2 postgresql-postgis2: Wor...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cbae7b1ccb86
branches:  trunk
changeset: 368931:cbae7b1ccb86
user:      gdt <gdt%pkgsrc.org@localhost>
date:      Fri Sep 22 17:18:42 2017 +0000

description:
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.

diffstat:

 databases/postgresql-postgis2/Makefile                                  |   3 +-
 databases/postgresql-postgis2/distinfo                                  |   3 +-
 databases/postgresql-postgis2/patches/patch-raster_rt__core_librtcore.h |  74 ++++++++++
 3 files changed, 78 insertions(+), 2 deletions(-)

diffs (105 lines):

diff -r 2363807a38f4 -r cbae7b1ccb86 databases/postgresql-postgis2/Makefile
--- a/databases/postgresql-postgis2/Makefile    Fri Sep 22 12:40:15 2017 +0000
+++ b/databases/postgresql-postgis2/Makefile    Fri Sep 22 17:18:42 2017 +0000
@@ -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 -r 2363807a38f4 -r cbae7b1ccb86 databases/postgresql-postgis2/distinfo
--- a/databases/postgresql-postgis2/distinfo    Fri Sep 22 12:40:15 2017 +0000
+++ b/databases/postgresql-postgis2/distinfo    Fri Sep 22 17:18:42 2017 +0000
@@ -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 @@
 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 -r 2363807a38f4 -r cbae7b1ccb86 databases/postgresql-postgis2/patches/patch-raster_rt__core_librtcore.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/postgresql-postgis2/patches/patch-raster_rt__core_librtcore.h   Fri Sep 22 17:18:42 2017 +0000
@@ -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 */



Home | Main Index | Thread Index | Old Index