[grass] Solve build failure on PPC tests (BZ#961838)
Volker Fröhlich
volter at fedoraproject.org
Mon Oct 14 19:15:09 UTC 2013
commit c946a11f33d338a0d11e09b699338a3cde49409a
Author: Volker Fröhlich <volker27 at gmx.at>
Date: Mon Oct 14 21:14:51 2013 +0200
Solve build failure on PPC tests (BZ#961838)
grass-6.4.3-ppc_build_error_diglib.patch | 136 ++++++++++++++++++++++++++++++
grass.spec | 10 ++-
2 files changed, 145 insertions(+), 1 deletions(-)
---
diff --git a/grass-6.4.3-ppc_build_error_diglib.patch b/grass-6.4.3-ppc_build_error_diglib.patch
new file mode 100644
index 0000000..824c178
--- /dev/null
+++ b/grass-6.4.3-ppc_build_error_diglib.patch
@@ -0,0 +1,136 @@
+Index: grass/branches/releasebranch_6_4/lib/vector/diglib/portable.c
+===================================================================
+--- grass/branches/releasebranch_6_4/lib/vector/diglib/portable.c (revision 32527)
++++ grass/branches/releasebranch_6_4/lib/vector/diglib/portable.c (revision 57856)
+@@ -156,8 +156,5 @@
+ /* read from buffer in changed order */
+ c1 = (unsigned char *)buffer;
+- if (lng_order == ENDIAN_LITTLE)
+- c2 = (unsigned char *)buf;
+- else
+- c2 = (unsigned char *)buf + nat_lng - PORT_LONG;
++ c2 = (unsigned char *)buf;
+ for (i = 0; i < cnt; i++) {
+ /* set to FF if the value is negative */
+@@ -165,10 +162,11 @@
+ if (c1[PORT_LONG - 1] & 0x80)
+ memset(c2, 0xff, sizeof(long));
++ memcpy(c2, c1, PORT_LONG);
+ }
+ else {
+ if (c1[0] & 0x80)
+ memset(c2, 0xff, sizeof(long));
++ memcpy(c2 + nat_lng - PORT_LONG, c1, PORT_LONG);
+ }
+- memcpy(c2, c1, PORT_LONG);
+ c1 += PORT_LONG;
+ c2 += sizeof(long);
+@@ -228,8 +226,5 @@
+ /* read from buffer in changed order */
+ c1 = (unsigned char *)buffer;
+- if (int_order == ENDIAN_LITTLE)
+- c2 = (unsigned char *)buf;
+- else
+- c2 = (unsigned char *)buf + nat_int - PORT_INT;
++ c2 = (unsigned char *)buf;
+ for (i = 0; i < cnt; i++) {
+ /* set to FF if the value is negative */
+@@ -237,10 +232,11 @@
+ if (c1[PORT_INT - 1] & 0x80)
+ memset(c2, 0xff, sizeof(int));
++ memcpy(c2, c1, PORT_INT);
+ }
+ else {
+ if (c1[0] & 0x80)
+ memset(c2, 0xff, sizeof(int));
++ memcpy(c2 + nat_int - PORT_INT, c1, PORT_INT);
+ }
+- memcpy(c2, c1, PORT_INT);
+ c1 += PORT_INT;
+ c2 += sizeof(int);
+@@ -300,8 +296,5 @@
+ /* read from buffer in changed order */
+ c1 = (unsigned char *)buffer;
+- if (shrt_order == ENDIAN_LITTLE)
+- c2 = (unsigned char *)buf;
+- else
+- c2 = (unsigned char *)buf + nat_shrt - PORT_SHORT;
++ c2 = (unsigned char *)buf;
+ for (i = 0; i < cnt; i++) {
+ /* set to FF if the value is negative */
+@@ -309,10 +302,11 @@
+ if (c1[PORT_SHORT - 1] & 0x80)
+ memset(c2, 0xff, sizeof(short));
++ memcpy(c2, c1, PORT_SHORT);
+ }
+ else {
+ if (c1[0] & 0x80)
+ memset(c2, 0xff, sizeof(short));
++ memcpy(c2 + nat_shrt - PORT_SHORT, c1, PORT_SHORT);
+ }
+- memcpy(c2, c1, PORT_SHORT);
+ c1 += PORT_SHORT;
+ c2 += sizeof(short);
+@@ -439,13 +433,13 @@
+ else {
+ buf_alloc(cnt * PORT_LONG);
+- if (lng_order == ENDIAN_LITTLE)
+- c1 = (unsigned char *)buf;
+- else
+- c1 = (unsigned char *)buf + nat_lng - PORT_LONG;
++ c1 = (unsigned char *)buf;
+ c2 = (unsigned char *)buffer;
+ for (i = 0; i < cnt; i++) {
+- memcpy(c2, c1, PORT_LONG);
+- c1 += PORT_LONG;
+- c2 += sizeof(long);
++ if (lng_order == ENDIAN_LITTLE)
++ memcpy(c2, c1, PORT_LONG);
++ else
++ memcpy(c2, c1 + nat_lng - PORT_LONG, PORT_LONG);
++ c1 += sizeof(long);
++ c2 += PORT_LONG;
+ }
+ if (dig_fwrite(buffer, PORT_LONG, cnt, fp) == cnt)
+@@ -482,13 +476,13 @@
+ else {
+ buf_alloc(cnt * PORT_INT);
+- if (int_order == ENDIAN_LITTLE)
+- c1 = (unsigned char *)buf;
+- else
+- c1 = (unsigned char *)buf + nat_int - PORT_INT;
++ c1 = (unsigned char *)buf;
+ c2 = (unsigned char *)buffer;
+ for (i = 0; i < cnt; i++) {
+- memcpy(c2, c1, PORT_INT);
+- c1 += PORT_INT;
+- c2 += sizeof(int);
++ if (int_order == ENDIAN_LITTLE)
++ memcpy(c2, c1, PORT_INT);
++ else
++ memcpy(c2, c1 + nat_int - PORT_INT, PORT_INT);
++ c1 += sizeof(int);
++ c2 += PORT_INT;
+ }
+ if (dig_fwrite(buffer, PORT_INT, cnt, fp) == cnt)
+@@ -525,13 +519,13 @@
+ else {
+ buf_alloc(cnt * PORT_SHORT);
+- if (shrt_order == ENDIAN_LITTLE)
+- c1 = (unsigned char *)buf;
+- else
+- c1 = (unsigned char *)buf + nat_shrt - PORT_SHORT;
++ c1 = (unsigned char *)buf;
+ c2 = (unsigned char *)buffer;
+ for (i = 0; i < cnt; i++) {
+- memcpy(c2, c1, PORT_SHORT);
+- c1 += PORT_SHORT;
+- c2 += sizeof(short);
++ if (shrt_order == ENDIAN_LITTLE)
++ memcpy(c2, c1, PORT_SHORT);
++ else
++ memcpy(c2, c1 + nat_shrt - PORT_SHORT, PORT_SHORT);
++ c1 += sizeof(short);
++ c2 += PORT_SHORT;
+ }
+ if (dig_fwrite(buffer, PORT_SHORT, cnt, fp) == cnt)
diff --git a/grass.spec b/grass.spec
index 345c17e..b79d01e 100644
--- a/grass.spec
+++ b/grass.spec
@@ -28,7 +28,7 @@
Name: grass
Version: 6.4.3
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: GRASS - Geographic Resources Analysis Support System
Group: Applications/Engineering
License: GPLv2+
@@ -46,6 +46,10 @@ Patch2: %{name}-6.4.2-docfiles.patch
# http://trac.osgeo.org/grass/changeset/57908
Patch3: %{name}-6.4.3-platform_name_encoding.patch
+# Build failure on PPC (BZ#961838)
+# http://trac.osgeo.org/grass/changeset/57856/grass/branches/releasebranch_6_4/lib/vector
+Patch4: %{name}-6.4.3-ppc_build_error_diglib.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: proj-nad proj-epsg wxPython
@@ -136,6 +140,7 @@ GRASS (Geographic Resources Analysis Support System) development headers.
%patch1 -p1 -b .shlibver~
%patch2 -p1 -b .docfiles~
%patch3 -p4 -b .release_encoding~
+%patch4 -p3 -b .ppc_diglib~
# Correct mysql_config query
sed -i 's|--libmysqld-libs|--libs|g' configure
@@ -370,6 +375,9 @@ fi
%changelog
+* Mon Oct 14 2013 Volker Fröhlich <volker27 at gmx.at> - 6.4.3-5
+- Solve build failure on PPC tests (BZ#961838)
+
* Wed Oct 9 2013 Devrim Gündüz <devrim at gunduz.org> - 6.4.3-4
- Rebuild against new GEOS
More information about the scm-commits
mailing list