From 16c06bbd42b8da955ae3b25e77ffff4d3f8f853c Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sat, 13 Apr 2013 21:23:36 +0200 Subject: Better calculation of host triplet for gtk+2, gtk+3 and pango. The module update scripts were hard-coded for only one exception (armv7hl) to slackwarearm, but this update will work for other arm hard-float Slackware derivatives bootstrapped from Alien's ARM scripts. --- source.local/l/gtk+2/update-gtk-immodules-2.0 | 16 ++++++++++++---- source.local/l/gtk+3/update-gtk-immodules-3.0 | 16 ++++++++++++---- source.local/l/pango/update-pango-querymodules | 16 ++++++++++++---- 3 files changed, 36 insertions(+), 12 deletions(-) diff --git a/source.local/l/gtk+2/update-gtk-immodules-2.0 b/source.local/l/gtk+2/update-gtk-immodules-2.0 index 704cfd0..404cb0e 100644 --- a/source.local/l/gtk+2/update-gtk-immodules-2.0 +++ b/source.local/l/gtk+2/update-gtk-immodules-2.0 @@ -8,10 +8,18 @@ host=$(uname -m)-slackware-linux # Fix $host for arm arch: case "$host" in - armv7l*) hostqq=armv7l-slackware-linux-gnueabi - readelf /usr/bin/file -A | grep -q "Tag_FP_arch" && host=armv7hl-slackware-linux-gnueabi - ;; - arm*) host=arm-slackware-linux-gnueabi ;; + armv[6,7,8]*) + if readelf /usr/bin/file -A | grep -q "Tag_ABI_VFP_args: VFP registers" + then + # Hardfloat, rewrite armv7l -> armv7hl + host="$(echo $host | sed -e 's/\(armv.\)/\1h/')" + fi + host=$host-slackware-linux-gnueabi + ;; + arm*) + # Softfloat: + host=arm-slackware-linux-gnueabi + ;; esac # Deriving /etc/gtk-2.0/$host location diff --git a/source.local/l/gtk+3/update-gtk-immodules-3.0 b/source.local/l/gtk+3/update-gtk-immodules-3.0 index 9a01487..c4ce5a6 100644 --- a/source.local/l/gtk+3/update-gtk-immodules-3.0 +++ b/source.local/l/gtk+3/update-gtk-immodules-3.0 @@ -8,10 +8,18 @@ host=$(uname -m)-slackware-linux # Fix $host for arm arch: case "$host" in - armv7l*) hostqq=armv7l-slackware-linux-gnueabi - readelf /usr/bin/file -A | grep -q "Tag_FP_arch" && host=armv7hl-slackware-linux-gnueabi - ;; - arm*) host=arm-slackware-linux-gnueabi ;; + armv[6,7,8]*) + if readelf /usr/bin/file -A | grep -q "Tag_ABI_VFP_args: VFP registers" + then + # Hardfloat, rewrite armv7l -> armv7hl + host="$(echo $host | sed -e 's/\(armv.\)/\1h/')" + fi + host=$host-slackware-linux-gnueabi + ;; + arm*) + # Softfloat: + host=arm-slackware-linux-gnueabi + ;; esac # Deriving /etc/gtk-3.0/$host location diff --git a/source.local/l/pango/update-pango-querymodules b/source.local/l/pango/update-pango-querymodules index 59c747b..1cada91 100644 --- a/source.local/l/pango/update-pango-querymodules +++ b/source.local/l/pango/update-pango-querymodules @@ -8,10 +8,18 @@ host=$(uname -m)-slackware-linux # Fix $host for arm arch: case "$host" in - armv7l*) hostqq=armv7l-slackware-linux-gnueabi - readelf /usr/bin/file -A | grep -q "Tag_FP_arch" && host=armv7hl-slackware-linux-gnueabi - ;; - arm*) host=arm-slackware-linux-gnueabi ;; + armv[6,7,8]*) + if readelf /usr/bin/file -A | grep -q "Tag_ABI_VFP_args: VFP registers" + then + # Hardfloat, rewrite armv7l -> armv7hl + host="$(echo $host | sed -e 's/\(armv.\)/\1h/')" + fi + host=$host-slackware-linux-gnueabi + ;; + arm*) + # Softfloat: + host=arm-slackware-linux-gnueabi + ;; esac # Deriving /etc/pango/$host location -- cgit v1.2.3