diff options
-rwxr-xr-x | scripts/builder/build-package | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/scripts/builder/build-package b/scripts/builder/build-package index af70e01..c57a209 100755 --- a/scripts/builder/build-package +++ b/scripts/builder/build-package @@ -21,6 +21,11 @@ exit_cleanup() } trap exit_cleanup EXIT +pkg_prep() +{ + return +} + pkg_compile() { # FIXME these defaults need moved elsewhere @@ -36,7 +41,15 @@ pkg_compile() make ${MAKE_OPTS} && make DESTDIR="${D}" install } -eval $(build-query --environ "${1}") +# pkgconfig can be a right pita... +PKG_CONFIG_LIBDIR="${SYSROOT}/usr/share/pkgconfig:${SYSROOT}/usr/lib/pkgconfig" +export PKG_CONFIG_LIBDIR PKG_CONFIG_PATH +export PKG_CONFIG_SYSROOT_DIR="${SYSROOT}" + +# Don't pass along the builder jobcontrol data to child processes +unset MAKEFLAGS + +import "${1}" ## Cleanup the build build environment for dir in "${S}" "${D}"; do @@ -46,6 +59,7 @@ for dir in "${S}" "${D}"; do mv "${dir}" "${dir}.old" find "${dir}.old" -delete & done +unset dir echo "prepping: ${1}" mkenv "prep" @@ -73,6 +87,8 @@ else done fi +cd "${W}" && pkg_prep >> "${PKG_LOGFILE}" 2>&1 + # FIXME wrap up the patch command with something more functional if [ ! -z "${PATCHES}" ]; then for patch in ${PATCHES}; do @@ -92,16 +108,6 @@ eval "$(build-query --toolchain "${CHOST}")" mkenv "compile" PKG_LOGFILE="${L}/compile.log" -# pkgconfig can be a right pita... -PKG_CONFIG_LIBDIR="${SYSROOT}/usr/share/pkgconfig:${SYSROOT}/usr/lib/pkgconfig" -export PKG_CONFIG_LIBDIR PKG_CONFIG_PATH -export PKG_CONFIG_SYSROOT_DIR="${SYSROOT}" - -# Don't pass along the builder jobcontrol data to child processes -unset MAKEFLAGS - -import "${1}" - ## Prep the build environment # Technically much of this should have been done in build-prep, and this sort # of duplication of work may be useful to make a function within the top-level |