From 70b89bf84ad129bdc72e1b41756c507b1279cb65 Mon Sep 17 00:00:00 2001
From: jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Date: Wed, 5 Aug 2009 22:20:49 +0000
Subject: [PATCH] [packages] dbus: fix segfault caused by -pie, remove flag and
 bump pkg revsion - thanks Dave Cooper

git-svn-id: svn://svn.openwrt.org/openwrt/packages@17137 3c298f89-4303-0410-b956-a3cf2f4a3e73
---
 utils/dbus/Makefile                        |  2 +-
 utils/dbus/patches/01-dbus-nopie-fix.patch | 23 ++++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)
 create mode 100644 utils/dbus/patches/01-dbus-nopie-fix.patch

diff --git a/utils/dbus/Makefile b/utils/dbus/Makefile
index 2afb9c642..419d5ac14 100644
--- a/utils/dbus/Makefile
+++ b/utils/dbus/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 # Make sure to also update the dbus-x package
 PKG_NAME:=dbus
 PKG_VERSION:=1.2.4.6permissive
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://dbus.freedesktop.org/releases/dbus/
diff --git a/utils/dbus/patches/01-dbus-nopie-fix.patch b/utils/dbus/patches/01-dbus-nopie-fix.patch
new file mode 100644
index 000000000..36dfbf969
--- /dev/null
+++ b/utils/dbus/patches/01-dbus-nopie-fix.patch
@@ -0,0 +1,23 @@
+diff -ruN dbus-1.2.4.6permissive.orig/configure dbus-1.2.4.6permissive/configure
+--- dbus-1.2.4.6permissive.orig/configure      2009-05-06 13:35:38.000000000 -0400
++++ dbus-1.2.4.6permissive/configure   2009-08-05 17:53:25.000000000 -0400
+@@ -20927,19 +20927,6 @@
+      ;;
+   esac
+
+-  case " $CFLAGS " in
+-  *[\ \       ]-fPIE[\ \      ]*) ;;
+-  *) if cc_supports_flag -fPIE; then
+-        PIE_CFLAGS="-fPIE"
+-        if ld_supports_flag -z,relro; then
+-           PIE_LDFLAGS="-pie -Wl,-z,relro"
+-        else
+-           PIE_LDFLAGS="-pie"
+-        fi
+-     fi
+-     ;;
+-  esac
+-
+   ### Disabled warnings, and compiler flag overrides
+
+   # Let's just ignore unused for now