[postgis-users] CentOS 4.5 postgis-1.1.0.spec patch

Rob Nagler nagler at bivio.biz
Mon Nov 12 08:20:50 PST 2007


In order to insall PostGIS on CentOS 4.5 (RHEL 4.5), you'll need the
appended patch to the spec file as follows.  The CFLAGS cannot include
-Wno-pointer-sign  and gisentryinit takes 6 args, not 7.

It would be great if there were some feature tests for these added to
the PostGIS release.

Cheers,
Rob
----------------------------------------------------------------
*** postgis-1.1.0.spec~	2005-12-23 06:39:34.000000000 -0700
--- postgis-1.1.0.spec	2007-11-12 09:09:44.000000000 -0700
***************
*** 50,58 ****
  
  %prep
  %setup -q
  
  %build
! make %{?_smp_mflags} PGXS=1 PGSQL_SRC=/usr/lib/pgsql/pgxs LPATH=\$\(pkglibdir\) shlib="%{name}.so"  'CFLAGS=-Wno-pointer-sign '
  
  %if %jdbc2
  export MAKEFILE_DIR=/usr/src/redhat/BUILD/%{name}-%{version}/jdbc2
--- 50,97 ----
  
  %prep
  %setup -q
+ patch -N lwgeom/lwgeom_gist.c <<'EOF'
+ *** lwgeom_gist.c.orig	2005-11-25 09:14:25.000000000 -0700
+ --- lwgeom_gist.c	2007-11-12 09:07:12.000000000 -0700
+ ***************
+ *** 590,597 ****
+   
+   			gistentryinit(*retval, PointerGetDatum(rr),
+   				entry->rel, entry->page,
+ ! 				entry->offset, sizeof(BOX2DFLOAT4),
+ ! 				FALSE);
+   
+   		}
+   		else
+ --- 590,596 ----
+   
+   			gistentryinit(*retval, PointerGetDatum(rr),
+   				entry->rel, entry->page,
+ ! 				entry->offset, sizeof(BOX2DFLOAT4));
+   
+   		}
+   		else
+ ***************
+ *** 600,606 ****
+   		elog(NOTICE,"GIST: LWGEOM_gist_compress got a NULL key");
+   #endif
+   			gistentryinit(*retval, (Datum) 0, entry->rel,
+ ! 				entry->page, entry->offset, 0, FALSE);
+   		}
+   
+   	}
+ --- 599,605 ----
+   		elog(NOTICE,"GIST: LWGEOM_gist_compress got a NULL key");
+   #endif
+   			gistentryinit(*retval, (Datum) 0, entry->rel,
+ ! 				entry->page, entry->offset, 0);
+   		}
+   
+   	}
+ EOF
  
  %build
! make %{?_smp_mflags} PGXS=1 PGSQL_SRC=/usr/lib/pgsql/pgxs LPATH=\$\(pkglibdir\) shlib="%{name}.so"
  
  %if %jdbc2
  export MAKEFILE_DIR=/usr/src/redhat/BUILD/%{name}-%{version}/jdbc2



More information about the postgis-users mailing list