works for postgis

This commit is contained in:
Ertuğrul Erata
2016-02-24 23:12:16 +02:00
parent 4877a13db0
commit 055130ed39
18 changed files with 767 additions and 0 deletions
+78
View File
@@ -0,0 +1,78 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import get
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import perlmodules
def setup():
autotools.autoreconf("-vfi")
autotools.aclocal()
pisitools.cflags.add("-fno-strict-aliasing")
autotools.configure("--disable-static \
--enable-shared \
--datadir=/usr/share/gdal \
--with-ogdi \
--with-threads \
--with-jasper \
--with-odbc=/usr/lib/unixODBC \
--with-expat \
--with-cfitsio \
--with-hdf5 \
--with-netcdf \
--with-png \
--with-geos \
--without-mysql \
--with-curl \
--with-perl \
--with-jpeg \
--with-jpeg12=no \
--with-libtiff \
--with-sqlite3 \
--with-geotiff=external \
--with-podofo \
--with-spatialite \
--with-ogr \
--with-grib \
--with-curl \
--with-webp \
--with-python \
--without-poppler \
--with-xerces \
--without-openjpeg \
--without-libtool \
--without-hdf4 \
--without-fme \
--without-pcraster \
--without-kakadu \
--without-mrsid \
--without-jp2mrsid \
--without-msg \
--without-bsb \
--without-dods-root \
--without-oci \
--without-ingres \
--without-spatialite \
--without-dwgdirect \
--without-epsilon \
--without-idb \
--without-sde \
--without-ruby")
pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
def build():
autotools.make()
def install():
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
#remove egg
pisitools.removeDir("/usr/lib/python2.7/site-packages/GDAL-*")
perlmodules.removePodfiles()
@@ -0,0 +1,20 @@
--- configure.orig 2011-01-28 15:27:41.522000144 +0200
+++ configure 2011-02-11 17:11:08.468000061 +0200
@@ -15470,7 +15470,7 @@
#define HAVE_LIBRT 1
_ACEOF
- LIBS="-lrt $LIBS"
+ LIBS="$LIBS"
fi
@@ -20537,7 +20537,7 @@
MYSQL_INC=$MYSQL_INC
-MYSQL_LIB=$MYSQL_LIB
+MYSQL_LIB="-L/usr/lib/mysql -lmysqlclient"
@@ -0,0 +1,14 @@
--- swig/python/GNUmakefile.orig 2008-02-02 17:00:52.000000000 -0800
+++ swig/python/GNUmakefile 2008-02-02 17:02:03.000000000 -0800
@@ -51,9 +51,9 @@
install:
ifeq ($(PY_HAVE_SETUPTOOLS),1)
- $(PYTHON) setup.py install
+ $(PYTHON) setup.py install --root=$(DESTDIR)
else
- $(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix)
+ $(PYTHON) setup.py install --root=$(DESTDIR) --prefix=$(prefix)
endif
for f in $(SCRIPTS) ; do $(INSTALL) ./scripts/$$f $(DESTDIR)$(INST_BIN) ; done
@@ -0,0 +1,20 @@
--- swig/include/gdal.i.orig 2009-04-24 21:55:06.315863023 -0700
+++ swig/include/gdal.i 2009-04-24 22:10:28.806611326 -0700
@@ -176,6 +176,17 @@
%include "gdal_typemaps.i"
#endif
+/* Default memberin typemaps required to support SWIG 1.3.39 and above */
+%typemap(memberin) char *Info %{
+/* char* Info memberin typemap */
+$1;
+%}
+
+%typemap(memberin) char *Id %{
+/* char* Info memberin typemap */
+$1;
+%}
+
//************************************************************************
//
// Define the exposed CPL functions.
@@ -0,0 +1,17 @@
diff --git a/gdal/ogr/ogrsf_frmts/sqlite/ogrsqlitevirtualogr.cpp b/gdal/ogr/ogrsf_frmts/sqlite/ogrsqlitevirtualogr.cpp
index a30b452..d45f3ff 100644
--- a/gdal/ogr/ogrsf_frmts/sqlite/ogrsqlitevirtualogr.cpp
+++ b/gdal/ogr/ogrsf_frmts/sqlite/ogrsqlitevirtualogr.cpp
@@ -2451,6 +2451,12 @@ int OGR2SQLITE_static_register (sqlite3 * hDB, char **pzErrMsg,
/* OGR2SQLITE_Register() */
/************************************************************************/
+#ifdef sqlite3_auto_extension
+// Sqlite 3.8.7 defines sqlite3_auto_extension via sqlite3_api
+// which is not initialized at this moment
+#undef sqlite3_auto_extension
+#endif
+
/* We call this function so that each time a db is created, */
/* OGR2SQLITE_static_register is called, to initialize the sqlite3_api */
/* structure with the right pointers. */
+11
View File
@@ -0,0 +1,11 @@
--- GNUmakefile.orig 2010-12-27 15:37:19.715000013 +0200
+++ GNUmakefile 2010-12-27 15:37:35.036000014 +0200
@@ -176,7 +176,7 @@
(cd swig; $(MAKE) install)
endif
for f in LICENSE.TXT data/*.* ; do $(INSTALL_DATA) $$f $(DESTDIR)$(INST_DATA) ; done
- $(LIBTOOL_FINISH) $(INST_LIB)
+ $(LIBTOOL_FINISH) $(DESTDIR)$(INST_LIB)
ifeq ($(HAVE_LIBTOOL),yes)
+175
View File
@@ -0,0 +1,175 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>gdal</Name>
<Homepage>http://www.gdal.org/</Homepage>
<Packager>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>MIT</License>
<IsA>library</IsA>
<Summary>A translator library for raster geospatial data formats (includes OGR support)</Summary>
<Description>GDAL is a translator library for raster geospatial data formats which presents a single abstract data model to the calling application for all supported formats.</Description>
<Archive sha1sum="c7a264ae756bba4608b6a1d159ef7731e004f56a" type="targz">http://download.osgeo.org/gdal/2.0.2/gdal-2.0.2.tar.gz</Archive>
<BuildDependencies>
<Dependency>python-numpy</Dependency>
<!--Dependency>perl-ExtUtils-MakeMaker</Dependency-->
<Dependency>geos-devel</Dependency>
<Dependency>hdf5-devel</Dependency>
<!--Dependency>ogdi-devel</Dependency-->
<Dependency>tiff-devel</Dependency>
<Dependency>webp-devel</Dependency>
<Dependency>giflib-devel</Dependency>
<Dependency>jasper-devel</Dependency>
<!--Dependency>netcdf-devel</Dependency-->
<Dependency>podofo-devel</Dependency>
<Dependency>cfitsio-devel</Dependency>
<Dependency>unixODBC-devel</Dependency>
<Dependency>xerces-c-devel</Dependency>
<!--Dependency>libfreexl-devel</Dependency>
<Dependency>libgeotiff-devel</Dependency-->
<Dependency>libjpeg-turbo-devel</Dependency>
<Dependency>postgresql-lib</Dependency>
</BuildDependencies>
<Patches>
<Patch>gdal-1.5.1-python-install.patch</Patch>
<Patch>gdal-1.6.0-swig-fix.patch</Patch>
<Patch>gdal-sqlite-3.8.7.patch</Patch>
<!--<Patch>libtool.patch</Patch>
<Patch>fix-extra-libs.patch</Patch>-->
</Patches>
</Source>
<Package>
<Name>gdal</Name>
<RuntimeDependencies>
<Dependency>geos</Dependency>
<Dependency>hdf5</Dependency>
<Dependency>ogdi</Dependency>
<Dependency>tiff</Dependency>
<Dependency>webp</Dependency>
<Dependency>giflib</Dependency>
<Dependency>jasper</Dependency>
<Dependency>netcdf</Dependency>
<Dependency>podofo</Dependency>
<Dependency>cfitsio</Dependency>
<Dependency>unixODBC</Dependency>
<Dependency>xerces-c</Dependency>
<Dependency>libfreexl</Dependency>
<Dependency>libgeotiff</Dependency>
<Dependency>libjpeg-turbo</Dependency>
<Dependency>postgresql-lib</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="library">/usr/lib</Path>
<Path fileType="data">/usr/share</Path>
</Files>
</Package>
<Package>
<Name>python-gdal</Name>
<Summary>gdal python bindings</Summary>
<RuntimeDependencies>
<Dependency release="current">gdal</Dependency>
<Dependency>python-numpy</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="header">/usr/lib/python2.7</Path>
</Files>
</Package>
<Package>
<Name>gdal-devel</Name>
<Summary>Development files for gdal</Summary>
<RuntimeDependencies>
<Dependency release="current">gdal</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="header">/usr/include</Path>
<Path fileType="man">/usr/share/man/man3</Path>
</Files>
</Package>
<History>
<Update release="11">
<Date>2016-02-24</Date>
<Version>2.0.2</Version>
<Comment>Version bump.</Comment>
<Name>Ertuğrul Erata</Name>
<Email>ertugrulerata@gmail.com</Email>
</Update>
<Update release="10">
<Date>2015-01-13</Date>
<Version>1.11.1</Version>
<Comment>Version bump.</Comment>
<Name>Ertuğrul Erata</Name>
<Email>ertugrulerata@gmail.com</Email>
</Update>
<Update release="9">
<Date>2014-05-30</Date>
<Version>1.9.2</Version>
<Comment>Rebuild, cleanup, add python bindings.</Comment>
<Name>Serdar Soytetir</Name>
<Email>kaptan@pisilinux.org</Email>
</Update>
<Update release="8">
<Date>2014-04-23</Date>
<Version>1.9.2</Version>
<Comment>Rebuild</Comment>
<Name>Varol Maksutoğlu</Name>
<Email>waroi@pisilinux.org</Email>
</Update>
<Update release="7">
<Date>2014-01-31</Date>
<Version>1.9.2</Version>
<Comment>Rebuild Unused</Comment>
<Name>Varol Maksutoğlu</Name>
<Email>waroi@pisilinux.org</Email>
</Update>
<Update release="6">
<Date>2014-01-23</Date>
<Version>1.9.2</Version>
<Comment>rebuild.</Comment>
<Name>Yusuf Aydemir</Name>
<Email>yusuf.aydemir@pisilinux.org</Email>
</Update>
<Update release="5">
<Date>2013-12-01</Date>
<Version>1.9.2</Version>
<Comment>Rebuild for new perl.</Comment>
<Name>Osman Erkan</Name>
<Email>osman.erkan@pisilinux.org</Email>
</Update>
<Update release="4">
<Date>2013-10-10</Date>
<Version>1.9.2</Version>
<Comment>Rebuil for new poppler, use podofo instead of poppler.</Comment>
<Name>Serdar Soytetir</Name>
<Email>kaptan@pisilinux.org</Email>
</Update>
<Update release="3">
<Date>2013-08-16</Date>
<Version>1.9.2</Version>
<Comment>Fix build</Comment>
<Name>Marcin Bojara</Name>
<Email>marcin@pisilinux.org</Email>
</Update>
<Update release="2">
<Date>2013-07-28</Date>
<Version>1.9.2</Version>
<Comment>Dep Fixed</Comment>
<Name>Osman Erkan</Name>
<Email>osman.erkan@pisilinux.org</Email>
</Update>
<Update release="1">
<Date>2012-11-10</Date>
<Version>1.9.2</Version>
<Comment>First release</Comment>
<Name>Osman Erkan</Name>
<Email>osman.erkan@pisilinux.org</Email>
</Update>
</History>
</PISI>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>gdal</Name>
<Summary xml:lang="tr">Coğrafi raster veri formatları için dönüştürücü bir kütüphane (OGR desteği de vardır)</Summary>
<Description xml:lang="tr">GDAL çağıran uygulamaya tüm desteklenen formatlar için tek bir soyut veri modeli sunan raster veri formatı dönüştürücü bir kütüphanedir.</Description>
</Source>
<Package>
<Name>gdal-devel</Name>
<Summary xml:lang="tr">gdal için geliştirme dosyaları</Summary>
</Package>
</PISI>