ALL: Add a suffix argument to do_patch

It allows patching for composed packages
This commit is contained in:
Le Philousophe
2022-01-12 11:43:26 +00:00
parent 33de7675ba
commit 2db89c802a
5 changed files with 10 additions and 14 deletions
+7 -2
View File
@@ -14,8 +14,13 @@ __do_clean_bdir () {
}
__do_patch () {
if [ -d "$PACKAGE_DIR/patches" ]; then
for p in "$PACKAGE_DIR/patches"/*.patch; do
local suffix
if [ -n "$1" ]; then
suffix="-$1"
fi
if [ -d "$PACKAGE_DIR/patches$suffix" ]; then
for p in "$PACKAGE_DIR/patches$suffix"/*.patch; do
echo "Applying $p"
patch -t -p1 < "$p"
done
@@ -31,11 +31,7 @@ cd ..
# GCC...
do_http_fetch gcc "https://ftp.gnu.org/gnu/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2" 'tar xjf'
for p in "$PACKAGE_DIR/patches-gcc"/*.patch; do
echo "Applying $p"
patch -t -p1 < "$p"
done
do_patch gcc
# Do off tree build
GCC_DIR=$(pwd)
@@ -60,8 +60,7 @@ cd ..
do_http_fetch gnutls "http://ftp.gnu.org/gnu/gnutls/gnutls-${GNUTLS_VERSION}.tar.bz2" \
'tar xjf' "sha256:${GNUTLS_SHA256}"
patch -t -p1 < $PACKAGE_DIR/gnutls-openssl.patch
do_patch gnutls
# Disable programs, doc and tests they don't even build...
sed -ie 's/^\(SUBDIRS.*\) src doc tests/\1/' Makefile.in
@@ -79,11 +79,7 @@ do_http_fetch w32api "https://osdn.net/dl/mingw/w32api-${W32API_VERSION}-mingw32
cd ..
do_http_fetch mingwrt "https://osdn.net/dl/mingw/mingwrt-${MINGWRT_VERSION}-mingw32-src.tar.xz" 'tar xJf'
for p in "$PACKAGE_DIR/patches-mingwrt"/*.patch; do
echo "Applying $p"
patch -t -p1 < "$p"
done
do_patch mingwrt
touch include/features.h