X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=functions%2Fipkg;h=22f18038928c7945a014cc25586d715a84639dfc;hb=f904744aeed9c1baf061f93673898dbab00e26fc;hp=bba883d768aee736e40c30e454678677a905fc68;hpb=340ea470736411a0fb1abed96caa0a8356dc81f1;p=hvlinux.git diff --git a/functions/ipkg b/functions/ipkg index bba883d..22f1803 100644 --- a/functions/ipkg +++ b/functions/ipkg @@ -125,9 +125,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 +141,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 +152,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 @@ -172,6 +179,20 @@ ipkg_script() ${CONFIGURE_OPTS} \ --disable-dependency-tracking" fi + + # Remove option --sysconfdir=... if not supported + if ! cat ${LFS_TMP}/${PACKAGE}/configure | \ + grep -q "sysconfdir"; then + # Split on space, one per line. + # Remove line --sysconfdir=... + # Join separate lines on one line + # Remove trailing space + CONFIGURE_OPTS=$(echo ${CONFIGURE_OPTS} | \ + tr -s " " "\n" | \ + grep -v "\-\-sysconfdir=" | \ + tr -s "\n" " " | \ + sed "s/ $//") + fi fi ipkg_display_build_infos