On 09/07/2025 04:54, Matthew Sheets via Cygwin-apps wrote:
CATEGORY="Devel"
SUMMARY="A GNU cross-toolchain supporting COFF for the Hitachi H8/300"
DESCRIPTION="Includes the following toolchain components for
h8300-hitachi-coff, but because GNU tools no longer support
'generic COFF' targets, the included tool versions are older.
Included tool components and versions include the following:
GNU Binary Utilities (BinUtils-2.16.1), GNU Compiler Collection
(GCC-3.4.6), GNU Pascal Compiler (GPC-2.1-20070904), NewLib (1.19.0),
and GNU Debugger (GDB-5.8).  Supported programming languages
include the following: Assembly, C, C++, Fortran77, Java (GCJ),
Objective-C, Pascal (GPC), and TreeLang.  This toolchain can
also be used with the LEGO MindStorms RCX, as it was built
around an H8/300 processor."

Firstly, thanks for offering this package.

You can use some (see [1]) Markdown-like syntax in the DESCRIPTION, which may help improve it's readability here.

[1] https://cygwin.com/packaging-hint-files.html#pvr.hint

Please go ahead and submit a ssh key as per: https://cygwin.com/packaging/key.html#sshkey

The Cygwin packages locally and is how the binary package has been posted; 
however, a few hiccups encountered along the way with Cygport should be noted:

Thanks for providing this detailed list of nits. I'll see what I can do to address them.

  (1) Variable resolution in Cygport file:
While the variables in the Cygport file like the following resolve with no 
issue:
SRC_URI="${HOMEPAGE}/archive/refs/tags/v${VERSION}.tar.gz"

Cygport is resolving "VERSION" from the following block in the Cygport file as just 
"..":
VERSION_MAJOR=1
VERSION_MINOR=1
VERSION_PATCH=0
VERSION="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}"

So, this probably isn't clearly documented anywhere, but for historical reasons, the lines lines within the .cygport file defining NAME, VERSION and RELEASE are extracted, evaluated on their own, and declared read-only, before the cygport file itself is sourced.

This is probably fixable, but might require dropping support for the (historical) alternative syntax of having the file named NAME-VERSION-RELEASE.cygport and setting those variables based on it.

For the time being, if you want to slice up the version number, do it the other way around, i.e. set VERSION and then extract parts from it.


  (2) DIFF_EXCLUDES="**/*" would seem by definition to exclude everything from 
source diff but isn't excluding anything in Cygport (tried both with and without the 
quotes):
  * https://cygwin.github.io/cygport/pkg_pkg_cygpart.html#DIFF_EXCLUDES

Testing on https://globster.xyz/ would appear to indicate that that "**/*" 
should exclude everything.  Is there something I've missed that might be needed to 
exclude all files from the auto-generated source diff?

Hmm... this is implemented using the -x/--exclude-pattern option to diff which 'excludes any files or subdirectories whose base names match the shell pattern', not by the shell directly.

So, anything with a path separator in it can't be right. So, um, 'DIFF_EXCLUDES="*" seems like it should do what you want.

I'm inclined to fix this by improving the documentation of DIFF_EXCLUDES.

But if you really need this, "RESTRICT=diff" is probably appropriate here just to avoid searching through all the directories just to exclude them all?

  (3) For packages listed with the BUILD_REQUIRES variable in the Cygport file, 
should Cyport automatically install any not-yet-installed packages that are 
listed therein, or is this primarily information for other who might want to 
build the package?  At least under GitHub workflow, Cygport was not 
automatically installing any required but missing packages.
  * https://cygwin.github.io/cygport/check_funcs_cygpart.html#BUILD_REQUIRES

No, you are expected to install the build requirements by other means.

(I think cygport issues a warning if a build requirement is missing)?

  (4) Under GitHub Actions, the "cygport package" command is throwing the 
following errors, and then subsequent steps in the GitHub workflow can't seem to find the 
binary package generated by Cygport.  Does the Cygport package perhaps require an 
additional dependency that is currently not being included automatically.
========== BEGIN EXCERPT ==========
-e:1:in `<main>': undefined method `default_dirs' for module Gem (NoMethodError)

print Gem.default_dirs[:system][:gem_dir]
          ^^^^^^^^^^^^^
Did you mean?  default_dir
-e:1:in `<main>': undefined method `default_dirs' for module Gem (NoMethodError)

print Gem.default_dirs[:system][:ext_dir]
          ^^^^^^^^^^^^^
Did you mean?  default_dir
========== END EXCERPT ==========

Hmmm... that's weird.

It's obviously coming from [2], but... seems like this is a native ruby being picked up? Idk why it can't execute that script, though...

(Later) ah, I think CYGWIN_NOWINPATH isn't having any effect in your workflow because the outermost shell isn't a login shell.

But yeah, maybe we should be more tolerant of an error here...

[2] https://cygwin.com/cgit/cygwin-apps/cygport/tree/lib/pkg_info.cygpart#n566

Reply via email to