Skip to content

Commit

Permalink
qgis3: add hdf5 as dependency
Browse files Browse the repository at this point in the history
hdf5 is opportunistically linked if found. Also make sure
to find path to 'mpi.h'  if needed.

Closes: https://trac.macports.org/ticket/72100
  • Loading branch information
nilason committed Mar 4, 2025
1 parent 9b1f765 commit 3954cc3
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions gis/qgis3/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if {${subport} eq ${name}} {
# Latest version
github.setup qgis QGIS 3_42_0 final-
github.tarball_from archive
revision 0
revision 1
set app_name QGIS3

checksums rmd160 b89f5717b4daceb4a6c31634efc25eebe430187b \
Expand All @@ -37,7 +37,7 @@ if {${subport} eq ${name}} {
# LTR version
github.setup qgis QGIS 3_40_4 final-
github.tarball_from archive
revision 0
revision 1
set app_name QGIS3-LTR
description {*}${description} (LTR)

Expand Down Expand Up @@ -82,6 +82,7 @@ depends_lib-append port:draco \
port:gdal-pdf \
port:geos \
port:gsl \
port:hdf5 \
port:libiconv \
port:libtasn1 \
port:libzip \
Expand Down Expand Up @@ -125,24 +126,21 @@ post-patch {
cmake.install_prefix ${applications_dir}

pre-configure {
# If GDAL is built with +hdf5 variant, QGIS needs to know the path to "mpi.h"
if {[active_variants gdal hdf5]} {
# Figure out HDF5's mpi include directory
set mpl_include_dir ""
if {![catch {set result [active_variants hdf5 openmpi]}]} {
if {$result} {
set mpl_include_dir "-I${prefix}/include/openmpi-mp"
}
}
if {![catch {set result [active_variants hdf5 mpich]}]} {
if {$result} {
set mpl_include_dir "-I${prefix}/include/mpich-mp"
}
# Figure out HDF5's mpi include directory
set mpl_include_dir ""
if {![catch {set result [active_variants hdf5 openmpi]}]} {
if {$result} {
set mpl_include_dir "-I${prefix}/include/openmpi-mp"
}
if {$mpl_include_dir ne ""} {
configure.cxxflags-append ${mpl_include_dir}
}
if {![catch {set result [active_variants hdf5 mpich]}]} {
if {$result} {
set mpl_include_dir "-I${prefix}/include/mpich-mp"
}
}
if {$mpl_include_dir ne ""} {
configure.cxxflags-append ${mpl_include_dir}
}
}

configure.args-append \
Expand Down

0 comments on commit 3954cc3

Please sign in to comment.