From nobody@FreeBSD.org  Sat Mar  7 07:33:31 2009
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 9A56C106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  7 Mar 2009 07:33:31 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 885368FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  7 Mar 2009 07:33:31 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n277XVsJ005130
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 7 Mar 2009 07:33:31 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n277XVH5005129;
	Sat, 7 Mar 2009 07:33:31 GMT
	(envelope-from nobody)
Message-Id: <200903070733.n277XVH5005129@www.freebsd.org>
Date: Sat, 7 Mar 2009 07:33:31 GMT
From: "Scot W. Hetzel" <swhetzel@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] databases/sqlite2: Change hard coded TCL dependancy to USE_TCL
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         132381
>Category:       ports
>Synopsis:       [patch] databases/sqlite2: Change hard coded TCL dependancy to USE_TCL
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mnag
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 07 07:40:04 UTC 2009
>Closed-Date:    Mon Mar 23 13:45:32 UTC 2009
>Last-Modified:  Mon Mar 23 13:45:32 UTC 2009
>Originator:     Scot W. Hetzel
>Release:        8.0-CURRENT
>Organization:
>Environment:
FreeBSD hp010 8.0-CURRENT FreeBSD 8.0-CURRENT #1: Fri Mar  6 02:22:28 CST 2009     root@hp010:/usr/obj/usr/src/8x-zfs/sys/DV8135NR  amd64

>Description:
Currently, databases/sqlite2 has a hard coded dependency on either TCL 8.3 or TCL 8.4.  The port doesn't allow the selection of a newer version of TCL.  This also causes other ports that depend on sqlite2 to have an indirect dependency on these versions of TCL 8.3 or TCL 8.4.

This prevents the installation of only one TCL port.
>How-To-Repeat:
Install TCL > 8.4 and set WITH_TCL_VER to that value
Then install databases/sqlite2

sqlite2 will then install TCL 8.3 or 8.4.
>Fix:
The attached patch allows sqlite2 to be built with any supported version of TCL.

Patch attached with submission follows:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/databases/sqlite2/Makefile,v
retrieving revision 1.42
diff -u -r1.42 Makefile
--- Makefile	21 Aug 2008 06:16:31 -0000	1.42
+++ Makefile	7 Mar 2009 04:52:50 -0000
@@ -29,44 +29,25 @@
 
 EXTRACT_AFTER_ARGS=	| ${TAR} -xf - --exclude CVS
 
-OPTIONS=	TCL84	"Enable TCL wrapper (tcl 8.4)"	off \
-		TCL83	"Enable TCL wrapper (tcl 8.3)"	off \
+OPTIONS=	TCL	"Enable TCL wrapper"	off \
 		THREADS	"Compile with threads support"	off \
 		DOCS	"Building docs (depends on TCL)"	on
 
-# Defaults, for building the docs:
-TCL_VERSION=	8.4
-
 .include <bsd.port.pre.mk>
 
 # Deprecated options
-.if defined(SQLITE_WITH_TCL83)
-WITH_TCL83=	yes
-.endif
-.if defined(SQLITE_WITH_TCL84)
-WITH_TCL84=	yes
-.endif
-
-.if defined(WITH_TCL83)
-.if defined(WITH_TCL84)
-BROKEN=		please, select only one TCL wrapper
-.endif
-CATEGORIES+=	tcl
-TCL_VERSION=	8.3
-WITH_TCL=	YES
-.endif
-
-.if defined(WITH_TCL84)
-.if defined(WITH_TCL83)
-BROKEN=		please, select only one TCL wrapper
-.endif
-CATEGORIES+=	tcl
-TCL_VERSION=	8.4
-WITH_TCL=	YES
+.if defined(SQLITE_WITH_TCL83) || defined(WITH_TCL83)
+WITH_TCL_VER=	83
+WITH_TCL=	yes
+.endif
+.if defined(SQLITE_WITH_TCL84) || defined(WITH_TCL84)
+WITH_TCL_VER=	84
+WITH_TCL=	yes
 .endif
 
 .if defined(WITH_TCL)
-LIB_DEPENDS+=	tcl${TCL_VERSION:S/.//}:${PORTSDIR}/lang/tcl${TCL_VERSION:S/.//}
+CATEGORIES+=	tcl
+USE_TCL=	83+
 PLIST_SUB+=	WITH_TCL=""
 .else
 PLIST_SUB+=	WITH_TCL="@comment "
@@ -74,17 +55,21 @@
 
 .if !defined(NOPORTDOCS) && !defined(WITHOUT_DOCS)
 PORTDOCS=	*
-BUILD_DEPENDS+=	tclsh${TCL_VERSION}:${PORTSDIR}/lang/tcl${TCL_VERSION:S/.//}
-MAKE_ARGS+=	TCLSH=tclsh${TCL_VERSION}
-MAKE_ENV+=	TCL_VER=${TCL_VERSION}
+USE_TCL_BUILD=	83+
+MAKE_ARGS+=	TCLSH=${TCLSH}
+MAKE_ENV+=	TCL_VER=${TCL_VER}
+.endif
+
+.if defined(WITH_TCL) || defined(WITH_DOCS)
+.include "${PORTSDIR}/Mk/bsd.tcl.mk"
 .endif
 
 post-patch:
 	@${REINPLACE_CMD} -e "s/tclsh \$$(TOP)/\$$(TCLSH) \$$(TOP)/g" \
 		 -e "s|\./libtool|${LIBTOOL}|g" ${WRKSRC}/Makefile.in
-	@${ECHO} "config_TARGET_TCL_INC=\"-I${PREFIX}/include/tcl${TCL_VERSION}\"" \
+	@${ECHO} "config_TARGET_TCL_INC=\"-I${TCL_INCLUDEDIR}\"" \
 		> ${WRKSRC}/freebsd.hints
-	@${ECHO} "config_TARGET_TCL_LIBS=\"-L${PREFIX}/lib -ltcl${TCL_VERSION:S/.//}\"" \
+	@${ECHO} "config_TARGET_TCL_LIBS=\"-L${PREFIX}/lib -ltcl${TCL_VER:S/.//}\"" \
 		>> ${WRKSRC}/freebsd.hints
 .if defined(WITH_THREADS)
 	@${ECHO} "config_TARGET_CFLAGS=\"-DTHREADSAFE=1 ${PTHREAD_LIBS}\"" \


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->mnag 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Mar 7 07:40:14 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/132381: commit references a PR
Date: Mon, 23 Mar 2009 05:31:42 +0000 (UTC)

 mnag        2009-03-23 05:31:29 UTC
 
   FreeBSD ports repository
 
   Modified files:
     databases/sqlite2    Makefile pkg-plist 
   Log:
   - Change hard coded TCL dependancy to USE_TCL
   
   PR:             132381
   Submitted by:   Scot W. Hetzel <swhetzel___gmail.com>
   
   Revision  Changes    Path
   1.43      +34 -36    ports/databases/sqlite2/Makefile
   1.13      +3 -3      ports/databases/sqlite2/pkg-plist
 _______________________________________________
 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: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/132381: commit references a PR
Date: Mon, 23 Mar 2009 05:31:50 +0000 (UTC)

 mnag        2009-03-23 05:31:39 UTC
 
   FreeBSD ports repository
 
   Modified files:
     databases/sqlite34   Makefile 
   Log:
   - Change hard coded TCL dependancy to USE_TCL
   
   PR:             132381
   Submitted by:   Scot W. Hetzel <swhetzel___gmail.com>
   
   Revision  Changes    Path
   1.33      +28 -14    ports/databases/sqlite34/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"
 
State-Changed-From-To: open->closed 
State-Changed-By: mnag 
State-Changed-When: Mon Mar 23 13:45:31 UTC 2009 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=132381 
>Unformatted:
