ports/51283: expat2 port fails to configure

Charles Swiger cswiger at mac.com
Tue Apr 22 18:50:20 UTC 2003


The following reply was made to PR ports/51283; it has been noted by GNATS.

From: Charles Swiger <cswiger at mac.com>
To: freebsd-gnats-submit at FreeBSD.org
Cc:  
Subject: Re: ports/51283: expat2 port fails to configure
Date: Tue, 22 Apr 2003 14:50:11 -0400

 On Tuesday, April 22, 2003, at 01:16 PM, Anton Berezin wrote:
 [ ... ]
 > The majority (hopefully, all) of the binaries used by the ports
 > collection has corresponding make variables, for example LS, ID, FIND,
 > and so on.  I am not sure that changing this practice to adjust to
 > habits of a single FreeBSD user is a good idea.
 
 I don't expect FreeBSD to adjust something which works to cater to 
 individual preferences, even if those preferences are mine.  :-)
 
 However, the way the UNAME environment variable is handled under the 
 ports is somewhat more prone to failure than, say, setting MAKE.  Even 
 if I export "MAKE=foobar", /usr/bin/make will override my setting with 
 something appropriate and the build works fine.
 
 > That said, there are several possible solutions for you.
 >
 > One is to actually *define* a UNAME make variable to be /usr/bin/uname
 > in your /etc/make.conf.  Due to the way make(1) operates, it will 
 > ignore
 > your shell UNAME variable in this case.  In this way you will still 
 > have
 > UNAME to be whatever it is you like it to be in the SHELL, but not
 > inside makefiles.
 >
 > Another possibility, which I do not personally like, is to modify
 > bsd.port.mk to use, for instance, UNAME_CMD instead of UNAME.
 
 The solution of unsetting UNAME is "good enough".  Setting UNAME in 
 /etc/make.conf, or for that matter, doing a "ln -s /usr/sbin/uname 
 /usr/local/bin/FreeBSD" would also work-- albeit the latter is even 
 more of a hack than overriding UNAME.
 
 However, it would be nice if /usr/ports/Mk/bsd.port.mk was smart enough 
 to test whether UNAME exists and is executable before trying to invoke 
 $UNAME as a program:
 
 # /bin/sh syntax
 if [ ! -x "$UNAME" ]; then
    UNAME=/usr/sbin/uname
    export UNAME
 fi
 
 Also, I would suggest that the fact that $UNAME is significant to the 
 ports collection really ought to be mentioned in "man 7 ports".
 
 Thanks for your time and responses,
 -Chuck
 



More information about the freebsd-ports-bugs mailing list