diff mail-client/alpine/alpine-2.00.ebuild @ 78:47db27a12ba2

fix alpine build for --as-needed in LDFLAGS
author holger@hoho.dyndns.org
date Wed, 27 Aug 2008 20:38:51 +0200
parents 3d2e64e09140
children
line wrap: on
line diff
--- a/mail-client/alpine/alpine-2.00.ebuild	Wed Aug 27 14:27:14 2008 +0200
+++ b/mail-client/alpine/alpine-2.00.ebuild	Wed Aug 27 20:38:51 2008 +0200
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
-inherit eutils
+inherit eutils flag-o-matic
 
 DESCRIPTION="alpine is the successor of the famous mail and news reader pine"
 HOMEPAGE="http://www.washington.edu/alpine/ http://staff.washington.edu/chappa/alpine/"
@@ -73,9 +73,17 @@
 	# fixme
 	# --with-system-mail-directory=DIR?
 
-	econf ${myconf} || die "configure problem"
+	# fixme
+	# --as-needed breaks linking of c-client for executables
+	# filter-ldflags --as-needed does not work for "-Wl,-O1,--as-needed,-z,now" ??
+	LDFLAGS=`echo $LDFLAGS | sed s/--as-needed//g | sed s/,,/,/g`
+	econf ${myconf} LDFLAGS="$LDFLAGS" || die "configure problem"
 
-	use userland_BSD && make || emake
+	if use userland_BSD; then
+		make || die "make failed"
+	else
+		emake || die "emake failed"
+	fi
 }
 
 src_install() {