From owner-freebsd-ports@FreeBSD.ORG Sat Nov 2 19:05:13 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9C221A73; Sat, 2 Nov 2013 19:05:13 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-pb0-x231.google.com (mail-pb0-x231.google.com [IPv6:2607:f8b0:400e:c01::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 662C92397; Sat, 2 Nov 2013 19:05:13 +0000 (UTC) Received: by mail-pb0-f49.google.com with SMTP id xb4so5568990pbc.22 for ; Sat, 02 Nov 2013 12:05:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=sOjAuBn5YAmUn/k5fPDkqkqjGO4BWSiWJoeCBtHUyHU=; b=zjnBTIFGpvqPvlmjvSPfCWLa1NRrgAj9NmsEwi2P2gzx4UQQM1+dcsX2x8TpzySXxR ROjle7FIpRneJawTbL/yW+OedQSAvtBlzxDvc/L0bv0fJRrwMrnF+ydOxQvpGI9OALhS 0SB0iwIJ8dHfjCopKwwL0ZJbicrkfxQ02gZthpZkMbZF+TrkD2m95MYyZ/0Hd9ktWnkV JZXXeND0PQIPM2w4dB90mjY9QCj3DDlOR9LMbJSjKWBW+g58IWdyn1Lo44liI3dy8HGa 23Vf4NZ8cqkbHZItnI3bay9IY1M2OEaDRavKqCsafa67vtQVrH+GTXBGGzLvFfXDRcoF QWqg== MIME-Version: 1.0 X-Received: by 10.68.203.164 with SMTP id kr4mr9424130pbc.48.1383419113004; Sat, 02 Nov 2013 12:05:13 -0700 (PDT) Sender: kob6558@gmail.com Received: by 10.67.23.101 with HTTP; Sat, 2 Nov 2013 12:05:12 -0700 (PDT) In-Reply-To: <20131101095757.3f1a3913@kalimero.tijl.coosemans.org> References: <20131101095757.3f1a3913@kalimero.tijl.coosemans.org> Date: Sat, 2 Nov 2013 12:05:12 -0700 X-Google-Sender-Auth: Ti0qLSIKA4IioOx38C61K_yMWC4 Message-ID: Subject: Re: Problems dealing with ports use of pkgconf From: Kevin Oberman To: Tijl Coosemans Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: sbz@freebsd.org, FreeBSD Ports ML X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Nov 2013 19:05:13 -0000 On Fri, Nov 1, 2013 at 1:57 AM, Tijl Coosemans wrote: > On Wed, 30 Oct 2013 11:46:30 -0700 Kevin Oberman wrote: > > I have run into a dilemma in regards to the use of pkgconf in ports. Here > > is what has bitten me: > > To allow sftp to get files, multimedia/vlc uses libssh2. libssh2, in > turn, > > uses openssl or the GNU crypto library. > > If i have installed securith/openssl, all is well, but I don't want of > need > > the security/openssl port. > > If I have not installed openssl from ports, vlc fails! Here is why: > > > > libssh2 creates a .pc file to allow other packages to know whether it > uses > > openssl or libgcrypt. this is a nice thing, but it makes the common > > assumption that openssl is only there if the package has been installed. > I > > believe that is is the case for Linux. Not so for FreeBSD. vlc uses > > pkgconf to check on whether all required libraries are installed for > > libssh2. I finds that libssh2 requires libssl: > > Requires.private: libssl,libcrypto > > It then checks to see if these are installed. Since libssl is not > > installed, it bails on the error. (I believe that it shoudl be "Required: > > rather than Requires.private:, but that has no impact on the problem. > > > > Since FreeBSD ports have already checked the dependencies before > building a > > port, I think such checks should be removed from ports, but I'm not > > familiar enough with the real-world implications of this to know if it is > > the right way to go. If it is, I'll can submit a patch for vlc. I > suspect, > > after reading the developers comments, that libssh2 developers will not > > want to remove their recent changes in this area. > > This line: > > Requires.private: libssl,libcrypto > > Would have to be changed into: > > Libs.private: -lssl -lcrypto > > See http://people.freedesktop.org/~dbn/pkg-config-guide.html > > (Maintainer CCed) > Tijl, Thanks so much. After reading the documentation at freedesktop.org, I was still rather unclear on some details. The "friendly" presentation in that link is much clearer, especially the choice between plain and "private" forms which was a bit fuzzy to me. Now to this specific issue. It appears that this is specific to non-Linux ports. With Linux it is "safe" to assume that libssl and libcrypto both support .pc files, making "Requires.private" appropriate. Since the base system libssl and libcrypto are not packages on FreeBSD, converting libssh2 (and other ports that use pkg-config and these libraries, if any), the ports should probably be modified to switch the .pc files created to use the Libs[.private] form. It is probably not something that will be accepted by upstreams, but I guess we could try. Does this make sense? Am I actually stating to grasp this stuff? -- R. Kevin Oberman, Network Engineer E-mail: rkoberman@gmail.com