From 086da7a91ef0a4fbf5ae524923475ae15e7e6f37 Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@openadk.org>
Date: Sat, 24 May 2014 13:54:20 +0200
Subject: fix build with ssp enabled

---
 package/pam/Makefile                                     |  8 ++++++--
 package/pam/patches/patch-configure_in                   | 16 ++++++++++++++++
 .../patch-modules_pam_succeed_if_pam_succeed_if_c        |  4 ++--
 package/pam/patches/patch-modules_pam_time_pam_time_c    |  4 ++--
 4 files changed, 26 insertions(+), 6 deletions(-)
 create mode 100644 package/pam/patches/patch-configure_in

(limited to 'package/pam')

diff --git a/package/pam/Makefile b/package/pam/Makefile
index 40484ccea..d22a05fd7 100644
--- a/package/pam/Makefile
+++ b/package/pam/Makefile
@@ -7,8 +7,8 @@ PKG_NAME:=		pam
 PKG_VERSION:=		1.1.8
 PKG_RELEASE:=		2
 PKG_MD5SUM:=		5107bbf54042400b6200e8367cc7feef
-PKG_DESCR:=		Pluggable Authentication Modules
-PKG_BUILDDEP:=		flex-host flex
+PKG_DESCR:=		pluggable authentication modules
+PKG_BUILDDEP:=		autotool flex
 PKG_SECTION:=		misc
 PKG_URL:=		http://www.linux-pam.org/
 PKG_SITES:=		http://www.linux-pam.org/library/
@@ -21,6 +21,10 @@ include $(TOPDIR)/mk/package.mk
 
 $(eval $(call PKG_template,PAM,pam,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 
+AUTOTOOL_STYLE:=	autoreconf
+ifeq ($(ADK_TARGET_USE_SSP),y)
+TARGET_LDFLAGS+=	-lssp
+endif
 CONFIGURE_ARGS+=	--disable-nis \
 			--disable-regenerate-docu \
 			--enable-db=no
diff --git a/package/pam/patches/patch-configure_in b/package/pam/patches/patch-configure_in
new file mode 100644
index 000000000..499ecc705
--- /dev/null
+++ b/package/pam/patches/patch-configure_in
@@ -0,0 +1,16 @@
+--- Linux-PAM-1.1.8.orig/configure.in	2013-09-18 14:30:13.000000000 +0200
++++ Linux-PAM-1.1.8/configure.in	2014-05-24 11:00:07.000000000 +0200
+@@ -28,12 +28,7 @@ dnl If we use /usr as prefix, use /etc f
+         fi
+ 	if test ${libdir} = '${exec_prefix}/lib'
+ 	then
+-		case "`uname -m`" in
+-		    x86_64|ppc64|s390x|sparc64)
+-			libdir="/lib64" ;;
+-		    *)
+-			libdir="/lib" ;;
+-		esac
++		libdir="/lib"
+ 	fi
+ 	if test ${sbindir} = '${exec_prefix}/sbin'
+         then
diff --git a/package/pam/patches/patch-modules_pam_succeed_if_pam_succeed_if_c b/package/pam/patches/patch-modules_pam_succeed_if_pam_succeed_if_c
index d6c05edaf..2d51fab3f 100644
--- a/package/pam/patches/patch-modules_pam_succeed_if_pam_succeed_if_c
+++ b/package/pam/patches/patch-modules_pam_succeed_if_pam_succeed_if_c
@@ -1,6 +1,6 @@
 --- Linux-PAM-1.1.8.orig/modules/pam_succeed_if/pam_succeed_if.c	2013-06-18 16:11:21.000000000 +0200
-+++ Linux-PAM-1.1.8/modules/pam_succeed_if/pam_succeed_if.c	2014-02-10 11:36:17.000000000 +0100
-@@ -233,16 +233,20 @@ evaluate_notingroup(pam_handle_t *pamh, 
++++ Linux-PAM-1.1.8/modules/pam_succeed_if/pam_succeed_if.c	2014-05-24 10:49:28.000000000 +0200
+@@ -233,16 +233,20 @@ evaluate_notingroup(pam_handle_t *pamh,
  static int
  evaluate_innetgr(const char *host, const char *user, const char *group)
  {
diff --git a/package/pam/patches/patch-modules_pam_time_pam_time_c b/package/pam/patches/patch-modules_pam_time_pam_time_c
index a914fdd49..e122cece5 100644
--- a/package/pam/patches/patch-modules_pam_time_pam_time_c
+++ b/package/pam/patches/patch-modules_pam_time_pam_time_c
@@ -1,6 +1,6 @@
 --- Linux-PAM-1.1.8.orig/modules/pam_time/pam_time.c	2013-06-18 16:11:21.000000000 +0200
-+++ Linux-PAM-1.1.8/modules/pam_time/pam_time.c	2014-02-10 11:36:17.000000000 +0100
-@@ -554,9 +554,11 @@ check_account(pam_handle_t *pamh, const 
++++ Linux-PAM-1.1.8/modules/pam_time/pam_time.c	2014-05-24 10:49:28.000000000 +0200
+@@ -554,9 +554,11 @@ check_account(pam_handle_t *pamh, const
  	       continue;
  	  }
  	  /* If buffer starts with @, we are using netgroups */
-- 
cgit v1.2.3