# HG changeset patch
# User John Donoghue
# Date 1557423785 14400
# Node ID 01ced44335757db9e762a6c3e9ac02f367a06b89
# Parent fb000475ca162d5c35ded5da9b939da8691ecf42
libbiossig: added new package
* src/libbiosig-1-fixes.patch: new file
* src/libbiosig.mk: new file
* dist-files.mk: new file
* index.html
* binary-dist-rules.mk: add libbiosig as windows dist dependancy
diff -r fb000475ca16 -r 01ced4433575 binary-dist-rules.mk
--- a/binary-dist-rules.mk Fri May 03 13:19:53 2019 -0400
+++ b/binary-dist-rules.mk Thu May 09 13:43:05 2019 -0400
@@ -50,6 +50,9 @@
npp
endif
+ # other packages we want to include
+ WINDOWS_BINARY_DIST_DEPS += \
+ libbiosig
endif
BINARY_DIST_DEPS := \
diff -r fb000475ca16 -r 01ced4433575 dist-files.mk
--- a/dist-files.mk Fri May 03 13:19:53 2019 -0400
+++ b/dist-files.mk Thu May 09 13:43:05 2019 -0400
@@ -217,6 +217,8 @@
libarchive.mk \
libass-test.c \
libass.mk \
+ libbiosig-1-fixes.patch \
+ libbiosig.mk \
libcdio.mk \
libcroco.mk \
libdnet-1-fixes.patch \
diff -r fb000475ca16 -r 01ced4433575 index.html
--- a/index.html Fri May 03 13:19:53 2019 -0400
+++ b/index.html Thu May 09 13:43:05 2019 -0400
@@ -1486,6 +1486,10 @@
libass |
+ libbiosig |
+ libbiosig |
+
+
libcdio |
Libcdio |
diff -r fb000475ca16 -r 01ced4433575 src/libbiosig-1-fixes.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/libbiosig-1-fixes.patch Thu May 09 13:43:05 2019 -0400
@@ -0,0 +1,12 @@
+diff -ur biosig4c++-1.9.4.orig/Makefile.in biosig4c++-1.9.4/Makefile.in
+--- biosig4c++-1.9.4.orig/Makefile.in 2019-05-06 15:20:47.958318279 -0400
++++ biosig4c++-1.9.4/Makefile.in 2019-05-06 15:21:45.810270194 -0400
+@@ -241,7 +241,7 @@
+ LDLIBS += -lsuitesparseconfig
+ endif
+ endif
+-ifeq (1,@HAVE_DCMTK@)
++ifeq (0,@HAVE_DCMTK@)
+ DEFINES += -D=WITH_DCMTK
+ LDLIBS += -ldcmdata -loflog -lofstd
+ SOURCES += t210/sopen_dcmtk_read.cpp
diff -r fb000475ca16 -r 01ced4433575 src/libbiosig.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/libbiosig.mk Thu May 09 13:43:05 2019 -0400
@@ -0,0 +1,82 @@
+# This file is part of MXE.
+# See index.html for further information.
+
+PKG := libbiosig
+$(PKG)_WEBSITE := http://biosig.sf.net/
+$(PKG)_IGNORE :=
+$(PKG)_VERSION := 1.9.4
+$(PKG)_CHECKSUM := 03471cbc9b1a15bd646e7b0b98499964f6246149
+$(PKG)_SUBDIR := biosig4c++-$($(PKG)_VERSION)
+$(PKG)_FILE := biosig4c++-$($(PKG)_VERSION).src.tar.gz
+$(PKG)_URL := https://sourceforge.net/projects/biosig/files/BioSig%20for%20C_C%2B%2B/src/$($(PKG)_FILE)/download
+$(PKG)_DEPS := suitesparse zlib libiberty libiconv lapack
+
+define $(PKG)_UPDATE
+ $(WGET) -q -O- 'http://biosig.sourceforge.net/download.html' | \
+ $(SED) -n 's_.*>libbiosig, version \([0-9]\.[0-9]\.[0-9]\).*tar.gz_\1_ip' | \
+ head -1
+endef
+
+define $(PKG)_BUILD_PRE
+
+ cd '$(1)' && ./configure \
+ ac_cv_func_malloc_0_nonnull=yes \
+ ac_cv_func_realloc_0_nonnull=yes \
+ --prefix=$(HOST_PREFIX) \
+ $(HOST_AND_BUILD_CONFIGURE_OPTIONS)
+
+ # make sure NDEBUG is defined
+ $(SED) -i '/NDEBUG/ s|#||g' '$(1)'/Makefile
+
+ ### disables declaration of sopen from io.h (imported through unistd.h)
+ if [ "$(MXE_SYSTEM)" == "mingw" ]; then \
+ $(SED) -i '/ sopen/ s#^/*#//#g' $(HOST_INCDIR)/io.h; \
+ fi
+
+ #$(SED) -i 's| -fstack-protector | |g' '$(1)'/Makefile
+ #$(SED) -i 's| -D_FORTIFY_SOURCE=2 | |g' '$(1)'/Makefile
+ #$(SED) -i 's| -lssp | |g' '$(1)'/Makefile
+
+ TARGET='$(TARGET)' $(MAKE) -C '$(1)' clean
+ TARGET='$(TARGET)' $(MAKE) -C '$(1)' -j '$(JOBS)' \
+ libbiosig.a libgdf.a libphysicalunits.a
+endef
+
+define $(PKG)_BUILD_POST
+
+ $(INSTALL) -m644 '$(1)/biosig.h' '$(HOST_INCDIR)/'
+ $(INSTALL) -m644 '$(1)/biosig2.h' '$(HOST_INCDIR)/'
+ $(INSTALL) -m644 '$(1)/gdftime.h' '$(HOST_INCDIR)/'
+ $(INSTALL) -m644 '$(1)/biosig-dev.h' '$(HOST_INCDIR)/'
+
+ $(INSTALL) -m644 '$(1)/libbiosig.a' '$(HOST_LIBDIR)/'
+ #$(INSTALL) -m644 '$(1)/libbiosig.def' '$(HOST_LIBDIR)/'
+ #$(INSTALL) -m644 '$(1)/libbiosig.dll.a' '$(HOST_LIBDIR)/'
+ #$(INSTALL) -m644 '$(1)/libbiosig.dll' '$(PREFIX)/$(TARGET)/bin/'
+
+ $(INSTALL) -m644 '$(1)/libgdf.a' '$(HOST_LIBDIR)/'
+ #$(INSTALL) -m644 '$(1)/libgdf.def' '$(HOST_LIBDIR)/'
+ #$(INSTALL) -m644 '$(1)/libgdf.dll.a' '$(HOST_LIBDIR)/'
+ #$(INSTALL) -m644 '$(1)/libgdf.dll' '$(HOST_BINDIR)/'
+
+
+ $(INSTALL) -m644 '$(1)/physicalunits.h' '$(HOST_INCDIR)/'
+ $(INSTALL) -m644 '$(1)/libphysicalunits.a' '$(HOST_LIBDIR)/'
+ #$(INSTALL) -m644 '$(1)/libphysicalunits.def' '$(HOST_LIBDIR)/'
+ #$(INSTALL) -m644 '$(1)/libphysicalunits.dll.a' '$(HOST_LIBDIR)/'
+ #$(INSTALL) -m644 '$(1)/libphysicalunits.dll' '$(HOST_BINDIR)/'
+
+ if [ "$(MXE_WINDOWS_BUILD)" == "yes" ]; then \
+ $(SED) -i '/^Libs:/ s/$$/ -liconv -lws2_32/' $(1)/libbiosig.pc; \
+ fi
+ $(INSTALL) -m644 '$(1)/libbiosig.pc' '$(HOST_LIBDIR)/pkgconfig/'
+
+endef
+
+
+define $(PKG)_BUILD
+ $($(PKG)_BUILD_PRE)
+ TARGET=$(TARGET) CROSS=$(TARGET) $(MAKE) -C '$(1)' libbiosig
+ $($(PKG)_BUILD_POST)
+endef
+