Re: [ITP] biosig [was: Re: newcomer issues when packaging biosig, stimfit, etc.]

2022-01-18 Thread Brian Inglis

On 2022-01-18 15:56, Brian Inglis wrote:

On 2022-01-18 14:50, Alois Schlögl wrote:

Am 1/18/22 um 06:32 schrieb Brian Inglis:

On 2022-01-17 14:44, Alois Schlögl wrote:

Am 1/15/22 um 21:44 schrieb Achim Gratz:

Marco Atzeri writes:



add DIFF_EXCLUDES="Makefile" to avoid the artifact



DISTCLEANFILES would be more appropriate it seems.


DISTCLEANFILES is deleted immediately after downloading and unpacking 
the *UPSTREAM* source:


https://cygwin.github.io/cygport/src_prep_cygpart.html#robo112

"A list of files to be deleted immediately upon unpacking sources, 
relative to $S. This is intended to be used with 
buildsystem-generated files which are incorrectly included in the 
source tarball."



I tried this (see attachment), but I'm not sure this is what you meant.


DIFF_EXCLUDES is a list of files generated in $S not automatically 
excluded from the source package:


https://cygwin.github.io/cygport/pkg_pkg_cygpart.html#robo384

"A list of file names, directory names, or glob patterns in $S which 
will be excluded when creating the .src.patch file. This should be 
used for files automatically generated in $S to avoid polluting the 
patch.

NOTE
Files generated by various buildsystem infrastructures, such as 
autoconf, automake, gettext, and libtool are already excluded 
automatically and need not be listed here."


Add to DIFF_EXCLUDES the names of any files you see after the output 
header:



Creating source patches


Ok, thanks for these clear hints. I've now added these files as 
suggested. The revised version is attached.
Moreover, I've removed (commented) all aspects for building of 
python-biosig bindings, in order not to delay the inclusion of Biosig 
in Cygwin.

Is there anything else that need to be considered ?


CATEGORY is a *space* separated list in quotes.

Before SRC_URI and PATCH_URI normally comes:

 HOMEPAGE=https://sourceforge.net/projects/biosig/files/

you don't need to add quotes for nonspaced strings.

You may also test your cygport and any other source patches and files 
you require by creating and committing them into a local git repo named 
the same as the package (preferably all lower case) and pushing to the 
git-cygwin-packages playground repo and branch:


git push --set-upstream ssh://cygwin/git/cygwin-packages/playground.git
playground -f

which will submit the build to the Cygwin GitHub Action CI and print the 
link for you to monitor the CI job, view the build logs for noarch, x86, 
and x86_64, and download them.


I just noticed that your description is badly wrapped: to avoid this, 
run the text through fmt or your editor equivalent (e.g. gvim :set tw=72 
then gqq to wrap the lines) and paste between the quotes after 
DESCRIPTION="...

...".

Forgot to mention BUILD_REQUIRES which lists all the packages and 
libraries which need installed to build the package(s) using cygport.


From your README for Debian, on Cygwin those packages would probably be:

BUILD_REQUIRES="libtinyxml2-devel octave-devel python-devel"
BUILD_REQUIRES+=" gawk python-numpy python3-numpy R"

and your runtime dependencies should be reported by cygport at the end 
of the packaging stage as:


>>> biosig requires: cygwin libtinyxml2_6 octave-nan octave-tsa R

If any are missing, you may add them using REQUIRES similar to 
BUILD_REQUIRES, however specifying all the packages with REQUIRES 
results in confusing duplication in cygport output and the setup.ini 
biosig requires: line entry.


--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]


Re: [ITP] biosig [was: Re: newcomer issues when packaging biosig, stimfit, etc.]

2022-01-18 Thread Brian Inglis

On 2022-01-18 14:50, Alois Schlögl wrote:

Am 1/18/22 um 06:32 schrieb Brian Inglis:

On 2022-01-17 14:44, Alois Schlögl wrote:

Am 1/15/22 um 21:44 schrieb Achim Gratz:

Marco Atzeri writes:



add DIFF_EXCLUDES="Makefile" to avoid the artifact



DISTCLEANFILES would be more appropriate it seems.


DISTCLEANFILES is deleted immediately after downloading and unpacking 
the *UPSTREAM* source:


https://cygwin.github.io/cygport/src_prep_cygpart.html#robo112

"A list of files to be deleted immediately upon unpacking sources, 
relative to $S. This is intended to be used with buildsystem-generated 
files which are incorrectly included in the source tarball."



I tried this (see attachment), but I'm not sure this is what you meant.


DIFF_EXCLUDES is a list of files generated in $S not automatically 
excluded from the source package:


https://cygwin.github.io/cygport/pkg_pkg_cygpart.html#robo384

"A list of file names, directory names, or glob patterns in $S which 
will be excluded when creating the .src.patch file. This should be 
used for files automatically generated in $S to avoid polluting the 
patch.

NOTE
Files generated by various buildsystem infrastructures, such as 
autoconf, automake, gettext, and libtool are already excluded 
automatically and need not be listed here."


Add to DIFF_EXCLUDES the names of any files you see after the output 
header:



Creating source patches


Ok, thanks for these clear hints. I've now added these files as 
suggested. The revised version is attached.
Moreover, I've removed (commented) all aspects for building of 
python-biosig bindings, in order not to delay the inclusion of Biosig in 
Cygwin.

Is there anything else that need to be considered ?


CATEGORY is a *space* separated list in quotes.

Before SRC_URI and PATCH_URI normally comes:

HOMEPAGE=https://sourceforge.net/projects/biosig/files/

you don't need to add quotes for nonspaced strings.

You may also test your cygport and any other source patches and files 
you require by creating and committing them into a local git repo named 
the same as the package (preferably all lower case) and pushing to the 
git-cygwin-packages playground repo and branch:


git push --set-upstream ssh://cygwin/git/cygwin-packages/playground.git
playground -f

which will submit the build to the Cygwin GitHub Action CI and print the 
link for you to monitor the CI job, view the build logs for noarch, x86, 
and x86_64, and download them.


--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]


Re: [ITP] biosig [was: Re: newcomer issues when packaging biosig, stimfit, etc.]

2022-01-18 Thread Alois Schlögl



Am 1/18/22 um 06:32 schrieb Brian Inglis:

On 2022-01-17 14:44, Alois Schlögl wrote:

Am 1/15/22 um 21:44 schrieb Achim Gratz:

Marco Atzeri writes:



add DIFF_EXCLUDES="Makefile" to avoid the artifact



DISTCLEANFILES would be more appropriate it seems.


DISTCLEANFILES is deleted immediately after downloading and unpacking 
the *UPSTREAM* source:


https://cygwin.github.io/cygport/src_prep_cygpart.html#robo112

"A list of files to be deleted immediately upon unpacking sources, 
relative to $S. This is intended to be used with buildsystem-generated 
files which are incorrectly included in the source tarball."



I tried this (see attachment), but I'm not sure this is what you meant.


DIFF_EXCLUDES is a list of files generated in $S not automatically 
excluded from the source package:


https://cygwin.github.io/cygport/pkg_pkg_cygpart.html#robo384

"A list of file names, directory names, or glob patterns in $S which 
will be excluded when creating the .src.patch file. This should be 
used for files automatically generated in $S to avoid polluting the 
patch.

NOTE
Files generated by various buildsystem infrastructures, such as 
autoconf, automake, gettext, and libtool are already excluded 
automatically and need not be listed here."





Add to DIFF_EXCLUDES the names of any files you see after the output 
header:



Creating source patches





Ok, thanks for these clear hints. I've now added these files as 
suggested. The revised version is attached.
Moreover, I've removed (commented) all aspects for building of 
python-biosig bindings, in order not to delay the inclusion of Biosig in 
Cygwin.

Is there anything else that need to be considered ?



Cheers,
   Alois






# 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 python3-biosig"
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, would require libb64
# 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
"

#python3-biosig_CONTENTS="
#   dist/Biosig-2.3.3-cp39-cp39-cygwin_3_3_3_x86_64.whl
#"

DIFF_EXCLUDES="depend
  Makefile
  biosig4c++/Makefile 
  biosig4c++/java/Makefile
  biosig4c++/mex/Makefile 
  biosig4c++/mma/Makefile 
"

# 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
# cygmake -C biosig4c++/python wheel
# cd ${B}/biosig4c++/python/
# python3_distutils_compile bdist_wheel
# python3_wheel_compile
}

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 

Re: [PATCH setup] Show a MessageBox warning if running on a deprecated Windows version

2022-01-18 Thread Jon Turney

On 14/01/2022 09:04, Corinna Vinschen wrote:

On Jan 13 15:13, Jon Turney wrote:

Show a MessageBox warning if we are running on a Windows version which
we have deprecated Cygwin support for:

- Windows 6.0 (Windows Vista, Windows Server 2008)
- 32-bit Windows

This warning can be disabled with '--allow-unsupported-windows'.


I changed this to a separate option '-w'/'--no-warn-deprecated-windows 
(since '--allow-unsupported-windows' has the side effect of effectively 
making '--site' mandatory) and applied this.



---

Notes:
 Not sure if this is needed, or maybe this is just annoying to the ~3% of
 users who are running effected OSes.  But maybe we want to annoy them
 into doing something about it?


Question is, how often should setup show this message?  Every time might
really be a bit annoying.  Some kind of "I saw it, now leave me alone,
at least for a while" kind of function would be great.


Yeah, unfortunately that turns this into more effort than I'm going to 
commit to this:


Adding a "Don't show this again" checkbox means we can't use a 
MessageBox, so have design a dialog box for that purpose.


Making that setting persistent means we have to wait until after the 
cygwin root directory is established so we know where to retrieve that 
persistent setting from.