Diff

Differences From Artifact [f1041debf1]:

To Artifact [defad12737]:


    80     80   function verifyRequiredPackages() {
    81     81   	local pkg pkgdomain pkgversion
    82     82   	local pkgdir pkgconfigdir pkgfound
    83     83   
    84     84   	for pkg in "${require[@]}"; do
    85     85   		pkgdomain=''
    86     86   		pkgversion=''
           87  +		pkgchanges=(CFLAGS LDFLAGS PATH PKG_CONFIG_PATH)
           88  +
           89  +		case "${pkg}" in
           90  +			*:*)
           91  +				pkgchanges=($(echo "${pkg}" | cut -f 2 -d ':'))
           92  +				pkg="$(echo "${pkg}" | cut -f 1 -d ':')"
           93  +				;;
           94  +		esac
    87     95   
    88     96   		case "${pkg}" in
    89     97   			*/*@*)
    90     98   				pkgdomain="$(echo "${pkg}" | cut -f 2 -d '@')"
    91     99   				pkgversion="$(echo "${pkg}" | cut -f 2 -d '/' | cut -f 1 -d '@')"
    92    100   				pkg="$(echo "${pkg}" | cut -f 1 -d '/')"
    93    101   				;;
................................................................................
   109    117   		for pkgdir in "/opt/appfs/${pkgdomain}/${pkg}/platform"/${pkgversion:-*}; do
   110    118   			pkgconfigdir="${pkgdir}/lib/pkgconfig"
   111    119   
   112    120   			if [ -d "${pkgdir}" ]; then
   113    121   				pkgfound='1'
   114    122   			fi
   115    123   
   116         -			CFLAGS="${CFLAGS} -I${pkgdir}/include"
   117         -			CPPFLAGS="${CPPFLAGS} -I${pkgdir}/include"
   118         -			LDFLAGS="${LDFLAGS} -L${pkgdir}/lib -Wl,-rpath,${pkgdir}/lib"
   119         -			PATH="${PATH}:${pkgdir}/bin"
   120         -			export CFLAGS CPPFLAGS LDFLAGS PATH
   121         -
   122         -			if [ -d "${pkgconfigdir}" ]; then
   123         -				PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${pkgconfigdir}"
   124         -				export PKG_CONFIG_PATH
   125         -			fi
   126         -
          124  +			for pkgchange in "${pkgchanges[@]}"; do
          125  +				case "${pkgchange}" in
          126  +					CFLAGS)
          127  +						CFLAGS="${CFLAGS} -I${pkgdir}/include"
          128  +						CPPFLAGS="${CPPFLAGS} -I${pkgdir}/include"
          129  +						export CFLAGS CPPFLAGS
          130  +						;;
          131  +					LDFLAGS)
          132  +						LDFLAGS="${LDFLAGS} -L${pkgdir}/lib -Wl,-rpath,${pkgdir}/lib"
          133  +						export LDFLAGS
          134  +						;;
          135  +					PATH)
          136  +						PATH="${PATH}:${pkgdir}/bin"
          137  +						export PATH
          138  +						;;
          139  +					PKG_CONFIG_PATH)
          140  +						if [ -d "${pkgconfigdir}" ]; then
          141  +							PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${pkgconfigdir}"
          142  +							export PKG_CONFIG_PATH
          143  +						fi
          144  +						;;
          145  +				esac
          146  +			done
   127    147   		done
   128    148   
   129    149   		if [ "${pkgfound}" = '0' ]; then
   130    150   			die "Package ${pkg}/${pkgversion:-*}@${pkgdomain} not found."
   131    151   		fi
   132    152   	done
   133    153   }
................................................................................
   162    182   }
   163    183   
   164    184   function postconfigure() {
   165    185   	:
   166    186   }
   167    187   
   168    188   function configure() {
   169         -	glibcvers=2.20
   170         -	glibcdir="/opt/appfs/core.appfs.rkeene.org/glibc/platform/${glibcvers}"
          189  +	glibcdir="/opt/appfs/core.appfs.rkeene.org/glibc/platform/latest"
   171    190   	dynlinker="$(ls "${glibcdir}"/lib/ld-linux*.so.* | tail -n 1)"
   172    191   
   173         -	if [ ! -d "${glibcdir}" ]; then
          192  +	if [ ! -f "${dynlinker}" ]; then
   174    193   		die 'glibc directory is not available (appfs running/working?)'
   175    194   	fi
   176    195   
   177         -	CFLAGS="${CFLAGS} -I${glibcdir}/include"
   178         -	CPPFLAGS="${CPPFLAGS} -I${glibcdir}/include"
          196  +	CC="${CC:-gcc} -nostdinc -I${glibcdir}/include"
   179    197   	LDFLAGS="${LDFLAGS} -Wl,--rpath,${glibcdir}/lib -Wl,--dynamic-linker,${dynlinker}"
   180    198   	PKG_CONFIG_LIBDIR="${glibcdir}/lib/pkgconfig"
   181         -	export CFLAGS CPPFLAGS LDFLAGS PKG_CONFIG_LIBDIR
          199  +	export LDFLAGS PKG_CONFIG_LIBDIR
   182    200   
   183         -	./configure --prefix="${prefix}" --sysconfdir=/etc --localstatedir=/var "${configure_extra[@]}"
          201  +	./configure --prefix="${prefix}" --sysconfdir="${prefix}/etc" --libdir="${prefix}/lib" --localstatedir=/var "${configure_extra[@]}"
   184    202   }
   185    203   
   186    204   function prebuild() {
   187    205   	:
   188    206   }
   189    207   
   190    208   function postbuild() {