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