-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_deps
executable file
·246 lines (240 loc) · 6.74 KB
/
install_deps
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
#!/bin/bash
export INSTALL_DIR="$(pwd)"
#--------------------------------------
sudo mkdir -pv ${INSTALL_DIR}/lib
sudo mkdir -pv ${INSTALL_DIR}/share
sudo mkdir -pv ${INSTALL_DIR}/bin
sudo mkdir -pv ${INSTALL_DIR}/etc
sudo mkdir -pv ${INSTALL_DIR}/include
#######################################
# Setting up the environment #
#######################################
cat > w2c.conf << EOF
/opt/Write2chordpro/lib
EOF
cat > w2c.sh << EOF
export PATH=/opt/Write2chordpro/bin:$PATH
EOF
sudo mv -v w2c.conf /etc/ld.so.conf.d/
sudo mv -v w2c.sh /etc/profile.d/
sudo ldconfig
export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:LD_LIBRARY_PATH"
export CPPFLAGS="-I${INSTALL_DIR}/include"
export LDFLAGS="-L${INSTALL_DIR}/lib"
export PKG_CONFIG_PATH="${INSTALL_DIR}/lib/pkgconfig"
#export PKG_CONFIG_PATH LDFLAGS CPPFLAGS
#######################################
# Build NASM which is required by #
# libjpegturbo #
#######################################
tar -Jxf nasm-2.10.09.tar.xz
cd nasm-2.10.09
./configure --prefix=${INSTALL_DIR}
make
sudo make install
cd ..
sudo rm -rf nasm-2.10.09
#######################################
# Build libjpegturbo #
#######################################
tar -zxf libjpeg-turbo-1.3.0.tar.gz
cd libjpeg-turbo-1.3.0
./configure --prefix=${INSTALL_DIR} \
--mandir=${INSTALL_DIR}/share/man \
--with-jpeg8 \
--disable-static
sed -i -e '/^docdir/ s/$/\/libjpeg-turbo-1.3.0/' \
-e '/^exampledir/ s/$/\/libjpeg-turbo-1.3.0/' Makefile
${LDFLAGS} ${CPPFLAGS} make
sudo make install
cd ..
sudo rm -rf libjpeg-turbo-1.3.0
#######################################
# Build TIFF #
#######################################
tar -zxf tiff-4.0.3.tar.gz
cd tiff-4.0.3
sed -i '/glDrawPixels/a glFlush();' tools/tiffgt.c
./configure --prefix=${INSTALL_DIR} \
--disable-static
${LDFLAGS} ${CPPFLAGS} make
sudo make install
cd ..
sudo rm -rf tiff-4.0.3
#######################################
# Build libpng #
#######################################
tar -Jxf libpng-1.6.8.tar.xz
cd libpng-1.6.8
gzip -cd ../libpng-1.6.8-apng.patch.gz | patch -p1
./configure --prefix=${INSTALL_DIR} \
--disable-static
${LDFLAGS} ${CPPFLAGS} make
sudo make install
cd ..
sudo rm -rf libpng-1.6.8
#######################################
# Build which #
#######################################
tar -zxf which-2.20.tar.gz
cd which-2.20
./configure --prefix=${INSTALL_DIR}
${LDFLAGS} ${CPPFLAGS} make
sudo make install
cd ..
sudo rm -rf which-2.20
#######################################
# Build freetype #
#######################################
tar -jxf freetype-2.5.2.tar.bz2
cd freetype-2.5.2
sed -i -e "/AUX.*.gxvalid/s@^# @@" \
-e "/AUX.*.otvalid/s@^# @@" \
modules.cfg
sed -ri -e 's:.*(#.*SUBPIXEL.*) .*:\1:' \
include/config/ftoption.h
./configure --prefix=${INSTALL_DIR} \
--disable-static
${LDFLAGS} ${CPPFLAGS} make
sudo make install
cd ..
sudo rm -rf freetype-2.5.2
#######################################
# Build expat #
#######################################
tar -zxf expat-2.1.0.tar.gz
cd expat-2.1.0
./configure --prefix=${INSTALL_DIR} \
--disable-static
make
sudo make install
cd ..
sudo rm -rf expat-2.1.0
#######################################
# Build fontconfig #
#######################################
tar -jxf fontconfig-2.11.0.tar.bz2
cd fontconfig-2.11.0
./configure --prefix=${INSTALL_DIR} \
--sysconfdir=${INSTALL_DIR}/etc \
--localstatedir=/var \
--docdir=${INSTALL_DIR}/share/doc/fontconfig-2.11.0 \
--disable-static \
--disable-docs
${LDFLAGS} ${CPPFLAGS} make
sudo make install
cd ..
sudo rm -rf fontconfig-2.11.0
#######################################
# Build pixman #
#######################################
tar -zxf pixman-0.32.4.tar.gz
cd pixman-0.32.4
./configure --prefix=${INSTALL_DIR} \
--disable-static
${LDFLAGS} ${CPPFLAGS} make
sudo make install
cd ..
sudo rm -rf pixman-0.32.4
#######################################
# Build libffi #
#######################################
tar -zxf libffi-3.0.13.tar.gz
cd libffi-3.0.13
patch -Np1 -i ../libffi-3.0.13-includedir-1.patch
./configure --prefix=${INSTALL_DIR} \
--disable-static
${LDFLAGS} ${CPPFLAGS} make
sudo make install
cd ..
sudo rm -rf libffi-3.0.13
#######################################
# Build Glib #
#######################################
tar -Jxf glib-2.39.2.tar.xz
cd glib-2.39.2
./configure --prefix=${INSTALL_DIR} \
--with-pcre-system
${LDFLAGS} ${CPPFLAGS} make
sudo make install
cd ..
sudo rm -rf glib-2.39.2
#######################################
# Build cairo #
#######################################
tar -Jxf cairo-1.12.16.tar.xz
cd cairo-1.12.16
./configure --prefix=${INSTALL_DIR} \
--disable-static
${LDFLAGS} ${CPPFLAGS} make
sudo make install
cd ..
sudo rm -rf cairo-1.12.16
#######################################
# Build ICU #
#######################################
tar -zxf icu4c-52_1-src.tgz
cd icu/source
CXX=g++ ./configure --prefix=${INSTALL_DIR}
make
sudo make install
cd ../..
sudo rm -rf icu
#######################################
# Build harfbuzz #
#######################################
tar -jxf harfbuzz-0.9.25.tar.bz2
cd harfbuzz-0.9.25
./configure --prefix=${INSTALL_DIR} \
--with-gobject
${LDFLAGS} ${CPPFLAGS} make
sudo make install
cd ..
sudo rm -rf harfbuzz-0.9.25
#######################################
# Build pango #
#######################################
tar -Jxf pango-1.36.1.tar.xz
cd pango-1.36.1
./configure --prefix=${INSTALL_DIR} \
--sysconfdir=${INSTALL_DIR}/etc
${LDFLAGS} ${CPPFLAGS} make
sudo make install
cd ..
sudo rm -rf pango-1.36.1
#######################################
# Build ATK #
#######################################
tar -Jxf atk-2.11.4.tar.xz
cd atk-2.11.4
./configure --prefix=${INSTALL_DIR}
${LDFLAGS} ${CPPFLAGS} make
sudo make install
cd ..
sudo rm -rf atk-2.11.4
#######################################
# Build gdk-pixbuf #
#######################################
tar -Jxf gdk-pixbuf-2.30.3.tar.xz
cd gdk-pixbuf-2.30.3
./configure --prefix=${INSTALL_DIR} \
--with-x11
${LDFLAGS} ${CPPFLAGS} make
sudo make install
cd ..
sudo rm -rf gdk-pixbuf-2.30.3
#######################################
# Build GTK+3 #
#######################################
tar -Jxf gtk+-3.10.7.tar.xz
cd gtk+-3.10.7
./configure --prefix=${INSTALL_DIR} \
--sysconfdir=${INSTALL_DIR}/etc \
--enable-broadway-backend \
--enable-x11-backend \
--disable-wayland-backend
${LDFLAGS} ${CPPFLAGS} make
sudo make install
cd ..
sudo rm -rf gtk+-3.10.7
#######################################