Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jul 2016 12:19:07 +0000 (UTC)
From:      Raphael Kubo da Costa <rakuco@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r418962 - in head/graphics/alembic: . files
Message-ID:  <201607231219.u6NCJ7Je022546@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rakuco
Date: Sat Jul 23 12:19:07 2016
New Revision: 418962
URL: https://svnweb.freebsd.org/changeset/ports/418962

Log:
  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

Added:
  head/graphics/alembic/files/patch-build_AlembicHDF5.cmake   (contents, props changed)
Modified:
  head/graphics/alembic/Makefile

Modified: head/graphics/alembic/Makefile
==============================================================================
--- head/graphics/alembic/Makefile	Sat Jul 23 12:10:01 2016	(r418961)
+++ head/graphics/alembic/Makefile	Sat Jul 23 12:19:07 2016	(r418962)
@@ -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

Added: head/graphics/alembic/files/patch-build_AlembicHDF5.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/alembic/files/patch-build_AlembicHDF5.cmake	Sat Jul 23 12:19:07 2016	(r418962)
@@ -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}" )



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607231219.u6NCJ7Je022546>