This commit is contained in:
Ertuğrul Erata
2016-02-25 15:08:15 +02:00
parent 055130ed39
commit 6b551b5bff
20 changed files with 1068 additions and 13 deletions
+39
View File
@@ -0,0 +1,39 @@
#!/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 autotools
from pisi.actionsapi import shelltools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get
WorkDir = "ogdi-3.2.0.beta2"
shelltools.export("TOPDIR", "%s/%s" % (get.workDIR(), WorkDir))
def setup():
autotools.configure('--with-zlib \
--with-projlib="-L/usr/lib -lproj" \
--with-expat \
--with-binconfigs')
def build():
shelltools.export("TARGET", "Linux")
shelltools.export("CFG", "release")
autotools.make("-j1")
def install():
pisitools.dolib_so("bin/Linux/*.so")
pisitools.dosym("/usr/lib/libogdi.so", "/usr/lib/libogdi.so.3")
for i in ["gltpd", "ogdi_import", "ogdi_info"]:
pisitools.dobin("bin/Linux/%s" % i)
pisitools.dobin("ogdi-config")
pisitools.insinto("/usr/lib/pkgconfig", "ogdi.pc")
pisitools.insinto("/usr/include", "ogdi/include/*.h")
pisitools.dodoc("ChangeLog", "NEWS", "README")
@@ -0,0 +1,38 @@
diff --git a/config/generic.mak.in b/config/generic.mak.in
index 1cb74f5..2e9cabe 100644
--- a/config/generic.mak.in
+++ b/config/generic.mak.in
@@ -35,16 +35,16 @@ AR = ar cr
# Compilation and linking flags
#
SHLIB_CFLAGS = @C_PIC@
-COMMON_CFLAGS = $(OPTIMIZATION) @CFLAGS@ @C_WFLAGS@ -DUNIX=1
+COMMON_CFLAGS = $(OPTIMIZATION) @CFLAGS@ @C_WFLAGS@ -DUNIX=1 @C_PIC@
-SHLIB_LDFLAGS = -shared
-COMMON_LDFLAGS = $(OPTIMIZATION)
+SHLIB_LDFLAGS = -shared -Wl,-soname,$(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT).$(OGDI_MAJOR)
+COMMON_LDFLAGS = $(OPTIMIZATION) $(LDFLAGS)
RPC_INCLUDES = @RPC_INCLUDES@
UCB_STATICLIB =
-TCL_INCLUDE = -I/usr/include/tcl8.3
+TCL_INCLUDE = -I${prefix}/include
TCL_LINKLIB =
#
diff --git a/config/unix.mak b/config/unix.mak
index e3af578..927b0fc 100644
--- a/config/unix.mak
+++ b/config/unix.mak
@@ -55,7 +55,7 @@ LINK_SW = -L
ifeq ($(CFG),debug)
OPTIMIZATION = -g
else
-OPTIMIZATION = -O
+OPTIMIZATION =
endif
#
@@ -0,0 +1,298 @@
Index: ogdi-dfsg/configure
===================================================================
--- ogdi-dfsg.orig/configure
+++ ogdi-dfsg/configure
@@ -3939,7 +3939,7 @@
fi
-for ac_header in projects.h
+for ac_header in proj_api.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -4085,8 +4085,8 @@
{ (exit 1); exit 1; }; }
fi
if test "$ac_cv_header_projects_h" = no ; then
- { { echo "$as_me:$LINENO: error: Unable to find external PROJ.4 projects.h file, give path or use default internal library." >&5
-echo "$as_me: error: Unable to find external PROJ.4 projects.h file, give path or use default internal library." >&2;}
+ { { echo "$as_me:$LINENO: error: Unable to find external PROJ.4 proj_api.h file, give path or use default internal library." >&5
+echo "$as_me: error: Unable to find external PROJ.4 proj_api.h file, give path or use default internal library." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -4095,12 +4095,12 @@
elif test "$with_proj" != "no" -a "$with_proj" != "" ; then
- if test -r $with_proj/include/projects.h ; then
- echo "checking for $with_proj/include/projects.h ... found"
+ if test -r $with_proj/include/proj_api.h ; then
+ echo "checking for $with_proj/include/proj_api.h ... found"
PROJ_INCLUDE=-I$with_proj/include
else
- { { echo "$as_me:$LINENO: error: Unable to find $with_proj/include/projects.h" >&5
-echo "$as_me: error: Unable to find $with_proj/include/projects.h" >&2;}
+ { { echo "$as_me:$LINENO: error: Unable to find $with_proj/include/proj_api.h" >&5
+echo "$as_me: error: Unable to find $with_proj/include/proj_api.h" >&2;}
{ (exit 1); exit 1; }; }
fi
Index: ogdi-dfsg/configure.in
===================================================================
--- ogdi-dfsg.orig/configure.in
+++ ogdi-dfsg/configure.in
@@ -81,13 +81,13 @@
if test "$with_proj" = "yes" ; then
AC_CHECK_LIB(proj,pj_init,PROJ_SETTING=external,PROJ_SETTING=missing,)
- AC_CHECK_HEADERS(projects.h)
+ AC_CHECK_HEADERS(proj_api.h)
if test $PROJ_SETTING = missing ; then
AC_MSG_ERROR([Unable to find external PROJ.4 library, give path or use default internal library.])
fi
if test "$ac_cv_header_projects_h" = no ; then
- AC_MSG_ERROR([Unable to find external PROJ.4 projects.h file, give path or use default internal library.])
+ AC_MSG_ERROR([Unable to find external PROJ.4 proj_api.h file, give path or use default internal library.])
fi
PROJ_SETTING=external
@@ -95,11 +95,11 @@
elif test "$with_proj" != "no" -a "$with_proj" != "" ; then
- if test -r $with_proj/include/projects.h ; then
- echo "checking for $with_proj/include/projects.h ... found"
+ if test -r $with_proj/include/projapi.h ; then
+ echo "checking for $with_proj/include/proj_api.h ... found"
PROJ_INCLUDE=-I$with_proj/include
else
- AC_MSG_ERROR([Unable to find $with_proj/include/projects.h])
+ AC_MSG_ERROR([Unable to find $with_proj/include/proj_api.h])
fi
if test -r $with_proj/lib/libproj.so ; then
Index: ogdi-dfsg/ogdi/c-api/client.c
===================================================================
--- ogdi-dfsg.orig/ogdi/c-api/client.c
+++ ogdi-dfsg/ogdi/c-api/client.c
@@ -1576,7 +1576,7 @@
char *error_message;
ecs_CtlPoints *cpts;
ecs_Result *res;
- PJ *tempproj;
+ projPJ tempproj;
if (multiblock != 0) {
res = &cln_dummy_result;
@@ -1598,7 +1598,7 @@
/* Check if the projection is valid */
if (strncmp(projection,PROJ_LONGLAT,13) != 0) {
- tempproj = (PJ *) cln_ProjInit(projection);
+ tempproj = (projPJ) cln_ProjInit(projection);
if(tempproj == NULL) {
res = &cln_dummy_result;
ecs_SetError(res,1,"This projection string is invalid");
@@ -1775,7 +1775,7 @@
ecs_Result *res;
register ecs_Client *cln;
char *server_proj;
- PJ *oldtarget,*oldsource;
+ projPJ oldtarget,oldsource;
ecs_Region oldreg;
int oldisprojequal;
int oldisTargetLL;
@@ -1874,7 +1874,7 @@
if (strncmp(projection,PROJ_LONGLAT,13) != 0) {
cln->isTargetLL = FALSE;
- cln->target = (PJ *) cln_ProjInit(projection);
+ cln->target = (projPJ) cln_ProjInit(projection);
if(cln->target == NULL) {
goto setprojerror;
}
@@ -1920,7 +1920,7 @@
if (strncmp(server_proj,PROJ_LONGLAT,13) != 0) {
cln->isSourceLL = FALSE;
- cln->source = (PJ *) cln_ProjInit(server_proj);
+ cln->source = (projPJ) cln_ProjInit(server_proj);
if(cln->source == NULL) {
goto setprojerror;
}
@@ -2328,13 +2328,13 @@
* char *d: Projection name
*
* OUT
- * return PJ *: New projection structure. If NULL, the operation
+ * return projPJ: New projection structure. If NULL, the operation
* is a failure.
*
*----------------------------------------------------------------------
*/
-PJ *cln_ProjInit(d)
+projPJ cln_ProjInit(d)
char *d;
{
int i,n;
@@ -2343,7 +2343,7 @@
char *l;
int longueur;
char *c;
- PJ *retour;
+ projPJ retour;
if ((c = (char *) malloc(strlen(d)+3)) == NULL) {
return NULL;
@@ -2378,7 +2378,7 @@
n++;
}
- retour = (PJ *) pj_init(n, (char **) tableau);
+ retour = (projPJ) pj_init(n, (char **) tableau);
free(c);
free(tableau);
Index: ogdi-dfsg/ogdi/c-api/ecsgeo.c
===================================================================
--- ogdi-dfsg.orig/ogdi/c-api/ecsgeo.c
+++ ogdi-dfsg/ogdi/c-api/ecsgeo.c
@@ -310,7 +310,7 @@
char *projection;
double X1,Y1,X2,Y2;
{
- PJ *proj;
+ projPJ proj;
char **argv;
int argc;
double lon1,lat1,lon2,lat2;
Index: ogdi-dfsg/ogdi/datum_driver/usa/dtusa.c
===================================================================
--- ogdi-dfsg.orig/ogdi/datum_driver/usa/dtusa.c
+++ ogdi-dfsg/ogdi/datum_driver/usa/dtusa.c
@@ -26,7 +26,12 @@
********************************************************************/
#include "ecs.h"
-#include "projects.h"
+#include "proj_api.h"
+
+/* Definition from Proj.4 */
+projUV nad_cvt(projUV, int, struct CTABLE *);
+struct CTABLE *nad_init(projCtx ctx, char *);
+void nad_free(struct CTABLE *);
typedef struct {
struct CTABLE *dtptr;
@@ -124,7 +129,7 @@
strcat(pathfile,"/");
strcat(pathfile,table);
- ptr->dtptr = nad_init(pathfile);
+ ptr->dtptr = nad_init(pj_get_default_ctx(), pathfile);
if (ptr->dtptr == NULL) {
ptr->count--;
return FALSE;
Index: ogdi-dfsg/ogdi/include/ecs_util.h
===================================================================
--- ogdi-dfsg.orig/ogdi/include/ecs_util.h
+++ ogdi-dfsg/ogdi/include/ecs_util.h
@@ -105,12 +105,7 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include "projects.h"
-
-/* Ensure we are compatible with PROJ.4.4.x and PROJ.4.3.x */
-#ifndef USE_PROJUV
-# define projUV UV
-#endif
+#include "proj_api.h"
#include "ecs.h"
@@ -1054,8 +1049,8 @@
ecs_Family currentSelectionFamily: Current layer selection type
char *tclprocname: attribute callback procedure for tcl
char *target_proj: Projection descriptor
- PJ *target: target (c interface) projection descriptors
- PJ *source: source (driver) projection descriptors
+ projPJ target: target (c interface) projection descriptors
+ projPJ source: source (driver) projection descriptors
ecs_Datum targetdatum: target datum information
ecs_Datum sourcedatum: source datum information
void *dthandle: Handle to the datum driver
@@ -1092,8 +1088,8 @@
ecs_Family currentSelectionFamily; /* Current layer selection type */
char *tclprocname; /* attribute callback procedure for tcl */
char *target_proj;
- PJ *target; /* source and target projection descriptors */
- PJ *source;
+ projPJ target; /* source and target projection descriptors */
+ projPJ source;
int isSourceLL; /* flags to avoid unnecessary computation */
int isTargetLL;
int isProjEqual;
@@ -1165,7 +1161,7 @@
/* Projection conversion functions */
-PJ *cln_ProjInit _ANSI_ARGS_((char *d));
+projPJ cln_ProjInit _ANSI_ARGS_((char *d));
int cln_CompareProjections _ANSI_ARGS_((int ClientID));
int cln_UpdateMaxRegion _ANSI_ARGS_((int ClientID, double x, double y, ecs_Region *gr, int sens, int first));
int cln_ConvRegion _ANSI_ARGS_((int ClientID, ecs_Region *gr, int sens));
Index: ogdi-dfsg/contrib/ogdi_import/ogdi_import.c
===================================================================
--- ogdi-dfsg.orig/contrib/ogdi_import/ogdi_import.c
+++ ogdi-dfsg/contrib/ogdi_import/ogdi_import.c
@@ -63,12 +63,7 @@
#include "ecs.h"
#include "shapefil.h"
#include <assert.h>
-#include "projects.h"
-
-#ifndef PJ_VERSION
-#define projPJ PJ*
-#define projUV UV
-#endif
+#include "proj_api.h"
static int ClientID = -1;
static int bNoDict = FALSE;
Index: ogdi-dfsg/contrib/ogdi_info/ogdi_info.c
===================================================================
--- ogdi-dfsg.orig/contrib/ogdi_info/ogdi_info.c
+++ ogdi-dfsg/contrib/ogdi_info/ogdi_info.c
@@ -63,7 +63,7 @@
*/
#include "ecs.h"
-#include "projects.h"
+#include "proj_api.h"
static int ClientID = -1;
static int bNoDict = FALSE;
@@ -214,7 +214,7 @@
/* DumpGlobalRegion() */
/************************************************************************/
-static int DumpGlobalRegion( ecs_Region * region, PJ * proj_defn )
+static int DumpGlobalRegion( ecs_Region * region, projPJ proj_defn )
{
ecs_Result *result;
@@ -398,7 +398,7 @@
{
ecs_Result *result;
- PJ *proj_defn = NULL;
+ projPJ proj_defn = NULL;
/* -------------------------------------------------------------------- */
/* Close old client if there is one active. */
+86
View File
@@ -0,0 +1,86 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>ogdi</Name>
<Homepage>http://ogdi.sourceforge.net</Homepage>
<Packager>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>as-is</License>
<IsA>library</IsA>
<Summary>Open Geographical Datastore Interface, a GIS support library</Summary>
<Description>OGDI is an application programming interface (API) that uses a standardized access methods to work in conjunction with GIS software packages (the application) and various geospatial data products.</Description>
<Archive sha1sum="e3fd0c8b3fb02ef5da2cc1e76bb5c2d3cb0b51b4" type="targz">mirrors://sourceforge/ogdi/ogdi-3.2.0.beta2.tar.gz</Archive>
<BuildDependencies>
<Dependency>proj-devel</Dependency>
<Dependency>zlib-devel</Dependency>
<Dependency>expat-devel</Dependency>
</BuildDependencies>
<Patches>
<Patch level="1">ogdi-3.1.6-fpic.patch</Patch>
<Patch level="1">patch_for_proj48_redhat.patch</Patch>
</Patches>
</Source>
<Package>
<Name>ogdi</Name>
<RuntimeDependencies>
<Dependency>proj</Dependency>
<Dependency>zlib</Dependency>
<Dependency>expat</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="library">/usr/lib</Path>
<Path fileType="doc">/usr/share/doc</Path>
</Files>
</Package>
<Package>
<Name>ogdi-devel</Name>
<Summary>Development files for ogdi</Summary>
<RuntimeDependencies>
<Dependency release="current">ogdi</Dependency>
<Dependency>proj-devel</Dependency>
<Dependency>zlib-devel</Dependency>
<Dependency>expat-devel</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="header">/usr/include</Path>
<Path fileType="library">/usr/lib/pkgconfig</Path>
</Files>
</Package>
<History>
<Update release="4">
<Date>2014-05-31</Date>
<Version>3.2.0_beta2</Version>
<Comment>Rebuild.</Comment>
<Name>Alihan Öztürk</Name>
<Email>alihan@pisilinux.org</Email>
</Update>
<Update release="3">
<Date>2014-03-09</Date>
<Version>3.2.0_beta2</Version>
<Comment>Rebuild</Comment>
<Name>Alihan Öztürk</Name>
<Email>alihan@pisilinux.org</Email>
</Update>
<Update release="2">
<Date>2013-07-28</Date>
<Version>3.2.0_beta2</Version>
<Comment>Move pc files to devel pack, rebuild</Comment>
<Name>Osman Erkan</Name>
<Email>osman.erkan@pisilinux.org</Email>
</Update>
<Update release="1">
<Date>2012-10-13</Date>
<Version>3.2.0_beta2</Version>
<Comment>First release</Comment>
<Name>Marcin Bojara</Name>
<Email>marcin@pisilinux.org</Email>
</Update>
</History>
</PISI>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>ogdi</Name>
<Summary xml:lan="tr">Açık coğrafik veri kayıt arayüzü, GIS destek kütüphanesi</Summary>
<Description xml:lang="tr">OGDI, GIS yazılım paketleri ve çeşitli mekansal/coğrafik veri ürünleriyle çalışabilecek standart erişim metodları içeren açık bir uygulama geliştirme arayüzüdür.</Description>
</Source>
<Package>
<Name>ogdi-devel</Name>
<Summary xml:lang="tr">ogdi için geliştirme dosyaları</Summary>
</Package>
</PISI>