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