Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

585 lines
21KB

  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. }
  46. # ---------------------------------------------------------------------------------------------------------------------
  47. # function to build base libs
  48. build_base()
  49. {
  50. export CC=clang
  51. export CXX=clang++
  52. export PREFIX=${TARGETDIR}/carla${ARCH}
  53. export PATH=${PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
  54. export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
  55. export CFLAGS="-O3 -mtune=generic -msse -msse2 -mfpmath=sse -fvisibility=hidden -fdata-sections -ffunction-sections"
  56. export CFLAGS="${CFLAGS} -fPIC -DPIC -DNDEBUG -I${PREFIX}/include -m${ARCH} -mmacosx-version-min=10.8"
  57. export CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden -stdlib=libc++"
  58. export LDFLAGS="-fdata-sections -ffunction-sections -Wl,-dead_strip -Wl,-dead_strip_dylibs"
  59. export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib -m${ARCH} -stdlib=libc++"
  60. # ---------------------------------------------------------------------------------------------------------------------
  61. # pkgconfig
  62. if [ ! -d pkg-config-${PKG_CONFIG_VERSION} ]; then
  63. curl -O https://pkg-config.freedesktop.org/releases/pkg-config-${PKG_CONFIG_VERSION}.tar.gz
  64. tar -xf pkg-config-${PKG_CONFIG_VERSION}.tar.gz
  65. fi
  66. if [ ! -f pkg-config-${PKG_CONFIG_VERSION}_$ARCH/build-done ]; then
  67. cp -r pkg-config-${PKG_CONFIG_VERSION} pkg-config-${PKG_CONFIG_VERSION}_$ARCH
  68. cd pkg-config-${PKG_CONFIG_VERSION}_$ARCH
  69. ./configure --enable-indirect-deps --with-internal-glib --with-pc-path=$PKG_CONFIG_PATH --prefix=${PREFIX}
  70. make ${MAKE_ARGS}
  71. make install
  72. touch build-done
  73. cd ..
  74. fi
  75. # ---------------------------------------------------------------------------------------------------------------------
  76. # liblo
  77. if [ ! -d liblo-${LIBLO_VERSION} ]; then
  78. curl -L http://download.sourceforge.net/liblo/liblo-${LIBLO_VERSION}.tar.gz -o liblo-${LIBLO_VERSION}.tar.gz
  79. tar -xf liblo-${LIBLO_VERSION}.tar.gz
  80. fi
  81. if [ ! -f liblo-${LIBLO_VERSION}_$ARCH/build-done ]; then
  82. cp -r liblo-${LIBLO_VERSION} liblo-${LIBLO_VERSION}_$ARCH
  83. cd liblo-${LIBLO_VERSION}_$ARCH
  84. ./configure --enable-static --disable-shared --prefix=${PREFIX} \
  85. --enable-threads \
  86. --disable-examples --disable-tools
  87. make ${MAKE_ARGS}
  88. make install
  89. touch build-done
  90. cd ..
  91. fi
  92. # ---------------------------------------------------------------------------------------------------------------------
  93. if [ x"${ARCH}" = x"32" ]; then
  94. return
  95. fi
  96. # ---------------------------------------------------------------------------------------------------------------------
  97. # zlib
  98. if [ ! -d zlib-${ZLIB_VERSION} ]; then
  99. /opt/local/bin/aria2c https://github.com/madler/zlib/archive/v${ZLIB_VERSION}.tar.gz
  100. tar -xf zlib-${ZLIB_VERSION}.tar.gz
  101. fi
  102. if [ ! -f zlib-${ZLIB_VERSION}/build-done ]; then
  103. cd zlib-${ZLIB_VERSION}
  104. ./configure --static --prefix=${PREFIX}
  105. make
  106. make install
  107. touch build-done
  108. cd ..
  109. fi
  110. # ---------------------------------------------------------------------------------------------------------------------
  111. # file/magic
  112. if [ ! -d file-${FILE_VERSION} ]; then
  113. curl -O ftp://ftp.astron.com/pub/file/file-${FILE_VERSION}.tar.gz
  114. tar -xf file-${FILE_VERSION}.tar.gz
  115. fi
  116. if [ ! -f file-${FILE_VERSION}/build-done ]; then
  117. cd file-${FILE_VERSION}
  118. ./configure --enable-static --disable-shared --prefix=${PREFIX}
  119. make ${MAKE_ARGS}
  120. make install
  121. touch build-done
  122. cd ..
  123. fi
  124. # ---------------------------------------------------------------------------------------------------------------------
  125. # libogg
  126. if [ ! -d libogg-${LIBOGG_VERSION} ]; then
  127. curl -O https://ftp.osuosl.org/pub/xiph/releases/ogg/libogg-${LIBOGG_VERSION}.tar.gz
  128. tar -xf libogg-${LIBOGG_VERSION}.tar.gz
  129. fi
  130. if [ ! -f libogg-${LIBOGG_VERSION}/build-done ]; then
  131. cd libogg-${LIBOGG_VERSION}
  132. sed -i -e 's/__MACH__/__MACH_SKIP__/' include/ogg/os_types.h
  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. tar -xf mxml-${MXML_VERSION}.tar.gz
  244. fi
  245. if [ ! -f mxml-${MXML_VERSION}/build-done ]; then
  246. cd mxml-${MXML_VERSION}
  247. ./configure --disable-shared --prefix=${PREFIX}
  248. make libmxml.a
  249. cp *.a ${PREFIX}/lib/
  250. cp *.pc ${PREFIX}/lib/pkgconfig/
  251. cp mxml.h ${PREFIX}/include/
  252. touch build-done
  253. cd ..
  254. fi
  255. # ---------------------------------------------------------------------------------------------------------------------
  256. # fftw3 (needs to be last as it modifies C[XX]FLAGS)
  257. if [ ! -d fftw-${FFTW3_VERSION} ]; then
  258. curl -O http://www.fftw.org/fftw-${FFTW3_VERSION}.tar.gz
  259. tar -xf fftw-${FFTW3_VERSION}.tar.gz
  260. fi
  261. if [ ! -f fftw-${FFTW3_VERSION}/build-done ]; then
  262. export CFLAGS="${CFLAGS} -ffast-math"
  263. export CXXFLAGS="${CXXFLAGS} -ffast-math"
  264. cd fftw-${FFTW3_VERSION}
  265. ./configure --enable-static --enable-sse2 --disable-shared --disable-debug --prefix=${PREFIX}
  266. make
  267. make install
  268. make clean
  269. ./configure --enable-static --enable-sse --enable-sse2 --enable-single --disable-shared --disable-debug --prefix=${PREFIX}
  270. make
  271. make install
  272. make clean
  273. touch build-done
  274. cd ..
  275. fi
  276. }
  277. # ---------------------------------------------------------------------------------------------------------------------
  278. # build base libs
  279. # cleanup
  280. export ARCH=32
  281. build_base
  282. export ARCH=64
  283. build_base
  284. # ---------------------------------------------------------------------------------------------------------------------
  285. # set flags for qt stuff
  286. export PREFIX=${TARGETDIR}/carla
  287. export PATH=${PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
  288. export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
  289. export PKG_CONFIG=${TARGETDIR}/carla64/bin/pkg-config
  290. export CFLAGS="-O3 -mtune=generic -msse -msse2 -mfpmath=sse -fPIC -DPIC -DNDEBUG -I${PREFIX}/include -m64 -mmacosx-version-min=10.8"
  291. export CXXFLAGS="${CFLAGS} -std=gnu++11 -stdlib=libc++"
  292. export LDFLAGS="-L${PREFIX}/lib -m64 -stdlib=libc++"
  293. export MAKE=/usr/bin/make
  294. # ---------------------------------------------------------------------------------------------------------------------
  295. # qt5-base download
  296. if [ ! -d qtbase-opensource-src-${QT5_VERSION} ]; then
  297. 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
  298. /opt/local/bin/7z x qtbase-opensource-src-${QT5_VERSION}.tar.xz
  299. /opt/local/bin/7z x qtbase-opensource-src-${QT5_VERSION}.tar
  300. fi
  301. # ---------------------------------------------------------------------------------------------------------------------
  302. # qt5-base (64bit, shared, framework)
  303. if [ ! -f qtbase-opensource-src-${QT5_VERSION}/build-done ]; then
  304. cd qtbase-opensource-src-${QT5_VERSION}
  305. if [ ! -f configured ]; then
  306. if [ ! -f carla-patched ]; then
  307. #sed -i -e "s|PNG_WARNINGS_SUPPORTED|PNG_WARNINGS_NOT_SUPPORTED|" src/3rdparty/libpng/pnglibconf.h
  308. #sed -i -e "s|AWK=.*|AWK=/opt/local/bin/gawk|" configure
  309. #sed -i -e "s|/usr/bin/xcrun -find xcrun|true|" configure
  310. #sed -i -e "s|/usr/bin/xcrun -find xcrun|echo hello|" mkspecs/features/mac/default_pre.prf
  311. #patch -p1 -i ../../patches/qt55-newosx-fix.patch
  312. #patch -p1 -i ../../patches/qt56-cpp98-compat.patch
  313. patch -p1 -i ../../patches/qt59-osx10.8-compat.patch
  314. patch -p1 -i ../../patches/qt59-osx10.8-compat2.patch
  315. patch -p1 -i ../../patches/qt59-osx10.8-compat3.patch
  316. sed -i -e "s/10.10/10.8/" mkspecs/macx-clang/qmake.conf
  317. sed -i -e "s/ --sdk \$sdk / /" configure
  318. sed -i -e "s/ --sdk \$\$sdk / /" mkspecs/features/mac/sdk.prf
  319. touch carla-patched
  320. fi
  321. QT55_ARGS="./configure -release -shared -opensource -confirm-license -force-pkg-config -platform macx-clang -framework \
  322. -prefix ${PREFIX} -plugindir ${PREFIX}/lib/qt5/plugins -headerdir ${PREFIX}/include/qt5 \
  323. -qt-freetype -qt-libjpeg -qt-libpng -qt-pcre -opengl desktop -qpa cocoa \
  324. -no-directfb -no-eglfs -no-kms -no-linuxfb -no-mtdev -no-xcb -no-xcb-xlib \
  325. -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-avx2 -no-mips_dsp -no-mips_dspr2 \
  326. -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 \
  327. -no-audio-backend -no-qml-debug -no-separate-debug-info -no-use-gold-linker \
  328. -no-compile-examples -nomake examples -nomake tests -make libs -make tools
  329. "
  330. QT56_ARGS="./configure -prefix ${PREFIX} -plugindir ${PREFIX}/lib/qt5/plugins -headerdir ${PREFIX}/include/qt5 \
  331. -release -optimized-tools -opensource -confirm-license -c++std c++98 -no-qml-debug -platform macx-clang \
  332. -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-avx2 -no-mips_dsp -no-mips_dspr2 \
  333. -pkg-config -force-pkg-config \
  334. -no-mtdev -no-gif -qt-libpng -qt-libjpeg -qt-freetype \
  335. -no-openssl -no-libproxy \
  336. -qt-pcre -no-xcb -no-xkbcommon-x11 -no-xkbcommon-evdev -no-xinput2 -no-xcb-xlib -no-glib \
  337. -no-pulseaudio -no-alsa -no-gtkstyle \
  338. -make libs -make tools \
  339. -nomake examples -nomake tests \
  340. -no-compile-examples \
  341. -no-cups -no-iconv -no-evdev -no-icu -no-fontconfig \
  342. -no-dbus -no-xcb -no-eglfs -no-kms -no-gbm -no-directfb -no-linuxfb \
  343. -qpa cocoa -opengl desktop -framework \
  344. -no-audio-backend -no-pch
  345. "
  346. QT59_ARGS="./configure -silent -prefix ${PREFIX} -plugindir ${PREFIX}/lib/qt5/plugins -headerdir ${PREFIX}/include/qt5 \
  347. -opensource -confirm-license -release -strip -shared -platform macx-clang \
  348. -sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-avx2 -no-avx512 \
  349. -no-mips_dsp -no-mips_dspr2 \
  350. -no-pch -pkg-config -force-pkg-config \
  351. -make libs -make tools \
  352. -nomake examples -nomake tests \
  353. -no-compile-examples \
  354. -gui -widgets \
  355. -no-dbus \
  356. -no-glib -qt-pcre \
  357. -no-journald -no-syslog -no-slog2 \
  358. -no-openssl -no-securetransport -no-sctp -no-libproxy \
  359. -no-cups -no-fontconfig -qt-freetype -no-harfbuzz -no-gtk -opengl desktop -qpa cocoa -no-xcb-xlib \
  360. -no-directfb -no-eglfs -no-xcb \
  361. -no-evdev -no-libinput -no-mtdev -no-xinput2 -no-xkbcommon-x11 -no-xkbcommon-evdev \
  362. -no-gif -no-ico -qt-libpng -qt-libjpeg \
  363. -qt-sqlite
  364. "
  365. chmod +x configure
  366. ${QT59_ARGS}
  367. #chmod -R 777 config.tests/unix/
  368. touch configured
  369. fi
  370. make ${MAKE_ARGS}
  371. make install
  372. ln -s ${PREFIX}/lib/QtCore.framework/Headers ${PREFIX}/include/qt5/QtCore
  373. ln -s ${PREFIX}/lib/QtGui.framework/Headers ${PREFIX}/include/qt5/QtGui
  374. ln -s ${PREFIX}/lib/QtWidgets.framework/Headers ${PREFIX}/include/qt5/QtWidgets
  375. #sed -i -e "s/ -lqtpcre/ /" ${PREFIX}/lib/pkgconfig/Qt5Core.pc
  376. #sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Core.pc
  377. #sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Core.pc
  378. #sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Gui.pc
  379. #sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Gui.pc
  380. #sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Widgets.pc
  381. #sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Widgets.pc
  382. touch build-done
  383. cd ..
  384. fi
  385. # ---------------------------------------------------------------------------------------------------------------------
  386. # qt5-mac-extras
  387. if [ ! -d qtmacextras-opensource-src-${QT5_VERSION} ]; then
  388. 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
  389. /opt/local/bin/7z x qtmacextras-opensource-src-${QT5_VERSION}.tar.xz
  390. /opt/local/bin/7z x qtmacextras-opensource-src-${QT5_VERSION}.tar
  391. fi
  392. if [ ! -f qtmacextras-opensource-src-${QT5_VERSION}/build-done ]; then
  393. cd qtmacextras-opensource-src-${QT5_VERSION}
  394. qmake
  395. make ${MAKE_ARGS}
  396. make install
  397. touch build-done
  398. cd ..
  399. fi
  400. # ---------------------------------------------------------------------------------------------------------------------
  401. # qt5-svg
  402. if [ ! -d qtsvg-opensource-src-${QT5_VERSION} ]; then
  403. 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
  404. /opt/local/bin/7z x qtsvg-opensource-src-${QT5_VERSION}.tar.xz
  405. /opt/local/bin/7z x qtsvg-opensource-src-${QT5_VERSION}.tar
  406. fi
  407. if [ ! -f qtsvg-opensource-src-${QT5_VERSION}/build-done ]; then
  408. cd qtsvg-opensource-src-${QT5_VERSION}
  409. qmake
  410. make ${MAKE_ARGS}
  411. make install
  412. touch build-done
  413. cd ..
  414. fi
  415. # ---------------------------------------------------------------------------------------------------------------------
  416. # python
  417. if [ ! -d Python-${PYTHON_VERSION} ]; then
  418. /opt/local/bin/aria2c https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz
  419. tar -xf Python-${PYTHON_VERSION}.tgz
  420. fi
  421. if [ ! -f Python-${PYTHON_VERSION}/build-done ]; then
  422. cd Python-${PYTHON_VERSION}
  423. sed -i -e "s/#zlib zlibmodule.c/zlib zlibmodule.c/" Modules/Setup.dist
  424. ./configure --prefix=${PREFIX} --enable-shared
  425. make
  426. make install
  427. touch build-done
  428. cd ..
  429. fi
  430. # ---------------------------------------------------------------------------------------------------------------------
  431. # sip
  432. if [ ! -d sip-${SIP_VERSION} ]; then
  433. /opt/local/bin/aria2c http://sourceforge.net/projects/pyqt/files/sip/sip-${SIP_VERSION}/sip-${SIP_VERSION}.tar.gz
  434. tar -xf sip-${SIP_VERSION}.tar.gz
  435. fi
  436. if [ ! -f sip-${SIP_VERSION}/build-done ]; then
  437. cd sip-${SIP_VERSION}
  438. python3 configure.py # --sip-module PyQt5.sip
  439. make ${MAKE_ARGS}
  440. make install
  441. touch build-done
  442. cd ..
  443. fi
  444. # ---------------------------------------------------------------------------------------------------------------------
  445. # pyqt5
  446. if [ ! -d PyQt5_gpl-${PYQT5_VERSION} ]; then
  447. /opt/local/bin/aria2c http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-${PYQT5_VERSION}/PyQt5_gpl-${PYQT5_VERSION}.tar.gz
  448. tar -xf PyQt5_gpl-${PYQT5_VERSION}.tar.gz
  449. fi
  450. if [ ! -f PyQt5_gpl-${PYQT5_VERSION}/build-done ]; then
  451. cd PyQt5_gpl-${PYQT5_VERSION}
  452. python3 configure.py --concatenate --confirm-license -c
  453. make ${MAKE_ARGS}
  454. make install
  455. touch build-done
  456. cd ..
  457. fi
  458. # ---------------------------------------------------------------------------------------------------------------------
  459. # pyliblo
  460. if [ ! -d pyliblo-${PYLIBLO_VERSION} ]; then
  461. /opt/local/bin/aria2c http://das.nasophon.de/download/pyliblo-${PYLIBLO_VERSION}.tar.gz
  462. tar -xf pyliblo-${PYLIBLO_VERSION}.tar.gz
  463. fi
  464. if [ ! -f pyliblo-${PYLIBLO_VERSION}/build-done ]; then
  465. cd pyliblo-${PYLIBLO_VERSION}
  466. if [ ! -f patched ]; then
  467. patch -p1 -i ../../patches/pyliblo-python3.7.patch
  468. touch patched
  469. fi
  470. env CFLAGS="${CFLAGS} -I${TARGETDIR}/carla64/include" LDFLAGS="${LDFLAGS} -L${TARGETDIR}/carla64/lib" \
  471. python3 setup.py build
  472. python3 setup.py install --prefix=${PREFIX}
  473. touch build-done
  474. cd ..
  475. fi
  476. # ---------------------------------------------------------------------------------------------------------------------
  477. # cxfreeze
  478. if [ ! -d cx_Freeze-${CXFREEZE_VERSION} ]; then
  479. /opt/local/bin/aria2c https://github.com/anthony-tuininga/cx_Freeze/archive/${CXFREEZE_VERSION}.tar.gz
  480. tar -xf cx_Freeze-${CXFREEZE_VERSION}.tar.gz
  481. fi
  482. if [ ! -f cx_Freeze-${CXFREEZE_VERSION}/build-done ]; then
  483. cd cx_Freeze-${CXFREEZE_VERSION}
  484. #sed -i -e 's/"python%s.%s"/"python%s.%sm"/' setup.py
  485. python3 setup.py build
  486. python3 setup.py install --prefix=${PREFIX}
  487. touch build-done
  488. cd ..
  489. fi
  490. # ---------------------------------------------------------------------------------------------------------------------