├── .gitignore ├── LICENSE ├── README.md ├── config ├── defaults.conf ├── dev.conf ├── ltr.conf ├── nightly.conf └── pr.conf ├── qgis-mac-packager.bash ├── qgis_build └── qgis_build.bash ├── qgis_bundle ├── config.conf ├── qgis_bundle.bash ├── recipes │ ├── boost │ │ └── recipe.sh │ ├── brotli │ │ └── recipe.sh │ ├── bz2 │ │ └── recipe.sh │ ├── exiv2 │ │ └── recipe.sh │ ├── expat │ │ └── recipe.sh │ ├── fastcgi │ │ └── recipe.sh │ ├── fontconfig │ │ └── recipe.sh │ ├── freetds │ │ └── recipe.sh │ ├── freetype │ │ └── recipe.sh │ ├── freexl │ │ └── recipe.sh │ ├── gcc │ │ └── recipe.sh │ ├── gdal │ │ ├── recipe.sh │ │ └── run_gdal_binary.bash │ ├── geos │ │ └── recipe.sh │ ├── gettext │ │ └── recipe.sh │ ├── grass │ │ ├── grass.bash │ │ └── recipe.sh │ ├── gsl │ │ └── recipe.sh │ ├── hdf5 │ │ └── recipe.sh │ ├── jpeg │ │ └── recipe.sh │ ├── laszip │ │ └── recipe.sh │ ├── lerc │ │ └── recipe.sh │ ├── libcurl │ │ └── recipe.sh │ ├── libffi │ │ └── recipe.sh │ ├── libgeotiff │ │ └── recipe.sh │ ├── libicu │ │ └── recipe.sh │ ├── libkml │ │ └── recipe.sh │ ├── libomp │ │ └── recipe.sh │ ├── libssh2 │ │ └── recipe.sh │ ├── libtasn1 │ │ └── recipe.sh │ ├── libtiff │ │ └── recipe.sh │ ├── libtool │ │ └── recipe.sh │ ├── libunistring │ │ └── recipe.sh │ ├── libxml2 │ │ └── recipe.sh │ ├── libxslt │ │ └── recipe.sh │ ├── libyaml │ │ └── recipe.sh │ ├── libzip │ │ └── recipe.sh │ ├── little_cms2 │ │ └── recipe.sh │ ├── minizip │ │ └── recipe.sh │ ├── mysql │ │ └── recipe.sh │ ├── netcdf │ │ └── recipe.sh │ ├── openblas │ │ └── recipe.sh │ ├── openjpeg │ │ └── recipe.sh │ ├── openssl │ │ └── recipe.sh │ ├── pcre │ │ └── recipe.sh │ ├── pdal │ │ └── recipe.sh │ ├── png │ │ └── recipe.sh │ ├── poppler │ │ └── recipe.sh │ ├── postgres │ │ └── recipe.sh │ ├── proj │ │ └── recipe.sh │ ├── protobuf │ │ └── recipe.sh │ ├── python │ │ └── recipe.sh │ ├── python_cftime │ │ └── recipe.sh │ ├── python_fiona │ │ └── recipe.sh │ ├── python_gdal │ │ └── recipe.sh │ ├── python_h5py │ │ └── recipe.sh │ ├── python_llvmlite │ │ └── recipe.sh │ ├── python_matplotlib │ │ └── recipe.sh │ ├── python_netcdf │ │ └── recipe.sh │ ├── python_numba │ │ └── recipe.sh │ ├── python_numpy │ │ └── recipe.sh │ ├── python_opencv │ │ └── recipe.sh │ ├── python_packages │ │ ├── recipe.sh │ │ └── ssl.py │ ├── python_patsy │ │ └── recipe.sh │ ├── python_pillow │ │ └── recipe.sh │ ├── python_psycopg2 │ │ └── recipe.sh │ ├── python_pymssql │ │ └── recipe.sh │ ├── python_pyproj │ │ ├── _patch_proj_lib.py │ │ └── recipe.sh │ ├── python_pyqt5 │ │ └── recipe.sh │ ├── python_rasterio │ │ └── recipe.sh │ ├── python_rtree │ │ ├── core.py │ │ └── recipe.sh │ ├── python_scipy │ │ └── recipe.sh │ ├── python_shapely │ │ ├── geos.py │ │ └── recipe.sh │ ├── qca │ │ └── recipe.sh │ ├── qgis │ │ ├── find_mod_spatialite.py │ │ ├── pyqgis-startup.py │ │ ├── qgis_mapserv.fcgi │ │ ├── qgis_mapserver │ │ ├── qgis_process │ │ └── recipe.sh │ ├── qscintilla │ │ └── recipe.sh │ ├── qt │ │ ├── designer │ │ └── recipe.sh │ ├── qtkeychain │ │ └── recipe.sh │ ├── qtwebkit │ │ └── recipe.sh │ ├── qwt │ │ └── recipe.sh │ ├── rttopo │ │ └── recipe.sh │ ├── saga │ │ ├── recipe.sh │ │ └── saga_cmd │ ├── spatialindex │ │ └── recipe.sh │ ├── spatialite │ │ └── recipe.sh │ ├── sqlite │ │ └── recipe.sh │ ├── unixodbc │ │ └── recipe.sh │ ├── uriparser │ │ └── recipe.sh │ ├── webp │ │ └── recipe.sh │ ├── wxmac │ │ └── recipe.sh │ ├── xerces │ │ └── recipe.sh │ ├── xz │ │ └── recipe.sh │ ├── zlib │ │ └── recipe.sh │ └── zstd │ │ └── recipe.sh └── replace_string_in_file.py ├── qgis_deps ├── README.md ├── create_package.bash ├── distribute.sh ├── qgis_deps.bash ├── recipes │ ├── bison │ │ └── recipe.sh │ ├── boost │ │ └── recipe.sh │ ├── brotli │ │ └── recipe.sh │ ├── bz2 │ │ ├── Makefile-libbz2_dylib │ │ └── recipe.sh │ ├── exiv2 │ │ └── recipe.sh │ ├── expat │ │ └── recipe.sh │ ├── fastcgi │ │ └── recipe.sh │ ├── flex │ │ └── recipe.sh │ ├── fontconfig │ │ └── recipe.sh │ ├── freetds │ │ └── recipe.sh │ ├── freetype │ │ └── recipe.sh │ ├── freexl │ │ └── recipe.sh │ ├── gcc │ │ └── recipe.sh │ ├── gdal │ │ └── recipe.sh │ ├── geos │ │ └── recipe.sh │ ├── gettext │ │ └── recipe.sh │ ├── gmp │ │ └── recipe.sh │ ├── grass │ │ └── recipe.sh │ ├── gsl │ │ └── recipe.sh │ ├── hdf5 │ │ └── recipe.sh │ ├── jpeg │ │ └── recipe.sh │ ├── laszip │ │ └── recipe.sh │ ├── lerc │ │ └── recipe.sh │ ├── libcurl │ │ └── recipe.sh │ ├── libffi │ │ └── recipe.sh │ ├── libgeotiff │ │ └── recipe.sh │ ├── libicu │ │ └── recipe.sh │ ├── libkml │ │ └── recipe.sh │ ├── libmpc │ │ └── recipe.sh │ ├── libomp │ │ └── recipe.sh │ ├── libssh2 │ │ └── recipe.sh │ ├── libtasn1 │ │ └── recipe.sh │ ├── libtiff │ │ └── recipe.sh │ ├── libtool │ │ └── recipe.sh │ ├── libunistring │ │ └── recipe.sh │ ├── libxml2 │ │ └── recipe.sh │ ├── libxslt │ │ └── recipe.sh │ ├── libyaml │ │ └── recipe.sh │ ├── libzip │ │ └── recipe.sh │ ├── little_cms2 │ │ └── recipe.sh │ ├── minizip │ │ └── recipe.sh │ ├── mpfr │ │ └── recipe.sh │ ├── mysql │ │ └── recipe.sh │ ├── netcdf │ │ └── recipe.sh │ ├── openblas │ │ └── recipe.sh │ ├── openjpeg │ │ └── recipe.sh │ ├── openssl │ │ └── recipe.sh │ ├── pcre │ │ └── recipe.sh │ ├── pdal │ │ └── recipe.sh │ ├── png │ │ └── recipe.sh │ ├── poppler │ │ └── recipe.sh │ ├── postgres │ │ └── recipe.sh │ ├── proj │ │ └── recipe.sh │ ├── proj_data │ │ └── recipe.sh │ ├── protobuf │ │ └── recipe.sh │ ├── python │ │ └── recipe.sh │ ├── python_all │ │ └── recipe.sh │ ├── python_cftime │ │ └── recipe.sh │ ├── python_fiona │ │ └── recipe.sh │ ├── python_gdal │ │ └── recipe.sh │ ├── python_geopandas │ │ └── recipe.sh │ ├── python_h5py │ │ └── recipe.sh │ ├── python_llvmlite │ │ └── recipe.sh │ ├── python_matplotlib │ │ ├── recipe.sh │ │ └── setup.cfg │ ├── python_netcdf4 │ │ └── recipe.sh │ ├── python_numba │ │ └── recipe.sh │ ├── python_numpy │ │ └── recipe.sh │ ├── python_opencv │ │ └── recipe.sh │ ├── python_owslib │ │ └── recipe.sh │ ├── python_packages │ │ └── recipe.sh │ ├── python_pandas │ │ └── recipe.sh │ ├── python_patsy │ │ └── recipe.sh │ ├── python_pillow │ │ └── recipe.sh │ ├── python_psycopg2 │ │ └── recipe.sh │ ├── python_pymssql │ │ └── recipe.sh │ ├── python_pyproj │ │ └── recipe.sh │ ├── python_pyqt5 │ │ └── recipe.sh │ ├── python_pysal │ │ └── recipe.sh │ ├── python_qscintilla │ │ └── recipe.sh │ ├── python_rasterio │ │ └── recipe.sh │ ├── python_rtree │ │ ├── core.py │ │ └── recipe.sh │ ├── python_scikit_learn │ │ └── recipe.sh │ ├── python_scipy │ │ └── recipe.sh │ ├── python_shapely │ │ ├── geos.py │ │ └── recipe.sh │ ├── python_sip │ │ └── recipe.sh │ ├── python_statsmodels │ │ └── recipe.sh │ ├── qca │ │ └── recipe.sh │ ├── qgis_deps │ │ └── recipe.sh │ ├── qscintilla │ │ └── recipe.sh │ ├── qtextra │ │ └── recipe.sh │ ├── qtkeychain │ │ └── recipe.sh │ ├── qtwebkit │ │ ├── patches │ │ │ └── bison37.patch │ │ └── recipe.sh │ ├── qwt │ │ └── recipe.sh │ ├── rttopo │ │ └── recipe.sh │ ├── saga │ │ └── recipe.sh │ ├── spatialindex │ │ ├── patches │ │ │ └── temporaryfile.patch │ │ └── recipe.sh │ ├── spatialite │ │ └── recipe.sh │ ├── sqlite │ │ └── recipe.sh │ ├── unixodbc │ │ └── recipe.sh │ ├── uriparser │ │ └── recipe.sh │ ├── webp │ │ └── recipe.sh │ ├── wxmac │ │ └── recipe.sh │ ├── xerces │ │ └── recipe.sh │ ├── xz │ │ └── recipe.sh │ ├── zlib │ │ └── recipe.sh │ └── zstd │ │ └── recipe.sh ├── sign_deps.bash ├── tools │ └── depsort.py └── upload_to_qgis2.bash ├── qgis_package └── qgis_package.bash ├── resources ├── EULA.txt ├── QGIS.icns ├── create_icns.bash ├── dmgsettings.py ├── eula-resources-template.xml ├── license_ecw.txt ├── license_mrsid.txt ├── pyqgis-startup.py ├── qgis-icon-120x120.png ├── qgis-icon-16x16.png ├── qgis-icon-512x512.png ├── qgis-icon-60x60.png └── qgis-icon-macos.png └── scripts ├── Roboto ├── LICENSE.txt └── Roboto-Black.ttf ├── add_license_to_dmg.bash ├── bash_profile ├── check_all.bash ├── deps.bash ├── deps.py ├── image_creator.py ├── install_brew.bash ├── install_brew_dev_packages.bash ├── org.qgis.build.plist ├── run_all.bash ├── run_build.bash ├── run_cronjob.bash ├── run_pkg.bash └── upload_to_qgis2.bash /.gitignore: -------------------------------------------------------------------------------- 1 | builder/.*deps 2 | 3 | .DS_Store 4 | 5 | # Byte-compiled / optimized / DLL files 6 | __pycache__/ 7 | *.py[cod] 8 | *$py.class 9 | 10 | # C extensions 11 | *.so 12 | 13 | # Distribution / packaging 14 | .idea 15 | .DS_Store 16 | .Python 17 | build/ 18 | build-*/ 19 | develop-eggs/ 20 | dist/ 21 | downloads/ 22 | eggs/ 23 | .eggs/ 24 | lib/ 25 | lib64/ 26 | parts/ 27 | sdist/ 28 | var/ 29 | wheels/ 30 | *.egg-info/ 31 | .installed.cfg 32 | *.egg 33 | MANIFEST 34 | 35 | # PyInstaller 36 | # Usually these files are written by a python script from a template 37 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 38 | *.manifest 39 | *.spec 40 | 41 | # Installer logs 42 | pip-log.txt 43 | pip-delete-this-directory.txt 44 | 45 | # Unit test / coverage reports 46 | htmlcov/ 47 | .tox/ 48 | .coverage 49 | .coverage.* 50 | .cache 51 | nosetests.xml 52 | coverage.xml 53 | *.cover 54 | .hypothesis/ 55 | .pytest_cache/ 56 | 57 | # Translations 58 | *.mo 59 | *.pot 60 | 61 | # Django stuff: 62 | *.log 63 | local_settings.py 64 | db.sqlite3 65 | 66 | # Flask stuff: 67 | instance/ 68 | .webassets-cache 69 | 70 | # Scrapy stuff: 71 | .scrapy 72 | 73 | # Sphinx documentation 74 | docs/_build/ 75 | 76 | # PyBuilder 77 | target/ 78 | 79 | # Jupyter Notebook 80 | .ipynb_checkpoints 81 | 82 | # pyenv 83 | .python-version 84 | 85 | # celery beat schedule file 86 | celerybeat-schedule 87 | 88 | # SageMath parsed files 89 | *.sage.py 90 | 91 | # Environments 92 | .env 93 | .venv 94 | env/ 95 | venv/ 96 | ENV/ 97 | env.bak/ 98 | venv.bak/ 99 | 100 | # Spyder project settings 101 | .spyderproject 102 | .spyproject 103 | 104 | # Rope project settings 105 | .ropeproject 106 | 107 | # mkdocs documentation 108 | /site 109 | 110 | # mypy 111 | .mypy_cache/ 112 | -------------------------------------------------------------------------------- /config/dev.conf: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | CONFIGDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 4 | 5 | export VERSION_major_python=3.9 6 | export VERSION_qt=5.15.2 7 | export RELEASE_VERSION=0.9 8 | export RELEASE_VERSION_PATCH=0 9 | export RELEASE=dev 10 | 11 | export WITH_ECW="true" 12 | export WITH_MRSID="true" 13 | export WITH_ORACLE="true" 14 | export WITH_PDAL="true" 15 | export QGIS_CMAKE="" 16 | 17 | export USE_SEM="true" 18 | 19 | BASEDIR=/opt/QGIS/qgis-${RELEASE} 20 | export QGIS_BUILD_DIR=$BASEDIR/build 21 | export QGIS_INSTALL_DIR=$BASEDIR/install 22 | export QGIS_SOURCE_DIR=$CONFIGDIR/../../QGIS 23 | export BUNDLE_DIR=$BASEDIR/bundle 24 | export QGIS_APP_NAME=QGIS-Staging.app 25 | 26 | source $CONFIGDIR/defaults.conf 27 | -------------------------------------------------------------------------------- /config/ltr.conf: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | CONFIGDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 4 | 5 | export VERSION_major_python=3.9 6 | export VERSION_qt=5.15.2 7 | export RELEASE_VERSION=0.9 8 | export RELEASE_VERSION_PATCH=0 9 | export RELEASE=ltr 10 | 11 | export WITH_ECW="true" 12 | export WITH_MRSID="true" 13 | export WITH_ORACLE="true" 14 | export WITH_PDAL="true" 15 | export QGIS_CMAKE="-DWITH_DRACO=NO" 16 | 17 | export USE_SEM="false" 18 | 19 | BASEDIR=/Users/admin/qgis/builds/${RELEASE} 20 | export QGIS_BUILD_DIR=$BASEDIR/build 21 | export QGIS_INSTALL_DIR=$BASEDIR/install 22 | export QGIS_SOURCE_DIR=$BASEDIR/QGIS 23 | export BUNDLE_DIR=$BASEDIR/bundle 24 | export QGIS_APP_NAME=QGIS-LTR.app 25 | 26 | source $CONFIGDIR/defaults.conf 27 | 28 | # workaround 29 | function try () { 30 | if [ "$*" = "ninja install" ]; then 31 | cp output/python/qgis/3d_p.pyi output/python/qgis/_3d_p.pyi 32 | fi 33 | 34 | "$@" || exit 1 35 | } 36 | -------------------------------------------------------------------------------- /config/nightly.conf: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | CONFIGDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 4 | 5 | export VERSION_major_python=3.9 6 | export VERSION_qt=5.15.2 7 | export RELEASE_VERSION=0.9 8 | export RELEASE_VERSION_PATCH=0 9 | export RELEASE=nightly 10 | 11 | export WITH_ECW="true" 12 | export WITH_MRSID="true" 13 | export WITH_ORACLE="true" 14 | export WITH_PDAL="true" 15 | export QGIS_CMAKE="-DWITH_DRACO=NO" 16 | 17 | export USE_SEM="false" 18 | 19 | BASEDIR=/Users/admin/qgis/builds/${RELEASE} 20 | export QGIS_BUILD_DIR=$BASEDIR/build 21 | export QGIS_INSTALL_DIR=$BASEDIR/install 22 | export QGIS_SOURCE_DIR=$BASEDIR/QGIS 23 | export BUNDLE_DIR=$BASEDIR/bundle 24 | export QGIS_APP_NAME=QGIS-Dev.app 25 | 26 | source $CONFIGDIR/defaults.conf 27 | -------------------------------------------------------------------------------- /config/pr.conf: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | CONFIGDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 4 | 5 | export VERSION_major_python=3.9 6 | export VERSION_qt=5.15.2 7 | export RELEASE_VERSION=0.9 8 | export RELEASE_VERSION_PATCH=0 9 | export RELEASE=pr 10 | 11 | export WITH_ECW="true" 12 | export WITH_MRSID="true" 13 | export WITH_ORACLE="true" 14 | export WITH_PDAL="true" 15 | export QGIS_CMAKE="-DWITH_DRACO=NO" 16 | 17 | export USE_SEM="false" 18 | 19 | BASEDIR=/Users/admin/qgis/builds/${RELEASE} 20 | export QGIS_BUILD_DIR=$BASEDIR/build 21 | export QGIS_INSTALL_DIR=$BASEDIR/install 22 | export QGIS_SOURCE_DIR=$BASEDIR/QGIS 23 | export BUNDLE_DIR=$BASEDIR/bundle 24 | export QGIS_APP_NAME=QGIS.app 25 | 26 | source $CONFIGDIR/defaults.conf 27 | 28 | # workaround 29 | function try () { 30 | if [ "$*" = "ninja install" ]; then 31 | cp output/python/qgis/3d_p.pyi output/python/qgis/_3d_p.pyi 32 | fi 33 | 34 | "$@" || exit 1 35 | } 36 | -------------------------------------------------------------------------------- /qgis-mac-packager.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eo pipefail 4 | 5 | PWD=$(pwd) 6 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" 7 | 8 | if (( $# < 5 )); then 9 | echo "usage: $0 package_name config_file major minor patch" 10 | echo "example: ./$0 /path/to/qgis_nightly_master_20200717_024956.dmg config/nightly.conf 3 18 0" 11 | exit 1 12 | fi 13 | 14 | PACKAGE=$1 15 | CONFIG_FILE=$2 16 | export QGIS_MAJOR_VERSION=$3 17 | export QGIS_MINOR_VERSION=$4 18 | export QGIS_PATCH_VERSION=$5 19 | 20 | echo "qgis-mac-packager.bash QGIS $QGIS_MAJOR_VERSION.$QGIS_MINOR_VERSION.$QGIS_PATCH_VERSION" 21 | 22 | echo "Checking config file $CONFIG_FILE" 23 | if [ ! -f "$CONFIG_FILE" ]; then 24 | echo "invalid config file (1st argument) $CONFIG_FILE" 25 | fi 26 | shift 27 | source $CONFIG_FILE 28 | 29 | echo "Verifying the QGIS repo is cloned locally in $QGIS_SOURCE_DIR" 30 | if [ ! -f "$QGIS_SOURCE_DIR/INSTALL.md" ]; then 31 | error "missing $QGIS_SOURCE_DIR/INSTALL.md" 32 | fi 33 | 34 | echo "Verifying the Qt package installation" 35 | if [ ! -d "$QT_BASE" ]; then 36 | error "missing QT in $QT_BASE, install version ${VERSION_qt} from ${QGIS_DOWNLOAD_ROOT_URL}/deps/" 37 | fi 38 | 39 | echo "Verifying the qgis-deps package installation" 40 | if [ ! -d "$QGIS_DEPS_STAGE_PATH" ]; then 41 | error "missing QGIS-DEPS in $QGIS_DEPS_STAGE_PATH, install version ${QGIS_DEPS_SDK_VERSION} from ${QGIS_DOWNLOAD_ROOT_URL}/deps/" 42 | fi 43 | 44 | echo "Building QGIS" 45 | $DIR/qgis_build/qgis_build.bash "$CONFIG_FILE" $QGIS_MAJOR_VERSION $QGIS_MINOR_VERSION $QGIS_PATCH_VERSION 46 | 47 | echo "Bundle QGIS" 48 | $DIR/qgis_bundle/qgis_bundle.bash "$CONFIG_FILE" $QGIS_MAJOR_VERSION $QGIS_MINOR_VERSION $QGIS_PATCH_VERSION 49 | 50 | echo "Package QGIS to $PACKAGE" 51 | $DIR/qgis_package/qgis_package.bash "$CONFIG_FILE" $QGIS_MAJOR_VERSION $QGIS_MINOR_VERSION $QGIS_PATCH_VERSION "$PACKAGE" 52 | 53 | echo "All done (qgis-mac-packager.bash)" 54 | cd "$PWD" 55 | 56 | exit 0 -------------------------------------------------------------------------------- /qgis_bundle/config.conf: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 4 | 5 | 6 | 7 | source `dirname $0`/../qgis_deps/config.conf 8 | if [ -d $ROOT_OUT_PATH/stage ]; then 9 | info "Using qgis_deps: $ROOT_OUT_PATH/stage" 10 | else 11 | error "Missing qgis_deps directory '$ROOT_OUT_PATH/stage' not found." 12 | fi 13 | 14 | source $ROOT_OUT_PATH/stage/qgis-deps.config 15 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/boost/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_boost() { 4 | env_var_exists VERSION_boost 5 | } 6 | 7 | function bundle_boost() { 8 | : 9 | } 10 | 11 | function fix_binaries_boost() { 12 | : 13 | } 14 | 15 | function fix_binaries_boost_check() { 16 | : 17 | } 18 | 19 | function fix_paths_boost() { 20 | : 21 | } 22 | 23 | function fix_paths_boost_check() { 24 | : 25 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/brotli/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_brotli() { 4 | env_var_exists VERSION_brotli 5 | } 6 | 7 | function bundle_brotli() { 8 | try cp -av $DEPS_LIB_DIR/libbrotlicommon.*dylib $BUNDLE_LIB_DIR 9 | try cp -av $DEPS_LIB_DIR/libbrotlidec.*dylib $BUNDLE_LIB_DIR 10 | } 11 | 12 | function fix_binaries_brotli() { 13 | install_name_id @rpath/$LINK_libbrotlicommon $BUNDLE_LIB_DIR/$LINK_libbrotlicommon 14 | 15 | 16 | for i in \ 17 | $LINK_libbrotlicommon \ 18 | $LINK_libbrotlidec 19 | do 20 | install_name_id @rpath/$i $BUNDLE_LIB_DIR/$i 21 | install_name_change $DEPS_LIB_DIR/$LINK_libbrotlicommon @rpath/$LINK_libbrotlicommon $BUNDLE_LIB_DIR/$i 22 | install_name_change $DEPS_LIB_DIR/$LINK_libbrotlidec @rpath/$LINK_libbrotlidec $BUNDLE_LIB_DIR/$i 23 | done 24 | } 25 | 26 | function fix_binaries_brotli_check() { 27 | verify_binary $BUNDLE_LIB_DIR/$LINK_libbrotlicommon 28 | verify_binary $BUNDLE_LIB_DIR/$LINK_libbrotlidec 29 | } 30 | 31 | function fix_paths_brotli() { 32 | : 33 | } 34 | 35 | function fix_paths_brotli_check() { 36 | : 37 | } 38 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/bz2/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_bz2() { 4 | env_var_exists VERSION_bz2 5 | } 6 | 7 | function bundle_bz2() { 8 | try cp -av $DEPS_LIB_DIR/libbz2.* $BUNDLE_LIB_DIR 9 | } 10 | 11 | function fix_binaries_bz2() { 12 | install_name_id @rpath/$LINK_bz2 $BUNDLE_LIB_DIR/$LINK_bz2 13 | } 14 | 15 | function fix_binaries_bz2_check() { 16 | verify_binary $BUNDLE_LIB_DIR/$LINK_bz2 17 | } 18 | 19 | function fix_paths_bz2() { 20 | : 21 | } 22 | 23 | function fix_paths_bz2_check() { 24 | : 25 | } 26 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/exiv2/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_exiv2() { 4 | env_var_exists VERSION_exiv2 5 | env_var_exists QGIS_VERSION 6 | env_var_exists VERSION_grass_major 7 | env_var_exists LINK_exiv2 8 | } 9 | 10 | function bundle_exiv2() { 11 | try cp -av $DEPS_LIB_DIR/libexiv2.*dylib $BUNDLE_LIB_DIR 12 | } 13 | 14 | function fix_binaries_exiv2() { 15 | install_name_id @rpath/$LINK_exiv2 $BUNDLE_LIB_DIR/$LINK_exiv2 16 | 17 | for i in \ 18 | $LINK_expat \ 19 | $LINK_zlib 20 | do 21 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_LIB_DIR/$LINK_exiv2 22 | done 23 | } 24 | 25 | function fix_binaries_exiv2_check() { 26 | verify_binary $BUNDLE_LIB_DIR/$LINK_exiv2 27 | } 28 | 29 | function fix_paths_exiv2() { 30 | : 31 | } 32 | 33 | function fix_paths_exiv2_check() { 34 | : 35 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/expat/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_expat() { 4 | env_var_exists VERSION_expat 5 | env_var_exists LINK_expat 6 | } 7 | 8 | function bundle_expat() { 9 | try cp -av $DEPS_LIB_DIR/libexpat.*dylib $BUNDLE_LIB_DIR 10 | } 11 | 12 | function fix_binaries_expat() { 13 | install_name_id @rpath/$LINK_expat $BUNDLE_CONTENTS_DIR/MacOS/lib/$LINK_expat 14 | 15 | install_name_change $DEPS_LIB_DIR/$LINK_expat @rpath/$LINK_expat $BUNDLE_CONTENTS_DIR/MacOS/lib/$LINK_expat 16 | } 17 | 18 | function fix_binaries_expat_check() { 19 | verify_binary $BUNDLE_LIB_DIR/$LINK_expat 20 | } 21 | 22 | function fix_paths_expat() { 23 | : 24 | } 25 | 26 | function fix_paths_expat_check() { 27 | : 28 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/fastcgi/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_fastcgi() { 4 | env_var_exists VERSION_fastcgi 5 | env_var_exists LINK_fastcgi 6 | } 7 | 8 | function bundle_fastcgi() { 9 | try cp -av $DEPS_LIB_DIR/libfcgi.*dylib $BUNDLE_LIB_DIR 10 | } 11 | 12 | function fix_binaries_fastcgi() { 13 | install_name_id @rpath/$LINK_fastcgi $BUNDLE_CONTENTS_DIR/MacOS/lib/$LINK_fastcgi 14 | } 15 | 16 | function fix_binaries_fastcgi_check() { 17 | verify_binary $BUNDLE_LIB_DIR/$LINK_fastcgi 18 | } 19 | 20 | function fix_paths_fastcgi() { 21 | : 22 | } 23 | 24 | function fix_paths_fastcgi_check() { 25 | : 26 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/fontconfig/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_fontconfig() { 4 | env_var_exists VERSION_fontconfig 5 | } 6 | 7 | function bundle_fontconfig() { 8 | try cp -av $DEPS_LIB_DIR/libfontconfig.*dylib $BUNDLE_LIB_DIR 9 | } 10 | 11 | function fix_binaries_fontconfig() { 12 | install_name_id @rpath/$LINK_fontconfig $BUNDLE_LIB_DIR/$LINK_fontconfig 13 | 14 | for i in \ 15 | $LINK_bz2 \ 16 | $LINK_expat \ 17 | $LINK_freetype \ 18 | $LINK_libintl \ 19 | $LINK_zlib \ 20 | $LINK_libpng \ 21 | $LINK_libbrotlidec 22 | do 23 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_LIB_DIR/$LINK_fontconfig 24 | done 25 | } 26 | 27 | function fix_binaries_fontconfig_check() { 28 | verify_binary $BUNDLE_LIB_DIR/$LINK_fontconfig 29 | } 30 | 31 | function fix_paths_fontconfig() { 32 | : 33 | } 34 | 35 | function fix_paths_fontconfig_check() { 36 | : 37 | } 38 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/freetds/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_freetds() { 4 | env_var_exists VERSION_freetds 5 | env_var_exists LINK_ct 6 | env_var_exists LINK_sybdb 7 | env_var_exists LINK_tdsodbc 8 | } 9 | 10 | function bundle_freetds() { 11 | try cp -av $DEPS_LIB_DIR/libct.*dylib $BUNDLE_LIB_DIR 12 | try cp -av $DEPS_LIB_DIR/libsybdb.*dylib $BUNDLE_LIB_DIR 13 | try cp -av $DEPS_LIB_DIR/libtdsodbc.*so $BUNDLE_LIB_DIR 14 | } 15 | 16 | function fix_binaries_freetds() { 17 | for i in \ 18 | $LINK_ct \ 19 | $LINK_sybdb \ 20 | $LINK_tdsodbc 21 | do 22 | install_name_id @rpath/$i $BUNDLE_LIB_DIR/$i 23 | 24 | for j in \ 25 | $LINK_libssl \ 26 | $LINK_libcrypto \ 27 | $LINK_libltdl 28 | do 29 | install_name_change $DEPS_LIB_DIR/$j @rpath/$j $BUNDLE_LIB_DIR/$i 30 | done 31 | 32 | install_name_change $QGIS_DEPS_STAGE_PATH/unixodbc/lib/$LINK_unixodbc @rpath/$LINK_unixodbc $BUNDLE_LIB_DIR/$i 33 | install_name_change $QGIS_DEPS_STAGE_PATH/unixodbc/lib/$LINK_unixodbcinst @rpath/$LINK_unixodbcinst $BUNDLE_LIB_DIR/$i 34 | done 35 | 36 | # now the driver 37 | install_name_add_rpath @loader_path $BUNDLE_LIB_DIR/$LINK_tdsodbc 38 | install_name_add_rpath @loader_path/../Frameworks $BUNDLE_LIB_DIR/$LINK_tdsodbc 39 | } 40 | 41 | function fix_binaries_freetds_check() { 42 | verify_binary $BUNDLE_LIB_DIR/$LINK_ct 43 | verify_binary $BUNDLE_LIB_DIR/$LINK_sybdb 44 | verify_binary $BUNDLE_LIB_DIR/$LINK_tdsodbc 45 | } 46 | 47 | function fix_paths_freetds() { 48 | : 49 | } 50 | 51 | function fix_paths_freetds_check() { 52 | : 53 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/freetype/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_freetype() { 4 | env_var_exists VERSION_freetype 5 | } 6 | 7 | function bundle_freetype() { 8 | try cp -av $DEPS_LIB_DIR/libfreetype.*dylib $BUNDLE_LIB_DIR 9 | } 10 | 11 | function fix_binaries_freetype() { 12 | install_name_id @rpath/$LINK_freetype $BUNDLE_LIB_DIR/$LINK_freetype 13 | 14 | for i in \ 15 | $LINK_bz2 \ 16 | $LINK_zlib \ 17 | $LINK_libpng \ 18 | $LINK_libbrotlidec 19 | do 20 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_LIB_DIR/$LINK_freetype 21 | done 22 | } 23 | 24 | function fix_binaries_freetype_check() { 25 | verify_binary $BUNDLE_LIB_DIR/$LINK_freetype 26 | } 27 | 28 | function fix_paths_freetype() { 29 | : 30 | } 31 | 32 | function fix_paths_freetype_check() { 33 | : 34 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/freexl/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_freexl() { 4 | env_var_exists VERSION_freexl 5 | env_var_exists LINK_freexl 6 | } 7 | 8 | function bundle_freexl() { 9 | try cp -av $DEPS_LIB_DIR/libfreexl.*dylib $BUNDLE_LIB_DIR 10 | } 11 | 12 | function fix_binaries_freexl() { 13 | install_name_id @rpath/$LINK_freexl $BUNDLE_CONTENTS_DIR/MacOS/lib/$LINK_freexl 14 | } 15 | 16 | function fix_binaries_freexl_check() { 17 | verify_binary $BUNDLE_LIB_DIR/$LINK_freexl 18 | } 19 | 20 | function fix_paths_freexl() { 21 | : 22 | } 23 | 24 | function fix_paths_freexl_check() { 25 | : 26 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/gcc/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_gcc() { 4 | env_var_exists VERSION_gcc 5 | } 6 | 7 | function bundle_gcc() { 8 | try cp -av $DEPS_LIB_DIR/libgfortran.*dylib $BUNDLE_LIB_DIR 9 | try cp -av $DEPS_LIB_DIR/libgcc_s.*dylib $BUNDLE_LIB_DIR 10 | try cp -av $DEPS_LIB_DIR/libquadmath.*dylib $BUNDLE_LIB_DIR 11 | } 12 | 13 | function fix_binaries_gcc() { 14 | install_name_id @rpath/$LINK_libgfortran $BUNDLE_LIB_DIR/$LINK_libgfortran 15 | install_name_id @rpath/$LINK_libquadmath $BUNDLE_LIB_DIR/$LINK_libquadmath 16 | install_name_id @rpath/$LINK_gcc_s $BUNDLE_LIB_DIR/$LINK_gcc_s 17 | 18 | install_name_change $DEPS_LIB_DIR/$LINK_libquadmath @rpath/$LINK_libquadmath $BUNDLE_LIB_DIR/$LINK_libgfortran 19 | install_name_change $DEPS_LIB_DIR/$LINK_gcc_s @rpath/$LINK_gcc_s $BUNDLE_LIB_DIR/$LINK_libgfortran 20 | install_name_change $DEPS_LIB_DIR/$LINK_gcc_s @rpath/$LINK_gcc_s $BUNDLE_LIB_DIR/$LINK_libquadmath 21 | } 22 | 23 | function fix_binaries_gcc_check() { 24 | verify_binary $BUNDLE_LIB_DIR/$LINK_libgfortran 25 | verify_binary $BUNDLE_LIB_DIR/$LINK_libquadmath 26 | verify_binary $BUNDLE_LIB_DIR/$LINK_gcc_s 27 | } 28 | 29 | function fix_paths_gcc() { 30 | : 31 | } 32 | 33 | function fix_paths_gcc_check() { 34 | : 35 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/gdal/run_gdal_binary.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THISDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 4 | 5 | ALGNAME=$1 6 | shift; 7 | 8 | # This runs from Contents/MacOS/bin directory 9 | export PROJ_LIB=$THISDIR/../../Resources/proj 10 | export GDAL_DRIVER_PATH=$THISDIR/../lib/gdalplugins 11 | export GDAL_DATA=$THISDIR/../../Resources/gdal 12 | 13 | "$THISDIR/_$ALGNAME" "$@" 14 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/geos/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_geos() { 4 | env_var_exists VERSION_geos 5 | env_var_exists QGIS_VERSION 6 | env_var_exists VERSION_grass_major 7 | env_var_exists $LINK_libgeos_c 8 | } 9 | 10 | function bundle_geos() { 11 | try cp -av $DEPS_LIB_DIR/libgeos_c.* $BUNDLE_LIB_DIR 12 | try cp -av $DEPS_LIB_DIR/libgeos.* $BUNDLE_LIB_DIR 13 | } 14 | 15 | function fix_binaries_geos() { 16 | install_name_id @rpath/$LINK_libgeos_c $BUNDLE_LIB_DIR/$LINK_libgeos_c 17 | install_name_id @rpath/$LINK_libgeos $BUNDLE_LIB_DIR/$LINK_libgeos 18 | 19 | install_name_change $DEPS_LIB_DIR/$LINK_libgeos @rpath/$LINK_libgeos $BUNDLE_CONTENTS_DIR/MacOS/lib/$LINK_libgeos_c 20 | } 21 | 22 | function fix_binaries_geos_check() { 23 | verify_binary $BUNDLE_LIB_DIR/$LINK_libgeos 24 | verify_binary $BUNDLE_LIB_DIR/$LINK_libgeos_c 25 | } 26 | 27 | function fix_paths_geos() { 28 | : 29 | } 30 | 31 | function fix_paths_geos_check() { 32 | : 33 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/gettext/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_gettext() { 4 | env_var_exists VERSION_gettext 5 | env_var_exists LINK_libintl 6 | } 7 | 8 | function bundle_gettext() { 9 | try cp -av $DEPS_LIB_DIR/libintl.*dylib $BUNDLE_LIB_DIR 10 | } 11 | 12 | function fix_binaries_gettext() { 13 | install_name_id @rpath/$LINK_libintl $BUNDLE_LIB_DIR/$LINK_libintl 14 | } 15 | 16 | function fix_binaries_gettext_check() { 17 | verify_binary $BUNDLE_LIB_DIR/$LINK_libintl 18 | } 19 | 20 | function fix_paths_gettext() { 21 | : 22 | } 23 | 24 | function fix_paths_gettext_check() { 25 | : 26 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/grass/grass.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | GRASSDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 3 | GRASSDIR=$(perl -MCwd -e 'print Cwd::abs_path shift' $GRASSDIR) 4 | BINDIR=$GRASSDIR/../../MacOS/bin 5 | PROJDIR=$GRASSDIR/../proj 6 | 7 | export PATH=$GRASSDIR/bin:$BINDIR:$PATH 8 | export GISBASE=$GRASSDIR 9 | export GRASS_PROJSHARE=$PROJDIR 10 | export PROJ_LIB=$PROJDIR 11 | 12 | $GRASSDIR/_grass "$@" 13 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/gsl/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_gsl() { 4 | env_var_exists VERSION_gsl 5 | env_var_exists LINK_libgsl 6 | env_var_exists LINK_libgslcblas 7 | } 8 | 9 | function bundle_gsl() { 10 | try cp -av $DEPS_LIB_DIR/libgsl.*dylib $BUNDLE_LIB_DIR 11 | try cp -av $DEPS_LIB_DIR/libgslcblas.*dylib $BUNDLE_LIB_DIR 12 | } 13 | 14 | function fix_binaries_gsl() { 15 | install_name_id @rpath/$LINK_libgsl $BUNDLE_LIB_DIR/$LINK_libgsl 16 | install_name_id @rpath/$LINK_libgslcblas $BUNDLE_LIB_DIR/$LINK_libgslcblas 17 | } 18 | 19 | function fix_binaries_gsl_check() { 20 | verify_binary $BUNDLE_LIB_DIR/$LINK_libgsl 21 | verify_binary $BUNDLE_LIB_DIR/$LINK_libgslcblas 22 | } 23 | 24 | function fix_paths_gsl() { 25 | : 26 | } 27 | 28 | function fix_paths_gsl_check() { 29 | : 30 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/hdf5/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_hdf5() { 4 | env_var_exists VERSION_hdf5 5 | env_var_exists LINK_libhdf5 6 | } 7 | 8 | function bundle_hdf5() { 9 | try cp -av $DEPS_LIB_DIR/libhdf5.*dylib $BUNDLE_LIB_DIR 10 | try cp -av $DEPS_LIB_DIR/libhdf5_hl.*dylib $BUNDLE_LIB_DIR 11 | } 12 | 13 | function fix_binaries_hdf5() { 14 | install_name_id @rpath/$LINK_libhdf5 $BUNDLE_LIB_DIR/$LINK_libhdf5 15 | install_name_id @rpath/$LINK_libhdf5_hl $BUNDLE_LIB_DIR/$LINK_libhdf5_hl 16 | 17 | install_name_change $DEPS_LIB_DIR/$LINK_libhdf5 @rpath/$LINK_libhdf5 $BUNDLE_LIB_DIR/$LINK_libhdf5 18 | install_name_change $DEPS_LIB_DIR/$LINK_libhdf5 @rpath/$LINK_libhdf5 $BUNDLE_LIB_DIR/$LINK_libhdf5_hl 19 | install_name_change $DEPS_LIB_DIR/$LINK_zlib @rpath/$LINK_zlib $BUNDLE_LIB_DIR/$LINK_libhdf5_hl 20 | install_name_change $DEPS_LIB_DIR/$LINK_zlib @rpath/$LINK_zlib $BUNDLE_LIB_DIR/$LINK_libhdf5 21 | } 22 | 23 | function fix_binaries_hdf5_check() { 24 | verify_binary $BUNDLE_LIB_DIR/$LINK_libhdf5 25 | verify_binary $BUNDLE_LIB_DIR/$LINK_libhdf5_hl 26 | } 27 | 28 | function fix_paths_hdf5() { 29 | : 30 | } 31 | 32 | function fix_paths_hdf5_check() { 33 | : 34 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/jpeg/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_jpeg() { 4 | env_var_exists VERSION_jpeg 5 | env_var_exists LINK_jpeg 6 | } 7 | 8 | function bundle_jpeg() { 9 | try cp -av $DEPS_LIB_DIR/libjpeg.*dylib $BUNDLE_LIB_DIR 10 | } 11 | 12 | function fix_binaries_jpeg() { 13 | install_name_id @rpath/$LINK_jpeg $BUNDLE_CONTENTS_DIR/MacOS/lib/$LINK_jpeg 14 | } 15 | 16 | function fix_binaries_jpeg_check() { 17 | verify_binary $BUNDLE_LIB_DIR/$LINK_jpeg 18 | } 19 | 20 | function fix_paths_jpeg() { 21 | : 22 | } 23 | 24 | function fix_paths_jpeg_check() { 25 | : 26 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/laszip/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_laszip() { 4 | if [[ "$WITH_PDAL" == "true" ]]; then 5 | env_var_exists VERSION_laszip 6 | env_var_exists LINK_liblaszip 7 | fi 8 | } 9 | 10 | function bundle_laszip() { 11 | if [[ "$WITH_PDAL" == "true" ]]; then 12 | try cp -av $DEPS_LIB_DIR/liblaszip.*dylib $BUNDLE_LIB_DIR 13 | fi 14 | } 15 | 16 | function fix_binaries_laszip() { 17 | if [[ "$WITH_PDAL" == "true" ]]; then 18 | install_name_id @rpath/$LINK_liblaszip $BUNDLE_LIB_DIR/$LINK_liblaszip 19 | fi 20 | } 21 | 22 | function fix_binaries_laszip_check() { 23 | if [[ "$WITH_PDAL" == "true" ]]; then 24 | verify_binary $BUNDLE_LIB_DIR/$LINK_liblaszip 25 | fi 26 | } 27 | 28 | function fix_paths_laszip() { 29 | : 30 | } 31 | 32 | function fix_paths_laszip_check() { 33 | : 34 | } 35 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/lerc/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_lerc() { 4 | env_var_exists VERSION_lerc 5 | } 6 | 7 | function bundle_lerc() { 8 | try cp -av $DEPS_LIB_DIR/libLerc.*dylib $BUNDLE_LIB_DIR 9 | } 10 | 11 | function fix_binaries_lerc() { 12 | install_name_id @rpath/$LINK_liblerc $BUNDLE_LIB_DIR/$LINK_liblerc 13 | } 14 | 15 | function fix_binaries_lerc_check() { 16 | verify_binary $BUNDLE_LIB_DIR/$LINK_liblerc 17 | } 18 | 19 | function fix_paths_lerc() { 20 | : 21 | } 22 | 23 | function fix_paths_lerc_check() { 24 | : 25 | } 26 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/libcurl/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_libcurl() { 4 | env_var_exists VERSION_libcurl 5 | env_var_exists LINK_libcurl 6 | } 7 | 8 | function bundle_libcurl() { 9 | try cp -av $DEPS_LIB_DIR/libcurl.*dylib $BUNDLE_LIB_DIR 10 | } 11 | 12 | function fix_binaries_libcurl() { 13 | install_name_id @rpath/$LINK_libcurl $BUNDLE_CONTENTS_DIR/MacOS/lib/$LINK_libcurl 14 | 15 | for i in \ 16 | $LINK_libssh2 \ 17 | $LINK_libssl \ 18 | $LINK_libcrypto \ 19 | $LINK_zlib \ 20 | $LINK_zstd 21 | do 22 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_LIB_DIR/$LINK_libcurl 23 | done 24 | } 25 | 26 | function fix_binaries_libcurl_check() { 27 | verify_binary $BUNDLE_LIB_DIR/$LINK_libcurl 28 | } 29 | 30 | function fix_paths_libcurl() { 31 | : 32 | } 33 | 34 | function fix_paths_libcurl_check() { 35 | : 36 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/libffi/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_libffi() { 4 | env_var_exists VERSION_libffi 5 | env_var_exists LINK_libffi 6 | } 7 | 8 | function bundle_libffi() { 9 | try cp -av $DEPS_LIB_DIR/libffi.*dylib $BUNDLE_LIB_DIR 10 | } 11 | 12 | function fix_binaries_libffi() { 13 | install_name_id @rpath/$LINK_libffi $BUNDLE_CONTENTS_DIR/MacOS/lib/$LINK_libffi 14 | } 15 | 16 | function fix_binaries_libffi_check() { 17 | verify_binary $BUNDLE_LIB_DIR/$LINK_libffi 18 | } 19 | 20 | function fix_paths_libffi() { 21 | : 22 | } 23 | 24 | function fix_paths_libffi_check() { 25 | : 26 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/libgeotiff/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_libgeotiff() { 4 | env_var_exists VERSION_libgeotiff 5 | } 6 | 7 | function bundle_libgeotiff() { 8 | # we have only static lib 9 | : 10 | } 11 | 12 | function postbundle_libgeotiff() { 13 | : 14 | } 15 | 16 | function fix_binaries_libgeotiff() { 17 | : 18 | } 19 | 20 | function fix_binaries_libgeotiff_check() { 21 | : 22 | } 23 | 24 | function fix_paths_libgeotiff() { 25 | : 26 | } 27 | 28 | function fix_paths_libgeotiff_check() { 29 | : 30 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/libicu/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_libicu() { 4 | env_var_exists VERSION_libicu 5 | env_var_exists LINK_libicudata 6 | } 7 | 8 | function bundle_libicu() { 9 | try cp -av $DEPS_LIB_DIR/libicudata.*dylib $BUNDLE_LIB_DIR 10 | try cp -av $DEPS_LIB_DIR/libicuuc.*dylib $BUNDLE_LIB_DIR 11 | try cp -av $DEPS_LIB_DIR/libicui18n.*dylib $BUNDLE_LIB_DIR 12 | try cp -av $DEPS_LIB_DIR/libicuio.*dylib $BUNDLE_LIB_DIR 13 | try cp -av $DEPS_LIB_DIR/libicutu.*dylib $BUNDLE_LIB_DIR 14 | } 15 | 16 | function fix_binaries_libicu() { 17 | targets=( 18 | $LINK_libicudata 19 | $LINK_libicuuc 20 | $LINK_libicui18n 21 | $LINK_libicuio 22 | $LINK_libicutu 23 | ) 24 | for i in ${targets[*]} 25 | do 26 | try install_name_tool -id @rpath/$i $BUNDLE_LIB_DIR/$i 27 | for j in ${targets[*]} 28 | do 29 | try install_name_tool -change $DEPS_LIB_DIR/$j @rpath/$j $BUNDLE_LIB_DIR/$i 30 | done 31 | done 32 | } 33 | 34 | function fix_binaries_libicu_check() { 35 | targets=( 36 | $LINK_libicudata 37 | $LINK_libicuuc 38 | $LINK_libicui18n 39 | $LINK_libicuio 40 | $LINK_libicutu 41 | ) 42 | for i in ${targets[*]} 43 | do 44 | verify_binary $BUNDLE_LIB_DIR/$i 45 | done 46 | } 47 | 48 | function fix_paths_libicu() { 49 | : 50 | } 51 | 52 | function fix_paths_libicu_check() { 53 | : 54 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/libkml/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_libkml() { 4 | env_var_exists VERSION_libkml 5 | env_var_exists LINK_libkmlbase 6 | } 7 | 8 | function bundle_libkml() { 9 | try cp -av $DEPS_LIB_DIR/libkml*dylib $BUNDLE_LIB_DIR 10 | } 11 | 12 | function fix_binaries_libkml() { 13 | for i in \ 14 | $LINK_libkmlbase \ 15 | $LINK_libkmlconvenience \ 16 | $LINK_libkmldom \ 17 | $LINK_libkmlengine \ 18 | $LINK_libkmlregionator \ 19 | $LINK_libkmlxsd 20 | do 21 | install_name_id @rpath/$i $BUNDLE_LIB_DIR/$i 22 | for j in \ 23 | $LINK_libkmlbase \ 24 | $LINK_libkmlconvenience \ 25 | $LINK_libkmldom \ 26 | $LINK_libkmlengine \ 27 | $LINK_libkmlregionator \ 28 | $LINK_libkmlxsd \ 29 | $LINK_libminizip \ 30 | $LINK_expat \ 31 | $LINK_liburiparser \ 32 | $LINK_zlib 33 | do 34 | install_name_change $DEPS_LIB_DIR/$j @rpath/$j $BUNDLE_LIB_DIR/$i 35 | done 36 | done 37 | } 38 | 39 | function fix_binaries_libkml_check() { 40 | verify_binary $BUNDLE_LIB_DIR/$LINK_libkmlbase 41 | } 42 | 43 | function fix_paths_libkml() { 44 | : 45 | } 46 | 47 | function fix_paths_libkml_check() { 48 | : 49 | } 50 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/libomp/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_libomp() { 4 | env_var_exists VERSION_libomp 5 | } 6 | 7 | function bundle_libomp() { 8 | try cp -av $DEPS_LIB_DIR/libomp.* $BUNDLE_LIB_DIR 9 | } 10 | 11 | function fix_binaries_libomp() { 12 | install_name_id @rpath/$LINK_libomp $BUNDLE_LIB_DIR/$LINK_libomp 13 | } 14 | 15 | function fix_binaries_libomp_check() { 16 | verify_binary $BUNDLE_LIB_DIR/$LINK_libomp 17 | } 18 | 19 | function fix_paths_libomp() { 20 | : 21 | } 22 | 23 | function fix_paths_libomp_check() { 24 | : 25 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/libssh2/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_libssh2() { 4 | env_var_exists VERSION_libssh2 5 | env_var_exists LINK_libssh2 6 | } 7 | 8 | function bundle_libssh2() { 9 | try cp -av $DEPS_LIB_DIR/libssh2.*dylib $BUNDLE_LIB_DIR 10 | } 11 | 12 | function fix_binaries_libssh2() { 13 | install_name_id @rpath/$LINK_libssh2 $BUNDLE_LIB_DIR/$LINK_libssh2 14 | 15 | install_name_change $DEPS_LIB_DIR/$LINK_libssh2 @rpath/$LINK_libssh2 $BUNDLE_LIB_DIR/$LINK_libssh2 16 | 17 | for i in \ 18 | $LINK_libssl \ 19 | $LINK_zlib \ 20 | $LINK_libcrypto 21 | do 22 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_LIB_DIR/$LINK_libssh2 23 | done 24 | } 25 | 26 | function fix_binaries_libssh2_check() { 27 | verify_binary $BUNDLE_LIB_DIR/$LINK_libssh2 28 | } 29 | 30 | function fix_paths_libssh2() { 31 | : 32 | } 33 | 34 | function fix_paths_libssh2_check() { 35 | : 36 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/libtasn1/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_libtasn1() { 4 | env_var_exists VERSION_libtasn1 5 | env_var_exists LINK_libtasn1 6 | } 7 | 8 | function bundle_libtasn1() { 9 | try cp -av $DEPS_LIB_DIR/libtasn1*dylib $BUNDLE_LIB_DIR 10 | } 11 | 12 | function fix_binaries_libtasn1() { 13 | install_name_id @rpath/$LINK_libtasn1 $BUNDLE_LIB_DIR/$LINK_libtasn1 14 | } 15 | 16 | function fix_binaries_libtasn1_check() { 17 | verify_binary $BUNDLE_LIB_DIR/$LINK_libtasn1 18 | } 19 | 20 | function fix_paths_libtasn1() { 21 | : 22 | } 23 | 24 | function fix_paths_libtasn1_check() { 25 | : 26 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/libtiff/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_libtiff() { 4 | env_var_exists VERSION_libtiff 5 | } 6 | 7 | function bundle_libtiff() { 8 | try cp -av $DEPS_LIB_DIR/libtiff.*dylib $BUNDLE_LIB_DIR 9 | } 10 | 11 | function fix_binaries_libtiff() { 12 | install_name_id @rpath/$LINK_libtiff $BUNDLE_CONTENTS_DIR/MacOS/lib/$LINK_libtiff 13 | 14 | for i in \ 15 | $LINK_jpeg \ 16 | $LINK_libwebp \ 17 | $LINK_zlib \ 18 | $LINK_zstd \ 19 | $LINK_webp \ 20 | $LINK_liblerc 21 | do 22 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_LIB_DIR/$LINK_libtiff 23 | done 24 | } 25 | 26 | function fix_binaries_libtiff_check() { 27 | verify_binary $BUNDLE_LIB_DIR/$LINK_libtiff 28 | } 29 | 30 | function fix_paths_libtiff() { 31 | : 32 | } 33 | 34 | function fix_paths_libtiff_check() { 35 | : 36 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/libtool/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_libtool() { 4 | env_var_exists VERSION_libtool 5 | env_var_exists LINK_libltdl 6 | } 7 | 8 | function bundle_libtool() { 9 | try cp -av $DEPS_LIB_DIR/libltdl.*dylib $BUNDLE_LIB_DIR 10 | } 11 | 12 | function fix_binaries_libtool() { 13 | install_name_id @rpath/$LINK_libltdl $BUNDLE_CONTENTS_DIR/MacOS/lib/$LINK_libltdl 14 | } 15 | 16 | function fix_binaries_libtool_check() { 17 | verify_binary $BUNDLE_LIB_DIR/$LINK_libltdl 18 | } 19 | 20 | function fix_paths_libtool() { 21 | : 22 | } 23 | 24 | function fix_paths_libtool_check() { 25 | : 26 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/libunistring/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_libunistring() { 4 | env_var_exists VERSION_libunistring 5 | env_var_exists LINK_libunistring 6 | } 7 | 8 | function bundle_libunistring() { 9 | try cp -av $DEPS_LIB_DIR/libunistring.*dylib $BUNDLE_LIB_DIR 10 | } 11 | 12 | function fix_binaries_libunistring() { 13 | install_name_id @rpath/$LINK_libunistring $BUNDLE_CONTENTS_DIR/MacOS/lib/$LINK_libunistring 14 | 15 | install_name_change $DEPS_LIB_DIR/$LINK_libunistring @rpath/$LINK_libunistring $BUNDLE_CONTENTS_DIR/MacOS/lib/$LINK_libunistring 16 | } 17 | 18 | function fix_binaries_libunistring_check() { 19 | verify_binary $BUNDLE_LIB_DIR/$LINK_libunistring 20 | } 21 | 22 | function fix_paths_libunistring() { 23 | : 24 | } 25 | 26 | function fix_paths_libunistring_check() { 27 | : 28 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/libxml2/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_libxml2() { 4 | env_var_exists VERSION_libxml2 5 | env_var_exists LINK_libxml2 6 | } 7 | 8 | function bundle_libxml2() { 9 | try cp -av $DEPS_LIB_DIR/libxml2.*dylib $BUNDLE_LIB_DIR 10 | } 11 | 12 | function fix_binaries_libxml2() { 13 | install_name_id @rpath/$LINK_libxml2 $BUNDLE_LIB_DIR/$LINK_libxml2 14 | 15 | install_name_change $DEPS_LIB_DIR/$LINK_zlib @rpath/$LINK_zlib $BUNDLE_LIB_DIR/$LINK_libxml2 16 | } 17 | 18 | function fix_binaries_libxml2_check() { 19 | verify_binary $BUNDLE_LIB_DIR/$LINK_libxml2 20 | } 21 | 22 | function fix_paths_libxml2() { 23 | : 24 | } 25 | 26 | function fix_paths_libxml2_check() { 27 | : 28 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/libxslt/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_libxslt() { 4 | env_var_exists VERSION_libxslt 5 | env_var_exists LINK_libxslt 6 | env_var_exists LINK_libexslt 7 | } 8 | 9 | function bundle_libxslt() { 10 | try cp -av $DEPS_LIB_DIR/libxslt.*dylib $BUNDLE_LIB_DIR 11 | try cp -av $DEPS_LIB_DIR/libexslt.*dylib $BUNDLE_LIB_DIR 12 | } 13 | 14 | function fix_binaries_libxslt() { 15 | install_name_id @rpath/$LINK_libxslt $BUNDLE_CONTENTS_DIR/MacOS/lib/$LINK_libxslt 16 | install_name_id @rpath/$LINK_libexslt $BUNDLE_CONTENTS_DIR/MacOS/lib/$LINK_libexslt 17 | 18 | for i in \ 19 | $LINK_libxml2 \ 20 | $LINK_zlib \ 21 | $LINK_libxslt 22 | do 23 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_LIB_DIR/$LINK_libxslt 24 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_LIB_DIR/$LINK_libexslt 25 | done 26 | } 27 | 28 | function fix_binaries_libxslt_check() { 29 | verify_binary $BUNDLE_LIB_DIR/$LINK_libxslt 30 | verify_binary $BUNDLE_LIB_DIR/$LINK_libexslt 31 | } 32 | 33 | function fix_paths_libxslt() { 34 | : 35 | } 36 | 37 | function fix_paths_libxslt_check() { 38 | : 39 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/libyaml/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_libyaml() { 4 | # added in qgis_deps-0.8.0 5 | # env_var_exists VERSION_libyaml 6 | # env_var_exists LINK_libyaml 7 | : 8 | } 9 | 10 | function bundle_libyaml() { 11 | if [ "X$LINK_libyaml" == "X" ]; then 12 | echo "skipping libyaml, added in qgis_deps-0.8.0" 13 | else 14 | try cp -av $DEPS_LIB_DIR/libyaml*dylib $BUNDLE_LIB_DIR 15 | fi 16 | } 17 | 18 | function fix_binaries_libyaml() { 19 | if [ "X$LINK_libyaml" == "X" ]; then 20 | echo "skipping libyaml, added in qgis_deps-0.8.0" 21 | else 22 | install_name_id @rpath/$LINK_libyaml $BUNDLE_CONTENTS_DIR/MacOS/lib/$LINK_libyaml 23 | fi 24 | } 25 | 26 | function fix_binaries_libyaml_check() { 27 | if [ "X$LINK_libyaml" == "X" ]; then 28 | echo "skipping libyaml, added in qgis_deps-0.8.0" 29 | else 30 | verify_binary $BUNDLE_LIB_DIR/$LINK_libyaml 31 | fi 32 | } 33 | 34 | function fix_paths_libyaml() { 35 | : 36 | } 37 | 38 | function fix_paths_libyaml_check() { 39 | : 40 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/libzip/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_libzip() { 4 | env_var_exists VERSION_libzip 5 | env_var_exists LINK_libzip 6 | } 7 | 8 | function bundle_libzip() { 9 | try cp -av $DEPS_LIB_DIR/libzip.*dylib $BUNDLE_LIB_DIR 10 | } 11 | 12 | function fix_binaries_libzip() { 13 | install_name_id @rpath/$LINK_libzip $BUNDLE_LIB_DIR/$LINK_libzip 14 | 15 | install_name_change $DEPS_LIB_DIR/$LINK_zlib @rpath/$LINK_zlib $BUNDLE_LIB_DIR/$LINK_libzip 16 | install_name_change $DEPS_LIB_DIR/$LINK_bz2 @rpath/$LINK_bz2 $BUNDLE_LIB_DIR/$LINK_libzip 17 | install_name_change $DEPS_LIB_DIR/$LINK_liblzma @rpath/$LINK_liblzma $BUNDLE_LIB_DIR/$LINK_libzip 18 | } 19 | 20 | function fix_binaries_libzip_check() { 21 | verify_binary $BUNDLE_LIB_DIR/$LINK_libzip 22 | } 23 | 24 | function fix_paths_libzip() { 25 | : 26 | } 27 | 28 | function fix_paths_libzip_check() { 29 | : 30 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/little_cms2/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_little_cms2() { 4 | env_var_exists VERSION_little_cms2 5 | } 6 | 7 | function bundle_little_cms2() { 8 | try cp -av $DEPS_LIB_DIR/liblcms2.*dylib $BUNDLE_LIB_DIR 9 | } 10 | 11 | function fix_binaries_little_cms2() { 12 | install_name_id @rpath/$LINK_little_cms2 $BUNDLE_LIB_DIR/$LINK_little_cms2 13 | } 14 | 15 | function fix_binaries_little_cms2_check() { 16 | verify_binary $BUNDLE_LIB_DIR/$LINK_little_cms2 17 | } 18 | 19 | function fix_paths_little_cms2() { 20 | : 21 | } 22 | 23 | function fix_paths_little_cms2_check() { 24 | : 25 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/minizip/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_minizip() { 4 | env_var_exists VERSION_minizip 5 | env_var_exists $LINK_libminizip 6 | } 7 | 8 | function bundle_minizip() { 9 | try cp -av $DEPS_LIB_DIR/libminizip.*dylib $BUNDLE_LIB_DIR/ 10 | } 11 | 12 | function fix_binaries_minizip() { 13 | install_name_id @rpath/$LINK_minizip $BUNDLE_LIB_DIR/$LINK_libminizip 14 | 15 | for i in \ 16 | $LINK_bz2 \ 17 | $LINK_zstd \ 18 | $LINK_zlib 19 | do 20 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_LIB_DIR/$LINK_libminizip 21 | done 22 | } 23 | 24 | function fix_binaries_minizip_check() { 25 | verify_binary $BUNDLE_LIB_DIR/$LINK_libminizip 26 | } 27 | 28 | function fix_paths_minizip() { 29 | : 30 | } 31 | 32 | function fix_paths_minizip_check() { 33 | : 34 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/mysql/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_mysql() { 4 | env_var_exists VERSION_mysql 5 | } 6 | 7 | function bundle_mysql() { 8 | try cp -av $DEPS_LIB_DIR/libmysqlclient.*dylib $BUNDLE_LIB_DIR 9 | } 10 | 11 | function fix_binaries_mysql() { 12 | for i in \ 13 | $LINK_libcrypto \ 14 | $LINK_libssl \ 15 | $LINK_zstd 16 | do 17 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_LIB_DIR/$LINK_libmysqlclient 18 | done 19 | } 20 | 21 | function fix_binaries_mysql_check() { 22 | verify_binary $BUNDLE_LIB_DIR/$LINK_libmysqlclient 23 | } 24 | 25 | function fix_paths_mysql() { 26 | : 27 | } 28 | 29 | function fix_paths_mysql_check() { 30 | : 31 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/netcdf/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_netcdf() { 4 | env_var_exists VERSION_netcdf 5 | } 6 | 7 | function bundle_netcdf() { 8 | try cp -av $DEPS_LIB_DIR/libnetcdf.*dylib $BUNDLE_LIB_DIR 9 | } 10 | 11 | function fix_binaries_netcdf() { 12 | install_name_id @rpath/$LINK_netcdf $BUNDLE_CONTENTS_DIR/MacOS/lib/$LINK_netcdf 13 | 14 | for i in \ 15 | $LINK_libhdf5 \ 16 | $LINK_libhdf5_hl \ 17 | $LINK_zlib \ 18 | $LINK_libcurl 19 | do 20 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_LIB_DIR/$LINK_netcdf 21 | done 22 | } 23 | 24 | function fix_binaries_netcdf_check() { 25 | verify_binary $BUNDLE_LIB_DIR/$LINK_netcdf 26 | } 27 | 28 | function fix_paths_netcdf() { 29 | : 30 | } 31 | 32 | function fix_paths_netcdf_check() { 33 | : 34 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/openblas/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_openblas() { 4 | env_var_exists VERSION_openblas 5 | env_var_exists LINK_libopenblas 6 | } 7 | 8 | function bundle_openblas() { 9 | try cp -av $DEPS_LIB_DIR/libopenblas*dylib $BUNDLE_LIB_DIR 10 | } 11 | 12 | function fix_binaries_openblas() { 13 | install_name_id @rpath/$LINK_libopenblas $BUNDLE_LIB_DIR/$LINK_libopenblas 14 | 15 | for i in \ 16 | $LINK_libopenblas \ 17 | $LINK_libquadmath \ 18 | $LINK_libgfortran \ 19 | $LINK_gcc_s 20 | do 21 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_LIB_DIR/$LINK_libopenblas 22 | done 23 | } 24 | 25 | function fix_binaries_openblas_check() { 26 | verify_binary $BUNDLE_LIB_DIR/$LINK_libopenblas 27 | } 28 | 29 | function fix_paths_openblas() { 30 | : 31 | } 32 | 33 | function fix_paths_openblas_check() { 34 | : 35 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/openjpeg/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_openjpeg() { 4 | env_var_exists VERSION_openjpeg 5 | } 6 | 7 | function bundle_openjpeg() { 8 | try cp -av $DEPS_LIB_DIR/libopenjp2.*dylib $BUNDLE_LIB_DIR 9 | } 10 | 11 | function fix_binaries_openjpeg() { 12 | install_name_id @rpath/$LINK_openjpeg $BUNDLE_LIB_DIR/$LINK_openjpeg 13 | } 14 | 15 | function fix_binaries_openjpeg_check() { 16 | verify_binary $BUNDLE_LIB_DIR/$LINK_openjpeg 17 | } 18 | 19 | function fix_paths_openjpeg() { 20 | : 21 | } 22 | 23 | function fix_paths_openjpeg_check() { 24 | : 25 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/openssl/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_openssl() { 4 | env_var_exists VERSION_openssl 5 | env_var_exists LINK_libssl 6 | env_var_exists LINK_libcrypto 7 | } 8 | 9 | function bundle_openssl() { 10 | try cp -av $DEPS_LIB_DIR/libssl.*dylib $BUNDLE_LIB_DIR 11 | try cp -av $DEPS_LIB_DIR/libcrypto.*dylib $BUNDLE_LIB_DIR 12 | 13 | # https://github.com/qgis/QGIS-Mac-Packager/issues/32 14 | try mkdir -p $BUNDLE_RESOURCES_DIR/certs 15 | try cp -av $DEPS_ROOT_DIR/certs/rootcerts.pem $BUNDLE_RESOURCES_DIR/certs/ 16 | # see python_packages/recipe.sh for default root cersts 17 | } 18 | 19 | function fix_binaries_openssl() { 20 | install_name_id @rpath/$LINK_libssl $BUNDLE_LIB_DIR/$LINK_libssl 21 | install_name_id @rpath/$LINK_libcrypto $BUNDLE_LIB_DIR/$LINK_libcrypto 22 | } 23 | 24 | function fix_binaries_openssl_check() { 25 | verify_binary $BUNDLE_LIB_DIR/$LINK_libssl 26 | verify_binary $BUNDLE_LIB_DIR/$LINK_libcrypto 27 | } 28 | 29 | function fix_paths_openssl() { 30 | : 31 | } 32 | 33 | function fix_paths_openssl_check() { 34 | : 35 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/pcre/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_pcre() { 4 | env_var_exists VERSION_pcre 5 | env_var_exists LINK_pcre 6 | } 7 | 8 | function bundle_pcre() { 9 | try cp -av $DEPS_LIB_DIR/libpcre.*dylib $BUNDLE_LIB_DIR 10 | } 11 | 12 | function fix_binaries_pcre() { 13 | install_name_id @rpath/$LINK_pcre $BUNDLE_LIB_DIR/$LINK_pcre 14 | } 15 | 16 | function fix_binaries_pcre_check() { 17 | verify_binary $BUNDLE_LIB_DIR/$LINK_pcre 18 | } 19 | 20 | function fix_paths_pcre() { 21 | : 22 | } 23 | 24 | function fix_paths_pcre_check() { 25 | : 26 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/pdal/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_pdal() { 4 | if [[ "$WITH_PDAL" == "true" ]]; then 5 | env_var_exists VERSION_pdal 6 | env_var_exists LINK_libpdalcpp 7 | env_var_exists LINK_libpdal_util 8 | fi 9 | } 10 | 11 | function bundle_pdal() { 12 | if [[ "$WITH_PDAL" == "true" ]]; then 13 | try cp -av $DEPS_LIB_DIR/libpdalcpp.*dylib $BUNDLE_LIB_DIR 14 | try cp -av $DEPS_LIB_DIR/libpdal_util.*dylib $BUNDLE_LIB_DIR 15 | fi 16 | } 17 | 18 | function fix_binaries_pdal() { 19 | if [[ "$WITH_PDAL" == "true" ]]; then 20 | install_name_id @rpath/$LINK_libpdalcpp $BUNDLE_LIB_DIR/$LINK_libpdalcpp 21 | install_name_id @rpath/$LINK_libpdal_util $BUNDLE_LIB_DIR/$LINK_libpdal_util 22 | 23 | for i in \ 24 | $LINK_libssl \ 25 | $LINK_libcrypto \ 26 | $LINK_libpdal_util \ 27 | $LINK_zstd \ 28 | $LINK_zlib \ 29 | $LINK_libxml2 \ 30 | $LINK_liblaszip \ 31 | $LINK_libcurl \ 32 | $LINK_gdal 33 | do 34 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_LIB_DIR/$LINK_libpdalcpp 35 | done 36 | fi 37 | } 38 | 39 | function fix_binaries_pdal_check() { 40 | if [[ "$WITH_PDAL" == "true" ]]; then 41 | verify_binary $BUNDLE_LIB_DIR/$LINK_libpdalcpp 42 | verify_binary $BUNDLE_LIB_DIR/$LINK_libpdal_util 43 | fi 44 | } 45 | 46 | function fix_paths_pdal() { 47 | : 48 | } 49 | 50 | function fix_paths_pdal_check() { 51 | : 52 | } 53 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/png/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_png() { 4 | env_var_exists VERSION_png 5 | } 6 | 7 | function bundle_png() { 8 | try cp -av $DEPS_LIB_DIR/libpng*dylib $BUNDLE_LIB_DIR 9 | } 10 | 11 | function fix_binaries_png() { 12 | install_name_id @rpath/$LINK_libpng $BUNDLE_CONTENTS_DIR/MacOS/lib/$LINK_libpng 13 | install_name_change $DEPS_LIB_DIR/$LINK_zlib @rpath/$LINK_zlib $BUNDLE_CONTENTS_DIR/MacOS/lib/$LINK_libpng 14 | } 15 | 16 | function fix_binaries_png_check() { 17 | verify_binary $BUNDLE_LIB_DIR/$LINK_libpng 18 | } 19 | 20 | function fix_paths_png() { 21 | : 22 | } 23 | 24 | function fix_paths_png_check() { 25 | : 26 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/poppler/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_poppler() { 4 | env_var_exists VERSION_poppler 5 | env_var_exists LINK_poppler 6 | env_var_exists LINK_poppler_cpp 7 | env_var_exists LINK_poppler_qt5 8 | } 9 | 10 | function bundle_poppler() { 11 | try cp -av $DEPS_LIB_DIR/libpoppler*dylib $BUNDLE_LIB_DIR/ 12 | } 13 | 14 | function fix_binaries_poppler() { 15 | install_name_id @rpath/$LINK_poppler $BUNDLE_LIB_DIR/$LINK_poppler 16 | install_name_id @rpath/$LINK_poppler_cpp $BUNDLE_LIB_DIR/$LINK_poppler_cpp 17 | install_name_id @rpath/$LINK_poppler_qt5 $BUNDLE_LIB_DIR/$LINK_poppler_qt5 18 | 19 | for i in \ 20 | $LINK_poppler \ 21 | $LINK_poppler_cpp \ 22 | $LINK_poppler_qt5 23 | do 24 | for j in \ 25 | $LINK_poppler \ 26 | $LINK_freetype \ 27 | $LINK_fontconfig \ 28 | $LINK_jpeg \ 29 | $LINK_zlib \ 30 | $LINK_openjpeg \ 31 | $LINK_libpng \ 32 | $LINK_libtiff \ 33 | $LINK_little_cms2 \ 34 | $LINK_libcurl 35 | do 36 | install_name_change $DEPS_LIB_DIR/$j @rpath/$j $BUNDLE_LIB_DIR/$i 37 | done 38 | done 39 | } 40 | 41 | function fix_binaries_poppler_check() { 42 | verify_binary $BUNDLE_LIB_DIR/$LINK_poppler 43 | verify_binary $BUNDLE_LIB_DIR/$LINK_poppler_cpp 44 | verify_binary $BUNDLE_LIB_DIR/$LINK_poppler_qt5 45 | } 46 | 47 | function fix_paths_poppler() { 48 | : 49 | } 50 | 51 | function fix_paths_poppler_check() { 52 | : 53 | } 54 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/postgres/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_postgres() { 4 | env_var_exists VERSION_postgres 5 | env_var_exists QGIS_VERSION 6 | } 7 | 8 | function bundle_postgres() { 9 | try cp -av $DEPS_LIB_DIR/libpq.*dylib $BUNDLE_LIB_DIR/ 10 | } 11 | 12 | function fix_binaries_postgres() { 13 | install_name_id @rpath/$LINK_libpq $BUNDLE_LIB_DIR/$LINK_libpq 14 | 15 | for i in \ 16 | $LINK_libssl \ 17 | $LINK_libcrypto 18 | do 19 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_LIB_DIR/$LINK_libpq 20 | done 21 | } 22 | 23 | function fix_binaries_postgres_check() { 24 | verify_binary $BUNDLE_LIB_DIR/$LINK_libpq 25 | } 26 | 27 | function fix_paths_postgres() { 28 | : 29 | } 30 | 31 | function fix_paths_postgres_check() { 32 | : 33 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/proj/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_proj() { 4 | env_var_exists VERSION_proj 5 | env_var_exists LINK_libproj 6 | env_var_exists QGIS_VERSION 7 | env_var_exists VERSION_grass_major 8 | } 9 | 10 | function bundle_proj() { 11 | try cp -av $DEPS_LIB_DIR/libproj*dylib $BUNDLE_LIB_DIR 12 | 13 | # see src/app/main.cpp for env setup for bundle 14 | # see src/app/qgsapplication/cpp in QgsApplication::init for PROJ setup paths 15 | try rsync -av $DEPS_SHARE_DIR/proj $BUNDLE_RESOURCES_DIR/ 16 | } 17 | 18 | function fix_binaries_proj() { 19 | install_name_id @rpath/$LINK_libproj $BUNDLE_LIB_DIR/$LINK_libproj 20 | 21 | for i in \ 22 | $LINK_sqlite \ 23 | $LINK_libcurl \ 24 | $LINK_libtiff 25 | do 26 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_LIB_DIR/$LINK_libproj 27 | done 28 | } 29 | 30 | function fix_binaries_proj_check() { 31 | verify_binary $BUNDLE_LIB_DIR/$LINK_libproj 32 | } 33 | 34 | function fix_paths_proj() { 35 | : 36 | } 37 | 38 | function fix_paths_proj_check() { 39 | : 40 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/protobuf/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_protobuf() { 4 | env_var_exists VERSION_protobuf 5 | env_var_exists QGIS_VERSION 6 | env_var_exists VERSION_grass_major 7 | env_var_exists LINK_protobuf_lite 8 | } 9 | 10 | function bundle_protobuf() { 11 | try cp -av $DEPS_LIB_DIR/libprotobuf-lite.*dylib $BUNDLE_LIB_DIR 12 | } 13 | 14 | function fix_binaries_protobuf() { 15 | install_name_id @rpath/$LINK_protobuf_lite $BUNDLE_LIB_DIR/$LINK_protobuf_lite 16 | 17 | install_name_change $DEPS_LIB_DIR/$LINK_zlib @rpath/$LINK_zlib $BUNDLE_CONTENTS_DIR/MacOS/lib/$LINK_protobuf_lite 18 | } 19 | 20 | function fix_binaries_protobuf_check() { 21 | verify_binary $BUNDLE_LIB_DIR/$LINK_protobuf_lite 22 | } 23 | 24 | function fix_paths_protobuf() { 25 | : 26 | } 27 | 28 | function fix_paths_protobuf_check() { 29 | : 30 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/python_cftime/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_python_cftime() { 4 | env_var_exists VERSION_python_cftime 5 | } 6 | 7 | function bundle_python_cftime() { 8 | : 9 | } 10 | 11 | function fix_binaries_python_cftime() { 12 | : 13 | } 14 | 15 | function fix_binaries_python_cftime_check() { 16 | : 17 | } 18 | 19 | function fix_paths_python_cftime() { 20 | CFTIME_EGG=$BUNDLE_PYTHON_SITE_PACKAGES_DIR/cftime-${VERSION_python_cftime}-py${VERSION_major_python}-macosx-${MACOSX_DEPLOYMENT_TARGET}-x86_64.egg 21 | clean_path $CFTIME_EGG/EGG-INFO/SOURCES.txt 22 | } 23 | 24 | function fix_paths_python_cftime_check() { 25 | : 26 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/python_fiona/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_python_fiona() { 4 | env_var_exists VERSION_python_fiona 5 | } 6 | 7 | function bundle_python_fiona() { 8 | : 9 | } 10 | 11 | function fix_binaries_python_fiona() { 12 | FIONA_EGG=$BUNDLE_PYTHON_SITE_PACKAGES_DIR/Fiona-${VERSION_python_fiona}-py${VERSION_major_python}-macosx-${MACOSX_DEPLOYMENT_TARGET}-x86_64.egg 13 | 14 | for i in \ 15 | ogrext \ 16 | _env \ 17 | _transform \ 18 | _crs \ 19 | schema \ 20 | _geometry \ 21 | _shim \ 22 | _err; do 23 | install_name_change $DEPS_LIB_DIR/$LINK_gdal @rpath/$LINK_gdal $FIONA_EGG/fiona/$i.cpython-${VERSION_major_python//./}-darwin.so 24 | done 25 | } 26 | 27 | function fix_binaries_python_fiona_check() { 28 | FIONA_EGG=$BUNDLE_PYTHON_SITE_PACKAGES_DIR/Fiona-${VERSION_python_fiona}-py${VERSION_major_python}-macosx-${MACOSX_DEPLOYMENT_TARGET}-x86_64.egg 29 | 30 | verify_binary $FIONA_EGG/fiona/_crs.cpython-${VERSION_major_python//./}-darwin.so 31 | } 32 | 33 | function fix_paths_python_fiona() { 34 | : 35 | } 36 | 37 | function fix_paths_python_fiona_check() { 38 | : 39 | } 40 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/python_h5py/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_python_h5py() { 4 | env_var_exists VERSION_python_h5py 5 | } 6 | 7 | function bundle_python_h5py() { 8 | : 9 | } 10 | 11 | function fix_binaries_python_h5py() { 12 | for i in \ 13 | defs \ 14 | _proxy \ 15 | h5fd \ 16 | h5f \ 17 | h5ds \ 18 | h5l \ 19 | h5d \ 20 | h5s \ 21 | utils \ 22 | _objects \ 23 | h5g \ 24 | h5 \ 25 | h5o \ 26 | _errors \ 27 | h5t \ 28 | _conv \ 29 | h5z \ 30 | h5r \ 31 | h5i \ 32 | h5ac \ 33 | h5a \ 34 | h5pl \ 35 | h5p 36 | do 37 | install_name_change $DEPS_LIB_DIR/$LINK_libhdf5 @rpath/$LINK_libhdf5 $BUNDLE_PYTHON_SITE_PACKAGES_DIR/h5py/$i.cpython-${VERSION_major_python//./}-darwin.so 38 | install_name_change $DEPS_LIB_DIR/$LINK_libhdf5_hl @rpath/$LINK_libhdf5_hl $BUNDLE_PYTHON_SITE_PACKAGES_DIR/h5py/$i.cpython-${VERSION_major_python//./}-darwin.so 39 | done 40 | } 41 | 42 | 43 | function fix_binaries_python_h5py_check() { 44 | verify_binary $BUNDLE_PYTHON_SITE_PACKAGES_DIR/h5py/h5fd.cpython-${VERSION_major_python//./}-darwin.so 45 | } 46 | 47 | function fix_paths_python_h5py() { 48 | : 49 | } 50 | 51 | function fix_paths_python_h5py_check() { 52 | : 53 | } 54 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/python_llvmlite/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_python_llvmlite() { 4 | env_var_exists VERSION_python_llvmlite 5 | } 6 | 7 | function bundle_python_llvmlite() { 8 | : 9 | } 10 | 11 | function fix_binaries_python_llvmlite() { 12 | install_name_change $DEPS_LIB_DIR/$LINK_zlib @rpath/$LINK_zlib $BUNDLE_PYTHON_SITE_PACKAGES_DIR/llvmlite/binding/libllvmlite.dylib 13 | } 14 | 15 | 16 | function fix_binaries_python_llvmlite_check() { 17 | verify_binary $BUNDLE_PYTHON_SITE_PACKAGES_DIR/llvmlite/binding/libllvmlite.dylib 18 | } 19 | 20 | function fix_paths_python_llvmlite() { 21 | : 22 | } 23 | 24 | function fix_paths_python_llvmlite_check() { 25 | : 26 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/python_matplotlib/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_python_matplotlib() { 4 | env_var_exists VERSION_python_matplotlib 5 | } 6 | 7 | function bundle_python_matplotlib() { 8 | : 9 | } 10 | 11 | function fix_binaries_python_matplotlib() { 12 | MATPLOTLIB_EGG_DIR=$BUNDLE_PYTHON_SITE_PACKAGES_DIR/matplotlib-${VERSION_python_matplotlib}-py${VERSION_major_python}-macosx-${MACOSX_DEPLOYMENT_TARGET}-x86_64.egg 13 | 14 | for i in \ 15 | backends/_backend_agg \ 16 | ft2font 17 | do 18 | install_name_change $DEPS_LIB_DIR/$LINK_freetype @rpath/$LINK_freetype $MATPLOTLIB_EGG_DIR/matplotlib/$i.cpython-${VERSION_major_python//./}-darwin.so 19 | done 20 | } 21 | 22 | function fix_binaries_python_matplotlib_check() { 23 | MATPLOTLIB_EGG_DIR=$BUNDLE_PYTHON_SITE_PACKAGES_DIR/matplotlib-${VERSION_python_matplotlib}-py${VERSION_major_python}-macosx-${MACOSX_DEPLOYMENT_TARGET}-x86_64.egg 24 | 25 | verify_binary $MATPLOTLIB_EGG_DIR/matplotlib/ft2font.cpython-${VERSION_major_python//./}-darwin.so 26 | } 27 | 28 | function fix_paths_python_matplotlib() { 29 | : 30 | } 31 | 32 | function fix_paths_python_matplotlib_check() { 33 | : 34 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/python_netcdf/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_python_netcdf() { 4 | env_var_exists VERSION_python_netcdf4 5 | } 6 | 7 | function bundle_python_netcdf() { 8 | : 9 | } 10 | 11 | function fix_binaries_python_netcdf() { 12 | NETCDF_EGG=$BUNDLE_PYTHON_SITE_PACKAGES_DIR/netCDF4-$VERSION_python_netcdf4-py$VERSION_major_python-macosx-$MACOSX_DEPLOYMENT_TARGET-x86_64.egg 13 | 14 | for i in \ 15 | $LINK_libhdf5 \ 16 | $LINK_libhdf5_hl \ 17 | $LINK_netcdf 18 | do 19 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $NETCDF_EGG/netCDF4/_netCDF4.cpython-${VERSION_major_python//./}-darwin.so 20 | done 21 | } 22 | 23 | function fix_binaries_python_netcdf_check() { 24 | NETCDF_EGG=$BUNDLE_PYTHON_SITE_PACKAGES_DIR/netCDF4-$VERSION_python_netcdf4-py$VERSION_major_python-macosx-$MACOSX_DEPLOYMENT_TARGET-x86_64.egg 25 | 26 | verify_binary $NETCDF_EGG/netCDF4/_netCDF4.cpython-${VERSION_major_python//./}-darwin.so 27 | } 28 | 29 | function fix_paths_python_netcdf() { 30 | : 31 | } 32 | 33 | function fix_paths_python_netcdf_check() { 34 | : 35 | } 36 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/python_numba/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | numba_EGG_DIR=$BUNDLE_PYTHON_SITE_PACKAGES_DIR/numba-${VERSION_python_numba}-py${VERSION_major_python}-macosx-${MACOSX_DEPLOYMENT_TARGET}-x86_64.egg 4 | 5 | function check_python_numba() { 6 | env_var_exists VERSION_python_numba 7 | } 8 | 9 | function bundle_python_numba() { 10 | : 11 | } 12 | 13 | function fix_binaries_python_numba() { 14 | : 15 | } 16 | 17 | function fix_binaries_python_numba_check() { 18 | : 19 | } 20 | 21 | function fix_paths_python_numba() { 22 | try rm -rf $numba_EGG_DIR/EGG-INFO/scripts 23 | } 24 | 25 | function fix_paths_python_numba_check() { 26 | : 27 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/python_numpy/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_python_numpy() { 4 | env_var_exists VERSION_python_numpy 5 | } 6 | 7 | function bundle_python_numpy() { 8 | : 9 | } 10 | 11 | function fix_binaries_python_numpy() { 12 | NUMPY_EGG_DIR=$BUNDLE_PYTHON_SITE_PACKAGES_DIR/numpy-${VERSION_python_numpy}-py${VERSION_major_python}-macosx-${MACOSX_DEPLOYMENT_TARGET}-x86_64.egg 13 | 14 | for i in \ 15 | core/_multiarray_umath \ 16 | linalg/lapack_lite \ 17 | linalg/_umath_linalg 18 | do 19 | install_name_change $DEPS_LIB_DIR/$LINK_libopenblas @rpath/$LINK_libopenblas $NUMPY_EGG_DIR/numpy/$i.cpython-${VERSION_major_python//./}-darwin.so 20 | install_name_change $DEPS_LIB_DIR/$LINK_libopenblasp @rpath/$LINK_libopenblasp $NUMPY_EGG_DIR/numpy/$i.cpython-${VERSION_major_python//./}-darwin.so 21 | done 22 | } 23 | 24 | function fix_binaries_python_numpy_check() { 25 | NUMPY_EGG_DIR=$BUNDLE_PYTHON_SITE_PACKAGES_DIR/numpy-${VERSION_python_numpy}-py${VERSION_major_python}-macosx-${MACOSX_DEPLOYMENT_TARGET}-x86_64.egg 26 | 27 | verify_binary $NUMPY_EGG_DIR/numpy/core/_multiarray_umath.cpython-${VERSION_major_python//./}-darwin.so 28 | verify_binary $NUMPY_EGG_DIR/numpy/linalg/lapack_lite.cpython-${VERSION_major_python//./}-darwin.so 29 | verify_binary $NUMPY_EGG_DIR/numpy/linalg/_umath_linalg.cpython-${VERSION_major_python//./}-darwin.so 30 | } 31 | 32 | function fix_paths_python_numpy() { 33 | NUMPY_EGG_DIR=$BUNDLE_PYTHON_SITE_PACKAGES_DIR/numpy-${VERSION_python_numpy}-py${VERSION_major_python}-macosx-${MACOSX_DEPLOYMENT_TARGET}-x86_64.egg 34 | 35 | clean_path $NUMPY_EGG_DIR/numpy/distutils/__config__.py 36 | clean_path $NUMPY_EGG_DIR/numpy/__config__.py 37 | clean_path $NUMPY_EGG_DIR/numpy/distutils/system_info.py 38 | } 39 | 40 | function fix_paths_python_numpy_check() { 41 | NUMPY_EGG_DIR=$BUNDLE_PYTHON_SITE_PACKAGES_DIR/numpy-${VERSION_python_numpy}-py${VERSION_major_python}-macosx-${MACOSX_DEPLOYMENT_TARGET}-x86_64.egg 42 | 43 | verify_file_paths $NUMPY_EGG_DIR/numpy/distutils/__config__.py 44 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/python_opencv/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_python_opencv() { 4 | env_var_exists VERSION_python_opencv 5 | } 6 | 7 | function bundle_python_opencv() { 8 | : 9 | } 10 | 11 | function fix_binaries_python_opencv() { 12 | OPENCV_EGG_DIR=$BUNDLE_PYTHON_SITE_PACKAGES_DIR/opencv_contrib_python-${VERSION_python_opencv}-py${VERSION_major_python}-macosx-${MACOSX_DEPLOYMENT_TARGET}-x86_64.egg 13 | 14 | for i in \ 15 | $LINK_jpeg \ 16 | $LINK_libwebp \ 17 | $LINK_libpng \ 18 | $LINK_libtiff \ 19 | $LINK_protobuf \ 20 | $LINK_zlib \ 21 | $LINK_libopenblas \ 22 | $LINK_libopenblasp \ 23 | $LINK_libhdf5 \ 24 | $LINK_openjpeg 25 | do 26 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $OPENCV_EGG_DIR/cv2/cv2.cpython-${VERSION_major_python//./}-darwin.so 27 | done 28 | } 29 | 30 | function fix_binaries_python_opencv_check() { 31 | OPENCV_EGG_DIR=$BUNDLE_PYTHON_SITE_PACKAGES_DIR/opencv_contrib_python-${VERSION_python_opencv}-py${VERSION_major_python}-macosx-${MACOSX_DEPLOYMENT_TARGET}-x86_64.egg 32 | 33 | verify_binary $OPENCV_EGG_DIR/cv2/cv2.cpython-${VERSION_major_python//./}-darwin.so 34 | } 35 | 36 | function fix_paths_python_opencv() { 37 | : 38 | } 39 | 40 | function fix_paths_python_opencv_check() { 41 | : 42 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/python_packages/ssl.py: -------------------------------------------------------------------------------- 1 | import os 2 | # this file is part of qgis/QGIS-Mac-Packager package 3 | # https://github.com/qgis/QGIS-Mac-Packager/issues/32 4 | 5 | # from QGIS*.app/Contents/MacOS/lib/python3.x/ -> QGIS*.app/Contents/Resources/certs/ 6 | DIR1=os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.path.pardir, os.path.pardir, os.path.pardir, 'Resources', 'certs')) 7 | CERTS1=os.path.join(DIR1, 'certs.pem') 8 | if os.path.exists(CERTS1): 9 | os.environ['SSL_CERT_DIR'] = DIR1 10 | os.environ['SSL_CERT_FILE'] = CERTS1 11 | else: 12 | # from QGIS*.app/Contents/Resources/python/ -> QGIS*.app/Contents/Resources/certs/ 13 | DIR2 = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.path.pardir, 'certs')) 14 | CERTS2 = os.path.join(DIR2, 'certs.pem') 15 | if os.path.exists(CERTS2): 16 | os.environ['SSL_CERT_DIR'] = DIR2 17 | os.environ['SSL_CERT_FILE'] = CERTS2 18 | else: 19 | raise Exception("Unable to load certs.pem required by ssl from " + DIR1 + " nor " + DIR2) 20 | 21 | from _ssl2 import * 22 | 23 | # private functions are not imported by default 24 | # but this one is used in some QGIS plugins 25 | from _ssl2 import _create_unverified_context 26 | from _ssl2 import _create_default_https_context 27 | 28 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/python_patsy/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_python_patsy() { 4 | env_var_exists VERSION_python_patsy 5 | } 6 | 7 | function bundle_python_patsy() { 8 | # the patsy.egg is zip file, unzip it to be able to fix binaries 9 | cd $BUNDLE_PYTHON_SITE_PACKAGES_DIR 10 | 11 | try unzip patsy-${VERSION_python_patsy}-py${VERSION_major_python}.egg -d _tmp_patsy 12 | try rm -rf patsy-${VERSION_python_patsy}-py${VERSION_major_python}.egg 13 | try mv _tmp_patsy patsy-${VERSION_python_patsy}-py${VERSION_major_python}.egg 14 | } 15 | 16 | function fix_binaries_python_patsy() { 17 | : 18 | } 19 | 20 | function fix_binaries_python_patsy_check() { 21 | : 22 | } 23 | 24 | function fix_paths_python_patsy() { 25 | : 26 | } 27 | 28 | function fix_paths_python_patsy_check() { 29 | : 30 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/python_psycopg2/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_python_psycopg2() { 4 | env_var_exists VERSION_python_psycopg2 5 | } 6 | 7 | function bundle_python_psycopg2() { 8 | : 9 | } 10 | 11 | function fix_binaries_python_psycopg2() { 12 | for i in \ 13 | $LINK_libssl \ 14 | $LINK_libcrypto \ 15 | $LINK_libpq 16 | do 17 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_PYTHON_SITE_PACKAGES_DIR/psycopg2/_psycopg.cpython-${VERSION_major_python//./}-darwin.so 18 | done 19 | } 20 | 21 | function fix_binaries_python_psycopg2_check() { 22 | verify_binary $BUNDLE_PYTHON_SITE_PACKAGES_DIR/psycopg2/_psycopg.cpython-${VERSION_major_python//./}-darwin.so 23 | } 24 | 25 | function fix_paths_python_psycopg2() { 26 | : 27 | } 28 | 29 | function fix_paths_python_psycopg2_check() { 30 | : 31 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/python_pymssql/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_python_pymssql() { 4 | env_var_exists VERSION_python_pymssql 5 | } 6 | 7 | function bundle_python_pymssql() { 8 | : 9 | } 10 | 11 | function fix_binaries_python_pymssql() { 12 | install_name_change $DEPS_LIB_DIR/$LINK_sybdb @rpath/$LINK_sybdb $BUNDLE_PYTHON_SITE_PACKAGES_DIR/_mssql.cpython-${VERSION_major_python//./}-darwin.so 13 | install_name_change $DEPS_LIB_DIR/$LINK_sybdb @rpath/$LINK_sybdb $BUNDLE_PYTHON_SITE_PACKAGES_DIR/pymssql.cpython-${VERSION_major_python//./}-darwin.so 14 | } 15 | 16 | function fix_binaries_python_pymssql_check() { 17 | verify_binary $BUNDLE_PYTHON_SITE_PACKAGES_DIR/_mssql.cpython-${VERSION_major_python//./}-darwin.so 18 | verify_binary $BUNDLE_PYTHON_SITE_PACKAGES_DIR/pymssql.cpython-${VERSION_major_python//./}-darwin.so 19 | } 20 | 21 | function fix_paths_python_pymssql() { 22 | : 23 | } 24 | 25 | function fix_paths_python_pymssql_check() { 26 | : 27 | } 28 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/python_pyproj/_patch_proj_lib.py: -------------------------------------------------------------------------------- 1 | import os 2 | # this file is part of qgis/QGIS-Mac-Packager package 3 | 4 | if not os.getenv("PROJ_LIB"): 5 | # from QGIS*.app/Contents/MacOS/lib/python3.x/site-packages/pyproj-*.egg/pyproj -> QGIS*.app/Contents/Resources/proj/ 6 | PROJ_DIR_1=os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.path.pardir, os.path.pardir, os.path.pardir, os.path.pardir, os.path.pardir, os.path.pardir, "Resources", "proj")) 7 | if os.path.exists(PROJ_DIR_1): 8 | os.environ['PROJ_LIB'] = PROJ_DIR_1 9 | else: 10 | # from QGIS*.app/Contents/Resources/python/site-packages/pyproj-*.egg/pyproj -> QGIS*.app/Contents/Resources/proj/ 11 | PROJ_DIR_2 = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.path.pardir, os.path.pardir, os.path.pardir, os.path.pardir, os.path.pardir, "Resources", "proj")) 12 | if os.path.exists(PROJ_DIR_2): 13 | os.environ['PROJ_LIB'] = PROJ_DIR_2 14 | else: 15 | raise Exception("Unable to find valid PROJ_DIR for pyproj in " + PROJ_DIR_1 + " nor " + PROJ_DIR_2) 16 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/python_pyproj/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PYPROJ_EGG=$BUNDLE_PYTHON_SITE_PACKAGES_DIR/pyproj-${VERSION_python_pyproj}-py${VERSION_major_python}-macosx-${MACOSX_DEPLOYMENT_TARGET}-x86_64.egg 4 | 5 | function check_python_pyproj() { 6 | env_var_exists VERSION_python_pyproj 7 | } 8 | 9 | function bundle_python_pyproj() { 10 | : 11 | } 12 | 13 | function fix_binaries_python_pyproj() { 14 | PYPROJ_LIBS= 15 | PYPROJ_LIBS=( 16 | _compat \ 17 | list \ 18 | _datadir \ 19 | _crs \ 20 | _geod \ 21 | _network \ 22 | _sync \ 23 | database \ 24 | _transformer 25 | ) 26 | 27 | for i in "${PYPROJ_LIBS[@]}" 28 | do 29 | install_name_change $DEPS_LIB_DIR/$LINK_libproj @rpath/$LINK_libproj $PYPROJ_EGG/pyproj/$i.cpython-${VERSION_major_python//./}-darwin.so 30 | done 31 | } 32 | 33 | function fix_binaries_python_pyproj_check() { 34 | verify_binary $PYPROJ_EGG/pyproj/_datadir.cpython-${VERSION_major_python//./}-darwin.so 35 | } 36 | 37 | function fix_paths_python_pyproj() { 38 | try cp -av $RECIPES_PATH/python_pyproj/_patch_proj_lib.py $PYPROJ_EGG/pyproj/_patch_proj_lib.py 39 | 40 | try ${SED} "s;from pyproj import _datadir;from pyproj import _patch_proj_lib, _datadir;g" $PYPROJ_EGG/pyproj/__init__.py 41 | } 42 | 43 | function fix_paths_python_pyproj_check() { 44 | : 45 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/python_rasterio/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_python_rasterio() { 4 | env_var_exists VERSION_python_rasterio 5 | } 6 | 7 | function bundle_python_rasterio() { 8 | : 9 | } 10 | 11 | function fix_binaries_python_rasterio() { 12 | RASTERIO_EGG_DIR=$BUNDLE_PYTHON_SITE_PACKAGES_DIR/rasterio-${VERSION_python_rasterio}-py${VERSION_major_python}-macosx-${MACOSX_DEPLOYMENT_TARGET}-x86_64.egg 13 | 14 | for i in \ 15 | _env \ 16 | _base \ 17 | _crs \ 18 | _env \ 19 | _err \ 20 | _example \ 21 | _features \ 22 | _fill \ 23 | _io \ 24 | _shim \ 25 | _transform \ 26 | _warp \ 27 | shutil 28 | do 29 | install_name_change $DEPS_LIB_DIR/$LINK_gdal @rpath/$LINK_gdal $RASTERIO_EGG_DIR/rasterio/$i.cpython-${VERSION_major_python//./}-darwin.so 30 | done 31 | } 32 | 33 | function fix_binaries_python_rasterio_check() { 34 | RASTERIO_EGG_DIR=$BUNDLE_PYTHON_SITE_PACKAGES_DIR/rasterio-${VERSION_python_rasterio}-py${VERSION_major_python}-macosx-${MACOSX_DEPLOYMENT_TARGET}-x86_64.egg 35 | 36 | verify_binary $RASTERIO_EGG_DIR/rasterio/_base.cpython-${VERSION_major_python//./}-darwin.so 37 | } 38 | 39 | function fix_paths_python_rasterio() { 40 | : 41 | } 42 | 43 | function fix_paths_python_rasterio_check() { 44 | : 45 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/python_rtree/core.py: -------------------------------------------------------------------------------- 1 | import os 2 | # this file is part of qgis/QGIS-Mac-Packager package 3 | # from QGIS*.app/Contents/MacOS/lib/python3.x/site-packages/RTree-*.egg/rtree -> QGIS*.app/Contents/MacOS/lib/ 4 | DIR1=os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.path.pardir, os.path.pardir, os.path.pardir, os.path.pardir)) 5 | SPATIALINDEX_C_LIBRARY_1=os.path.join(DIR1, 'libspatialindex_c.dylib') 6 | 7 | if os.path.exists(SPATIALINDEX_C_LIBRARY_1): 8 | os.environ['SPATIALINDEX_C_LIBRARY'] = SPATIALINDEX_C_LIBRARY_1 9 | else: 10 | # from QGIS*.app/Contents/Resources/python/site-packages/RTree-*.egg/rtree -> QGIS*.app/Contents/MacOS/lib 11 | DIR2 = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.path.pardir, os.path.pardir, os.path.pardir, os.path.pardir, os.path.pardir, 'MacOS', 'lib')) 12 | SPATIALINDEX_C_LIBRARY_2 = os.path.join(DIR2, 'libspatialindex_c.dylib') 13 | 14 | if os.path.exists(SPATIALINDEX_C_LIBRARY_2): 15 | os.environ['SPATIALINDEX_C_LIBRARY'] = SPATIALINDEX_C_LIBRARY_2 16 | else: 17 | raise Exception("Unable to load spatialindex_c required by rtree in " + DIR1 + " nor " + DIR2) 18 | 19 | from ._core import * 20 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/python_rtree/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_python_rtree() { 4 | env_var_exists VERSION_python_rtree 5 | } 6 | 7 | function bundle_python_rtree() { 8 | : 9 | } 10 | 11 | function fix_binaries_python_rtree() { 12 | : 13 | } 14 | 15 | function fix_binaries_python_rtree_check() { 16 | : 17 | } 18 | 19 | function fix_paths_python_rtree() { 20 | # see https://github.com/qgis/QGIS-Mac-Packager/issues/80 21 | 22 | RTREE_EGG=$BUNDLE_PYTHON_SITE_PACKAGES_DIR/Rtree-${VERSION_python_rtree}-py${VERSION_major_python}.egg 23 | if [ ! -d "$RTREE_EGG" ] 24 | then 25 | RTREE_EGG=$BUNDLE_PYTHON_SITE_PACKAGES_DIR/Rtree-${VERSION_python_rtree}-py${VERSION_major_python}-macosx-${MACOSX_DEPLOYMENT_TARGET}-x86_64.egg 26 | fi 27 | 28 | try rm $RTREE_EGG/rtree/core.py 29 | try cp -av $RECIPES_PATH/python_rtree/core.py $RTREE_EGG/rtree/core.py 30 | 31 | # remove reference to /usr/local/lib/libgeos_c.dylib 32 | clean_path $RTREE_EGG/rtree/_core.py 33 | } 34 | 35 | function fix_paths_python_rtree_check() { 36 | : 37 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/python_shapely/geos.py: -------------------------------------------------------------------------------- 1 | import os 2 | # this file is part of qgis/QGIS-Mac-Packager package 3 | # https://github.com/qgis/QGIS-Mac-Packager/issues/81 4 | 5 | # from QGIS*.app/Contents/MacOS/lib/python3.x/site-packages/shapely/ -> QGIS*.app/Contents/MacOS/lib 6 | DIR1=os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.path.pardir, os.path.pardir, os.path.pardir)) 7 | GEOS_C_LIB_1=os.path.join(DIR1, 'libgeos_c.dylib') 8 | if os.path.exists(GEOS_C_LIB_1): 9 | os.environ['CONDA_PREFIX'] = DIR1 10 | else: 11 | # from QGIS*.app/Contents/Resources/python/site-packages/shapely/ -> QGIS*.app/Contents/MacOS/lib 12 | DIR2 = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.path.pardir, os.path.pardir, os.path.pardir, os.path.pardir, 'MacOS', 'lib')) 13 | GEOS_C_LIB_2 = os.path.join(DIR2, 'libgeos_c.dylib') 14 | if os.path.exists(GEOS_C_LIB_2): 15 | os.environ['CONDA_PREFIX'] = DIR2 16 | else: 17 | raise Exception("Unable to load geos_c required by shapely from " + DIR1 + " nor " + DIR2) 18 | 19 | # fix: 20 | # ImportError: dlopen(.../site-packages/Fiona-....egg/fiona/ogrext.cpython-3x-darwin.so, 2): Symbol not found: _GEOSArea 21 | # Referenced from: .../stage/lib/libspatialite.x.dylib 22 | # Expected in: flat namespace 23 | import fiona 24 | 25 | from ._geos import * 26 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/python_shapely/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_python_shapely() { 4 | env_var_exists VERSION_python_shapely 5 | } 6 | 7 | function bundle_python_shapely() { 8 | : 9 | } 10 | 11 | function fix_binaries_python_shapely() { 12 | : 13 | } 14 | 15 | function fix_binaries_python_shapely_check() { 16 | : 17 | } 18 | 19 | function fix_paths_python_shapely() { 20 | # see https://github.com/qgis/QGIS-Mac-Packager/issues/81 21 | try rm $BUNDLE_PYTHON_SITE_PACKAGES_DIR/shapely/geos.py 22 | try cp -av $RECIPES_PATH/python_shapely/geos.py $BUNDLE_PYTHON_SITE_PACKAGES_DIR/shapely/geos.py 23 | 24 | # remove reference to /usr/local/lib/libgeos_c.dylib 25 | clean_path $BUNDLE_PYTHON_SITE_PACKAGES_DIR/shapely/_geos.py 26 | 27 | # _buildcfg is only used in setup.py 28 | try rm $BUNDLE_PYTHON_SITE_PACKAGES_DIR/shapely/_buildcfg.py 29 | } 30 | 31 | function fix_paths_python_shapely_check() { 32 | : 33 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/qca/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_qca() { 4 | env_var_exists VERSION_qca 5 | env_var_exists QGIS_VERSION 6 | env_var_exists VERSION_grass_major 7 | } 8 | 9 | function bundle_qca() { 10 | try rsync -av $DEPS_LIB_DIR/$LINK_qca.framework $BUNDLE_FRAMEWORKS_DIR/ --exclude Header 11 | try rm -f $BUNDLE_FRAMEWORKS_DIR/$LINK_qca.framework/Headers 12 | 13 | #### PLUGINS 14 | try rsync -av $DEPS_ROOT_DIR/qt5/plugins/crypto $BUNDLE_PLUGINS_DIR/ 15 | } 16 | 17 | function fix_binaries_qca() { 18 | install_name_id @rpath/$LINK_qca.framework/Versions/${VERSION_qca}/$LINK_qca $BUNDLE_CONTENTS_DIR/Frameworks/$LINK_qca.framework/Versions/${VERSION_qca}/$LINK_qca 19 | 20 | for i in \ 21 | libqca-cyrus-sasl \ 22 | libqca-logger \ 23 | libqca-ossl \ 24 | libqca-softstore 25 | do 26 | install_name_change $DEPS_LIB_DIR/$LINK_qca.framework/Versions/${VERSION_qca}/$LINK_qca @rpath/$LINK_qca.framework/Versions/${VERSION_qca}/$LINK_qca $BUNDLE_PLUGINS_DIR/crypto/$i.dylib 27 | done 28 | 29 | for i in \ 30 | $LINK_libssl \ 31 | $LINK_libcrypto 32 | do 33 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_CONTENTS_DIR/PlugIns/crypto/libqca-ossl.dylib 34 | done 35 | } 36 | 37 | function fix_binaries_qca_check() { 38 | verify_binary $BUNDLE_CONTENTS_DIR/PlugIns/crypto/libqca-ossl.dylib 39 | } 40 | 41 | function fix_paths_qca() { 42 | : 43 | } 44 | 45 | function fix_paths_qca_check() { 46 | : 47 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/qgis/find_mod_spatialite.py: -------------------------------------------------------------------------------- 1 | import os 2 | # this file is part of qgis/QGIS-Mac-Packager package 3 | # https://github.com/qgis/QGIS-Mac-Packager/issues/79 4 | 5 | def mod_spatialite_path(): 6 | # from QGIS*.app/Contents/MacOS/lib/python3.x/qgis/ -> QGIS*.app/Contents/MacOS/lib 7 | DIR1=os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.path.pardir, os.path.pardir)) 8 | MOD_SPATIALITE_1=os.path.join(DIR1, 'mod_spatialite.so') 9 | if os.path.exists(MOD_SPATIALITE_1): 10 | return MOD_SPATIALITE_1 11 | else: 12 | # from QGIS*.app/Contents/Resources/python/qgis/ -> QGIS*.app/Contents/MacOS/lib 13 | DIR2 = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.path.pardir, os.path.pardir, os.path.pardir, 'MacOS', 'lib')) 14 | MOD_SPATIALITE_2 = os.path.join(DIR2, 'mod_spatialite.so') 15 | if os.path.exists(MOD_SPATIALITE_2): 16 | return MOD_SPATIALITE_2 17 | 18 | raise Exception("Unable to find mod_spatialite.so required by qgis's utils from " + DIR1 + " nor " + DIR2) 19 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/qgis/pyqgis-startup.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | /*************************************************************************** 4 | OSGeo4Mac Python startup script to strip macOS system Python site-packages 5 | ------------------- 6 | begin : 2013-09-20 7 | copyright: (C) 2013, 2017 Larry Shaffer 8 | email : larrys@dakotacarto.com 9 | ***************************************************************************/ 10 | 11 | /*************************************************************************** 12 | * * 13 | * This program is free software; you can redistribute it and/or modify * 14 | * it under the terms of the GNU General Public License as published by * 15 | * the Free Software Foundation; either version 2 of the License, or * 16 | * (at your option) any later version. * 17 | * * 18 | ***************************************************************************/ 19 | """ 20 | import sys 21 | import os 22 | 23 | sys.path[:] = (pth for pth in sys.path if not ( 24 | pth.startswith('/Library/Python') or 25 | pth.startswith('/Library/Frameworks') or 26 | pth.startswith('/System/Library/Frameworks/Python.framework'))) 27 | 28 | # make abs paths 29 | sys.path[:] = (os.path.abspath(pth) for pth in sys.path) 30 | 31 | # remove duplicit entries 32 | sys.path = list(set(sys.path)) 33 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/qgis/qgis_mapserv.fcgi: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | THISDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 3 | 4 | export QGIS_PREFIX_PATH=$THISDIR/.. 5 | 6 | $THISDIR/_qgis_mapserv.fcgi "$@" 7 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/qgis/qgis_mapserver: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THISDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 4 | 5 | export QGIS_PREFIX_PATH=$THISDIR/.. 6 | 7 | $THISDIR/_qgis_mapserver "$@" 8 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/qgis/qgis_process: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | THISDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 3 | 4 | export QGIS_PREFIX_PATH=$THISDIR/.. 5 | 6 | $THISDIR/../qgis_process.app/Contents/MacOS/qgis_process "$@" 7 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/qscintilla/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_qscintilla() { 4 | env_var_exists VERSION_qscintilla 5 | env_var_exists LINK_libqscintilla2_qt5 6 | env_var_exists QGIS_VERSION 7 | env_var_exists VERSION_grass_major 8 | } 9 | 10 | function bundle_qscintilla() { 11 | try cp -av $DEPS_LIB_DIR/libqscintilla2_qt5*dylib $BUNDLE_LIB_DIR/ 12 | } 13 | 14 | function fix_binaries_qscintilla() { 15 | install_name_delete_rpath $QT_BASE/clang_64/lib $BUNDLE_LIB_DIR/${LINK_libqscintilla2_qt5} 16 | 17 | install_name_id @rpath/$LINK_libqscintilla2_qt5 $BUNDLE_LIB_DIR/$LINK_libqscintilla2_qt5 18 | } 19 | 20 | function fix_binaries_qscintilla_check() { 21 | verify_binary $BUNDLE_LIB_DIR/$LINK_libqscintilla2_qt5 22 | } 23 | 24 | function fix_paths_qscintilla() { 25 | : 26 | } 27 | 28 | function fix_paths_qscintilla_check() { 29 | : 30 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/qt/designer: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | BINDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 4 | 5 | # workaround for https://github.com/qgis/QGIS-Mac-Packager/issues/3 6 | export DYLD_INSERT_LIBRARIES=$BINDIR/../lib/libsqlite3.dylib 7 | 8 | $BINDIR/../Designer.app/Contents/MacOS/Designer 9 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/qtkeychain/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_qtkeychain() { 4 | env_var_exists VERSION_qtkeychain 5 | env_var_exists LINK_qtkeychain 6 | env_var_exists VERSION_grass_major 7 | env_var_exists QGIS_VERSION 8 | } 9 | 10 | function bundle_qtkeychain() { 11 | try cp -av $DEPS_LIB_DIR/libqt5keychain.* $BUNDLE_LIB_DIR 12 | } 13 | 14 | function fix_binaries_qtkeychain() { 15 | install_name_delete_rpath $QT_BASE/clang_64/lib $BUNDLE_LIB_DIR/$LINK_qtkeychain 16 | 17 | install_name_id @rpath/$LINK_qtkeychain $BUNDLE_LIB_DIR/$LINK_qtkeychain 18 | } 19 | 20 | function fix_binaries_qtkeychain_check() { 21 | verify_binary $BUNDLE_LIB_DIR/$LINK_qtkeychain 22 | } 23 | 24 | function fix_paths_qtkeychain() { 25 | : 26 | } 27 | 28 | function fix_paths_qtkeychain_check() { 29 | : 30 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/qtwebkit/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_qtwebkit() { 4 | env_var_exists VERSION_qtwebkit 5 | } 6 | 7 | function bundle_qtwebkit() { 8 | try rsync -av $DEPS_LIB_DIR/QtWebKitWidgets.framework $BUNDLE_FRAMEWORKS_DIR/ --exclude Headers 9 | try rsync -av $DEPS_LIB_DIR/QtWebKit.framework $BUNDLE_FRAMEWORKS_DIR/ --exclude Headers 10 | } 11 | 12 | function fix_binaries_qtwebkit() { 13 | install_name_delete_rpath $QT_BASE/clang_64/lib $BUNDLE_CONTENTS_DIR/Frameworks/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets 14 | install_name_delete_rpath $QT_BASE/clang_64/lib $BUNDLE_CONTENTS_DIR/Frameworks/QtWebKit.framework/Versions/5/QtWebKit 15 | 16 | install_name_delete_rpath $ROOT_OUT_PATH/build/qtwebkit/build-x86_64/lib $BUNDLE_CONTENTS_DIR/Frameworks/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets 17 | 18 | install_name_add_rpath @executable_path/../Frameworks $BUNDLE_CONTENTS_DIR/Frameworks/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets 19 | install_name_add_rpath @loader_path/Frameworks $BUNDLE_CONTENTS_DIR/Frameworks/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets 20 | 21 | install_name_add_rpath @executable_path/../Frameworks $BUNDLE_CONTENTS_DIR/Frameworks/QtWebKit.framework/Versions/5/QtWebKit 22 | install_name_add_rpath @loader_path/Frameworks $BUNDLE_CONTENTS_DIR/Frameworks/QtWebKit.framework/Versions/5/QtWebKit 23 | 24 | for i in \ 25 | $LINK_jpeg \ 26 | $LINK_libpng \ 27 | $LINK_libwebp \ 28 | $LINK_zlib \ 29 | $LINK_libxml2 \ 30 | $LINK_libxslt \ 31 | $LINK_sqlite \ 32 | $LINK_libicuuc \ 33 | $LINK_libicui18n 34 | do 35 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_CONTENTS_DIR/Frameworks/QtWebKit.framework/Versions/5/QtWebKit 36 | done 37 | 38 | clean_binary $BUNDLE_CONTENTS_DIR/Frameworks/QtWebKit.framework/Versions/Current/QtWebKit 39 | } 40 | 41 | function fix_binaries_qtwebkit_check() { 42 | verify_binary $BUNDLE_CONTENTS_DIR/Frameworks/QtWebKit.framework/Versions/5/QtWebKit 43 | } 44 | 45 | function fix_paths_qtwebkit() { 46 | : 47 | } 48 | 49 | function fix_paths_qtwebkit_check() { 50 | : 51 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/qwt/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_qwt() { 4 | env_var_exists VERSION_qwt 5 | } 6 | 7 | function bundle_qwt() { 8 | try rsync -av $DEPS_LIB_DIR/qwt.framework $BUNDLE_FRAMEWORKS_DIR/ --exclude Headers 9 | } 10 | 11 | function fix_binaries_qwt() { 12 | install_name_delete_rpath $QT_BASE/clang_64/lib $BUNDLE_FRAMEWORKS_DIR/qwt.framework/Versions/$VERSION_qwt_major/qwt 13 | } 14 | 15 | function fix_binaries_qwt_check() { 16 | verify_binary $BUNDLE_FRAMEWORKS_DIR/qwt.framework/Versions/$VERSION_qwt_major/qwt 17 | } 18 | 19 | function fix_paths_qwt() { 20 | : 21 | } 22 | 23 | function fix_paths_qwt_check() { 24 | : 25 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/rttopo/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_rttopo() { 4 | env_var_exists VERSION_rttopo 5 | } 6 | 7 | function bundle_rttopo() { 8 | try cp -av $DEPS_LIB_DIR/librttopo.*dylib $BUNDLE_LIB_DIR 9 | } 10 | 11 | function fix_binaries_rttopo() { 12 | for i in \ 13 | $LINK_libgeos_c \ 14 | $LINK_rttopo 15 | do 16 | install_name_id @rpath/$i $BUNDLE_LIB_DIR/$i 17 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_LIB_DIR/$LINK_rttopo 18 | done 19 | } 20 | 21 | function fix_binaries_rttopo_check() { 22 | verify_binary $BUNDLE_LIB_DIR/$LINK_rttopo 23 | } 24 | 25 | function fix_paths_rttopo() { 26 | : 27 | } 28 | 29 | function fix_paths_rttopo_check() { 30 | : 31 | } 32 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/saga/saga_cmd: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THISDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 4 | 5 | # This runs from Contents/MacOS/bin directory 6 | export PROJ_LIB=$THISDIR/../../Resources/proj 7 | export SAGA_TLB=$THISDIR/../lib/saga:$THISDIR/../../Resources/saga/toolchains 8 | 9 | "$THISDIR/_saga_cmd" "$@" 10 | -------------------------------------------------------------------------------- /qgis_bundle/recipes/spatialindex/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_spatialindex() { 4 | env_var_exists VERSION_spatialindex 5 | env_var_exists LINK_spatialindex 6 | } 7 | 8 | function bundle_spatialindex() { 9 | try cp -av $DEPS_LIB_DIR/libspatialindex*dylib $BUNDLE_LIB_DIR 10 | } 11 | 12 | function fix_binaries_spatialindex() { 13 | install_name_id @rpath/libspatialindex_c.6.dylib $BUNDLE_LIB_DIR/$LINK_spatialindex_c 14 | install_name_id @rpath/$LINK_spatialindex $BUNDLE_LIB_DIR/$LINK_spatialindex 15 | 16 | install_name_change $DEPS_LIB_DIR/$LINK_spatialindex @rpath/$LINK_spatialindex $BUNDLE_LIB_DIR/$LINK_spatialindex_c 17 | } 18 | 19 | function fix_binaries_spatialindex_check() { 20 | verify_binary $BUNDLE_LIB_DIR/$LINK_spatialindex 21 | verify_binary $BUNDLE_LIB_DIR/$LINK_spatialindex_c 22 | } 23 | 24 | function fix_paths_spatialindex() { 25 | : 26 | } 27 | 28 | function fix_paths_spatialindex_check() { 29 | : 30 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/spatialite/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_spatialite() { 4 | env_var_exists VERSION_spatialite 5 | env_var_exists QGIS_VERSION 6 | env_var_exists VERSION_grass_major 7 | env_var_exists LINK_spatialite 8 | } 9 | 10 | function bundle_spatialite() { 11 | try cp -av $DEPS_LIB_DIR/libspatialite.*dylib $BUNDLE_LIB_DIR 12 | try cp -av $DEPS_LIB_DIR/mod_spatialite.*so $BUNDLE_LIB_DIR 13 | } 14 | 15 | function fix_binaries_spatialite() { 16 | install_name_id @rpath/$LINK_spatialite $BUNDLE_LIB_DIR/$LINK_spatialite 17 | 18 | for i in \ 19 | $LINK_freexl \ 20 | $LINK_libgeos_c \ 21 | $LINK_libxml2 \ 22 | $LINK_libproj \ 23 | $LINK_sqlite \ 24 | $LINK_zlib \ 25 | $LINK_libminizip \ 26 | $LINK_rttopo 27 | do 28 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_LIB_DIR/$LINK_spatialite 29 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_LIB_DIR/mod_spatialite.so 30 | done 31 | } 32 | 33 | function fix_binaries_spatialite_check() { 34 | verify_binary $BUNDLE_LIB_DIR/$LINK_spatialite 35 | verify_binary $BUNDLE_LIB_DIR/mod_spatialite.so 36 | } 37 | 38 | function fix_paths_spatialite() { 39 | : 40 | } 41 | 42 | function fix_paths_spatialite_check() { 43 | : 44 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/sqlite/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_sqlite() { 4 | env_var_exists VERSION_sqlite 5 | env_var_exists LINK_sqlite 6 | } 7 | 8 | function bundle_sqlite() { 9 | try cp -av $DEPS_LIB_DIR/$LINK_sqlite $BUNDLE_LIB_DIR/$LINK_sqlite 10 | mk_sym_link $BUNDLE_LIB_DIR $LINK_sqlite libsqlite3.dylib 11 | } 12 | 13 | function fix_binaries_sqlite() { 14 | install_name_id @rpath/$LINK_sqlite $BUNDLE_LIB_DIR/$LINK_sqlite 15 | 16 | install_name_change $DEPS_LIB_DIR/$LINK_zlib @rpath/$LINK_zlib $BUNDLE_LIB_DIR/$LINK_sqlite 17 | } 18 | 19 | function fix_binaries_sqlite_check() { 20 | verify_binary $BUNDLE_LIB_DIR/$LINK_sqlite 21 | } 22 | 23 | function fix_paths_sqlite() { 24 | : 25 | } 26 | 27 | function fix_paths_sqlite_check() { 28 | : 29 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/unixodbc/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_unixodbc() { 4 | env_var_exists VERSION_unixodbc 5 | env_var_exists LINK_unixodbc 6 | env_var_exists LINK_unixodbcinst 7 | } 8 | 9 | function bundle_unixodbc() { 10 | try cp -av $QGIS_DEPS_STAGE_PATH/unixodbc/lib/libodbc.*dylib $BUNDLE_LIB_DIR 11 | try cp -av $QGIS_DEPS_STAGE_PATH/unixodbc/lib/libodbcinst.*dylib $BUNDLE_LIB_DIR 12 | } 13 | 14 | function fix_binaries_unixodbc() { 15 | install_name_id @rpath/$LINK_unixodbc $BUNDLE_LIB_DIR/$LINK_unixodbc 16 | install_name_id @rpath/$LINK_unixodbcinst $BUNDLE_LIB_DIR/$LINK_unixodbcinst 17 | 18 | install_name_change $DEPS_LIB_DIR/$LINK_libltdl @rpath/$LINK_libltdl $BUNDLE_LIB_DIR/$LINK_unixodbc 19 | install_name_change $DEPS_LIB_DIR/$LINK_libltdl @rpath/$LINK_libltdl $BUNDLE_LIB_DIR/$LINK_unixodbcinst 20 | } 21 | 22 | function fix_binaries_unixodbc_check() { 23 | verify_binary $BUNDLE_LIB_DIR/$LINK_unixodbc 24 | verify_binary $BUNDLE_LIB_DIR/$LINK_unixodbcinst 25 | } 26 | 27 | function fix_paths_unixodbc() { 28 | : 29 | } 30 | 31 | function fix_paths_unixodbc_check() { 32 | : 33 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/uriparser/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_uriparser() { 4 | env_var_exists VERSION_uriparser 5 | env_var_exists LINK_liburiparser 6 | } 7 | 8 | function bundle_uriparser() { 9 | try cp -av $DEPS_LIB_DIR/liburiparser.*dylib $BUNDLE_LIB_DIR 10 | } 11 | 12 | function fix_binaries_uriparser() { 13 | install_name_id @rpath/$LINK_liburiparser $BUNDLE_LIB_DIR/$LINK_liburiparser 14 | } 15 | 16 | function fix_binaries_uriparser_check() { 17 | verify_binary $BUNDLE_LIB_DIR/$LINK_liburiparser 18 | } 19 | 20 | function fix_paths_uriparser() { 21 | : 22 | } 23 | 24 | function fix_paths_uriparser_check() { 25 | : 26 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/webp/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_webp() { 4 | env_var_exists VERSION_webp 5 | } 6 | 7 | function bundle_webp() { 8 | try cp -av $DEPS_LIB_DIR/libwebp.*dylib $BUNDLE_LIB_DIR 9 | } 10 | 11 | function fix_binaries_webp() { 12 | install_name_id @rpath/$LINK_libwebp $BUNDLE_LIB_DIR/$LINK_libwebp 13 | 14 | install_name_change $DEPS_LIB_DIR/$LINK_libwebp @rpath/$LINK_libwebp $BUNDLE_LIB_DIR/$LINK_libwebp 15 | } 16 | 17 | function fix_binaries_webp_check() { 18 | verify_binary $BUNDLE_LIB_DIR/$LINK_libwebp 19 | } 20 | 21 | function fix_paths_webp() { 22 | : 23 | } 24 | 25 | function fix_paths_webp_check() { 26 | : 27 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/xerces/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_xerces() { 4 | env_var_exists VERSION_xerces 5 | } 6 | 7 | function bundle_xerces() { 8 | try cp -av $DEPS_LIB_DIR/libxerces*dylib $BUNDLE_LIB_DIR 9 | } 10 | 11 | function fix_binaries_xerces() { 12 | install_name_id @rpath/$LINK_libxerces_c $BUNDLE_LIB_DIR/$LINK_libxerces_c 13 | 14 | for i in \ 15 | $LINK_libicuuc \ 16 | $LINK_libicudata \ 17 | $LINK_libcurl 18 | do 19 | install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_LIB_DIR/$LINK_libxerces_c 20 | done 21 | } 22 | 23 | function fix_binaries_xerces_check() { 24 | verify_binary $BUNDLE_LIB_DIR/$LINK_libxerces_c 25 | } 26 | 27 | function fix_paths_xerces() { 28 | : 29 | } 30 | 31 | function fix_paths_xerces_check() { 32 | : 33 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/xz/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_xz() { 4 | env_var_exists VERSION_xz 5 | env_var_exists LINK_liblzma 6 | } 7 | 8 | function bundle_xz() { 9 | try cp -av $DEPS_LIB_DIR/liblzma.*dylib $BUNDLE_LIB_DIR 10 | } 11 | 12 | function fix_binaries_xz() { 13 | install_name_id @rpath/$LINK_liblzma $BUNDLE_LIB_DIR/$LINK_liblzma 14 | } 15 | 16 | function fix_binaries_xz_check() { 17 | verify_binary $BUNDLE_LIB_DIR/$LINK_liblzma 18 | } 19 | 20 | function fix_paths_xz() { 21 | : 22 | } 23 | 24 | function fix_paths_xz_check() { 25 | : 26 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/zlib/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_zlib() { 4 | env_var_exists VERSION_zlib 5 | env_var_exists LINK_zlib 6 | } 7 | 8 | function bundle_zlib() { 9 | try cp -av $DEPS_LIB_DIR/libz.*dylib $BUNDLE_LIB_DIR 10 | } 11 | 12 | function fix_binaries_zlib() { 13 | install_name_id @rpath/$LINK_zlib $BUNDLE_LIB_DIR/$LINK_zlib 14 | 15 | install_name_change $DEPS_LIB_DIR/$LINK_zlib @rpath/$LINK_zlib $BUNDLE_LIB_DIR/$LINK_zlib 16 | install_name_change $DEPS_LIB_DIR/$LINK_liblzma @rpath/$LINK_liblzma $BUNDLE_LIB_DIR/$LINK_zlib 17 | } 18 | 19 | function fix_binaries_zlib_check() { 20 | verify_binary $BUNDLE_LIB_DIR/$LINK_zlib 21 | } 22 | 23 | function fix_paths_zlib() { 24 | : 25 | } 26 | 27 | function fix_paths_zlib_check() { 28 | : 29 | } -------------------------------------------------------------------------------- /qgis_bundle/recipes/zstd/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function check_zstd() { 4 | env_var_exists VERSION_zstd 5 | } 6 | 7 | function bundle_zstd() { 8 | try cp -av $DEPS_LIB_DIR/libzstd.*dylib $BUNDLE_LIB_DIR 9 | } 10 | 11 | function fix_binaries_zstd() { 12 | install_name_id @rpath/$LINK_zstd $BUNDLE_LIB_DIR/$LINK_zstd 13 | } 14 | 15 | function fix_binaries_zstd_check() { 16 | verify_binary $BUNDLE_LIB_DIR/$LINK_zstd 17 | } 18 | 19 | function fix_paths_zstd() { 20 | : 21 | } 22 | 23 | function fix_paths_zstd_check() { 24 | : 25 | } -------------------------------------------------------------------------------- /qgis_bundle/replace_string_in_file.py: -------------------------------------------------------------------------------- 1 | # 2019 Peter Petrik (zilolv at gmail dot com) 2 | # GNU General Public License 2 any later version 3 | import os 4 | import argparse 5 | import subprocess 6 | 7 | def _replace_string_in_binary(filename, src, dest): 8 | if not os.path.exists(filename): 9 | raise Exception("{} does not exist" + filename) 10 | 11 | if len(src) != len(dest): 12 | raise Exception("Unable to patch {}, src and dest must have the same length" + filename) 13 | 14 | with open(filename, 'rb+') as fh: 15 | data = fh.read() 16 | data = data.replace(bytes(src, "utf-8"), bytes(dest, "utf-8")) 17 | fh.seek(0) 18 | fh.write(data) 19 | 20 | output = subprocess.check_output(["strings", filename], encoding='UTF-8') 21 | if src in output: 22 | raise Exception("Failed to patch " + filename) 23 | 24 | parser = argparse.ArgumentParser(description='Replace string in binary') 25 | parser.add_argument('--file', 26 | required=True) 27 | 28 | parser.add_argument('--install_path', 29 | required=True) 30 | 31 | parser.add_argument('--bundle_path', 32 | required=True) 33 | 34 | parser.add_argument('--stage_path', 35 | required=True) 36 | 37 | args = parser.parse_args() 38 | 39 | homebrew = "/usr/local/" 40 | 41 | for i in [homebrew, args.install_path, args.bundle_path, args.stage_path]: 42 | key = "INVALID/" 43 | replacement = key + i[len(key):] 44 | _replace_string_in_binary(args.file, i, replacement) 45 | -------------------------------------------------------------------------------- /qgis_deps/README.md: -------------------------------------------------------------------------------- 1 | Prerequisities 2 | -------------- 3 | 4 | 1. XCode and xcode command line tools. Check by opening XCode and try to build hello world 5 | 2. Install QT 5.x from the official Maintanance tool from https://www.qt.io/download. Qt for MacOS should be installed in location /opt/Qt/5.13.1 or similar 6 | 3. Cmake and other build tools. You can use homebrew (see scripts/install_brew_dev_packages) or other means 7 | 8 | Build QGIS-deps 9 | --------------- 10 | 11 | Note: if you want to just develop QGIS and not the qgis-deps package, 12 | skip this and go to build QGIS step 13 | 14 | 1. Update config.conf (usually not needed) 15 | 2. Run `./qgis_deps.bash` 16 | 3. Enjoy 17 | 18 | Upload deps to qgis.org 19 | ------------------ 20 | For this you need to have QGIS signing certificate, and ssh access to qgis.org 21 | Usually this is done on build server and it is not necessary for development of 22 | the qgis-deps pacakges 23 | 24 | 1. Build QGIS-Deps 25 | 2. Run `sign_deps.bash` 26 | 3. Run `create_package.bash` 27 | 4. Run `upload_to_qgis2.bash` 28 | 29 | How to create patch file 30 | ----------------------- 31 | diff -rupN file.orig file 32 | 33 | Build QGIS 34 | ----------------------- 35 | 36 | 1. Build QGIS-deps or download&extract from [qgis download area](https://qgis.org/downloads/macos/deps/) 37 | 2. Run 38 | ``` 39 | cd 40 | PATH=/stage/bin:$PATH \ 41 | cmake -DQGIS_MAC_DEPS_DIR=/stage \ 42 | -DCMAKE_PREFIX_PATH=/clang_64 \ 43 | -DQGIS_MACAPP_BUNDLE=0 \ 44 | -DWITH_QT5SERIALPORT=FALSE \ 45 | -DWITH_GRASS=OFF \ 46 | 47 | ``` 48 | 3. Run `make` 49 | 50 | Alternatively you can 51 | 52 | 2. Open QT Creator and load CMakeLists of QGIS 53 | 3. Setup Kit in Qt Creator with QT from /opt/QT (as in prerequisities) 54 | 4. Set/Add in Projects>Build Settings>Cmake similarly to `configure_qgis_build.bash` 55 | 5. Rerun cmake from menu (Clear Cmake Configration + run Cmake) 56 | 6. Build 57 | 58 | License & Acknowledgement 59 | ------------------------- 60 | - original copy of [distribute.sh](https://github.com/opengisch/OSGeo4A/blob/master/LICENSE-for-distribute-sh) 61 | -------------------------------------------------------------------------------- /qgis_deps/qgis_deps.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -eu 4 | 5 | if (( $# < 1 )); then 6 | echo "qgis_deps: $0 /config/.conf" 7 | exit 1 8 | fi 9 | 10 | CONFIG_FILE=$1 11 | 12 | time `dirname $0`/distribute.sh $CONFIG_FILE -mqgis_deps -------------------------------------------------------------------------------- /qgis_deps/recipes/bison/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_bison="Parser generator" 4 | 5 | # version of your package 6 | VERSION_bison=3.7.5 7 | 8 | # dependencies of this recipe 9 | DEPS_bison=(gettext) 10 | 11 | # url of the package 12 | URL_bison=https://ftp.gnu.org/gnu/bison/bison-${VERSION_bison}.tar.xz 13 | 14 | # md5 of the package 15 | MD5_bison=9b762dc24a6723f86d14d957d3deeb90 16 | 17 | # default build path 18 | BUILD_bison=$BUILD_PATH/bison/$(get_directory $URL_bison) 19 | 20 | # default recipe path 21 | RECIPE_bison=$RECIPES_PATH/bison 22 | 23 | # function called for preparing source code if needed 24 | # (you can apply patch etc here.) 25 | function prebuild_bison() { 26 | cd $BUILD_bison 27 | 28 | # check marker 29 | if [ -f .patched ]; then 30 | return 31 | fi 32 | 33 | patch_configure_file configure 34 | 35 | touch .patched 36 | } 37 | 38 | function shouldbuild_bison() { 39 | # If lib is newer than the sourcecode skip build 40 | if [ ${STAGE_PATH}/bin/bison -nt $BUILD_bison/.patched ]; then 41 | DO_BUILD=0 42 | fi 43 | } 44 | 45 | # function called to build the source code 46 | function build_bison() { 47 | try rsync -a $BUILD_bison/ $BUILD_PATH/bison/build-$ARCH/ 48 | try cd $BUILD_PATH/bison/build-$ARCH 49 | push_env 50 | 51 | try ${CONFIGURE} --disable-dependency-tracking 52 | 53 | check_file_configuration config.status 54 | 55 | try $MAKESMP 56 | try $MAKESMP install 57 | 58 | pop_env 59 | } 60 | 61 | # function called after all the compile have been done 62 | function postbuild_bison() { 63 | verify_binary bin/bison 64 | } 65 | 66 | # function to append information to config file 67 | function add_config_info_bison() { 68 | append_to_config_file "# bison-${VERSION_bison}: ${DESC_bison}" 69 | append_to_config_file "export VERSION_bison=${VERSION_bison}" 70 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/bz2/Makefile-libbz2_dylib: -------------------------------------------------------------------------------- 1 | SHELL=/bin/sh 2 | CC=clang 3 | BIGFILES=-D_FILE_OFFSET_BITS=64 4 | CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES) 5 | 6 | OBJS= blocksort.o \ 7 | huffman.o \ 8 | crctable.o \ 9 | randtable.o \ 10 | compress.o \ 11 | decompress.o \ 12 | bzlib.o 13 | 14 | all: $(OBJS) 15 | $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.8 $(OBJS) 16 | $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.8 17 | rm -f libbz2.so.1.0 18 | ln -s libbz2.so.1.0.8 libbz2.so.1.0 19 | 20 | clean: 21 | rm -f $(OBJS) bzip2.o libbz2.so.1.0.8 libbz2.so.1.0 bzip2-shared 22 | 23 | blocksort.o: blocksort.c 24 | $(CC) $(CFLAGS) -c blocksort.c 25 | huffman.o: huffman.c 26 | $(CC) $(CFLAGS) -c huffman.c 27 | crctable.o: crctable.c 28 | $(CC) $(CFLAGS) -c crctable.c 29 | randtable.o: randtable.c 30 | $(CC) $(CFLAGS) -c randtable.c 31 | compress.o: compress.c 32 | $(CC) $(CFLAGS) -c compress.c 33 | decompress.o: decompress.c 34 | $(CC) $(CFLAGS) -c decompress.c 35 | bzlib.o: bzlib.c 36 | $(CC) $(CFLAGS) -c bzlib.c -------------------------------------------------------------------------------- /qgis_deps/recipes/exiv2/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_exiv2="EXIF and IPTC metadata manipulation library and tools" 4 | 5 | # version of your package 6 | VERSION_exiv2=0.27.3 7 | LINK_exiv2=libexiv2.27.dylib 8 | 9 | # dependencies of this recipe 10 | DEPS_exiv2=() 11 | 12 | # url of the package 13 | URL_exiv2=https://www.exiv2.org/builds/exiv2-${VERSION_exiv2}-Source.tar.gz 14 | 15 | # md5 of the package 16 | MD5_exiv2=68a59595e8617284b2e1eee528ae1f77 17 | 18 | # default build path 19 | BUILD_exiv2=$BUILD_PATH/exiv2/$(get_directory $URL_exiv2) 20 | 21 | # default recipe path 22 | RECIPE_exiv2=$RECIPES_PATH/exiv2 23 | 24 | # function called for preparing source code if needed 25 | # (you can apply patch etc here.) 26 | function prebuild_exiv2() { 27 | cd $BUILD_exiv2 28 | 29 | # check marker 30 | if [ -f .patched ]; then 31 | return 32 | fi 33 | 34 | touch .patched 35 | } 36 | 37 | function shouldbuild_exiv2() { 38 | # If lib is newer than the sourcecode skip build 39 | if [ ${STAGE_PATH}/lib/$LINK_exiv2 -nt $BUILD_exiv2/.patched ]; then 40 | DO_BUILD=0 41 | fi 42 | } 43 | 44 | # function called to build the source code 45 | function build_exiv2() { 46 | try mkdir -p $BUILD_PATH/exiv2/build-$ARCH 47 | try cd $BUILD_PATH/exiv2/build-$ARCH 48 | push_env 49 | 50 | try ${CMAKE} $BUILD_exiv2 51 | check_file_configuration CMakeCache.txt 52 | 53 | try $NINJA 54 | try $NINJA install 55 | 56 | pop_env 57 | } 58 | 59 | # function called after all the compile have been done 60 | function postbuild_exiv2() { 61 | verify_binary lib/$LINK_exiv2 62 | verify_binary bin/addmoddel 63 | } 64 | 65 | # function to append information to config file 66 | function add_config_info_exiv2() { 67 | append_to_config_file "# exiv2-${VERSION_exiv2}: ${DESC_exiv2}" 68 | append_to_config_file "export VERSION_exiv2=${VERSION_exiv2}" 69 | append_to_config_file "export LINK_exiv2=${LINK_exiv2}" 70 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/expat/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_expat="XML 1.0 parser" 4 | 5 | # version of your package 6 | VERSION_expat=2.2.10 7 | LINK_expat=libexpat.1.dylib 8 | 9 | # dependencies of this recipe 10 | DEPS_expat=() 11 | 12 | # url of the package 13 | URL_expat=https://github.com/libexpat/libexpat/releases/download/R_${VERSION_expat//./_}/expat-${VERSION_expat}.tar.xz 14 | 15 | # md5 of the package 16 | MD5_expat=e0fe49a6b3480827c9455e4cfc799133 17 | 18 | # default build path 19 | BUILD_expat=$BUILD_PATH/expat/$(get_directory $URL_expat) 20 | 21 | # default recipe path 22 | RECIPE_expat=$RECIPES_PATH/expat 23 | 24 | # function called for preparing source code if needed 25 | # (you can apply patch etc here.) 26 | function prebuild_expat() { 27 | cd $BUILD_expat 28 | 29 | # check marker 30 | if [ -f .patched ]; then 31 | return 32 | fi 33 | 34 | patch_configure_file configure 35 | 36 | touch .patched 37 | } 38 | 39 | function shouldbuild_expat() { 40 | # If lib is newer than the sourcecode skip build 41 | if [ ${STAGE_PATH}/lib/$LINK_expat -nt $BUILD_expat/.patched ]; then 42 | DO_BUILD=0 43 | fi 44 | } 45 | 46 | # function called to build the source code 47 | function build_expat() { 48 | try rsync -a $BUILD_expat/ $BUILD_PATH/expat/build-$ARCH/ 49 | try cd $BUILD_PATH/expat/build-$ARCH 50 | push_env 51 | 52 | try ${CONFIGURE} 53 | 54 | check_file_configuration config.status 55 | try $MAKESMP 56 | try $MAKESMP install 57 | 58 | pop_env 59 | } 60 | 61 | # function called after all the compile have been done 62 | function postbuild_expat() { 63 | verify_binary lib/$LINK_expat 64 | } 65 | 66 | # function to append information to config file 67 | function add_config_info_expat() { 68 | append_to_config_file "# expat-${VERSION_expat}: ${DESC_expat}" 69 | append_to_config_file "export VERSION_expat=${VERSION_expat}" 70 | append_to_config_file "export LINK_expat=${LINK_expat}" 71 | } 72 | -------------------------------------------------------------------------------- /qgis_deps/recipes/fastcgi/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_fastcgi="Protocol for interfacing interactive programs with a web server" 4 | 5 | # version of your package 6 | VERSION_fastcgi=2.4.2 7 | LINK_fastcgi=libfcgi.0.dylib 8 | 9 | # dependencies of this recipe 10 | DEPS_fastcgi=() 11 | 12 | # url of the package 13 | URL_fastcgi=https://github.com/FastCGI-Archives/fcgi2/archive/${VERSION_fastcgi}.tar.gz 14 | 15 | # md5 of the package 16 | MD5_fastcgi=146376d5c5c059b9184755db76505fab 17 | 18 | # default build path 19 | BUILD_fastcgi=$BUILD_PATH/fastcgi/$(get_directory $URL_fastcgi) 20 | 21 | # default recipe path 22 | RECIPE_fastcgi=$RECIPES_PATH/fastcgi 23 | 24 | # function called for preparing source code if needed 25 | # (you can apply patch etc here.) 26 | function prebuild_fastcgi() { 27 | cd $BUILD_fastcgi 28 | 29 | # check marker 30 | if [ -f .patched ]; then 31 | return 32 | fi 33 | 34 | touch .patched 35 | } 36 | 37 | function shouldbuild_fastcgi() { 38 | # If lib is newer than the sourcecode skip build 39 | if [ ${STAGE_PATH}/lib/$LINK_fastcgi -nt $BUILD_fastcgi/.patched ]; then 40 | DO_BUILD=0 41 | fi 42 | } 43 | 44 | # function called to build the source code 45 | function build_fastcgi() { 46 | try rsync -a $BUILD_fastcgi/ $BUILD_PATH/fastcgi/build-$ARCH/ 47 | try cd $BUILD_PATH/fastcgi/build-$ARCH 48 | push_env 49 | 50 | try ./autogen.sh 51 | patch_configure_file configure 52 | try ${CONFIGURE} --disable-debug --disable-dependency-tracking 53 | 54 | check_file_configuration config.status 55 | try $MAKESMP 56 | try $MAKESMP install 57 | 58 | pop_env 59 | } 60 | 61 | # function called after all the compile have been done 62 | function postbuild_fastcgi() { 63 | verify_binary lib/$LINK_fastcgi 64 | } 65 | 66 | # function to append information to config file 67 | function add_config_info_fastcgi() { 68 | append_to_config_file "# fastcgi-${VERSION_fastcgi}: ${DESC_fastcgi}" 69 | append_to_config_file "export VERSION_fastcgi=${VERSION_fastcgi}" 70 | append_to_config_file "export LINK_fastcgi=${LINK_fastcgi}" 71 | } 72 | -------------------------------------------------------------------------------- /qgis_deps/recipes/flex/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_flex="Fast Lexical Analyzer, generates Scanners (tokenizers)" 4 | 5 | # version of your package 6 | VERSION_flex=2.6.4 7 | LINK_flex_version=2 8 | 9 | # dependencies of this recipe 10 | DEPS_flex=( bison ) 11 | 12 | # url of the package 13 | URL_flex=https://github.com/westes/flex/releases/download/v${VERSION_flex}/flex-${VERSION_flex}.tar.gz 14 | 15 | # md5 of the package 16 | MD5_flex=2882e3179748cc9f9c23ec593d6adc8d 17 | 18 | # default build path 19 | BUILD_flex=$BUILD_PATH/flex/$(get_directory $URL_flex) 20 | 21 | # default recipe path 22 | RECIPE_flex=$RECIPES_PATH/flex 23 | 24 | # function called for preparing source code if needed 25 | # (you can apply patch etc here.) 26 | function prebuild_flex() { 27 | cd $BUILD_flex 28 | 29 | # check marker 30 | if [ -f .patched ]; then 31 | return 32 | fi 33 | 34 | patch_configure_file configure 35 | 36 | touch .patched 37 | } 38 | 39 | function shouldbuild_flex() { 40 | # If lib is newer than the sourcecode skip build 41 | if [ ${STAGE_PATH}/lib/libfl.dylib -nt $BUILD_flex/.patched ]; then 42 | DO_BUILD=0 43 | fi 44 | } 45 | 46 | # function called to build the source code 47 | function build_flex() { 48 | try rsync -a $BUILD_flex/ $BUILD_PATH/flex/build-$ARCH/ 49 | try cd $BUILD_PATH/flex/build-$ARCH 50 | push_env 51 | 52 | try ${CONFIGURE} \ 53 | --disable-debug \ 54 | --enable-shared \ 55 | --disable-dependency-tracking 56 | 57 | check_file_configuration config.status 58 | 59 | try $MAKESMP 60 | try $MAKESMP install 61 | 62 | pop_env 63 | } 64 | 65 | # function called after all the compile have been done 66 | function postbuild_flex() { 67 | verify_binary "lib/libfl.dylib" 68 | } 69 | 70 | # function to append information to config file 71 | function add_config_info_flex() { 72 | append_to_config_file "# flex-${VERSION_flex}: ${DESC_flex}" 73 | append_to_config_file "export VERSION_flex=${VERSION_flex}" 74 | } 75 | -------------------------------------------------------------------------------- /qgis_deps/recipes/freetype/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_freetype="Software library to render fonts" 4 | 5 | # version of your package 6 | VERSION_freetype=2.10.2 7 | LINK_freetype=libfreetype.6.dylib 8 | 9 | # dependencies of this recipe 10 | DEPS_freetype=(png brotli bz2 zlib) 11 | 12 | # url of the package 13 | URL_freetype=https://download.savannah.gnu.org/releases/freetype/freetype-$VERSION_freetype.tar.gz 14 | 15 | # md5 of the package 16 | MD5_freetype=b1cb620e4c875cd4d1bfa04945400945 17 | 18 | # default build path 19 | BUILD_freetype=$BUILD_PATH/freetype/$(get_directory $URL_freetype) 20 | 21 | # default recipe path 22 | RECIPE_freetype=$RECIPES_PATH/freetype 23 | 24 | # function called for preparing source code if needed 25 | # (you can apply patch etc here.) 26 | function prebuild_freetype() { 27 | cd $BUILD_freetype 28 | 29 | # check marker 30 | if [ -f .patched ]; then 31 | return 32 | fi 33 | 34 | patch_configure_file configure 35 | 36 | touch .patched 37 | } 38 | 39 | function shouldbuild_freetype() { 40 | # If lib is newer than the sourcecode skip build 41 | if [ ${STAGE_PATH}/lib/$LINK_freetype -nt $BUILD_freetype/.patched ]; then 42 | DO_BUILD=0 43 | fi 44 | } 45 | 46 | # function called to build the source code 47 | function build_freetype() { 48 | try rsync -a $BUILD_freetype/ $BUILD_PATH/freetype/build-$ARCH/ 49 | try cd $BUILD_PATH/freetype/build-$ARCH 50 | 51 | push_env 52 | 53 | try ${CONFIGURE} --disable-debug 54 | 55 | check_file_configuration config.status 56 | try $MAKESMP 57 | try $MAKESMP install 58 | 59 | pop_env 60 | } 61 | 62 | # function called after all the compile have been done 63 | function postbuild_freetype() { 64 | verify_binary lib/$LINK_freetype 65 | } 66 | 67 | # function to append information to config file 68 | function add_config_info_freetype() { 69 | append_to_config_file "# freetype-${VERSION_freetype}: ${DESC_freetype}" 70 | append_to_config_file "export VERSION_freetype=${VERSION_freetype}" 71 | append_to_config_file "export LINK_freetype=${LINK_freetype}" 72 | } 73 | -------------------------------------------------------------------------------- /qgis_deps/recipes/freexl/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_freexl="Library to extract data from Excel .xls files" 4 | 5 | # version of your package 6 | VERSION_freexl=1.0.6 7 | LINK_freexl=libfreexl.1.dylib 8 | 9 | # dependencies of this recipe 10 | DEPS_freexl=() 11 | 12 | # url of the package 13 | URL_freexl=https://www.gaia-gis.it/gaia-sins/freexl-sources/freexl-${VERSION_freexl}.tar.gz 14 | 15 | # md5 of the package 16 | MD5_freexl=d3d2df0d2ad7713038ce99024738172a 17 | 18 | # default build path 19 | BUILD_freexl=$BUILD_PATH/freexl/$(get_directory $URL_freexl) 20 | 21 | # default recipe path 22 | RECIPE_freexl=$RECIPES_PATH/freexl 23 | 24 | # function called for preparing source code if needed 25 | # (you can apply patch etc here.) 26 | function prebuild_freexl() { 27 | cd $BUILD_freexl 28 | 29 | # check marker 30 | if [ -f .patched ]; then 31 | return 32 | fi 33 | 34 | patch_configure_file configure 35 | 36 | touch .patched 37 | } 38 | 39 | function shouldbuild_freexl() { 40 | # If lib is newer than the sourcecode skip build 41 | if [ ${STAGE_PATH}/lib/$LINK_freexl -nt $BUILD_freexl/.patched ]; then 42 | DO_BUILD=0 43 | fi 44 | } 45 | 46 | # function called to build the source code 47 | function build_freexl() { 48 | try rsync -a $BUILD_freexl/ $BUILD_PATH/freexl/build-$ARCH/ 49 | try cd $BUILD_PATH/freexl/build-$ARCH 50 | push_env 51 | 52 | try ${CONFIGURE} --disable-debug 53 | 54 | check_file_configuration config.status 55 | try $MAKESMP 56 | try $MAKESMP install 57 | 58 | pop_env 59 | } 60 | 61 | # function called after all the compile have been done 62 | function postbuild_freexl() { 63 | verify_binary lib/$LINK_freexl 64 | } 65 | 66 | # function to append information to config file 67 | function add_config_info_freexl() { 68 | append_to_config_file "# freexl-${VERSION_freexl}: ${DESC_freexl}" 69 | append_to_config_file "export VERSION_freexl=${VERSION_freexl}" 70 | append_to_config_file "export LINK_freexl=${LINK_freexl}" 71 | } 72 | -------------------------------------------------------------------------------- /qgis_deps/recipes/gettext/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_gettext="gettext" 4 | 5 | # version of your package 6 | VERSION_gettext=0.21 7 | LINK_libintl=libintl.8.dylib 8 | 9 | # dependencies of this recipe 10 | DEPS_gettext=(libcurl libxml2 libunistring) 11 | 12 | # url of the package 13 | URL_gettext=https://ftp.gnu.org/pub/gnu/gettext/gettext-$VERSION_gettext.tar.gz 14 | 15 | # md5 of the package 16 | MD5_gettext=28b1cd4c94a74428723ed966c38cf479 17 | 18 | # default build path 19 | BUILD_gettext=$BUILD_PATH/gettext/$(get_directory $URL_gettext) 20 | 21 | # default recipe path 22 | RECIPE_gettext=$RECIPES_PATH/gettext 23 | 24 | # function called for preparing source code if needed 25 | # (you can apply patch etc here.) 26 | function prebuild_gettext() { 27 | cd $BUILD_gettext 28 | 29 | # check marker 30 | if [ -f .patched ]; then 31 | return 32 | fi 33 | 34 | patch_configure_file configure 35 | 36 | touch .patched 37 | } 38 | 39 | function shouldbuild_gettext() { 40 | # If lib is newer than the sourcecode skip build 41 | if [ ${STAGE_PATH}/bin/ggettextize -nt $BUILD_gettext/.patched ]; then 42 | DO_BUILD=0 43 | fi 44 | } 45 | 46 | # function called to build the source code 47 | function build_gettext() { 48 | try rsync -a $BUILD_gettext/ $BUILD_PATH/gettext/build-$ARCH/ 49 | try cd $BUILD_PATH/gettext/build-$ARCH 50 | push_env 51 | 52 | try ${CONFIGURE} \ 53 | --disable-debug \ 54 | --program-prefix=g 55 | 56 | check_file_configuration config.status 57 | try $MAKESMP 58 | try $MAKESMP install 59 | 60 | pop_env 61 | } 62 | 63 | # function called after all the compile have been done 64 | function postbuild_gettext() { 65 | verify_binary lib/$LINK_libintl 66 | verify_binary lib/libgettextlib.dylib 67 | } 68 | 69 | # function to append information to config file 70 | function add_config_info_gettext() { 71 | append_to_config_file "# gettext-${VERSION_gettext}: ${DESC_gettext}" 72 | append_to_config_file "export VERSION_gettext=${VERSION_gettext}" 73 | append_to_config_file "export LINK_libintl=${LINK_libintl}" 74 | } 75 | -------------------------------------------------------------------------------- /qgis_deps/recipes/gmp/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_gmp="Arithmetic without limitations" 4 | 5 | # version of your package 6 | VERSION_gmp=6.2.0 7 | LINK_gmp=libgmpxx.4.dylib 8 | 9 | # dependencies of this recipe 10 | DEPS_gmp=() 11 | 12 | # url of the package 13 | URL_gmp=https://gmplib.org/download/gmp/gmp-$VERSION_gmp.tar.lz 14 | 15 | # md5 of the package 16 | MD5_gmp=e3e08ac185842a882204ba3c37985127 17 | 18 | # default build path 19 | BUILD_gmp=$BUILD_PATH/gmp/$(get_directory $URL_gmp) 20 | 21 | # default recipe path 22 | RECIPE_gmp=$RECIPES_PATH/gmp 23 | 24 | # function called for preparing source code if needed 25 | # (you can apply patch etc here.) 26 | function prebuild_gmp() { 27 | cd $BUILD_gmp 28 | 29 | # check marker 30 | if [ -f .patched ]; then 31 | return 32 | fi 33 | 34 | patch_configure_file configure 35 | 36 | touch .patched 37 | } 38 | 39 | function shouldbuild_gmp() { 40 | # If lib is newer than the sourcecode skip build 41 | if [ ${STAGE_PATH}/lib/$LINK_gmp -nt $BUILD_gmp/.patched ]; then 42 | DO_BUILD=0 43 | fi 44 | } 45 | 46 | # function called to build the source code 47 | function build_gmp() { 48 | try rsync -a $BUILD_gmp/ $BUILD_PATH/gmp/build-$ARCH/ 49 | try cd $BUILD_PATH/gmp/build-$ARCH 50 | push_env 51 | 52 | export CFLAGS="$CFLAGS -fno-stack-check" 53 | 54 | try ${CONFIGURE} --enable-cxx --with-pic 55 | 56 | check_file_configuration config.status 57 | try $MAKESMP 58 | try $MAKESMP install 59 | 60 | pop_env 61 | } 62 | 63 | # function called after all the compile have been done 64 | function postbuild_gmp() { 65 | verify_binary lib/$LINK_gmp 66 | } 67 | 68 | # function to append information to config file 69 | function add_config_info_gmp() { 70 | append_to_config_file "# gmp-${VERSION_gmp}: ${DESC_gmp}" 71 | append_to_config_file "export VERSION_gmp=${VERSION_gmp}" 72 | append_to_config_file "export LINK_gmp=${LINK_gmp}" 73 | } 74 | -------------------------------------------------------------------------------- /qgis_deps/recipes/gsl/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_gsl="Numerical library for C and C++" 4 | 5 | # version of your package 6 | VERSION_gsl=2.6 7 | 8 | LINK_libgsl=libgsl.25.dylib 9 | LINK_libgslcblas=libgslcblas.0.dylib 10 | 11 | # dependencies of this recipe 12 | DEPS_gsl=() 13 | 14 | # url of the package 15 | URL_gsl=https://ftp.gnu.org/gnu/gsl/gsl-${VERSION_gsl}.tar.gz 16 | 17 | # md5 of the package 18 | MD5_gsl=bda73a3dd5ff2f30b5956764399db6e7 19 | 20 | # default build path 21 | BUILD_gsl=$BUILD_PATH/gsl/$(get_directory $URL_gsl) 22 | 23 | # default recipe path 24 | RECIPE_gsl=$RECIPES_PATH/gsl 25 | 26 | # function called for preparing source code if needed 27 | # (you can apply patch etc here.) 28 | function prebuild_gsl() { 29 | cd $BUILD_gsl 30 | 31 | # check marker 32 | if [ -f .patched ]; then 33 | return 34 | fi 35 | 36 | patch_configure_file configure 37 | 38 | touch .patched 39 | } 40 | 41 | function shouldbuild_gsl() { 42 | # If lib is newer than the sourcecode skip build 43 | if [ ${STAGE_PATH}/lib/$LINK_libgsl -nt $BUILD_gsl/.patched ]; then 44 | DO_BUILD=0 45 | fi 46 | } 47 | 48 | # function called to build the source code 49 | function build_gsl() { 50 | try rsync -a $BUILD_gsl/ $BUILD_PATH/gsl/build-$ARCH/ 51 | try cd $BUILD_PATH/gsl/build-$ARCH 52 | push_env 53 | 54 | try ${CONFIGURE} --disable-debug 55 | 56 | check_file_configuration config.status 57 | try $MAKESMP 58 | try $MAKESMP install 59 | 60 | pop_env 61 | } 62 | 63 | # function called after all the compile have been done 64 | function postbuild_gsl() { 65 | verify_binary lib/$LINK_libgsl 66 | verify_binary lib/$LINK_libgslcblas 67 | 68 | verify_binary bin/gsl-histogram 69 | verify_binary bin/gsl-randist 70 | } 71 | 72 | # function to append information to config file 73 | function add_config_info_gsl() { 74 | append_to_config_file "# gsl-${VERSION_gsl}: ${DESC_gsl}" 75 | append_to_config_file "export VERSION_gsl=${VERSION_gsl}" 76 | append_to_config_file "export LINK_libgsl=${LINK_libgsl}" 77 | append_to_config_file "export LINK_libgslcblas=${LINK_libgslcblas}" 78 | } 79 | -------------------------------------------------------------------------------- /qgis_deps/recipes/jpeg/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_jpeg="Image manipulation library" 4 | 5 | # version of your package 6 | VERSION_jpeg=9d 7 | 8 | LINK_jpeg=libjpeg.9.dylib 9 | 10 | # dependencies of this recipe 11 | DEPS_jpeg=() 12 | 13 | # url of the package 14 | URL_jpeg=https://www.ijg.org/files/jpegsrc.v${VERSION_jpeg}.tar.gz 15 | 16 | # md5 of the package 17 | MD5_jpeg=ad7e40dedc268f97c44e7ee3cd54548a 18 | 19 | # default build path 20 | BUILD_jpeg=$BUILD_PATH/jpeg/$(get_directory $URL_jpeg) 21 | 22 | # default recipe path 23 | RECIPE_jpeg=$RECIPES_PATH/jpeg 24 | 25 | # function called for preparing source code if needed 26 | # (you can apply patch etc here.) 27 | function prebuild_jpeg() { 28 | cd $BUILD_jpeg 29 | 30 | # check marker 31 | if [ -f .patched ]; then 32 | return 33 | fi 34 | 35 | patch_configure_file configure 36 | 37 | touch .patched 38 | } 39 | 40 | function shouldbuild_jpeg() { 41 | # If lib is newer than the sourcecode skip build 42 | if [ ${STAGE_PATH}/lib/$LINK_jpeg -nt $BUILD_jpeg/.patched ]; then 43 | DO_BUILD=0 44 | fi 45 | } 46 | 47 | # function called to build the source code 48 | function build_jpeg() { 49 | try rsync -a $BUILD_jpeg/ $BUILD_PATH/jpeg/build-$ARCH/ 50 | try cd $BUILD_PATH/jpeg/build-$ARCH 51 | push_env 52 | 53 | try ${CONFIGURE} \ 54 | --disable-debug 55 | 56 | check_file_configuration config.status 57 | 58 | try $MAKESMP 59 | try $MAKESMP install 60 | 61 | pop_env 62 | } 63 | 64 | # function called after all the compile have been done 65 | function postbuild_jpeg() { 66 | verify_binary lib/$LINK_jpeg 67 | } 68 | 69 | # function to append information to config file 70 | function add_config_info_jpeg() { 71 | append_to_config_file "# jpeg-${VERSION_jpeg}: ${DESC_jpeg}" 72 | append_to_config_file "export VERSION_jpeg=${VERSION_jpeg}" 73 | append_to_config_file "export LINK_jpeg=${LINK_jpeg}" 74 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/lerc/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_lerc="Limited Error Raster Compression" 4 | 5 | # version of your package 6 | VERSION_lerc=3.0 7 | 8 | LINK_liblerc=libLerc.dylib 9 | 10 | # dependencies of this recipe 11 | DEPS_lerc=() 12 | 13 | # url of the package 14 | URL_lerc=https://github.com/Esri/lerc/archive/refs/tags/v$VERSION_lerc.tar.gz 15 | 16 | # md5 of the package 17 | MD5_lerc=916567b67ca55ae037b826717b5940ec 18 | 19 | # default build path 20 | BUILD_lerc=$BUILD_PATH/lerc/$(get_directory $URL_lerc) 21 | 22 | # default recipe path 23 | RECIPE_lerc=$RECIPES_PATH/lerc 24 | 25 | # function called for preparing source code if needed 26 | # (you can apply patch etc here.) 27 | function prebuild_lerc() { 28 | cd $BUILD_lerc 29 | 30 | # check marker 31 | if [ -f .patched ]; then 32 | return 33 | fi 34 | 35 | touch .patched 36 | } 37 | 38 | function shouldbuild_lerc() { 39 | if [ ${STAGE_PATH}/lib/${LINK_liblerc} -nt $BUILD_lerc/.patched ]; then 40 | DO_BUILD=0 41 | fi 42 | } 43 | 44 | # function called to build the source code 45 | function build_lerc() { 46 | try mkdir -p $BUILD_PATH/lerc/build-$ARCH 47 | try cd $BUILD_PATH/lerc/build-$ARCH 48 | 49 | push_env 50 | 51 | try $CMAKE $BUILD_lerc . 52 | 53 | check_file_configuration CMakeCache.txt 54 | 55 | try $NINJA 56 | try $NINJA install 57 | 58 | try install_name_tool -id $STAGE_PATH/lib/$LINK_liblerc $STAGE_PATH/lib/$LINK_liblerc 59 | 60 | pop_env 61 | } 62 | 63 | # function called after all the compile have been done 64 | function postbuild_lerc() { 65 | verify_binary lib/$LINK_liblerc 66 | } 67 | 68 | # function to append information to config file 69 | function add_config_info_lerc() { 70 | append_to_config_file "# lerc-${VERSION_lerc}: ${DESC_lerc}" 71 | append_to_config_file "export VERSION_lerc=${VERSION_lerc}" 72 | append_to_config_file "export LINK_liblerc=${LINK_liblerc}" 73 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/libffi/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_libffi="Portable Foreign Function Interface library" 4 | 5 | # version of your package 6 | VERSION_libffi=3.4.2 7 | LINK_libffi=libffi.8.dylib 8 | 9 | # dependencies of this recipe 10 | DEPS_libffi=() 11 | 12 | # url of the package 13 | URL_libffi=https://github.com/libffi/libffi/releases/download/v${VERSION_libffi}/libffi-${VERSION_libffi}.tar.gz 14 | 15 | # md5 of the package 16 | MD5_libffi=294b921e6cf9ab0fbaea4b639f8fdbe8 17 | 18 | # default build path 19 | BUILD_libffi=$BUILD_PATH/libffi/$(get_directory $URL_libffi) 20 | 21 | # default recipe path 22 | RECIPE_libffi=$RECIPES_PATH/libffi 23 | 24 | # function called for preparing source code if needed 25 | # (you can apply patch etc here.) 26 | function prebuild_libffi() { 27 | cd $BUILD_libffi 28 | 29 | # check marker 30 | if [ -f .patched ]; then 31 | return 32 | fi 33 | 34 | patch_configure_file configure 35 | 36 | touch .patched 37 | } 38 | 39 | function shouldbuild_libffi() { 40 | # If lib is newer than the sourcecode skip build 41 | if [ ${STAGE_PATH}/lib/$LINK_libffi -nt $BUILD_libffi/.patched ]; then 42 | DO_BUILD=0 43 | fi 44 | } 45 | 46 | # function called to build the source code 47 | function build_libffi() { 48 | try rsync -a $BUILD_libffi/ $BUILD_PATH/libffi/build-$ARCH/ 49 | try cd $BUILD_PATH/libffi/build-$ARCH 50 | push_env 51 | 52 | 53 | try ${CONFIGURE} \ 54 | --disable-debug \ 55 | --enable-static=no 56 | 57 | check_file_configuration config.status 58 | try $MAKESMP 59 | try $MAKE install 60 | 61 | pop_env 62 | } 63 | 64 | # function called after all the compile have been done 65 | function postbuild_libffi() { 66 | verify_binary lib/$LINK_libffi 67 | } 68 | 69 | # function to append information to config file 70 | function add_config_info_libffi() { 71 | append_to_config_file "# libffi-${VERSION_libffi}: ${DESC_libffi}" 72 | append_to_config_file "export VERSION_libffi=${VERSION_libffi}" 73 | append_to_config_file "export LINK_libffi=${LINK_libffi}" 74 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/libgeotiff/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_libgeotiff="Library and tools for dealing with GeoTIFF" 4 | 5 | # version of your package 6 | VERSION_libgeotiff=1.7.0 7 | 8 | # dependencies of this recipe 9 | DEPS_libgeotiff=(proj libtiff) 10 | 11 | # url of the package 12 | URL_libgeotiff=https://github.com/OSGeo/libgeotiff/releases/download/${VERSION_libgeotiff}/libgeotiff-${VERSION_libgeotiff}.tar.gz 13 | 14 | # md5 of the package 15 | MD5_libgeotiff=e57b69098d70a008ddfc65b675cbfcf4 16 | 17 | # default build path 18 | BUILD_libgeotiff=$BUILD_PATH/libgeotiff/$(get_directory $URL_libgeotiff) 19 | 20 | # default recipe path 21 | RECIPE_libgeotiff=$RECIPES_PATH/libgeotiff 22 | 23 | # function called for preparing source code if needed 24 | # (you can apply patch etc here.) 25 | function prebuild_libgeotiff() { 26 | cd $BUILD_libgeotiff 27 | 28 | # check marker 29 | if [ -f .patched ]; then 30 | return 31 | fi 32 | 33 | touch .patched 34 | } 35 | 36 | # function called before build_libgeotiff 37 | # set DO_BUILD=0 if you know that it does not require a rebuild 38 | function shouldbuild_libgeotiff() { 39 | # If lib is newer than the sourcecode skip build 40 | if [ "${STAGE_PATH}/lib/libgeotiff.a" -nt $BUILD_libgeotiff/.patched ]; then 41 | DO_BUILD=0 42 | fi 43 | } 44 | 45 | # function called to build the source code 46 | function build_libgeotiff() { 47 | try mkdir -p $BUILD_PATH/libgeotiff/build-$ARCH 48 | try cd $BUILD_PATH/libgeotiff/build-$ARCH 49 | 50 | push_env 51 | 52 | # TODO why this is only static library!?? 53 | try $CMAKE $BUILD_libgeotiff . 54 | check_file_configuration CMakeCache.txt 55 | 56 | try $NINJA 57 | try $NINJA install 58 | 59 | pop_env 60 | } 61 | 62 | # function called after all the compile have been done 63 | function postbuild_libgeotiff() { 64 | verify_binary "lib/libgeotiff.a" 65 | } 66 | 67 | # function to append information to config file 68 | function add_config_info_libgeotiff() { 69 | append_to_config_file "# libgeotiff-${VERSION_libgeotiff}: ${DESC_libgeotiff}" 70 | append_to_config_file "export VERSION_libgeotiff=${VERSION_libgeotiff}" 71 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/libmpc/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_libmpc="C library for the arithmetic of high precision complex numbers" 4 | 5 | # version of your package 6 | VERSION_libmpc=1.1.0 7 | LINK_libmpc=libmpc.3.dylib 8 | 9 | # dependencies of this recipe 10 | DEPS_libmpc=(gmp mpfr) 11 | 12 | # url of the package 13 | URL_libmpc=https://ftp.gnu.org/gnu/mpc/mpc-$VERSION_libmpc.tar.gz 14 | 15 | # md5 of the package 16 | MD5_libmpc=4125404e41e482ec68282a2e687f6c73 17 | 18 | # default build path 19 | BUILD_libmpc=$BUILD_PATH/libmpc/$(get_directory $URL_libmpc) 20 | 21 | # default recipe path 22 | RECIPE_libmpc=$RECIPES_PATH/libmpc 23 | 24 | # function called for preparing source code if needed 25 | # (you can apply patch etc here.) 26 | function prebuild_libmpc() { 27 | cd $BUILD_libmpc 28 | 29 | # check marker 30 | if [ -f .patched ]; then 31 | return 32 | fi 33 | 34 | patch_configure_file configure 35 | 36 | touch .patched 37 | } 38 | 39 | function shouldbuild_libmpc() { 40 | # If lib is newer than the sourcecode skip build 41 | if [ ${STAGE_PATH}/lib/$LINK_libmpc -nt $BUILD_libmpc/.patched ]; then 42 | DO_BUILD=0 43 | fi 44 | } 45 | 46 | # function called to build the source code 47 | function build_libmpc() { 48 | try rsync -a $BUILD_libmpc/ $BUILD_PATH/libmpc/build-$ARCH/ 49 | try cd $BUILD_PATH/libmpc/build-$ARCH 50 | push_env 51 | 52 | try ${CONFIGURE} \ 53 | --disable-dependency-tracking \ 54 | --with-gmp=$STAGE_PATH \ 55 | --with-mpfr=$STAGE_PATH 56 | 57 | check_file_configuration config.status 58 | try $MAKESMP 59 | try $MAKESMP install 60 | 61 | pop_env 62 | } 63 | 64 | # function called after all the compile have been done 65 | function postbuild_libmpc() { 66 | verify_binary lib/$LINK_libmpc 67 | } 68 | 69 | # function to append information to config file 70 | function add_config_info_libmpc() { 71 | append_to_config_file "# libmpc-${VERSION_libmpc}: ${DESC_libmpc}" 72 | append_to_config_file "export VERSION_libmpc=${VERSION_libmpc}" 73 | append_to_config_file "export LINK_libmpc=${LINK_libmpc}" 74 | } 75 | -------------------------------------------------------------------------------- /qgis_deps/recipes/libomp/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_libomp="LLVM's OpenMP runtime library" 4 | 5 | # version of your package 6 | VERSION_libomp=10.0.0 7 | 8 | LINK_libomp=libomp.dylib 9 | 10 | # dependencies of this recipe 11 | DEPS_libomp=() 12 | 13 | # url of the package 14 | URL_libomp=https://github.com/llvm/llvm-project/releases/download/llvmorg-$VERSION_libomp/openmp-$VERSION_libomp.src.tar.xz 15 | 16 | # md5 of the package 17 | MD5_libomp=464bbf25632f71b4c0cd23e7dd7ddad9 18 | 19 | # default build path 20 | BUILD_libomp=$BUILD_PATH/libomp/$(get_directory $URL_libomp) 21 | 22 | # default recipe path 23 | RECIPE_libomp=$RECIPES_PATH/libomp 24 | 25 | # function called for preparing source code if needed 26 | # (you can apply patch etc here.) 27 | function prebuild_libomp() { 28 | cd $BUILD_libomp 29 | 30 | # check marker 31 | if [ -f .patched ]; then 32 | return 33 | fi 34 | 35 | touch .patched 36 | } 37 | 38 | function shouldbuild_libomp() { 39 | if [ ${STAGE_PATH}/lib/${LINK_libomp} -nt $BUILD_libomp/.patched ]; then 40 | DO_BUILD=0 41 | fi 42 | } 43 | 44 | # function called to build the source code 45 | function build_libomp() { 46 | try mkdir -p $BUILD_PATH/libomp/build-$ARCH 47 | try cd $BUILD_PATH/libomp/build-$ARCH 48 | 49 | push_env 50 | 51 | try $CMAKE \ 52 | -DLIBOMP_INSTALL_ALIASES=OFF \ 53 | $BUILD_libomp . 54 | check_file_configuration CMakeCache.txt 55 | 56 | try $NINJA 57 | try $NINJA install 58 | 59 | install_name_tool -id ${STAGE_PATH}/lib/${LINK_libomp} ${STAGE_PATH}/lib/${LINK_libomp} 60 | 61 | pop_env 62 | } 63 | 64 | # function called after all the compile have been done 65 | function postbuild_libomp() { 66 | verify_binary lib/$LINK_libomp 67 | } 68 | 69 | # function to append information to config file 70 | function add_config_info_libomp() { 71 | append_to_config_file "# libomp-${VERSION_libomp}: ${DESC_libomp}" 72 | append_to_config_file "export VERSION_libomp=${VERSION_libomp}" 73 | append_to_config_file "export LINK_libomp=${LINK_libomp}" 74 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/libssh2/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_libssh2="SSH protocol" 4 | 5 | # version of your package 6 | VERSION_libssh2=1.9.0 7 | 8 | LINK_libssh2=libssh2.1.dylib 9 | 10 | # dependencies of this recipe 11 | DEPS_libssh2=(openssl zlib) 12 | 13 | 14 | # url of the package 15 | URL_libssh2=https://libssh2.org/download/libssh2-$VERSION_libssh2.tar.gz 16 | 17 | # md5 of the package 18 | MD5_libssh2=1beefafe8963982adc84b408b2959927 19 | 20 | # default build path 21 | BUILD_libssh2=$BUILD_PATH/libssh2/$(get_directory $URL_libssh2) 22 | 23 | # default recipe path 24 | RECIPE_libssh2=$RECIPES_PATH/libssh2 25 | 26 | # function called for preparing source code if needed 27 | # (you can apply patch etc here.) 28 | function prebuild_libssh2() { 29 | cd $BUILD_libssh2 30 | 31 | # check marker 32 | if [ -f .patched ]; then 33 | return 34 | fi 35 | 36 | patch_configure_file configure 37 | 38 | touch .patched 39 | } 40 | 41 | function shouldbuild_libssh2() { 42 | if [ ${STAGE_PATH}/lib/${LINK_libssh2} -nt $BUILD_libssh2/.patched ]; then 43 | DO_BUILD=0 44 | fi 45 | } 46 | 47 | # function called to build the source code 48 | function build_libssh2() { 49 | try rsync -a $BUILD_libssh2/ $BUILD_PATH/libssh2/build-$ARCH/ 50 | try cd $BUILD_PATH/libssh2/build-$ARCH 51 | push_env 52 | 53 | try ${CONFIGURE} \ 54 | --disable-debug \ 55 | --disable-dependency-tracking \ 56 | --disable-silent-rules \ 57 | --disable-examples-build \ 58 | --with-openssl \ 59 | --with-libz \ 60 | --with-libssl-prefix=${STAGE_PATH} 61 | 62 | check_file_configuration config.status 63 | try $MAKESMP 64 | try $MAKESMP install 65 | 66 | pop_env 67 | } 68 | 69 | # function called after all the compile have been done 70 | function postbuild_libssh2() { 71 | verify_binary lib/$LINK_libssh2 72 | } 73 | 74 | # function to append information to config file 75 | function add_config_info_libssh2() { 76 | append_to_config_file "# libssh2-${VERSION_libssh2}: ${DESC_libssh2}" 77 | append_to_config_file "export VERSION_libssh2=${VERSION_libssh2}" 78 | append_to_config_file "export LINK_libssh2=${LINK_libssh2}" 79 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/libtasn1/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_libtasn1="ASN.1 structure parser library" 4 | 5 | # version of your package 6 | VERSION_libtasn1=4.16.0 7 | 8 | LINK_libtasn1=libtasn1.6.dylib 9 | 10 | # dependencies of this recipe 11 | DEPS_libtasn1=() 12 | 13 | # url of the package 14 | URL_libtasn1=https://ftp.gnu.org/gnu/libtasn1/libtasn1-${VERSION_libtasn1}.tar.gz 15 | 16 | # md5 of the package 17 | MD5_libtasn1=531208de3729d42e2af0a32890f08736 18 | 19 | # default build path 20 | BUILD_libtasn1=$BUILD_PATH/libtasn1/$(get_directory $URL_libtasn1) 21 | 22 | # default recipe path 23 | RECIPE_libtasn1=$RECIPES_PATH/libtasn1 24 | 25 | # function called for preparing source code if needed 26 | # (you can apply patch etc here.) 27 | function prebuild_libtasn1() { 28 | cd $BUILD_libtasn1 29 | 30 | # check marker 31 | if [ -f .patched ]; then 32 | return 33 | fi 34 | 35 | touch .patched 36 | } 37 | 38 | function shouldbuild_libtasn1() { 39 | # If lib is newer than the sourcecode skip build 40 | if [ ${STAGE_PATH}/lib/$LINK_libtasn1 -nt $BUILD_libtasn1/.patched ]; then 41 | DO_BUILD=0 42 | fi 43 | } 44 | 45 | # function called to build the source code 46 | function build_libtasn1() { 47 | try rsync -a $BUILD_libtasn1/ $BUILD_PATH/libtasn1/build-$ARCH/ 48 | try cd $BUILD_PATH/libtasn1/build-$ARCH 49 | push_env 50 | 51 | export CFLAGS="$CFLAGS -O2 -DPIC" 52 | patch_configure_file configure 53 | 54 | try ${CONFIGURE} --disable-debug 55 | 56 | check_file_configuration config.status 57 | 58 | try $MAKESMP 59 | try $MAKESMP install 60 | 61 | pop_env 62 | } 63 | 64 | # function called after all the compile have been done 65 | function postbuild_libtasn1() { 66 | verify_binary lib/$LINK_libtasn1 67 | } 68 | 69 | # function to append information to config file 70 | function add_config_info_libtasn1() { 71 | append_to_config_file "# libtasn1-${VERSION_libtasn1}: ${DESC_libtasn1}" 72 | append_to_config_file "export VERSION_libtasn1=${VERSION_libtasn1}" 73 | append_to_config_file "export LINK_libtasn1=${LINK_libtasn1}" 74 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/libtool/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_libtool="Library to extract data from Excel .xls files" 4 | 5 | # version of your package 6 | VERSION_libtool=2.4.6 7 | LINK_libltdl=libltdl.7.dylib 8 | 9 | # dependencies of this recipe 10 | DEPS_libtool=() 11 | 12 | # url of the package 13 | URL_libtool=https://ftp.gnu.org/gnu/libtool/libtool-${VERSION_libtool}.tar.xz 14 | 15 | # md5 of the package 16 | MD5_libtool=1bfb9b923f2c1339b4d2ce1807064aa5 17 | 18 | # default build path 19 | BUILD_libtool=$BUILD_PATH/libtool/$(get_directory $URL_libtool) 20 | 21 | # default recipe path 22 | RECIPE_libtool=$RECIPES_PATH/libtool 23 | 24 | # function called for preparing source code if needed 25 | # (you can apply patch etc here.) 26 | function prebuild_libtool() { 27 | cd $BUILD_libtool 28 | 29 | # check marker 30 | if [ -f .patched ]; then 31 | return 32 | fi 33 | 34 | patch_configure_file configure 35 | 36 | touch .patched 37 | } 38 | 39 | function shouldbuild_libtool() { 40 | # If lib is newer than the sourcecode skip build 41 | if [ ${STAGE_PATH}/lib/$LINK_libltdl -nt $BUILD_libtool/.patched ]; then 42 | DO_BUILD=0 43 | fi 44 | } 45 | 46 | # function called to build the source code 47 | function build_libtool() { 48 | try rsync -a $BUILD_libtool/ $BUILD_PATH/libtool/build-$ARCH/ 49 | try cd $BUILD_PATH/libtool/build-$ARCH 50 | push_env 51 | 52 | try ${CONFIGURE} \ 53 | --disable-debug \ 54 | --program-prefix=g \ 55 | --enable-ltdl-install 56 | 57 | check_file_configuration config.status 58 | try $MAKESMP 59 | try $MAKESMP install 60 | 61 | pop_env 62 | } 63 | 64 | # function called after all the compile have been done 65 | function postbuild_libtool() { 66 | verify_binary lib/$LINK_libltdl 67 | } 68 | 69 | # function to append information to config file 70 | function add_config_info_libtool() { 71 | append_to_config_file "# libtool-${VERSION_libtool}: ${DESC_libtool}" 72 | append_to_config_file "export VERSION_libtool=${VERSION_libtool}" 73 | append_to_config_file "export LINK_libltdl=${LINK_libltdl}" 74 | } 75 | -------------------------------------------------------------------------------- /qgis_deps/recipes/libunistring/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_libunistring="C string library for manipulating Unicode strings" 4 | 5 | # version of your package 6 | VERSION_libunistring=0.9.10 7 | 8 | LINK_libunistring=libunistring.2.dylib 9 | 10 | # dependencies of this recipe 11 | DEPS_libunistring=() 12 | 13 | # url of the package 14 | URL_libunistring=https://ftp.gnu.org/gnu/libunistring/libunistring-$VERSION_libunistring.tar.xz 15 | 16 | # md5 of the package 17 | MD5_libunistring=db08bb384e81968957f997ec9808926e 18 | 19 | # default build path 20 | BUILD_libunistring=$BUILD_PATH/libunistring/$(get_directory $URL_libunistring) 21 | 22 | # default recipe path 23 | RECIPE_libunistring=$RECIPES_PATH/libunistring 24 | 25 | # function called for preparing source code if needed 26 | # (you can apply patch etc here.) 27 | function prebuild_libunistring() { 28 | cd $BUILD_libunistring 29 | 30 | # check marker 31 | if [ -f .patched ]; then 32 | return 33 | fi 34 | 35 | patch_configure_file configure 36 | 37 | touch .patched 38 | } 39 | 40 | function shouldbuild_libunistring() { 41 | if [ ${STAGE_PATH}/lib/${LINK_libunistring} -nt $BUILD_libunistring/.patched ]; then 42 | DO_BUILD=0 43 | fi 44 | } 45 | 46 | # function called to build the source code 47 | function build_libunistring() { 48 | try rsync -a $BUILD_libunistring/ $BUILD_PATH/libunistring/build-$ARCH/ 49 | try cd $BUILD_PATH/libunistring/build-$ARCH 50 | push_env 51 | 52 | try ${CONFIGURE} \ 53 | --disable-dependency-tracking \ 54 | --disable-silent-rules 55 | 56 | check_file_configuration config.status 57 | try $MAKESMP 58 | try $MAKESMP install 59 | 60 | pop_env 61 | } 62 | 63 | # function called after all the compile have been done 64 | function postbuild_libunistring() { 65 | verify_binary lib/$LINK_libunistring 66 | } 67 | 68 | # function to append information to config file 69 | function add_config_info_libunistring() { 70 | append_to_config_file "# libunistring-${VERSION_libunistring}: ${DESC_libunistring}" 71 | append_to_config_file "export VERSION_libunistring=${VERSION_libunistring}" 72 | append_to_config_file "export LINK_libunistring=${LINK_libunistring}" 73 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/libyaml/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_libyaml="YAML parser" 4 | 5 | # version of your package 6 | VERSION_libyaml=0.2.5 7 | 8 | LINK_libyaml=libyaml-0.2.dylib 9 | 10 | # dependencies of this recipe 11 | DEPS_libyaml=() 12 | 13 | # url of the package 14 | URL_libyaml=https://github.com/yaml/libyaml/archive/${VERSION_libyaml}.tar.gz 15 | 16 | # md5 of the package 17 | MD5_libyaml=163fc1e22153d3e2cebfe5cbb43a1769 18 | 19 | # default build path 20 | BUILD_libyaml=$BUILD_PATH/libyaml/$(get_directory $URL_libyaml) 21 | 22 | # default recipe path 23 | RECIPE_libyaml=$RECIPES_PATH/libyaml 24 | 25 | # function called for preparing source code if needed 26 | # (you can apply patch etc here.) 27 | function prebuild_libyaml() { 28 | cd $BUILD_libyaml 29 | 30 | # check marker 31 | if [ -f .patched ]; then 32 | return 33 | fi 34 | 35 | touch .patched 36 | } 37 | 38 | function shouldbuild_libyaml() { 39 | # If lib is newer than the sourcecode skip build 40 | if [ ${STAGE_PATH}/lib/$LINK_libyaml -nt $BUILD_libyaml/.patched ]; then 41 | DO_BUILD=0 42 | fi 43 | } 44 | 45 | # function called to build the source code 46 | function build_libyaml() { 47 | try rsync -a $BUILD_libyaml/ $BUILD_PATH/libyaml/build-$ARCH/ 48 | try cd $BUILD_PATH/libyaml/build-$ARCH 49 | push_env 50 | 51 | try ./bootstrap 52 | patch_configure_file configure 53 | try ${CONFIGURE} --disable-dependency-tracking 54 | 55 | check_file_configuration config.status 56 | try $MAKESMP 57 | try $MAKESMP install 58 | 59 | pop_env 60 | } 61 | 62 | # function called after all the compile have been done 63 | function postbuild_libyaml() { 64 | verify_binary lib/$LINK_libyaml 65 | } 66 | 67 | # function to append information to config file 68 | function add_config_info_libyaml() { 69 | append_to_config_file "# libyaml-${VERSION_libyaml}: ${DESC_libyaml}" 70 | append_to_config_file "export VERSION_libyaml=${VERSION_libyaml}" 71 | append_to_config_file "export LINK_libyaml=${LINK_libyaml}" 72 | } 73 | -------------------------------------------------------------------------------- /qgis_deps/recipes/mpfr/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_mpfr="C library for multiple-precision floating-point computations" 4 | 5 | # version of your package 6 | VERSION_mpfr=4.1.0 7 | LINK_mpfr=libmpfr.6.dylib 8 | 9 | # dependencies of this recipe 10 | DEPS_mpfr=(gmp) 11 | 12 | # url of the package 13 | URL_mpfr=https://ftp.gnu.org/gnu/mpfr/mpfr-$VERSION_mpfr.tar.xz 14 | 15 | # md5 of the package 16 | MD5_mpfr=bdd3d5efba9c17da8d83a35ec552baef 17 | 18 | # default build path 19 | BUILD_mpfr=$BUILD_PATH/mpfr/$(get_directory $URL_mpfr) 20 | 21 | # default recipe path 22 | RECIPE_mpfr=$RECIPES_PATH/mpfr 23 | 24 | # function called for preparing source code if needed 25 | # (you can apply patch etc here.) 26 | function prebuild_mpfr() { 27 | cd $BUILD_mpfr 28 | 29 | # check marker 30 | if [ -f .patched ]; then 31 | return 32 | fi 33 | 34 | patch_configure_file configure 35 | 36 | touch .patched 37 | } 38 | 39 | function shouldbuild_mpfr() { 40 | # If lib is newer than the sourcecode skip build 41 | if [ ${STAGE_PATH}/lib/$LINK_mpfr -nt $BUILD_mpfr/.patched ]; then 42 | DO_BUILD=0 43 | fi 44 | } 45 | 46 | # function called to build the source code 47 | function build_mpfr() { 48 | try rsync -a $BUILD_mpfr/ $BUILD_PATH/mpfr/build-$ARCH/ 49 | try cd $BUILD_PATH/mpfr/build-$ARCH 50 | push_env 51 | 52 | try ${CONFIGURE} \ 53 | --disable-dependency-tracking \ 54 | --disable-silent-rules 55 | 56 | check_file_configuration config.status 57 | try $MAKESMP 58 | try $MAKESMP install 59 | 60 | pop_env 61 | } 62 | 63 | # function called after all the compile have been done 64 | function postbuild_mpfr() { 65 | verify_binary lib/$LINK_mpfr 66 | } 67 | 68 | # function to append information to config file 69 | function add_config_info_mpfr() { 70 | append_to_config_file "# mpfr-${VERSION_mpfr}: ${DESC_mpfr}" 71 | append_to_config_file "export VERSION_mpfr=${VERSION_mpfr}" 72 | append_to_config_file "export LINK_mpfr=${LINK_mpfr}" 73 | } 74 | -------------------------------------------------------------------------------- /qgis_deps/recipes/netcdf/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_netcdf="Libraries and data formats for array-oriented scientific data" 4 | 5 | # version of your package 6 | VERSION_netcdf=4.7.3 7 | LINK_netcdf=libnetcdf.15.dylib 8 | 9 | # dependencies of this recipe 10 | DEPS_netcdf=(libcurl) 11 | 12 | # url of the package 13 | URL_netcdf=https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-c-${VERSION_netcdf}.tar.gz 14 | 15 | # md5 of the package 16 | MD5_netcdf=9e1d7f13c2aef921c854d87037bcbd96 17 | 18 | # default build path 19 | BUILD_netcdf=$BUILD_PATH/netcdf/$(get_directory $URL_netcdf) 20 | 21 | # default recipe path 22 | RECIPE_netcdf=$RECIPES_PATH/netcdf 23 | 24 | # function called for preparing source code if needed 25 | # (you can apply patch etc here.) 26 | function prebuild_netcdf() { 27 | cd $BUILD_netcdf 28 | 29 | # check marker 30 | if [ -f .patched ]; then 31 | return 32 | fi 33 | 34 | touch .patched 35 | } 36 | 37 | function shouldbuild_netcdf() { 38 | # If lib is newer than the sourcecode skip build 39 | if [ ${STAGE_PATH}/lib/$LINK_netcdf -nt $BUILD_netcdf/.patched ]; then 40 | DO_BUILD=0 41 | fi 42 | } 43 | 44 | # function called to build the source code 45 | function build_netcdf() { 46 | try mkdir -p $BUILD_PATH/netcdf/build-$ARCH 47 | try cd $BUILD_PATH/netcdf/build-$ARCH 48 | push_env 49 | 50 | try ${CMAKE} $BUILD_netcdf 51 | check_file_configuration CMakeCache.txt 52 | 53 | try $NINJA 54 | try $NINJA install 55 | 56 | try install_name_tool -id $STAGE_PATH/lib/$LINK_netcdf $STAGE_PATH/lib/$LINK_netcdf 57 | 58 | pop_env 59 | } 60 | 61 | # function called after all the compile have been done 62 | function postbuild_netcdf() { 63 | verify_binary lib/$LINK_netcdf 64 | } 65 | 66 | # function to append information to config file 67 | function add_config_info_netcdf() { 68 | append_to_config_file "# netcdf-${VERSION_netcdf}: ${DESC_netcdf}" 69 | append_to_config_file "export VERSION_netcdf=${VERSION_netcdf}" 70 | append_to_config_file "export LINK_netcdf=${LINK_netcdf}" 71 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/openjpeg/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_openjpeg="Image manipulation library" 4 | 5 | # version of your package 6 | VERSION_openjpeg=2.3.1 7 | 8 | LINK_openjpeg=libopenjp2.7.dylib 9 | 10 | # dependencies of this recipe 11 | DEPS_openjpeg=( 12 | png 13 | libtiff 14 | little_cms2 15 | ) 16 | 17 | # url of the package 18 | URL_openjpeg=https://github.com/uclouvain/openjpeg/archive/v${VERSION_openjpeg}.tar.gz 19 | 20 | # md5 of the package 21 | MD5_openjpeg=3b9941dc7a52f0376694adb15a72903f 22 | 23 | # default build path 24 | BUILD_openjpeg=$BUILD_PATH/openjpeg/$(get_directory $URL_openjpeg) 25 | 26 | # default recipe path 27 | RECIPE_openjpeg=$RECIPES_PATH/openjpeg 28 | 29 | # function called for preparing source code if needed 30 | # (you can apply patch etc here.) 31 | function prebuild_openjpeg() { 32 | cd $BUILD_openjpeg 33 | 34 | # check marker 35 | if [ -f .patched ]; then 36 | return 37 | fi 38 | 39 | touch .patched 40 | } 41 | 42 | function shouldbuild_openjpeg() { 43 | # If lib is newer than the sourcecode skip build 44 | if [ ${STAGE_PATH}/lib/$LINK_openjpeg -nt $BUILD_openjpeg/.patched ]; then 45 | DO_BUILD=0 46 | fi 47 | } 48 | 49 | # function called to build the source code 50 | function build_openjpeg() { 51 | try rsync -a $BUILD_openjpeg/ $BUILD_PATH/openjpeg/build-$ARCH/ 52 | try cd $BUILD_PATH/openjpeg/build-$ARCH 53 | push_env 54 | 55 | try ${CMAKE} \ 56 | -DBUILD_DOC=OFF \ 57 | $BUILD_openjpeg 58 | check_file_configuration CMakeCache.txt 59 | 60 | try $NINJA 61 | try $NINJA install 62 | 63 | install_name_tool -id $STAGE_PATH/lib/$LINK_openjpeg $STAGE_PATH/lib/$LINK_openjpeg 64 | 65 | pop_env 66 | } 67 | 68 | # function called after all the compile have been done 69 | function postbuild_openjpeg() { 70 | verify_binary lib/$LINK_openjpeg 71 | } 72 | 73 | # function to append information to config file 74 | function add_config_info_openjpeg() { 75 | append_to_config_file "# openjpeg-${VERSION_openjpeg}: ${DESC_openjpeg}" 76 | append_to_config_file "export VERSION_openjpeg=${VERSION_openjpeg}" 77 | append_to_config_file "export LINK_openjpeg=${LINK_openjpeg}" 78 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/pcre/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_pcre="Perl compatible regular expressions library" 4 | 5 | # version of your package 6 | VERSION_pcre=8.44 7 | LINK_pcre=libpcre.1.dylib 8 | 9 | # dependencies of this recipe 10 | DEPS_pcre=( 11 | bz2 12 | zlib 13 | ) 14 | 15 | # url of the package 16 | URL_pcre=https://ftp.pcre.org/pub/pcre/pcre-$VERSION_pcre.tar.bz2 17 | 18 | # md5 of the package 19 | MD5_pcre=cf7326204cc46c755b5b2608033d9d24 20 | 21 | # default build path 22 | BUILD_pcre=$BUILD_PATH/pcre/$(get_directory $URL_pcre) 23 | 24 | # default recipe path 25 | RECIPE_pcre=$RECIPES_PATH/pcre 26 | 27 | # function called for preparing source code if needed 28 | # (you can apply patch etc here.) 29 | function prebuild_pcre() { 30 | cd $BUILD_pcre 31 | 32 | # check marker 33 | if [ -f .patched ]; then 34 | return 35 | fi 36 | 37 | patch_configure_file configure 38 | 39 | touch .patched 40 | } 41 | 42 | function shouldbuild_pcre() { 43 | # If lib is newer than the sourcecode skip build 44 | if [ ${STAGE_PATH}/lib/$LINK_pcre -nt $BUILD_pcre/.patched ]; then 45 | DO_BUILD=0 46 | fi 47 | } 48 | 49 | # function called to build the source code 50 | function build_pcre() { 51 | try rsync -a $BUILD_pcre/ $BUILD_PATH/pcre/build-$ARCH/ 52 | try cd $BUILD_PATH/pcre/build-$ARCH 53 | push_env 54 | 55 | try ${CONFIGURE} \ 56 | --disable-dependency-tracking \ 57 | --enable-utf8 \ 58 | --enable-pcre8 \ 59 | --enable-pcre16 \ 60 | --enable-pcre32 \ 61 | --enable-unicode-properties \ 62 | --enable-pcregrep-libz \ 63 | --enable-pcregrep-libbz2 64 | 65 | check_file_configuration config.status 66 | try $MAKESMP 67 | try $MAKESMP install 68 | 69 | pop_env 70 | } 71 | 72 | # function called after all the compile have been done 73 | function postbuild_pcre() { 74 | verify_binary lib/$LINK_pcre 75 | } 76 | 77 | # function to append information to config file 78 | function add_config_info_pcre() { 79 | append_to_config_file "# pcre-${VERSION_pcre}: ${DESC_pcre}" 80 | append_to_config_file "export VERSION_pcre=${VERSION_pcre}" 81 | append_to_config_file "export LINK_pcre=${LINK_pcre}" 82 | } 83 | -------------------------------------------------------------------------------- /qgis_deps/recipes/png/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_png="PNG Image library" 4 | 5 | # version of your package 6 | VERSION_png=1.6.37 7 | 8 | LINK_libpng=libpng16.16.dylib 9 | 10 | # dependencies of this recipe 11 | DEPS_png=() 12 | 13 | # url of the package 14 | URL_png=https://downloads.sourceforge.net/libpng/libpng-${VERSION_png}.tar.xz 15 | 16 | # md5 of the package 17 | MD5_png=015e8e15db1eecde5f2eb9eb5b6e59e9 18 | 19 | # default build path 20 | BUILD_png=$BUILD_PATH/png/$(get_directory $URL_png) 21 | 22 | # default recipe path 23 | RECIPE_png=$RECIPES_PATH/png 24 | 25 | # function called for preparing source code if needed 26 | # (you can apply patch etc here.) 27 | function prebuild_png() { 28 | cd $BUILD_png 29 | 30 | # check marker 31 | if [ -f .patched ]; then 32 | return 33 | fi 34 | 35 | patch_configure_file configure 36 | 37 | touch .patched 38 | } 39 | 40 | function shouldbuild_png() { 41 | # If lib is newer than the sourcecode skip build 42 | if [ ${STAGE_PATH}/lib/$LINK_libpng -nt $BUILD_png/.patched ]; then 43 | DO_BUILD=0 44 | fi 45 | } 46 | 47 | # function called to build the source code 48 | function build_png() { 49 | try rsync -a $BUILD_png/ $BUILD_PATH/png/build-$ARCH/ 50 | try cd $BUILD_PATH/png/build-$ARCH 51 | push_env 52 | 53 | try ${CONFIGURE} --disable-debug 54 | 55 | check_file_configuration config.status 56 | try $MAKESMP 57 | try $MAKESMP install 58 | 59 | pop_env 60 | } 61 | 62 | # function called after all the compile have been done 63 | function postbuild_png() { 64 | verify_binary lib/$LINK_libpng 65 | } 66 | 67 | # function to append information to config file 68 | function add_config_info_png() { 69 | append_to_config_file "# png-${VERSION_png}: ${DESC_png}" 70 | append_to_config_file "export VERSION_png=${VERSION_png}" 71 | append_to_config_file "export LINK_libpng=${LINK_libpng}" 72 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/proj_data/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_proj_data="Cartographic proj library data" 4 | 5 | # version of your package 6 | VERSION_proj_data_major=1.7 7 | VERSION_proj_data=${VERSION_proj_data_major}.0 8 | 9 | # dependencies of this recipe 10 | DEPS_proj_data=(proj) 11 | 12 | # url of the package 13 | URL_proj_data=https://github.com/OSGeo/PROJ-data/archive/refs/tags/${VERSION_proj_data}.zip 14 | 15 | # md5 of the package 16 | MD5_proj_data=6bef1715b34a3048240a0536fc85a10c 17 | 18 | # default build path 19 | BUILD_proj_data=$BUILD_PATH/proj_data/$(get_directory $URL_proj_data) 20 | 21 | # default recipe path 22 | RECIPE_proj_data=$RECIPES_PATH/proj_data 23 | 24 | # function called for preparing source code if needed 25 | # (you can apply patch etc here.) 26 | function prebuild_proj_data() { 27 | cd $BUILD_proj_data 28 | 29 | # check marker 30 | if [ -f .patched ]; then 31 | return 32 | fi 33 | 34 | touch .patched 35 | } 36 | 37 | function shouldbuild_proj_data() { 38 | if [ ${STAGE_PATH}/share/proj/README.DATA -nt $BUILD_proj_data/.patched ]; then 39 | DO_BUILD=0 40 | fi 41 | } 42 | 43 | # function called to build the source code 44 | function build_proj_data() { 45 | try mkdir -p $BUILD_PATH/proj_data/build-$ARCH 46 | try cd $BUILD_PATH/proj_data/build-$ARCH 47 | 48 | push_env 49 | 50 | try $CMAKE $BUILD_proj_data . 51 | 52 | check_file_configuration CMakeCache.txt 53 | 54 | try $NINJA dist 55 | 56 | mkdir -p install 57 | cd install 58 | try tar -zxf ../proj-data-${VERSION_proj_data_major}.tar.gz 59 | try cp -R * $STAGE_PATH/share/proj/ 60 | 61 | pop_env 62 | } 63 | 64 | # function called after all the compile have been done 65 | function postbuild_proj_data() { 66 | : 67 | } 68 | 69 | # function to append information to config file 70 | function add_config_info_proj_data() { 71 | append_to_config_file "# proj_data-${VERSION_proj_data}: ${DESC_proj_data}" 72 | append_to_config_file "export VERSION_proj_data=${VERSION_proj_data}" 73 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/python_all/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_python_all="python and all its site-packages" 4 | 5 | # version of your package 6 | VERSION_python_all=${RELEASE_VERSION} 7 | 8 | # dependencies of this recipe 9 | DEPS_python_all=( 10 | python 11 | python_packages 12 | python_matplotlib 13 | python_llvmlite 14 | python_pymssql 15 | python_statsmodels 16 | python_gdal 17 | python_fiona 18 | python_opencv 19 | python_scikit_learn 20 | python_pyproj 21 | python_h5py 22 | python_netcdf4 23 | python_numpy 24 | python_owslib 25 | python_pyqt5 26 | python_qscintilla 27 | python_sip 28 | python_pillow 29 | python_scipy 30 | python_shapely 31 | python_psycopg2 32 | python_pysal 33 | python_patsy 34 | python_pandas 35 | ) 36 | 37 | # url of the package 38 | URL_python_all= 39 | 40 | # md5 of the package 41 | MD5_python_all= 42 | 43 | # default build path 44 | BUILD_python_all=$BUILD_PATH/python_all/python_all 45 | 46 | # default recipe path 47 | RECIPE_python_all=$RECIPES_PATH/python_all 48 | 49 | # function called for preparing source code if needed 50 | # (you can apply patch etc here.) 51 | function prebuild_python_all() { 52 | : 53 | } 54 | 55 | function shouldbuild_python_all() { 56 | : 57 | } 58 | 59 | # function called to build the source code 60 | function build_python_all() { 61 | rm -f ${STAGE_PATH}/bin/cmake 62 | } 63 | 64 | # function called after all the compile have been done 65 | function postbuild_python_all() { 66 | : 67 | } 68 | 69 | # function to append information to config file 70 | function add_config_info_python_all() { 71 | : 72 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/python_fiona/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_python_fiona="python fiona" 4 | 5 | # version of your package 6 | # keep in SYNC with proj receipt 7 | VERSION_python_fiona=1.8.13.post1 8 | 9 | # dependencies of this recipe 10 | DEPS_python_fiona=(python python_packages gdal python_gdal) 11 | 12 | # url of the package 13 | URL_python_fiona=https://github.com/Toblerity/Fiona/archive/${VERSION_python_fiona}.tar.gz 14 | 15 | # md5 of the package 16 | MD5_python_fiona=e82f8edfe95280339bea2cf9738a81f6 17 | 18 | # default build path 19 | BUILD_python_fiona=$BUILD_PATH/python_fiona/$(get_directory $URL_python_fiona) 20 | 21 | # default recipe path 22 | RECIPE_python_fiona=$RECIPES_PATH/python_fiona 23 | 24 | # function called for preparing source code if needed 25 | # (you can apply patch etc here.) 26 | function prebuild_python_fiona() { 27 | cd $BUILD_python_fiona 28 | 29 | # check marker 30 | if [ -f .patched ]; then 31 | return 32 | fi 33 | 34 | touch .patched 35 | } 36 | 37 | function shouldbuild_python_fiona() { 38 | # If lib is newer than the sourcecode skip build 39 | if python_package_installed fiona; then 40 | DO_BUILD=0 41 | fi 42 | } 43 | 44 | # function called to build the source code 45 | function build_python_fiona() { 46 | try rsync -a $BUILD_python_fiona/ $BUILD_PATH/python_fiona/build-$ARCH/ 47 | try cd $BUILD_PATH/python_fiona/build-$ARCH 48 | push_env 49 | 50 | export GDAL_CONFIG=$STAGE_PATH/bin/gdal-config 51 | DYLD_LIBRARY_PATH=$STAGE_PATH/lib try $PYTHON setup.py install 52 | unset GDAL_CONFIG 53 | 54 | pop_env 55 | } 56 | 57 | # function called after all the compile have been done 58 | function postbuild_python_fiona() { 59 | if ! python_package_installed_verbose fiona; then 60 | error "Missing python package fiona" 61 | fi 62 | } 63 | 64 | # function to append information to config file 65 | function add_config_info_python_fiona() { 66 | append_to_config_file "# python_fiona-${VERSION_python_fiona}: ${DESC_python_fiona}" 67 | append_to_config_file "export VERSION_python_fiona=${VERSION_python_fiona}" 68 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/python_gdal/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_python_gdal="GDAL binding for python" 4 | 5 | # version of your package 6 | # keep in SYNC with gdal receipt 7 | source $RECIPES_PATH/gdal/recipe.sh 8 | VERSION_python_gdal=${VERSION_gdal} 9 | 10 | # dependencies of this recipe 11 | DEPS_python_gdal=(python python_pyproj gdal python_packages ) 12 | 13 | # url of the package 14 | URL_python_gdal=${URL_gdal} 15 | 16 | # md5 of the package 17 | MD5_python_gdal=${MD5_gdal} 18 | 19 | # default build path 20 | BUILD_python_gdal=$BUILD_PATH/python_gdal/$(get_directory $URL_python_gdal) 21 | 22 | # default recipe path 23 | RECIPE_python_gdal=$RECIPES_PATH/python_gdal 24 | 25 | # function called for preparing source code if needed 26 | # (you can apply patch etc here.) 27 | function prebuild_python_gdal() { 28 | cd $BUILD_python_gdal 29 | 30 | # check marker 31 | if [ -f .patched ]; then 32 | return 33 | fi 34 | 35 | touch .patched 36 | } 37 | 38 | function shouldbuild_python_gdal() { 39 | # If lib is newer than the sourcecode skip build 40 | if python_package_installed osgeo; then 41 | DO_BUILD=0 42 | fi 43 | } 44 | 45 | # function called to build the source code 46 | function build_python_gdal() { 47 | try rsync -a $BUILD_python_gdal/ $BUILD_PATH/python_gdal/build-$ARCH/ 48 | try cd $BUILD_PATH/python_gdal/build-$ARCH 49 | push_env 50 | 51 | cd swig/python 52 | try ${SED} "s;gdal_config=../../apps/gdal-config;gdal_config=$STAGE_PATH/bin/gdal-config;g" setup.cfg 53 | try $PYTHON setup.py build 54 | try $PYTHON setup.py install 55 | 56 | pop_env 57 | } 58 | 59 | # function called after all the compile have been done 60 | function postbuild_python_gdal() { 61 | if ! python_package_installed_verbose osgeo; then 62 | error "Missing python package osgeo" 63 | fi 64 | } 65 | 66 | # function to append information to config file 67 | function add_config_info_python_gdal() { 68 | append_to_config_file "# python_gdal-${VERSION_python_gdal}: ${DESC_python_gdal}" 69 | append_to_config_file "export VERSION_python_gdal=${VERSION_python_gdal}" 70 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/python_h5py/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_python_h5py="Python binding of HDF5" 4 | 5 | # version of your package 6 | # need to keep in sync with hdf5 7 | VERSION_python_h5py=2.10.0 8 | 9 | # dependencies of this recipe 10 | DEPS_python_h5py=(python hdf5 python_numpy python_packages) 11 | 12 | # url of the package 13 | URL_python_h5py= 14 | 15 | # md5 of the package 16 | MD5_python_h5py= 17 | 18 | # default build path 19 | BUILD_python_h5py=$BUILD_PATH/python_h5py/v${VERSION_python_h5py} 20 | 21 | # default recipe path 22 | RECIPE_python_h5py=$RECIPES_PATH/python_h5py 23 | 24 | # function called for preparing source code if needed 25 | # (you can apply patch etc here.) 26 | function prebuild_python_h5py() { 27 | mkdir -p $BUILD_python_h5py 28 | cd $BUILD_python_h5py 29 | 30 | # check marker 31 | if [ -f .patched ]; then 32 | return 33 | fi 34 | 35 | touch .patched 36 | } 37 | 38 | function shouldbuild_python_h5py() { 39 | # If lib is newer than the sourcecode skip build 40 | if python_package_installed h5py; then 41 | DO_BUILD=0 42 | fi 43 | } 44 | 45 | # function called to build the source code 46 | function build_python_h5py() { 47 | try cd $BUILD_python_h5py 48 | push_env 49 | 50 | DYLD_LIBRARY_PATH=$STAGE_PATH/lib try $PIP_NO_BINARY h5py==${VERSION_python_h5py} 51 | 52 | pop_env 53 | } 54 | 55 | # function called after all the compile have been done 56 | function postbuild_python_h5py() { 57 | if ! python_package_installed_verbose h5py; then 58 | error "Missing python package h5py" 59 | fi 60 | } 61 | 62 | # function to append information to config file 63 | function add_config_info_python_h5py() { 64 | append_to_config_file "# python_h5py-${VERSION_python_h5py}: ${DESC_python_h5py}" 65 | append_to_config_file "export VERSION_python_h5py=${VERSION_python_h5py}" 66 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/python_matplotlib/setup.cfg: -------------------------------------------------------------------------------- 1 | [egg_info] 2 | 3 | [libs] 4 | # By default, Matplotlib builds with LTO, which may be slow if you re-compile 5 | # often, and don't need the space saving/speedup. 6 | #enable_lto = True 7 | # By default, Matplotlib downloads and builds its own copy of FreeType, and 8 | # builds its own copy of Qhull. You may set the following to True to instead 9 | # link against a system FreeType/Qhull. 10 | system_freetype = True 11 | #system_qhull = False 12 | 13 | [packages] 14 | # There are a number of data subpackages from Matplotlib that are 15 | # considered optional. All except 'tests' data (meaning the baseline 16 | # image files) are installed by default, but that can be changed here. 17 | #tests = False 18 | #sample_data = True 19 | 20 | [gui_support] 21 | # Matplotlib supports multiple GUI toolkits, known as backends. 22 | # The MacOSX backend requires the Cocoa headers included with XCode. 23 | # You can select whether to build it by uncommenting the following line. 24 | # It is never built on Linux or Windows, regardless of the config value. 25 | # 26 | #macosx = True 27 | 28 | [rc_options] 29 | # User-configurable options 30 | # 31 | # Default backend, one of: Agg, Cairo, GTK3Agg, GTK3Cairo, MacOSX, Pdf, Ps, 32 | # Qt4Agg, Qt5Agg, SVG, TkAgg, WX, WXAgg. 33 | # 34 | # The Agg, Ps, Pdf and SVG backends do not require external dependencies. Do 35 | # not choose MacOSX if you have disabled the relevant extension modules. The 36 | # default is determined by fallback. 37 | # 38 | #backend = Agg -------------------------------------------------------------------------------- /qgis_deps/recipes/python_numba/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_python_numba="A Just-In-Time Compiler for Numerical Functions in Python" 4 | 5 | # version of your package 6 | VERSION_python_numba=0.50.1 7 | 8 | # dependencies of this recipe 9 | DEPS_python_numba=(python python_packages python_numpy python_scipy python_llvmlite ) 10 | 11 | # url of the package 12 | URL_python_numba=https://github.com/numba/numba/archive/${VERSION_python_numba}.tar.gz 13 | 14 | # md5 of the package 15 | MD5_python_numba=0cfb6b45282f4d6b9793a17588de180b 16 | 17 | # default build path 18 | BUILD_python_numba=$BUILD_PATH/python_numba/$(get_directory $URL_python_numba) 19 | 20 | # default recipe path 21 | RECIPE_python_numba=$RECIPES_PATH/python_numba 22 | 23 | # function called for preparing source code if needed 24 | # (you can apply patch etc here.) 25 | function prebuild_python_numba() { 26 | cd $BUILD_python_numba 27 | 28 | # check marker 29 | if [ -f .patched ]; then 30 | return 31 | fi 32 | 33 | touch .patched 34 | } 35 | 36 | function shouldbuild_python_numba() { 37 | # If lib is newer than the sourcecode skip build 38 | if python_package_installed numba; then 39 | DO_BUILD=0 40 | fi 41 | } 42 | 43 | # function called to build the source code 44 | function build_python_numba() { 45 | try rsync -a $BUILD_python_numba/ $BUILD_PATH/python_numba/build-$ARCH/ 46 | try cd $BUILD_PATH/python_numba/build-$ARCH 47 | push_env 48 | 49 | DYLD_LIBRARY_PATH=$STAGE_PATH/lib try $PYTHON setup.py install 50 | 51 | pop_env 52 | } 53 | 54 | # function called after all the compile have been done 55 | function postbuild_python_numba() { 56 | if ! python_package_installed_verbose numba; then 57 | error "Missing python package numba" 58 | fi 59 | } 60 | 61 | # function to append information to config file 62 | function add_config_info_python_numba() { 63 | append_to_config_file "# python_numba-${VERSION_python_numba}: ${DESC_python_numba}" 64 | append_to_config_file "export VERSION_python_numba=${VERSION_python_numba}" 65 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/python_owslib/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_python_owslib="Python Open Geospatial Consortium (OGC) web service" 4 | 5 | # version of your package 6 | VERSION_python_owslib=0.19.2 7 | 8 | # dependencies of this recipe 9 | DEPS_python_owslib=(python python_pyproj python_gdal python_packages) 10 | 11 | # url of the package 12 | URL_python_owslib= 13 | 14 | # md5 of the package 15 | MD5_python_owslib= 16 | 17 | # default build path 18 | BUILD_python_owslib=$BUILD_PATH/python_owslib/v${VERSION_python_owslib} 19 | 20 | # default recipe path 21 | RECIPE_python_owslib=$RECIPES_PATH/python_owslib 22 | 23 | # function called for preparing source code if needed 24 | # (you can apply patch etc here.) 25 | function prebuild_python_owslib() { 26 | try mkdir -p $BUILD_python_owslib 27 | cd $BUILD_python_owslib 28 | 29 | # check marker 30 | if [ -f .patched ]; then 31 | return 32 | fi 33 | 34 | touch .patched 35 | } 36 | 37 | function shouldbuild_python_owslib() { 38 | # If lib is newer than the sourcecode skip build 39 | if python_package_installed owslib.wms; then 40 | DO_BUILD=0 41 | fi 42 | } 43 | 44 | # function called to build the source code 45 | function build_python_owslib() { 46 | try cd $BUILD_python_owslib 47 | push_env 48 | 49 | DYLD_LIBRARY_PATH=$STAGE_PATH/lib try $PIP_NO_BINARY owslib==${VERSION_python_owslib} 50 | 51 | pop_env 52 | } 53 | 54 | # function called after all the compile have been done 55 | function postbuild_python_owslib() { 56 | if ! python_package_installed_verbose owslib.wms; then 57 | error "Missing python package owslib.wms" 58 | fi 59 | } 60 | 61 | # function to append information to config file 62 | function add_config_info_python_owslib() { 63 | append_to_config_file "# python_owslib-${VERSION_python_owslib}: ${DESC_python_owslib}" 64 | append_to_config_file "export VERSION_python_owslib=${VERSION_python_owslib}" 65 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/python_pandas/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_python_pandas="python pandas" 4 | 5 | # version of your package 6 | VERSION_python_pandas=1.3.3 7 | 8 | # dependencies of this recipe 9 | DEPS_python_pandas=(python python_packages python_numpy) 10 | 11 | # url of the package 12 | URL_python_pandas=https://github.com/pandas-dev/pandas/archive/refs/tags/v${VERSION_python_pandas}.tar.gz 13 | 14 | # md5 of the package 15 | MD5_python_pandas=413a3efbd23832d48517b3091ff44800 16 | 17 | # default build path 18 | BUILD_python_pandas=$BUILD_PATH/python_pandas/$(get_directory $URL_python_pandas) 19 | 20 | # default recipe path 21 | RECIPE_python_pandas=$RECIPES_PATH/python_pandas 22 | 23 | # function called for preparing source code if needed 24 | # (you can apply patch etc here.) 25 | function prebuild_python_pandas() { 26 | cd $BUILD_python_pandas 27 | 28 | # check marker 29 | if [ -f .patched ]; then 30 | return 31 | fi 32 | 33 | touch .patched 34 | } 35 | 36 | function shouldbuild_python_pandas() { 37 | # If lib is newer than the sourcecode skip build 38 | if python_package_installed pandas; then 39 | DO_BUILD=0 40 | fi 41 | } 42 | 43 | # function called to build the source code 44 | function build_python_pandas() { 45 | try rsync -a $BUILD_python_pandas/ $BUILD_PATH/python_pandas/build-$ARCH/ 46 | try cd $BUILD_PATH/python_pandas/build-$ARCH 47 | push_env 48 | 49 | DYLD_LIBRARY_PATH=$STAGE_PATH/lib try $PYTHON setup.py install 50 | 51 | pop_env 52 | } 53 | 54 | # function called after all the compile have been done 55 | function postbuild_python_pandas() { 56 | if ! python_package_installed_verbose pandas; then 57 | error "Missing python package pandas" 58 | fi 59 | } 60 | 61 | # function to append information to config file 62 | function add_config_info_python_pandas() { 63 | append_to_config_file "# python_pandas-${VERSION_python_pandas}: ${DESC_python_pandas}" 64 | append_to_config_file "export VERSION_python_pandas=${VERSION_python_pandas}" 65 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/python_patsy/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_python_patsy="python patsy" 4 | 5 | # version of your package 6 | VERSION_python_patsy=0.5.1 7 | 8 | # dependencies of this recipe 9 | DEPS_python_patsy=(python python_packages python_numpy) 10 | 11 | # url of the package 12 | URL_python_patsy=https://github.com/pydata/patsy/archive/v${VERSION_python_patsy}.tar.gz 13 | 14 | # md5 of the package 15 | MD5_python_patsy=ff2bad29ac6d71ce265c4027b487fd63 16 | 17 | # default build path 18 | BUILD_python_patsy=$BUILD_PATH/python_patsy/$(get_directory $URL_python_patsy) 19 | 20 | # default recipe path 21 | RECIPE_python_patsy=$RECIPES_PATH/python_patsy 22 | 23 | # function called for preparing source code if needed 24 | # (you can apply patch etc here.) 25 | function prebuild_python_patsy() { 26 | cd $BUILD_python_patsy 27 | 28 | # check marker 29 | if [ -f .patched ]; then 30 | return 31 | fi 32 | 33 | touch .patched 34 | } 35 | 36 | function shouldbuild_python_patsy() { 37 | # If lib is newer than the sourcecode skip build 38 | if python_package_installed patsy; then 39 | DO_BUILD=0 40 | fi 41 | } 42 | 43 | # function called to build the source code 44 | function build_python_patsy() { 45 | try rsync -a $BUILD_python_patsy/ $BUILD_PATH/python_patsy/build-$ARCH/ 46 | try cd $BUILD_PATH/python_patsy/build-$ARCH 47 | push_env 48 | 49 | DYLD_LIBRARY_PATH=$STAGE_PATH/lib try $PYTHON setup.py install 50 | 51 | pop_env 52 | } 53 | 54 | # function called after all the compile have been done 55 | function postbuild_python_patsy() { 56 | if ! python_package_installed_verbose patsy; then 57 | error "Missing python package patsy" 58 | fi 59 | } 60 | 61 | # function to append information to config file 62 | function add_config_info_python_patsy() { 63 | append_to_config_file "# python_patsy-${VERSION_python_patsy}: ${DESC_python_patsy}" 64 | append_to_config_file "export VERSION_python_patsy=${VERSION_python_patsy}" 65 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/python_psycopg2/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_python_psycopg2="Python-PostgreSQL Database Adapter" 4 | 5 | # version of your package 6 | VERSION_python_psycopg2=2.8.5 7 | 8 | # dependencies of this recipe 9 | DEPS_python_psycopg2=(python postgres python_packages python_scipy) 10 | 11 | # url of the package 12 | URL_python_psycopg2= 13 | 14 | # md5 of the package 15 | MD5_python_psycopg2= 16 | 17 | # default build path 18 | BUILD_python_psycopg2=$BUILD_PATH/python_psycopg2/v${VERSION_python_psycopg2} 19 | 20 | # default recipe path 21 | RECIPE_python_psycopg2=$RECIPES_PATH/python_psycopg2 22 | 23 | # function called for preparing source code if needed 24 | # (you can apply patch etc here.) 25 | function prebuild_python_psycopg2() { 26 | try mkdir -p $BUILD_python_psycopg2 27 | cd $BUILD_python_psycopg2 28 | 29 | # check marker 30 | if [ -f .patched ]; then 31 | return 32 | fi 33 | 34 | touch .patched 35 | } 36 | 37 | function shouldbuild_python_psycopg2() { 38 | # If lib is newer than the sourcecode skip build 39 | if python_package_installed psycopg2; then 40 | DO_BUILD=0 41 | fi 42 | } 43 | 44 | # function called to build the source code 45 | function build_python_psycopg2() { 46 | try cd $BUILD_python_psycopg2 47 | push_env 48 | 49 | DYLD_LIBRARY_PATH=$STAGE_PATH/lib try $PIP_NO_BINARY psycopg2==${VERSION_python_psycopg2} 50 | 51 | pop_env 52 | } 53 | 54 | # function called after all the compile have been done 55 | function postbuild_python_psycopg2() { 56 | if ! python_package_installed_verbose psycopg2; then 57 | error "Missing python package psycopg2" 58 | fi 59 | } 60 | 61 | # function to append information to config file 62 | function add_config_info_python_psycopg2() { 63 | append_to_config_file "# python_psycopg2-${VERSION_python_psycopg2}: ${DESC_python_psycopg2}" 64 | append_to_config_file "export VERSION_python_psycopg2=${VERSION_python_psycopg2}" 65 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/python_pymssql/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_python_pymssql="Python binding of MSSQL" 4 | 5 | # version of your package 6 | # need to keep in sync with hdf5 7 | VERSION_python_pymssql=2.1.5 8 | 9 | # dependencies of this recipe 10 | DEPS_python_pymssql=(python freetds python_packages) 11 | 12 | # url of the package 13 | URL_python_pymssql= 14 | 15 | # md5 of the package 16 | MD5_python_pymssql= 17 | 18 | # default build path 19 | BUILD_python_pymssql=$BUILD_PATH/python_pymssql/v${VERSION_python_pymssql} 20 | 21 | # default recipe path 22 | RECIPE_python_pymssql=$RECIPES_PATH/python_pymssql 23 | 24 | # function called for preparing source code if needed 25 | # (you can apply patch etc here.) 26 | function prebuild_python_pymssql() { 27 | mkdir -p $BUILD_python_pymssql 28 | cd $BUILD_python_pymssql 29 | 30 | # check marker 31 | if [ -f .patched ]; then 32 | return 33 | fi 34 | 35 | touch .patched 36 | } 37 | 38 | function shouldbuild_python_pymssql() { 39 | # If lib is newer than the sourcecode skip build 40 | if python_package_installed pymssql; then 41 | DO_BUILD=0 42 | fi 43 | } 44 | 45 | # function called to build the source code 46 | function build_python_pymssql() { 47 | try cd $BUILD_python_pymssql 48 | push_env 49 | 50 | DYLD_LIBRARY_PATH=$STAGE_PATH/lib try $PIP_NO_BINARY pymssql==${VERSION_python_pymssql} 51 | 52 | pop_env 53 | } 54 | 55 | # function called after all the compile have been done 56 | function postbuild_python_pymssql() { 57 | if ! python_package_installed_verbose pymssql; then 58 | error "Missing python package pymssql" 59 | fi 60 | } 61 | 62 | # function to append information to config file 63 | function add_config_info_python_pymssql() { 64 | append_to_config_file "# python_pymssql-${VERSION_python_pymssql}: ${DESC_python_pymssql}" 65 | append_to_config_file "export VERSION_python_pymssql=${VERSION_python_pymssql}" 66 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/python_pyproj/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_python_pyproj="Proj binding for python" 4 | 5 | # version of your package 6 | # keep in SYNC with proj receipt 7 | VERSION_python_pyproj=3.2.0 8 | 9 | # dependencies of this recipe 10 | # depends on PyQt5 11 | DEPS_python_pyproj=(python openssl libtiff sqlite proj python_packages) 12 | 13 | # url of the package 14 | URL_python_pyproj=https://github.com/pyproj4/pyproj/archive/refs/tags/${VERSION_python_pyproj}.tar.gz 15 | 16 | # md5 of the package 17 | MD5_python_pyproj=dc548c8990e10bc52d012bae5a87030f 18 | 19 | # default build path 20 | BUILD_python_pyproj=$BUILD_PATH/python_pyproj/$(get_directory $URL_python_pyproj) 21 | 22 | # default recipe path 23 | RECIPE_python_pyproj=$RECIPES_PATH/python_pyproj 24 | 25 | # function called for preparing source code if needed 26 | # (you can apply patch etc here.) 27 | function prebuild_python_pyproj() { 28 | cd $BUILD_python_pyproj 29 | 30 | # check marker 31 | if [ -f .patched ]; then 32 | return 33 | fi 34 | 35 | touch .patched 36 | } 37 | 38 | function shouldbuild_python_pyproj() { 39 | # If lib is newer than the sourcecode skip build 40 | if python_package_installed pyproj; then 41 | DO_BUILD=0 42 | fi 43 | } 44 | 45 | # function called to build the source code 46 | function build_python_pyproj() { 47 | try rsync -a $BUILD_python_pyproj/ $BUILD_PATH/python_pyproj/build-$ARCH/ 48 | try cd $BUILD_PATH/python_pyproj/build-$ARCH 49 | push_env 50 | 51 | export PROJ_DIR=${STAGE_PATH} 52 | export PROJ_LIBDIR=${STAGE_PATH} 53 | export PROJ_INCDIR=${STAGE_PATH} 54 | 55 | try $PYTHON setup.py install 56 | 57 | pop_env 58 | } 59 | 60 | # function called after all the compile have been done 61 | function postbuild_python_pyproj() { 62 | if ! python_package_installed_verbose pyproj; then 63 | error "Missing python package pyproj" 64 | fi 65 | } 66 | 67 | # function to append information to config file 68 | function add_config_info_python_pyproj() { 69 | append_to_config_file "# python_pyproj-${VERSION_python_pyproj}: ${DESC_python_pyproj}" 70 | append_to_config_file "export VERSION_python_pyproj=${VERSION_python_pyproj}" 71 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/python_rtree/core.py: -------------------------------------------------------------------------------- 1 | import os 2 | # this file is part of qgis/QGIS-Mac-Packager package 3 | # from STAGE_PATH/lib/python/site-packages/RTree-*.egg/rtree -> STAGE_PATH/lib 4 | DIR1=os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.path.pardir, os.path.pardir, os.path.pardir, os.path.pardir)) 5 | SPATIALINDEX_C_LIBRARY_1=os.path.join(DIR1, 'libspatialindex_c.dylib') 6 | 7 | if os.path.exists(SPATIALINDEX_C_LIBRARY_1): 8 | os.environ['SPATIALINDEX_C_LIBRARY'] = SPATIALINDEX_C_LIBRARY_1 9 | else: 10 | raise Exception("Unable to load spatialindex_c required by rtree in " + DIR1) 11 | 12 | from ._core import * 13 | -------------------------------------------------------------------------------- /qgis_deps/recipes/python_scikit_learn/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_python_scikit_learn="python scikit-learn" 4 | 5 | # version of your package 6 | VERSION_python_scikit_learn=0.23.1 7 | 8 | # dependencies of this recipe 9 | DEPS_python_scikit_learn=(python python_packages python_numpy python_scipy libomp) 10 | 11 | # url of the package 12 | URL_python_scikit_learn=https://github.com/scikit-learn/scikit-learn/archive/${VERSION_python_scikit_learn}.tar.gz 13 | 14 | # md5 of the package 15 | MD5_python_scikit_learn=f7f33cfdb020c4ff07e97f66a6085782 16 | 17 | # default build path 18 | BUILD_python_scikit_learn=$BUILD_PATH/python_scikit_learn/$(get_directory $URL_python_scikit_learn) 19 | 20 | # default recipe path 21 | RECIPE_python_scikit_learn=$RECIPES_PATH/python_scikit_learn 22 | 23 | # function called for preparing source code if needed 24 | # (you can apply patch etc here.) 25 | function prebuild_python_scikit_learn() { 26 | cd $BUILD_python_scikit_learn 27 | 28 | # check marker 29 | if [ -f .patched ]; then 30 | return 31 | fi 32 | 33 | touch .patched 34 | } 35 | 36 | function shouldbuild_python_scikit_learn() { 37 | # If lib is newer than the sourcecode skip build 38 | if python_package_installed sklearn; then 39 | DO_BUILD=0 40 | fi 41 | } 42 | 43 | # function called to build the source code 44 | function build_python_scikit_learn() { 45 | try rsync -a $BUILD_python_scikit_learn/ $BUILD_PATH/python_scikit_learn/build-$ARCH/ 46 | try cd $BUILD_PATH/python_scikit_learn/build-$ARCH 47 | push_env 48 | 49 | DYLD_LIBRARY_PATH=$STAGE_PATH/lib try $PYTHON setup.py install 50 | 51 | pop_env 52 | } 53 | 54 | # function called after all the compile have been done 55 | function postbuild_python_scikit_learn() { 56 | if ! python_package_installed_verbose sklearn; then 57 | error "Missing python package sklearn" 58 | fi 59 | } 60 | 61 | # function to append information to config file 62 | function add_config_info_python_scikit_learn() { 63 | append_to_config_file "# python_scikit_learn-${VERSION_python_scikit_learn}: ${DESC_python_scikit_learn}" 64 | append_to_config_file "export VERSION_python_scikit_learn=${VERSION_python_scikit_learn}" 65 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/python_shapely/geos.py: -------------------------------------------------------------------------------- 1 | import os 2 | # this file is part of qgis/QGIS-Mac-Packager package 3 | # from STAGE_PATH/lib/python/site-packages/shapely -> STAGE_PATH/lib 4 | DIR1=os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.path.pardir, os.path.pardir, os.path.pardir)) 5 | GEOS_C_LIB=os.path.join(DIR1, 'libgeos_c.dylib') 6 | 7 | if os.path.exists(GEOS_C_LIB): 8 | # https://github.com/qgis/QGIS-Mac-Packager/issues/81 9 | os.environ['CONDA_PREFIX'] = DIR1 10 | else: 11 | raise Exception("Unable to load geos_c required by shapely from $DIR1") 12 | 13 | # fix: 14 | # ImportError: dlopen(.../site-packages/Fiona-....egg/fiona/ogrext.cpython-37m-darwin.so, 2): Symbol not found: _GEOSArea 15 | # Referenced from: .../stage/lib/libspatialite.7.dylib 16 | # Expected in: flat namespace 17 | import fiona 18 | 19 | from ._geos import * 20 | -------------------------------------------------------------------------------- /qgis_deps/recipes/qgis_deps/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_qgis_deps="QGIS dependencies package" 4 | 5 | # version of your package 6 | VERSION_qgis_deps=${RELEASE_VERSION} 7 | 8 | # dependencies of this recipe 9 | DEPS_qgis_deps=( 10 | bison 11 | boost 12 | exiv2 13 | flex 14 | pdal 15 | gdal 16 | fastcgi 17 | grass 18 | poppler 19 | gsl 20 | hdf5 21 | libtasn1 22 | libzip 23 | mysql 24 | netcdf 25 | postgres 26 | protobuf 27 | proj_data 28 | python_all 29 | qca 30 | qscintilla 31 | qtextra 32 | qtkeychain 33 | qtwebkit 34 | qwt 35 | saga 36 | spatialindex 37 | spatialite 38 | sqlite 39 | xz 40 | ) 41 | 42 | # url of the package 43 | URL_qgis_deps= 44 | 45 | # md5 of the package 46 | MD5_qgis_deps= 47 | 48 | # default build path 49 | BUILD_qgis_deps=$BUILD_PATH/qgis_deps/qgis_deps 50 | 51 | # default recipe path 52 | RECIPE_qgis_deps=$RECIPES_PATH/qgis_deps 53 | 54 | # function called for preparing source code if needed 55 | # (you can apply patch etc here.) 56 | function prebuild_qgis_deps() { 57 | : # noop 58 | } 59 | 60 | function shouldbuild_qgis_deps() { 61 | : # noop 62 | } 63 | 64 | # function called to build the source code 65 | function build_qgis_deps() { 66 | : # noop 67 | } 68 | 69 | # function called after all the compile have been done 70 | function postbuild_qgis_deps() { 71 | : # noop 72 | } 73 | 74 | # function to append information to config file 75 | function add_config_info_qgis_deps() { 76 | append_to_config_file "# qgis_deps-${VERSION_qgis_deps}: ${DESC_qgis_deps}" 77 | append_to_config_file "export VERSION_qgis_deps=${VERSION_qgis_deps}" 78 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/qtwebkit/patches/bison37.patch: -------------------------------------------------------------------------------- 1 | --- a/Source/WebCore/css/makegrammar.pl 2021-02-10 09:43:39.000000000 +0100 2 | +++ b/Source/WebCore/css/makegrammar.pl 2021-02-10 09:44:24.000000000 +0100 3 | @@ -73,25 +73,6 @@ if ($suffix eq ".y.in") { 4 | } 5 | 6 | my $fileBase = File::Spec->join($outputDir, $filename); 7 | -my @bisonCommand = ($bison, "-d", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp"); 8 | +my @bisonCommand = ($bison, "--defines=$fileBase.h", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp"); 9 | push @bisonCommand, "--no-lines" if $^O eq "MSWin32"; # Work around bug in bison >= 3.0 on Windows where it puts backslashes into #line directives. 10 | system(@bisonCommand) == 0 or die; 11 | - 12 | -open HEADER, ">$fileBase.h" or die; 13 | -print HEADER << "EOF"; 14 | -#ifndef CSSGRAMMAR_H 15 | -#define CSSGRAMMAR_H 16 | -EOF 17 | - 18 | -open HPP, "<$fileBase.cpp.h" or open HPP, "<$fileBase.hpp" or die; 19 | -while () { 20 | - print HEADER; 21 | -} 22 | -close HPP; 23 | - 24 | -print HEADER "#endif\n"; 25 | -close HEADER; 26 | - 27 | -unlink("$fileBase.cpp.h"); 28 | -unlink("$fileBase.hpp"); 29 | - 30 | -------------------------------------------------------------------------------- /qgis_deps/recipes/rttopo/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_rttopo="RT Topology Library" 4 | 5 | # version of your package 6 | VERSION_rttopo=1.1.0 7 | LINK_rttopo=librttopo.1.dylib 8 | 9 | # dependencies of this recipe 10 | DEPS_rttopo=(geos) 11 | 12 | # url of the package 13 | URL_rttopo=https://gitlab.com/rttopo/rttopo/-/archive/librttopo-$VERSION_rttopo/rttopo-librttopo-$VERSION_rttopo.tar.gz 14 | 15 | # md5 of the package 16 | MD5_rttopo=3c92498ce25b7f086cc3cd0d8e7bafdd 17 | 18 | # default build path 19 | BUILD_rttopo=$BUILD_PATH/rttopo/$(get_directory $URL_rttopo) 20 | 21 | # default recipe path 22 | RECIPE_rttopo=$RECIPES_PATH/rttopo 23 | 24 | # function called for preparing source code if needed 25 | # (you can apply patch etc here.) 26 | function prebuild_rttopo() { 27 | cd $BUILD_rttopo 28 | 29 | # check marker 30 | if [ -f .patched ]; then 31 | return 32 | fi 33 | 34 | 35 | 36 | touch .patched 37 | } 38 | 39 | function shouldbuild_rttopo() { 40 | # If lib is newer than the sourcecode skip build 41 | if [ ${STAGE_PATH}/lib/$LINK_rttopo -nt $BUILD_rttopo/.patched ]; then 42 | DO_BUILD=0 43 | fi 44 | } 45 | 46 | # function called to build the source code 47 | function build_rttopo() { 48 | try rsync -a $BUILD_rttopo/ $BUILD_PATH/rttopo/build-$ARCH/ 49 | try cd $BUILD_PATH/rttopo/build-$ARCH 50 | push_env 51 | 52 | try ./autogen.sh 53 | patch_configure_file configure 54 | 55 | try ${CONFIGURE} \ 56 | --enable-geocallbacks \ 57 | --disable-dependency-tracking 58 | 59 | check_file_configuration config.status 60 | try $MAKESMP 61 | try $MAKESMP install 62 | 63 | pop_env 64 | } 65 | 66 | # function called after all the compile have been done 67 | function postbuild_rttopo() { 68 | verify_binary lib/$LINK_rttopo 69 | } 70 | 71 | # function to append information to config file 72 | function add_config_info_rttopo() { 73 | append_to_config_file "# rttopo-${VERSION_rttopo}: ${DESC_rttopo}" 74 | append_to_config_file "export VERSION_rttopo=${VERSION_rttopo}" 75 | append_to_config_file "export LINK_rttopo=${LINK_rttopo}" 76 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/spatialindex/patches/temporaryfile.patch: -------------------------------------------------------------------------------- 1 | --- a/src/tools/Tools.cc 2019-10-24 03:48:36.000000000 +0200 2 | +++ b/src/tools/Tools.cc 2021-02-05 09:08:21.000000000 +0100 3 | @@ -1079,10 +1079,28 @@ Tools::TemporaryFile::TemporaryFile() 4 | m_sFile = std::string(tmpName); 5 | 6 | #else 7 | - char tmpName[7] = "XXXXXX"; 8 | - if (mkstemp(tmpName) == -1) 9 | + // see https://github.com/boostorg/filesystem/blob/b4d606cdd08640c9bca68f7e97b52245aeef398d/src/operations.cpp#L2783 10 | + const char* val = nullptr; 11 | + 12 | + (val = std::getenv("TMPDIR" )) || 13 | + (val = std::getenv("TMP" )) || 14 | + (val = std::getenv("TEMP" )) || 15 | + (val = std::getenv("TEMPDIR")); 16 | + 17 | +# ifdef __ANDROID__ 18 | + const char* default_tmp = "/data/local/tmp"; 19 | +# else 20 | + const char* default_tmp = "/tmp"; 21 | +# endif 22 | + std::string tempDir ((val != nullptr) ? val : default_tmp); 23 | + 24 | + // now contruct the temporary filename 25 | + std::string tempName = tempDir + "/spatialindex-XXXXXX"; 26 | + char* tmpName = strdup(tempName.c_str()); 27 | + if (!tmpName || mkstemp(tmpName) == -1) 28 | throw std::ios_base::failure("Tools::TemporaryFile: Cannot create temporary file name."); 29 | - m_sFile = tmpName; 30 | + m_sFile = tmpName; 31 | + free(tmpName); 32 | #endif 33 | 34 | m_pFile = new Tools::BufferedFileWriter(m_sFile, Tools::CREATE); 35 | -------------------------------------------------------------------------------- /qgis_deps/recipes/xz/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_xz="General-purpose data compression with high compression ratio" 4 | 5 | # version of your package 6 | VERSION_xz=5.2.4 7 | 8 | LINK_liblzma=liblzma.5.dylib 9 | 10 | # dependencies of this recipe 11 | DEPS_xz=(gettext) 12 | 13 | # url of the package 14 | URL_xz=https://downloads.sourceforge.net/project/lzmautils/xz-${VERSION_xz}.tar.gz 15 | 16 | # md5 of the package 17 | MD5_xz=5ace3264bdd00c65eeec2891346f65e6 18 | 19 | # default build path 20 | BUILD_xz=$BUILD_PATH/xz/$(get_directory $URL_xz) 21 | 22 | # default recipe path 23 | RECIPE_xz=$RECIPES_PATH/xz 24 | 25 | # function called for preparing source code if needed 26 | # (you can apply patch etc here.) 27 | function prebuild_xz() { 28 | cd $BUILD_xz 29 | 30 | # check marker 31 | if [ -f .patched ]; then 32 | return 33 | fi 34 | 35 | patch_configure_file configure 36 | 37 | touch .patched 38 | } 39 | 40 | function shouldbuild_xz() { 41 | # If lib is newer than the sourcecode skip build 42 | if [ ${STAGE_PATH}/lib/$LINK_liblzma -nt $BUILD_xz/.patched ]; then 43 | DO_BUILD=0 44 | fi 45 | } 46 | 47 | # function called to build the source code 48 | function build_xz() { 49 | try rsync -a $BUILD_xz/ $BUILD_PATH/xz/build-$ARCH/ 50 | try cd $BUILD_PATH/xz/build-$ARCH 51 | push_env 52 | 53 | try ${CONFIGURE} --disable-debug 54 | 55 | check_file_configuration config.status 56 | 57 | try $MAKESMP 58 | try $MAKESMP install 59 | 60 | pop_env 61 | } 62 | 63 | # function called after all the compile have been done 64 | function postbuild_xz() { 65 | verify_binary lib/$LINK_liblzma 66 | 67 | verify_binary bin/lzmainfo 68 | verify_binary bin/xzdec 69 | } 70 | 71 | # function to append information to config file 72 | function add_config_info_xz() { 73 | append_to_config_file "# xz-${VERSION_xz}: ${DESC_xz}" 74 | append_to_config_file "export VERSION_xz=${VERSION_xz}" 75 | append_to_config_file "export LINK_liblzma=${LINK_liblzma}" 76 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/zlib/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_zlib="General-purpose lossless data-compression library" 4 | 5 | # version of your package 6 | VERSION_zlib=1.2.11 7 | LINK_zlib=libz.1.dylib 8 | 9 | # dependencies of this recipe 10 | DEPS_zlib=() 11 | 12 | # url of the package 13 | URL_zlib=https://zlib.net/zlib-${VERSION_zlib}.tar.gz 14 | 15 | # md5 of the package 16 | MD5_zlib=1c9f62f0778697a09d36121ead88e08e 17 | 18 | # default build path 19 | BUILD_zlib=$BUILD_PATH/zlib/$(get_directory $URL_zlib) 20 | 21 | # default recipe path 22 | RECIPE_zlib=$RECIPES_PATH/zlib 23 | 24 | # function called for preparing source code if needed 25 | # (you can apply patch etc here.) 26 | function prebuild_zlib() { 27 | cd $BUILD_zlib 28 | 29 | # check marker 30 | if [ -f .patched ]; then 31 | return 32 | fi 33 | 34 | patch_configure_file configure 35 | 36 | touch .patched 37 | } 38 | 39 | function shouldbuild_zlib() { 40 | # If lib is newer than the sourcecode skip build 41 | if [ ${STAGE_PATH}/lib/$LINK_zlib -nt $BUILD_zlib/.patched ]; then 42 | DO_BUILD=0 43 | fi 44 | } 45 | 46 | # function called to build the source code 47 | function build_zlib() { 48 | try rsync -a $BUILD_zlib/ $BUILD_PATH/zlib/build-$ARCH/ 49 | try cd $BUILD_PATH/zlib/build-$ARCH 50 | push_env 51 | 52 | try ${CONFIGURE} 53 | 54 | check_file_configuration config.status 55 | 56 | try $MAKESMP 57 | try $MAKESMP install 58 | 59 | pop_env 60 | } 61 | 62 | # function called after all the compile have been done 63 | function postbuild_zlib() { 64 | verify_binary lib/$LINK_zlib 65 | } 66 | 67 | # function to append information to config file 68 | function add_config_info_zlib() { 69 | append_to_config_file "# zlib-${VERSION_zlib}: ${DESC_zlib}" 70 | append_to_config_file "export VERSION_zlib=${VERSION_zlib}" 71 | append_to_config_file "export LINK_zlib=${LINK_zlib}" 72 | } -------------------------------------------------------------------------------- /qgis_deps/recipes/zstd/recipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESC_zstd="Zstandard is a real-time compression algorithm" 4 | 5 | # version of your package 6 | VERSION_zstd=1.4.4 7 | LINK_zstd=libzstd.1.dylib 8 | 9 | # dependencies of this recipe 10 | DEPS_zstd=() 11 | 12 | # url of the package 13 | URL_zstd=https://github.com/facebook/zstd/archive/v${VERSION_zstd}.tar.gz 14 | 15 | # md5 of the package 16 | MD5_zstd=532aa7b3a873e144bbbedd9c0ea87694 17 | 18 | # default build path 19 | BUILD_zstd=$BUILD_PATH/zstd/$(get_directory $URL_zstd) 20 | 21 | # default recipe path 22 | RECIPE_zstd=$RECIPES_PATH/zstd 23 | 24 | # function called for preparing source code if needed 25 | # (you can apply patch etc here.) 26 | function prebuild_zstd() { 27 | cd $BUILD_zstd 28 | 29 | # check marker 30 | if [ -f .patched ]; then 31 | return 32 | fi 33 | 34 | touch .patched 35 | } 36 | 37 | function shouldbuild_zstd() { 38 | # If lib is newer than the sourcecode skip build 39 | if [ ${STAGE_PATH}/lib/$LINK_zstd -nt $BUILD_zstd/.patched ]; then 40 | DO_BUILD=0 41 | fi 42 | } 43 | 44 | # function called to build the source code 45 | function build_zstd() { 46 | try rsync -a $BUILD_zstd/ $BUILD_PATH/zstd/build-$ARCH/ 47 | try cd $BUILD_PATH/zstd/build-$ARCH 48 | push_env 49 | 50 | try $MAKE install PREFIX=$STAGE_PATH 51 | 52 | pop_env 53 | } 54 | 55 | # function called after all the compile have been done 56 | function postbuild_zstd() { 57 | verify_binary lib/$LINK_zstd 58 | } 59 | 60 | # function to append information to config file 61 | function add_config_info_zstd() { 62 | append_to_config_file "# zstd-${VERSION_zstd}: ${DESC_zstd}" 63 | append_to_config_file "export VERSION_zstd=${VERSION_zstd}" 64 | append_to_config_file "export LINK_zstd=${LINK_zstd}" 65 | } -------------------------------------------------------------------------------- /qgis_deps/sign_deps.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | PWD=`pwd` 4 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 5 | 6 | #################### 7 | # load configuration 8 | if (( $# < 1 )); then 9 | echo "sign_deps: $0 /config/.conf ..." 10 | exit 1 11 | fi 12 | CONFIG_FILE=$1 13 | if [ ! -f "$CONFIG_FILE" ]; then 14 | echo "invalid config file (1st argument) $CONFIG_FILE" 15 | exit 1 16 | fi 17 | shift 18 | source $CONFIG_FILE 19 | 20 | PATH_TO_SIGN=$ROOT_OUT_PATH/stage/ 21 | 22 | if [ ! -f "$SIGN_FILE" ]; then 23 | error "identity file $SIGN_FILE missing" 24 | fi 25 | 26 | IDENTITY=$(cat $SIGN_FILE) 27 | 28 | if [ ${#IDENTITY} -ne 40 ]; then 29 | error "SIGN FILE $SIGN_FILE invalid. key must have 40 chars" ; 30 | fi 31 | 32 | if [ ! -f "$KEYCHAIN_FILE" ]; then 33 | error "keychain file $KEYCHAIN_FILE missing" 34 | fi 35 | 36 | echo "Cleaning tmp files" 37 | for i in *.swp *.orig *.pyc 38 | do 39 | info "Cleaning $i files" 40 | find "$PATH_TO_SIGN" -type fl -name $i -exec rm -f {} + 41 | done 42 | for i in __pycache__ 43 | do 44 | info "Cleaning $i dirs" 45 | find "$PATH_TO_SIGN" -type dl -name "$i" -exec rm -rf {} + 46 | done 47 | 48 | echo "Signing binaries in $PATH_TO_SIGN" 49 | FRAMEWORKS=$(find "$PATH_TO_SIGN" -type f ! -name "*.*" -path "*framework/*" -not -path "*/Headers/*") 50 | BINS=$(find "$PATH_TO_SIGN/bin/" -type f ! -name "*.py*") 51 | DYLIBS=$(find "$PATH_TO_SIGN" -type f -name "*.dylib") 52 | SO=$(find "$PATH_TO_SIGN" -type f -name "*.so") 53 | 54 | TO_SIGN= 55 | total=0 56 | for BINARY in $FRAMEWORKS $BINS $DYLIBS $SO; do 57 | attachmenttype=$(file $BINARY | cut -d\ -f2 ) 58 | if [[ $attachmenttype = "Mach-O" ]]; then 59 | TO_SIGN="$TO_SIGN $BINARY" 60 | ((total=total+1)) 61 | fi 62 | done 63 | 64 | echo "This make take few minutes..., signing $total binaries" 65 | i=0 66 | for LIB in $TO_SIGN; do 67 | ((i=i+1)) 68 | echo "($i/$total) signing => $LIB" 69 | sem -j+0 "codesign --force -s $IDENTITY --keychain $KEYCHAIN_FILE $LIB" 70 | done 71 | sem --wait 72 | 73 | echo "Signing done" 74 | -------------------------------------------------------------------------------- /qgis_deps/upload_to_qgis2.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | PWD=`pwd` 6 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" 7 | 8 | #################### 9 | # load configuration 10 | if (( $# < 1 )); then 11 | echo "upload_to_qgis2: $0 /config/.conf ..." 12 | exit 1 13 | fi 14 | CONFIG_FILE=$1 15 | if [ ! -f "$CONFIG_FILE" ]; then 16 | echo "invalid config file (1st argument) $CONFIG_FILE" 17 | exit 1 18 | fi 19 | shift 20 | source $CONFIG_FILE 21 | 22 | QT_PACKAGE=$ROOT_OUT_PATH/qt-${VERSION_qt}.tar.gz 23 | QGIS_DEPS_PACKAGE=$ROOT_OUT_PATH/qgis-deps-${QGIS_DEPS_SDK_VERSION}.tar.gz 24 | INSTALL_SCRIPT=$ROOT_OUT_PATH/install_qgis_deps-${QGIS_DEPS_SDK_VERSION}.bash 25 | 26 | if [ ! -f $QT_PACKAGE ] || [ ! -f $QGIS_DEPS_PACKAGE ] || [ ! -f $INSTALL_SCRIPT ] ; then 27 | echo "Missing archives to upload, maybe you forgot to run ./create_package.bash?" 28 | echo "QT archive $QT_PACKAGE" 29 | echo "QGIS deps archive $QGIS_DEPS_PACKAGE" 30 | echo "Install script $INSTALL_SCRIPT" 31 | exit 1 32 | fi 33 | 34 | KEY="$DIR/../../ssh/id_rsa" 35 | SERVER="qgis-mac-packager-bot@qgis2.qgis.org" 36 | FOLDER="/var/www/downloads/macos" 37 | ROOT="$FOLDER/deps" 38 | 39 | process_file () { 40 | LOCAL=$1 41 | FILENAME=$(basename -- "$LOCAL") 42 | REMOTE=$ROOT/$FILENAME 43 | # scp -o LogLevel=Error -i $KEY $LOCAL $SERVER:$REMOTE 44 | rsync -v -e "ssh -i $KEY" $LOCAL $SERVER:$REMOTE --progress 45 | } 46 | 47 | echo "Upload QGIS DEPS to qgis2.qgis.org" 48 | ssh -o LogLevel=Error -i $KEY $SERVER "mkdir -p $ROOT" 49 | 50 | # upload files 51 | process_file $QT_PACKAGE 52 | process_file $QGIS_DEPS_PACKAGE 53 | process_file $INSTALL_SCRIPT 54 | -------------------------------------------------------------------------------- /qgis_package/qgis_package.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | # load configuration 6 | if (( $# < 5 )); then 7 | echo "qgis_package: $0 /config/.conf major minor patch package_file ..." 8 | exit 1 9 | fi 10 | 11 | CONFIG_FILE=$1 12 | if [ ! -f "$CONFIG_FILE" ]; then 13 | echo "invalid config file (1st argument) $CONFIG_FILE" 14 | exit 1 15 | fi 16 | shift 17 | export QGIS_MAJOR_VERSION=$1 18 | shift 19 | export QGIS_MINOR_VERSION=$1 20 | shift 21 | export QGIS_PATCH_VERSION=$1 22 | shift 23 | source $CONFIG_FILE 24 | PACKAGE=$1 25 | 26 | QGIS_APP="$BUNDLE_DIR/$QGIS_APP_NAME" 27 | if [ ! -d "$QGIS_APP" ]; then 28 | error "missing bundled app $QGIS_APP" 29 | fi 30 | 31 | if [ -f "$PACKAGE" ]; then 32 | info "$PACKAGE exists, removing" 33 | rm -f "$PACKAGE" 34 | fi 35 | 36 | IDENTITY=$(cat "$SIGN_FILE") 37 | if [ ${#IDENTITY} -ne 40 ]; then 38 | error "SIGN FILE $SIGN_FILE invalid. key must have 40 chars" ; 39 | fi 40 | 41 | if [ ! -f "$KEYCHAIN_FILE" ]; then 42 | error "keychain file $KEYCHAIN_FILE missing" 43 | fi 44 | 45 | info "Print identities" 46 | security find-identity -v -p codesigning 47 | 48 | info "Signing the $QGIS_APP_NAME" 49 | codesign -s "$IDENTITY" -v --force --timestamp=none --keychain "$KEYCHAIN_FILE" "$QGIS_APP" --deep 50 | codesign --deep-verify --verbose "$QGIS_APP" 51 | 52 | info "Create dmg image" 53 | dmgbuild \ 54 | -Dapp="$QGIS_APP" \ 55 | -s `dirname $0`/../resources/dmgsettings.py \ 56 | "$QGIS_APP_NAME" \ 57 | "$PACKAGE" 58 | 59 | info "Add license to dmg" 60 | $CONFIGDIR/../scripts/add_license_to_dmg.bash \ 61 | $CONFIGDIR/../resources/license_ecw.txt \ 62 | $CONFIGDIR/../resources/license_mrsid.txt \ 63 | $CONFIGDIR/../resources/EULA.txt \ 64 | $CONFIGDIR/../resources/eula-resources-template.xml \ 65 | "$PACKAGE" 66 | 67 | info "Signing the dmg" 68 | codesign -s "$IDENTITY" -v --force --timestamp=none --keychain "$KEYCHAIN_FILE" "$PACKAGE" 69 | codesign --deep-verify --verbose "$PACKAGE" 70 | 71 | info "Create checksum" 72 | sha256sum "$PACKAGE" > "$PACKAGE.sha256sum" 73 | 74 | F_SIZE=$(du -h "$PACKAGE") 75 | info "Dmg created with size $F_SIZE" 76 | -------------------------------------------------------------------------------- /resources/QGIS.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgis/QGIS-Mac-Packager/6ba5e87a5e285f2f753568beb3dd095da45b0d2d/resources/QGIS.icns -------------------------------------------------------------------------------- /resources/create_icns.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # https://stackoverflow.com/a/20703594/2838364 4 | 5 | ICON="qgis-icon-macos.png" 6 | OUT="QGIS" 7 | 8 | mkdir ${OUT}.iconset 9 | sips -z 16 16 $ICON --out ${OUT}.iconset/icon_16x16.png 10 | sips -z 32 32 $ICON --out ${OUT}.iconset/icon_16x16@2x.png 11 | sips -z 32 32 $ICON --out ${OUT}.iconset/icon_32x32.png 12 | sips -z 64 64 $ICON --out ${OUT}.iconset/icon_32x32@2x.png 13 | sips -z 128 128 $ICON --out ${OUT}.iconset/icon_128x128.png 14 | sips -z 256 256 $ICON --out ${OUT}.iconset/icon_128x128@2x.png 15 | sips -z 256 256 $ICON --out ${OUT}.iconset/icon_256x256.png 16 | sips -z 512 512 $ICON --out ${OUT}.iconset/icon_256x256@2x.png 17 | sips -z 512 512 $ICON --out ${OUT}.iconset/icon_512x512.png 18 | cp $ICON ${OUT}.iconset/icon_512x512@2x.png 19 | iconutil -c icns ${OUT}.iconset 20 | rm -R ${OUT}.iconset -------------------------------------------------------------------------------- /resources/pyqgis-startup.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | /*************************************************************************** 4 | OSGeo4Mac Python startup script to strip macOS system Python site-packages 5 | ------------------- 6 | begin : 2013-09-20 7 | copyright: (C) 2013, 2017 Larry Shaffer 8 | email : larrys@dakotacarto.com 9 | ***************************************************************************/ 10 | 11 | /*************************************************************************** 12 | * * 13 | * This program is free software; you can redistribute it and/or modify * 14 | * it under the terms of the GNU General Public License as published by * 15 | * the Free Software Foundation; either version 2 of the License, or * 16 | * (at your option) any later version. * 17 | * * 18 | ***************************************************************************/ 19 | """ 20 | import sys 21 | import os 22 | 23 | sys.path[:] = (pth for pth in sys.path if not ( 24 | pth.startswith('/Library/Python') or 25 | pth.startswith('/Library/Frameworks') or 26 | pth.startswith('/System/Library/Frameworks/Python.framework'))) 27 | 28 | # make abs paths 29 | sys.path[:] = (os.path.abspath(pth) for pth in sys.path) 30 | 31 | # remove duplicit entries 32 | sys.path = list(set(sys.path)) 33 | -------------------------------------------------------------------------------- /resources/qgis-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgis/QGIS-Mac-Packager/6ba5e87a5e285f2f753568beb3dd095da45b0d2d/resources/qgis-icon-120x120.png -------------------------------------------------------------------------------- /resources/qgis-icon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgis/QGIS-Mac-Packager/6ba5e87a5e285f2f753568beb3dd095da45b0d2d/resources/qgis-icon-16x16.png -------------------------------------------------------------------------------- /resources/qgis-icon-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgis/QGIS-Mac-Packager/6ba5e87a5e285f2f753568beb3dd095da45b0d2d/resources/qgis-icon-512x512.png -------------------------------------------------------------------------------- /resources/qgis-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgis/QGIS-Mac-Packager/6ba5e87a5e285f2f753568beb3dd095da45b0d2d/resources/qgis-icon-60x60.png -------------------------------------------------------------------------------- /resources/qgis-icon-macos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgis/QGIS-Mac-Packager/6ba5e87a5e285f2f753568beb3dd095da45b0d2d/resources/qgis-icon-macos.png -------------------------------------------------------------------------------- /scripts/Roboto/Roboto-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qgis/QGIS-Mac-Packager/6ba5e87a5e285f2f753568beb3dd095da45b0d2d/scripts/Roboto/Roboto-Black.ttf -------------------------------------------------------------------------------- /scripts/add_license_to_dmg.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | echo "Adding EULA" 6 | 7 | ECW_LICENSE=$1 8 | MRSID_LICENSE=$2 9 | QGIS_LICENSE=$3 10 | RESOURCE_TEMPLATE=$4 11 | DMG_FILE=$5 12 | 13 | EULA_RSRC=$(mktemp -t dmglicense.tmp.XXXXXXXXXX) 14 | cat $QGIS_LICENSE > $EULA_RSRC 15 | echo "[1] ERDAS ECW/JP2" >> $EULA_RSRC 16 | cat $ECW_LICENSE >> $EULA_RSRC 17 | echo "[2] MrSID Decode SDKs" >> $EULA_RSRC 18 | cat $MRSID_LICENSE >> $EULA_RSRC 19 | 20 | echo "Created license $EULA_RSRC" 21 | 22 | # 23 | # Use udifrez instead flatten/rez/unflatten 24 | # Based on a thread from dawn2dusk & peterguy 25 | # https://developer.apple.com/forums/thread/668084 26 | # Based on create-dmg implementation 27 | # 28 | EULA_RESOURCES_FILE=$(mktemp -t dmgresource.tmp.XXXXXXXXXX) 29 | EULA_FORMAT=$(file -b ${EULA_RSRC}) 30 | if [[ ${EULA_FORMAT} == 'Rich Text Format data'* ]] ; then 31 | EULA_FORMAT='RTF ' 32 | else 33 | EULA_FORMAT='TEXT' 34 | fi 35 | 36 | # Encode the EULA to base64 37 | EULA_DATA="$(base64 -b 52 "${EULA_RSRC}" | sed s$'/^\(.*\)$/\t\t\t\\1/')" 38 | # Fill the template with the custom EULA contents 39 | eval "cat > \"${EULA_RESOURCES_FILE}\" </dev/null && pwd )" 5 | 6 | cd $DIR/.. 7 | 8 | echo "Unit tests" 9 | python3 -m unittest discover tests/ -v 10 | 11 | echo "PyCodeStyle" 12 | python3 -m pycodestyle . --max-line-length=120 13 | 14 | echo "Usage of print" 15 | PRINT=`find . -name "*.py" ! -path ./scripts/deps.py ! -path ./qgis_deps/tools/depsort.py | xargs grep -ni print\(` 16 | echo $PRINT 17 | if [ -n "$PRINT" ]; then 18 | exit 1 19 | fi 20 | 21 | cd $PWD 22 | exit 0 23 | -------------------------------------------------------------------------------- /scripts/deps.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # load configuration 4 | if (( $# < 1 )); then 5 | echo "deps.bash: $0 /config/.conf ..." 6 | exit 1 7 | fi 8 | CONFIG_FILE=$1 9 | if [ ! -f "$CONFIG_FILE" ]; then 10 | echo "invalid config file (1st argument) $CONFIG_FILE" 11 | exit 1 12 | fi 13 | shift 14 | source $CONFIG_FILE 15 | 16 | echo "" 17 | echo "SYSTEM" 18 | system_profiler SPSoftwareDataType | grep -i "VERSION" 19 | 20 | echo "" 21 | echo "DEVELOPER TOOLS" 22 | system_profiler SPDeveloperToolsDataType 23 | 24 | echo "" 25 | echo "QGIS-DEPS $QGIS_DEPS_SDK_VERSION" 26 | DEPS=$(grep "VERSION" "${QGIS_DEPS_STAGE_PATH}/qgis-deps.config") 27 | DEPS="${DEPS//export VERSION_/}" 28 | DEPS="${DEPS//export RELEASE_VERSION_/}" 29 | DEPS="${DEPS//export QGIS_DEPS_SDK_VERSION_/}" 30 | DEPS="${DEPS//python_packages_pre_/python: }" 31 | DEPS="${DEPS//python_packages_post_/python: }" 32 | DEPS="${DEPS//python_/python: }" 33 | DEPS="${DEPS//=/ }" 34 | printf "$DEPS" 35 | 36 | TIMESTAMP=$(date +%Y%m%d_%H%M%S) 37 | echo "" 38 | echo "Updated $TIMESTAMP" -------------------------------------------------------------------------------- /scripts/image_creator.py: -------------------------------------------------------------------------------- 1 | # 2019 Peter Petrik (zilolv at gmail dot com) 2 | # GNU General Public License 2 any later version 3 | 4 | import argparse 5 | import os 6 | from PIL import Image, ImageDraw, ImageFont 7 | 8 | THIS_DIR = os.path.dirname(os.path.realpath(__file__)) 9 | 10 | 11 | def create(result, text, bg_color, fg_color, file_name): 12 | W = 130 13 | H = 20 14 | image = Image.new("RGBA", (2*W, H), color=bg_color) 15 | draw = ImageDraw.Draw(image) 16 | 17 | fontpath = os.path.join(THIS_DIR, "Roboto", "Roboto-Black.ttf") 18 | if not os.path.exists(fontpath): 19 | raise Exception("font " + fontpath + " missing") 20 | 21 | font = ImageFont.truetype(fontpath) 22 | w1, h1 = font.getsize(text) 23 | draw.polygon([0, 0, W, 0, W, H, 0, H, 0, 0], fill="black") 24 | draw.text(((W - w1) / 2, (H - h1) / 2), text, font=font, fill=fg_color) 25 | 26 | w2, h2 = font.getsize(result) 27 | draw.text((W + (W - w2) / 2, (H - h2) / 2), result, font=font, fill=fg_color) 28 | 29 | image.save(file_name) 30 | 31 | 32 | if __name__ == "__main__": 33 | parser = argparse.ArgumentParser(description='Create status image') 34 | parser.add_argument('--text', 35 | required=True) 36 | parser.add_argument('--success', 37 | action='store_true', 38 | required=False, 39 | default=False) 40 | parser.add_argument('--out') 41 | args = parser.parse_args() 42 | 43 | if args.success: 44 | bg_color = 'rgb(75, 197, 29)' 45 | fg_color = 'rgb(255,255,255)' 46 | result = "passing" 47 | else: 48 | bg_color = 'rgb(211, 94, 71)' 49 | fg_color = 'rgb(255,255,255)' 50 | result = "failing" 51 | 52 | create(result, args.text, bg_color, fg_color, args.out) 53 | -------------------------------------------------------------------------------- /scripts/install_brew.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | read -p "Are you sure to reinstall brew? " -n 1 -r 6 | echo # (optional) move to a new line 7 | if [[ $REPLY =~ ^[Yy]$ ]] 8 | then 9 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" 10 | sudo rm -rf /usr/local/* 11 | sudo rm -R /Library/Java/JavaVirtualMachines/openjdk-* 12 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" 13 | fi 14 | -------------------------------------------------------------------------------- /scripts/install_brew_dev_packages.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | brew install git 6 | brew install cmake 7 | brew install ninja 8 | brew install pkg-config 9 | brew install wget 10 | brew install bash-completion 11 | brew install curl 12 | brew install gnu-sed 13 | brew install coreutils 14 | brew install ccache 15 | brew install libtool 16 | brew install astyle 17 | brew install help2man 18 | brew install autoconf 19 | brew install automake 20 | brew install parallel 21 | brew install texinfo # makeinfo (bison receipt) 22 | brew install expect # unbuffer (for QGIS spell check) 23 | brew install the_silver_searcher # ag (for QGIS spell check) 24 | brew install mutt # for cronjob 25 | brew install htop # for display on terminal (optional) 26 | 27 | pip3 install dmgbuild 28 | pip3 install autopep8 # for QGIS prepare commit 29 | pip3 install pillow # for image_creator.py 30 | pip3 install transifex-client # for qgis pull_tx script 31 | 32 | # Setup 33 | ccache --set-config=max_size=2.0G -------------------------------------------------------------------------------- /scripts/org.qgis.build.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Label 6 | org.qgis.build 7 | 8 | ProgramArguments 9 | 10 | /Users/admin/qgis/run_cronjob.bash 11 | 12 | 13 | KeepAlive 14 | 15 | 16 | RunAtLoad 17 | 18 | 19 | StartCalendarInterval 20 | 21 | Minute 22 | 20 23 | Hour 24 | 12 25 | 26 | 27 | StandardErrorPath 28 | /Users/admin/qgis/logs/qgis_launchd.err 29 | 30 | StandardOutPath 31 | /Users/admin/qgis/logs/qgis_launchd.out 32 | 33 | AbandonProcessGroup 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /scripts/run_all.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # 2018 Peter Petrik (zilolv at gmail dot com) 6 | # GNU General Public License 2 any later version 7 | 8 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" 9 | for i in ltr pr nightly; do 10 | if ! $DIR/run_pkg.bash $i; then 11 | echo "BUILDING $i FAILED [$?]" 12 | fi 13 | done 14 | -------------------------------------------------------------------------------- /scripts/run_build.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eo pipefail 4 | 5 | PWD=$(pwd) 6 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" 7 | 8 | if (( $# < 5 )); then 9 | echo "usage: $0 git_tag release_name major minor patch [no-upload]" 10 | echo "example: ./$0 master nightly 3 18 0 no-upload" 11 | exit 1 12 | fi 13 | 14 | GIT=$1 15 | RELEASE=$2 16 | TIMESTAMP=$(date +%Y%m%d_%H%M%S) 17 | QGIS_MAJOR_VERSION=$3 18 | QGIS_MINOR_VERSION=$4 19 | QGIS_PATCH_VERSION=$5 20 | 21 | CONFIG_FILE=$DIR/../config/$RELEASE.conf 22 | if [ ! -f "$CONFIG_FILE" ]; then 23 | echo "invalid config file (1st argument) $CONFIG_FILE" 24 | fi 25 | source $CONFIG_FILE 26 | 27 | BUILD_DIR=$QGIS_BUILD_DIR/../ 28 | PACKAGE=$BUILD_DIR/qgis_${RELEASE}_${GIT}_${TIMESTAMP}.dmg 29 | STATUS_PNG=$BUILD_DIR/qgis_${RELEASE}_${GIT}_${TIMESTAMP}.png 30 | DEPS=$BUILD_DIR/qgis_${RELEASE}_${GIT}_${TIMESTAMP}.deps 31 | LOG=$BUILD_DIR/qgis_${RELEASE}_${GIT}_${TIMESTAMP}.log 32 | 33 | if (( $# == 5 )); then 34 | UPLOAD=1 35 | else 36 | UPLOAD=0 37 | fi 38 | 39 | echo "Building & Packaging QGIS in $BUILD_DIR" 40 | mkdir -p "$BUILD_DIR" 41 | 42 | echo "Building QGIS $GIT for $RELEASE" 43 | 44 | echo "Please update qgis-deps package manually to get new deps" 45 | $DIR/deps.bash $CONFIG_FILE | tee $DEPS 46 | 47 | cd $DIR/.. 48 | echo "Run qgis-mac-packager.bash" 49 | 50 | res=0 51 | if $DIR/../qgis-mac-packager.bash \ 52 | $PACKAGE \ 53 | $CONFIG_FILE \ 54 | $QGIS_MAJOR_VERSION \ 55 | $QGIS_MINOR_VERSION \ 56 | $QGIS_PATCH_VERSION \ 57 | 2>&1 | tee -a $LOG; then 58 | echo "SUCCESS" | tee -a $LOG 59 | python3 $DIR/image_creator.py --text "$RELEASE-$GIT" --out $STATUS_PNG --success 60 | else 61 | res=$? 62 | echo "FAIL" | tee -a $LOG 63 | python3 $DIR/image_creator.py --text "$RELEASE-$GIT" --out $STATUS_PNG 64 | fi 65 | 66 | if (( $UPLOAD > 0 )); then 67 | $DIR/upload_to_qgis2.bash $RELEASE $LOG $PACKAGE $DEPS $STATUS_PNG $PACKAGE.sha256sum 68 | fi 69 | 70 | echo "All done (scripts/run_build.bash)" 71 | cd $PWD 72 | 73 | exit $res 74 | -------------------------------------------------------------------------------- /scripts/run_cronjob.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -o pipefail 4 | 5 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" 6 | TIMESTAMP=$(date +%Y%m%d_%H%M%S) 7 | BD=$DIR/builds 8 | LD=$DIR/logs 9 | LOG=$LD/qgis_${TIMESTAMP}.log 10 | SD=$DIR/QGIS-Mac-Packager/scripts 11 | 12 | echo "Starting CRONJOB ${TIMESTAMP} ${LOG}" > $LOG 2>&1 13 | 14 | echo "Manage ENV" >> $LOG 2>&1 15 | export PATH=/usr/local/opt/ccache/libexec:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:$PATH 16 | 17 | echo "Create dirs " >> $LOG 2>&1 18 | mkdir -p $LD 19 | mkdir -p $BD 20 | touch $LOG 21 | 22 | echo "clean the build directories" >> $LOG 2>&1 23 | # remove all dmg files older than X days 24 | find $BD -name "*.dmg" -maxdepth 2 -type f -mtime +5 -exec rm {} \; 25 | 26 | echo "clean the log directories" >> $LOG 2>&1 27 | # remove all files older than 60 days 28 | find $LD -name "*.log" -type f -mtime +60 -exec rm {} \; 29 | 30 | echo "Check GIT repo" >> $LOG 2>&1 31 | cd $DIR/QGIS-Mac-Packager 32 | git fetch origin | tee -a $LOG 33 | LOCAL=$(git rev-parse @) 34 | REMOTE=$(git rev-parse origin) 35 | 36 | if [ $LOCAL = $REMOTE ]; then 37 | echo "GIT Up-to-date" >> $LOG 2>&1 38 | else 39 | echo "Update QGIS-Mac-Packager" >> $LOG 2>&1 40 | git rebase origin/master >> $LOG 2>&1 41 | fi 42 | 43 | export failed= ok= 44 | for i in nightly pr ltr; do 45 | echo "build $i" >> $LOG 2>&1 46 | if $SD/run_pkg.bash $i >> $LOG 2>&1; then 47 | ok="$ok $i" 48 | echo "SUCCESS $i" >> $LOG 2>&1 49 | else 50 | failed="$failed $i" 51 | echo "FAIL $i" >> $LOG 2>&1 52 | fi 53 | done 54 | 55 | if [ -n "$failed" ]; then 56 | gzip $LOG 57 | ( 58 | echo QGIS MacOS Build Status: 59 | [ -z "$ok" ] || echo ok:$ok 60 | [ -z "$failed" ] || echo failed:$failed 61 | ) | mutt -a $LOG.gz -s "QGIS MacOS Build Failure" -- admin@localhost 62 | 63 | echo "QGIS MacOS Build failed:$failed ok:$ok" 64 | exit 1 65 | fi 66 | -------------------------------------------------------------------------------- /scripts/upload_to_qgis2.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # 2019 Peter Petrik (zilolv at gmail dot com) 6 | # GNU General Public License 2 any later version 7 | 8 | PWD=`pwd` 9 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" 10 | 11 | if (( $# != 6 )); then 12 | echo "upload_to_qgis2 release_name log dmg deps status_png sha256sum" 13 | exit 1 14 | fi 15 | 16 | RELEASE=$1 17 | LOG=$2 18 | DMG=$3 19 | DEPS=$4 20 | STATUS=$5 21 | MD5SUM=$6 22 | 23 | KEY="$DIR/../../ssh/id_rsa" 24 | SERVER="qgis-mac-packager-bot@qgis2.qgis.org" 25 | FOLDER="/var/www/downloads/macos" 26 | ROOT="$FOLDER/$RELEASE" 27 | 28 | process_file () { 29 | LOCAL=$1 30 | EXTENSION=$2 31 | FILENAME=$(basename -- "$LOCAL") 32 | REMOTE=$ROOT/$FILENAME 33 | LINK=$FOLDER/qgis-macos-$RELEASE.$EXTENSION 34 | scp -o LogLevel=Error -i $KEY $LOCAL $SERVER:$REMOTE 35 | ssh -o LogLevel=Error -i $KEY $SERVER "rm -f $LINK" 36 | ssh -o LogLevel=Error -i $KEY $SERVER "ln -s $REMOTE $LINK" 37 | } 38 | 39 | echo "Upload $RELEASE to qgis2.qgis.org" 40 | ssh -o LogLevel=Error -i $KEY $SERVER "mkdir -p $ROOT" 41 | 42 | # upload files 43 | if [ -f $DMG ]; then 44 | # success 45 | process_file $DMG dmg 46 | process_file $MD5SUM sha256sum 47 | process_file $DEPS deps 48 | fi 49 | 50 | # success or failure 51 | process_file $LOG latest.log 52 | process_file $STATUS latest.png 53 | --------------------------------------------------------------------------------