public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: "Alois Schlögl" <alois.schloegl@gmail.com>
To: cygwin-apps@cygwin.com
Subject: [ITP] biosig [was: Re: newcomer issues when packaging biosig, stimfit, etc.]
Date: Wed, 12 Jan 2022 23:59:39 +0100	[thread overview]
Message-ID: <fdfc7b33-cc55-3da7-908a-66222695ee66@gmail.com> (raw)
In-Reply-To: <3a18d77a-0339-0702-fdab-ff40cac8d25a@SystematicSw.ab.ca>

[-- Attachment #1: Type: text/plain, Size: 1612 bytes --]



Am 1/12/22 um 06:47 schrieb Marco Atzeri:
>> In the meantime, please find below the status for the libb64 and 
>> biosig packages.
>
>> Thanks that was helpful. Attached is an updated version for biosig 
>> and libb64.
>>
>> cygport libb64.cygport all
>> cygport biosig.cygport all
>>
>> runs now w/o error. How can I test whether result can be installed 
>> and used ?
>
> One major problem.
> Never build in the source directory, the final src.patch
> must fit with you desired patch.
> So only what you patched should come out.
>
> For this package that does not respect the build in a
> different directory than source, you shoud start
> with something like:
>
> src_compile() {
>         cd ${S}
>         lndirs
>         cd ${B}
>         cygautoreconf
>         cygconf
>         cygmake
> } 



I've adapted biosig.cygport accordingly and addressed this in the 
attached version. It runs fine when doing

    cygport biosig.cygport all

runs w/o error. Also testing the package with

tar -C / -xvf 
biosig-2.3.3-1.x86_64/dist/biosig/biosig-tools/biosig-tools-2.3.3-1.tar.xz
tar -C / -xvf 
biosig-2.3.3-1.x86_64/dist/biosig/libbiosig/libbiosig-2.3.3-1.tar.xz
tar -C / -xvf 
biosig-2.3.3-1.x86_64/dist/biosig/libbiosig-devel/libbiosig-devel-2.3.3-1.tar.xz

and running
    save2gdf -h
works fine.

Moreover, I understand now why my libb64.cygport file is not ready. 
ecause libb64 is not necessary for libbiosig's support of Stimfit, I'll 
omit libb64 for now.
Would you please check whether Biosig is ready to be included in cygwin ?


Cheers,
    Alois

[-- Attachment #2: biosig.cygport --]
[-- Type: text/plain, Size: 3379 bytes --]

# package name
NAME="biosig"
VERSION=2.3.3
RELEASE=1

# .hint generation
CATEGORY="Libs,Science"
SUMMARY="Tools for biomedical signal processing."
DESCRIPTION="BioSig is an open source software library for 
biomedical signal processing, featuring for example the 
analysis of biosignals such as the electroencephalogram (EEG), 
electrocorticogram (ECoG), electrocardiogram (ECG), 
electrooculogram (EOG), electromyogram (EMG), respiration, 
and so on. Major application areas are: Neuroinformatics, 
brain-computer interfaces, neurophysiology, psychology, c
ardiovascular systems and sleep research. The aim of the 
BioSig project is to foster research in biomedical signal 
processing by providing open source software tools for many 
different applications. Generally, many concerns have to be a
ddressed in this scientific field. BioSig handles this by providing 
solutions for data acquisition, artifact processing, quality control, 
feature extraction, classification, modeling, data visualization, etc. "

# source and patch files
SRC_URI="https://sourceforge.net/projects/biosig/files/BioSig%20for%20C_C%2B%2B/src/biosig-2.3.3.src.tar.gz"

# PATCH_URI="biosig-2.3.3-fix-build.patch"

# use the standard src_compile, src_install and src_test


PKG_NAMES="libbiosig libbiosig-devel biosig-tools"

biosig_tools_CONTENTS="
  usr/bin/save2gdf.exe
  usr/bin/physicalunits.exe
  usr/bin/biosig2gdf.exe
  usr/share/man/man1/save2gdf.1.gz  
  usr/share/man/man1/biosig2gdf.1.gz
  usr/share/man/man1/biosig_fhir.1.gz  
  usr/share/man/man1/physicalunits.1.gz

  usr/share/doc/biosig/COPYING
  usr/share/doc/biosig/README
"
# not included yet
# usr/share/man/biosig_fhir.1  usr/share/man/sigviewer.1


libbiosig_CONTENTS="
  usr/bin/libbiosig.dll
  usr/bin/libphysicalunits.dll
"

libbiosig_devel_CONTENTS="
  usr/include/biosig-dev.h 
  usr/include/biosig.h 
  usr/include/biosig2.h 
  usr/include/gdftime.h 
  usr/include/physicalunits.h 
  usr/include/biosig-network.h
  usr/include/mdc_ecg_codes.h

  usr/lib/libbiosig.a
  usr/lib/libbiosig.dll.a 
  usr/lib/libphysicalunits.a
  usr/lib/libphysicalunits.dll.a 
  usr/lib/pkgconfig/libbiosig.pc
"

DIFF_EXCLUDES="depend"

# use not standard src_compile, src_install and src_test

src_compile() {
        cd ${S}
        lndirs
        cd ${B}
        cygautoreconf
        cygconf  # --prefix=/usr
	# libbiosig
	cygmake lib
	# biosig-tools w/o biosig_fhir
	cygmake -C biosig4c++ save2gdf physicalunits biosig2gdf
	# python3-biosig
}

src_install() {
	cd ${S}

	doinclude ${S}/biosig4c++/*.h
	
	dobin ${B}/biosig4c++/save2gdf.exe 
        # dobin ${B}/biosig4c++/biosig_fhir.exe
	dobin ${B}/biosig4c++/biosig2gdf.exe 
	dobin ${B}/biosig4c++/physicalunits.exe 
	dobin ${B}/biosig4c++/libbiosig.dll 
	dobin ${B}/biosig4c++/libphysicalunits.dll 

	dolib ${B}/biosig4c++/libbiosig.dll.a 
	dolib ${B}/biosig4c++/libbiosig.a 
	dolib ${B}/biosig4c++/libphysicalunits.dll.a 
	dolib ${B}/biosig4c++/libphysicalunits.a 

        dopkgconfig ${B}/biosig4c++/libbiosig.pc

	# doman ${S}/biosig4c++/doc/bin2rec.1
        doman ${S}/biosig4c++/doc/biosig2gdf.1
        doman ${S}/biosig4c++/doc/biosig_fhir.1
        doman ${S}/biosig4c++/doc/physicalunits.1
        doman ${S}/biosig4c++/doc/save2gdf.1

}

src_test() {
    cd ${S}
    biosig4c++/physicalunits.exe
    biosig4c++/save2gdf.exe  --help
    # biosig4c++/biosig_fhir.exe --help
}


[-- Attachment #3: biosig-2.3.3-1.hint --]
[-- Type: text/plain, Size: 1293 bytes --]

# comment
sdesc: "Tools for biomedical signal processing"
ldesc: "Library for biomedical signal processing, 
featuring for example the analysis of biosignals such 
as the electroencephalogram (EEG), electrocorticogram (ECoG), 
electrocardiogram (ECG), electrooculogram (EOG), electromyogram (EMG), 
respiration, etc. Major application areas are: Neuroinformatics, 
brain-computer interfaces, neurophysiology, psychology, 
cardiovascular systems and sleep research. The aim of the 
BioSig project is to foster research in biomedical signal 
processing by providing open source software tools for many 
different applications. Generally, many concerns have to be addressed 
in this scientific field. BioSig handles this by providing solutions for 
data acquisition, artifact processing, quality control, feature extraction, 
classification, modeling, data visualization, etc. "
category: Libs,Science,Utils
requires: libb64 libcholmod tinyxml cygwin
# depends: version-relation[, version-relation...]
# obsoletes: version-relation[, version-relation...]
# provides: package[, package...]
# conflicts: version-relation[, version-relation...]
external-source: release/biosig/biosig-2.3.3-1-src.tar.xz
# message: id "some text"
test:
version: 2.3.3
# disable-check: check-name [check-name...]






[-- Attachment #4: biosig-2.3.3-1.src.patch --]
[-- Type: text/x-patch, Size: 4871 bytes --]

--- origsrc/biosig-2.3.3/Makefile	2021-08-13 11:17:24.000000000 +0200
+++ src/biosig-2.3.3/Makefile	2022-01-12 21:54:44.813446500 +0100
@@ -30,13 +30,13 @@ R: lib
 
 install ::
 	$(MAKE) -C biosig4c++ install
-	install -d $(DESTDIR)/usr/local/share/biosig/matlab
-	cp -r biosig4matlab/* $(DESTDIR)/usr/local/share/biosig/matlab/
-	-rm -rf $(DESTDIR)/usr/local/share/biosig/matlab/maybe-missing
+	install -d $(DESTDIR)/usr/share/biosig/matlab
+	cp -r biosig4matlab/* $(DESTDIR)/usr/share/biosig/matlab/
+	-rm -rf $(DESTDIR)/usr/share/biosig/matlab/maybe-missing
 
 uninstall ::
 	$(MAKE) -C biosig4c++ uninstall
-	-rm -rf $(DESTDIR)/usr/local/share/biosig
+	-rm -rf $(DESTDIR)/usr/share/biosig
 
 clean ::
 	$(MAKE) -C biosig4c++/mma clean
@@ -52,8 +52,8 @@ distclean : clean
 		biosig4c++/python/setup.py \
 		biosig4c++/R/DESCRIPTION
 
-ifneq (:,/usr/bin/java)
-ifneq (:,/usr/bin/javac)
+ifneq (:,:)
+ifneq (:,:)
 first :: lib
 	-$(MAKE) -C biosig4c++/java
 endif
@@ -92,11 +92,11 @@ biosig4octave ::
 	ln -sf biosig4c++/mex/biosig4octave-2.3.3.src.tar.gz
 
 ifneq (:,/usr/bin/octave)
-ifneq (:,/usr/bin/mkoctfile)
+ifneq (:,:)
 BIOSIG_MEX_DIR = $(DESTDIR)$(shell octave-config -p LOCALOCTFILEDIR)/biosig
 BIOSIG_DIR     = $(DESTDIR)$(shell octave-config -p LOCALFCNFILEDIR)/biosig
 first ::
-	MKOCTFILE="/usr/bin/mkoctfile" $(MAKE) -C biosig4c++/mex mex4o
+	MKOCTFILE=":" $(MAKE) -C biosig4c++/mex mex4o
 install ::
 	# mexbiosig
 	#-/usr/bin/octave --no-gui --eval "pkg install -global biosig4c++/mex/mexbiosig-2.3.3.src.tar.gz"
@@ -145,7 +145,7 @@ clean ::
 	$(MAKE) -C biosig4c++/python clean
 endif
 
-ifneq (:,/usr/bin/R)
+ifneq (:,:)
 first ::
 	-$(MAKE) -C biosig4c++/R build
 install ::
--- origsrc/biosig-2.3.3/biosig4c++/Makefile	2021-08-13 11:17:24.000000000 +0200
+++ src/biosig-2.3.3/biosig4c++/Makefile	2022-01-12 21:54:45.047825000 +0100
@@ -94,8 +94,8 @@ CFLAGS       += -pipe -fPIC -fno-builtin
 CFLAGS       += -Wno-deprecated
 CFLAGS       += -fvisibility=hidden
 
-prefix        = /usr/local
-exec_prefix  ?= /usr/local
+prefix        = /usr
+exec_prefix  ?= /usr
 libdir        = ${exec_prefix}/lib
 includedir    = ${prefix}/include
 bindir        = ${exec_prefix}/bin
@@ -241,7 +241,7 @@ ifeq (1,1)
 	  LDLIBS     += -lsuitesparseconfig
 	endif
 endif
-ifeq (1,1)
+ifeq (1,)
 	DEFINES      += -D=WITH_DCMTK
 	LDLIBS       += -ldcmdata -loflog -lofstd
 	SOURCES      += t210/sopen_dcmtk_read.cpp
@@ -257,7 +257,7 @@ endif
 ifeq (1,1)
 	LDLIBS     += -lm
 endif
-ifeq (1,1)
+ifeq (1,)
 	DEFINES    += -D=WITH_LIBTINYXML
 	LDLIBS     += -ltinyxml
 endif
@@ -370,7 +370,7 @@ SOURCES      += biosig.c \
 		biosig_client.c \
 		biosig_server.c
 
-ifneq (1,1)
+ifneq (1,)
   ## build with internal TinyXML when libtinyxml is not available
   SOURCES    +=	XMLParser/tinyxml.cpp \
 		XMLParser/tinyxmlparser.cpp \
@@ -790,7 +790,7 @@ win64mma: mma/biosig.tm mma/biosig.c
 #############################################################
 
 mex4o mex4m oct mex:
-	MKOCTFILE="/usr/bin/mkoctfile" $(MAKE) -C mex $@
+	MKOCTFILE=":" $(MAKE) -C mex $@
 
 mexw32 mexw64:
 	CROSS=$(CROSS) CROSS64=$(CROSS64) $(MAKE) -C mex $@
--- origsrc/biosig-2.3.3/biosig4c++/java/Makefile	2021-08-13 11:17:24.000000000 +0200
+++ src/biosig-2.3.3/biosig4c++/java/Makefile	2022-01-12 21:54:45.719726700 +0100
@@ -9,7 +9,7 @@
 ### JNI ###
 # https://stackoverflow.com/questions/5963266/call-c-function-from-java
 
-JAVA_HOME ?= $(realpath $(dir $(realpath $(shell which /usr/bin/javac )))/..)
+JAVA_HOME ?= $(realpath $(dir $(realpath $(shell which : )))/..)
 
 CLASS_PATH ?= $(JAVA_HOME)/bin
 
@@ -21,13 +21,13 @@ libBiosig.so: Biosig.h Biosig.c
 		Biosig.c -L.. -lbiosig -o libBiosig.so
 
 Biosig.h: Biosig.class
-	/usr/bin/javac -h . Biosig.java
+	: -h . Biosig.java
 
 Biosig.class: Biosig.java
-	/usr/bin/javac Biosig.java
+	: Biosig.java
 
 test: libBiosig.so
-	LD_LIBRARY_PATH=.. /usr/bin/java -Djava.library.path=. Biosig "../data/Newtest17-256.bdf"
+	LD_LIBRARY_PATH=.. : -Djava.library.path=. Biosig "../data/Newtest17-256.bdf"
 
 clean: 
 	-rm *.h
--- origsrc/biosig-2.3.3/biosig4c++/mex/Makefile	2021-08-13 11:17:24.000000000 +0200
+++ src/biosig-2.3.3/biosig4c++/mex/Makefile	2022-01-12 21:54:46.157222500 +0100
@@ -116,7 +116,7 @@ else
 	SONAME_POSTFIX = .$(DLEXT).${MAJOR_VERSION}.${MINOR_VERSION}
 endif
 
-exec_prefix ?= /usr/local
+exec_prefix ?= /usr
 
 DEFINES_ALL   = #-D=NDEBUG
 
--- origsrc/biosig-2.3.3/biosig4c++/mma/Makefile	2021-08-13 11:17:24.000000000 +0200
+++ src/biosig-2.3.3/biosig4c++/mma/Makefile	2022-01-12 21:54:46.375982200 +0100
@@ -13,7 +13,7 @@
 CROSS   ?= /home/schloegl/src/mxe.github.schloegl/usr/bin/i686-w64-mingw32.static
 CROSS64 ?= /home/schloegl/src/mxe.github.schloegl/usr/bin/x86_64-w64-mingw32.static
 
-exec_prefix ?= /usr/local
+exec_prefix ?= /usr
 
 ###########################################
 ## set Mathematica variables

[-- Attachment #5: biosig-2.3.3-1-src.hint --]
[-- Type: text/plain, Size: 1071 bytes --]

# comment
sdesc: "Tools for biomedical signal processing"
ldesc: "Library for biomedical signal processing, 
featuring for example the analysis of biosignals such 
as the electroencephalogram (EEG), electrocorticogram (ECoG), 
electrocardiogram (ECG), electrooculogram (EOG), electromyogram (EMG), 
respiration, etc. Major application areas are: Neuroinformatics, 
brain-computer interfaces, neurophysiology, psychology, 
cardiovascular systems and sleep research. The aim of the 
BioSig project is to foster research in biomedical signal 
processing by providing open source software tools for many 
different applications. Generally, many concerns have to be addressed 
in this scientific field. BioSig handles this by providing solutions for 
data acquisition, artifact processing, quality control, feature extraction, 
classification, modeling, data visualization, etc. "
category: Libs,Science,Utils
homepage: http://biosig.sourceforge.net/
build-depends: libb64 libcholmod-dev libtinyxml libz 
test:
skip:
version: 2.3.3
# disable-check: check-name [check-name...]

[-- Attachment #6: libbiosig-2.3.3-1.hint --]
[-- Type: text/plain, Size: 445 bytes --]

# comment
sdesc: "Libary for biomedical signal processing"
ldesc: "Libary for biomedical signal processing"
category: Libs
requires: cholmod cygwin
# depends: version-relation[, version-relation...]
# obsoletes: version-relation[, version-relation...]
provides: libbiosig
# conflicts: version-relation[, version-relation...]
external-source: biosig
# message: id "some text"
test:
version: 2.3.3
# disable-check: check-name [check-name...]






[-- Attachment #7: libbiosig_devel-2.3.3-1.hint --]
[-- Type: text/plain, Size: 453 bytes --]

# comment
sdesc: "Libary for biomedical signal processing"
ldesc: "Libary for biomedical signal processing"
category: Libs
requires: cholmod-devel cygwin
# depends: version-relation[, version-relation...]
# obsoletes: version-relation[, version-relation...]
# provides: libbiosig
# conflicts: version-relation[, version-relation...]
external-source: biosig
# message: id "some text"
test:
version: 2.3.3
# disable-check: check-name [check-name...]






  reply	other threads:[~2022-01-12 22:59 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <99eff890-3d7f-7fa9-1f42-d8d611b92ded@gmail.com>
2022-01-08 17:41 ` newcomer issues when packaging biosig,stimfit, etc Marco Atzeri
2022-01-08 19:15   ` Marco Atzeri
2022-01-08 19:24     ` Marco Atzeri
     [not found]     ` <a3f8e657-1e1d-c582-2a07-806c6c03be02@gmail.com>
2022-01-12  5:47       ` Marco Atzeri
2022-01-12  6:16         ` Brian Inglis
2022-01-12 22:59           ` Alois Schlögl [this message]
2022-01-14 10:09             ` [ITP] biosig [was: Re: newcomer issues when packaging biosig, stimfit, etc.] Marco Atzeri
2022-01-14 21:48               ` Alois Schlögl
2022-01-15 18:01                 ` Marco Atzeri
2022-01-15 20:44                   ` Achim Gratz
2022-01-17 21:44                     ` Alois Schlögl
2022-01-18  5:32                       ` Brian Inglis
2022-01-18 21:50                         ` Alois Schlögl
2022-01-18 22:56                           ` Brian Inglis
2022-01-19  3:51                             ` Brian Inglis
2022-01-20 20:48                             ` Alois Schlögl
2022-01-21 12:53                               ` Jon Turney
2022-01-16 22:13                   ` Alois Schlögl
2022-01-22 17:52                     ` Marco Atzeri
2022-01-25 23:50                       ` Alois Schlögl
2022-01-26  4:52                         ` Marco Atzeri
2022-01-26 22:47                           ` Marco Atzeri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fdfc7b33-cc55-3da7-908a-66222695ee66@gmail.com \
    --to=alois.schloegl@gmail.com \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).