Check-in [17a7fbab32]
Overview
Comment:Updated to deal with dependencies better and specifiy libdir explicitly
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | packages
Files: files | file ages | folders
SHA1:17a7fbab32efae58f686510f185aac6ebad8cf5d
User & Date: rkeene on 2014-11-11 05:37:42
Other Links: manifest | tags
Context
2014-11-12
07:00
Updated to not cleanup work directory if build fails and created a function to configure gcc check-in: 7c62241f33 user: rkeene tags: packages
2014-11-11
05:37
Updated to deal with dependencies better and specifiy libdir explicitly check-in: 17a7fbab32 user: rkeene tags: packages
2014-11-06
18:29
Fixed header install path check-in: a2946d9090 user: rkeene tags: packages
Changes

Modified build from [f1041debf1] to [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() {

Added pkgs/gcc version [ef2bd3b72e].

            1  +#! /usr/bin/env bash
            2  +
            3  +version=4.9.2
            4  +url="http://ftp.gnu.org/gnu/gcc/gcc-${version}/gcc-${version}.tar.gz"
            5  +domain=core.appfs.rkeene.org
            6  +sha256='3e573826ec8b0d62d47821408fbc58721cd020df3e594cd492508de487a43b5e'
            7  +require=(zlib binutils:PATH linux-headers/2.6.32.63)
            8  +configure_extra=(--disable-multilib)