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.

568 lines
20KB

  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. # sed -i "s|po docs|po|" Makefile.in
  197. rm m4macros/glib-gettext.m4
  198. touch patched
  199. fi
  200. chmod +x autogen.sh configure install-sh
  201. env PATH=/opt/local/bin:$PATH ./autogen.sh
  202. env PATH=/opt/local/bin:$PATH LDFLAGS="-L${PREFIX}/lib -m${ARCH}" \
  203. ./configure --enable-static --disable-shared --prefix=${PREFIX}
  204. env PATH=/opt/local/bin:$PATH make ${MAKE_ARGS} -k || true
  205. touch gio/gio-querymodules gio/glib-compile-resources gio/gsettings gio/gdbus gio/gresource gio/gapplication
  206. touch gobject/gobject-query tests/gobject/performance tests/gobject/performance-threaded
  207. env PATH=/opt/local/bin:$PATH make
  208. touch ${PREFIX}/bin/gtester-report
  209. env PATH=/opt/local/bin:$PATH make install
  210. touch build-done
  211. cd ..
  212. fi
  213. # ---------------------------------------------------------------------------------------------------------------------
  214. # fluidsynth
  215. if [ ! -d fluidsynth-${FLUIDSYNTH_VERSION} ]; then
  216. /opt/local/bin/aria2c https://github.com/FluidSynth/fluidsynth/archive/v${FLUIDSYNTH_VERSION}.tar.gz
  217. tar -xf fluidsynth-${FLUIDSYNTH_VERSION}.tar.gz
  218. fi
  219. if [ ! -f fluidsynth-${FLUIDSYNTH_VERSION}/build-done ]; then
  220. cd fluidsynth-${FLUIDSYNTH_VERSION}
  221. sed -i -e 's/_init_lib_suffix "64"/_init_lib_suffix ""/' CMakeLists.txt
  222. /opt/local/bin/cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${PREFIX} -DBUILD_SHARED_LIBS=OFF \
  223. -Denable-debug=OFF -Denable-profiling=OFF -Denable-ladspa=OFF -Denable-fpe-check=OFF -Denable-portaudio=OFF \
  224. -Denable-trap-on-fpe=OFF -Denable-aufile=OFF -Denable-dbus=OFF -Denable-ipv6=OFF -Denable-jack=OFF \
  225. -Denable-midishare=OFF -Denable-oss=OFF -Denable-pulseaudio=OFF -Denable-readline=OFF -Denable-ladcca=OFF \
  226. -Denable-lash=OFF -Denable-alsa=OFF -Denable-coreaudio=OFF -Denable-coremidi=OFF -Denable-framework=OFF \
  227. -Denable-floats=ON
  228. make ${MAKE_ARGS} -k || true
  229. touch src/fluidsynth
  230. make
  231. make install
  232. 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
  233. touch build-done
  234. cd ..
  235. fi
  236. # ---------------------------------------------------------------------------------------------------------------------
  237. # mxml
  238. if [ ! -d mxml-${MXML_VERSION} ]; then
  239. /opt/local/bin/aria2c https://github.com/michaelrsweet/mxml/releases/download/v${MXML_VERSION}/mxml-${MXML_VERSION}.tar.gz
  240. mkdir mxml-${MXML_VERSION}
  241. cd mxml-${MXML_VERSION}
  242. tar -xf ../mxml-${MXML_VERSION}.tar.gz
  243. cd ..
  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. export ARCH=32
  280. build_base
  281. export ARCH=64
  282. build_base
  283. # ---------------------------------------------------------------------------------------------------------------------
  284. # set flags for qt stuff
  285. export PREFIX=${TARGETDIR}/carla
  286. export PATH=${PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
  287. export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
  288. export PKG_CONFIG=${TARGETDIR}/carla64/bin/pkg-config
  289. export CFLAGS="-O3 -mtune=generic -msse -msse2 -mfpmath=sse -fPIC -DPIC -DNDEBUG -I${PREFIX}/include -m64"
  290. export CXXFLAGS=${CFLAGS}
  291. export LDFLAGS="-L${PREFIX}/lib -m64"
  292. export MAKE=/usr/bin/make
  293. export CFG_ARCH=x86_64
  294. export QMAKESPEC=macx-clang
  295. # ---------------------------------------------------------------------------------------------------------------------
  296. # qt5-base download
  297. if [ ! -d qtbase-opensource-src-${QT5_VERSION} ]; then
  298. 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
  299. /opt/local/bin/7z x qtbase-opensource-src-${QT5_VERSION}.tar.xz
  300. /opt/local/bin/7z x qtbase-opensource-src-${QT5_VERSION}.tar
  301. fi
  302. # ---------------------------------------------------------------------------------------------------------------------
  303. # qt5-base (64bit, shared, framework)
  304. if [ ! -f qtbase-opensource-src-${QT5_VERSION}/build-done ]; then
  305. cd qtbase-opensource-src-${QT5_VERSION}
  306. if [ ! -f configured ]; then
  307. if [ ! -f carla-patched ]; then
  308. sed -i -e "s|PNG_WARNINGS_SUPPORTED|PNG_WARNINGS_NOT_SUPPORTED|" src/3rdparty/libpng/pnglibconf.h
  309. sed -i -e "s|AWK=.*|AWK=/opt/local/bin/gawk|" configure
  310. patch -p1 -i ../patches/qt55-newosx-fix.patch
  311. touch carla-patched
  312. fi
  313. chmod +x configure
  314. chmod -R 777 config.tests/unix/
  315. ./configure -release -shared -opensource -confirm-license -force-pkg-config -platform macx-clang -framework \
  316. -prefix ${PREFIX} -plugindir ${PREFIX}/lib/qt5/plugins -headerdir ${PREFIX}/include/qt5 \
  317. -qt-freetype -qt-libjpeg -qt-libpng -qt-pcre -opengl desktop -qpa cocoa \
  318. -no-directfb -no-eglfs -no-kms -no-linuxfb -no-mtdev -no-xcb -no-xcb-xlib \
  319. -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-avx2 -no-mips_dsp -no-mips_dspr2 \
  320. -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 \
  321. -no-audio-backend -no-qml-debug -no-separate-debug-info -no-use-gold-linker \
  322. -no-compile-examples -nomake examples -nomake tests -make libs -make tools
  323. touch configured
  324. fi
  325. make ${MAKE_ARGS}
  326. make install
  327. ln -s ${PREFIX}/lib/QtCore.framework/Headers ${PREFIX}/include/qt5/QtCore
  328. ln -s ${PREFIX}/lib/QtGui.framework/Headers ${PREFIX}/include/qt5/QtGui
  329. ln -s ${PREFIX}/lib/QtWidgets.framework/Headers ${PREFIX}/include/qt5/QtWidgets
  330. sed -i -e "s/ -lqtpcre/ /" ${PREFIX}/lib/pkgconfig/Qt5Core.pc
  331. sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Core.pc
  332. sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Core.pc
  333. sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Gui.pc
  334. sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Gui.pc
  335. sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Widgets.pc
  336. sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Widgets.pc
  337. touch build-done
  338. cd ..
  339. fi
  340. QT56_ARGS="./configure -prefix ${PREFIX} -plugindir ${PREFIX}/lib/qt5/plugins -headerdir ${PREFIX}/include/qt5 \
  341. -release -optimized-tools -opensource -confirm-license -c++std c++98 -no-qml-debug -platform macx-clang \
  342. -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-avx2 -no-mips_dsp -no-mips_dspr2 \
  343. -pkg-config -force-pkg-config \
  344. -no-mtdev -no-gif -qt-libpng -qt-libjpeg -qt-freetype \
  345. -no-openssl -no-libproxy \
  346. -qt-pcre -no-xcb -no-xkbcommon-x11 -no-xkbcommon-evdev -no-xinput2 -no-xcb-xlib -no-glib \
  347. -no-pulseaudio -no-alsa -no-gtkstyle \
  348. -make libs -make tools \
  349. -nomake examples -nomake tests \
  350. -no-compile-examples \
  351. -no-cups -no-iconv -no-evdev -no-icu -no-fontconfig \
  352. -no-dbus -no-xcb -no-eglfs -no-kms -no-gbm -no-directfb -no-linuxfb \
  353. -qpa cocoa -opengl desktop -framework \
  354. -no-audio-backend -no-pch
  355. "
  356. QT59_ARGS="./configure -prefix ${PREFIX} -plugindir ${PREFIX}/lib/qt5/plugins -headerdir ${PREFIX}/include/qt5 \
  357. -opensource -confirm-license -release -strip -shared -framework -platform macx-clang \
  358. -sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-avx2 -no-avx512 \
  359. -no-mips_dsp -no-mips_dspr2 \
  360. -no-pch -pkg-config \
  361. -make libs -make tools \
  362. -nomake examples -nomake tests \
  363. -no-compile-examples \
  364. -gui -widgets \
  365. -no-dbus \
  366. -no-glib -qt-pcre \
  367. -no-journald -no-syslog -no-slog2 \
  368. -no-openssl -no-securetransport -no-sctp -no-libproxy \
  369. -no-cups -no-fontconfig -qt-freetype -no-harfbuzz -no-gtk -opengl desktop -qpa cocoa -no-xcb-xlib \
  370. -no-directfb -no-eglfs -no-xcb \
  371. -no-evdev -no-libinput -no-mtdev -no-xinput2 -no-xkbcommon-x11 -no-xkbcommon-evdev \
  372. -no-gif -no-ico -qt-libpng -qt-libjpeg \
  373. -qt-sqlite
  374. "
  375. # ---------------------------------------------------------------------------------------------------------------------
  376. # qt5-mac-extras
  377. if [ ! -d qtmacextras-opensource-src-${QT5_VERSION} ]; then
  378. 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
  379. /opt/local/bin/7z x qtmacextras-opensource-src-${QT5_VERSION}.tar.xz
  380. /opt/local/bin/7z x qtmacextras-opensource-src-${QT5_VERSION}.tar
  381. fi
  382. if [ ! -f qtmacextras-opensource-src-${QT5_VERSION}/build-done ]; then
  383. cd qtmacextras-opensource-src-${QT5_VERSION}
  384. qmake
  385. make ${MAKE_ARGS}
  386. make install
  387. touch build-done
  388. cd ..
  389. fi
  390. # ---------------------------------------------------------------------------------------------------------------------
  391. # qt5-svg
  392. if [ ! -d qtsvg-opensource-src-${QT5_VERSION} ]; then
  393. 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
  394. /opt/local/bin/7z x qtsvg-opensource-src-${QT5_VERSION}.tar.xz
  395. /opt/local/bin/7z x qtsvg-opensource-src-${QT5_VERSION}.tar
  396. fi
  397. if [ ! -f qtsvg-opensource-src-${QT5_VERSION}/build-done ]; then
  398. cd qtsvg-opensource-src-${QT5_VERSION}
  399. qmake
  400. make ${MAKE_ARGS}
  401. make install
  402. touch build-done
  403. cd ..
  404. fi
  405. # ---------------------------------------------------------------------------------------------------------------------
  406. # python
  407. if [ ! -d Python-${PYTHON_VERSION} ]; then
  408. /opt/local/bin/aria2c https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz
  409. tar -xf Python-${PYTHON_VERSION}.tgz
  410. fi
  411. if [ ! -f Python-${PYTHON_VERSION}/build-done ]; then
  412. cd Python-${PYTHON_VERSION}
  413. ./configure --prefix=${PREFIX}
  414. make
  415. make install
  416. touch build-done
  417. cd ..
  418. fi
  419. # ---------------------------------------------------------------------------------------------------------------------
  420. # sip
  421. if [ ! -d sip-${SIP_VERSION} ]; then
  422. /opt/local/bin/aria2c http://sourceforge.net/projects/pyqt/files/sip/sip-${SIP_VERSION}/sip-${SIP_VERSION}.tar.gz
  423. tar -xf sip-${SIP_VERSION}.tar.gz
  424. fi
  425. if [ ! -f sip-${SIP_VERSION}/build-done ]; then
  426. cd sip-${SIP_VERSION}
  427. python3 configure.py
  428. make ${MAKE_ARGS}
  429. make install
  430. touch build-done
  431. cd ..
  432. fi
  433. # ---------------------------------------------------------------------------------------------------------------------
  434. # pyqt5
  435. if [ ! -d PyQt-gpl-${PYQT5_VERSION} ]; then
  436. /opt/local/bin/aria2c http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-${PYQT5_VERSION}/PyQt-gpl-${PYQT5_VERSION}.tar.gz
  437. tar -xf PyQt-gpl-${PYQT5_VERSION}.tar.gz
  438. fi
  439. if [ ! -f PyQt-gpl-${PYQT5_VERSION}/build-done ]; then
  440. cd PyQt-gpl-${PYQT5_VERSION}
  441. python3 configure.py --confirm-license -c
  442. make ${MAKE_ARGS}
  443. make install
  444. touch build-done
  445. cd ..
  446. fi
  447. # ---------------------------------------------------------------------------------------------------------------------
  448. # pyliblo
  449. if [ ! -d pyliblo-${PYLIBLO_VERSION} ]; then
  450. /opt/local/bin/aria2c http://das.nasophon.de/download/pyliblo-${PYLIBLO_VERSION}.tar.gz
  451. tar -xf pyliblo-${PYLIBLO_VERSION}.tar.gz
  452. fi
  453. if [ ! -f pyliblo-${PYLIBLO_VERSION}/build-done ]; then
  454. cd pyliblo-${PYLIBLO_VERSION}
  455. env CFLAGS="${CFLAGS} -I${TARGETDIR}/carla64/include" LDFLAGS="${LDFLAGS} -L${TARGETDIR}/carla64/lib" \
  456. python3 setup.py build
  457. python3 setup.py install --prefix=${PREFIX}
  458. touch build-done
  459. cd ..
  460. fi
  461. # ---------------------------------------------------------------------------------------------------------------------
  462. # cxfreeze
  463. if [ ! -d cx_Freeze-${CXFREEZE_VERSION} ]; then
  464. /opt/local/bin/aria2c https://github.com/anthony-tuininga/cx_Freeze/archive/${CXFREEZE_VERSION}.tar.gz
  465. tar -xf cx_Freeze-${CXFREEZE_VERSION}.tar.gz
  466. fi
  467. if [ ! -f cx_Freeze-${CXFREEZE_VERSION}/build-done ]; then
  468. cd cx_Freeze-${CXFREEZE_VERSION}
  469. sed -i -e 's/"python%s.%s"/"python%s.%sm"/' setup.py
  470. python3 setup.py build
  471. python3 setup.py install --prefix=${PREFIX}
  472. touch build-done
  473. cd ..
  474. fi
  475. # ---------------------------------------------------------------------------------------------------------------------