Skip to content

Commit

Permalink
[field3d] Add new port (#7594)
Browse files Browse the repository at this point in the history
* [field3d] Add new port

* [field3d] Add new port
  • Loading branch information
LilyWangL authored and grdowns committed Aug 16, 2019
1 parent c176532 commit a3135b7
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ports/field3d/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Source: field3d
Version: 1.7.2
Homepage: https://github.com/imageworks/Field3D
Description: An open source library for storing voxel data. It provides C++ classes that handle in-memory storage and a file format based on HDF5 that allows the C++ objects to be written to and read from disk.
Build-Depends: hdf5, boost-regex, boost-thread, boost-program-options, boost-system, openexr, boost-foreach, boost-test, boost-timer, boost-format
13 changes: 13 additions & 0 deletions ports/field3d/fix-build_error.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e9ad44f..45f3fad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -147,7 +147,7 @@ IF ( CMAKE_HOST_UNIX )
${MPI_LIBRARIES} )
ENDIF ( MPI_FOUND )
LIST ( APPEND Field3D_Libraries_Shared
- Iex Half IlmThread Imath
+ Iex-2_3 Half-2_3 IlmThread-2_3 Imath-2_3
pthread dl z )
SET ( Field3D_DSO_Libraries ${Field3D_Libraries_Shared} )
SET ( Field3D_BIN_Libraries Field3D ${Field3D_Libraries_Shared}
35 changes: 35 additions & 0 deletions ports/field3d/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
include(vcpkg_common_functions)

if (VCPKG_TARGET_IS_WINDOWS)
message(FATAL_ERROR "Windows is currently not supported.")
elseif (TRIPLET_SYSTEM_ARCH MATCHES "arm")
message(FATAL_ERROR "ARM is currently not supported.")
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
message(FATAL_ERROR "Error: UWP builds are currently not supported.")
endif()

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO imageworks/Field3D
REF v1.7.2
SHA512 e4ea51310105980f759dce48830db8ae3592ce32a02b246214d8aed9df7a7f5c500314f2daf92196b7a76d648f2909b18112df4c5c3c8949c0676d710dfbf1f2
HEAD_REF master
PATCHES
fix-build_error.patch
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)

vcpkg_install_cmake()

if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

# Handle copyright
file(COPY ${SOURCE_PATH}/COPYING ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/field3d)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/field3d/COPYING ${CURRENT_PACKAGES_DIR}/share/field3d/copyright)

0 comments on commit a3135b7

Please sign in to comment.