2020-04-02 19:58:39 +00:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
|
|
|
# Multilib-aware wrapper for the wx-config script
|
|
|
|
#
|
|
|
|
# Usage: wx-config [--arch <arch>] <regular wx-config options>
|
|
|
|
#
|
|
|
|
|
2020-04-04 18:56:31 +00:00
|
|
|
version=3.1
|
|
|
|
|
2020-04-02 19:58:39 +00:00
|
|
|
if [ $# -ge 2 ]; then
|
|
|
|
if [ $1 = "--arch" ]; then
|
|
|
|
arch=$2
|
|
|
|
shift 2
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z $arch ]; then
|
|
|
|
arch=`uname -m`
|
|
|
|
fi
|
|
|
|
|
|
|
|
case $arch in
|
2020-04-04 18:56:31 +00:00
|
|
|
i?86|ppc|s390|sparc|arm*|ia64|mips|mipsel|riscv32)
|
2020-04-02 19:58:39 +00:00
|
|
|
libdir=/usr/lib
|
|
|
|
;;
|
2020-04-04 18:56:31 +00:00
|
|
|
x86_64|ppc64|s390x|sparc64|aarch64|ppc64le|mips64*|riscv64)
|
2020-04-02 19:58:39 +00:00
|
|
|
libdir=/usr/lib64
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Unsupported architecture '$arch'"
|
|
|
|
exit 8
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2020-04-04 18:56:31 +00:00
|
|
|
wxconfig=$libdir/wx/config/gtk3-unicode-$version
|
|
|
|
if [ ! -f $wxconfig ]; then
|
|
|
|
wxconfig=$libdir/wx/config/gtk2-unicode-$version
|
|
|
|
fi
|
2020-04-02 19:58:39 +00:00
|
|
|
# special case when using 32-bit userspace and 64-bit kernel
|
|
|
|
if [ ! -f $wxconfig -a \( $arch = ppc64 -o $arch = sparc64 \) ]; then
|
2020-04-04 18:56:31 +00:00
|
|
|
wxconfig=/usr/lib/wx/config/gtk3-unicode-$version
|
|
|
|
if [ ! -f $wxconfig ]; then
|
|
|
|
wxconfig=/usr/lib/wx/config/gtk2-unicode-$version
|
|
|
|
fi
|
2020-04-02 19:58:39 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -x $wxconfig ]; then
|
|
|
|
exec $wxconfig $@
|
|
|
|
else
|
|
|
|
echo "wxGTK-devel isn't installed for architecture '$arch'"
|
|
|
|
exit 9
|
|
|
|
fi
|