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.

530 lines
18KB

  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. export DEPS_NEW=1
  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. }
  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} -mmacosx-version-min=10.12"
  58. export CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden -std=gnu++11 -stdlib=libc++"
  59. export LDFLAGS="-fdata-sections -ffunction-sections -Wl,-dead_strip -Wl,-dead_strip_dylibs"
  60. export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib -m${ARCH} -stdlib=libc++"
  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. sed -i -e 's/__MACH__/__MACH_SKIP__/' include/ogg/os_types.h
  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://ftp.osuosl.org/pub/xiph/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. # glib
  188. if [ ! -d glib-${GLIB_VERSION} ]; then
  189. /opt/local/bin/aria2c http://caesar.ftp.acc.umu.se/pub/GNOME/sources/glib/${GLIB_MVERSION}/glib-${GLIB_VERSION}.tar.xz
  190. /opt/local/bin/7z x glib-${GLIB_VERSION}.tar.xz
  191. /opt/local/bin/7z x glib-${GLIB_VERSION}.tar
  192. fi
  193. if [ ! -f glib-${GLIB_VERSION}/build-done ]; then
  194. cd glib-${GLIB_VERSION}
  195. if [ ! -f patched ]; then
  196. patch -p1 -i ../../patches/glib_skip-gettext.patch
  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. if [ ! -f patched ]; then
  222. patch -p1 -i ../../patches/fluidsynth-skip-drivers-build.patch
  223. touch patched
  224. fi
  225. sed -i -e 's/_init_lib_suffix "64"/_init_lib_suffix ""/' CMakeLists.txt
  226. /opt/local/bin/cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${PREFIX} -DBUILD_SHARED_LIBS=OFF \
  227. -Denable-debug=OFF -Denable-profiling=OFF -Denable-ladspa=OFF -Denable-fpe-check=OFF -Denable-portaudio=OFF \
  228. -Denable-trap-on-fpe=OFF -Denable-aufile=OFF -Denable-dbus=OFF -Denable-ipv6=OFF -Denable-jack=OFF \
  229. -Denable-midishare=OFF -Denable-oss=OFF -Denable-pulseaudio=OFF -Denable-readline=OFF -Denable-ladcca=OFF \
  230. -Denable-lash=OFF -Denable-alsa=OFF -Denable-coreaudio=OFF -Denable-coremidi=OFF -Denable-framework=OFF \
  231. -Denable-floats=ON
  232. make ${MAKE_ARGS} -k || true
  233. touch src/fluidsynth
  234. make
  235. make install
  236. 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
  237. touch build-done
  238. cd ..
  239. fi
  240. # ---------------------------------------------------------------------------------------------------------------------
  241. # mxml
  242. if [ ! -d mxml-${MXML_VERSION} ]; then
  243. /opt/local/bin/aria2c https://github.com/michaelrsweet/mxml/releases/download/v${MXML_VERSION}/mxml-${MXML_VERSION}.tar.gz
  244. tar -xf mxml-${MXML_VERSION}.tar.gz
  245. fi
  246. if [ ! -f mxml-${MXML_VERSION}/build-done ]; then
  247. cd mxml-${MXML_VERSION}
  248. ./configure --disable-shared --prefix=${PREFIX}
  249. make libmxml.a
  250. cp *.a ${PREFIX}/lib/
  251. cp *.pc ${PREFIX}/lib/pkgconfig/
  252. cp mxml.h ${PREFIX}/include/
  253. touch build-done
  254. cd ..
  255. fi
  256. # ---------------------------------------------------------------------------------------------------------------------
  257. # fftw3 (needs to be last as it modifies C[XX]FLAGS)
  258. if [ ! -d fftw-${FFTW3_VERSION} ]; then
  259. curl -O http://www.fftw.org/fftw-${FFTW3_VERSION}.tar.gz
  260. tar -xf fftw-${FFTW3_VERSION}.tar.gz
  261. fi
  262. if [ ! -f fftw-${FFTW3_VERSION}/build-done ]; then
  263. export CFLAGS="${CFLAGS} -ffast-math"
  264. export CXXFLAGS="${CXXFLAGS} -ffast-math"
  265. cd fftw-${FFTW3_VERSION}
  266. ./configure --enable-static --enable-sse2 --disable-shared --disable-debug --prefix=${PREFIX}
  267. make
  268. make install
  269. make clean
  270. ./configure --enable-static --enable-sse --enable-sse2 --enable-single --disable-shared --disable-debug --prefix=${PREFIX}
  271. make
  272. make install
  273. make clean
  274. touch build-done
  275. cd ..
  276. fi
  277. }
  278. # ---------------------------------------------------------------------------------------------------------------------
  279. # build base libs
  280. # cleanup
  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 -mmacosx-version-min=10.12"
  290. export CXXFLAGS="${CFLAGS} -std=gnu++11 -stdlib=libc++"
  291. export LDFLAGS="-L${PREFIX}/lib -m64 -stdlib=libc++"
  292. export MAKE=/usr/bin/make
  293. # ---------------------------------------------------------------------------------------------------------------------
  294. # qt5-base download
  295. if [ ! -d qtbase-everywhere-src-${QT5_VERSION} ]; then
  296. curl -L http://download.qt.io/archive/qt/${QT5_MVERSION}/${QT5_VERSION}/submodules/qtbase-everywhere-src-${QT5_VERSION}.tar.xz -o qtbase-everywhere-src-${QT5_VERSION}.tar.xz
  297. /opt/local/bin/7z x qtbase-everywhere-src-${QT5_VERSION}.tar.xz
  298. /opt/local/bin/7z x qtbase-everywhere-src-${QT5_VERSION}.tar
  299. fi
  300. # ---------------------------------------------------------------------------------------------------------------------
  301. # qt5-base (64bit, shared, framework)
  302. if [ ! -f qtbase-everywhere-src-${QT5_VERSION}/build-done ]; then
  303. cd qtbase-everywhere-src-${QT5_VERSION}
  304. if [ ! -f configured ]; then
  305. chmod +x configure
  306. ./configure -release -shared -opensource -confirm-license -platform macx-clang -framework \
  307. -prefix ${PREFIX} -plugindir ${PREFIX}/lib/qt5/plugins -headerdir ${PREFIX}/include/qt5 \
  308. -pkg-config -force-pkg-config -strip \
  309. -sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-avx2 -no-avx512 \
  310. -no-mips_dsp -no-mips_dspr2 \
  311. -no-pch -pkg-config \
  312. -make libs -make tools \
  313. -nomake examples -nomake tests \
  314. -no-compile-examples \
  315. -gui -widgets \
  316. -no-dbus \
  317. -no-glib -qt-pcre \
  318. -no-journald -no-syslog -no-slog2 \
  319. -no-openssl -no-securetransport -no-sctp -no-libproxy \
  320. -no-cups -no-fontconfig -qt-freetype -no-harfbuzz -no-gtk -opengl desktop -qpa cocoa \
  321. -no-directfb -no-eglfs -no-xcb -no-xcb-xlib \
  322. -no-evdev -no-libinput -no-mtdev \
  323. -no-gif -no-ico -qt-libpng -qt-libjpeg \
  324. -qt-sqlite
  325. touch configured
  326. fi
  327. make ${MAKE_ARGS}
  328. make install
  329. ln -s ${PREFIX}/lib/QtCore.framework/Headers ${PREFIX}/include/qt5/QtCore
  330. ln -s ${PREFIX}/lib/QtGui.framework/Headers ${PREFIX}/include/qt5/QtGui
  331. ln -s ${PREFIX}/lib/QtWidgets.framework/Headers ${PREFIX}/include/qt5/QtWidgets
  332. touch build-done
  333. cd ..
  334. fi
  335. # ---------------------------------------------------------------------------------------------------------------------
  336. # qt5-mac-extras
  337. if [ ! -d qtmacextras-everywhere-src-${QT5_VERSION} ]; then
  338. curl -L http://download.qt.io/archive/qt/${QT5_MVERSION}/${QT5_VERSION}/submodules/qtmacextras-everywhere-src-${QT5_VERSION}.tar.xz -o qtmacextras-everywhere-src-${QT5_VERSION}.tar.xz
  339. /opt/local/bin/7z x qtmacextras-everywhere-src-${QT5_VERSION}.tar.xz
  340. /opt/local/bin/7z x qtmacextras-everywhere-src-${QT5_VERSION}.tar
  341. fi
  342. if [ ! -f qtmacextras-everywhere-src-${QT5_VERSION}/build-done ]; then
  343. cd qtmacextras-everywhere-src-${QT5_VERSION}
  344. qmake
  345. make ${MAKE_ARGS}
  346. make install
  347. touch build-done
  348. cd ..
  349. fi
  350. # ---------------------------------------------------------------------------------------------------------------------
  351. # qt5-svg
  352. if [ ! -d qtsvg-everywhere-src-${QT5_VERSION} ]; then
  353. curl -L http://download.qt.io/archive/qt/${QT5_MVERSION}/${QT5_VERSION}/submodules/qtsvg-everywhere-src-${QT5_VERSION}.tar.xz -o qtsvg-everywhere-src-${QT5_VERSION}.tar.xz
  354. /opt/local/bin/7z x qtsvg-everywhere-src-${QT5_VERSION}.tar.xz
  355. /opt/local/bin/7z x qtsvg-everywhere-src-${QT5_VERSION}.tar
  356. fi
  357. if [ ! -f qtsvg-everywhere-src-${QT5_VERSION}/build-done ]; then
  358. cd qtsvg-everywhere-src-${QT5_VERSION}
  359. qmake
  360. make ${MAKE_ARGS}
  361. make install
  362. touch build-done
  363. cd ..
  364. fi
  365. # ---------------------------------------------------------------------------------------------------------------------
  366. # python
  367. if [ ! -d Python-${PYTHON_VERSION} ]; then
  368. /opt/local/bin/aria2c https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz
  369. tar -xf Python-${PYTHON_VERSION}.tgz
  370. fi
  371. if [ ! -f Python-${PYTHON_VERSION}/build-done ]; then
  372. cd Python-${PYTHON_VERSION}
  373. sed -i -e "s/#zlib zlibmodule.c/zlib zlibmodule.c/" Modules/Setup.dist
  374. ./configure --prefix=${PREFIX} --enable-optimizations --enable-shared
  375. make
  376. make install
  377. touch build-done
  378. cd ..
  379. fi
  380. # ---------------------------------------------------------------------------------------------------------------------
  381. # sip
  382. if [ ! -d sip-${SIP_VERSION} ]; then
  383. /opt/local/bin/aria2c https://www.riverbankcomputing.com/static/Downloads/sip/${SIP_VERSION}/sip-${SIP_VERSION}.tar.gz
  384. tar -xf sip-${SIP_VERSION}.tar.gz
  385. fi
  386. if [ ! -f sip-${SIP_VERSION}/build-done ]; then
  387. cd sip-${SIP_VERSION}
  388. python3 configure.py --sip-module PyQt5.sip
  389. make ${MAKE_ARGS}
  390. make install
  391. touch build-done
  392. cd ..
  393. fi
  394. # ---------------------------------------------------------------------------------------------------------------------
  395. # pyqt5
  396. if [ ! -d PyQt5_gpl-${PYQT5_VERSION} ]; then
  397. /opt/local/bin/aria2c https://www.riverbankcomputing.com/static/Downloads/PyQt5/${PYQT5_VERSION}/PyQt5_gpl-${PYQT5_VERSION}.tar.gz
  398. tar -xf PyQt5_gpl-${PYQT5_VERSION}.tar.gz
  399. fi
  400. if [ ! -f PyQt5_gpl-${PYQT5_VERSION}/build-done ]; then
  401. cd PyQt5_gpl-${PYQT5_VERSION}
  402. python3 configure.py --concatenate --confirm-license -c
  403. make ${MAKE_ARGS}
  404. make install
  405. touch build-done
  406. cd ..
  407. fi
  408. # ---------------------------------------------------------------------------------------------------------------------
  409. # pyliblo
  410. if [ ! -d pyliblo-${PYLIBLO_VERSION} ]; then
  411. /opt/local/bin/aria2c http://das.nasophon.de/download/pyliblo-${PYLIBLO_VERSION}.tar.gz
  412. tar -xf pyliblo-${PYLIBLO_VERSION}.tar.gz
  413. fi
  414. if [ ! -f pyliblo-${PYLIBLO_VERSION}/build-done ]; then
  415. cd pyliblo-${PYLIBLO_VERSION}
  416. if [ ! -f patched ]; then
  417. patch -p1 -i ../../patches/pyliblo-python3.7.patch
  418. touch patched
  419. fi
  420. env CFLAGS="${CFLAGS} -I${TARGETDIR}/carla64/include" LDFLAGS="${LDFLAGS} -L${TARGETDIR}/carla64/lib" \
  421. python3 setup.py build
  422. python3 setup.py install --prefix=${PREFIX}
  423. touch build-done
  424. cd ..
  425. fi
  426. # ---------------------------------------------------------------------------------------------------------------------
  427. # cxfreeze
  428. if [ ! -d cx_Freeze-${CXFREEZE_VERSION} ]; then
  429. /opt/local/bin/aria2c https://github.com/anthony-tuininga/cx_Freeze/archive/${CXFREEZE_VERSION}.tar.gz
  430. tar -xf cx_Freeze-${CXFREEZE_VERSION}.tar.gz
  431. fi
  432. if [ ! -f cx_Freeze-${CXFREEZE_VERSION}/build-done ]; then
  433. cd cx_Freeze-${CXFREEZE_VERSION}
  434. sed -i -e 's/"python%s.%s"/"python%s.%sm"/' setup.py
  435. python3 setup.py build
  436. python3 setup.py install --prefix=${PREFIX}
  437. touch build-done
  438. cd ..
  439. fi
  440. # ---------------------------------------------------------------------------------------------------------------------