Cross-Platform build scripts for audio plugins
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

644 lines
18KB

  1. #!/bin/bash
  2. # ---------------------------------------------------------------------------------------------------------------------
  3. function download() {
  4. local name="${1}"
  5. local version="${2}"
  6. local dlbaseurl="${3}"
  7. local dlext="${4}"
  8. local dlmethod="${5}"
  9. local dlname="${6}"
  10. if [ -z "${dlext}" ]; then
  11. dlext="tar.gz"
  12. fi
  13. if [ -z "${dlname}" ]; then
  14. dlname="${name}"
  15. fi
  16. local dlfile="${PAWPAW_DOWNLOADDIR}/${dlname}-${version}.${dlext}"
  17. local dlfolder="${PAWPAW_BUILDDIR}/${name}-${version}"
  18. if [ ! -f "${dlfile}" ]; then
  19. if [ -n "${dlmethod}" ] && [ "${dlmethod}" = "git" ]; then
  20. local tmprepodir="${PAWPAW_TMPDIR}/${dlname}-${version}"
  21. rm -rf "${tmprepodir}"
  22. git clone --recursive "${dlbaseurl}" "${tmprepodir}"
  23. git -C "${tmprepodir}" checkout "${version}"
  24. git -C "${tmprepodir}" submodule update
  25. tar --exclude=".git" -czf "${dlfile}" -C "${PAWPAW_TMPDIR}" "${dlname}-${version}"
  26. rm -rf "${tmprepodir}"
  27. else
  28. local dlurl
  29. if echo ${dlbaseurl} | grep -q github.com; then
  30. if [ x"${dlmethod}" = x"nv" ]; then
  31. dlurl="${dlbaseurl}/${version}.${dlext}"
  32. else
  33. dlurl="${dlbaseurl}/v${version}.${dlext}"
  34. fi
  35. elif [ "${dlext}" = "orig.tar.gz" ]; then
  36. dlurl="${dlbaseurl}/${dlname}_${version}.${dlext}"
  37. else
  38. dlurl="${dlbaseurl}/${dlname}-${version}.${dlext}"
  39. fi
  40. curl -L "${dlurl}" -o "${dlfile}" --fail
  41. fi
  42. fi
  43. if [ ! -d "${dlfolder}" ]; then
  44. mkdir "${dlfolder}"
  45. tar -xf "${dlfile}" -C "${dlfolder}" --strip-components=1
  46. fi
  47. }
  48. function copy_download() {
  49. local name1="${1}"
  50. local name2="${2}"
  51. local version="${3}"
  52. local dlext="${4}"
  53. if [ -z "${dlext}" ]; then
  54. dlext="tar.gz"
  55. fi
  56. local dlfile1="${PAWPAW_DOWNLOADDIR}/${name1}-${version}.${dlext}"
  57. local dlfolder2="${PAWPAW_BUILDDIR}/${name2}-${version}"
  58. if [ ! -d "${dlfolder2}" ]; then
  59. mkdir "${dlfolder2}"
  60. tar -xf "${dlfile1}" -C "${dlfolder2}" --strip-components=1
  61. fi
  62. }
  63. # ---------------------------------------------------------------------------------------------------------------------
  64. function _prebuild() {
  65. local name="${1}"
  66. local pkgdir="${2}"
  67. export AR="${TARGET_AR}"
  68. export CC="${TARGET_CC}"
  69. export CXX="${TARGET_CXX}"
  70. export DLLWRAP="${TARGET_DLLWRAP}"
  71. export LD="${TARGET_LD}"
  72. export STRIP="${TARGET_STRIP}"
  73. export CFLAGS="${TARGET_CFLAGS} ${EXTRA_CFLAGS}"
  74. export CXXFLAGS="${TARGET_CXXFLAGS} ${EXTRA_CXXFLAGS}"
  75. export LDFLAGS="${TARGET_LDFLAGS} ${EXTRA_LDFLAGS}"
  76. export PKG_CONFIG_PATH="${TARGET_PKG_CONFIG_PATH}"
  77. unset CPPFLAGS
  78. export OLD_PATH="${PATH}"
  79. export PATH="${TARGET_PATH}"
  80. if [ -d "${PAWPAW_ROOT}/patches/${name}" ] && [ ! -f "${pkgdir}/.stamp_cleanup" ]; then
  81. for p in $(ls "${PAWPAW_ROOT}/patches/${name}/" | grep "\.patch" | sort); do
  82. if [ ! -f "${pkgdir}/.stamp_applied_${p}" ]; then
  83. patch -p1 -d "${pkgdir}" -i "${PAWPAW_ROOT}/patches/${name}/${p}"
  84. touch "${pkgdir}/.stamp_applied_${p}"
  85. fi
  86. done
  87. fi
  88. if [ -d "${PAWPAW_ROOT}/patches/${name}/${PAWPAW_TARGET}" ] && [ ! -f "${pkgdir}/.stamp_cleanup" ]; then
  89. for p in $(ls "${PAWPAW_ROOT}/patches/${name}/${PAWPAW_TARGET}/" | grep "\.patch" | sort); do
  90. if [ ! -f "${pkgdir}/.stamp_applied_${p}" ]; then
  91. patch -p1 -d "${pkgdir}" -i "${PAWPAW_ROOT}/patches/${name}/${PAWPAW_TARGET}/${p}"
  92. touch "${pkgdir}/.stamp_applied_${p}"
  93. fi
  94. done
  95. fi
  96. if [ ! -f "${pkgdir}/.stamp_configured" ]; then
  97. rm -f "${pkgdir}/.stamp_built"
  98. rm -f "${pkgdir}/.stamp_installed"
  99. rm -f "${pkgdir}/.stamp_verified"
  100. rm -f "${pkgdir}/CMakeCache.txt"
  101. elif [ ! -f "${pkgdir}/.stamp_built" ]; then
  102. rm -f "${pkgdir}/.stamp_installed"
  103. rm -f "${pkgdir}/.stamp_verified"
  104. elif [ ! -f "${pkgdir}/.stamp_installed" ]; then
  105. rm -f "${pkgdir}/.stamp_verified"
  106. fi
  107. }
  108. function _postbuild() {
  109. unset AR
  110. unset CC
  111. unset CXX
  112. unset DLLWRAP
  113. unset LD
  114. unset STRIP
  115. unset CFLAGS
  116. unset CPPFLAGS
  117. unset CXXFLAGS
  118. unset LDFLAGS
  119. unset PKG_CONFIG_PATH
  120. unset EXTRA_CFLAGS
  121. unset EXTRA_CXXFLAGS
  122. unset EXTRA_LDFLAGS
  123. unset EXTRA_MAKE_ARGS
  124. export PATH="${OLD_PATH}"
  125. }
  126. # ---------------------------------------------------------------------------------------------------------------------
  127. function build_autoconf() {
  128. local name="${1}"
  129. local version="${2}"
  130. local extraconfrules="${3}"
  131. local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}"
  132. if [ "${CROSS_COMPILING}" -eq 1 ]; then
  133. extraconfrules="--host=${TOOLCHAIN_PREFIX} ${extraconfrules}"
  134. fi
  135. _prebuild "${name}" "${pkgdir}"
  136. if [ ! -f "${pkgdir}/.stamp_configured" ]; then
  137. pushd "${pkgdir}"
  138. ./configure --enable-static --disable-shared --disable-debug --disable-doc --disable-docs --disable-maintainer-mode --prefix="${PAWPAW_PREFIX}" ${extraconfrules}
  139. touch .stamp_configured
  140. popd
  141. fi
  142. if [ ! -f "${pkgdir}/.stamp_built" ]; then
  143. pushd "${pkgdir}"
  144. make ${MAKE_ARGS} ${EXTRA_MAKE_ARGS}
  145. touch .stamp_built
  146. popd
  147. fi
  148. if [ ! -f "${pkgdir}/.stamp_installed" ]; then
  149. pushd "${pkgdir}"
  150. make ${MAKE_ARGS} install -j 1
  151. touch .stamp_installed
  152. popd
  153. fi
  154. _postbuild
  155. }
  156. function build_autoconfgen() {
  157. local name="${1}"
  158. local version="${2}"
  159. local extraconfrules="${3}"
  160. local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}"
  161. local EXTRA_CFLAGS2="${EXTRA_CFLAGS}"
  162. local EXTRA_CXXFLAGS2="${EXTRA_CXXFLAGS}"
  163. local EXTRA_LDFLAGS2="${EXTRA_LDFLAGS}"
  164. local EXTRA_MAKE_ARGS2="${EXTRA_MAKE_ARGS}"
  165. _prebuild "${name}" "${pkgdir}"
  166. if [ ! -f "${pkgdir}/.stamp_preconfigured" ]; then
  167. pushd "${pkgdir}"
  168. autoconf
  169. touch .stamp_preconfigured
  170. popd
  171. fi
  172. _postbuild
  173. export EXTRA_CFLAGS="${EXTRA_CFLAGS2}"
  174. export EXTRA_CXXFLAGS="${EXTRA_CXXFLAGS2}"
  175. export EXTRA_LDFLAGS="${EXTRA_LDFLAGS2}"
  176. export EXTRA_MAKE_ARGS="${EXTRA_MAKE_ARGS2}"
  177. build_autoconf "${name}" "${version}" "${extraconfrules}"
  178. }
  179. function build_conf() {
  180. local name="${1}"
  181. local version="${2}"
  182. local extraconfrules="${3}"
  183. local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}"
  184. _prebuild "${name}" "${pkgdir}"
  185. if [ ! -f "${pkgdir}/.stamp_configured" ]; then
  186. pushd "${pkgdir}"
  187. ./configure ${extraconfrules}
  188. touch .stamp_configured
  189. popd
  190. fi
  191. if [ ! -f "${pkgdir}/.stamp_built" ]; then
  192. pushd "${pkgdir}"
  193. make ${MAKE_ARGS} ${EXTRA_MAKE_ARGS}
  194. touch .stamp_built
  195. popd
  196. fi
  197. if [ ! -f "${pkgdir}/.stamp_installed" ]; then
  198. pushd "${pkgdir}"
  199. make ${MAKE_ARGS} -j 1 install
  200. touch .stamp_installed
  201. popd
  202. fi
  203. _postbuild
  204. }
  205. function build_cmake() {
  206. local name="${1}"
  207. local version="${2}"
  208. local extraconfrules="${3}"
  209. local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}"
  210. if [ "${CROSS_COMPILING}" -eq 1 ]; then
  211. extraconfrules+=" -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}"
  212. fi
  213. if [ "${MACOS}" -eq 1 ]; then
  214. if [ "${MACOS_OLD}" -eq 1 ]; then
  215. OSX_ARCHS="i686"
  216. OSX_TARGET="10.5"
  217. elif [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
  218. OSX_ARCHS="arm64;x86_64"
  219. OSX_TARGET="10.12"
  220. else
  221. OSX_ARCHS="x86_64"
  222. OSX_TARGET="10.8"
  223. fi
  224. extraconfrules+=" -DCMAKE_OSX_ARCHITECTURES=${OSX_ARCHS}"
  225. extraconfrules+=" -DCMAKE_OSX_DEPLOYMENT_TARGET=${OSX_TARGET}"
  226. fi
  227. _prebuild "${name}" "${pkgdir}"
  228. mkdir -p "${pkgdir}/build"
  229. if [ ! -f "${pkgdir}/.stamp_configured" ]; then
  230. pushd "${pkgdir}/build"
  231. cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_PREFIX="${PAWPAW_PREFIX}" ${extraconfrules} ..
  232. touch ../.stamp_configured
  233. popd
  234. fi
  235. if [ ! -f "${pkgdir}/.stamp_built" ]; then
  236. pushd "${pkgdir}/build"
  237. make ${MAKE_ARGS} ${EXTRA_MAKE_ARGS}
  238. touch ../.stamp_built
  239. popd
  240. fi
  241. if [ ! -f "${pkgdir}/.stamp_installed" ]; then
  242. pushd "${pkgdir}/build"
  243. make ${MAKE_ARGS} -j 1 install
  244. touch ../.stamp_installed
  245. popd
  246. fi
  247. _postbuild
  248. }
  249. function build_make() {
  250. local name="${1}"
  251. local version="${2}"
  252. local extraconfrules="${3}"
  253. local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}"
  254. _prebuild "${name}" "${pkgdir}"
  255. touch "${pkgdir}/.stamp_configured"
  256. if [ ! -f "${pkgdir}/.stamp_built" ]; then
  257. pushd "${pkgdir}"
  258. make PREFIX="${PAWPAW_PREFIX}" PKG_CONFIG="${TARGET_PKG_CONFIG}" ${MAKE_ARGS} ${extraconfrules}
  259. touch .stamp_built
  260. popd
  261. fi
  262. if [ ! -f "${pkgdir}/.stamp_installed" ]; then
  263. pushd "${pkgdir}"
  264. make PREFIX="${PAWPAW_PREFIX}" PKG_CONFIG="${TARGET_PKG_CONFIG}" ${MAKE_ARGS} ${extraconfrules} -j 1 install
  265. touch .stamp_installed
  266. popd
  267. fi
  268. _postbuild
  269. }
  270. function build_meson() {
  271. local name="${1}"
  272. local version="${2}"
  273. local extraconfrules="${3}"
  274. local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}"
  275. if [ "${CROSS_COMPILING}" -eq 1 ]; then
  276. extraconfrules="--cross-file "${PAWPAW_ROOT}/setup/meson/${PAWPAW_TARGET}.ini" ${extraconfrules}"
  277. fi
  278. _prebuild "${name}" "${pkgdir}"
  279. if [ ! -f "${pkgdir}/.stamp_configured" ]; then
  280. pushd "${pkgdir}"
  281. meson build --buildtype release --prefix "${PAWPAW_PREFIX}" ${extraconfrules}
  282. touch .stamp_configured
  283. popd
  284. fi
  285. if [ ! -f "${pkgdir}/.stamp_built" ]; then
  286. pushd "${pkgdir}"
  287. ninja -v -C build
  288. touch .stamp_built
  289. popd
  290. fi
  291. if [ ! -f "${pkgdir}/.stamp_installed" ]; then
  292. pushd "${pkgdir}"
  293. ninja -C build install
  294. touch .stamp_installed
  295. popd
  296. fi
  297. _postbuild
  298. }
  299. function build_python() {
  300. local name="${1}"
  301. local version="${2}"
  302. local extraconfrules="${3}"
  303. local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}"
  304. local python=python3
  305. if [ ! -e "${PAWPAW_PREFIX}/bin/python3" ] && ! which python3 > /dev/null; then
  306. python=python
  307. fi
  308. _prebuild "${name}" "${pkgdir}"
  309. # fix build of python packages
  310. export CFLAGS="$(echo ${CFLAGS} | sed -e 's/-fvisibility=hidden//')"
  311. export CFLAGS="$(echo ${CFLAGS} | sed -e 's/-ffast-math//')"
  312. export CFLAGS="$(echo ${CFLAGS} | sed -e 's/-fdata-sections -ffunction-sections//')"
  313. export CXXFLAGS="$(echo ${CXXFLAGS} | sed -e 's/-fvisibility=hidden//')"
  314. export CXXFLAGS="$(echo ${CXXFLAGS} | sed -e 's/-ffast-math//')"
  315. export CXXFLAGS="$(echo ${CXXFLAGS} | sed -e 's/-fvisibility-inlines-hidden//')"
  316. export CXXFLAGS="$(echo ${CXXFLAGS} | sed -e 's/-fdata-sections -ffunction-sections//')"
  317. export LDFLAGS="$(echo ${LDFLAGS} | sed -e 's/-Wl,-dead_strip -Wl,-dead_strip_dylibs//')"
  318. export LDFLAGS="$(echo ${LDFLAGS} | sed -e 's/-fdata-sections -ffunction-sections//')"
  319. touch "${pkgdir}/.stamp_configured"
  320. if [ ! -f "${pkgdir}/.stamp_built" ]; then
  321. pushd "${pkgdir}"
  322. ${python} setup.py build ${extraconfrules}
  323. touch .stamp_built
  324. popd
  325. fi
  326. if [ ! -f "${pkgdir}/.stamp_installed" ]; then
  327. pushd "${pkgdir}"
  328. ${python} setup.py install --prefix="${PAWPAW_PREFIX}" ${extraconfrules}
  329. touch .stamp_installed
  330. popd
  331. fi
  332. _postbuild
  333. }
  334. function build_qmake() {
  335. local name="${1}"
  336. local version="${2}"
  337. local extraconfrules="${3}"
  338. local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}"
  339. _prebuild "${name}" "${pkgdir}"
  340. if [ ! -f "${pkgdir}/.stamp_configured" ]; then
  341. pushd "${pkgdir}"
  342. qmake ${extraconfrules}
  343. touch .stamp_configured
  344. popd
  345. fi
  346. if [ ! -f "${pkgdir}/.stamp_built" ]; then
  347. pushd "${pkgdir}"
  348. make ${MAKE_ARGS} ${EXTRA_MAKE_ARGS}
  349. touch .stamp_built
  350. popd
  351. fi
  352. if [ ! -f "${pkgdir}/.stamp_installed" ]; then
  353. pushd "${pkgdir}"
  354. make ${MAKE_ARGS} -j 1 install
  355. touch .stamp_installed
  356. popd
  357. fi
  358. _postbuild
  359. }
  360. function build_waf() {
  361. local name="${1}"
  362. local version="${2}"
  363. local extraconfrules="${3}"
  364. local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}"
  365. local python=python3
  366. if ! which python3 > /dev/null; then
  367. python=python
  368. fi
  369. _prebuild "${name}" "${pkgdir}"
  370. if [ ! -f "${pkgdir}/.stamp_configured" ]; then
  371. pushd "${pkgdir}"
  372. ${python} waf configure --prefix="${PAWPAW_PREFIX}" ${extraconfrules}
  373. touch .stamp_configured
  374. popd
  375. fi
  376. if [ ! -f "${pkgdir}/.stamp_built" ]; then
  377. pushd "${pkgdir}"
  378. ${python} waf build ${WAF_ARGS}
  379. touch .stamp_built
  380. popd
  381. fi
  382. if [ ! -f "${pkgdir}/.stamp_installed" ]; then
  383. pushd "${pkgdir}"
  384. ${python} waf install ${WAF_ARGS} --prefix="${PAWPAW_PREFIX}" ${extraconfrules} -j 1
  385. rm -f ${PAWPAW_PREFIX}/lib/lv2/*/*.a
  386. touch .stamp_installed
  387. popd
  388. fi
  389. _postbuild
  390. }
  391. # ---------------------------------------------------------------------------------------------------------------------
  392. function build_host_autoconf() {
  393. local name="${1}"
  394. local version="${2}"
  395. local extraconfrules="${3}"
  396. local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}"
  397. unset AR
  398. unset CC
  399. unset CXX
  400. unset LD
  401. unset STRIP
  402. unset CFLAGS
  403. unset CPPFLAGS
  404. unset CXXFLAGS
  405. unset LDFLAGS
  406. if [ ! -f "${pkgdir}/.stamp_configured" ]; then
  407. pushd "${pkgdir}"
  408. ./configure --enable-static --disable-shared --disable-maintainer-mode --prefix="${PAWPAW_PREFIX}" ${extraconfrules}
  409. touch .stamp_configured
  410. popd
  411. fi
  412. if [ ! -f "${pkgdir}/.stamp_built" ]; then
  413. pushd "${pkgdir}"
  414. make ${MAKE_ARGS}
  415. touch .stamp_built
  416. popd
  417. fi
  418. if [ ! -f "${pkgdir}/.stamp_installed" ]; then
  419. pushd "${pkgdir}"
  420. make ${MAKE_ARGS} install -j 1
  421. touch .stamp_installed
  422. popd
  423. fi
  424. }
  425. # ---------------------------------------------------------------------------------------------------------------------
  426. function patch_file() {
  427. local name="${1}"
  428. local version="${2}"
  429. local file="${3}"
  430. local rule="${4}"
  431. local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}"
  432. if [ -e "${pkgdir}/${file}" ]; then
  433. sed -i -e "${rule}" "${pkgdir}/${file}"
  434. fi
  435. }
  436. function copy_file() {
  437. local name="${1}"
  438. local version="${2}"
  439. local source="${3}"
  440. local target="${4}"
  441. local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}"
  442. if [ ! -e "${pkgdir}/${target}" ] || [ "${source}" -nt "${target}" ]; then
  443. pushd "${pkgdir}"
  444. cp -v "${source}" "${target}"
  445. popd
  446. fi
  447. }
  448. function install_file() {
  449. local name="${1}"
  450. local version="${2}"
  451. local source="${3}"
  452. local targetdir="${4}"
  453. local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}"
  454. if [ ! -e "${PAWPAW_PREFIX}/${targetdir}/$(basename ${source})" ]; then
  455. pushd "${pkgdir}"
  456. cp -v "${source}" "${PAWPAW_PREFIX}/${targetdir}/"
  457. popd
  458. fi
  459. }
  460. function link_file() {
  461. local name="${1}"
  462. local version="${2}"
  463. local source="${3}"
  464. local target="${4}"
  465. local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}"
  466. if [ ! -e "${pkgdir}/${target}" ]; then
  467. pushd "${pkgdir}"
  468. ln -sfv "${source}" "${target}"
  469. popd
  470. fi
  471. }
  472. function remove_file() {
  473. local name="${1}"
  474. local version="${2}"
  475. local file="${3}"
  476. local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}"
  477. if [ -e "${pkgdir}/${file}" ]; then
  478. rm -fv "${pkgdir}/${file}"
  479. fi
  480. }
  481. # ---------------------------------------------------------------------------------------------------------------------
  482. function patch_osx_binary_libs() {
  483. local file="${1}"
  484. if [ -L "${file}" ]; then
  485. return 0
  486. fi
  487. idname=$(otool -D "${file}")
  488. if otool -L "${file}" | grep -v ":" | grep -v "${idname}" | grep -q "${PAWPAW_PREFIX}"; then
  489. #install_name_tool -change "@rpath/QtCore.framework/Versions/5/QtCore" "@executable_path/QtCore" "${file}"
  490. #install_name_tool -change "@rpath/QtGui.framework/Versions/5/QtGui" "@executable_path/QtGui" "${file}"
  491. #install_name_tool -change "@rpath/QtWidgets.framework/Versions/5/QtWidgets" "@executable_path/QtWidgets" "${file}"
  492. #install_name_tool -change "@rpath/QtXml.framework/Versions/5/QtXml" "@executable_path/QtXml" "${file}"
  493. install_name_tool -change "@executable_path/../Frameworks/libjack.0.dylib" "/usr/local/lib/libjack.0.dylib" "${file}"
  494. install_name_tool -change "${PAWPAW_PREFIX}/jack2/lib/libjack.0.dylib" "/usr/local/lib/libjack.0.dylib" "${file}"
  495. install_name_tool -change "${PAWPAW_PREFIX}/jack2/lib/libjacknet.0.dylib" "/usr/local/lib/libjacknet.0.dylib" "${file}"
  496. install_name_tool -change "${PAWPAW_PREFIX}/jack2/lib/libjackserver.0.dylib" "/usr/local/lib/libjackserver.0.dylib" "${file}"
  497. fi
  498. }
  499. function patch_osx_qtapp() {
  500. local name="${1}"
  501. local version="${2}"
  502. local appfile="${3}"
  503. local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}"
  504. _prebuild "${name}" "${pkgdir}"
  505. mkdir -p "${appfile}/Contents/PlugIns/platforms"
  506. mkdir -p "${appfile}/Contents/PlugIns/printsupport"
  507. cp -v "${PAWPAW_PREFIX}/lib/qt5/plugins/platforms/libqcocoa.dylib" "${appfile}/Contents/PlugIns/platforms/"
  508. cp -v "${PAWPAW_PREFIX}/lib/qt5/plugins/printsupport/libcocoaprintersupport.dylib" "${appfile}/Contents/PlugIns/printsupport/"
  509. macdeployqt "${appfile}"
  510. rm -f "${appfile}/Contents/Frameworks/libjack.0.dylib"
  511. _postbuild
  512. }
  513. # ---------------------------------------------------------------------------------------------------------------------