Am 1/22/22 um 18:52 schrieb Marco Atzeri:
On 16.01.2022 23:13, Alois Schlögl wrote:
Dear Marco,
attached is the revised version.
In addition, I'm trying also to include the python39-biosig package.
Could you please check whether this would work ?
Cheers,
Alois
Hi Alois,
I finally had some time to work on the package.
See attachment.
Instead of complicating the cygport I decided
to adapt the Makefile.in to be Cygwin aware,
so using a much simple biosig.cygport
It is not perfect, and you could need to adopt
other parts to make the overall consistent.
A better solution will be to use not only Autoconf but also
also Automake so that all platforms will be managed in the same way,
without the need of a lot of customization.
Alternative you can use cmake to obtain a similar results.
Now the DLL's are respecting the Cygwin format
and also the Python 3.9 package is available.
$ nice cygport biosig.cygport list |grep dll
/usr/bin/cygbiosig-3.dll
/usr/bin/cygphysicalunits-3.dll
/usr/lib/libbiosig.dll.a
/usr/lib/libphysicalunits.dll.a
/usr/lib/python3.9/site-packages/biosig.cpython-39-x86_64-cygwin.dll
$ nice cygport biosig.cygport list |grep usr/bin
/usr/bin/bin2rec
/usr/bin/biosig2gdf.exe
/usr/bin/biosig_fhir.exe
/usr/bin/cygbiosig-3.dll
/usr/bin/cygphysicalunits-3.dll
/usr/bin/heka2itx
/usr/bin/physicalunits.exe
/usr/bin/rec2bin
/usr/bin/save2aecg
/usr/bin/save2gdf.exe
/usr/bin/save2scp
please check that I have not missed something
and inadvertently crippled some of the utility.
It seems that the build is unable to use the
libcholmod-devel
libtinyxml2-devel
libraries. I suspect the configure is missing something
I left the static libraries, but they should be superflous
as the shared libs are present.
Regards
Marco
Hi Marco,
thanks for the improvements (especially, libb64 which enables
biosig_fhir, and python-biosig).
Attached is a revised version. Check on playground was successful [1].
Regards,
Alois
[1] https://github.com/cygwin/scallywag/actions/runs/1748211333
--- origsrc/biosig-2.3.3/biosig4c++/Makefile.in 2021-08-13 11:17:15.0 +0200
+++ src/biosig-2.3.3/biosig4c++/Makefile.in 2022-01-22 15:13:42.122963600 +0100
@@ -137,6 +137,7 @@ else
endif
SONAMEVERSION ?= 3
+DLPRE = lib
### TODO: DLEXT does not work correctly on MXE/MINGW
DLDIR = $(libdir)
@@ -160,9 +161,13 @@ ifneq (,$(findstring Darwin, $(shell una
else ifneq (,$(findstring CYGWIN, $(shell uname)))
### TODO: check if this path is useful at all ###
DLEXT = dll
+ DLPRE = cyg
+ DLDIR = $(bindir)
+LIBEXT = dll.a
+BINEXT = .exe
LD = $(CXX)
LDLIBS+= -liconv -lstdc++
- FULLDLEXT = ${SONAMEVERSION}.dll
+ FULLDLEXT = -${SONAMEVERSION}.dll
SONAME_PREFIX = -Wl,-soname=
else ifneq (,$(findstring MINGW, $(shell uname)))
@@ -473,7 +478,9 @@ MinGW64OBJECTS = $(patsubst win32/%.obj
TARGET = save2gdf libbiosig.a
LIB_OBJECTS = libbiosig.a libgdf.a libphysicalunits.a libbiosig.pc
-ifeq (,$(findstring mingw,$(TARGET)))
+ifneq (,$(findstring CYGWIN, $(shell uname)))
+LIB_OBJECTS += $(DLPRE)biosig$(FULLDLEXT) $(DLPRE)gdf$(FULLDLEXT) $(DLPRE)physicalunits$(FULLDLEXT)
+else ifeq (,$(findstring mingw,$(TARGET)))
LIB_OBJECTS += libbiosig.$(DLEXT) libgdf.$(DLEXT) libphysicalunits.$(DLEXT)
endif
BIN_OBJECTS = save2gdf${BINEXT} physicalunits${BINEXT} biosig_fhir${BINEXT} biosig2gdf${BINEXT}
@@ -490,10 +497,11 @@ libbiosig lib: $(LIB_OBJECTS)
CHKSUM_LIBB64 = 20106f0ba95cfd9c35a13c71206643e3fb3e46512df3e2efb2fdbf87116314b2
libb64-1.2.1.zip:
curl -SLO https://downloads.sourceforge.net/project/libb64/libb64/libb64/libb64-1.2.1.zip
- test $(shell sha256sum libb64-1.2.1.zip | cut -d " " -f 1) = $(CHKSUM_LIBB64) || rm libb64-1.2.1.zip
+# test $(shell sha256sum libb64-1.2.1.zip | cut -d " " -f 1) = $(CHKSUM_LIBB64) || rm libb64-1.2.1.zip
libb64-1.2.1/src/cencode.c: libb64-1.2.1.zip
- test $(shell sha256sum libb64-1.2.1.zip | cut -d " " -f 1) = $(CHKSUM_LIBB64) && unzip -o libb64-1.2.1.zip -d .
+# test $(shell sha256sum libb64-1.2.1.zip | cut -d " " -f 1) = $(CHKSUM_LIBB64) && unzip -o libb64-1.2.1.zip -d .
+ unzip -o libb64-1.2.1.zip -d .
touch $@
vpath %.c ./:./t210:./t220:./t240:./test0:./src:./mma
@@ -668,7 +676,7 @@ win32: mexw32 win32mma
win64/%.exe: %.c
$(MinGW64CXX) $(DEFINES) $(MinGW64CFLAGS) "$<" $(MinGW64LIBS) -o "$@"
win64/physicalunits.exe: pu.c
- $(MinGW64CXX) $(DEFINES) $(MinGW64CFLAGS) "$<" $(MinGW64LIBS) -o "$@"
+ $(MinGW64CXX) $(DEFINES) $(MinGW64CFLAGS) "$<" $(MinGW64LIBS) -o "$@"libbiosig.dll
win64: mexw64
@@ -682,16 +690,16 @@ ifeq (,$(findstring Darwin, $(shell unam
ln -sf "$<" "$@"
endif
-libbiosig${FULLDLEXT}:$(OBJECTS)
+$(DLPRE)biosig${FULLDLEXT}:$(OBJECTS)
$(LD) $(LDFLAGS) ${SONAME_PREFIX}"$@" $^ $(SHAREDLIB) $(LDLIBS) -o "$@"
-libgdf${FULLDLEXT}: gdf.o gdftime.o physicalunits.o getlogin.o
+$(DLPRE)gdf${FULLDLEXT}: gdf.o gdftime.o physicalunits.o getlogin.o
$(LD) $(LDFLAGS) ${SONAME_PREFIX}"$@" $^ $(SHAR