# HG changeset patch
# User Alois Schlögl <alois.schloegl@gmx.net>
# Date 1592421721 -7200
#      Wed Jun 17 21:22:01 2020 +0200
# Node ID 9f1122c6ce222b35b3ce06f96abd54ea2aa54100
# Parent  7070e133865c5ba31e1d3f12ccc01399e034ee61
libbiosig: Update to v2.0.3

* src/libbiosig.mk: Update version, checksum and filename. Update update rule.
Replace tabs with spaces.

* src/libbiosig-1-fixes.patch: Remove patch applied upstream.

* dist-files.mk: Remove file from list.

diff -r 7070e133865c -r 9f1122c6ce22 dist-files.mk
--- a/dist-files.mk	Wed Jun 17 20:16:03 2020 +0200
+++ b/dist-files.mk	Wed Jun 17 21:22:01 2020 +0200
@@ -217,7 +217,6 @@
   libarchive.mk \
   libass-test.c \
   libass.mk \
-  libbiosig-1-fixes.patch \
   libbiosig.mk \
   libcdio.mk \
   libcroco.mk \
diff -r 7070e133865c -r 9f1122c6ce22 src/libbiosig-1-fixes.patch
--- a/src/libbiosig-1-fixes.patch	Wed Jun 17 20:16:03 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-diff --git "a/biosig.c" "b/biosig.c"
-index 5872cef..ed7b64a 100644
---- "a/biosig.c"	
-+++ "b/biosig.c"
-@@ -53,7 +53,26 @@
- #include <locale.h>
- #include <math.h>      // define macro isnan()
- #include <stdlib.h>
-+#ifdef _WIN32
-+// Can't include sys/stat.h or sopen is declared twice.
-+#include <sys/types.h>
-+struct stat {
-+  _dev_t st_dev;
-+  _ino_t st_ino;
-+  unsigned short st_mode;
-+  short st_nlink;
-+  short st_uid;
-+  short st_gid;
-+  _dev_t st_rdev;
-+  _off_t st_size;
-+  time_t st_atime;
-+  time_t st_mtime;
-+  time_t st_ctime;
-+};
-+int __cdecl stat(const char *_Filename,struct stat *_Stat);
-+#else
- #include <sys/stat.h>
-+#endif
- 
- 
- #ifdef WITH_CURL
-
-diff --git "a/t210/sopen_heka_read.c" "b/t210/sopen_heka_read.c"
-index d256a15..6025211 100644
---- "a/t210/sopen_heka_read.c"	
-+++ "b/t210/sopen_heka_read.c"
-@@ -24,7 +24,26 @@
- #include <ctype.h>
- #include <stdlib.h>
- #include <string.h>
-+#ifdef _WIN32
-+// Can't include sys/stat.h or sopen is declared twice.
-+#include <sys/types.h>
-+struct stat {
-+  _dev_t st_dev;
-+  _ino_t st_ino;
-+  unsigned short st_mode;
-+  short st_nlink;
-+  short st_uid;
-+  short st_gid;
-+  _dev_t st_rdev;
-+  _off_t st_size;
-+  time_t st_atime;
-+  time_t st_mtime;
-+  time_t st_ctime;
-+};
-+int __cdecl stat(const char *_Filename,struct stat *_Stat);
-+#else
- #include <sys/stat.h>
-+#endif
- 
- #include "../biosig.h"
- 
-
-diff --git "a/test0/sandbox.c" "b/test0/sandbox.c"
-index eed47b7..309c009 100644
---- "a/test0/sandbox.c"	
-+++ "b/test0/sandbox.c"
-@@ -26,7 +26,26 @@
- #include <ctype.h>
- #include <stdlib.h>
- #include <string.h>
-+#ifdef _WIN32
-+// Can't include sys/stat.h or sopen is declared twice.
-+#include <sys/types.h>
-+struct stat {
-+  _dev_t st_dev;
-+  _ino_t st_ino;
-+  unsigned short st_mode;
-+  short st_nlink;
-+  short st_uid;
-+  short st_gid;
-+  _dev_t st_rdev;
-+  _off_t st_size;
-+  time_t st_atime;
-+  time_t st_mtime;
-+  time_t st_ctime;
-+};
-+int __cdecl stat(const char *_Filename,struct stat *_Stat);
-+#else
- #include <sys/stat.h>
-+#endif
- 
- #include "../biosig.h"
- 
-
diff -r 7070e133865c -r 9f1122c6ce22 src/libbiosig.mk
--- a/src/libbiosig.mk	Wed Jun 17 20:16:03 2020 +0200
+++ b/src/libbiosig.mk	Wed Jun 17 21:22:01 2020 +0200
@@ -4,19 +4,17 @@
 PKG             := libbiosig
 $(PKG)_WEBSITE  := http://biosig.sf.net/
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 2.0.1
-$(PKG)_CHECKSUM := 31812a48bb1df28404eba7b5d3b150f30f587826
-$(PKG)_SUBDIR   := biosig4c++-$($(PKG)_VERSION)
-$(PKG)_FILE     := biosig4c++-$($(PKG)_VERSION).src.tar.gz
+$(PKG)_VERSION  := 2.0.3
+$(PKG)_CHECKSUM := 5e2639689a35190560cc8338f561febd54956344
+$(PKG)_SUBDIR   := biosig-$($(PKG)_VERSION)
+$(PKG)_FILE     := biosig-$($(PKG)_VERSION).src.tar.gz
 $(PKG)_URL      := https://sourceforge.net/projects/biosig/files/BioSig%20for%20C_C%2B%2B/src/$($(PKG)_FILE)
 $(PKG)_DEPS     := suitesparse zlib libiberty libiconv lapack tinyxml dcmtk
 
 define $(PKG)_UPDATE
     $(WGET) -q -O- 'https://biosig.sourceforge.io/download.html' | \
-        $(GREP) biosig4c | \
         $(SED) -n 's_.*>v\([0-9]\.[0-9]\.[0-9]\)<.*_\1_p' | \
-        $(SORT) -V | \
-        tail -1
+        head -1
 endef
 
 define $(PKG)_BUILD_PRE
@@ -24,7 +22,7 @@
     cd '$(1)' && ./configure \
         ac_cv_func_malloc_0_nonnull=yes \
         ac_cv_func_realloc_0_nonnull=yes \
-	--prefix=$(HOST_PREFIX) \
+        --prefix=$(HOST_PREFIX) \
         $(HOST_AND_BUILD_CONFIGURE_OPTIONS)
 
     # make sure NDEBUG is defined
@@ -36,8 +34,8 @@
 
     TARGET='$(TARGET)' $(MAKE) -C '$(1)' clean
     TARGET='$(TARGET)' $(MAKE) -C '$(1)' -j '$(JOBS)' \
-		libbiosig.a libgdf.a libphysicalunits.a \
-    		libbiosig.def libgdf.def libphysicalunits.def
+                libbiosig.a libgdf.a libphysicalunits.a \
+                libbiosig.def libgdf.def libphysicalunits.def
 
 endef
 
@@ -49,14 +47,14 @@
     $(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' 	 '$(HOST_BINDIR)/'
+    #$(INSTALL) -m644 '$(1)/libbiosig.def'        '$(HOST_LIBDIR)/'
+    $(INSTALL) -m644 '$(1)/libbiosig.dll.a'      '$(HOST_LIBDIR)/'
+    $(INSTALL) -m644 '$(1)/libbiosig.dll'        '$(HOST_BINDIR)/'
 
     $(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)/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)/'
