| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | #!/bin/sh
 | 
					
						
							|  |  |  | #  SPDX-License-Identifier: MIT | 
					
						
							|  |  |  | # | 
					
						
							| 
									
										
										
										
											2024-04-17 15:35:49 +00:00
										 |  |  | #  ES-DE Frontend | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | #  macOS_dependencies_build.sh | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | #  Builds the external dependencies in-tree. | 
					
						
							|  |  |  | #  The macOS_dependencies_setup.sh script must have been executed before this one. | 
					
						
							|  |  |  | #  All sources will be recompiled from scratch every time this script is run. | 
					
						
							|  |  |  | #  If manually compiling individual libraries, don't forget to set MACOSX_DEPLOYMENT_TARGET. | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | #  This script needs to run from the root of the repository. | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-05-16 15:06:07 +00:00
										 |  |  | export MACOSX_DEPLOYMENT_TARGET=11.0 | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | # How many CPU threads to use for the compilation. | 
					
						
							| 
									
										
										
										
											2023-06-24 22:06:17 +00:00
										 |  |  | JOBS=4 | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if [ ! -f .clang-format ]; then | 
					
						
							|  |  |  |   echo "You need to run this script from the root of the repository." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | cd external | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if [ ! -d FFmpeg ]; then | 
					
						
							|  |  |  |   echo "You need to first run tools/macOS_dependencies_setup.sh to download and configure the dependencies." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-08-08 19:53:13 +00:00
										 |  |  | echo "Building all dependencies in the ./external directory..." | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-02 17:05:49 +00:00
										 |  |  | export PKG_CONFIG_PATH=$(pwd)/../local_install/lib/pkgconfig | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-08-08 19:53:13 +00:00
										 |  |  | echo | 
					
						
							| 
									
										
										
										
											2024-06-30 15:33:54 +00:00
										 |  |  | echo "Building libiconv" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if [ ! -d libiconv ]; then | 
					
						
							|  |  |  |   echo "libiconv directory is missing, aborting." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | cd libiconv | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ./configure --enable-static=yes --enable-shared=no --prefix=$(pwd)/../local_install | 
					
						
							|  |  |  | make clean | 
					
						
							|  |  |  | make -j${JOBS} | 
					
						
							|  |  |  | make install | 
					
						
							|  |  |  | cd .. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-08-08 19:53:13 +00:00
										 |  |  | echo | 
					
						
							| 
									
										
										
										
											2024-06-30 13:44:09 +00:00
										 |  |  | echo "Building gettext" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if [ ! -d gettext ]; then | 
					
						
							|  |  |  |   echo "gettext directory is missing, aborting." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | cd gettext | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-06-30 15:33:54 +00:00
										 |  |  | ./configure --with-libiconv-prefix=$(pwd)/../local_install --prefix=$(pwd)/../local_install | 
					
						
							| 
									
										
										
										
											2024-06-30 13:44:09 +00:00
										 |  |  | make clean | 
					
						
							|  |  |  | make -j${JOBS} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | cd gettext-runtime/intl/.libs | 
					
						
							|  |  |  | install_name_tool -id "@rpath/libintl.8.dylib" libintl.8.dylib | 
					
						
							|  |  |  | cp libintl.8.dylib ../../../../../ | 
					
						
							|  |  |  | cd ../../../ | 
					
						
							|  |  |  | make install | 
					
						
							|  |  |  | cd .. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-08-08 19:53:13 +00:00
										 |  |  | echo | 
					
						
							|  |  |  | echo "Building ICU" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if [ ! -d icu/icu4c ]; then | 
					
						
							|  |  |  |   echo "icu/icu4c directory is missing, aborting." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-03 17:03:31 +00:00
										 |  |  | if [ ! -f icu/icu4c/source/icu_filters.json ]; then | 
					
						
							|  |  |  |   echo "icu/icu4c/source/icu_filters.json is missing, aborting." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-08-08 19:53:13 +00:00
										 |  |  | cd icu/icu4c/source | 
					
						
							| 
									
										
										
										
											2024-09-03 17:03:31 +00:00
										 |  |  | ICU_DATA_FILTER_FILE=icu_filters.json CXXFLAGS="-DUCONFIG_NO_COLLATION -DUCONFIG_NO_TRANSLITERATION" ./configure --disable-extras --disable-icuio --disable-samples --disable-tests | 
					
						
							| 
									
										
										
										
											2024-08-08 19:53:13 +00:00
										 |  |  | make clean | 
					
						
							|  |  |  | make -j${JOBS} | 
					
						
							|  |  |  | cd lib | 
					
						
							|  |  |  | install_name_tool -id "@rpath/libicudata.75.dylib" libicudata.75.1.dylib | 
					
						
							|  |  |  | install_name_tool -id "@rpath/libicui18n.75.dylib" libicui18n.75.1.dylib | 
					
						
							|  |  |  | install_name_tool -change $(otool -L libicui18n.75.1.dylib | grep libicuuc | cut -f1 -d' ' | sed 's/[[:blank:]]//g') @rpath/libicuuc.75.dylib libicui18n.75.1.dylib | 
					
						
							|  |  |  | install_name_tool -change $(otool -L libicui18n.75.1.dylib | grep libicudata | cut -f1 -d' ' | sed 's/[[:blank:]]//g') @rpath/libicudata.75.dylib libicui18n.75.1.dylib | 
					
						
							|  |  |  | install_name_tool -id "@rpath/libicuuc.75.dylib" libicuuc.75.1.dylib | 
					
						
							|  |  |  | install_name_tool -change $(otool -L libicuuc.75.1.dylib | grep libicudata | cut -f1 -d' ' | sed 's/[[:blank:]]//g') @rpath/libicudata.75.dylib libicuuc.75.1.dylib | 
					
						
							|  |  |  | cp libicudata.75.1.dylib ../../../../../libicudata.75.dylib | 
					
						
							|  |  |  | cp libicui18n.75.1.dylib ../../../../../libicui18n.75.dylib | 
					
						
							|  |  |  | cp libicuuc.75.1.dylib ../../../../../libicuuc.75.dylib | 
					
						
							|  |  |  | cd ../../../../ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | echo | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | echo "Building libpng" | 
					
						
							| 
									
										
										
										
											2022-10-30 12:01:51 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if [ ! -d libpng ]; then | 
					
						
							|  |  |  |   echo "libpng directory is missing, aborting." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | cd libpng | 
					
						
							|  |  |  | rm -f CMakeCache.txt | 
					
						
							| 
									
										
										
										
											2022-02-02 17:05:49 +00:00
										 |  |  | if [ $(uname -m) == "arm64" ]; then | 
					
						
							| 
									
										
										
										
											2022-10-04 15:33:22 +00:00
										 |  |  |   cmake -DCMAKE_BUILD_TYPE=Release -DPNG_SHARED=off -DPNG_ARM_NEON=off -DCMAKE_INSTALL_PREFIX=$(pwd)/../local_install . | 
					
						
							| 
									
										
										
										
											2022-02-02 17:05:49 +00:00
										 |  |  | else | 
					
						
							| 
									
										
										
										
											2022-10-04 15:33:22 +00:00
										 |  |  |   cmake -DCMAKE_BUILD_TYPE=Release -DPNG_SHARED=off -DCMAKE_INSTALL_PREFIX=$(pwd)/../local_install . | 
					
						
							| 
									
										
										
										
											2022-02-02 17:05:49 +00:00
										 |  |  | fi | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | make clean | 
					
						
							|  |  |  | make -j${JOBS} | 
					
						
							|  |  |  | make install | 
					
						
							|  |  |  | cd .. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-31 17:31:40 +00:00
										 |  |  | echo | 
					
						
							| 
									
										
										
										
											2024-08-08 19:53:13 +00:00
										 |  |  | echo "Building HarfBuzz" | 
					
						
							| 
									
										
										
										
											2024-07-31 17:31:40 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if [ ! -d harfbuzz/build ]; then | 
					
						
							|  |  |  |   echo "harfbuzz directory is missing, aborting." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | cd harfbuzz/build | 
					
						
							|  |  |  | rm -f CMakeCache.txt | 
					
						
							| 
									
										
										
										
											2024-07-31 18:54:27 +00:00
										 |  |  | cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DHB_BUILD_SUBSET=off .. | 
					
						
							| 
									
										
										
										
											2024-07-31 17:31:40 +00:00
										 |  |  | make clean | 
					
						
							|  |  |  | make -j${JOBS} | 
					
						
							|  |  |  | cp libharfbuzz.dylib ../../../ | 
					
						
							|  |  |  | cd ../.. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-24 21:58:33 +00:00
										 |  |  | echo | 
					
						
							| 
									
										
										
										
											2024-08-08 19:53:13 +00:00
										 |  |  | echo "Building FreeType" | 
					
						
							| 
									
										
										
										
											2022-10-30 12:01:51 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if [ ! -d freetype/build ]; then | 
					
						
							|  |  |  |   echo "FreeType directory is missing, aborting." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | cd freetype/build | 
					
						
							|  |  |  | rm -f CMakeCache.txt | 
					
						
							| 
									
										
										
										
											2022-10-04 15:33:22 +00:00
										 |  |  | cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=on -DBUILD_SHARED_LIBS=on -DCMAKE_MACOSX_RPATH=on -DCMAKE_INSTALL_PREFIX=$(pwd)/../../local_install -S .. -B . | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | make clean | 
					
						
							|  |  |  | make -j${JOBS} | 
					
						
							| 
									
										
										
										
											2023-06-24 21:58:33 +00:00
										 |  |  | cp libfreetype.6.19.0.dylib ../../../libfreetype.6.dylib | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | cd ../.. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-24 21:58:33 +00:00
										 |  |  | echo | 
					
						
							|  |  |  | echo "Building Fontconfig" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if [ ! -d fontconfig ]; then | 
					
						
							|  |  |  |   echo "fontconfig directory is missing, aborting." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | cd fontconfig | 
					
						
							|  |  |  | rm -rf builddir | 
					
						
							| 
									
										
										
										
											2023-06-25 13:44:38 +00:00
										 |  |  | PKG_CONFIG_PATH=$(pwd)/../local_install/lib/pkgconfig meson setup --buildtype=release --prefix $(pwd)/../local_install builddir | 
					
						
							| 
									
										
										
										
											2023-06-24 21:58:33 +00:00
										 |  |  | cd builddir | 
					
						
							|  |  |  | meson compile | 
					
						
							| 
									
										
										
										
											2023-06-25 20:53:26 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | # This will fail if there are spaces in the build path. | 
					
						
							|  |  |  | cd src | 
					
						
							|  |  |  | install_name_tool -change $(otool -L libfontconfig.1.dylib | grep libfreetype | cut -f1 -d' ' | sed 's/[[:blank:]]//g') @rpath/libfreetype.6.dylib libfontconfig.1.dylib | 
					
						
							|  |  |  | cd .. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-24 21:58:33 +00:00
										 |  |  | meson install | 
					
						
							|  |  |  | cp src/libfontconfig.1.dylib ../../../ | 
					
						
							|  |  |  | cd ../.. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | echo | 
					
						
							|  |  |  | echo "Building libjpeg-turbo" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if [ ! -d libjpeg-turbo ]; then | 
					
						
							|  |  |  |   echo "libjpeg-turbo directory is missing, aborting." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | cd libjpeg-turbo/build | 
					
						
							|  |  |  | rm -f CMakeCache.txt | 
					
						
							|  |  |  | cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(pwd)/../../local_install -B . -S .. | 
					
						
							|  |  |  | make clean | 
					
						
							|  |  |  | make -j${JOBS} | 
					
						
							|  |  |  | make install | 
					
						
							|  |  |  | cp libjpeg.62.4.0.dylib ../../../libjpeg.62.dylib | 
					
						
							|  |  |  | cd ../.. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | echo | 
					
						
							|  |  |  | echo "Building LibTIFF" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if [ ! -d libtiff ]; then | 
					
						
							|  |  |  |   echo "libtiff directory is missing, aborting." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | cd libtiff/build | 
					
						
							|  |  |  | rm -f CMakeCache.txt | 
					
						
							|  |  |  | cmake -DCMAKE_BUILD_TYPE=Release -Dtiff-tools=off -Dtiff-tests=off -Dtiff-contrib=off -Dtiff-docs=off -DCMAKE_INSTALL_PREFIX=$(pwd)/../../local_install -B . -S .. | 
					
						
							|  |  |  | make clean | 
					
						
							|  |  |  | make -j${JOBS} | 
					
						
							|  |  |  | make install | 
					
						
							|  |  |  | cp libtiff/libtiff.6.0.1.dylib ../../../libtiff.6.dylib | 
					
						
							|  |  |  | cd ../.. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | echo | 
					
						
							|  |  |  | echo "Building OpenJPEG" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if [ ! -d openjpeg ]; then | 
					
						
							|  |  |  |   echo "openjpeg directory is missing, aborting." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | cd openjpeg/build | 
					
						
							|  |  |  | rm -f CMakeCache.txt | 
					
						
							|  |  |  | PKG_CONFIG_PATH=$(pwd)/../local_install/lib/pkgconfig cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(pwd)/../../local_install -S .. -B . | 
					
						
							|  |  |  | make clean | 
					
						
							|  |  |  | make -j${JOBS} | 
					
						
							|  |  |  | make install | 
					
						
							|  |  |  | cp bin/libopenjp2.2.5.0.dylib ../../../libopenjp2.7.dylib | 
					
						
							|  |  |  | cd ../.. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | echo | 
					
						
							|  |  |  | echo "Building Poppler" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if [ ! -d poppler ]; then | 
					
						
							|  |  |  |   echo "poppler directory is missing, aborting." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | cd poppler/build | 
					
						
							|  |  |  | rm -f CMakeCache.txt | 
					
						
							| 
									
										
										
										
											2023-06-24 22:06:17 +00:00
										 |  |  | PKG_CONFIG_PATH=$(pwd)/../local_install/lib/pkgconfig cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$(pwd)/../../local_install \
 | 
					
						
							|  |  |  | -DENABLE_UTILS=off -DBUILD_CPP_TESTS=off -DENABLE_LIBCURL=off -DRUN_GPERF_IF_PRESENT=off -DENABLE_QT5=off -DENABLE_QT6=off -DENABLE_BOOST=off -DENABLE_GLIB=off -DENABLE_NSS3=off -S .. -B . | 
					
						
							| 
									
										
										
										
											2023-06-24 21:58:33 +00:00
										 |  |  | make clean | 
					
						
							|  |  |  | make -j${JOBS} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # This will fail if there are spaces in the build path. | 
					
						
							|  |  |  | install_name_tool -change $(otool -L libpoppler.129.dylib | grep libfreetype | cut -f1 -d' ' | sed 's/[[:blank:]]//g') @rpath/libfreetype.6.dylib libpoppler.129.dylib | 
					
						
							|  |  |  | install_name_tool -change $(otool -L libpoppler.129.dylib | grep libfontconfig | cut -f1 -d' ' | sed 's/[[:blank:]]//g') @rpath/libfontconfig.1.dylib libpoppler.129.dylib | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | cp libpoppler.129.0.0.dylib ../../../libpoppler.129.dylib | 
					
						
							|  |  |  | cp cpp/libpoppler-cpp.0.11.0.dylib ../../../libpoppler-cpp.0.dylib | 
					
						
							|  |  |  | cd ../.. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | echo | 
					
						
							| 
									
										
										
										
											2024-08-08 19:53:13 +00:00
										 |  |  | echo "Building FreeImage" | 
					
						
							| 
									
										
										
										
											2022-10-30 12:01:51 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if [ ! -d freeimage/FreeImage ]; then | 
					
						
							|  |  |  |   echo "FreeImage directory is missing, aborting." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | cd freeimage/FreeImage | 
					
						
							|  |  |  | make clean | 
					
						
							|  |  |  | make -j${JOBS} | 
					
						
							|  |  |  | cp libfreeimage.a ../../.. | 
					
						
							|  |  |  | cd ../.. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-24 21:58:33 +00:00
										 |  |  | echo | 
					
						
							| 
									
										
										
										
											2024-08-08 19:53:13 +00:00
										 |  |  | echo "Building libgit2" | 
					
						
							| 
									
										
										
										
											2023-03-21 23:17:26 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if [ ! -d libgit2/build ]; then | 
					
						
							|  |  |  |   echo "libgit2 directory is missing, aborting." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | cd libgit2/build | 
					
						
							|  |  |  | rm -f CMakeCache.txt | 
					
						
							|  |  |  | cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF .. | 
					
						
							|  |  |  | make clean | 
					
						
							|  |  |  | make -j${JOBS} | 
					
						
							| 
									
										
										
										
											2023-11-05 11:34:25 +00:00
										 |  |  | cp libgit2.1.7.1.dylib ../../../libgit2.1.7.dylib | 
					
						
							| 
									
										
										
										
											2023-03-21 23:17:26 +00:00
										 |  |  | cd ../.. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-24 21:58:33 +00:00
										 |  |  | echo | 
					
						
							| 
									
										
										
										
											2024-08-08 19:53:13 +00:00
										 |  |  | echo "Building pugixml" | 
					
						
							| 
									
										
										
										
											2022-10-30 12:01:51 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if [ ! -d pugixml ]; then | 
					
						
							|  |  |  |   echo "pugixml directory is missing, aborting." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | cd pugixml | 
					
						
							|  |  |  | rm -f CMakeCache.txt | 
					
						
							| 
									
										
										
										
											2022-10-04 15:33:22 +00:00
										 |  |  | cmake -DCMAKE_BUILD_TYPE=Release . | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | make clean | 
					
						
							|  |  |  | make -j${JOBS} | 
					
						
							|  |  |  | cp libpugixml.a ../.. | 
					
						
							|  |  |  | cd .. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-24 21:58:33 +00:00
										 |  |  | echo | 
					
						
							| 
									
										
										
										
											2024-08-08 19:53:13 +00:00
										 |  |  | echo "Building SDL" | 
					
						
							| 
									
										
										
										
											2022-10-30 12:01:51 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if [ ! -d SDL/build ]; then | 
					
						
							|  |  |  |   echo "SDL directory is missing, aborting." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | cd SDL/build | 
					
						
							|  |  |  | rm -f CMakeCache.txt | 
					
						
							| 
									
										
										
										
											2022-09-27 15:52:36 +00:00
										 |  |  | cmake -DCMAKE_BUILD_TYPE=Release -S .. -B . | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | make clean | 
					
						
							|  |  |  | make -j${JOBS} | 
					
						
							| 
									
										
										
										
											2022-12-15 19:13:37 +00:00
										 |  |  | cp libSDL2-2.0.0.dylib ../../.. | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | cd ../.. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-24 21:58:33 +00:00
										 |  |  | echo | 
					
						
							| 
									
										
										
										
											2024-08-08 19:53:13 +00:00
										 |  |  | echo "Building libvpx" | 
					
						
							| 
									
										
										
										
											2022-10-30 12:01:51 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if [ ! -d libvpx ]; then | 
					
						
							|  |  |  |   echo "libvpx directory is missing, aborting." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | cd libvpx | 
					
						
							| 
									
										
										
										
											2023-06-24 21:58:33 +00:00
										 |  |  | ./configure --disable-examples --disable-docs --disable-tools --disable-unit-tests --enable-pic --enable-vp9-highbitdepth --prefix=$(pwd)/../local_install | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | make clean | 
					
						
							|  |  |  | make -j${JOBS} | 
					
						
							|  |  |  | make install | 
					
						
							|  |  |  | cd .. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-24 21:58:33 +00:00
										 |  |  | echo | 
					
						
							| 
									
										
										
										
											2024-08-08 19:53:13 +00:00
										 |  |  | echo "Building Ogg" | 
					
						
							| 
									
										
										
										
											2022-10-30 12:01:51 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if [ ! -d ogg ]; then | 
					
						
							|  |  |  |   echo "Ogg directory is missing, aborting." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | cd ogg | 
					
						
							|  |  |  | rm -f CMakeCache.txt | 
					
						
							| 
									
										
										
										
											2022-10-04 15:33:22 +00:00
										 |  |  | cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(pwd)/../local_install . | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | make clean | 
					
						
							|  |  |  | make -j${JOBS} | 
					
						
							|  |  |  | make install | 
					
						
							|  |  |  | cd .. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-24 21:58:33 +00:00
										 |  |  | echo | 
					
						
							| 
									
										
										
										
											2024-08-08 19:53:13 +00:00
										 |  |  | echo "Building Vorbis" | 
					
						
							| 
									
										
										
										
											2022-10-30 12:01:51 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if [ ! -d vorbis ]; then | 
					
						
							|  |  |  |   echo "Vorbis directory is missing, aborting." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | cd vorbis | 
					
						
							|  |  |  | rm -f CMakeCache.txt | 
					
						
							| 
									
										
										
										
											2022-10-04 15:33:22 +00:00
										 |  |  | cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=on -DCMAKE_MACOSX_RPATH=on -DCMAKE_INSTALL_PREFIX=$(pwd)/../local_install . | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | make clean | 
					
						
							|  |  |  | make -j${JOBS} | 
					
						
							|  |  |  | make install | 
					
						
							| 
									
										
										
										
											2022-02-02 17:05:49 +00:00
										 |  |  | cp lib/libvorbisenc.2.0.12.dylib ../.. | 
					
						
							|  |  |  | cp lib/libvorbis.0.4.9.dylib ../.. | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | cd .. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-24 21:58:33 +00:00
										 |  |  | echo | 
					
						
							| 
									
										
										
										
											2024-08-08 19:53:13 +00:00
										 |  |  | echo "Building Opus" | 
					
						
							| 
									
										
										
										
											2022-10-30 12:01:51 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if [ ! -d opus ]; then | 
					
						
							|  |  |  |   echo "Opus directory is missing, aborting." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | cd opus | 
					
						
							|  |  |  | rm -f CMakeCache.txt | 
					
						
							| 
									
										
										
										
											2022-10-04 15:33:22 +00:00
										 |  |  | cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(pwd)/../local_install . | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | make clean | 
					
						
							|  |  |  | make -j${JOBS} | 
					
						
							|  |  |  | make install | 
					
						
							|  |  |  | cd .. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-24 21:58:33 +00:00
										 |  |  | echo | 
					
						
							| 
									
										
										
										
											2024-08-08 19:53:13 +00:00
										 |  |  | echo "Building FFmpeg" | 
					
						
							| 
									
										
										
										
											2022-10-30 12:01:51 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if [ ! -d FFmpeg ]; then | 
					
						
							|  |  |  |   echo "FFmpeg directory is missing, aborting." | 
					
						
							|  |  |  |   exit | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | cd FFmpeg | 
					
						
							| 
									
										
										
										
											2023-06-25 20:25:18 +00:00
										 |  |  | PKG_CONFIG_PATH=$(pwd)/../local_install/lib/pkgconfig ./configure --prefix=/usr/local --enable-rpath --install-name-dir=@rpath --disable-doc --disable-lzma --enable-gpl --enable-shared --enable-libvorbis --enable-libopus --enable-libvpx --enable-postproc | 
					
						
							| 
									
										
										
										
											2022-04-13 17:31:12 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-30 21:14:18 +00:00
										 |  |  | make clean | 
					
						
							|  |  |  | make -j${JOBS} | 
					
						
							| 
									
										
										
										
											2023-06-25 10:42:16 +00:00
										 |  |  | install_name_tool -rpath /usr/local/lib @executable_path libavcodec/libavcodec.60.dylib | 
					
						
							|  |  |  | cp libavcodec/libavcodec.60.dylib ../.. | 
					
						
							|  |  |  | install_name_tool -rpath /usr/local/lib @executable_path libavfilter/libavfilter.9.dylib | 
					
						
							|  |  |  | cp libavfilter/libavfilter.9.dylib ../.. | 
					
						
							|  |  |  | install_name_tool -rpath /usr/local/lib @executable_path libavformat/libavformat.60.dylib | 
					
						
							|  |  |  | cp libavformat/libavformat.60.dylib ../.. | 
					
						
							|  |  |  | install_name_tool -rpath /usr/local/lib @executable_path libavutil/libavutil.58.dylib | 
					
						
							|  |  |  | cp libavutil/libavutil.58.dylib ../.. | 
					
						
							|  |  |  | install_name_tool -rpath /usr/local/lib @executable_path libpostproc/libpostproc.57.dylib | 
					
						
							|  |  |  | cp libpostproc/libpostproc.57.dylib ../.. | 
					
						
							| 
									
										
										
										
											2022-04-15 09:30:41 +00:00
										 |  |  | install_name_tool -rpath /usr/local/lib @executable_path libswresample/libswresample.4.dylib | 
					
						
							|  |  |  | cp libswresample/libswresample.4.dylib ../.. | 
					
						
							| 
									
										
										
										
											2023-06-25 10:42:16 +00:00
										 |  |  | install_name_tool -rpath /usr/local/lib @executable_path libswscale/libswscale.7.dylib | 
					
						
							|  |  |  | cp libswscale/libswscale.7.dylib ../.. | 
					
						
							| 
									
										
										
										
											2022-02-02 17:05:49 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | unset PKG_CONFIG_PATH | 
					
						
							| 
									
										
										
										
											2022-10-30 12:01:51 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | echo | 
					
						
							|  |  |  | echo "Done building all dependencies." |