X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=functions%2Fipkg;h=9de17281c347bdb6239c9e02fab47b97db25ae18;hb=eab0363888c361ccd0dd37de76f0634239f12ffa;hp=8ac0a099ed8c35bc006c8deff39654103486e22e;hpb=d7a417770bd51ea6e9adbfeb588959c81d05d023;p=hvlinux.git diff --git a/functions/ipkg b/functions/ipkg index 8ac0a09..9de1728 100644 --- a/functions/ipkg +++ b/functions/ipkg @@ -66,6 +66,14 @@ hvconfig() # accept the default configuration. perl Makefile.PL -n ${CONFIGURE_OPTS} else + if [ ! -f ${LFS_TMP}/${PACKAGE}/configure ]; then + if [ -f ${LFS_TMP}/${PACKAGE}/configure.in -o \ + -f ${LFS_TMP}/${PACKAGE}/configure.ac ]; then + # Try to automatically generate missing configure script. + autoreconf -vi + fi + fi + # Standard configure script ${LFS_TMP}/${PACKAGE}/configure ${CONFIGURE_OPTS} fi @@ -125,9 +133,11 @@ ipkg_script() if [ $# -eq 1 ]; then # Use supplied script name PACKAGE_DEF=${SCRDIR}/pkg/${1} + CUSTOM_PACKAGE_DEF=yes else # Use default script name PACKAGE_DEF=${SCRDIR}/pkg/$(get_pkg_name ${PACKAGE}) + CUSTOM_PACKAGE_DEF=no fi if [ "x${DECOMPRESS}" = "x1" ]; then @@ -139,6 +149,9 @@ ipkg_script() if [ -f ${PACKAGE_DEF} ]; then echo "Load custom package functions and definitions from ${PACKAGE_DEF}" source ${PACKAGE_DEF} + elif [ "x${CUSTOM_PACKAGE_DEF}" = "xyes" ]; then + echo "Missing custom package definition file ${PACKAGE_DEF}" + return 1 fi # Execute pre-patch function if applicable @@ -147,7 +160,9 @@ ipkg_script() hvpatch_pre fi - hvpatch + if [ "x${DECOMPRESS}" = "x1" ]; then + hvpatch + fi # Execute pre-configure function if applicable if function_exists hvconfig_pre ; then @@ -165,12 +180,14 @@ ipkg_script() fi if [ -x ${LFS_TMP}/${PACKAGE}/configure ]; then - # Add option --disable-dependency-tracking if supported - if cat ${LFS_TMP}/${PACKAGE}/configure | \ - grep -q "disable-dependency-tracking"; then - CONFIGURE_OPTS="\ + if [ "x${ENABLE_DEPENDENCY_TRACKING}" = "x0" ]; then + # Add option --disable-dependency-tracking if supported + if cat ${LFS_TMP}/${PACKAGE}/configure | \ + grep -q "disable-dependency-tracking"; then + CONFIGURE_OPTS="\ ${CONFIGURE_OPTS} \ - --disable-dependency-tracking" + --disable-dependency-tracking" + fi fi # Remove option --sysconfdir=... if not supported