[[ Note that all of Luc's comments apply to the specfile stuff as well, since 
that is derived from the pspc work we did earlier. And agreeeing with him 
everywhere, just adding clarification. ]]

On Monday 20 October 2008 14:41:45 Lukas Oboril wrote:
> In qt.pspc is re-defined _prefix to /opt/foss/qt4 (instead of default
> /opt/foss) .... this automaticaly propagates changes to exported
> variable $PREFIX which has /opt/foss/qt4 now too. In this case
> variables like $_libdir $_includedir and so on ... are pointing to
> $PREFIX/lib >>> in result ... to /opt/foss/qt4/lib. 

In other words, $PREFIX (%_prefix) is the root of $_libdir (%_libdir) and 
others; the paths that are not-dependent on PREFIX have their own name 
prefixes, like $_foss_libdir or $_sys_lib (or is it $sys_lib? it's not 
entirely consistent, anyway, but the general direction is clear).

> If you would use
> static variable which points always to /opt/foss/lib or
> /opt/foss/include then you have to use $_foss_lib or $_foss_include,
> these are static.

Right. In particular the use of $_libdir in Qt's configure.sh will point to 
/opt/foss/qt4/lib$_platform_suffix/ -- which is not necessarily what you want 
if you are are interested in the installed FOSS stuff.

Remember, the scripts are supposed to run in the context of either a pspc 
build or a specfile build; these *both* set up the environment.

> If you would use PKG_CONFIG_PATH, you don't have to setup this
> variable, becuase is exported by default like this. (Particular paths
> for each platform, this is for AMD64)

Exactly. This is part of the environment setup done by the specfile or pspc 
context. Just like they set up CPPFLAGS and all the rest; those really 
shouldn't be futzed with within the scripts themselves. One thing I noticed is 
the -D__STDC_ISO_10646__ in Qt's configure.sh -- that one is new to me and not 
in the flags defined in the pspc or specfile context.

> + export
> PKG_CONFIG_PATH=/opt/foss/qt4/lib/amd64/pkgconfig:/opt/foss/lib/amd64/pkgco
>nfig:/usr/lib/amd64/pkgconfig +
> PKG_CONFIG_PATH=/opt/foss/qt4/lib/amd64/pkgconfig:/opt/foss/lib/amd64/pkgco
>nfig:/usr/lib/amd64/pkgconfig
>
> This is done by Respect.pl by default (always) and should be defined
> in some *.inc file (probably path.inc) in near future. If you would
> different one, then you have to re-defined in configure.sh or
> build.sh.

I have already added a foss_pkg_config_path and a kde_* variable to paths.inc 
in the specfile context; this is used to set PKG_CONFIG_PATH.


[ade]

Reply via email to