respect LDFLAGS as reported in bug 247712, patch provided by Kacper Kowalik <xarthisi...
authorChristian Faulhammer <fauli@gentoo.org>
Tue, 20 Apr 2010 19:08:07 +0000 (19:08 +0000)
committerChristian Faulhammer <fauli@gentoo.org>
Tue, 20 Apr 2010 19:08:07 +0000 (19:08 +0000)
Package-Manager: portage-2.1.8.3/cvs/Linux i686

mail-client/etpan-ng/ChangeLog
mail-client/etpan-ng/etpan-ng-0.7.1-r1.ebuild [new file with mode: 0644]
mail-client/etpan-ng/files/etpan-ng-0.7.1-as-needed.patch [new file with mode: 0644]

index 5d8c7a3bc6f9dba5bc89a667e0601fd4f98a48ac..e0ad4803224f93497e7198c97b46b66342b7417b 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for mail-client/etpan-ng
 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-client/etpan-ng/ChangeLog,v 1.9 2010/04/20 18:39:14 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-client/etpan-ng/ChangeLog,v 1.10 2010/04/20 19:08:07 fauli Exp $
+
+*etpan-ng-0.7.1-r1 (20 Apr 2010)
+
+  20 Apr 2010; Christian Faulhammer <fauli@gentoo.org>
+  +etpan-ng-0.7.1-r1.ebuild, +files/etpan-ng-0.7.1-as-needed.patch:
+  respect LDFLAGS as reported in bug 247712, patch provided by Kacper
+  Kowalik <xarthisius DOT kk AT gmail DOT com>
 
   20 Apr 2010; Christian Faulhammer <fauli@gentoo.org> -etpan-ng-0.7.ebuild:
   clean up
diff --git a/mail-client/etpan-ng/etpan-ng-0.7.1-r1.ebuild b/mail-client/etpan-ng/etpan-ng-0.7.1-r1.ebuild
new file mode 100644 (file)
index 0000000..c149b52
--- /dev/null
@@ -0,0 +1,39 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-client/etpan-ng/etpan-ng-0.7.1-r1.ebuild,v 1.1 2010/04/20 19:08:07 fauli Exp $
+
+inherit eutils autotools
+
+DESCRIPTION="etPan is a console mail client that is based on libEtPan!"
+HOMEPAGE="http://libetpan.sourceforge.net/etpan/"
+SRC_URI="mirror://sourceforge/libetpan/${P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug ldap"
+
+DEPEND=">=net-libs/libetpan-0.35
+       sys-libs/ncurses
+       ldap? ( net-nds/openldap )
+       || ( sys-devel/bison dev-util/yacc dev-util/byacc )"
+
+src_unpack() {
+       unpack ${A}
+       cd "${S}"
+       epatch "${FILESDIR}/${P}-as-needed.patch"
+       eautoreconf
+}
+
+src_compile() {
+       sed -i -e "s:@bindir@:${D}/@bindir@:" src/Makefile.in
+
+       econf \
+               `use_enable debug` \
+                       || die "econf failed"
+       emake || die "emake failed"
+}
+
+src_install() {
+       make DESTDIR="${D}" install || die
+       dodoc Changelog NEWS README TODO contrib/etpan-make-vtree.pl doc/*
+}
diff --git a/mail-client/etpan-ng/files/etpan-ng-0.7.1-as-needed.patch b/mail-client/etpan-ng/files/etpan-ng-0.7.1-as-needed.patch
new file mode 100644 (file)
index 0000000..146f25e
--- /dev/null
@@ -0,0 +1,58 @@
+--- etpan-ng-0.7.1.orig/configure.in   2006-01-09 11:44:20.000000000 +0100
++++ etpan-ng-0.7.1/configure.in        2010-01-10 14:51:40.788046570 +0100
+@@ -11,18 +11,25 @@
+ libetpan_major_required=0
+ libetpan_minor_required=42
+ 
+-debug=no
++AC_MSG_CHECKING(whether debug flag was used)
+ AC_ARG_ENABLE(debug,   [  --enable-debug          setup flags (gcc) for debugging (default=no)],
+-debug=yes
+-CFLAGS="$CFLAGS -O2 -W -Wall -g"
+-LDFLAGS="$LDFLAGS",)
++      [enable_debug=$enableval],[enable_debug="no"])
++AC_MSG_RESULT($enable_debug)
++if test "$enable_debug" = "yes"; then
++      CFLAGS="$CFLAGS -O2 -W -Wall -g"
++      LDFLAGS="$LDFLAGS"
++fi
++
+ AC_ARG_ENABLE(optim,   [  --enable-optim          setup flags (gcc) for optimizations (default=no)],
+-if test "x$enable_debug" != "xyes" ; then
+-  CFLAGS="$CFLAGS -O3 -g0"
+-  LDFLAGS="$LDFLAGS -s"
++      [enable_optim=$enableval],[enable_debug="no"])
++if test "$enable_debug" != "yes"; then 
++  if test "$enable_optim" = "yes"; then
++    CFLAGS="$CFLAGS -O3 -g0"
++    LDFLAGS="$LDFLAGS -s"
++  fi
+ else
+   AC_MSG_WARN([enable-optim and enable-debug are incompatible -- disabling optimizations])
+-fi,)
++fi
+ 
+ AC_CONFIG_HEADER(config.h)
+ 
+@@ -67,10 +74,10 @@
+   if test "x$checkpthread" = "xyes"; then
+     AC_MSG_CHECKING([for pthread_create with -$flag])
+     OLDFLAGS="$LDFLAGS"
+-    LDFLAGS="-$flag $LDFLAGS"
++    LDFLAGS="$LDFLAGS -$flag"
+     AC_TRY_LINK([], [pthread_create();], 
+                     [pthflag=yes; checkpthread=no], 
+-                    [pthflag=no; LDFLAGS="$OLDCFLAGS"])
++                    [pthflag=no; LDFLAGS="$OLDFLAGS"])
+     AC_MSG_RESULT($pthflag)
+   fi
+ done
+@@ -127,7 +134,7 @@
+   AC_CHECK_HEADER(libetpan/libetpan.h, [libetpan=yes])
+   if test "x$libetpan" = "xyes"; then
+     AC_MSG_CHECKING([whether libetpan-config hints compiles and links fine])
+-    LDFLAGS="$LDFLAGS `$libetpanconfig --libs 2>/dev/null`"
++    LIBS="$LIBS `$libetpanconfig --libs 2>/dev/null`"
+     AC_TRY_LINK([], [db_mailstorage_init();], [libetpan=yes], [libetpan=no])
+     AC_MSG_RESULT([$libetpan])
+   fi