openvdb-6.2.1.recipe revision 1ba89dcd
1SUMMARY="Libs for the efficient manipulation of volumetric data"
2DESCRIPTION="The OpenVDB library comprises a hierarchical data structure and \
3a suite of tools for the efficient manipulation of sparse, possibly \
4time-varying, volumetric data discretized on a three-dimensional grid."
5HOMEPAGE="http://www.openvdb.org/"
6COPYRIGHT="2012-2018 DreamWorks Animation LLC"
7LICENSE="MPL v2.0"
8REVISION="1"
9SOURCE_URI="https://github.com/AcademySoftwareFoundation/openvdb/archive/v$portVersion.tar.gz"
10CHECKSUM_SHA256="d4dd17ad571d4dd048f010e6f4b7657391960ed73523ed1716a17e7cf1806f71"
11
12ARCHITECTURES="?x86_gcc2 x86 x86_64"
13SECONDARY_ARCHITECTURES="x86"
14
15libVersion="$portVersion"
16libVersionCompat="$libVersion compat >= ${libVersion%.*}"
17
18PROVIDES="
19	openvdb$secondaryArchSuffix = $portVersion
20	lib:libopenvdb$secondaryArchSuffix = $libVersionCompat
21	"
22REQUIRES="
23	haiku$secondaryArchSuffix
24	lib:libblosc$secondaryArchSuffix
25	lib:libboost_iostreams$secondaryArchSuffix
26	lib:libboost_system$secondaryArchSuffix
27	lib:libboost_thread$secondaryArchSuffix
28	lib:libcppunit$secondaryArchSuffix
29	lib:libHalf_2_4$secondaryArchSuffix
30	lib:libtbb$secondaryArchSuffix
31	lib:libz$secondaryArchSuffix
32	"
33
34PROVIDES_tools="
35	openvdb${secondaryArchSuffix}_tools = $portVersion
36	cmd:vdb_print
37	"
38REQUIRES_tools="
39	haiku$secondaryArchSuffix
40	lib:libblosc$secondaryArchSuffix
41	lib:libboost_iostreams$secondaryArchSuffix
42	lib:libboost_regex$secondaryArchSuffix
43	lib:libboost_system$secondaryArchSuffix
44	lib:libHalf_2_4$secondaryArchSuffix
45	lib:libopenvdb$secondaryArchSuffix
46	lib:libtbb$secondaryArchSuffix
47	lib:libtbbmalloc$secondaryArchSuffix
48	lib:libtbbmalloc_proxy$secondaryArchSuffix
49	lib:libz$secondaryArchSuffix
50	"
51
52PROVIDES_devel="
53	openvdb${secondaryArchSuffix}_devel = $portVersion
54	devel:libopenvdb$secondaryArchSuffix = $libVersion
55	"
56REQUIRES_devel="
57	openvdb$secondaryArchSuffix == $portVersion base
58	"
59
60BUILD_REQUIRES="
61	haiku${secondaryArchSuffix}_devel
62	devel:libblosc$secondaryArchSuffix
63	devel:libboost_iostreams$secondaryArchSuffix >= 1.69.0
64	devel:libboost_system$secondaryArchSuffix >= 1.69.0
65	devel:libboost_thread$secondaryArchSuffix >= 1.69.0
66	devel:libcppunit$secondaryArchSuffix
67	devel:libHalf_2_4$secondaryArchSuffix
68	devel:libtbb$secondaryArchSuffix
69	devel:libz$secondaryArchSuffix
70	"
71BUILD_PREREQUIRES="
72	cmd:cmake
73	cmd:g++$secondaryArchSuffix
74	cmd:make
75	cmd:pkg_config$secondaryArchSuffix
76	"
77
78defineDebugInfoPackage openvdb$secondaryArchSuffix \
79	$libDir/libopenvdb.so.$libVersion
80
81BUILD()
82{
83	mkdir -p haiku_build
84	cd haiku_build
85
86	cmake .. \
87		-DTBB_ROOT="$portPackageLinksDir/devel~libtbb$secondaryArchSuffix/$relativeDevelopDir/" \
88		-DTBB_INCLUDEDIR="$portPackageLinksDir/devel~libtbb$secondaryArchSuffix/$relativeIncludeDir/" \
89		-DTBB_LIBRARYDIR="$portPackageLinksDir/devel~libtbb$secondaryArchSuffix/$relativeDevelopLibDir/" \
90		-DOPENVDB_BUILD_PYTHON_MODULE=OFF \
91		$cmakeDirArgs
92
93	make $jobArgs
94}
95
96INSTALL()
97{
98	cd haiku_build
99	make install
100
101	# move include dir to correct location
102	mkdir -p $(dirname $includeDir)
103	mv $prefix/include $includeDir
104
105	mv $prefix/lib $prefix/lib2
106	mkdir -p $(dirname $libDir)
107	mv $prefix/lib2 $libDir
108
109	prepareInstalledDevelLib libopenvdb
110
111	packageEntries devel \
112		$developDir \
113		$libDir/cmake
114
115	packageEntries tools $prefix/bin
116}
117
118TEST()
119{
120	cd haiku_build
121	make test
122}
123