buildsystem: support absolute paths in PKG_PATCH_DIRS

This commit is contained in:
MilhouseVH 2019-07-05 16:32:38 +01:00
parent 0c1118308f
commit d376a63b49

View File

@ -122,9 +122,14 @@ if [ -d "${SOURCES}/${PKG_NAME}" -o -d "${PKG_DIR}/sources" ]; then
PATCH_DIRS_PRJ=""
if [ -n "${PKG_PATCH_DIRS}" ]; then
for patch_dir in ${PKG_PATCH_DIRS}; do
[ -d ${PKG_DIR}/patches/${patch_dir} ] && PATCH_DIRS_PKG+=" ${PKG_DIR}/patches/${patch_dir}/*.patch"
[ -d ${PROJECT_DIR}/${PROJECT}/patches/${PKG_NAME}/${patch_dir} ] && PATCH_DIRS_PRJ+=" ${PROJECT_DIR}/${PROJECT}/patches/${PKG_NAME}/${patch_dir}/*.patch"
[ -d ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/patches/${PKG_NAME}/${patch_dir} ] && PATCH_DIRS_PRJ+=" ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/patches/${PKG_NAME}/${patch_dir}/*.patch"
if [[ ${patch_dir} =~ ^/ ]]; then
[ -f ${patch_dir} ] && PATCH_DIRS_PKG+=" ${patch_dir}"
[ -d ${patch_dir} ] && PATCH_DIRS_PKG+=" ${patch_dir}/*.patch"
else
[ -d ${PKG_DIR}/patches/${patch_dir} ] && PATCH_DIRS_PKG+=" ${PKG_DIR}/patches/${patch_dir}/*.patch"
[ -d ${PROJECT_DIR}/${PROJECT}/patches/${PKG_NAME}/${patch_dir} ] && PATCH_DIRS_PRJ+=" ${PROJECT_DIR}/${PROJECT}/patches/${PKG_NAME}/${patch_dir}/*.patch"
[ -d ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/patches/${PKG_NAME}/${patch_dir} ] && PATCH_DIRS_PRJ+=" ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/patches/${PKG_NAME}/${patch_dir}/*.patch"
fi
done
fi
@ -165,7 +170,7 @@ if [ -d "${SOURCES}/${PKG_NAME}" -o -d "${PKG_DIR}/sources" ]; then
elif [[ "${thisdir}" =~ ^${PROJECT_DIR}/.* ]]; then
PATCH_DESC="(project - $(basename "${thisdir}"))"
else
PATCH_DESC="(unknown - $(basename "${thisdir}"))"
PATCH_DESC="(absolute - ${i})"
fi
fi