Skip to content

Commit

Permalink
fix #153
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterPetrik committed Sep 16, 2021
1 parent bf925f3 commit 5e44673
Show file tree
Hide file tree
Showing 11 changed files with 128 additions and 6 deletions.
1 change: 1 addition & 0 deletions config/dev.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export USE_SEM="true"
export QGIS_321_PROVIDER_NAMES="true"
export WITH_BROTLI="true"
export WITH_RTTOPO="true"
export WITH_LERC="true"
export OLD_PROJ="false"

BASEDIR=/opt/QGIS/qgis-${RELEASE}
Expand Down
1 change: 1 addition & 0 deletions config/ltr.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export USE_SEM="false"
export QGIS_321_PROVIDER_NAMES="false"
export WITH_BROTLI="false" #available from 0.9.0
export WITH_RTTOPO="false" #available from 0.9.0
export WITH_LERC="false" #available from 0.9.0
export OLD_PROJ="true"

BASEDIR=/Users/admin/qgis/builds/${RELEASE}
Expand Down
1 change: 1 addition & 0 deletions config/nightly.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export USE_SEM="false"
export QGIS_321_PROVIDER_NAMES="true"
export WITH_BROTLI="true"
export WITH_RTTOPO="true"
export WITH_LERC="true"
export OLD_PROJ="false"

BASEDIR=/Users/admin/qgis/builds/${RELEASE}
Expand Down
1 change: 1 addition & 0 deletions config/pr.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export USE_SEM="false"
export QGIS_321_PROVIDER_NAMES="false"
export WITH_BROTLI="false" #available from 0.9.0
export WITH_RTTOPO="false" #available from 0.9.0
export WITH_LERC="false" #available from 0.9.0
export OLD_PROJ="true"

BASEDIR=/Users/admin/qgis/builds/${RELEASE}
Expand Down
3 changes: 2 additions & 1 deletion qgis_bundle/recipes/gdal/recipe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ function fix_binaries_gdal() {
$LINK_libcurl \
$LINK_libssh2 \
$LINK_gdal \
$LINK_rttopo
$LINK_rttopo \
$LINK_liblerc
do
install_name_change $DEPS_LIB_DIR/$j @rpath/$j $BUNDLE_CONTENTS_DIR/MacOS/$i
done
Expand Down
33 changes: 33 additions & 0 deletions qgis_bundle/recipes/lerc/recipe.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

function check_lerc() {
if [[ "$WITH_LERC" == "true" ]]; then
env_var_exists VERSION_lerc
fi
}

function bundle_lerc() {
if [[ "$WITH_LERC" == "true" ]]; then
try cp -av $DEPS_LIB_DIR/libLerc.*dylib $BUNDLE_LIB_DIR
fi
}

function fix_binaries_lerc() {
if [[ "$WITH_LERC" == "true" ]]; then
install_name_id @rpath/$LINK_liblerc $BUNDLE_LIB_DIR/$LINK_liblerc
fi
}

function fix_binaries_lerc_check() {
if [[ "$WITH_LERC" == "true" ]]; then
verify_binary $BUNDLE_LIB_DIR/$LINK_liblerc
fi
}

function fix_paths_lerc() {
:
}

function fix_paths_lerc_check() {
:
}
4 changes: 3 additions & 1 deletion qgis_bundle/recipes/libtiff/recipe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ function fix_binaries_libtiff() {
$LINK_jpeg \
$LINK_libwebp \
$LINK_zlib \
$LINK_zstd
$LINK_zstd \
$LINK_webp \
$LINK_liblerc
do
install_name_change $DEPS_LIB_DIR/$i @rpath/$i $BUNDLE_LIB_DIR/$LINK_libtiff
done
Expand Down
4 changes: 2 additions & 2 deletions qgis_bundle/recipes/saga/recipe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function fix_binaries_saga() {
install_name_change $DEPS_LIB_DIR/$LINK_libproj @rpath/$LINK_libproj $BUNDLE_LIB_DIR/saga/libpj_proj4.dylib

for i in \
{WEBSERVICES_FULL} \
${WEBSERVICES_FULL} \
lib/saga/libpointcloud_tools.dylib \
lib/saga/libio_shapes.dylib \
lib/saga/libio_virtual.dylib \
Expand All @@ -133,7 +133,7 @@ function fix_binaries_saga() {
done

for i in \
{WEBSERVICES_FULL} \
${WEBSERVICES_FULL} \
lib/saga/libpointcloud_tools.dylib \
lib/saga/libio_shapes.dylib \
lib/saga/libio_virtual.dylib
Expand Down
2 changes: 2 additions & 0 deletions qgis_deps/recipes/gdal/recipe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ DEPS_gdal=(
unixodbc
spatialite
libcurl
lerc
)

# url of the package
Expand Down Expand Up @@ -177,6 +178,7 @@ function build_gdal() {
try ${CONFIGURE} \
--with-ecw=no \
--with-mrsid=no \
--with-lerc=$STAGE_PATH \
--disable-debug \
--enable-driver-gpkg \
--enable-driver-mbtiles \
Expand Down
73 changes: 73 additions & 0 deletions qgis_deps/recipes/lerc/recipe.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#!/bin/bash

DESC_lerc="Limited Error Raster Compression"

# version of your package
VERSION_lerc=3.0

LINK_liblerc=libLerc.dylib

# dependencies of this recipe
DEPS_lerc=()

# url of the package
URL_lerc=https://github.com/Esri/lerc/archive/refs/tags/v$VERSION_lerc.tar.gz

# md5 of the package
MD5_lerc=916567b67ca55ae037b826717b5940ec

# default build path
BUILD_lerc=$BUILD_PATH/lerc/$(get_directory $URL_lerc)

# default recipe path
RECIPE_lerc=$RECIPES_PATH/lerc

# function called for preparing source code if needed
# (you can apply patch etc here.)
function prebuild_lerc() {
cd $BUILD_lerc

# check marker
if [ -f .patched ]; then
return
fi

touch .patched
}

function shouldbuild_lerc() {
if [ ${STAGE_PATH}/lib/${LINK_liblerc} -nt $BUILD_lerc/.patched ]; then
DO_BUILD=0
fi
}

# function called to build the source code
function build_lerc() {
try mkdir -p $BUILD_PATH/lerc/build-$ARCH
try cd $BUILD_PATH/lerc/build-$ARCH

push_env

try $CMAKE $BUILD_lerc .

check_file_configuration CMakeCache.txt

try $NINJA
try $NINJA install

try install_name_tool -id $STAGE_PATH/lib/$LINK_liblerc $STAGE_PATH/lib/$LINK_liblerc

pop_env
}

# function called after all the compile have been done
function postbuild_lerc() {
verify_binary lib/$LINK_liblerc
}

# function to append information to config file
function add_config_info_lerc() {
append_to_config_file "# lerc-${VERSION_lerc}: ${DESC_lerc}"
append_to_config_file "export VERSION_lerc=${VERSION_lerc}"
append_to_config_file "export LINK_liblerc=${LINK_liblerc}"
}
11 changes: 9 additions & 2 deletions qgis_deps/recipes/libtiff/recipe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ LINK_libtiff=libtiff.5.dylib
LINK_libtiffxx=libtiffxx.5.dylib

# dependencies of this recipe
DEPS_libtiff=(xz zstd webp jpeg)
DEPS_libtiff=(xz zstd webp jpeg lerc zlib)

# url of the package
URL_libtiff=http://download.osgeo.org/libtiff/tiff-${VERSION_libtiff}.tar.gz
Expand Down Expand Up @@ -55,7 +55,14 @@ function build_libtiff() {

push_env

try $CMAKE $BUILD_libtiff .
try $CMAKE \
-DWEBP_SUPPORT=BOOL:ON \
-DLZMA_SUPPORT=BOOL:ON \
-DZSTD_SUPPORT=BOOL:ON \
-DLERC_SUPPORT=BOOL:ON \
-DJPEG_SUPPORT=BOOL:ON \
-DZIP_SUPPORT=BOOL:ON \
$BUILD_libtiff .
check_file_configuration CMakeCache.txt

try $NINJA
Expand Down

0 comments on commit 5e44673

Please sign in to comment.