The following commit has been merged in the master branch:
commit 75a9b42cbb329cc5508388aad0cd232336f4e6e4
Author: Arto Jantunen <vi...@debian.org>
Date:   Fri May 18 10:27:16 2012 +0300

    Apply patch from Simon Ruderich to use all hardening flags (Closes: #672465)
    
    LDFLAGS and CPPFLAGS were previously missed, include those as well.

diff --git a/debian/patches/0003-Properly-use-libtool.patch 
b/debian/patches/0003-Properly-use-libtool.patch
index feaf2f0..4616282 100644
--- a/debian/patches/0003-Properly-use-libtool.patch
+++ b/debian/patches/0003-Properly-use-libtool.patch
@@ -10,11 +10,11 @@ Bug-Debian: http://bugs.debian.org/497160
  Makefile |   32 +++++---------------------------
  1 files changed, 5 insertions(+), 27 deletions(-)
 
-diff --git a/Makefile b/Makefile
-index 6d24091..f325e66 100644
---- a/Makefile
-+++ b/Makefile
-@@ -99,37 +99,15 @@ SHPLIB_VERSION=1.2.9
+Index: shapelib-1.2.10/Makefile
+===================================================================
+--- shapelib-1.2.10.orig/Makefile      2012-05-11 11:23:01.000000000 +0200
++++ shapelib-1.2.10/Makefile   2012-05-11 11:23:05.000000000 +0200
+@@ -99,37 +99,15 @@
  LIBSHP_VERSION=1.0.1 # still once to be changed manually (see for 1:1:0), 
sorry
  
  lib:
@@ -44,10 +44,10 @@ index 6d24091..f325e66 100644
 -      ranlib .libs/libshp.a
 -      rm -fr .libs/libshp.lax
 -      (cd .libs && rm -f libshp.la && ln -s ../libshp.la libshp.la)
-+      libtool --mode=compile gcc -DPACKAGE=\"libshp\" 
-DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1  -I. $(CFLAGS) -c shpopen.c
-+      libtool --mode=compile gcc -DPACKAGE=\"libshp\" 
-DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1  -I. $(CFLAGS) -c shptree.c
-+      libtool --mode=compile gcc -DPACKAGE=\"libshp\" 
-DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1  -I. $(CFLAGS) -c dbfopen.c
-+      libtool --mode=link gcc  -g -O2  -o libshp.la -rpath /usr/lib 
-version-info 1:1:0 shpopen.lo shptree.lo dbfopen.lo
++      libtool --mode=compile gcc -DPACKAGE=\"libshp\" 
-DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1  -I. $(CPPFLAGS) $(CFLAGS) -c 
shpopen.c
++      libtool --mode=compile gcc -DPACKAGE=\"libshp\" 
-DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1  -I. $(CPPFLAGS) $(CFLAGS) -c 
shptree.c
++      libtool --mode=compile gcc -DPACKAGE=\"libshp\" 
-DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1  -I. $(CPPFLAGS) $(CFLAGS) -c 
dbfopen.c
++      libtool --mode=link gcc $(CFLAGS) $(LDFLAGS) -o libshp.la -rpath 
/usr/lib -version-info 1:1:0 shpopen.lo shptree.lo dbfopen.lo
  
  lib_install:
        cp .libs/libshp.la .libs/libshp.lai
@@ -57,4 +57,3 @@ index 6d24091..f325e66 100644
        /usr/bin/install -c .libs/libshp.so.$(LIBSHP_VERSION) 
/usr/local/lib/libshp.so.$(LIBSHP_VERSION)
        (cd /usr/local/lib && rm -f libshp.so.1 && ln -s 
libshp.so.$(LIBSHP_VERSION) libshp.so.1)
        (cd /usr/local/lib && rm -f libshp.so && ln -s 
libshp.so.$(LIBSHP_VERSION) libshp.so)
--- 
diff --git 
a/debian/patches/0004-Dynamically-link-the-shp-binaries-to-libshp.patch 
b/debian/patches/0004-Dynamically-link-the-shp-binaries-to-libshp.patch
index a22ce20..e2b9843 100644
--- a/debian/patches/0004-Dynamically-link-the-shp-binaries-to-libshp.patch
+++ b/debian/patches/0004-Dynamically-link-the-shp-binaries-to-libshp.patch
@@ -2,62 +2,64 @@ From: Arto Jantunen <vi...@debian.org>
 Date: Tue, 8 May 2012 14:19:20 +0300
 Subject: [PATCH] Dynamically link the shp* binaries to libshp
 
+Also use CPPFLAGS and LDFLAGS, necessary for hardening flags.
+
 ---
  Makefile |   55 ++++++++++++++++++++++++-------------------------------
  1 files changed, 24 insertions(+), 31 deletions(-)
 
-diff --git a/Makefile b/Makefile
-index f325e66..3e53d15 100644
---- a/Makefile
-+++ b/Makefile
-@@ -6,45 +6,36 @@ default:     all
+Index: shapelib-1.2.10/Makefile
+===================================================================
+--- shapelib-1.2.10.orig/Makefile      2012-05-11 11:23:05.000000000 +0200
++++ shapelib-1.2.10/Makefile   2012-05-11 11:23:09.000000000 +0200
+@@ -6,45 +6,36 @@
  
  all:  shpcreate shpadd shpdump shprewind dbfcreate dbfadd dbfdump shptest
  
 -shpopen.o:    shpopen.c shapefil.h
 -      $(CC) $(CFLAGS) -c shpopen.c
 +shpcreate:    shpcreate.c .libs/libshp.so
-+      $(CC) $(CFLAGS) shpcreate.c $(LINKOPT) -o shpcreate .libs/libshp.so
++      $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) shpcreate.c $(LINKOPT) -o 
shpcreate .libs/libshp.so
  
 -shptree.o:    shptree.c shapefil.h
 -      $(CC) $(CFLAGS) -c shptree.c
 +shpadd:               shpadd.c .libs/libshp.so
-+      $(CC) $(CFLAGS) shpadd.c $(LINKOPT) -o shpadd .libs/libshp.so
++      $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) shpadd.c $(LINKOPT) -o shpadd 
.libs/libshp.so
  
 -dbfopen.o:    dbfopen.c shapefil.h
 -      $(CC) $(CFLAGS) -c dbfopen.c
 +shpdump:      shpdump.c .libs/libshp.so
-+      $(CC) $(CFLAGS) shpdump.c $(LINKOPT) -o shpdump .libs/libshp.so
++      $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) shpdump.c $(LINKOPT) -o shpdump 
.libs/libshp.so
  
 -shpcreate:    shpcreate.c shpopen.o
 -      $(CC) $(CFLAGS) shpcreate.c shpopen.o $(LINKOPT) -o shpcreate
 +shprewind:    shprewind.c .libs/libshp.so
-+      $(CC) $(CFLAGS) shprewind.c $(LINKOPT) -o shprewind .libs/libshp.so
++      $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) shprewind.c $(LINKOPT) -o 
shprewind .libs/libshp.so
  
 -shpadd:               shpadd.c shpopen.o
 -      $(CC) $(CFLAGS) shpadd.c shpopen.o $(LINKOPT) -o shpadd
 +dbfcreate:    dbfcreate.c .libs/libshp.so
-+      $(CC) $(CFLAGS) dbfcreate.c $(LINKOPT) -o dbfcreate .libs/libshp.so
++      $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) dbfcreate.c $(LINKOPT) -o 
dbfcreate .libs/libshp.so
  
 -shpdump:      shpdump.c shpopen.o
 -      $(CC) $(CFLAGS) shpdump.c shpopen.o $(LINKOPT) -o shpdump
 +dbfadd:               dbfadd.c .libs/libshp.so
-+      $(CC) $(CFLAGS) dbfadd.c $(LINKOPT) -o dbfadd .libs/libshp.so
++      $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) dbfadd.c $(LINKOPT) -o dbfadd 
.libs/libshp.so
  
 -shprewind:    shprewind.c shpopen.o
 -      $(CC) $(CFLAGS) shprewind.c shpopen.o $(LINKOPT) -o shprewind
 +dbfdump:      dbfdump.c .libs/libshp.so
-+      $(CC) $(CFLAGS) dbfdump.c $(LINKOPT) -o dbfdump .libs/libshp.so
++      $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) dbfdump.c $(LINKOPT) -o dbfdump 
.libs/libshp.so
  
 -dbfcreate:    dbfcreate.c dbfopen.o
 -      $(CC) $(CFLAGS) dbfcreate.c dbfopen.o $(LINKOPT) -o dbfcreate
 +shptest:      shptest.c .libs/libshp.so
-+      $(CC) $(CFLAGS) shptest.c $(LINKOPT) -o shptest .libs/libshp.so
++      $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) shptest.c $(LINKOPT) -o shptest 
.libs/libshp.so
  
 -dbfadd:               dbfadd.c dbfopen.o
 -      $(CC) $(CFLAGS) dbfadd.c dbfopen.o $(LINKOPT) -o dbfadd
 +shputils:     shputils.c .libs/libshp.so
-+      $(CC) $(CFLAGS) shputils.c $(LINKOPT) -o shputils .libs/libshp.so
++      $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) shputils.c $(LINKOPT) -o 
shputils .libs/libshp.so
  
 -dbfdump:      dbfdump.c dbfopen.o
 -      $(CC) $(CFLAGS) dbfdump.c dbfopen.o $(LINKOPT) -o dbfdump
@@ -72,12 +74,12 @@ index f325e66..3e53d15 100644
 -      $(CC) $(CFLAGS) shptreedump.c shptree.o shpopen.o $(LINKOPT) \
 -              -o shptreedump
 +shptreedump:  shptreedump.c .libs/libshp.so
-+      $(CC) $(CFLAGS) shptreedump.c $(LINKOPT) \
++      $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) shptreedump.c $(LINKOPT) \
 +              -o shptreedump .libs/libshp.so
  
  clean:
        rm -f *.o dbfdump dbfcreate dbfadd shpdump shpcreate shpadd shputils
-@@ -98,7 +89,9 @@ test3:
+@@ -98,7 +89,9 @@
  SHPLIB_VERSION=1.2.9
  LIBSHP_VERSION=1.0.1 # still once to be changed manually (see for 1:1:0), 
sorry
  
@@ -85,7 +87,6 @@ index f325e66..3e53d15 100644
 +lib: .libs/libshp.so
 +
 +.libs/libshp.so:
-       libtool --mode=compile gcc -DPACKAGE=\"libshp\" 
-DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1  -I. $(CFLAGS) -c shpopen.c
-       libtool --mode=compile gcc -DPACKAGE=\"libshp\" 
-DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1  -I. $(CFLAGS) -c shptree.c
-       libtool --mode=compile gcc -DPACKAGE=\"libshp\" 
-DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1  -I. $(CFLAGS) -c dbfopen.c
--- 
+       libtool --mode=compile gcc -DPACKAGE=\"libshp\" 
-DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1  -I. $(CPPFLAGS) $(CFLAGS) -c 
shpopen.c
+       libtool --mode=compile gcc -DPACKAGE=\"libshp\" 
-DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1  -I. $(CPPFLAGS) $(CFLAGS) -c 
shptree.c
+       libtool --mode=compile gcc -DPACKAGE=\"libshp\" 
-DVERSION=\"$(SHPLIB_VERSION)\" -DSTDC_HEADERS=1  -I. $(CPPFLAGS) $(CFLAGS) -c 
dbfopen.c

-- 
Library for reading and writing ArcView Shapefiles

_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to