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.

653 lines
24KB

  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. # zlib
  102. if [ ! -d zlib-${ZLIB_VERSION} ]; then
  103. curl -L https://github.com/madler/zlib/archive/v${ZLIB_VERSION}.tar.gz -o zlib-${ZLIB_VERSION}.tar.gz
  104. tar -xf zlib-${ZLIB_VERSION}.tar.gz
  105. fi
  106. if [ ! -f zlib-${ZLIB_VERSION}/build-done ]; then
  107. cd zlib-${ZLIB_VERSION}
  108. ./configure --static --prefix=${PREFIX}
  109. make
  110. make install
  111. touch build-done
  112. cd ..
  113. fi
  114. # ---------------------------------------------------------------------------------------------------------------------
  115. # file/magic
  116. if [ ! -d file-${FILE_VERSION} ]; then
  117. curl -O ftp://ftp.astron.com/pub/file/file-${FILE_VERSION}.tar.gz
  118. tar -xf file-${FILE_VERSION}.tar.gz
  119. fi
  120. if [ ! -f file-${FILE_VERSION}/build-done ]; then
  121. cd file-${FILE_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. # libogg
  130. if [ ! -d libogg-${LIBOGG_VERSION} ]; then
  131. curl -O https://ftp.osuosl.org/pub/xiph/releases/ogg/libogg-${LIBOGG_VERSION}.tar.gz
  132. tar -xf libogg-${LIBOGG_VERSION}.tar.gz
  133. fi
  134. if [ ! -f libogg-${LIBOGG_VERSION}/build-done ]; then
  135. cd libogg-${LIBOGG_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. # libvorbis
  144. if [ ! -d libvorbis-${LIBVORBIS_VERSION} ]; then
  145. curl -O https://ftp.osuosl.org/pub/xiph/releases/vorbis/libvorbis-${LIBVORBIS_VERSION}.tar.gz
  146. tar -xf libvorbis-${LIBVORBIS_VERSION}.tar.gz
  147. fi
  148. if [ ! -f libvorbis-${LIBVORBIS_VERSION}/build-done ]; then
  149. cd libvorbis-${LIBVORBIS_VERSION}
  150. ./configure --enable-static --disable-shared --prefix=${PREFIX}
  151. make ${MAKE_ARGS}
  152. make install
  153. touch build-done
  154. cd ..
  155. fi
  156. # ---------------------------------------------------------------------------------------------------------------------
  157. # flac
  158. if [ ! -d flac-${FLAC_VERSION} ]; then
  159. curl -O https://svn.xiph.org/releases/flac/flac-${FLAC_VERSION}.tar.xz
  160. /opt/local/bin/7z x flac-${FLAC_VERSION}.tar.xz
  161. /opt/local/bin/7z x flac-${FLAC_VERSION}.tar
  162. fi
  163. if [ ! -f flac-${FLAC_VERSION}/build-done ]; then
  164. cd flac-${FLAC_VERSION}
  165. chmod +x configure install-sh
  166. ./configure --enable-static --disable-shared --prefix=${PREFIX} \
  167. --disable-cpplibs
  168. make ${MAKE_ARGS}
  169. make install
  170. touch build-done
  171. cd ..
  172. fi
  173. # ---------------------------------------------------------------------------------------------------------------------
  174. # libsndfile
  175. if [ ! -d libsndfile-${LIBSNDFILE_VERSION} ]; then
  176. curl -O http://www.mega-nerd.com/libsndfile/files/libsndfile-${LIBSNDFILE_VERSION}.tar.gz
  177. tar -xf libsndfile-${LIBSNDFILE_VERSION}.tar.gz
  178. fi
  179. if [ ! -f libsndfile-${LIBSNDFILE_VERSION}/build-done ]; then
  180. cd libsndfile-${LIBSNDFILE_VERSION}
  181. ./configure --enable-static --disable-shared --prefix=${PREFIX} \
  182. --disable-full-suite --disable-alsa --disable-sqlite
  183. make ${MAKE_ARGS}
  184. make install
  185. touch build-done
  186. cd ..
  187. fi
  188. # ---------------------------------------------------------------------------------------------------------------------
  189. # libgig
  190. if [ ! -d libgig-${LIBGIG_VERSION} ]; then
  191. curl -O http://download.linuxsampler.org/packages/libgig-${LIBGIG_VERSION}.tar.bz2
  192. tar -xf libgig-${LIBGIG_VERSION}.tar.bz2
  193. fi
  194. if [ ! -f libgig-${LIBGIG_VERSION}/build-done ]; then
  195. cd libgig-${LIBGIG_VERSION}
  196. if [ ! -f patched ]; then
  197. patch -p1 -i ../patches/libgig_fix-build.patch
  198. touch patched
  199. fi
  200. ./configure --enable-static --disable-shared --prefix=${PREFIX}
  201. make ${MAKE_ARGS}
  202. make install
  203. touch build-done
  204. cd ..
  205. fi
  206. # ---------------------------------------------------------------------------------------------------------------------
  207. # linuxsampler
  208. if [ ! -d linuxsampler-${LINUXSAMPLER_VERSION} ]; then
  209. curl -O http://download.linuxsampler.org/packages/linuxsampler-${LINUXSAMPLER_VERSION}.tar.bz2
  210. tar -xf linuxsampler-${LINUXSAMPLER_VERSION}.tar.bz2
  211. fi
  212. if [ ! -f linuxsampler-${LINUXSAMPLER_VERSION}/build-done ]; then
  213. cd linuxsampler-${LINUXSAMPLER_VERSION}
  214. if [ ! -f patched ]; then
  215. patch -p1 -i ../patches/linuxsampler_allow-no-drivers-build.patch
  216. patch -p1 -i ../patches/linuxsampler_disable-ladspa-fx.patch
  217. sed -i -e "s|HAVE_AU|HAVE_VST|" src/hostplugins/Makefile.am
  218. touch patched
  219. fi
  220. env PATH=/opt/local/bin:$PATH /opt/local/bin/aclocal -I /opt/local/share/aclocal
  221. env PATH=/opt/local/bin:$PATH /opt/local/bin/glibtoolize --force --copy
  222. env PATH=/opt/local/bin:$PATH /opt/local/bin/autoheader
  223. env PATH=/opt/local/bin:$PATH /opt/local/bin/automake --add-missing --copy
  224. env PATH=/opt/local/bin:$PATH /opt/local/bin/autoconf
  225. env PATH=/opt/local/bin:$PATH ./configure \
  226. --enable-static --disable-shared --prefix=${PREFIX} \
  227. --enable-signed-triang-algo=diharmonic --enable-unsigned-triang-algo=diharmonic --enable-subfragment-size=8 \
  228. --disable-alsa-driver --disable-arts-driver --disable-jack-driver \
  229. --disable-asio-driver --disable-midishare-driver --disable-mmemidi-driver \
  230. --disable-coreaudio-driver --disable-coremidi-driver \
  231. --disable-instruments-db --disable-sf2-engine
  232. env PATH=/opt/local/bin:$PATH ./scripts/generate_instrument_script_parser.sh
  233. sed -i -e "s/bison (GNU Bison) //" config.h
  234. env PATH=/opt/local/bin:$PATH make ${MAKE_ARGS}
  235. make install
  236. sed -i -e "s|-llinuxsampler|-llinuxsampler -L${PREFIX}/lib/libgig -lgig -lsndfile -lFLAC -lvorbisenc -lvorbis -logg -lpthread -lm|" ${PREFIX}/lib/pkgconfig/linuxsampler.pc
  237. touch build-done
  238. cd ..
  239. fi
  240. # ---------------------------------------------------------------------------------------------------------------------
  241. # libffi
  242. if [ ! -d libffi-${LIBFFI_VERSION} ]; then
  243. curl -O ftp://sourceware.org/pub/libffi/libffi-${LIBFFI_VERSION}.tar.gz
  244. tar -xf libffi-${LIBFFI_VERSION}.tar.gz
  245. fi
  246. if [ ! -f libffi-${LIBFFI_VERSION}/build-done ]; then
  247. cd libffi-${LIBFFI_VERSION}
  248. ./configure --enable-static --disable-shared --prefix=${PREFIX}
  249. make ${MAKE_ARGS}
  250. make install
  251. touch build-done
  252. cd ..
  253. fi
  254. # ---------------------------------------------------------------------------------------------------------------------
  255. # gettext
  256. if [ ! -d gettext-${GETTEXT_VERSION} ]; then
  257. curl -O http://ftp.gnu.org/gnu/gettext/gettext-${GETTEXT_VERSION}.tar.gz
  258. tar -xf gettext-${GETTEXT_VERSION}.tar.gz
  259. fi
  260. if [ ! -f gettext-${GETTEXT_VERSION}/build-done ]; then
  261. cd gettext-${GETTEXT_VERSION}
  262. env PATH=/opt/local/bin:$PATH ./configure --enable-static --disable-shared --prefix=${PREFIX}
  263. env PATH=/opt/local/bin:$PATH make ${MAKE_ARGS}
  264. make install
  265. touch build-done
  266. cd ..
  267. fi
  268. # ---------------------------------------------------------------------------------------------------------------------
  269. # glib
  270. if [ ! -d glib-${GLIB_VERSION} ]; then
  271. curl -O http://caesar.ftp.acc.umu.se/pub/GNOME/sources/glib/${GLIB_MVERSION}/glib-${GLIB_VERSION}.tar.xz
  272. /opt/local/bin/7z x glib-${GLIB_VERSION}.tar.xz
  273. /opt/local/bin/7z x glib-${GLIB_VERSION}.tar
  274. fi
  275. if [ ! -f glib-${GLIB_VERSION}/build-done ]; then
  276. cd glib-${GLIB_VERSION}
  277. chmod +x configure install-sh
  278. env PATH=/opt/local/bin:$PATH LDFLAGS="-L${PREFIX}/lib -m${ARCH}" \
  279. ./configure --enable-static --disable-shared --prefix=${PREFIX}
  280. env PATH=/opt/local/bin:$PATH make ${MAKE_ARGS} || true
  281. touch gio/gio-querymodules gio/glib-compile-resources gio/gsettings gio/gdbus gio/gresource gio/gapplication
  282. env PATH=/opt/local/bin:$PATH make ${MAKE_ARGS}
  283. touch ${PREFIX}/bin/gtester-report
  284. env PATH=/opt/local/bin:$PATH make install
  285. touch build-done
  286. cd ..
  287. fi
  288. # ---------------------------------------------------------------------------------------------------------------------
  289. # fluidsynth
  290. if [ ! -d fluidsynth-${FLUIDSYNTH_VERSION} ]; then
  291. curl -L https://download.sourceforge.net/fluidsynth/fluidsynth-${FLUIDSYNTH_VERSION}.tar.gz -o fluidsynth-${FLUIDSYNTH_VERSION}.tar.gz
  292. tar -xf fluidsynth-${FLUIDSYNTH_VERSION}.tar.gz
  293. fi
  294. if [ ! -f fluidsynth-${FLUIDSYNTH_VERSION}/build-done ]; then
  295. cd fluidsynth-${FLUIDSYNTH_VERSION}
  296. env LDFLAGS="${LDFLAGS} -framework Carbon -framework CoreFoundation" \
  297. ./configure --enable-static --disable-shared --prefix=${PREFIX} \
  298. --enable-libsndfile-support \
  299. --disable-dbus-support --disable-aufile-support \
  300. --disable-pulse-support --disable-alsa-support --disable-portaudio-support --disable-oss-support --disable-jack-support \
  301. --disable-coreaudio --disable-coremidi --disable-dart --disable-lash --disable-ladcca \
  302. --without-readline
  303. make ${MAKE_ARGS}
  304. make install
  305. 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
  306. touch build-done
  307. cd ..
  308. fi
  309. # ---------------------------------------------------------------------------------------------------------------------
  310. # mxml
  311. if [ ! -d mxml-${MXML_VERSION} ]; then
  312. curl -L https://github.com/michaelrsweet/mxml/releases/download/v${MXML_VERSION}/mxml-${MXML_VERSION}.tar.gz -o mxml-${MXML_VERSION}.tar.gz
  313. mkdir mxml-${MXML_VERSION}
  314. cd mxml-${MXML_VERSION}
  315. tar -xf ../mxml-${MXML_VERSION}.tar.gz
  316. cd ..
  317. fi
  318. if [ ! -f mxml-${MXML_VERSION}/build-done ]; then
  319. cd mxml-${MXML_VERSION}
  320. ./configure --disable-shared --prefix=${PREFIX}
  321. make libmxml.a
  322. cp *.a ${PREFIX}/lib/
  323. cp *.pc ${PREFIX}/lib/pkgconfig/
  324. cp mxml.h ${PREFIX}/include/
  325. touch build-done
  326. cd ..
  327. fi
  328. # ---------------------------------------------------------------------------------------------------------------------
  329. # fftw3 (needs to be last as it modifies C[XX]FLAGS)
  330. if [ ! -d fftw-${FFTW3_VERSION} ]; then
  331. curl -O http://www.fftw.org/fftw-${FFTW3_VERSION}.tar.gz
  332. tar -xf fftw-${FFTW3_VERSION}.tar.gz
  333. fi
  334. if [ ! -f fftw-${FFTW3_VERSION}/build-done ]; then
  335. export CFLAGS="${CFLAGS} -ffast-math"
  336. export CXXFLAGS="${CXXFLAGS} -ffast-math"
  337. cd fftw-${FFTW3_VERSION}
  338. ./configure --enable-static --enable-sse2 --disable-shared --disable-debug --prefix=${PREFIX}
  339. make
  340. make install
  341. make clean
  342. ./configure --enable-static --enable-sse --enable-sse2 --enable-single --disable-shared --disable-debug --prefix=${PREFIX}
  343. make
  344. make install
  345. make clean
  346. touch build-done
  347. cd ..
  348. fi
  349. }
  350. # ---------------------------------------------------------------------------------------------------------------------
  351. # build base libs
  352. export ARCH=32
  353. build_base
  354. export ARCH=64
  355. build_base
  356. # ---------------------------------------------------------------------------------------------------------------------
  357. # set flags for qt stuff
  358. export PREFIX=${TARGETDIR}/carla
  359. export PATH=${PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
  360. export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
  361. export PKG_CONFIG=${TARGETDIR}/carla64/bin/pkg-config
  362. export CFLAGS="-O3 -mtune=generic -msse -msse2 -mfpmath=sse -fPIC -DPIC -DNDEBUG -I${PREFIX}/include -m64"
  363. export CXXFLAGS=${CFLAGS}
  364. export LDFLAGS="-L${PREFIX}/lib -m64"
  365. export MAKE=/usr/bin/make
  366. export CFG_ARCH=x86_64
  367. export QMAKESPEC=macx-clang
  368. # ---------------------------------------------------------------------------------------------------------------------
  369. # qt5-base download
  370. if [ ! -d qtbase-opensource-src-${QT5_VERSION} ]; then
  371. 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
  372. /opt/local/bin/7z x qtbase-opensource-src-${QT5_VERSION}.tar.xz
  373. /opt/local/bin/7z x qtbase-opensource-src-${QT5_VERSION}.tar
  374. fi
  375. # ---------------------------------------------------------------------------------------------------------------------
  376. # qt5-base (64bit, shared, framework)
  377. if [ ! -f qtbase-opensource-src-${QT5_VERSION}/build-done ]; then
  378. cd qtbase-opensource-src-${QT5_VERSION}
  379. if [ ! -f configured ]; then
  380. if [ ! -f carla-patched ]; then
  381. sed -i -e "s|PNG_WARNINGS_SUPPORTED|PNG_WARNINGS_NOT_SUPPORTED|" src/3rdparty/libpng/pnglibconf.h
  382. sed -i -e "s|AWK=.*|AWK=/opt/local/bin/gawk|" configure
  383. patch -p1 -i ../patches/qt55-newosx-fix.patch
  384. touch carla-patched
  385. fi
  386. chmod +x configure
  387. chmod -R 777 config.tests/unix/
  388. ./configure -release -shared -opensource -confirm-license -force-pkg-config -platform macx-clang -framework \
  389. -prefix ${PREFIX} -plugindir ${PREFIX}/lib/qt5/plugins -headerdir ${PREFIX}/include/qt5 \
  390. -qt-freetype -qt-libjpeg -qt-libpng -qt-pcre -opengl desktop -qpa cocoa \
  391. -no-directfb -no-eglfs -no-kms -no-linuxfb -no-mtdev -no-xcb -no-xcb-xlib \
  392. -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-avx2 -no-mips_dsp -no-mips_dspr2 \
  393. -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 \
  394. -no-audio-backend -no-qml-debug -no-separate-debug-info -no-use-gold-linker \
  395. -no-compile-examples -nomake examples -nomake tests -make libs -make tools
  396. touch configured
  397. fi
  398. make ${MAKE_ARGS}
  399. make install
  400. ln -s ${PREFIX}/lib/QtCore.framework/Headers ${PREFIX}/include/qt5/QtCore
  401. ln -s ${PREFIX}/lib/QtGui.framework/Headers ${PREFIX}/include/qt5/QtGui
  402. ln -s ${PREFIX}/lib/QtWidgets.framework/Headers ${PREFIX}/include/qt5/QtWidgets
  403. sed -i -e "s/ -lqtpcre/ /" ${PREFIX}/lib/pkgconfig/Qt5Core.pc
  404. sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Core.pc
  405. sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Core.pc
  406. sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Gui.pc
  407. sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Gui.pc
  408. sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Widgets.pc
  409. sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Widgets.pc
  410. touch build-done
  411. cd ..
  412. fi
  413. QT56_ARGS="./configure -prefix ${PREFIX} -plugindir ${PREFIX}/lib/qt5/plugins -headerdir ${PREFIX}/include/qt5 \
  414. -release -optimized-tools -opensource -confirm-license -c++std c++98 -no-qml-debug -platform macx-clang \
  415. -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-avx2 -no-mips_dsp -no-mips_dspr2 \
  416. -pkg-config -force-pkg-config \
  417. -no-mtdev -no-gif -qt-libpng -qt-libjpeg -qt-freetype \
  418. -no-openssl -no-libproxy \
  419. -qt-pcre -no-xcb -no-xkbcommon-x11 -no-xkbcommon-evdev -no-xinput2 -no-xcb-xlib -no-glib \
  420. -no-pulseaudio -no-alsa -no-gtkstyle \
  421. -make libs -make tools \
  422. -nomake examples -nomake tests \
  423. -no-compile-examples \
  424. -no-cups -no-iconv -no-evdev -no-icu -no-fontconfig \
  425. -no-dbus -no-xcb -no-eglfs -no-kms -no-gbm -no-directfb -no-linuxfb \
  426. -qpa cocoa -opengl desktop -framework \
  427. -no-audio-backend -no-pch
  428. "
  429. QT59_ARGS="./configure -prefix ${PREFIX} -plugindir ${PREFIX}/lib/qt5/plugins -headerdir ${PREFIX}/include/qt5 \
  430. -opensource -confirm-license -release -strip -shared -framework -platform macx-clang \
  431. -sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-avx2 -no-avx512 \
  432. -no-mips_dsp -no-mips_dspr2 \
  433. -no-pch -pkg-config \
  434. -make libs -make tools \
  435. -nomake examples -nomake tests \
  436. -no-compile-examples \
  437. -gui -widgets \
  438. -no-dbus \
  439. -no-glib -qt-pcre \
  440. -no-journald -no-syslog -no-slog2 \
  441. -no-openssl -no-securetransport -no-sctp -no-libproxy \
  442. -no-cups -no-fontconfig -qt-freetype -no-harfbuzz -no-gtk -opengl desktop -qpa cocoa -no-xcb-xlib \
  443. -no-directfb -no-eglfs -no-xcb \
  444. -no-evdev -no-libinput -no-mtdev -no-xinput2 -no-xkbcommon-x11 -no-xkbcommon-evdev \
  445. -no-gif -no-ico -qt-libpng -qt-libjpeg \
  446. -qt-sqlite
  447. "
  448. # ---------------------------------------------------------------------------------------------------------------------
  449. # qt5-mac-extras
  450. if [ ! -d qtmacextras-opensource-src-${QT5_VERSION} ]; then
  451. 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
  452. /opt/local/bin/7z x qtmacextras-opensource-src-${QT5_VERSION}.tar.xz
  453. /opt/local/bin/7z x qtmacextras-opensource-src-${QT5_VERSION}.tar
  454. fi
  455. if [ ! -f qtmacextras-opensource-src-${QT5_VERSION}/build-done ]; then
  456. cd qtmacextras-opensource-src-${QT5_VERSION}
  457. qmake
  458. make ${MAKE_ARGS}
  459. make install
  460. touch build-done
  461. cd ..
  462. fi
  463. # ---------------------------------------------------------------------------------------------------------------------
  464. # qt5-svg
  465. if [ ! -d qtsvg-opensource-src-${QT5_VERSION} ]; then
  466. 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
  467. /opt/local/bin/7z x qtsvg-opensource-src-${QT5_VERSION}.tar.xz
  468. /opt/local/bin/7z x qtsvg-opensource-src-${QT5_VERSION}.tar
  469. fi
  470. if [ ! -f qtsvg-opensource-src-${QT5_VERSION}/build-done ]; then
  471. cd qtsvg-opensource-src-${QT5_VERSION}
  472. qmake
  473. make ${MAKE_ARGS}
  474. make install
  475. touch build-done
  476. cd ..
  477. fi
  478. # ---------------------------------------------------------------------------------------------------------------------
  479. # python
  480. if [ ! -d Python-${PYTHON_VERSION} ]; then
  481. curl -O https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz
  482. tar -xf Python-${PYTHON_VERSION}.tgz
  483. fi
  484. if [ ! -f Python-${PYTHON_VERSION}/build-done ]; then
  485. cd Python-${PYTHON_VERSION}
  486. ./configure --prefix=${PREFIX}
  487. make
  488. make install
  489. touch build-done
  490. cd ..
  491. fi
  492. # ---------------------------------------------------------------------------------------------------------------------
  493. # sip
  494. if [ ! -d sip-${SIP_VERSION} ]; then
  495. curl -L http://sourceforge.net/projects/pyqt/files/sip/sip-${SIP_VERSION}/sip-${SIP_VERSION}.tar.gz -o sip-${SIP_VERSION}.tar.gz
  496. tar -xf sip-${SIP_VERSION}.tar.gz
  497. fi
  498. if [ ! -f sip-${SIP_VERSION}/build-done ]; then
  499. cd sip-${SIP_VERSION}
  500. python3 configure.py
  501. make ${MAKE_ARGS}
  502. make install
  503. touch build-done
  504. cd ..
  505. fi
  506. # ---------------------------------------------------------------------------------------------------------------------
  507. # pyqt5
  508. if [ ! -d PyQt-gpl-${PYQT5_VERSION} ]; then
  509. 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
  510. tar -xf PyQt-gpl-${PYQT5_VERSION}.tar.gz
  511. fi
  512. if [ ! -f PyQt-gpl-${PYQT5_VERSION}/build-done ]; then
  513. cd PyQt-gpl-${PYQT5_VERSION}
  514. python3 configure.py --confirm-license -c
  515. make ${MAKE_ARGS}
  516. make install
  517. touch build-done
  518. cd ..
  519. fi
  520. # ---------------------------------------------------------------------------------------------------------------------
  521. # pyliblo
  522. if [ ! -d pyliblo-${PYLIBLO_VERSION} ]; then
  523. curl -O http://das.nasophon.de/download/pyliblo-${PYLIBLO_VERSION}.tar.gz
  524. tar -xf pyliblo-${PYLIBLO_VERSION}.tar.gz
  525. fi
  526. if [ ! -f pyliblo-${PYLIBLO_VERSION}/build-done ]; then
  527. cd pyliblo-${PYLIBLO_VERSION}
  528. env CFLAGS="${CFLAGS} -I${TARGETDIR}/carla64/include" LDFLAGS="${LDFLAGS} -L${TARGETDIR}/carla64/lib" \
  529. python3 setup.py build
  530. python3 setup.py install --prefix=${PREFIX}
  531. touch build-done
  532. cd ..
  533. fi
  534. # ---------------------------------------------------------------------------------------------------------------------
  535. # cxfreeze
  536. if [ ! -d cx_Freeze-${CXFREEZE_VERSION} ]; then
  537. curl -L https://github.com/anthony-tuininga/cx_Freeze/archive/${CXFREEZE_VERSION}.tar.gz -o cx_Freeze-${CXFREEZE_VERSION}.tar.gz
  538. tar -xf cx_Freeze-${CXFREEZE_VERSION}.tar.gz
  539. fi
  540. if [ ! -f cx_Freeze-${CXFREEZE_VERSION}/build-done ]; then
  541. cd cx_Freeze-${CXFREEZE_VERSION}
  542. sed -i -e 's/"python%s.%s"/"python%s.%sm"/' setup.py
  543. python3 setup.py build
  544. python3 setup.py install --prefix=${PREFIX}
  545. touch build-done
  546. cd ..
  547. fi
  548. # ---------------------------------------------------------------------------------------------------------------------