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.

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