changeset 5467:65342965d7f8

libbiosig: Update to v2.0.3 (patch #9944). * src/libbiosig.mk: Update version, checksum and filename. Update update rule. Update build rule. * src/libbiosig-1-fixes.patch: Remove patch applied upstream. * dist-files.mk: Remove file from list.
author Alois Schlögl <alois.schloegl@gmx.net>
date Wed, 17 Jun 2020 21:22:01 +0200
parents 7070e133865c
children 3940a36c1aa6
files dist-files.mk src/libbiosig-1-fixes.patch src/libbiosig.mk
diffstat 3 files changed, 50 insertions(+), 160 deletions(-) [+]
line wrap: on
line diff
--- 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 \
--- 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"
- 
-
--- 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,78 +4,65 @@
 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
-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
-
-    #$(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 \
-    		libbiosig.def libgdf.def libphysicalunits.def
-
-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' 	 '$(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)/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/'
-
+        head -1
 endef
 
 
 define $(PKG)_BUILD
-    $($(PKG)_BUILD_PRE)
-    TARGET=$(TARGET) CROSS=$(TARGET) $(MAKE) -C '$(1)' libbiosig
-    $($(PKG)_BUILD_POST)
+    cd '$(1)/biosig4c++' && ../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)'/biosig4c++/Makefile
+
+    #$(SED) -i 's| -fstack-protector | |g' '$(1)'/biosig4c++/Makefile
+    #$(SED) -i 's| -D_FORTIFY_SOURCE=2 | |g' '$(1)'/biosig4c++/Makefile
+    #$(SED) -i 's| -lssp | |g' '$(1)'/biosig4c++/Makefile
+
+  
+    TARGET=$(TARGET) CROSS=$(TARGET) $(MAKE) -C '$(1)/biosig4c++' libbiosig
+
+
+    # install files
+    $(INSTALL) -m644 '$(1)/biosig4c++/biosig.h'             '$(HOST_INCDIR)/'
+    $(INSTALL) -m644 '$(1)/biosig4c++/biosig2.h'            '$(HOST_INCDIR)/'
+    $(INSTALL) -m644 '$(1)/biosig4c++/gdftime.h'            '$(HOST_INCDIR)/'
+    $(INSTALL) -m644 '$(1)/biosig4c++/biosig-dev.h'         '$(HOST_INCDIR)/'
+
+    $(INSTALL) -m644 '$(1)/biosig4c++/libbiosig.a'          '$(HOST_LIBDIR)/'
+    #$(INSTALL) -m644 '$(1)/biosig4c++/libbiosig.def'        '$(HOST_LIBDIR)/'
+    $(INSTALL) -m644 '$(1)/biosig4c++/libbiosig.dll.a'      '$(HOST_LIBDIR)/'
+    $(INSTALL) -m644 '$(1)/biosig4c++/libbiosig.dll'        '$(HOST_BINDIR)/'
+
+    $(INSTALL) -m644 '$(1)/biosig4c++/libgdf.a'             '$(HOST_LIBDIR)/'
+    #$(INSTALL) -m644 '$(1)/biosig4c++/libgdf.def'           '$(HOST_LIBDIR)/'
+    $(INSTALL) -m644 '$(1)/biosig4c++/libgdf.dll.a'         '$(HOST_LIBDIR)/'
+    $(INSTALL) -m644 '$(1)/biosig4c++/libgdf.dll'           '$(HOST_BINDIR)/'
+
+
+    $(INSTALL) -m644 '$(1)/biosig4c++/physicalunits.h'      '$(HOST_INCDIR)/'
+    $(INSTALL) -m644 '$(1)/biosig4c++/libphysicalunits.a'   '$(HOST_LIBDIR)/'
+    #$(INSTALL) -m644 '$(1)/biosig4c++/libphysicalunits.def' '$(HOST_LIBDIR)/'
+    $(INSTALL) -m644 '$(1)/biosig4c++/libphysicalunits.dll.a' '$(HOST_LIBDIR)/'
+    $(INSTALL) -m644 '$(1)/biosig4c++/libphysicalunits.dll' '$(HOST_BINDIR)/'
+
+    if [ "$(MXE_WINDOWS_BUILD)" == "yes" ]; then \
+        $(SED) -i '/^Libs:/ s/$$/ -liconv -lws2_32/' $(1)/biosig4c++/libbiosig.pc; \
+    fi
+    $(INSTALL) -m644 '$(1)/biosig4c++/libbiosig.pc'         '$(HOST_LIBDIR)/pkgconfig/'
+
 endef