scripts/unpack: add support for arch specific patches

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2014-05-24 16:22:33 +02:00
parent 510b70b688
commit 711b5fc4c3

View File

@ -119,14 +119,24 @@ if [ "$(type -t pre_patch)" = "function" ]; then
pre_patch pre_patch
fi fi
if [ "$TARGET_ARCH" = "i386" -o "$TARGET_ARCH" = "x86_64" ]; then
PATCH_ARCH="x86"
else
PATCH_ARCH="$TARGET_ARCH"
fi
for i in $PKG_DIR/patches/$PKG_NAME-*.patch \ for i in $PKG_DIR/patches/$PKG_NAME-*.patch \
$PKG_DIR/patches/$PATCH_ARCH/$PKG_NAME-*.patch \
$PKG_DIR/patches/$PKG_VERSION/*.patch \ $PKG_DIR/patches/$PKG_VERSION/*.patch \
$PKG_DIR/patches/$PKG_VERSION/$PATCH_ARCH/*.patch \
$PROJECT_DIR/$PROJECT/patches/$PKG_NAME/*.patch; do $PROJECT_DIR/$PROJECT/patches/$PKG_NAME/*.patch; do
if [ $(dirname $i) = "$PKG_DIR/patches" ]; then if [ $(dirname $i) = "$PKG_DIR/patches" ]; then
PATCH_DESC="(common)" PATCH_DESC="(common)"
elif [ $(dirname $i) = "$PKG_DIR/patches/$PKG_VERSION" ]; then elif [ $(dirname $i) = "$PKG_DIR/patches/$PATCH_ARCH" ]; then
PATCH_DESC="($PKG_VERSION)" PATCH_DESC="(common - $PATCH_ARCH)"
elif [ $(dirname $i) = "$PKG_DIR/patches/$PKG_VERSION/$PATCH_ARCH" ]; then
PATCH_DESC="($PKG_VERSION - $PATCH_ARCH)"
elif [ $(dirname $i) = "$PROJECT_DIR/$PROJECT/patches/$PKG_NAME" ]; then elif [ $(dirname $i) = "$PROJECT_DIR/$PROJECT/patches/$PKG_NAME" ]; then
PATCH_DESC="(project)" PATCH_DESC="(project)"
fi fi