Configure & build environment flags

Emmanuel Hainry ehainry at
Tue Jun 26 01:17:07 PDT 2007

Citando Ryan Schmidt :
>  I don't know about all that. All I know is that the whois port needs it. The 
>  whois port does not use configure. And in order to find the gettext headers 
>  and libraries, the portfile says:
>  build.env \
>          CFLAGS="-DENABLE_NLS -I${prefix}/include" \
>          LDFLAGS="-L${prefix}/lib -lintl"
>  I had changed this at one point (r25698) to:
>  build.cflags-append -DENABLE_NLS
>  build.ldflags-append -lintl
>  because I assumed that would work. It didn't. So, the rationale for having 
>  build.*flags-(append|delete) is that it is consistent with 
>  configure.*flags-(append|delete) and thus makes life easier on port authors.
>  As to all you've written about flag inheritance and other related issues, I 
>  don't know about any of that. Though in the case of whois, at least, since 
>  there is no configure stage, I think it's irrelevant.

Isn't it simpler in this case to use reinplace in the Portfile to update
the LDFLAGS and CFLAGS lines in the Makefile? It more or less means
uncommenting the FreeBSD stuff and replacing usr by opt and adding the
-DSTUFF. And it is what the normal user would do to compile this
manually. As there already are reinplace in whois' Portfile (that set
prefix and tell to install in destroot), that seems the simpler
solution. Am I wrong on that?


More information about the macports-dev mailing list