# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id$ PortSystem 1.0 PortGroup muniversal 1.0 PortGroup github 1.0 name hdf5-lz4-plugin license bsd description An HDF5 plugin supporting LZ4 compression/decompression. long_description ${description} Provides very high throughput compression \ and decompression. Use filter ID = 32004 to access. See \ also http://www.hdfgroup.org/services/filters.html for \ background. set commit 8fa813aa369c15127c551cfdeebe4cbc090b4687 github.setup dectris HDF5Plugin ${commit} version 20130903 revision 3 checksums \ rmd160 03229c8803b5ba198cca61bab8788353d0cc00a2 \ sha256 fda27a3a8698ef53be8cefdb3caa05640c0996f7e16f34365f525e0434218aac depends_lib port:hdf5 \ port:lz4 post-extract { # use installed liblz4 instead delete ${worksrcpath}/lz4.c ${worksrcpath}/lz4.h } # OSX and MacPorts-specific tweaks patchfiles Makefile.patch post-patch { # API change in lz4 reinplace "s/uncompress/decompress_fast/" h5zlz4.c reinplace "s|%%PREFIX%%|${prefix}|g" Makefile } configure { } build.target lib build.env-append CC=${configure.cc} destroot { file mkdir \ ${destroot}${prefix}/lib/hdf5/ \ ${destroot}${prefix}/share/doc/${name}/ \ ${destroot}${prefix}/share/doc/${name}/example system -W ${worksrcpath} \ "install *.dylib* ${destroot}${prefix}/lib/hdf5" copy ${worksrcpath}/LICENSE ${worksrcpath}/HDF5_LZ4.pdf \ ${destroot}${prefix}/share/doc/${name} system -W ${worksrcpath} \ "install example/* ${destroot}${prefix}/share/doc/${name}/example" } notes "Use filter_id = 32004 with H5Pset_filter() to enable lz4 compression."