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.

build-deps.sh 21KB

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