devel/shapelib shapelib-1.2.10-endian.patch, NONE, 1.1 shapelib-1.2.10.patch, 1.1, 1.2 shapelib.spec, 1.1, 1.2
David Woodhouse (dwmw2)
fedora-extras-commits at redhat.com
Sun Feb 13 12:11:05 UTC 2005
Author: dwmw2
Update of /cvs/extras/devel/shapelib
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7513
Modified Files:
shapelib-1.2.10.patch shapelib.spec
Added Files:
shapelib-1.2.10-endian.patch
Log Message:
Fix hard-coded endianness. Use <endian.h> instead
shapelib-1.2.10-endian.patch:
--- NEW FILE shapelib-1.2.10-endian.patch ---
--- shapelib-1.2.10/contrib/my_nan.h.orig 2005-02-13 12:04:41.484914852 +0000
+++ shapelib-1.2.10/contrib/my_nan.h 2005-02-13 12:07:03.306704589 +0000
@@ -21,16 +21,18 @@
#define _GNU_NAN_H 1
+#include <endian.h>
/* hacked to define NAN on Solaris 2.7 if it wasn't defined */
/* IEEE Not A Number. */
-#ifdef _BIG_ENDIAN
+#if __BYTE_ORDER == __BIG_ENDIAN
# define __nan_bytes { 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 }
-#endif
-#ifdef _LITTLE_ENDIAN
+#elif __BYTE_ORDER == __LITTLE_ENDIAN
# define __nan_bytes { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }
+#else
+#error No endianness?
#endif
#ifdef __GNUC__
shapelib-1.2.10.patch:
Index: shapelib-1.2.10.patch
===================================================================
RCS file: /cvs/extras/devel/shapelib/shapelib-1.2.10.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- shapelib-1.2.10.patch 14 Jan 2005 09:47:28 -0000 1.1
+++ shapelib-1.2.10.patch 13 Feb 2005 12:11:03 -0000 1.2
@@ -91,7 +91,8 @@
# Endian: define either _LITTLE_ENDIAN or _BIG_ENDIAN
+CC = gcc
- ENDIAN = -D_LITTLE_ENDIAN
+-ENDIAN = -D_LITTLE_ENDIAN
++#ENDIAN = -D_LITTLE_ENDIAN
-CFLAGS = -g -I.. -DPROJ4 $(ENDIAN) -DDEBUG -DDEBUG2
+EXTRACFLAGS = -g
Index: shapelib.spec
===================================================================
RCS file: /cvs/extras/devel/shapelib/shapelib.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- shapelib.spec 14 Jan 2005 09:47:28 -0000 1.1
+++ shapelib.spec 13 Feb 2005 12:11:03 -0000 1.2
@@ -2,11 +2,12 @@
Summary: API in "C" for Shapefile handling
Name: shapelib
Version: 1.2.10
-Release: 5
+Release: 6
Epoch: 0
URL: http://shapelib.maptools.org/
Source: http://shapelib.maptools.org/dl/shapelib-%{version}.tar.gz
Patch0: shapelib-%{version}.patch
+Patch1: shapelib-1.2.10-endian.patch
License: LGPL/MIT
Group: Development/Libraries
Buildrequires: libtool
@@ -30,6 +31,7 @@
%prep
%setup -q -T -b 0
%patch -p1 -b .buildroot
+%patch1 -p1 -b .endian
%build
make %{?_smp_mflags} libdir=%{_libdir} CFLAGS="$RPM_OPT_FLAGS" lib
@@ -70,6 +72,9 @@
%exclude %{_libdir}/libshp.la
%changelog
+* Sun Feb 13 2005 David Woodhouse <dwmw2 at infradead.org> 0:1.2.10-6
+- Don't hard-code endianness; just use endian.h
+
* Wed Dec 15 2004 David M. Kaplan <dmk at erizo.ucdavis.edu> 0:1.2.10-5
- Patched patch and spec file according to suggestions of Michael Schwendt
- In particular, this separates the building from the installing in the rpm.
More information about the fedora-extras-commits
mailing list