mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Revert "buildsystem: rework patching. prepare to remove patches.upstream/"
This reverts (part of) commit f920a33507852a9af865a399c877073bf52d3f8b. patch --dry-run fails with patches generated with git format-patch --stdout.. closes #2856
This commit is contained in:
parent
b8815448fb
commit
e784a2114f
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user