[postgis-users] CentOS 4.5 postgis-1.1.0.spec patch
Mark Cave-Ayland
mark.cave-ayland at ilande.co.uk
Mon Nov 19 07:03:26 PST 2007
On Mon, 2007-11-12 at 09:20 -0700, Rob Nagler wrote:
> 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
Interesting. The above patch is required for PostgreSQL >= 8.2, however
PostGIS 1.1.x never supported PostgreSQL 8.2 which is probably why there
is a PostGIS/PostgreSQL version mismatch occurring. According to the
release notes, PostGIS 1.2.1 is the first release to support PostgreSQL
8.2.
Kind regards,
Mark.
--
ILande - Open Source Consultancy
http://www.ilande.co.uk
More information about the postgis-users
mailing list