From nobody@FreeBSD.org  Sat Aug 27 23:56:21 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E2411106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 27 Aug 2011 23:56:21 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 99E578FC15
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 27 Aug 2011 23:56:21 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p7RNuLVF044089
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 27 Aug 2011 23:56:21 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p7RNuLuo044088;
	Sat, 27 Aug 2011 23:56:21 GMT
	(envelope-from nobody)
Message-Id: <201108272356.p7RNuLuo044088@red.freebsd.org>
Date: Sat, 27 Aug 2011 23:56:21 GMT
From: "Mikhail T." <m.tsatsenko@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] net/libvncserver optionsify gnutls and gcrypt support
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         160245
>Category:       ports
>Synopsis:       [PATCH] net/libvncserver optionsify gnutls and gcrypt support
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bapt
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 28 00:00:29 UTC 2011
>Closed-Date:    Sun Aug 28 19:16:19 UTC 2011
>Last-Modified:  Tue Aug 30 20:40:06 UTC 2011
>Originator:     Mikhail T.
>Release:        8.2
>Organization:
>Environment:
FreeBSD red8.2-RELEASE-p2 FreeBSD 8.2-RELEASE-p2 #0 r223806: Fri Aug 26 03:29:57 MSD 2011     root@red:/usr/obj/usr/src/sys/XGATE  amd64
>Description:
- OPTIONSify gnutls and gcrypt support to prevent configure detect them itself
- Make portlint happy
>How-To-Repeat:
Install gnutls/gcrypt first, then libvncserver (it will be linked against gnutls/gcrypt without any actual dependency). So deinstalling gnutls/gcrypt will result in unusable libvncserver (tested by VBoxHeadless -n).
>Fix:


Patch attached with submission follows:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/net/libvncserver/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- Makefile	11 Aug 2011 19:19:47 -0000	1.14
+++ Makefile	27 Aug 2011 23:39:32 -0000
@@ -22,10 +22,29 @@
 USE_GNOME=	gnomehack
 USE_LDCONFIG=	yes
 GNU_CONFIGURE=	yes
-CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
-		LDFLAGS="-L${LOCALBASE}/lib"
+CPPFLAGS=	"-I${LOCALBASE}/include"
+LDFLAGS=	"-L${LOCALBASE}/lib"
 CONFIGURE_ARGS=	--without-x
 
+OPTIONS=	GNUTLS "Adds GnuTLS support" Off \
+		GCRYPT "Adds Libgcrypt support" Off
+
+.include <bsd.port.options.mk>
+
+.if defined(WITH_GNUTLS)
+LIB_DEPENDS+=       gnutls.0:${PORTSDIR}/security/gnutls
+CONFIGURE_ARGS+=	--with-gnutls
+.else
+CONFIGURE_ARGS+=	--without-gnutls
+.endif
+
+.if defined(WITH_GCRYPT)
+LIB_DEPENDS+=       gcrypt.0:${PORTSDIR}/security/libgcrypt
+CONFIGURE_ARGS+=	--with-gcrypt
+.else
+CONFIGURE_ARGS+=	--without-gcrypt
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} -e \
 		's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->bapt 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Aug 28 00:00:51 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160245 
State-Changed-From-To: open->closed 
State-Changed-By: bapt 
State-Changed-When: Sun Aug 28 19:16:18 UTC 2011 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/160245: commit references a PR
Date: Sun, 28 Aug 2011 19:16:15 +0000 (UTC)

 bapt        2011-08-28 19:16:00 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net/libvncserver     Makefile 
   Log:
   optionsify gnutls and gcrypt support
   Remove CPPFLAGS and LDFLAGS from CONFIGURE_ENV
   
   PR:             ports/160245
   Submitted by:   Mikhail T. <m.tsatsenko@gmail.com>
   
   Revision  Changes    Path
   1.15      +21 -2     ports/net/libvncserver/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: Ilias-Dimitrios Vrachnis <vrachil@gmail.com>
To: bug-followup@freebsd.org, m.tsatsenko@gmail.com
Cc:  
Subject: Re: ports/160245: [PATCH] net/libvncserver optionsify gnutls and
 gcrypt support
Date: Tue, 30 Aug 2011 23:31:07 +0300

 sorry for commenting on this closed PR. I'm running 9-CURRENT and the
 current version of libgcrypt required me to change this line:
 LIB_DEPENDS+=       gcrypt.0:${PORTSDIR}/security/libgcrypt
 into:
 LIB_DEPENDS+=       gcrypt.18:${PORTSDIR}/security/libgcrypt
 
 otherwise, the configure script never got to run.
>Unformatted:
