Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra/linux-olpc-xo1/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'extra/linux-olpc-xo1/PKGBUILD')
-rw-r--r--extra/linux-olpc-xo1/PKGBUILD18
1 files changed, 13 insertions, 5 deletions
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() {