forked from iXit/wine-nine-standalone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
executable file
·65 lines (55 loc) · 1.53 KB
/
bootstrap.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/sh -e
# SPDX-License-Identifier: LGPL-2.1-or-later
SRC=`dirname $(readlink -f $0)`
PKG_CONFIG_32=
PKG_CONFIG_64=
test -z "$WINE32_LIBDIR" && WINE32_LIBDIR=/nonexistant
test -z "$WINE64_LIBDIR" && WINE64_LIBDIR=/nonexistant
. /etc/os-release
for i in $ID $ID_LIKE; do
case $i in
debian|ubuntu)
PKG_CONFIG_32=i686-linux-gnu-pkg-config
PKG_CONFIG_64=x86_64-linux-gnu-pkg-config
;;
gentoo|arch|archlinux)
PKG_CONFIG_32=i686-pc-linux-gnu-pkg-config
PKG_CONFIG_64=x86_64-pc-linux-gnu-pkg-config
;;
opensuse|suse)
PKG_CONFIG_32=i586-suse-linux-gnu-pkg-config
PKG_CONFIG_64=x86_64-suse-linux-gnu-pkg-config
;;
fedora|rhel)
PKG_CONFIG_32=i686-redhat-linux-gnu-pkg-config
PKG_CONFIG_64=x86_64-redhat-linux-gnu-pkg-config
;;
slackware)
PKG_CONFIG_32=i586-slackware-linux-gnu-pkg-config
PKG_CONFIG_64=x86_64-slackware-linux-gnu-pkg-config
;;
solus)
PKG_CONFIG_32=pkg-config
PKG_CONFIG_64=x86_64-solus-linux-gnu-pkg-config
;;
*)
continue
;;
esac
break
done
if test -z "$PKG_CONFIG_32" -o -z "$PKG_CONFIG_64"; then
printf '%s\n' "unknown distro (\"$ID\", like \"$ID_LIKE\")" \
"please add support to this script and open a pull request!"
exit 1
fi
printf '%s\n' "found $i compatible distro"
sed -e "s|@PKG_CONFIG@|$PKG_CONFIG_32|" \
-e "s|@WINE32_LIBDIR@|$WINE32_LIBDIR|" \
< $SRC/tools/cross-wine32.in \
> $SRC/tools/cross-wine32
sed -e "s|@PKG_CONFIG@|$PKG_CONFIG_64|" \
-e "s|@WINE64_LIBDIR@|$WINE64_LIBDIR|" \
< $SRC/tools/cross-wine64.in \
> $SRC/tools/cross-wine64
exit 0