-
Notifications
You must be signed in to change notification settings - Fork 27
/
qt-support-libxcb-1.11_install
executable file
·145 lines (119 loc) · 4.3 KB
/
qt-support-libxcb-1.11_install
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#!/usr/bin/env bash
###############################################
# Installing libxcb for Qt
#
# by Heather Kelly, 2015
#
NAME=${NAME:-qt}
VERSION=${VERSION:-5.4.2}
INSTALL_PREFIX=${INSTALL_PREFIX:-/shared/ucl/apps/$NAME/$VERSION/$COMPILER_TAG}
LIBXCB_NAME=${LIBXCB_NAME:-libxcb-1.11}
LIBXCB_SRC_ARCHIVE=${LIBXCB_SRC_ARCHIVE:-http://xcb.freedesktop.org/dist/${LIBXCB_NAME}.tar.gz}
LIBXCB_MD5=${LIBXCB_MD5:-1698dd837d7e6e94d029dbe8b3a82deb}
XCBPROTO_NAME=${XCBPROTO_NAME:-xcb-proto-1.11}
XCBPROTO_SRC_ARCHIVE=${XCBPROTO_SRC_ARCHIVE:-http://xcb.freedesktop.org/dist/${XCBPROTO_NAME}.tar.gz}
XCBPROTO_MD5=${XCBPROTO_MD5:-c8c6cb72c84f58270f4db1f39607f66a}
PTHREADSTUBS_NAME=${PTHREADSTUBS_NAME:-libpthread-stubs-0.3}
PTHREADSTUBS_SRC_ARCHIVE=${PTHREADSTUBS_SRC_ARCHIVE:-http://xcb.freedesktop.org/dist/${PTHREADSTUBS_NAME}.tar.gz}
PTHREADSTUBS_MD5=${PTHREADSTUBS_MD5:-a09d928c4af54fe5436002345ef71138}
XUTILMACROS_NAME=${XUTILMACROS_NAME:-util-macros-1.17}
XUTILMACROS_SRC_ARCHIVE=${XUTILMACROS_SRC_ARCHIVE:-http://www.x.org/releases/X11R7.7/src/util/${XUTILMACROS_NAME}.tar.gz}
XUTILMACROS_MD5=${XUTILMACROS_MD5:-e162e8921cd08c50bf17b9de5131b3f1}
XLIBXAU_NAME=${XLIBXAU_NAME:-libXau-1.0.7}
XLIBXAU_SRC_ARCHIVE=${XLIBXAU_SRC_ARCHIVE:-http://www.x.org/releases/X11R7.7/src/lib/${XLIBXAU_NAME}.tar.gz}
XLIBXAU_MD5=${XLIBXAU_MD5:-3ab7a4d1aac1b7f8ccc6b9755a19f252}
set -e
temp_dir=`mktemp -d -p /dev/shm`
cd $temp_dir
# Download xcb parts and check their checksums first
wget $LIBXCB_SRC_ARCHIVE
libxcb_archive=$(basename "${LIBXCB_SRC_ARCHIVE}")
LIBXCB_CHECKSUM=`md5sum $libxcb_archive| awk '{print $1}'`
if [ "$LIBXCB_MD5" != "$LIBXCB_CHECKSUM" ]
then
echo "Hash mismatch for $libxcb_archive."
echo "Expected: $LIBXCB_MD5"
echo "Got: $LIBXCB_CHECKSUM"
exit 1;
fi
wget $XCBPROTO_SRC_ARCHIVE
xcbproto_archive=$(basename "${XCBPROTO_SRC_ARCHIVE}")
XCBPROTO_CHECKSUM=`md5sum $xcbproto_archive| awk '{print $1}'`
if [ "$XCBPROTO_MD5" != "$XCBPROTO_CHECKSUM" ]
then
echo "Hash mismatch for $xcbproto_archive."
echo "Expected: $XCBPROTO_MD5"
echo "Got: $XCBPROTO_CHECKSUM"
exit 1;
fi
wget $PTHREADSTUBS_SRC_ARCHIVE
pthreadstubs_archive=$(basename "${PTHREADSTUBS_SRC_ARCHIVE}")
PTHREADSTUBS_CHECKSUM=`md5sum $pthreadstubs_archive| awk '{print $1}'`
if [ "$PTHREADSTUBS_MD5" != "$PTHREADSTUBS_CHECKSUM" ]
then
echo "Hash mismatch for $pthreadstubs_archive."
echo "Expected: $PTHREADSTUBS_MD5"
echo "Got: $PTHREADSTUBS_CHECKSUM"
exit 1;
fi
wget $XUTILMACROS_SRC_ARCHIVE
xutilmacros_archive=$(basename "${XUTILMACROS_SRC_ARCHIVE}")
XUTILMACROS_CHECKSUM=`md5sum $xutilmacros_archive| awk '{print $1}'`
if [ "$XUTILMACROS_MD5" != "$XUTILMACROS_CHECKSUM" ]
then
echo "Hash mismatch for $xutilmacros_archive."
echo "Expected: $XUTILMACROS_MD5"
echo "Got: $XUTILMACROS_CHECKSUM"
exit 1;
fi
wget $XLIBXAU_SRC_ARCHIVE
xlibxau_archive=$(basename "${XLIBXAU_SRC_ARCHIVE}")
XLIBXAU_CHECKSUM=`md5sum $xlibxau_archive| awk '{print $1}'`
if [ "$XLIBXAU_MD5" != "$XLIBXAU_CHECKSUM" ]
then
echo "Hash mismatch for $xlibxau_archive."
echo "Expected: $XLIBXAU_MD5"
echo "Got: $XLIBXAU_CHECKSUM"
exit 1;
fi
# required for libxcb: install xorg/util/macros
tar -xvf $xutilmacros_archive
cd $XUTILMACROS_NAME
./configure --prefix=$INSTALL_PREFIX/support
make 2>&1 | tee make.log
make install
export PKG_CONFIG_PATH=$INSTALL_PREFIX/support/share/pkgconfig:$PKG_CONFIG_PATH
# build xorg/lib/libXau
cd $temp_dir
tar -xvf $xlibxau_archive
cd $XLIBXAU_NAME
./configure --prefix=$INSTALL_PREFIX/support
make 2>&1 | tee make.log
make install
export LD_LIBRARY_PATH=$INSTALL_PREFIX/support/lib:$LD_LIBRARY_PATH
# build xcb/pthread-stubs
cd $temp_dir
tar -xvf $pthreadstubs_archive
cd $PTHREADSTUBS_NAME
./configure --prefix=$INSTALL_PREFIX/support
make 2>&1 | tee make.log
make install
# build xcb/proto
cd $temp_dir
tar -xvf $xcbproto_archive
cd $XCBPROTO_NAME
./configure --prefix=$INSTALL_PREFIX/support
make 2>&1 | tee make.log
make install
export PYTHONPATH=$INSTALL_PREFIX/support/lib/python2.7/site-packages:$PYTHONPATH
export PKG_CONFIG_PATH=$INSTALL_PREFIX/support/lib/pkgconfig:$PKG_CONFIG_PATH
# build xcb/libxcb
cd $temp_dir
tar -xvf $libxcb_archive
cd $LIBXCB_NAME
./configure --prefix=$INSTALL_PREFIX/support
make 2>&1 | tee make.log
make check
make install
echo ""
echo "Libxcb items installed in $INSTALL_PREFIX/support. Now run the main Qt buildscript."