[SCM] grass branch, master, updated. upstream/6.4.1-131-g0b1ec4c
Francesco Paolo Lovergine
frankie at debian.org
Mon Dec 16 11:52:23 UTC 2013
The following commit has been merged in the master branch:
commit 0b1ec4c075392ab64adb96943faffdba44f304a6
Author: Francesco Paolo Lovergine <frankie at debian.org>
Date: Mon Dec 16 12:51:16 2013 +0100
Incorporating changes to fix ia64 and s390x/ppc64 ports.
diff --git a/debian/changelog b/debian/changelog
index 90e4561..cc80223 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,12 @@ grass (6.4.3-3) unstable; urgency=medium
* Now use dh_autotools-dev_{restore,update}config instead of manual
update/restore in debian/rules
+ [ Paul Gevers ]
+ * On ia64 build with $(HARDENING_DISABLE_PIE_CFLAGS_FILTER) filtered for
+ now (closes: #728150)
+ * Add patch fix_big-endian_issues which allows grass to build on s390x
+ and ppc64 (closes: #672719)
+
-- Francesco Paolo Lovergine <frankie at debian.org> Mon, 16 Dec 2013 12:37:57 +0100
grass (6.4.3-2) unstable; urgency=low
diff --git a/debian/patches/fix_big-endian_issues b/debian/patches/fix_big-endian_issues
new file mode 100644
index 0000000..873418c
--- /dev/null
+++ b/debian/patches/fix_big-endian_issues
@@ -0,0 +1,151 @@
+Description: Fix big endian behavior
+Origin: https://trac.osgeo.org/grass/changeset/57855
+Bug: https://trac.osgeo.org/grass/ticket/1430
+Bug-Debian: http://bugs.debian.org/672719
+
+--- a/lib/vector/diglib/portable.c
++++ b/lib/vector/diglib/portable.c
+@@ -155,21 +155,19 @@
+ memset(buf, 0, cnt * sizeof(long));
+ /* 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 */
+ if (lng_order == ENDIAN_LITTLE) {
+ 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);
+ }
+@@ -227,21 +225,19 @@
+ memset(buf, 0, cnt * sizeof(int));
+ /* 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 */
+ if (int_order == ENDIAN_LITTLE) {
+ 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);
+ }
+@@ -299,21 +295,19 @@
+ memset(buf, 0, cnt * sizeof(short));
+ /* 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 */
+ if (shrt_order == ENDIAN_LITTLE) {
+ 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);
+ }
+@@ -438,15 +432,15 @@
+ }
+ 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)
+ return 1;
+@@ -481,15 +475,15 @@
+ }
+ 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)
+ return 1;
+@@ -524,15 +518,15 @@
+ }
+ 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)
+ return 1;
diff --git a/debian/patches/series b/debian/patches/series
index 88de269..a785445 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ instdir
check4dev
barscale_ui
svn-any-version
+fix_big-endian_issues
diff --git a/debian/rules b/debian/rules
index 685da7e..258aa68 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,12 +17,17 @@ PKG_NAME=grass
include /usr/share/hardening-includes/hardening.make
CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
-# in Wheezy -fPIE conflicts with -fPIC. See example in the hardening.make file.
-#CFLAGS += $(HARDENING_CFLAGS_PIC) \
-# $(filter-out $(HARDENING_DISABLE_PIE_CFLAGS_FILTER),$(HARDENING_CFLAGS))
-# in Jessie & Sid the problem seems fixed so we can proceed normally.
-CFLAGS+=$(HARDENING_CFLAGS)
-LDFLAGS+=$(HARDENING_LDFLAGS)
+# in Wheezy (and Jessie ia64) -fPIE conflicts with -fPIC. See example in
+# the hardening.make file.
+ifeq ($(shell dpkg-architecture -qDEB_HOST_ARCH_CPU),ia64)
+ CFLAGS += $(HARDENING_CFLAGS_PIC) \
+ $(filter-out $(HARDENING_DISABLE_PIE_CFLAGS_FILTER),$(HARDENING_CFLAGS))
+ LDFLAGS+=$(HARDENING_LDFLAGS)
+else
+ # in Jessie & Sid the problem seems fixed so we can proceed normally
+ CFLAGS+=$(HARDENING_CFLAGS)
+ LDFLAGS+=$(HARDENING_LDFLAGS)
+endif
# TODO: fix these
CFLAGS+=-Wno-error=format-security
--
Geographic Resources Analysis Support System
More information about the Pkg-grass-devel
mailing list