index : packages | |
Archlinux32 package modifications | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | extra/linux-pae/PKGBUILD | 18 |
diff --git a/extra/linux-pae/PKGBUILD b/extra/linux-pae/PKGBUILD index 6451244a..89582c86 100644 --- a/extra/linux-pae/PKGBUILD +++ b/extra/linux-pae/PKGBUILD @@ -198,11 +198,19 @@ _package-headers() { } _get_gcc_version_from_config() { - sed ' - s/^CONFIG_CC_VERSION_TEXT="gcc (GCC) \([0-9.]\+\)"$/\1/ - t - d - ' "$srcdir/$_srcname/.config" + if [ -z "$srcdir" ]; then + gcc --version \ + | sed ' + s@^.* @@ + 1!d + ' + else + sed ' + s/^CONFIG_CC_VERSION_TEXT="gcc (GCC) \([0-9.]\+\)"$/\1/ + t + d + ' "$srcdir/$_srcname/.config" + fi } _package-docs() { |