[131336] trunk/dports/science

eborisch at macports.org eborisch at macports.org
Fri Jan 9 20:19:30 PST 2015


Revision: 131336
          https://trac.macports.org/changeset/131336
Author:   eborisch at macports.org
Date:     2015-01-09 20:19:30 -0800 (Fri, 09 Jan 2015)
Log Message:
-----------
hdf5-lz4-plugin: New port; adds lz4 de/compressor as plugin to HDF5.

Added Paths:
-----------
    trunk/dports/science/hdf5-lz4-plugin/
    trunk/dports/science/hdf5-lz4-plugin/Portfile
    trunk/dports/science/hdf5-lz4-plugin/files/
    trunk/dports/science/hdf5-lz4-plugin/files/Makefile.patch

Added: trunk/dports/science/hdf5-lz4-plugin/Portfile
===================================================================
--- trunk/dports/science/hdf5-lz4-plugin/Portfile	                        (rev 0)
+++ trunk/dports/science/hdf5-lz4-plugin/Portfile	2015-01-10 04:19:30 UTC (rev 131336)
@@ -0,0 +1,64 @@
+# -*- 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
+
+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."


Property changes on: trunk/dports/science/hdf5-lz4-plugin/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/science/hdf5-lz4-plugin/files/Makefile.patch
===================================================================
--- trunk/dports/science/hdf5-lz4-plugin/files/Makefile.patch	                        (rev 0)
+++ trunk/dports/science/hdf5-lz4-plugin/files/Makefile.patch	2015-01-10 04:19:30 UTC (rev 131336)
@@ -0,0 +1,46 @@
+--- ./Makefile	2013-09-03 04:20:45.000000000 -0500
++++ /Users/m028373/src/macports/trunk/science/hdf5-lz4-plugin/Makefile	2015-01-02 16:15:07.000000000 -0600
+@@ -1,7 +1,7 @@
+-CFLAGS = -fPIC -g -O3 -std=c99
++CFLAGS += -fPIC -std=c99
+-CC = gcc
++CC ?= gcc
+ # install directory of HDF5 1.8.11 #
+-HDF5_INSTALL = /home/det/hdf5-1.8.11/hdf5/
++HDF5_INSTALL = %%PREFIX%%
+ MAJOR = 0
+ MINOR = 2
+ NAME1 = h5zlz4
+@@ -10,7 +10,7 @@
+ 
+ INCLUDES = -I./ -I$(HDF5_INSTALL)/include 
+ 
+-lib: lib$(NAME1).so.$(VERSION)
++lib: lib$(NAME1).dylib.$(VERSION)
+ 
+ $(NAME1).o: $(NAME1).c
+ 	$(CC) $(CFLAGS) $(INCLUDES) -c $(NAME1).c 
+@@ -19,13 +19,15 @@
+ 	$(CC) $(CFLAGS) $(INCLUDES) -c lz4.c
+ 
+ 
+-lib$(NAME1).so.$(VERSION): $(NAME1).o lz4.o
+-	#$(CC) -shared -Wl,soname,lib$(NAME1).so.$(MAJOR) $^ -o $@ 
+-	$(CC) -shared  $^ -o $@ 
+-	ln -sf lib$(NAME1).so.$(VERSION) lib$(NAME1).so
+-	ln -sf lib$(NAME1).so.$(VERSION) lib$(NAME1).so.$(MAJOR)
++lib$(NAME1).dylib.$(VERSION): $(NAME1).o 
++	$(CC) $^ -o $@ \
++	      -dynamiclib \
++	      -Wl,-install_name,%%PREFIX%%/lib/hdf5/$@ \
++	      -L%%PREFIX%%/lib/ -llz4
++	ln -sf lib$(NAME1).dylib.$(VERSION) lib$(NAME1).dylib
++	ln -sf lib$(NAME1).dylib.$(VERSION) lib$(NAME1).dylib.$(MAJOR)
+ clean:
+-	$(RM) *.o *.so*
++	$(RM) *.o *.dylib*
+ 
+ distclean:		
+-	$(RM) *.o *.so*
+\ No newline at end of file
++	$(RM) *.o *.dylib*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150109/b0d7dd16/attachment.html>


More information about the macports-changes mailing list