From owner-freebsd-ports@FreeBSD.ORG Mon Oct 29 13:04:01 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E4BD24B for ; Mon, 29 Oct 2012 13:04:01 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from forward17.mail.yandex.net (forward17.mail.yandex.net [IPv6:2a02:6b8:0:1402::2]) by mx1.freebsd.org (Postfix) with ESMTP id 176308FC0A for ; Mon, 29 Oct 2012 13:04:00 +0000 (UTC) Received: from smtp17.mail.yandex.net (smtp17.mail.yandex.net [95.108.252.17]) by forward17.mail.yandex.net (Yandex) with ESMTP id A70E4106094F; Mon, 29 Oct 2012 17:03:58 +0400 (MSK) Received: from smtp17.mail.yandex.net (localhost [127.0.0.1]) by smtp17.mail.yandex.net (Yandex) with ESMTP id 703711900401; Mon, 29 Oct 2012 17:03:58 +0400 (MSK) Received: from unknown (unknown [213.138.80.247]) by smtp17.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 3vK0jKEY-3vKacSHA; Mon, 29 Oct 2012 17:03:58 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1351515838; bh=0zWI7orllZKDHcuS9myWbDdcg25sXRKyvVNRmkkz2QQ=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=pI0o9pnMQWrO2uAzNnS6JbPPxb1xipUNzwB8exCGVJQ4W/P7sVr5bebFiHL/pk93e I1fDVySLKLPTb3Dt8vayr0Rv9dmw0pfFnrsEgV5v3HPk19UcJPTY6TTU/JSrMzOFl9 2aHXY8nxboLLJjC12Jkp8PPW5FrWZn70isPOdqgM= Message-ID: <508E7E92.10608@yandex.ru> Date: Mon, 29 Oct 2012 17:03:14 +0400 From: Ruslan Mahmatkhanov User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:16.0) Gecko/20121024 Thunderbird/16.0.1 MIME-Version: 1.0 To: Rainer Hurling Subject: Re: lib name on LIB_DEPENDS References: <508D5370.6080404@gwdg.de> <508E35E2.6050702@yandex.ru> <508E5BC1.7000008@gwdg.de> In-Reply-To: <508E5BC1.7000008@gwdg.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: =?ISO-8859-1?Q?Lucas_Sali=E9s_Brum?= , freebsd-ports@freebsd.org 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: Mon, 29 Oct 2012 13:04:01 -0000 Rainer Hurling wrote on 29.10.2012 14:34: > Am 29.10.2012 08:53 (UTC+1) schrieb Ruslan Mahmatkhanov: >> Rainer Hurling wrote on 28.10.2012 19:46: >>> On 28.10.2012 16:12 (UTC+2), Lucas Saliés Brum wrote: >>>> Hello all! >>>> This is my first e-mail that list. >>>> >>>> I'm having problems with a new port that I'm trying to create. >>>> http://paste.sistematico.org/14 >>>> >>>> # make install >>>> ... >>>> ===> Registering installation for py27-feedparser-5.1.2 >>>> ===> Returning to build of cgmail-0.6.2 >>>> Error: shared library "feedparser" does not exist >>>> *** [lib-depends] Error code 1 >>>> >>>> Stop in /usr/home/lucas/apps/ports/cgmail. >>>> >>>> What name should I use LIB_DEPENDS= >>>> [HERE]:${PORTSDIR}/textproc/py-feedparser ? >>> >>> textproc/py-feedparser does not install any library, so you need to test >>> the presence of the python script, installed by this port: >>> >>> /usr/local/lib/python2.7/site-packages/feedparser.py >>> >>> To be path and version independent you should use something like >>> >>> ${PYTHON_SITELIBDIR}/feedparser.py:${PORTSDIR}/textproc/py-feedparser >> >> Please note that using >> ${PYTHON_PKGNAMEPREFIX}feedparser>0:${PORTSDIR}/textproc/py-feedparser >> >> is preferable. >> > > Thanks for this info. I wasn't sure about what is best to use in > 'DEPENDS' lines. > > Do I understand it right, that '${PYTHON_PKGNAMEPREFIX}feedparser>0' > tests directly, if the port py27-feedparser is installed and > '${PYTHONPREFIX_SITELIBDIR}/feedparser.py would test, if the file > 'feedparser.py' exists in the path '${PYTHONPREFIX_SITELIBDIR}'? (better > than '${PYTHON_SITELIBDIR}'? Yes, you understanding it right. ${PYTHON_PKGNAMEPREFIX} will accept any value according to what PYTHON_DEFAULT_VERSION is set in user's environment (py27-, py26-, py32- etc). The main difference over using PYTHON_SITELIBDIR is that it will work correctly if/when dependent port will be switched to egg-install. In fact it works fine for both egg-installed ports, and with distutils-installed ones. And hardcoding dependency on some file is ugly, imho. Your package needs another package, so why should it bother to which file in filesystem it depends? Dropping SITELIBDIR usage is a common trend in ports tree - perl and ruby ports do the same. > > In PH, chapter 6.14, three cases are mentioned: > > (1) PYTHON_PKGNAMEPREFIX > Used as a PKGNAMEPREFIX to distinguish packages for different Python > versions. Example: py24- > > (2) PYTHON_SITELIBDIR > Location of the site-packages tree, that contains installation path of > Python (usually LOCALBASE). The PYTHON_SITELIBDIR variable can be very > useful when installing Python modules. > > (3) PYTHONPREFIX_SITELIBDIR > The PREFIX-clean variant of PYTHON_SITELIBDIR. Always use > %%PYTHON_SITELIBDIR%% in pkg-plist when possible. The default value of > %%PYTHON_SITELIBDIR%% is lib/python%%PYTHON_VERSION%%/site-packages I'm not sure what the difference among (2) and (3). They looking the same for me. Never used (3) and see no problem. Can't tell you more at the moment, it needs to digging into bsd.python.mk. -- Regards, Ruslan Tinderboxing kills... the drives.