index : packages | |
Archlinux32 package modifications | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2022-09-22 09:04:16 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2022-09-22 09:04:16 +0200 |
commit | 6669a704f64f4220ed3d46f862b4cfd0b979c23b (patch) | |
tree | eafda4f30ef576edc8fec8cd4775a3ff0c4411e7 /extra/linux-olpc-xo1/PKGBUILD | |
parent | ea244258c56590b1b2c831151d36be8821128959 (diff) |
-rw-r--r-- | extra/linux-olpc-xo1/PKGBUILD | 18 |
diff --git a/extra/linux-olpc-xo1/PKGBUILD b/extra/linux-olpc-xo1/PKGBUILD index e3ecde3d..a3a0ff77 100644 --- a/extra/linux-olpc-xo1/PKGBUILD +++ b/extra/linux-olpc-xo1/PKGBUILD @@ -168,11 +168,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() { |