File netatalk.pie-flags.patch of Package netatalk

bin/adv1tov2/Makefile.am     |    4 ++++
 bin/aecho/Makefile.am        |    4 ++++
 bin/afile/Makefile.am        |    4 ++++
 bin/afppasswd/Makefile.am    |    6 +++++-
 bin/cnid/Makefile.am         |    5 ++++-
 bin/getzones/Makefile.am     |    4 ++++
 bin/megatron/Makefile.am     |    4 ++++
 bin/nbp/Makefile.am          |    4 ++++
 bin/pap/Makefile.am          |    4 ++++
 bin/psorder/Makefile.am      |    4 ++++
 bin/uniconv/Makefile.am      |    4 ++++
 contrib/printing/Makefile.am |    4 ++++
 etc/afpd/Makefile.am         |    6 +++++-
 etc/atalkd/Makefile.am       |    5 ++++-
 etc/cnid_dbd/Makefile.am     |    5 +++++
 etc/papd/Makefile.am         |    5 +++++
 etc/psf/Makefile.am          |    5 +++++
 17 files changed, 73 insertions(+), 4 deletions(-)

Index: netatalk-2.0.3/etc/afpd/Makefile.am
===================================================================
--- netatalk-2.0.3.orig/etc/afpd/Makefile.am
+++ netatalk-2.0.3/etc/afpd/Makefile.am
@@ -18,9 +18,13 @@ noinst_HEADERS = auth.h afp_config.h des
 	 uam_auth.h uid.h unix.h volume.h
 
 LIBS = @LIBS@ @PAM_LIBS@ @QUOTA_LIBS@ @SLP_LIBS@ @WRAP_LIBS@
-
+PIECFLAGS = -fPIE
+PIELDFLAGS = -pie
+LDFLAGS = $(PIE_LDFLAGS)
 CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/sys \
 	 @CFLAGS@ @SLP_CFLAGS@ \
+	 $(PIECFLAGS) \
+	 $(PIELDFLAGS) \
 	 -D_PATH_AFPDDEFVOL=\"$(pkgconfdir)/AppleVolumes.default\" \
 	 -D_PATH_AFPDSYSVOL=\"$(pkgconfdir)/AppleVolumes.system\" \
 	 -D_PATH_AFPDPWFILE=\"$(pkgconfdir)/afppasswd\" \
Index: netatalk-2.0.3/etc/atalkd/Makefile.am
===================================================================
--- netatalk-2.0.3.orig/etc/atalkd/Makefile.am
+++ netatalk-2.0.3/etc/atalkd/Makefile.am
@@ -19,4 +19,7 @@ noinst_HEADERS =	\
 	rtmp.h		\
 	zip.h
 
-CFLAGS = @CFLAGS@ -D_PATH_ATALKDCONF=\"$(pkgconfdir)/atalkd.conf\"
+PIECFLAGS = -fpie
+PIELDFLAGS = -pie
+LDFLAGS = $(PIE_LDFLAGS)
+CFLAGS = @CFLAGS@ $(PIECFLAGS) $(PIELDFLAGS) -D_PATH_ATALKDCONF=\"$(pkgconfdir)/atalkd.conf\"
Index: netatalk-2.0.3/etc/cnid_dbd/Makefile.am
===================================================================
--- netatalk-2.0.3.orig/etc/cnid_dbd/Makefile.am
+++ netatalk-2.0.3/etc/cnid_dbd/Makefile.am
@@ -24,5 +24,10 @@ EXTRA_DIST = README
 LIBS = @LIBS@ @BDB_LIBS@
 
 
+PIECFLAGS = -fpie
+PIELDFLAGS = -pie
+LDFLAGS = $(PIE_LDFLAGS)
 CFLAGS = @CFLAGS@ @BDB_CFLAGS@ \
+	$(PIECFLAGS) \
+	 $(PIELDFLAGS) \
          -D_PATH_CNID_DBD=\"$(sbindir)/cnid_dbd\"
Index: netatalk-2.0.3/etc/papd/Makefile.am
===================================================================
--- netatalk-2.0.3.orig/etc/papd/Makefile.am
+++ netatalk-2.0.3/etc/papd/Makefile.am
@@ -27,9 +27,14 @@ noinst_HEADERS =	\
 	print_cups.h	\
 	uam_auth.h
 
+PIECFLAGS = -fpie
+PIELDFLAGS = -pie
+LDFLAGS = $(PIE_LDFLAGS)
 CFLAGS = \
 	-I$(top_srcdir)/include -I$(top_srcdir)/sys \
 	@CFLAGS@ @CUPS_CFLAGS@\
+	$(PIECFLAGS) \
+	 $(PIELDFLAGS) \
 	-D_PATH_PAPDCONF=\"$(pkgconfdir)/papd.conf\" \
 	-D_PATH_PAPDUAMPATH=\"$(UAMS_PATH)/\" \
  	-DSPOOLDIR=\"$(spooldir)/\"
Index: netatalk-2.0.3/etc/psf/Makefile.am
===================================================================
--- netatalk-2.0.3.orig/etc/psf/Makefile.am
+++ netatalk-2.0.3/etc/psf/Makefile.am
@@ -8,7 +8,12 @@ pkgdata_DATA = pagecount.ps
 psf_SOURCES = psf.c
 psa_SOURCES = psa.c
 
+PIECFLAGS = -fpie
+PIELDFLAGS = -pie
+LDFLAGS = $(PIE_LDFLAGS)
 CFLAGS = @CFLAGS@ -DZEROWIDTH \
+	$(PIECFLAGS) \
+	 $(PIELDFLAGS) \
 	-D_PATH_PAP=\"$(bindir)/pap\" \
 	-D_PATH_PSORDER=\"$(bindir)/psorder\" \
 	-D_PATH_PSA=\"$(libexecdir)/psa\" \
Index: netatalk-2.0.3/bin/adv1tov2/Makefile.am
===================================================================
--- netatalk-2.0.3.orig/bin/adv1tov2/Makefile.am
+++ netatalk-2.0.3/bin/adv1tov2/Makefile.am
@@ -6,3 +6,7 @@ bin_PROGRAMS = adv1tov2
 
 adv1tov2_SOURCES = adv1tov2.c
 adv1tov2_LDADD = $(top_builddir)/libatalk/libatalk.la
+PIECFLAGS = -fpie
+PIELDFLAGS = -pie
+LDFLAGS = $(PIE_LDFLAGS)
+CFLAGS = @CFLAGS@ $(PIECFLAGS) $(PIELDFLAGS)
Index: netatalk-2.0.3/bin/aecho/Makefile.am
===================================================================
--- netatalk-2.0.3.orig/bin/aecho/Makefile.am
+++ netatalk-2.0.3/bin/aecho/Makefile.am
@@ -6,3 +6,7 @@ bin_PROGRAMS = aecho
 
 aecho_SOURCES = aecho.c
 aecho_LDADD = $(top_builddir)/libatalk/libatalk.la
+PIECFLAGS = -fpie
+PIELDFLAGS = -pie
+LDFLAGS = $(PIE_LDFLAGS)
+CFLAGS = @CFLAGS@ $(PIECFLAGS) $(PIELDFLAGS)
Index: netatalk-2.0.3/bin/afile/Makefile.am
===================================================================
--- netatalk-2.0.3.orig/bin/afile/Makefile.am
+++ netatalk-2.0.3/bin/afile/Makefile.am
@@ -9,3 +9,7 @@ afile_SOURCES = afile.c common.c common.
 achfile_SOURCES = achfile.c common.c common.h
 
 EXTRA_DIST = acleandir.rc
+PIECFLAGS = -fpie
+PIELDFLAGS = -pie
+LDFLAGS = $(PIE_LDFLAGS)
+CFLAGS = @CFLAGS@ $(PIECFLAGS) $(PIELDFLAGS)
Index: netatalk-2.0.3/bin/afppasswd/Makefile.am
===================================================================
--- netatalk-2.0.3.orig/bin/afppasswd/Makefile.am
+++ netatalk-2.0.3/bin/afppasswd/Makefile.am
@@ -11,10 +11,14 @@ endif
 afppasswd_SOURCES = afppasswd.c
 afppasswd_LDADD = $(top_builddir)/libatalk/libatalk.la @SSL_LIBS@
 
+PIECFLAGS = -fpie
+PIELDFLAGS = -pie
+LDFLAGS = $(PIE_LDFLAGS)
 CFLAGS = @CFLAGS@ @SSL_CFLAGS@ -I$(top_srcdir)/sys \
+    $(PIECFLAGS) $(PIELDFLAGS) \
     -D_PATH_AFPDPWFILE=\"$(pkgconfdir)/afppasswd\"
 
 install-exec-hook:
 if USE_DHX
 	chmod u+s $(DESTDIR)$(bindir)/afppasswd
-endif
\ No newline at end of file
+endif
Index: netatalk-2.0.3/bin/cnid/Makefile.am
===================================================================
--- netatalk-2.0.3.orig/bin/cnid/Makefile.am
+++ netatalk-2.0.3/bin/cnid/Makefile.am
@@ -15,4 +15,7 @@ cnid_index_LDADD = $(top_builddir)/libat
 
 LIBS = @LIBS@ @BDB_LIBS@
  
-CFLAGS = @CFLAGS@ @BDB_CFLAGS@ 
+PIECFLAGS = -fpie
+PIELDFLAGS = -pie
+LDFLAGS = $(PIE_LDFLAGS)
+CFLAGS = @CFLAGS@ @BDB_CFLAGS@ $(PIECFLAGS) $(PIELDFLAGS)
Index: netatalk-2.0.3/bin/getzones/Makefile.am
===================================================================
--- netatalk-2.0.3.orig/bin/getzones/Makefile.am
+++ netatalk-2.0.3/bin/getzones/Makefile.am
@@ -6,3 +6,7 @@ bin_PROGRAMS = getzones
 
 getzones_SOURCES = getzones.c
 getzones_LDADD = $(top_builddir)/libatalk/libatalk.la
+PIECFLAGS = -fpie
+PIELDFLAGS = -pie
+LDFLAGS = $(PIE_LDFLAGS)
+CFLAGS = @CFLAGS@ $(PIECFLAGS) $(PIELDFLAGS)
Index: netatalk-2.0.3/bin/megatron/Makefile.am
===================================================================
--- netatalk-2.0.3.orig/bin/megatron/Makefile.am
+++ netatalk-2.0.3/bin/megatron/Makefile.am
@@ -10,6 +10,10 @@ megatron_LDADD = $(top_builddir)/libatal
 noinst_HEADERS = asingle.h megatron.h hqx.h macbin.h nad.h
 
 LINKS = unbin unhex unsingle hqx2bin single2bin macbinary binheader nadheader
+PIECFLAGS = -fpie
+PIELDFLAGS = -pie
+LDFLAGS = $(PIE_LDFLAGS)
+CFLAGS = @CFLAGS@ $(PIECFLAGS) $(PIELDFLAGS)
 
 install-exec-hook:
 	@for LINK in $(LINKS); do \
Index: netatalk-2.0.3/bin/nbp/Makefile.am
===================================================================
--- netatalk-2.0.3.orig/bin/nbp/Makefile.am
+++ netatalk-2.0.3/bin/nbp/Makefile.am
@@ -12,3 +12,7 @@ nbprgstr_LDADD = $(top_builddir)/libatal
 
 nbpunrgstr_SOURCES = nbpunrgstr.c
 nbpunrgstr_LDADD = $(top_builddir)/libatalk/libatalk.la
+PIECFLAGS = -fpie
+PIELDFLAGS = -pie
+LDFLAGS = $(PIE_LDFLAGS)
+CFLAGS = @CFLAGS@ $(PIECFLAGS) $(PIELDFLAGS)
Index: netatalk-2.0.3/bin/pap/Makefile.am
===================================================================
--- netatalk-2.0.3.orig/bin/pap/Makefile.am
+++ netatalk-2.0.3/bin/pap/Makefile.am
@@ -9,3 +9,7 @@ pap_LDADD = $(top_builddir)/libatalk/lib
 
 papstatus_SOURCES = papstatus.c
 papstatus_LDADD = $(top_builddir)/libatalk/libatalk.la
+PIECFLAGS = -fpie
+PIELDFLAGS = -pie
+LDFLAGS = $(PIE_LDFLAGS)
+CFLAGS = @CFLAGS@ $(PIECFLAGS) $(PIELDFLAGS)
Index: netatalk-2.0.3/bin/psorder/Makefile.am
===================================================================
--- netatalk-2.0.3.orig/bin/psorder/Makefile.am
+++ netatalk-2.0.3/bin/psorder/Makefile.am
@@ -8,3 +8,7 @@ psorder_SOURCES = psorder.c pa.c
 psorder_LDADD = $(top_builddir)/libatalk/libatalk.la
 
 noinst_HEADERS = psorder.h pa.h
+PIECFLAGS = -fpie
+PIELDFLAGS = -pie
+LDFLAGS = $(PIE_LDFLAGS)
+CFLAGS = @CFLAGS@ $(PIECFLAGS) $(PIELDFLAGS)
Index: netatalk-2.0.3/bin/uniconv/Makefile.am
===================================================================
--- netatalk-2.0.3.orig/bin/uniconv/Makefile.am
+++ netatalk-2.0.3/bin/uniconv/Makefile.am
@@ -6,3 +6,7 @@ bin_PROGRAMS = uniconv
 
 uniconv_SOURCES = uniconv.c iso8859_1_adapted.c
 uniconv_LDADD = $(top_builddir)/libatalk/cnid/libcnid.la $(top_builddir)/libatalk/libatalk.la
+PIECFLAGS = -fpie
+PIELDFLAGS = -pie
+LDFLAGS = $(PIE_LDFLAGS)
+CFLAGS = @CFLAGS@ $(PIECFLAGS) $(PIELDFLAGS)
Index: netatalk-2.0.3/contrib/printing/Makefile.am
===================================================================
--- netatalk-2.0.3.orig/contrib/printing/Makefile.am
+++ netatalk-2.0.3/contrib/printing/Makefile.am
@@ -4,3 +4,7 @@ bin_PROGRAMS = timeout
 
 timeout_SOURCES = timeout.c
 timeout_LDADD = $(top_builddir)/libatalk/libatalk.la
+PIECFLAGS = -fpie
+PIELDFLAGS = -pie
+LDFLAGS = $(PIE_LDFLAGS)
+CFLAGS = @CFLAGS@ $(PIECFLAGS) $(PIELDFLAGS)