Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jan 2005 10:27:23 -0500
From:      Frank Laszlo <laszlof@tvog.net>
To:        "Conrad J. Sabatier" <conrads@cox.net>
Cc:        Kris Kennaway <kris@obsecurity.org>
Subject:   Re: Bug in ports system's DISTFILES handling?
Message-ID:  <41F11F5B.9020507@tvog.net>
In-Reply-To: <20050121065110.100b445f@dolphin.local.net>
References:  <20050117131440.2486ac2a@dolphin.local.net> <41EC175F.8060805@tvog.net>	<20050117225702.GA31708@xor.obsecurity.org> <20050119005427.70f7b3ac@dolphin.local.net>	<20050119072607.GJ1033@k7.mavetju> <20050121065110.100b445f@dolphin.local.net>

next in thread | previous in thread | raw e-mail | index | archive | help

Conrad J. Sabatier wrote:

>On Wed, 19 Jan 2005 18:26:07 +1100, Edwin Groothuis <edwin@mavetju.org>
>wrote:
>
>  
>
>>On Wed, Jan 19, 2005 at 12:54:27AM -0600, Conrad J. Sabatier wrote:
>>    
>>
>>>This just seems less than intuitive, if you ask me, especially given
>>>that the += operator does work with other variables without
>>>requiring the explicit definition of an initial value first.
>>>      
>>>
>>Euhm... you need to keep a couple of things seperated:
>>
>>- The ports framework (bsd.port.mk) consists of two parts: 
>>
>>    - One to set the basic variables which are not directly port
>>      related, for example OSVERSION, WANT_GNOME and LOCALBASE.
>>      This is called "bsd.port.pre.mk".
>>
>>    - One to set the basic variables which are directly port
>>      related, for example LIB_DEPENDS and the pre/do/post targets.
>>      This is called "bsd.port.post.mk".
>>
>>The definition of DISTFILES itself is defined in the second part.
>>Why? I don't know. It shouldn't have, because all the necessary
>>information to build DISTFILES (DISTNAME and EXTRACT_SUFX) are
>>defined in the "bsd.port.pre.mk" part.
>>
>>    
>>
>>>I mean, if this were something that was consciously decided on,
>>>that's one thing, but the lack of consistency would seem to indicate
>>>that it's just not as well implemented as it could/should be.
>>>      
>>>
>>I wouldn't go that far. I don't think you're the first who steps
>>into this problem and goes "euhm... this doesn't make sense", but
>>I think you're the first who goes "euhm... guys! this doesn't make
>>sense!"
>>
>>For example see biology/garlic:
>>    DISTFILES=      ${DISTNAME}${EXTRACT_SUFX}
>>    .if !defined(NOPORTDOCS)
>>    DISTFILES+=     ${DISTNAME}-doc${EXTRACT_SUFX}
>>    .endif
>>
>>I won't say that 
>>    -DISTFILES=     ${DISTNAME}${EXTRACT_SUFX}
>>     .if !defined(NOPORTDOCS)
>>     DISTFILES+=    ${DISTNAME}-doc${EXTRACT_SUFX}
>>     .endif
>>should work, but I would say that:
>>    -DISTFILES=     ${DISTNAME}${EXTRACT_SUFX}
>>    +.include <bsd.port.pre.mk>
>>     .if !defined(NOPORTDOCS)
>>     DISTFILES+=     ${DISTNAME}-doc${EXTRACT_SUFX}
>>     .endif
>>should work.
>>
>>Or even:
>>     DISTFILES=      ${DISTNAME}${EXTRACT_SUFX}
>>     .if !defined(NOPORTDOCS)
>>    +EXTRA_DISTFILES+=${DISTNAME}-doc${EXTRACT_SUFX}
>>     .endif
>>which would work as EXTRA_PATCHES.
>>
>>Or to make it easiest of all:
>>    -DISTFILES=      ${DISTNAME}${EXTRACT_SUFX}
>>    +DISTFILES=      ${DEFAULTDISTFILE}
>>     .if !defined(NOPORTDOCS)
>>     DISTFILES+=     ${DISTNAME}-doc${EXTRACT_SUFX}
>>     .endif
>>and then DEFAULTDISTFILE is in the "bsd.port.pre.mk" defined. This
>>way it's easy to for the Makefile of chinese/xcin25:
>>    DISTFILES=      ${DEFAULTDISTFILE}
>>    chewing-2002Jan07-snapshot.tar.gz
>>No confusion about things here.
>>
>>I would go for the last one, and volunteer to send patches when
>>there is some consensus.
>>    
>>
>
>Yes, I like that last version, too.  I say go for it.  :-)
>  
>

*nod*


__________________________________________________
Frank Laszlo
System Administrator
The VonOstin Group
Email:  laszlof@tvog.net
WWW:    http://www.vonostingroup.com
Mobile: 248-863-7584





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41F11F5B.9020507>