From owner-freebsd-ports@FreeBSD.ORG Sat Feb 18 01:35:22 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5099C1065670 for ; Sat, 18 Feb 2012 01:35:22 +0000 (UTC) (envelope-from lichray@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0C5DC8FC0A for ; Sat, 18 Feb 2012 01:35:21 +0000 (UTC) Received: by iaeo4 with SMTP id o4so6793184iae.13 for ; Fri, 17 Feb 2012 17:35:21 -0800 (PST) Received-SPF: pass (google.com: domain of lichray@gmail.com designates 10.42.177.133 as permitted sender) client-ip=10.42.177.133; Authentication-Results: mr.google.com; spf=pass (google.com: domain of lichray@gmail.com designates 10.42.177.133 as permitted sender) smtp.mail=lichray@gmail.com; dkim=pass header.i=lichray@gmail.com Received: from mr.google.com ([10.42.177.133]) by 10.42.177.133 with SMTP id bi5mr13435510icb.40.1329528921388 (num_hops = 1); Fri, 17 Feb 2012 17:35:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=HwnSY1Q3GH1JkjfX2Mu3liO1MG8cEUZSkwS3Xs6cPJ8=; b=V+Hj5Qt2ZQRNrq8Cjo3j9RdWdH8yPYiJUZsppmSuqrUsV7Mir2V8JzTMwn0PApNMig Ty/fFr6mnS7BW14l2oA6cgRGKtx4JafZ9H4BDZfKkHHJRFvoC9RnqYIBK/GVdA02qcLG rNMV7k5w+opqlGYpEtZHCAXW6Z5H0oimEyBVg= MIME-Version: 1.0 Received: by 10.42.177.133 with SMTP id bi5mr10726317icb.40.1329528921183; Fri, 17 Feb 2012 17:35:21 -0800 (PST) Received: by 10.231.61.1 with HTTP; Fri, 17 Feb 2012 17:35:21 -0800 (PST) Received: by 10.231.61.1 with HTTP; Fri, 17 Feb 2012 17:35:21 -0800 (PST) In-Reply-To: <4F3EE5A1.80407@aldan.algebra.com> References: <4F3E289D.9050605@FreeBSD.org> <4F3E2CED.90601@FreeBSD.org> <4F3E3537.9040105@FreeBSD.org> <1329478316415-5492205.post@n5.nabble.com> <4F3E5D41.9050503@aldan.algebra.com> <4F3EBF4F.6010401@aldan.algebra.com> <4F3EE5A1.80407@aldan.algebra.com> Date: Fri, 17 Feb 2012 19:35:21 -0600 Message-ID: From: Zhihao Yuan To: "Mikhail T." Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Jakub Lach , freebsd-ports@freebsd.org Subject: Re: Library numbers in LIB_DEPENDS considered harmful (Re: recent portrevision bump for libvpx) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Feb 2012 01:35:22 -0000 On Feb 17, 2012 5:41 PM, "Mikhail T." wrote: > > On 17.02.2012 17:05, Zhihao Yuan wrote: >> >> LIB_DEPENDS= png.6: or =png: does not affect how the lib got linked. > > Allow me to rephrase my argument from a different perspective... > > The language used in our ports' Makefiles is, largely, declarative -- various things are declared and then bsd.port.mk (and friends) interpret them to do the right thing. > > Each declaration is meant to say something, so let's examine, what a LIB_DEPENDS entry declares: >> >> LIB_DEPENDS= foo.V:${PORTSDIR}/cat/libfoo > > The above line says, that this port needs a shared library libfoo.so.V to be installed. It also says, how to install it, if it is not already present at build-time. > > If, in fact, the current port does not care, which version of libfoo is uses -- and most software does not -- then declaring an explicit V is wrong: it gratuitously tightens the build-time requirements. Unless a particular version is, indeed, required, the above line should read simply: >> >> LIB_DEPENDS= foo:${PORTSDIR}/cat/libfoo > > Let's say, you sent someone to buy a bottle of dry red wine in a store. Wouldn't you be (unpleasantly) surprised, if he returned empty-handed, because the store did not have any Californian Pinot Noir of the 2003 vintage? Huh? You did not ask for Pinot Noir. You did not specify the origin nor the year either -- why did not he get something else that matched your much wider and easier-to-satisfy requirement: "dry red wine"? So what, I come to your bar and say "10 year red wine" in1998, you give me a 1988 one. And I went your place again in 2008, and say "same wine", and you give me a 1998 one? > > A similar thing happens here: if the, say, vlc software needs libx264 to be available at build time, the FreeBSD port of vlc should not add a requirement of a particular version to that. >> >> -mi