From bae327edb847bdf8cb97567cdb7576080569284a Mon Sep 17 00:00:00 2001
From: Marcus Alves Grando <mnag@FreeBSD.org>
Date: Mon, 17 Oct 2005 01:54:39 +0000
Subject: Use PTHREAD_LIBS Fix forced libtool path

Notified by:	pointyhat by kris
---
 mail/libspf2/Makefile              | 25 ++++++++++++++----------
 mail/libspf2/files/patch-configure | 39 --------------------------------------
 2 files changed, 15 insertions(+), 49 deletions(-)

diff --git a/mail/libspf2/Makefile b/mail/libspf2/Makefile
index 62cc6cc93211..821fbcd1ba4f 100644
--- a/mail/libspf2/Makefile
+++ b/mail/libspf2/Makefile
@@ -5,21 +5,26 @@
 # $FreeBSD$
 #
 
-PORTNAME=		libspf2
-PORTVERSION=		1.2.5
-CATEGORIES=		mail
-MASTER_SITES=		http://www.libspf2.org/%SUBDIR%/
+PORTNAME=	libspf2
+PORTVERSION=	1.2.5
+CATEGORIES=	mail
+MASTER_SITES=	http://www.libspf2.org/%SUBDIR%/
 MASTER_SITE_SUBDIR=	spf
 
-MAINTAINER=		mnag@FreeBSD.org
-COMMENT=		Sender Rewriting Scheme 2 C Implementation
+MAINTAINER=	mnag@FreeBSD.org
+COMMENT=	Sender Rewriting Scheme 2 C Implementation
 
-CONFLICTS=		${PORTNAME}-1.0.*
+CONFLICTS=	${PORTNAME}-1.0.*
 
-INSTALLS_SHLIB=		yes
-HAS_CONFIGURE=		yes
-USE_LIBTOOL_VER=	15
+USE_REINPLACE=	yes
+INSTALLS_SHLIB=	yes
+GNU_CONFIGURE=	yes
+USE_LIBTOOL_VER=15
 
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 
+post-patch:
+	@${REINPLACE_CMD} -e "s|-lpthread|${PTHREAD_LIBS}|g" \
+		${WRKSRC}/configure
+
 .include <bsd.port.mk>
diff --git a/mail/libspf2/files/patch-configure b/mail/libspf2/files/patch-configure
index 11f7b2a64dbc..ce0a0c962220 100644
--- a/mail/libspf2/files/patch-configure
+++ b/mail/libspf2/files/patch-configure
@@ -1,44 +1,5 @@
 --- configure.orig	Wed Feb 23 23:14:51 2005
 +++ configure	Thu Jul 28 20:12:32 2005
-@@ -19332,10 +19332,10 @@
- 
- 
- # This can be used to rebuild libtool when needed
--LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
-+LIBTOOL_DEPS="--disable-ltlibs /usr/local/share/libtool15/ltmain.sh"
- 
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(SHELL) /usr/local/bin/libtool15'
- 
- # Prevent multiple expansion
- 
-@@ -22349,13 +22349,13 @@
- fi
- 
- 
--echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
--echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
-+echo "$as_me:$LINENO: checking for pthread_create in -pthread" >&5
-+echo $ECHO_N "checking for pthread_create in -pthread... $ECHO_C" >&6
- if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
-   echo $ECHO_N "(cached) $ECHO_C" >&6
- else
-   ac_check_lib_save_LIBS=$LIBS
--LIBS="-lpthread  $LIBS"
-+LIBS="-pthread  $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h.  */
- _ACEOF
-@@ -22418,7 +22418,7 @@
- #define HAVE_LIBPTHREAD 1
- _ACEOF
- 
--  LIBS="-lpthread $LIBS"
-+  LIBS="-pthread $LIBS"
- 
- fi
- 
 @@ -23661,12 +23661,6 @@
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
-- 
cgit debian/1.2.3+git2.25.1-1-2-gaceb0