From mteterin@250-217.customer.cloud9.net  Mon Mar  8 10:35:36 2004
Return-Path: <mteterin@250-217.customer.cloud9.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id DD72216A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  8 Mar 2004 10:35:35 -0800 (PST)
Received: from corbulon.video-collage.com (corbulon.video-collage.com [64.35.99.179])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 68EA543D1D
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  8 Mar 2004 10:35:35 -0800 (PST)
	(envelope-from mteterin@250-217.customer.cloud9.net)
Received: from 250-217.customer.cloud9.net (195-11.customer.cloud9.net [168.100.195.11])
	by corbulon.video-collage.com (8.12.11/8.12.11) with ESMTP id i28IZ0bd093487
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 8 Mar 2004 13:35:33 -0500 (EST)
	(envelope-from mteterin@250-217.customer.cloud9.net)
Received: from 250-217.customer.cloud9.net (mteterin@localhost [127.0.0.1])
	by 250-217.customer.cloud9.net (8.12.10/8.12.10) with ESMTP id i28IYtw4000496
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 8 Mar 2004 13:34:55 -0500 (EST)
	(envelope-from mteterin@250-217.customer.cloud9.net)
Received: (from mteterin@localhost)
	by 250-217.customer.cloud9.net (8.12.10/8.12.10/Submit) id i28IYsM3000495;
	Mon, 8 Mar 2004 13:34:54 -0500 (EST)
	(envelope-from mteterin)
Message-Id: <200403081834.i28IYsM3000495@250-217.customer.cloud9.net>
Date: Mon, 8 Mar 2004 13:34:54 -0500 (EST)
From: Mikhail Teterin <mi@aldan.algebra.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: USE_GETTEXT is too specific
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         63937
>Category:       ports
>Synopsis:       USE_GETTEXT is too specific
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 08 10:40:09 PST 2004
>Closed-Date:    Thu Jun 10 07:39:44 GMT 2004
>Last-Modified:  Thu Jun 10 07:39:44 GMT 2004
>Originator:     Mikhail Teterin
>Release:        FreeBSD 5.2-RELEASE i386
>Organization:
Virtual Estates, Inc.
>Environment:

>Description:

	Most (probably -- all) of the ports declaring
	USE_GETTEXT don't really care, which version of -lintl
	they get. If none is currently installed on the system,
	the latest and greatest, should, of course, be built.
	But if one is already present (and used by other ports,
	as is usually the case), there is no need to insist on
	the latest one to build another port.

	The simple patch below changes bsd.port.mk to treat a
	port's declaration of USE_GETTEXT=yes as a sign, that it
	will accept any library version. A port, which needs a
	particular feature, not present in the earlier gettext
	releases, can declare USE_GETTEXT=6 to insist on a
	particular major number.

	Some other variables in bsd.port.mk should, probably, get
	a similar treatment (USE_MESA?)?

	The current rigidity breaks the good old method of port
	building through make, forcing (coercing?) the use of good
	new portupgrade.

	Its only advantage is that it forces the port build to be
	closer to that on the ports-cluster -- not too useful, because
	the download of the cluster-built version of a port is available
	anyway.

>How-To-Repeat:

	Install the latest release of OS and the ports tree.
	Build kdebase3. Update the ports tree (through cvsup,
	for example). Try to build lynx-current -- or anything else that
	uses gettext.

	Make(1) will notice, that intl.6 is required and proceed to
	build it and install it. Upon trying to install, it will fail,
	because an earlier version is already installed.

	Portupgrade to the resque (if you happen to know about it)...

	Why? Lynx does not care, which version of gettext it is going
	to be linked against.

	The administrating user should be able to upgrade gettext, when
	she/he wants to -- not when he/she wants to build another package.

>Fix:

Index: bsd.port.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.484
diff -U2 -r1.484 bsd.port.mk
--- bsd.port.mk	4 Feb 2004 04:27:04 -0000	1.484
+++ bsd.port.mk	8 Mar 2004 18:33:27 -0000
@@ -1669,5 +1669,9 @@
 
 .if defined(USE_GETTEXT)
-LIB_DEPENDS+=	intl.6:${PORTSDIR}/devel/gettext
+.	if ${USE_GETTEXT:L} == "yes"
+LIB_DEPENDS+=	intl:${PORTSDIR}/devel/gettext
+.	else
+LIB_DEPENDS+=	intl.${USE_GETTEXT}:${PORTSDIR}/devel/gettext
+.	endif
 .endif
 
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: mi 
Responsible-Changed-When: Mon Mar 8 11:06:57 PST 2004 
Responsible-Changed-Why:  
Who else? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=63937 
State-Changed-From-To: open->closed 
State-Changed-By: will 
State-Changed-When: Thu Jun 3 17:59:37 PDT 2004 
State-Changed-Why:  
This is a pretty cheap hack for what should be a generic test.  What 
if a certain port needs libintl >= 5, instead of just 5?  I think this 
could be fixed better with an upgrade to LIB_DEPENDS that allows specifying 
ranges of shlib versions.  What do you think? 

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

From: Mikhail Teterin <mi+kde@aldan.algebra.com>
To: Will Andrews <will@FreeBSD.org>
Cc: portmgr@FreeBSD.org, FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/63937: USE_GETTEXT is too specific
Date: Thu, 3 Jun 2004 21:32:40 -0400

 On Thursday 03 June 2004 09:03 pm, Will Andrews wrote:
 = Synopsis: USE_GETTEXT is too specific
 =
 = State-Changed-From-To: open->closed
 = State-Changed-By: will
 = State-Changed-When: Thu Jun 3 17:59:37 PDT 2004
 = State-Changed-Why:
 = This is a pretty cheap hack for what should be a generic test. What
 = if a certain port needs libintl >= 5, instead of just 5? I think this
 = could be fixed better with an upgrade to LIB_DEPENDS that allows
 = specifying ranges of shlib versions. What do you think?
 
 For one, I think, if there is a question still being discussed, closing
 the PR is premature :-)
 
 Two -- thanks to the previous little hack:
 
 	http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/34126
 
 the LIB_DEPENDS syntax already allows for what you are saying:
 
 	LIB_DEPENDS=    intl.[5-9]:...
 
 works. Or, when/if this little hack goes in:
 
 	USE_GETTEXT=	[5-9]
 
 will work too. Yours,
 
 	-mi
 
State-Changed-From-To: closed->feedback 
State-Changed-By: will 
State-Changed-When: Thu Jun 3 18:45:52 PDT 2004 
State-Changed-Why:  
Sorry, I closed this by mistake.  Thanks for pointing out that you can 
already do ranges.  This should get added to the next 4-exp run. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=63937 
State-Changed-From-To: feedback->analyzed 
State-Changed-By: kris 
State-Changed-When: Sat Jun 5 21:18:03 PDT 2004 
State-Changed-Why:  
Testing on bento for subsequent commit 

http://www.freebsd.org/cgi/query-pr.cgi?pr=63937 
State-Changed-From-To: analyzed->closed 
State-Changed-By: kris 
State-Changed-When: Thu Jun 10 07:39:32 GMT 2004 
State-Changed-Why:  
Patch committed, thanks! 

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