[ogdi/f18] fix ftbfs

Tom Callaway spot at fedoraproject.org
Mon Aug 20 02:38:27 UTC 2012


commit e4c72ffb89fb3866ffa4e93bfc3b8c74ad9d353d
Author: Tom Callaway <spot at fedoraproject.org>
Date:   Sun Aug 19 21:39:08 2012 -0500

    fix ftbfs

 ogdi-3.2.0.beta2-projfix.patch |   70 ++++++++++++++++++++++++++++++++++++++++
 ogdi.spec                      |    7 +++-
 2 files changed, 76 insertions(+), 1 deletions(-)
---
diff --git a/ogdi-3.2.0.beta2-projfix.patch b/ogdi-3.2.0.beta2-projfix.patch
new file mode 100644
index 0000000..e60530d
--- /dev/null
+++ b/ogdi-3.2.0.beta2-projfix.patch
@@ -0,0 +1,70 @@
+diff -up ogdi-3.2.0.beta2/ogdi/datum_driver/usa/dtusa.c.projfix ogdi-3.2.0.beta2/ogdi/datum_driver/usa/dtusa.c
+--- ogdi-3.2.0.beta2/ogdi/datum_driver/usa/dtusa.c.projfix	2012-08-19 21:27:41.632952279 -0500
++++ ogdi-3.2.0.beta2/ogdi/datum_driver/usa/dtusa.c	2012-08-19 21:27:47.343951832 -0500
+@@ -124,7 +124,7 @@ int dyn_nad_init(privdata, table)
+     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;
+diff -up ogdi-3.2.0.beta2/proj/nad2nad.c.projfix ogdi-3.2.0.beta2/proj/nad2nad.c
+--- ogdi-3.2.0.beta2/proj/nad2nad.c.projfix	2012-08-19 21:28:18.943950482 -0500
++++ ogdi-3.2.0.beta2/proj/nad2nad.c	2012-08-19 21:29:06.057949242 -0500
+@@ -74,7 +74,7 @@ set_zone(int in, struct IO_CON *io) {
+ 
+ 	if (io->hp) {
+ 		io->t83 = 1;
+-		if (!(htab = nad_init(io->hp)))
++		if (!(htab = nad_init(pj_get_default_ctx(), io->hp)))
+ 			emess(1,"hp datum file: %s, failed: %s", io->hp,
+ 				pj_strerrno(pj_errno));
+ 	}
+@@ -109,7 +109,7 @@ setup() {
+ 	if (czone) {
+ 		if (!input.hp && !output.hp && input.t83 == output.t83)
+ 			emess(1,"identical datums");
+-		if (!(ctab = nad_init(czone)))
++		if (!(ctab = nad_init(pj_get_default_ctx(), czone)))
+ 			emess(1,"datum file: %s, failed: %s", czone, pj_strerrno(pj_errno));
+ 	} else if (input.t83 != output.t83)
+ 		emess(1,"conversion region (-r) not specified");
+diff -up ogdi-3.2.0.beta2/proj/nad_init.c.projfix ogdi-3.2.0.beta2/proj/nad_init.c
+--- ogdi-3.2.0.beta2/proj/nad_init.c.projfix	2012-08-19 21:29:27.827948522 -0500
++++ ogdi-3.2.0.beta2/proj/nad_init.c	2012-08-19 21:32:24.578942144 -0500
+@@ -8,18 +8,17 @@ static const char SCCSID[]="@(#)nad_init
+ #include <errno.h>
+ extern FILE *pj_open_lib(char *, char *);
+ 	struct CTABLE *
+-nad_init(char *name) {
++nad_init(projCtx ctx, char *name) {
+ 	char fname[FILENAME_MAX+1];
+ 	struct CTABLE *ct;
+ 	FILE *fid;
+ 	size_t i;
+ 
+-	errno = pj_errno = 0;
++	ctx->last_errno = 0;
+ 	if (!(fid = pj_open_lib(name, "rb"))) {
+ 	  strcpy(fname, "nad2783/");
+ 	  strcat(fname, name);
+-	  if (!(fid = pj_open_lib(fname, "rb"))) {
+-	    pj_errno = errno;
++	  if (!(fid = pj_open_lib(ctx, fname, "rb"))) { 
+ 	    return 0;
+ 	  }
+ 	}
+diff -up ogdi-3.2.0.beta2/proj/projects.h.projfix ogdi-3.2.0.beta2/proj/projects.h
+--- ogdi-3.2.0.beta2/proj/projects.h.projfix	2012-08-19 21:32:44.054941484 -0500
++++ ogdi-3.2.0.beta2/proj/projects.h	2012-08-19 21:33:22.313939807 -0500
+@@ -210,7 +210,7 @@ int bch2bps(UV a, UV b, UV **, int, int)
+ /* nadcon related protos */
+ LP nad_interp(LP, struct CTABLE *);
+ LP nad_cvt(LP, int, struct CTABLE *);
+-struct CTABLE *nad_init(char *);
++struct CTABLE *nad_init(projCtx ctx, char *);
+ void nad_free(struct CTABLE *);
+ 
+ #endif /* end of basic projections header */
diff --git a/ogdi.spec b/ogdi.spec
index a41f545..cf51441 100644
--- a/ogdi.spec
+++ b/ogdi.spec
@@ -1,12 +1,13 @@
 Name:           ogdi
 Version:        3.2.0
-Release:        0.17.beta2%{?dist}
+Release:        0.18.beta2%{?dist}
 Summary:        Open Geographic Datastore Interface
 Group:          Applications/Engineering
 License:        BSD
 URL:            http://ogdi.sourceforge.net/
 Source0:        http://dl.sourceforge.net/ogdi/%{name}-%{version}.beta2.tar.gz
 Source1:        http://ogdi.sourceforge.net/ogdi.pdf
+Patch0:         ogdi-3.2.0.beta2-projfix.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-root-%(id -u -n)
 
 BuildRequires:  unixODBC-devel zlib-devel 
@@ -50,6 +51,7 @@ TCL wrapper for OGDI.
 
 %prep
 %setup -q -n %{name}-%{version}.beta2
+%patch0 -p1 -b .projfix
 
 # include documentation
 cp -p %{SOURCE1} .
@@ -176,6 +178,9 @@ rm -rf %{buildroot}
 %{_libdir}/%{name}/libecs_tcl.so
 
 %changelog
+* Sun Aug 19 2012 Tom Callaway <spot at fedoraproject.org> - 3.2.0-0.18.beta2
+- fix ftbfs
+
 * Fri Jul 20 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.2.0-0.17.beta2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list