Debian Codegraph @

build/Linux+BSD/portable/copy-libs

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 # Usage: copy-libs $share_path
4
5 # This file is designed to run on CentOS 6.7 but may work on other systems.
6
7 mainscip-shell shell shell-project 0.0.0 main().() {
8 # Set sources:
9 qt_prefix="$(locateQt)"
10 echoscip-shell system . . echo. "qt_prefix: $qt_prefix"
11
12 # Set destinations:
13 [scip-shell system . . `[`. "$1" ] && share_path="$1" || share_path="."
14 lib_dest="$share_path/lib"
15 qt_dest="$lib_dest/qt5"
16 opt_dest="$share_path/optional" # Workaround for Jack library loading
17 echoscip-shell system . . echo. "lib_dest: $lib_dest"
18 echoscip-shell system . . echo. "qt_dest: $qt_dest"
19
20 num_failures=0 # store number of libraries that couldn't be copied
21 getCrossPlatformDependenciesscip-shell shell shell-project 0.0.0 getCrossPlatformDependencies().
22
23 # get linux-specific dependencies, based on which distro is making the AppImage
24 if [scip-shell system . . `[`. "$(grepscip-shell system . . grep. "Debian GNU/Linux 8 (jessie)" /etc/*release*)" ]; then
25 building_on_Debian_Jessiescip-shell shell shell-project 0.0.0 building_on_Debian_Jessie(). # aka "Debian 8"
26 elif [scip-shell system . . `[`. "$(grepscip-shell system . . grep. "CentOS release 6" /etc/*release*)" ]; then
27 building_on_CentOS_6scip-shell shell shell-project 0.0.0 building_on_CentOS_6().
28 elif [scip-shell system . . `[`. "$(grepscip-shell system . . grep. "Ubuntu precise (12.04.* LTS)" /etc/*release*)" ]; then
29 building_on_Ubuntu_12-04scip-shell shell shell-project 0.0.0 building_on_Ubuntu_12-04().
30 else
31 echoscip-shell system . . echo. "${0}: Warning: Not running on a supported build system!" >&2
32 # Try to fetch all dependencies, just in case
33 building_on_CentOS_6scip-shell shell shell-project 0.0.0 building_on_CentOS_6().
34 fi
35
36 if [scip-shell system . . `[`. "$num_failures" != "0" ]; then
37 echoscip-shell system . . echo. "Error: $num_failures libraries couldn't be copied."
38 exit 1
39 fi
40 }
41
42 ##########################################################################
43 # LINUX EQUIVALENTS OF WINDOWS DEPENDENCIES (see "mscore/CMakeLists.txt")
44 ##########################################################################
45 getCrossPlatformDependenciesscip-shell shell shell-project 0.0.0 getCrossPlatformDependencies().() {
46 # Non-Qt dependencies (see "mscore/CMakeLists.txt")
47 dest_dir="$lib_dest"
48 #copyLib libgcc_s_dw2-1.so # Assume provided by system
49 #copyLib libstdc++-6.so # Assume provided by system
50 #copyLib libwinpthread-1.so # Assume provided by system
51 #copyLib libogg.so # Assume provided by system
52 #copyLib libsndfile-1.so # Assume provided by system
53 #copyLib libvorbis.so # Assume provided by system
54 #copyLib libvorbisfile.so # Assume provided by system
55 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libportaudio.so.2
56 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libportmidi.so
57 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libporttime.so
58 #copyLib libeay32.so # Assume provided by system
59 #copyLib ssleay32.so # Assume provided by system
60
61 # Qt base dependencies (see "mscore/CMakeLists.txt")
62 dest_dir="$qt_dest/lib"
63 #dest_dir="$lib_dest"
64
65 #icudata, icui18n, & icuuc have version numbers (.52 when build on jessie,
66 #.42 on centos) so moved to cross-platform for the time being.
67 #copyLib libicudata.so #icudt53.dll # Needed by Ubuntu 12.04
68 #copyLib libicui18n.so #libicuin53.so.5 # Needed by Ubuntu 12.04
69 #copyLib libicuuc.so #libicuuc53.so.5 # Needed by Ubuntu 12.04
70
71 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5CLucene.so.5
72 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5Core.so.5
73 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5Gui.so.5
74 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5Help.so.5
75 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5Multimedia.so.5
76 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5MultimediaWidgets.so.5
77 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5Network.so.5
78 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5OpenGL.so.5
79 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5Positioning.so.5
80 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5PrintSupport.so.5
81 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5Qml.so.5
82 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5Quick.so.5
83 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5Sensors.so.5
84 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5Sql.so.5
85 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5Svg.so.5
86 #copyLib libQt5WebChannel.so.5 # Not present on Debian, and apparently not needed
87 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5WebKit.so.5
88 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5WebKitWidgets.so.5
89 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5Widgets.so.5
90 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5XmlPatterns.so.5
91 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5Xml.so.5
92
93 # Qt components (see "mscore/CMakeLists.txt")
94 copyQtscip-shell shell shell-project 0.0.0 copyQt(). plugins/iconengines/libqsvgicon.so
95
96 copyQtscip-shell shell shell-project 0.0.0 copyQt(). plugins/imageformats/libqjpeg.so
97 copyQtscip-shell shell shell-project 0.0.0 copyQt(). plugins/imageformats/libqmng.so
98 copyQtscip-shell shell shell-project 0.0.0 copyQt(). plugins/imageformats/libqsvg.so
99 copyQtscip-shell shell shell-project 0.0.0 copyQt(). plugins/imageformats/libqtiff.so
100
101 copyQtscip-shell shell shell-project 0.0.0 copyQt(). plugins/platforms/libqxcb.so #qwindows.dll
102
103 copyQtscip-shell shell shell-project 0.0.0 copyQt(). plugins/printsupport/libcupsprintersupport.so #windowsprintersupport.dll
104
105 copyQtscip-shell shell shell-project 0.0.0 copyQt(). plugins/sqldrivers/libqsqlite.so
106
107 # recursively copy everything in the Qt QML directory
108 # except some as listed in "mscore/CMakeLists.txt".
109 export -f copy copyQt # make functions available to xargs
110 findscip-shell system . . find. "$qt_prefix/qml" \! -type d \
111 | grepscip-shell system . . grep. -vE "QtGraphicalEffects|QtMultimedia|QtSensors|QtTest|QtWebKit" \
112 | sedscip-shell system . . sed. "s|$qt_prefix/||" | xargsscip-shell system . . xargs. -n1 -I '%%%' \
113 bash -c "qt_prefix='$qt_prefix' qt_dest='$qt_dest' copyQt %%%"
114 }
115
116 ##########################################################################
117 # LINUX-ONLY DEPENDENCIES (no equivalents in "mscore/CMakeLists.txt")
118 # These differ depending on the distribution used to build the AppImage.
119 # Note: always check the oldest supported distribution first
120 ##########################################################################
121
122 ########################################################
123 # copy libs specific if building on Debian 8 "Jessie"
124 ########################################################
125 building_on_Debian_Jessiescip-shell shell shell-project 0.0.0 building_on_Debian_Jessie().() {
126 dest_dir="$lib_dest"
127 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libasound.so.2
128 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libcups.so.2
129 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libdbus-1.so && mvscip-shell system . . mv. "$dest_dir/libdbus-1.so" "$dest_dir/libdbus-1.so.3" #renamed to .3 because didn't exist in arm, and don't want x86-64 fallback version
130 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libEGL.so.1
131 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libfontconfig.so.1
132 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libfreetype.so.6
133 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libGLESv2.so.2
134 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libglib-2.0.so && mvscip-shell system . . mv. "$dest_dir/libglib-2.0.so" "$dest_dir/libglib-2.0.so.0" #renamed to .0 cause didn't have
135 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libgobject-2.0.so.0
136 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libgstapp-0.10.so.0
137 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libgstbase-0.10.so.0
138 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libgstinterfaces-0.10.so.0
139 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libgstpbutils-0.10.so.0
140 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libgstreamer-0.10.so.0
141 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libgstvideo-0.10.so.0
142 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libharfbuzz.so.0
143 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libICE.so.6
144 copyLibscip-shell shell shell-project 0.0.0 copyLib(). liblcms2.so.2
145 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libogg.so.0
146 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libSM.so.6
147 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libsndfile.so.1
148 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libsqlite3.so.0
149 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libtiff.so.5
150 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libvorbis.so.0
151 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libvorbisfile.so.3
152 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libwebp.so.5
153 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libX11-xcb.so.1
154 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libX11.so.6
155 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libxcb-icccm.so.4
156 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libxcb-image.so.0
157 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libxcb-keysyms.so.1
158 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libxcb-randr.so.0
159 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libxcb-render-util.so.0
160 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libxcb-render.so.0
161 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libxcb-shape.so.0
162 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libxcb-shm.so.0
163 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libxcb-sync.so.1
164 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libxcb-xfixes.so.0
165 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libxcb-xkb.so.1
166 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libxcb.so.1
167 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libXi.so.6
168 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libxkbcommon-x11.so.0
169 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libxkbcommon.so.0
170 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libxml2.so.2
171 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libxslt.so.1
172
173 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libicudata.so.52 # moved from cross-platform
174 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libicui18n.so.52 # moved from cross-platform
175 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libicuuc.so.52 # moved from cross-platform
176
177 #2nd round of dependencies
178 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libavahi-client.so.3
179 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libavahi-common.so.3
180 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libdrm.so.2
181 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libexpat.so && mvscip-shell system . . mv. "$dest_dir/libexpat.so" "$dest_dir/libexpat.so.1" #renamed to .1 cause didn't have
182 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libffi.so.6
183 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libFLAC.so.8
184 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libgbm.so.1
185 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libglapi.so.0
186 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libgmodule-2.0.so.0
187 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libgnutls-deb0.so.28
188 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libgraphite2.so.3
189 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libgssapi_krb5.so.2
190 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libgthread-2.0.so.0
191 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libjbig.so.0
192 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libjson-c.so && mvscip-shell system . . mv. "$dest_dir/libjson-c.so" "$dest_dir/libjson-c.so.2" #renamed to .2 cause didn't have
193 copyLibscip-shell shell shell-project 0.0.0 copyLib(). liborc-0.4.so.0
194 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libvorbisenc.so.2
195 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libwayland-client.so.0
196 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libwayland-server.so.0
197 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libXau.so.6
198 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libxcb-dri2.so.0
199 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libxcb-util.so.0
200 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libXdmcp.so.6
201 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libXext.so.6
202
203 #3rd round of dependencies
204 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libasyncns.so.0
205 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libgmp.so.10
206 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libhogweed.so.2
207 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libjpeg.so.62
208 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libk5crypto.so.3
209 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libkeyutils.so && mvscip-shell system . . mv. "$dest_dir/libkeyutils.so" "$dest_dir/libkeyutils.so.1" #renamed to .1 cause didn't have
210 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libkrb5.so.3
211 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libkrb5support.so.0
212 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libmng.so.1
213 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libnettle.so.4
214 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libp11-kit.so.0
215 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libpng12.so.0
216
217 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libtasn1.so.6
218 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libwrap.so.0
219 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libXtst.so.6
220 dest_dir="$qt_dest/lib"
221 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5Concurrent.so.5
222 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5DBus.so.5
223 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5Designer.so.5
224 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5QuickWidgets.so.5
225 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5Test.so.5
226
227 #jessie doesn't seem to have the following, although in sid this is provided by libqt5gui5
228 #copyLib libQt5XcbQpa.so.5
229 #copyQt plugins/xcbglintegrations/libqxcb-glx-integration.so # Needed by plugins which open a window
230
231 #needed by Arch Linux
232 dest_dir="$lib_dest"
233 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libpcre.so.3
234
235 # needed if don't have pulseaudio installed (e.g. in a minimal chroot on Android)
236 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libpulse.so.0
237 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libpulsecommon-5.0.so
238
239 # Workaround for Jack library
240 dest_dir="$opt_dest"
241 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libjack.so.0
242 # If AppImage is run with alsa, then will complain:
243 # "Cannot open shared library /usr/lib/arm-linux-gnueabihf/alsa-lib/libasound_module_pcm_pulse.so"
244 # but cannot seem to figure out how to get the AppImage, so exclude for now, hopefully figure out later.
245 #dest_dir="$lib_dest/alsa-lib"
246 #copyLib libasound_module_pcm_pulse.so #can add, but if mscore run without alsa, will complain missing
247 }
248
249 building_on_CentOS_6scip-shell shell shell-project 0.0.0 building_on_CentOS_6().() {
250 # Needed by Centos 6.7:
251 dest_dir="$lib_dest"
252 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libopenal.so.1
253 dest_dir="$qt_dest/lib"
254 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5Concurrent.so.5
255 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5DBus.so.5
256 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5Designer.so.5
257 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5QuickWidgets.so.5
258 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5Test.so.5
259 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5XcbQpa.so.5
260 copyQtscip-shell shell shell-project 0.0.0 copyQt(). plugins/xcbglintegrations/libqxcb-glx-integration.so # Needed by plugins which open a window
261
262 # Needed by Ubuntu 12.04:
263 dest_dir="$lib_dest"
264 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libcrypto.so.10
265 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libjpeg.so.62
266 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libssl.so.10
267 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libtiff.so.3
268 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libicudata.so.42 # moved from cross-platform
269 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libicui18n.so.42 # moved from cross-platform
270 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libicuuc.so.42 # moved from cross-platform
271
272 # Needed by Fedora 22:
273 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libmng.so.1
274 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libpng12.so.0
275 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libudev.so.0
276 copyLibscip-shell shell shell-project 0.0.0 copyLib(). liblcms.so.1
277
278 # Workaround for Jack library
279 dest_dir="$opt_dest"
280 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libjack.so.0
281
282 # Needed if don't have pulseaudio installed. Ignoring, since only advanced distros
283 # like Arch, Gentoo, Debian minimal, servers, etc. don't have pulse installed.
284 #copyLib libpulse.so.0
285 #copyLib libpulsecommon-8.0.so
286 #copyLib libasound_module_pcm_pulse.so # found in /usr/lib64/alsa-lib/
287 }
288
289 building_on_Ubuntu_12-04scip-shell shell shell-project 0.0.0 building_on_Ubuntu_12-04().() {
290 # Needed by Ubuntu 12.04
291 dest_dir="$lib_dest"
292 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libopenal.so.1
293
294 dest_dir="$qt_dest/lib"
295 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libEnginio.so.1
296 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libicui18n.so.53
297 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libicuuc.so.53
298 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libicudata.so.53
299 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5Bluetooth.so.5
300 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5DBus.so.5
301 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5Location.so.5
302 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5Nfc.so.5
303 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5QuickParticles.so.5
304 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5WebChannel.so.5
305 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5WebEngine.so.5
306 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5WebSockets.so.5
307 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5WebView.so.5
308 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libQt5WebEngineCore.so.5
309
310 # Needed by Fedora 22
311 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libgstapp-0.10.so.0
312 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libgstbase-0.10.so.0
313 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libgstinterfaces-0.10.so.0
314 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libgstpbutils-0.10.so.0
315 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libgstreamer-0.10.so.0
316 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libgstvideo-0.10.so.0
317
318 # Workaround for Jack library
319 dest_dir="$opt_dest"
320 copyLibscip-shell shell shell-project 0.0.0 copyLib(). libjack.so.0
321 }
322
323 locateLibscip-shell shell shell-project 0.0.0 locateLib().() {
324 # First search $LD_LIBRARY_PATH
325 declare -a dir_array
326 IFS=':' read -ra dir_array <<< "${LD_LIBRARY_PATH}"
327 for d in "${dir_array[@]}"; do
328 if [scip-shell system . . `[`. -e "$d/$1" ]; then
329 echoscip-shell system . . echo. "$d/$1"
330 return
331 else
332 path="$(lsscip-shell system . . ls. "$d/$1."* | grepscip-shell system . . grep. -Em1 "$1.[0-9]+")"
333 if [scip-shell system . . `[`. "$path" ]; then
334 echoscip-shell system . . echo. "$path"
335 return
336 fi
337 fi
338 done
339 # If it wasn't found then search library cache
340 local path="$(ldconfigscip-shell system . . ldconfig. -p | awkscip-shell system . . awk. '{print $4}' | grepscip-shell system . . grep. "$1" | headscip-shell system . . head. -n1)"
341 [scip-shell system . . `[`. "$path" ] || echoscip-shell system . . echo. "$1 not found." >&2
342 echoscip-shell system . . echo. "$path"
343 }
344
345 locateQtscip-shell shell shell-project 0.0.0 locateQt().() {
346 local file="plugins/platforms/libqxcb.so"
347 local core_path="$(dirnamescip-shell system . . dirname. "$(locateLibscip-shell shell shell-project 0.0.0 locateLib(). "libQt5Core.so.5")")"
348 while [scip-shell system . . `[`. true ]; do
349 path="$(lsscip-shell system . . ls. "$core_path/../$file" 2>/dev/nullscip-shell filesystem . . `/dev/null`.)"
350 [scip-shell system . . `[`. "$path" ] && break
351 # Some distros package Qt plugins in weird places...
352 path="$(lsscip-shell system . . ls. "$core_path/qt5/$file" 2>/dev/nullscip-shell filesystem . . `/dev/null`.)"
353 [scip-shell system . . `[`. "$path" ] && break
354 path="$(findscip-shell system . . find. "$core_path" -name "$(basenamescip-shell system . . basename. "$file")" 2>/dev/nullscip-shell filesystem . . `/dev/null`.)" && break
355 [scip-shell system . . `[`. "$path" ] && break
356 # Still not found... Look everywhere except places that might give false
357 # positive. Probably best not enable this as as it might find the wrong Qt.
358 # path="$(locate "$file" | grep -vEm1 "MuseScore|QtCreator")"
359 # [ "$path" ] && break
360 echoscip-shell system . . echo. "$0: Couldn't find Qt." >&2
361 return 1
362 done
363 for i in {1..3}; do
364 path="$(dirnamescip-shell system . . dirname. "$path")"
365 done
366 echoscip-shell system . . echo. $path
367 }
368
369 copyscip-shell shell shell-project 0.0.0 copy().() {
370 echoscip-shell system . . echo. "$0: copying $1 to $dest_dir"
371 mkdirscip-shell system . . mkdir. -p "$dest_dir"
372 cpscip-shell system . . cp. -L -u "$1" -t "$dest_dir" || num_failures="$(($num_failures+1))"
373 }
374
375 copyLibscip-shell shell shell-project 0.0.0 copyLib().() {
376 copyscip-shell shell shell-project 0.0.0 copy(). "$(locateLibscip-shell shell shell-project 0.0.0 locateLib(). $1)"
377 }
378
379 copyQtscip-shell shell shell-project 0.0.0 copyQt().() {
380 dest_dir="$qt_dest/$(dirnamescip-shell system . . dirname. "$1")"
381 copyscip-shell shell shell-project 0.0.0 copy(). "$qt_prefix/$1"
382 }
383
384 mainscip-shell shell shell-project 0.0.0 main(). "$@"