aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--misc/Makefile1
-rw-r--r--misc/edflib/Makefile37
-rw-r--r--misc/edflib/distinfo3
-rw-r--r--misc/edflib/files/patch-edflib.c11
-rw-r--r--misc/edflib/pkg-descr14
5 files changed, 66 insertions, 0 deletions
diff --git a/misc/Makefile b/misc/Makefile
index 5244631b19ec..bc31cf466df4 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -84,6 +84,7 @@
SUBDIR += dynomite
SUBDIR += e2fsprogs-libblkid
SUBDIR += e2fsprogs-libuuid
+ SUBDIR += edflib
SUBDIR += elixir-mime
SUBDIR += elixir-uuid
SUBDIR += elki
diff --git a/misc/edflib/Makefile b/misc/edflib/Makefile
new file mode 100644
index 000000000000..2853121293f9
--- /dev/null
+++ b/misc/edflib/Makefile
@@ -0,0 +1,37 @@
+# $FreeBSD$
+
+PORTNAME= edflib
+DISTVERSION= 1.19
+CATEGORIES= misc # medicine
+MASTER_SITES= https://www.teuniz.net/edflib/
+DISTNAME= ${PORTNAME}_${DISTVERSION:S/.//}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= C library to read/write EDF+/BDF+ (medical data series) files
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= gmake
+USE_LDCONFIG= yes
+
+MAKE_ARGS= CC=${CC} CFLAGS="${CFLAGS}"
+
+PLIST_FILES= bin/sine_generator \
+ bin/sweep_generator \
+ bin/test_edflib \
+ bin/test_generator \
+ include/edflib.h \
+ lib/libedflib.so
+
+post-build: # https://gitlab.com/Teuniz/EDFlib/-/issues/6
+ @cd ${WRKSRC} && ${CC} ${CFLAGS} ${LDFLAGS} -shared -fPIC -o lib${PORTNAME}.so ${PORTNAME}.c
+
+do-install:
+ ${INSTALL_LIB} ${WRKSRC}/lib${PORTNAME}.so ${STAGEDIR}${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.h ${STAGEDIR}${PREFIX}/include
+.for p in sine_generator sweep_generator test_edflib test_generator
+ ${INSTALL_PROGRAM} ${WRKSRC}/${p} ${STAGEDIR}${PREFIX}/bin
+.endfor
+
+.include <bsd.port.mk>
diff --git a/misc/edflib/distinfo b/misc/edflib/distinfo
new file mode 100644
index 000000000000..09ed2017b95c
--- /dev/null
+++ b/misc/edflib/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1611252122
+SHA256 (edflib_119.tar.gz) = 2c891801eaeca96894cff1cf726634a9f59a1ba513ffc33308e494350a06d242
+SIZE (edflib_119.tar.gz) = 53773
diff --git a/misc/edflib/files/patch-edflib.c b/misc/edflib/files/patch-edflib.c
new file mode 100644
index 000000000000..7668824a1a4f
--- /dev/null
+++ b/misc/edflib/files/patch-edflib.c
@@ -0,0 +1,11 @@
+--- edflib.c.orig 2021-01-21 18:05:07 UTC
++++ edflib.c
+@@ -46,7 +46,7 @@
+ #define EDFLIB_MAXFILES (64)
+
+
+-#if defined(__APPLE__) || defined(__MACH__) || defined(__APPLE_CC__) || defined(__HAIKU__)
++#if defined(__APPLE__) || defined(__MACH__) || defined(__APPLE_CC__) || defined(__HAIKU__) || defined(__FreeBSD__)
+
+ #define fopeno fopen
+
diff --git a/misc/edflib/pkg-descr b/misc/edflib/pkg-descr
new file mode 100644
index 000000000000..fdf421bc12f8
--- /dev/null
+++ b/misc/edflib/pkg-descr
@@ -0,0 +1,14 @@
+EDFlib is a programming library for C/C++ to read/write EDF+/BDF+ files.
+It also reads old-type EDF/BDF files.
+EDF means European Data Format. BDF is the 24-bits version of EDF.
+
+Features:
+* supports reading and writing of 16-bit (EDF) and 24-bit (BDF) resolution
+* supports annotations (events)
+* strives for strict standard compliance, generated files adheres
+ to the standard
+* API supports wide range of sample formats
+* supports multiple annotation channels
+* supports wide range of samplerate combinations
+
+WWW: https://www.teuniz.net/edflib/