Audio plugin host https://kx.studio/carla
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.

585 lines
20KB

  1. #!/bin/bash
  2. # NOTE: You need the following packages installed via MacPorts:
  3. # automake, autoconf, bison, flex, libtool
  4. # p5-libxml-perl, p5-xml-libxml, p7zip, pkgconfig
  5. # ------------------------------------------------------------------------------------
  6. # stop on error
  7. set -e
  8. # ------------------------------------------------------------------------------------
  9. # cd to correct path
  10. if [ -f Makefile ]; then
  11. cd data/macos
  12. fi
  13. # ---------------------------------------------------------------------------------------------------------------------
  14. # set variables
  15. source common.env
  16. # ------------------------------------------------------------------------------------
  17. # function to remove old stuff
  18. cleanup()
  19. {
  20. rm -rf $TARGETDIR/carla/ $TARGETDIR/carla32/ $TARGETDIR/carla64/
  21. rm -rf cx_Freeze-*
  22. rm -rf Python-*
  23. rm -rf PyQt-*
  24. rm -rf PyQt5_*
  25. rm -rf file-*
  26. rm -rf flac-*
  27. rm -rf fltk-*
  28. rm -rf fluidsynth-*
  29. rm -rf fftw-*
  30. rm -rf gettext-*
  31. rm -rf glib-*
  32. rm -rf libffi-*
  33. rm -rf libgig-*
  34. rm -rf liblo-*
  35. rm -rf libogg-*
  36. rm -rf libsndfile-*
  37. rm -rf libvorbis-*
  38. rm -rf linuxsampler-*
  39. rm -rf mxml-*
  40. rm -rf pkg-config-*
  41. rm -rf pyliblo-*
  42. rm -rf qtbase-*
  43. rm -rf qtmacextras-*
  44. rm -rf qtsvg-*
  45. rm -rf sip-*
  46. rm -rf zlib-*
  47. rm -rf PaxHeaders.*
  48. }
  49. # ------------------------------------------------------------------------------------
  50. # function to build base libs
  51. build_base()
  52. {
  53. export CC=clang
  54. export CXX=clang++
  55. export PREFIX=${TARGETDIR}/carla${ARCH}
  56. export PATH=${PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
  57. export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
  58. export CFLAGS="-O3 -mtune=generic -msse -msse2 -mfpmath=sse -fvisibility=hidden -fdata-sections -ffunction-sections"
  59. export CFLAGS="${CFLAGS} -fPIC -DPIC -DNDEBUG -I${PREFIX}/include -m${ARCH}"
  60. export CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
  61. export LDFLAGS="-fdata-sections -ffunction-sections -Wl,-dead_strip -Wl,-dead_strip_dylibs"
  62. export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib -m${ARCH}"
  63. # ------------------------------------------------------------------------------------
  64. # pkgconfig
  65. if [ ! -d pkg-config-${PKG_CONFIG_VERSION} ]; then
  66. curl -O https://pkg-config.freedesktop.org/releases/pkg-config-${PKG_CONFIG_VERSION}.tar.gz
  67. tar -xf pkg-config-${PKG_CONFIG_VERSION}.tar.gz
  68. fi
  69. if [ ! -f pkg-config-${PKG_CONFIG_VERSION}_$ARCH/build-done ]; then
  70. cp -r pkg-config-${PKG_CONFIG_VERSION} pkg-config-${PKG_CONFIG_VERSION}_$ARCH
  71. cd pkg-config-${PKG_CONFIG_VERSION}_$ARCH
  72. ./configure --enable-indirect-deps --with-internal-glib --with-pc-path=$PKG_CONFIG_PATH --prefix=${PREFIX}
  73. make ${MAKE_ARGS}
  74. make install
  75. touch build-done
  76. cd ..
  77. fi
  78. # ------------------------------------------------------------------------------------
  79. # liblo
  80. if [ ! -d liblo-${LIBLO_VERSION} ]; then
  81. curl -L http://download.sourceforge.net/liblo/liblo-${LIBLO_VERSION}.tar.gz -o liblo-${LIBLO_VERSION}.tar.gz
  82. tar -xf liblo-${LIBLO_VERSION}.tar.gz
  83. fi
  84. if [ ! -f liblo-${LIBLO_VERSION}_$ARCH/build-done ]; then
  85. cp -r liblo-${LIBLO_VERSION} liblo-${LIBLO_VERSION}_$ARCH
  86. cd liblo-${LIBLO_VERSION}_$ARCH
  87. ./configure --enable-static --disable-shared --prefix=${PREFIX} \
  88. --enable-threads \
  89. --disable-examples --disable-tools
  90. make ${MAKE_ARGS}
  91. make install
  92. touch build-done
  93. cd ..
  94. fi
  95. # ------------------------------------------------------------------------------------
  96. if [ x"${ARCH}" = x"32" ]; then
  97. return
  98. fi
  99. # ------------------------------------------------------------------------------------
  100. # file/magic
  101. if [ ! -d file-${FILE_VERSION} ]; then
  102. curl -O ftp://ftp.astron.com/pub/file/file-${FILE_VERSION}.tar.gz
  103. tar -xf file-${FILE_VERSION}.tar.gz
  104. fi
  105. if [ ! -f file-${FILE_VERSION}/build-done ]; then
  106. cd file-${FILE_VERSION}
  107. ./configure --enable-static --disable-shared --prefix=${PREFIX}
  108. make ${MAKE_ARGS}
  109. make install
  110. touch build-done
  111. cd ..
  112. fi
  113. # ------------------------------------------------------------------------------------
  114. # libogg
  115. if [ ! -d libogg-${LIBOGG_VERSION} ]; then
  116. curl -O https://ftp.osuosl.org/pub/xiph/releases/ogg/libogg-${LIBOGG_VERSION}.tar.gz
  117. tar -xf libogg-${LIBOGG_VERSION}.tar.gz
  118. fi
  119. if [ ! -f libogg-${LIBOGG_VERSION}/build-done ]; then
  120. cd libogg-${LIBOGG_VERSION}
  121. ./configure --enable-static --disable-shared --prefix=${PREFIX}
  122. make ${MAKE_ARGS}
  123. make install
  124. touch build-done
  125. cd ..
  126. fi
  127. # ------------------------------------------------------------------------------------
  128. # libvorbis
  129. if [ ! -d libvorbis-${LIBVORBIS_VERSION} ]; then
  130. curl -O https://ftp.osuosl.org/pub/xiph/releases/vorbis/libvorbis-${LIBVORBIS_VERSION}.tar.gz
  131. tar -xf libvorbis-${LIBVORBIS_VERSION}.tar.gz
  132. fi
  133. if [ ! -f libvorbis-${LIBVORBIS_VERSION}/build-done ]; then
  134. cd libvorbis-${LIBVORBIS_VERSION}
  135. ./configure --enable-static --disable-shared --prefix=${PREFIX}
  136. make ${MAKE_ARGS}
  137. make install
  138. touch build-done
  139. cd ..
  140. fi
  141. # ------------------------------------------------------------------------------------
  142. # flac
  143. if [ ! -d flac-${FLAC_VERSION} ]; then
  144. curl -O https://svn.xiph.org/releases/flac/flac-${FLAC_VERSION}.tar.xz
  145. /opt/local/bin/7z x flac-${FLAC_VERSION}.tar.xz
  146. /opt/local/bin/7z x flac-${FLAC_VERSION}.tar
  147. fi
  148. if [ ! -f flac-${FLAC_VERSION}/build-done ]; then
  149. cd flac-${FLAC_VERSION}
  150. chmod +x configure install-sh
  151. ./configure --enable-static --disable-shared --prefix=${PREFIX} \
  152. --disable-cpplibs
  153. make ${MAKE_ARGS}
  154. make install
  155. touch build-done
  156. cd ..
  157. fi
  158. # ------------------------------------------------------------------------------------
  159. # libsndfile
  160. if [ ! -d libsndfile-${LIBSNDFILE_VERSION} ]; then
  161. curl -O http://www.mega-nerd.com/libsndfile/files/libsndfile-${LIBSNDFILE_VERSION}.tar.gz
  162. tar -xf libsndfile-${LIBSNDFILE_VERSION}.tar.gz
  163. fi
  164. if [ ! -f libsndfile-${LIBSNDFILE_VERSION}/build-done ]; then
  165. cd libsndfile-${LIBSNDFILE_VERSION}
  166. ./configure --enable-static --disable-shared --prefix=${PREFIX} \
  167. --disable-full-suite --disable-alsa --disable-sqlite
  168. make ${MAKE_ARGS}
  169. make install
  170. touch build-done
  171. cd ..
  172. fi
  173. # ------------------------------------------------------------------------------------
  174. # libgig
  175. if [ ! -d libgig-${LIBGIG_VERSION} ]; then
  176. curl -O http://download.linuxsampler.org/packages/libgig-${LIBGIG_VERSION}.tar.bz2
  177. tar -xf libgig-${LIBGIG_VERSION}.tar.bz2
  178. fi
  179. if [ ! -f libgig-${LIBGIG_VERSION}/build-done ]; then
  180. cd libgig-${LIBGIG_VERSION}
  181. if [ ! -f patched ]; then
  182. patch -p1 -i ../patches/libgig_fix-build.patch
  183. touch patched
  184. fi
  185. ./configure --enable-static --disable-shared --prefix=${PREFIX}
  186. make ${MAKE_ARGS}
  187. make install
  188. touch build-done
  189. cd ..
  190. fi
  191. # ------------------------------------------------------------------------------------
  192. # linuxsampler
  193. if [ ! -d linuxsampler-${LINUXSAMPLER_VERSION} ]; then
  194. curl -O http://download.linuxsampler.org/packages/linuxsampler-${LINUXSAMPLER_VERSION}.tar.bz2
  195. tar -xf linuxsampler-${LINUXSAMPLER_VERSION}.tar.bz2
  196. fi
  197. if [ ! -f linuxsampler-${LINUXSAMPLER_VERSION}/build-done ]; then
  198. cd linuxsampler-${LINUXSAMPLER_VERSION}
  199. if [ ! -f patched ]; then
  200. patch -p1 -i ../patches/linuxsampler_allow-no-drivers-build.patch
  201. patch -p1 -i ../patches/linuxsampler_disable-ladspa-fx.patch
  202. sed -i -e "s|HAVE_AU|HAVE_VST|" src/hostplugins/Makefile.am
  203. touch patched
  204. fi
  205. #rm -f configure
  206. #env PATH=/opt/local/bin:$PATH make -f Makefile.svn configure
  207. env PATH=/opt/local/bin:$PATH /opt/local/bin/aclocal -I /opt/local/share/aclocal
  208. env PATH=/opt/local/bin:$PATH /opt/local/bin/glibtoolize --force --copy
  209. env PATH=/opt/local/bin:$PATH /opt/local/bin/autoheader
  210. env PATH=/opt/local/bin:$PATH /opt/local/bin/automake --add-missing --copy
  211. env PATH=/opt/local/bin:$PATH /opt/local/bin/autoconf
  212. env PATH=/opt/local/bin:$PATH ./configure \
  213. --enable-static --disable-shared --prefix=${PREFIX} \
  214. --disable-alsa-driver --disable-arts-driver --disable-jack-driver \
  215. --disable-asio-driver --disable-midishare-driver --disable-mmemidi-driver \
  216. --disable-coreaudio-driver --disable-coremidi-driver \
  217. --disable-instruments-db --disable-sf2-engine
  218. env PATH=/opt/local/bin:$PATH ./scripts/generate_instrument_script_parser.sh
  219. sed -i -e "s/bison (GNU Bison) //" config.h
  220. env PATH=/opt/local/bin:$PATH make ${MAKE_ARGS}
  221. make install
  222. sed -i -e "s|-llinuxsampler|-llinuxsampler -L${PREFIX}/lib/libgig -lgig -lsndfile -lFLAC -lvorbisenc -lvorbis -logg -lpthread -lm|" ${PREFIX}/lib/pkgconfig/linuxsampler.pc
  223. touch build-done
  224. cd ..
  225. fi
  226. # ------------------------------------------------------------------------------------
  227. # libffi
  228. if [ ! -d libffi-${LIBFFI_VERSION} ]; then
  229. curl -O ftp://sourceware.org/pub/libffi/libffi-${LIBFFI_VERSION}.tar.gz
  230. tar -xf libffi-${LIBFFI_VERSION}.tar.gz
  231. fi
  232. if [ ! -f libffi-${LIBFFI_VERSION}/build-done ]; then
  233. cd libffi-${LIBFFI_VERSION}
  234. ./configure --enable-static --disable-shared --prefix=$PREFIX
  235. make ${MAKE_ARGS}
  236. make install
  237. touch build-done
  238. cd ..
  239. fi
  240. # ------------------------------------------------------------------------------------
  241. # gettext
  242. if [ ! -d gettext-${GETTEXT_VERSION} ]; then
  243. curl -O http://ftp.gnu.org/gnu/gettext/gettext-${GETTEXT_VERSION}.tar.gz
  244. tar -xf gettext-${GETTEXT_VERSION}.tar.gz
  245. fi
  246. if [ ! -f gettext-${GETTEXT_VERSION}/build-done ]; then
  247. cd gettext-${GETTEXT_VERSION}
  248. env PATH=/opt/local/bin:$PATH ./configure --enable-static --disable-shared --prefix=${PREFIX}
  249. env PATH=/opt/local/bin:$PATH make ${MAKE_ARGS}
  250. make install
  251. touch build-done
  252. cd ..
  253. fi
  254. # ------------------------------------------------------------------------------------
  255. # glib
  256. if [ ! -d glib-${GLIB_VERSION} ]; then
  257. curl -O http://caesar.ftp.acc.umu.se/pub/GNOME/sources/glib/${GLIB_MVERSION}/glib-${GLIB_VERSION}.tar.xz
  258. /opt/local/bin/7z x glib-${GLIB_VERSION}.tar.xz
  259. /opt/local/bin/7z x glib-${GLIB_VERSION}.tar
  260. fi
  261. if [ ! -f glib-${GLIB_VERSION}/build-done ]; then
  262. cd glib-${GLIB_VERSION}
  263. chmod +x configure install-sh
  264. env PATH=/opt/local/bin:$PATH LDFLAGS="-L${PREFIX}/lib -m${ARCH}" \
  265. ./configure --enable-static --disable-shared --prefix=${PREFIX}
  266. env PATH=/opt/local/bin:$PATH make ${MAKE_ARGS} || true
  267. touch gio/gio-querymodules gio/glib-compile-resources gio/gsettings gio/gdbus gio/gresource gio/gapplication
  268. env PATH=/opt/local/bin:$PATH make ${MAKE_ARGS}
  269. touch $PREFIX/bin/gtester-report
  270. env PATH=/opt/local/bin:$PATH make install
  271. touch build-done
  272. cd ..
  273. fi
  274. # ------------------------------------------------------------------------------------
  275. # fluidsynth
  276. if [ ! -d fluidsynth-${FLUIDSYNTH_VERSION} ]; then
  277. curl -L https://download.sourceforge.net/fluidsynth/fluidsynth-${FLUIDSYNTH_VERSION}.tar.gz -o fluidsynth-${FLUIDSYNTH_VERSION}.tar.gz
  278. tar -xf fluidsynth-${FLUIDSYNTH_VERSION}.tar.gz
  279. fi
  280. if [ ! -f fluidsynth-${FLUIDSYNTH_VERSION}/build-done ]; then
  281. cd fluidsynth-${FLUIDSYNTH_VERSION}
  282. env LDFLAGS="${LDFLAGS} -framework Carbon -framework CoreFoundation" \
  283. ./configure --enable-static --disable-shared --prefix=${PREFIX} \
  284. --enable-libsndfile-support \
  285. --disable-dbus-support --disable-aufile-support \
  286. --disable-pulse-support --disable-alsa-support --disable-portaudio-support --disable-oss-support --disable-jack-support \
  287. --disable-coreaudio --disable-coremidi --disable-dart --disable-lash --disable-ladcca \
  288. --without-readline
  289. make ${MAKE_ARGS}
  290. make install
  291. sed -i -e "s|-lfluidsynth|-lfluidsynth -lglib-2.0 -lgthread-2.0 -lsndfile -lFLAC -lvorbisenc -lvorbis -logg -lpthread -lm -liconv -lintl|" ${PREFIX}/lib/pkgconfig/fluidsynth.pc
  292. touch build-done
  293. cd ..
  294. fi
  295. }
  296. # ------------------------------------------------------------------------------------
  297. # build base libs
  298. export ARCH=32
  299. build_base
  300. export ARCH=64
  301. build_base
  302. # ------------------------------------------------------------------------------------
  303. # set flags for qt stuff
  304. export PREFIX=${TARGETDIR}/carla
  305. export PATH=${PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
  306. export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
  307. export PKG_CONFIG=${TARGETDIR}/carla64/bin/pkg-config
  308. export CFLAGS="-O3 -mtune=generic -msse -msse2 -mfpmath=sse -fPIC -DPIC -DNDEBUG -I${PREFIX}/include -m64"
  309. export CXXFLAGS=${CFLAGS}
  310. export LDFLAGS="-L${PREFIX}/lib -m64"
  311. export MAKE=/usr/bin/make
  312. export CFG_ARCH=x86_64
  313. export QMAKESPEC=macx-clang
  314. # ------------------------------------------------------------------------------------
  315. # qt5-base download
  316. if [ ! -d qtbase-opensource-src-${QT5_VERSION} ]; then
  317. curl -L http://download.qt.io/archive/qt/${QT5_MVERSION}/${QT5_VERSION}/submodules/qtbase-opensource-src-${QT5_VERSION}.tar.xz -o qtbase-opensource-src-${QT5_VERSION}.tar.xz
  318. /opt/local/bin/7z x qtbase-opensource-src-${QT5_VERSION}.tar.xz
  319. /opt/local/bin/7z x qtbase-opensource-src-${QT5_VERSION}.tar
  320. fi
  321. # ------------------------------------------------------------------------------------
  322. # qt5-base (64bit, shared, framework)
  323. if [ ! -f qtbase-opensource-src-${QT5_VERSION}/build-done ]; then
  324. cd qtbase-opensource-src-${QT5_VERSION}
  325. if [ ! -f configured ]; then
  326. sed -i -e "s|AWK=.*|AWK=/opt/local/bin/gawk|" configure
  327. chmod +x configure
  328. chmod -R 777 config.tests/unix/
  329. ./configure -release -shared -opensource -confirm-license -force-pkg-config -platform macx-clang -framework \
  330. -prefix $PREFIX -plugindir $PREFIX/lib/qt5/plugins -headerdir $PREFIX/include/qt5 \
  331. -qt-freetype -qt-libjpeg -qt-libpng -qt-pcre -opengl desktop -qpa cocoa \
  332. -no-directfb -no-eglfs -no-kms -no-linuxfb -no-mtdev -no-xcb -no-xcb-xlib \
  333. -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-avx2 -no-mips_dsp -no-mips_dspr2 \
  334. -no-cups -no-dbus -no-evdev -no-fontconfig -no-harfbuzz -no-gif -no-glib -no-nis -no-openssl -no-pch -no-sql-ibase -no-sql-odbc \
  335. -no-audio-backend -no-qml-debug -no-separate-debug-info \
  336. -no-compile-examples -nomake examples -nomake tests -make libs -make tools
  337. touch configured
  338. fi
  339. make ${MAKE_ARGS}
  340. make install
  341. ln -s ${PREFIX}/lib/QtCore.framework/Headers ${PREFIX}/include/qt5/QtCore
  342. ln -s ${PREFIX}/lib/QtGui.framework/Headers ${PREFIX}/include/qt5/QtGui
  343. ln -s ${PREFIX}/lib/QtWidgets.framework/Headers ${PREFIX}/include/qt5/QtWidgets
  344. sed -i -e "s/ -lqtpcre/ /" ${PREFIX}/lib/pkgconfig/Qt5Core.pc
  345. sed -i -e "s/ '/ /" $PREFIX/lib/pkgconfig/Qt5Core.pc
  346. sed -i -e "s/ '/ /" $PREFIX/lib/pkgconfig/Qt5Core.pc
  347. sed -i -e "s/ '/ /" $PREFIX/lib/pkgconfig/Qt5Gui.pc
  348. sed -i -e "s/ '/ /" $PREFIX/lib/pkgconfig/Qt5Gui.pc
  349. sed -i -e "s/ '/ /" $PREFIX/lib/pkgconfig/Qt5Widgets.pc
  350. sed -i -e "s/ '/ /" $PREFIX/lib/pkgconfig/Qt5Widgets.pc
  351. touch build-done
  352. cd ..
  353. fi
  354. QT56_ARGS="./configure -prefix ${PREFIX} -plugindir ${PREFIX}/lib/qt5/plugins -headerdir ${PREFIX}/include/qt5 \
  355. -release -optimized-tools -opensource -confirm-license -c++std c++98 -no-qml-debug -platform macx-clang \
  356. -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-avx2 -no-mips_dsp -no-mips_dspr2 \
  357. -pkg-config -force-pkg-config \
  358. -no-mtdev -no-gif -qt-libpng -qt-libjpeg -qt-freetype \
  359. -no-openssl -no-libproxy \
  360. -qt-pcre -no-xcb -no-xkbcommon-x11 -no-xkbcommon-evdev -no-xinput2 -no-xcb-xlib -no-glib \
  361. -no-pulseaudio -no-alsa -no-gtkstyle \
  362. -make libs -make tools \
  363. -nomake examples -nomake tests \
  364. -no-compile-examples \
  365. -no-cups -no-iconv -no-evdev -no-icu -no-fontconfig \
  366. -no-dbus -no-xcb -no-eglfs -no-kms -no-gbm -no-directfb -no-linuxfb \
  367. -qpa cocoa -opengl desktop -framework \
  368. -no-audio-backend -no-pch
  369. "
  370. QT59_ARGS="./configure -prefix ${PREFIX} -plugindir ${PREFIX}/lib/qt5/plugins -headerdir ${PREFIX}/include/qt5 \
  371. -opensource -confirm-license -release -strip -shared -framework -platform macx-clang \
  372. -sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-avx2 -no-avx512 \
  373. -no-mips_dsp -no-mips_dspr2 \
  374. -no-pch -pkg-config \
  375. -make libs -make tools \
  376. -nomake examples -nomake tests \
  377. -no-compile-examples \
  378. -gui -widgets \
  379. -no-dbus \
  380. -no-glib -qt-pcre \
  381. -no-journald -no-syslog -no-slog2 \
  382. -no-openssl -no-securetransport -no-sctp -no-libproxy \
  383. -no-cups -no-fontconfig -qt-freetype -no-harfbuzz -no-gtk -opengl desktop -qpa cocoa -no-xcb-xlib \
  384. -no-directfb -no-eglfs -no-xcb \
  385. -no-evdev -no-libinput -no-mtdev -no-xinput2 -no-xkbcommon-x11 -no-xkbcommon-evdev \
  386. -no-gif -no-ico -qt-libpng -qt-libjpeg \
  387. -qt-sqlite
  388. "
  389. # ------------------------------------------------------------------------------------
  390. # qt5-mac-extras
  391. if [ ! -d qtmacextras-opensource-src-${QT5_VERSION} ]; then
  392. curl -L http://download.qt.io/archive/qt/${QT5_MVERSION}/${QT5_VERSION}/submodules/qtmacextras-opensource-src-${QT5_VERSION}.tar.xz -o qtmacextras-opensource-src-${QT5_VERSION}.tar.xz
  393. /opt/local/bin/7z x qtmacextras-opensource-src-${QT5_VERSION}.tar.xz
  394. /opt/local/bin/7z x qtmacextras-opensource-src-${QT5_VERSION}.tar
  395. fi
  396. if [ ! -f qtmacextras-opensource-src-${QT5_VERSION}/build-done ]; then
  397. cd qtmacextras-opensource-src-${QT5_VERSION}
  398. qmake
  399. make ${MAKE_ARGS}
  400. make install
  401. touch build-done
  402. cd ..
  403. fi
  404. # ------------------------------------------------------------------------------------
  405. # qt5-svg
  406. if [ ! -d qtsvg-opensource-src-${QT5_VERSION} ]; then
  407. curl -L http://download.qt.io/archive/qt/${QT5_MVERSION}/${QT5_VERSION}/submodules/qtsvg-opensource-src-${QT5_VERSION}.tar.xz -o qtsvg-opensource-src-${QT5_VERSION}.tar.xz
  408. /opt/local/bin/7z x qtsvg-opensource-src-${QT5_VERSION}.tar.xz
  409. /opt/local/bin/7z x qtsvg-opensource-src-${QT5_VERSION}.tar
  410. fi
  411. if [ ! -f qtsvg-opensource-src-${QT5_VERSION}/build-done ]; then
  412. cd qtsvg-opensource-src-${QT5_VERSION}
  413. qmake
  414. make ${MAKE_ARGS}
  415. make install
  416. touch build-done
  417. cd ..
  418. fi
  419. # ------------------------------------------------------------------------------------
  420. # python
  421. if [ ! -d Python-${PYTHON_VERSION} ]; then
  422. curl -O https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz
  423. tar -xf Python-${PYTHON_VERSION}.tgz
  424. fi
  425. if [ ! -f Python-${PYTHON_VERSION}/build-done ]; then
  426. cd Python-${PYTHON_VERSION}
  427. ./configure --prefix=$PREFIX
  428. make
  429. make install
  430. touch build-done
  431. cd ..
  432. fi
  433. # ------------------------------------------------------------------------------------
  434. # sip
  435. if [ ! -d sip-${SIP_VERSION} ]; then
  436. curl -L http://sourceforge.net/projects/pyqt/files/sip/sip-${SIP_VERSION}/sip-${SIP_VERSION}.tar.gz -o sip-${SIP_VERSION}.tar.gz
  437. tar -xf sip-${SIP_VERSION}.tar.gz
  438. fi
  439. if [ ! -f sip-${SIP_VERSION}/build-done ]; then
  440. cd sip-${SIP_VERSION}
  441. python3 configure.py
  442. make ${MAKE_ARGS}
  443. make install
  444. touch build-done
  445. cd ..
  446. fi
  447. # ------------------------------------------------------------------------------------
  448. # pyqt5
  449. if [ ! -d PyQt-gpl-${PYQT5_VERSION} ]; then
  450. curl -L http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-${PYQT5_VERSION}/PyQt-gpl-${PYQT5_VERSION}.tar.gz -o PyQt-gpl-${PYQT5_VERSION}.tar.gz
  451. tar -xf PyQt-gpl-${PYQT5_VERSION}.tar.gz
  452. fi
  453. if [ ! -f PyQt-gpl-${PYQT5_VERSION}/build-done ]; then
  454. cd PyQt-gpl-${PYQT5_VERSION}
  455. python3 configure.py --confirm-license -c
  456. make ${MAKE_ARGS}
  457. make install
  458. touch build-done
  459. cd ..
  460. fi
  461. # ------------------------------------------------------------------------------------
  462. # pyliblo
  463. if [ ! -d pyliblo-${PYLIBLO_VERSION} ]; then
  464. curl -O http://das.nasophon.de/download/pyliblo-${PYLIBLO_VERSION}.tar.gz
  465. tar -xf pyliblo-${PYLIBLO_VERSION}.tar.gz
  466. fi
  467. if [ ! -f pyliblo-${PYLIBLO_VERSION}/build-done ]; then
  468. cd pyliblo-${PYLIBLO_VERSION}
  469. env CFLAGS="${CFLAGS} -I${TARGETDIR}/carla64/include" LDFLAGS="${LDFLAGS} -L${TARGETDIR}/carla64/lib" \
  470. python3 setup.py build
  471. python3 setup.py install --prefix=$PREFIX
  472. touch build-done
  473. cd ..
  474. fi
  475. # ------------------------------------------------------------------------------------
  476. # cxfreeze
  477. if [ ! -d cx_Freeze-${CXFREEZE_VERSION} ]; then
  478. curl -L https://github.com/anthony-tuininga/cx_Freeze/archive/${CXFREEZE_VERSION}.tar.gz -o cx_Freeze-${CXFREEZE_VERSION}.tar.gz
  479. tar -xf cx_Freeze-${CXFREEZE_VERSION}.tar.gz
  480. fi
  481. if [ ! -f cx_Freeze-${CXFREEZE_VERSION}/build-done ]; then
  482. cd cx_Freeze-${CXFREEZE_VERSION}
  483. sed -i -e 's/"python%s.%s"/"python%s.%sm"/' setup.py
  484. python3 setup.py build
  485. python3 setup.py install --prefix=$PREFIX
  486. touch build-done
  487. cd ..
  488. fi
  489. # ------------------------------------------------------------------------------------