Index: build ================================================================== --- build +++ build @@ -82,10 +82,18 @@ local pkgdir pkgconfigdir pkgfound for pkg in "${require[@]}"; do pkgdomain='' pkgversion='' + pkgchanges=(CFLAGS LDFLAGS PATH PKG_CONFIG_PATH) + + case "${pkg}" in + *:*) + pkgchanges=($(echo "${pkg}" | cut -f 2 -d ':')) + pkg="$(echo "${pkg}" | cut -f 1 -d ':')" + ;; + esac case "${pkg}" in */*@*) pkgdomain="$(echo "${pkg}" | cut -f 2 -d '@')" pkgversion="$(echo "${pkg}" | cut -f 2 -d '/' | cut -f 1 -d '@')" @@ -111,21 +119,33 @@ if [ -d "${pkgdir}" ]; then pkgfound='1' fi - CFLAGS="${CFLAGS} -I${pkgdir}/include" - CPPFLAGS="${CPPFLAGS} -I${pkgdir}/include" - LDFLAGS="${LDFLAGS} -L${pkgdir}/lib -Wl,-rpath,${pkgdir}/lib" - PATH="${PATH}:${pkgdir}/bin" - export CFLAGS CPPFLAGS LDFLAGS PATH - - if [ -d "${pkgconfigdir}" ]; then - PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${pkgconfigdir}" - export PKG_CONFIG_PATH - fi - + for pkgchange in "${pkgchanges[@]}"; do + case "${pkgchange}" in + CFLAGS) + CFLAGS="${CFLAGS} -I${pkgdir}/include" + CPPFLAGS="${CPPFLAGS} -I${pkgdir}/include" + export CFLAGS CPPFLAGS + ;; + LDFLAGS) + LDFLAGS="${LDFLAGS} -L${pkgdir}/lib -Wl,-rpath,${pkgdir}/lib" + export LDFLAGS + ;; + PATH) + PATH="${PATH}:${pkgdir}/bin" + export PATH + ;; + PKG_CONFIG_PATH) + if [ -d "${pkgconfigdir}" ]; then + PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${pkgconfigdir}" + export PKG_CONFIG_PATH + fi + ;; + esac + done done if [ "${pkgfound}" = '0' ]; then die "Package ${pkg}/${pkgversion:-*}@${pkgdomain} not found." fi @@ -164,25 +184,23 @@ function postconfigure() { : } function configure() { - glibcvers=2.20 - glibcdir="/opt/appfs/core.appfs.rkeene.org/glibc/platform/${glibcvers}" + glibcdir="/opt/appfs/core.appfs.rkeene.org/glibc/platform/latest" dynlinker="$(ls "${glibcdir}"/lib/ld-linux*.so.* | tail -n 1)" - if [ ! -d "${glibcdir}" ]; then + if [ ! -f "${dynlinker}" ]; then die 'glibc directory is not available (appfs running/working?)' fi - CFLAGS="${CFLAGS} -I${glibcdir}/include" - CPPFLAGS="${CPPFLAGS} -I${glibcdir}/include" + CC="${CC:-gcc} -nostdinc -I${glibcdir}/include" LDFLAGS="${LDFLAGS} -Wl,--rpath,${glibcdir}/lib -Wl,--dynamic-linker,${dynlinker}" PKG_CONFIG_LIBDIR="${glibcdir}/lib/pkgconfig" - export CFLAGS CPPFLAGS LDFLAGS PKG_CONFIG_LIBDIR + export LDFLAGS PKG_CONFIG_LIBDIR - ./configure --prefix="${prefix}" --sysconfdir=/etc --localstatedir=/var "${configure_extra[@]}" + ./configure --prefix="${prefix}" --sysconfdir="${prefix}/etc" --libdir="${prefix}/lib" --localstatedir=/var "${configure_extra[@]}" } function prebuild() { : } ADDED pkgs/gcc Index: pkgs/gcc ================================================================== --- /dev/null +++ pkgs/gcc @@ -0,0 +1,8 @@ +#! /usr/bin/env bash + +version=4.9.2 +url="http://ftp.gnu.org/gnu/gcc/gcc-${version}/gcc-${version}.tar.gz" +domain=core.appfs.rkeene.org +sha256='3e573826ec8b0d62d47821408fbc58721cd020df3e594cd492508de487a43b5e' +require=(zlib binutils:PATH linux-headers/2.6.32.63) +configure_extra=(--disable-multilib)