diff --git a/config/functions b/config/functions index a9da81b6fa..bd09f3bda5 100644 --- a/config/functions +++ b/config/functions @@ -55,13 +55,6 @@ setup_toolchain() { fi } -apply_patch() { - patch -d "$2" -p0 -f --dry-run < $1 &> /dev/null && patch -d "$2" -p0 < $1 && return 0 - patch -d "$2" -p1 -f --dry-run < $1 &> /dev/null && patch -d "$2" -p1 < $1 && return 0 - echo "*** Failed to apply '$1'! ***" - return 1 -} - kernel_path() { if [ -f $ROOT/packages/linux/package.mk ] ; then . $ROOT/packages/linux/package.mk diff --git a/scripts/unpack b/scripts/unpack index 3826f0b44c..ce09c46e07 100755 --- a/scripts/unpack +++ b/scripts/unpack @@ -144,7 +144,7 @@ for i in $PKG_DIR/patches/$PKG_NAME-*.patch ; do continue; else printf "%${BUILD_INDENT}c ${boldgreen}APPLY PATCH${endcolor} ${boldwhite}(common)${endcolor} $i\n" ' '>&$SILENT_OUT - apply_patch $i $PKG_BUILD || exit 1 + cat $i | patch -d `echo "$PKG_BUILD" | cut -f1 -d\ ` -p1 >&$VERBOSE_OUT fi fi done @@ -158,7 +158,7 @@ for i in $PKG_DIR/patches/$PKG_VERSION/*.patch ; do continue; else printf "%${BUILD_INDENT}c ${boldgreen}APPLY PATCH${endcolor} ${boldwhite}($PKG_VERSION)${endcolor} $i\n" ' '>&$SILENT_OUT - apply_patch $i $PKG_BUILD || exit 1 + cat $i | patch -d `echo "$PKG_BUILD" | cut -f1 -d\ ` -p1 >&$VERBOSE_OUT fi fi done @@ -172,7 +172,7 @@ for i in $PROJECT_DIR/$PROJECT/patches/$PKG_NAME/*.patch ; do continue; else printf "%${BUILD_INDENT}c ${boldgreen}APPLY PATCH${endcolor} ${boldwhite}(project)${endcolor} $i\n" ' '>&$SILENT_OUT - apply_patch $i $PKG_BUILD || exit 1 + cat $i | patch -d `echo "$PKG_BUILD" | cut -f1 -d\ ` -p1 >&$VERBOSE_OUT fi fi done