From bsdkaffee@gmail.com  Sun Aug  5 12:53:41 2012
Return-Path: <bsdkaffee@gmail.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id E9ABA1065670;
	Sun,  5 Aug 2012 12:53:41 +0000 (UTC)
	(envelope-from bsdkaffee@gmail.com)
Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182])
	by mx1.freebsd.org (Postfix) with ESMTP id 96A728FC0C;
	Sun,  5 Aug 2012 12:53:41 +0000 (UTC)
Received: by vcbgb22 with SMTP id gb22so2416247vcb.13
        for <multiple recipients>; Sun, 05 Aug 2012 05:53:40 -0700 (PDT)
Received: by 10.52.22.33 with SMTP id a1mr5001655vdf.104.1344171220720;
        Sun, 05 Aug 2012 05:53:40 -0700 (PDT)
Received: from mocha.verizon.net (c-71-61-40-68.hsd1.oh.comcast.net. [71.61.40.68])
        by mx.google.com with ESMTPS id g10sm13509967vdk.2.2012.08.05.05.53.39
        (version=TLSv1/SSLv3 cipher=OTHER);
        Sun, 05 Aug 2012 05:53:39 -0700 (PDT)
Message-Id: <1344171219.904186.29773@mocha.verizon.net>
Date: Sun, 5 Aug 2012 08:53:39 -0400
From: Jason E. Hale <bsdkaffee@gmail.com>
Reply-To: Jason E. Hale <bsdkaffee@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: novel@FreeBSD.org 
Subject: [PATCH] security/gnutls: Prevent from linking to -lpthread directly 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         170390
>Category:       ports
>Synopsis:       [PATCH] security/gnutls: Prevent from linking to -lpthread directly
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    novel
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 05 13:00:01 UTC 2012
>Closed-Date:    Wed Aug 15 13:59:25 UTC 2012
>Last-Modified:  Wed Aug 15 14:00:28 UTC 2012
>Originator:     Jason E. Hale
>Release:        FreeBSD 9.0-RELEASE i386
>Organization:
none 
>Environment:
System: FreeBSD mocha.verizon.net 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Thu Jan 19 11:42:41 EST 2012 Jason@mocha.verizon.net:/usr/obj/usr/src/sys/MOCHA9 i386


	
>Description:
- Prevent security/gnutls from linking to -lpthread directly
- Bump port revision since linking will change
- While here:
  - Use the USE_PKGCONFIG macro to remove pkgconf runtime dependency
  - Pet portlint by removing ABI number references
  - Remove --with-lzo=no, if anything it should be --without-lzo,
    but LZO support is disabled by default whether liblzo2 is installed or not

	
>How-To-Repeat:
- Use attached diff
	
>Fix:

	



--- 2012-08-05-gnutls.diff begins here ---
Index: Makefile
===================================================================
--- Makefile	(revision 302105)
+++ Makefile	(working copy)
@@ -7,6 +7,7 @@
 
 PORTNAME=	gnutls
 PORTVERSION=	2.12.18
+PORTREVISION=	1
 CATEGORIES=	security net
 MASTER_SITES=	${MASTER_SITE_GNU} \
 		${MASTER_SITE_GNUPG}
@@ -15,15 +16,16 @@
 MAINTAINER=	novel@FreeBSD.org
 COMMENT=	GNU Transport Layer Security library
 
-LIB_DEPENDS=	nettle.4:${PORTSDIR}/security/nettle \
-		gpg-error.0:${PORTSDIR}/security/libgpg-error \
-		p11-kit.0:${PORTSDIR}/security/p11-kit
+LIB_DEPENDS=	nettle:${PORTSDIR}/security/nettle \
+		gpg-error:${PORTSDIR}/security/libgpg-error \
+		p11-kit:${PORTSDIR}/security/p11-kit
 
 CONFLICTS=	gnutls-devel-[0-9]*
 
 USE_BZIP2=	yes
 USE_ICONV=	yes
-USE_GNOME=	pkgconfig ltverhack gnomehack
+USE_PKGCONFIG=	build
+USE_GNOME=	ltverhack gnomehack
 GNU_CONFIGURE=	yes
 MAKE_JOBS_SAFE=	yes
 USE_LDCONFIG=	yes
@@ -36,8 +38,8 @@
 
 .include <bsd.port.pre.mk>
 
-.if (defined(WITH_LIBTASN1) || exists(${LOCALBASE}/lib/libtasn1.so.4)) && !defined(WITHOUT_LIBTASN1)
-LIB_DEPENDS+=	tasn1.4:${PORTSDIR}/security/libtasn1
+.if (defined(WITH_LIBTASN1) || exists(${LOCALBASE}/lib/libtasn1.so)) && !defined(WITHOUT_LIBTASN1)
+LIB_DEPENDS+=		tasn1:${PORTSDIR}/security/libtasn1
 .else
 CONFIGURE_ARGS+=	--with-included-libtasn1
 .endif
@@ -45,8 +47,6 @@
 .if (defined(WITH_LZO) || exists(${LOCALBASE}/lib/liblzo2.so)) && !defined(WITHOUT_LZO)
 LIB_DEPENDS+=		lzo2:${PORTSDIR}/archivers/lzo2
 CONFIGURE_ARGS+=	--with-lzo
-.else
-CONFIGURE_ARGS+=	--with-lzo=no
 .endif
 
 .if defined(WITHOUT_CXX)
@@ -67,6 +67,9 @@
 PORTDOCS=		AUTHORS NEWS README THANKS
 PORTEXAMPLES=		*.c
 
+post-patch:
+	@${FIND} ${WRKSRC} -name "Makefile.in" -type f | ${XARGS} ${REINPLACE_CMD} -e 's|[$$][(]LTLIBPTHREAD[)]||g'
+
 post-install:
 .if !defined (NOPORTEXAMPLES)
 	@${MKDIR} ${EXAMPLESDIR}
--- 2012-08-05-gnutls.diff ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->novel 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Aug 5 13:00:27 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=170390 
State-Changed-From-To: open->closed 
State-Changed-By: novel 
State-Changed-When: Wed Aug 15 13:59:25 UTC 2012 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=170390 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/170390: commit references a PR
Date: Wed, 15 Aug 2012 13:57:15 +0000 (UTC)

 Author: novel
 Date: Wed Aug 15 13:57:01 2012
 New Revision: 302578
 URL: http://svn.freebsd.org/changeset/ports/302578
 
 Log:
   - Drop automatic dependency detection [1]
   - Do not link to -lphread directly [2]
   - Use USE_PKGCONFIG [2]
   - Pet portlint by removing ABI number references [2]
   - Drop no longer actual --with-lzo=no switch, lzo support
     is disabled by default anyway [2]
   - Bump PORTREVISION
   
   PR:		170390 [2]
   Submitted by:	Jason E. Hale [2], A.J. Kehoe IV (Nanoman) [1]
 
 Modified:
   head/security/gnutls/Makefile
 
 Modified: head/security/gnutls/Makefile
 ==============================================================================
 --- head/security/gnutls/Makefile	Wed Aug 15 13:47:53 2012	(r302577)
 +++ head/security/gnutls/Makefile	Wed Aug 15 13:57:01 2012	(r302578)
 @@ -7,6 +7,7 @@
  
  PORTNAME=	gnutls
  PORTVERSION=	2.12.18
 +PORTREVISION=	1
  CATEGORIES=	security net
  MASTER_SITES=	${MASTER_SITE_GNU} \
  		${MASTER_SITE_GNUPG}
 @@ -15,15 +16,16 @@ MASTER_SITE_SUBDIR=	${PORTNAME}
  MAINTAINER=	novel@FreeBSD.org
  COMMENT=	GNU Transport Layer Security library
  
 -LIB_DEPENDS=	nettle.4:${PORTSDIR}/security/nettle \
 -		gpg-error.0:${PORTSDIR}/security/libgpg-error \
 -		p11-kit.0:${PORTSDIR}/security/p11-kit
 +LIB_DEPENDS=	nettle:${PORTSDIR}/security/nettle \
 +		gpg-error:${PORTSDIR}/security/libgpg-error \
 +		p11-kit:${PORTSDIR}/security/p11-kit
  
  CONFLICTS=	gnutls-devel-[0-9]*
  
  USE_BZIP2=	yes
  USE_ICONV=	yes
 -USE_GNOME=	pkgconfig ltverhack gnomehack
 +USE_PKGCONFIG=	build
 +USE_GNOME=	ltverhack gnomehack
  GNU_CONFIGURE=	yes
  MAKE_JOBS_SAFE=	yes
  USE_LDCONFIG=	yes
 @@ -36,17 +38,15 @@ MANCOMPRESSED=	no
  
  .include <bsd.port.pre.mk>
  
 -.if (defined(WITH_LIBTASN1) || exists(${LOCALBASE}/lib/libtasn1.so.4)) && !defined(WITHOUT_LIBTASN1)
 -LIB_DEPENDS+=	tasn1.4:${PORTSDIR}/security/libtasn1
 +.if defined(WITH_LIBTASN1)
 +LIB_DEPENDS+=	tasn1:${PORTSDIR}/security/libtasn1
  .else
  CONFIGURE_ARGS+=	--with-included-libtasn1
  .endif
  
 -.if (defined(WITH_LZO) || exists(${LOCALBASE}/lib/liblzo2.so)) && !defined(WITHOUT_LZO)
 +.if defined(WITH_LZO)
  LIB_DEPENDS+=		lzo2:${PORTSDIR}/archivers/lzo2
  CONFIGURE_ARGS+=	--with-lzo
 -.else
 -CONFIGURE_ARGS+=	--with-lzo=no
  .endif
  
  .if defined(WITHOUT_CXX)
 @@ -67,6 +67,10 @@ PLIST_SUB+=		NLS=""
  PORTDOCS=		AUTHORS NEWS README THANKS
  PORTEXAMPLES=		*.c
  
 +post-patch:
 +	@${FIND} ${WRKSRC} -name "Makefile.in" -type f | ${XARGS} ${REINPLACE_CMD} \
 +		-e 's|[$$][(]LTLIBPTHREAD[)]||g'
 +
  post-install:
  .if !defined (NOPORTEXAMPLES)
  	@${MKDIR} ${EXAMPLESDIR}
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
