X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=scripts%2Fpatch-specs.sh;h=2262e218fe2cb46534aa5bc3c684eb80902aa24d;hb=543d945f07ec439388cbe3a9ea1b193e910bb824;hp=2ab779084b8a78c9d4c3140116d7098d5ee204f6;hpb=d5cf09642c9ecb23029627707ff908d2fce70eea;p=oweals%2Fopenwrt.git diff --git a/scripts/patch-specs.sh b/scripts/patch-specs.sh index 2ab779084b..2262e218fe 100755 --- a/scripts/patch-specs.sh +++ b/scripts/patch-specs.sh @@ -35,7 +35,7 @@ patch_specs() { echo -n "Patching specs ... " STAGING_DIR="$DIR" "$CPP" -dumpspecs | awk ' mode ~ "link" { - sub("%{L.}", "%{L*} -L %:getenv(STAGING_DIR /usr/lib) -rpath-link %:getenv(STAGING_DIR /usr/lib)") + sub(/(%@?\{L.\})/, "& -L %:getenv(STAGING_DIR /usr/lib) -rpath-link %:getenv(STAGING_DIR /usr/lib)") } mode ~ "cpp" { $0 = $0 " -idirafter %:getenv(STAGING_DIR /usr/include)" @@ -62,7 +62,7 @@ patch_specs() { } -VERSION="$(STAGING_DIR="$DIR" "$CPP" --version | head -n1)" +VERSION="$(STAGING_DIR="$DIR" "$CPP" --version | sed -ne 's/^.* (.*) //; s/ .*$//; 1p')" VERSION="${VERSION:-unknown}" case "${VERSION##* }" in