diff options
author | rakuco <rakuco@FreeBSD.org> | 2016-07-23 20:19:07 +0800 |
---|---|---|
committer | rakuco <rakuco@FreeBSD.org> | 2016-07-23 20:19:07 +0800 |
commit | c6eab874560d641a6d4530753acd8b1735ea566d (patch) | |
tree | e2894ba5e48200a746971de78dc5cf98edea1607 /graphics | |
parent | 1d51767f9f7103d04cbb71e599867b7db6247bc7 (diff) | |
download | freebsd-ports-gnome-c6eab874560d641a6d4530753acd8b1735ea566d.tar.gz freebsd-ports-gnome-c6eab874560d641a6d4530753acd8b1735ea566d.tar.zst freebsd-ports-gnome-c6eab874560d641a6d4530753acd8b1735ea566d.zip |
Allow HDF5 to be found with CMake >= 3.6.0.
CMake's FindHDF5.cmake underwent some refactoring upstream and it now respects
the HDF5_ROOT variable in more places and separates HDF5_LIBRARIES from
HDF5_HL_LIBRARIES.
Do some slight adjustments to the Alembic port for it to continue working with
the upcoming CMake 3.6.1 (they are no-ops with CMake 3.5.2 which is currently
in the ports tree):
- Set HDF5_ROOT via CMAKE_ARGS so that Alembic does not set it to a nonsensical
value.
- Add HDF5_HL_LIBRARIES to ALEMBIC_HDF5_LIBS so that libhdf5_hl.so continues to
be passed to the linker.
PR: 210988
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/alembic/Makefile | 5 | ||||
-rw-r--r-- | graphics/alembic/files/patch-build_AlembicHDF5.cmake | 17 |
2 files changed, 22 insertions, 0 deletions
diff --git a/graphics/alembic/Makefile b/graphics/alembic/Makefile index b3e95c8db7be..b88e13379fa2 100644 --- a/graphics/alembic/Makefile +++ b/graphics/alembic/Makefile @@ -25,6 +25,11 @@ USE_GL= glew glut CMAKE_ARGS= -DBUILD_SHARED_LIBS:BOOL=ON -DUSE_PYALEMBIC:BOOL=OFF +# Alembic < 1.6.0's AlembicHDF5.cmake sets HDF5_ROOT to a bogus value if one is +# not specified, and this confuses CMake >= 3.6.0 which started honoring +# HDF5_ROOT more thoroughly. +CMAKE_ARGS+= -DHDF5_ROOT:PATH="${LOCALBASE}" + post-patch: @${REINPLACE_CMD} -e 's,H5Rdereference,&1,' \ ${WRKSRC}/lib/Alembic/AbcCoreHDF5/HDF5Util.cpp diff --git a/graphics/alembic/files/patch-build_AlembicHDF5.cmake b/graphics/alembic/files/patch-build_AlembicHDF5.cmake new file mode 100644 index 000000000000..76a97477cd95 --- /dev/null +++ b/graphics/alembic/files/patch-build_AlembicHDF5.cmake @@ -0,0 +1,17 @@ +Required by CMake >= 3.6.0, which properly separates HDF5_LIBRARIES (libraries +for the requested language bindings) and HDF5_HL_LIBRARIES (high-level +libraries for the requested language bindings). + +This patch can be removed when Alembic is updated to 1.6.0 or later, which +drops the usage of HDF5's high-level libraries. +--- build/AlembicHDF5.cmake.orig 2016-07-23 11:57:11 UTC ++++ build/AlembicHDF5.cmake +@@ -87,7 +87,7 @@ IF( HDF5_FOUND ) + ENDIF() + SET( ALEMBIC_HDF5_LIB ${HDF5_C_LIBRARIES} ) + SET( ALEMBIC_HDF5_HL_LIB ${HDF5_CXX_LIBRARIES} ) +- SET( ALEMBIC_HDF5_LIBS ${HDF5_LIBRARIES} ) ++ SET( ALEMBIC_HDF5_LIBS ${HDF5_LIBRARIES} ${HDF5_HL_LIBRARIES} ) + SET( ALEMBIC_HDF5_FOUND TRUE ) + + MESSAGE(STATUS "HDF5 INCLUDE PATH: ${ALEMBIC_HDF5_INCLUDE_PATH}" ) |