cygport - get package dependencies

Brian Inglis Brian.Inglis@SystematicSW.ab.ca
Fri Jul 12 06:52:24 GMT 2024


On 2024-07-07 11:12, ASSI via Cygwin wrote:
> Federico Kircheis via Cygwin writes:
>> I could move the REQUIRES from the cygport file to somewhere else and
>> use it only myself, but at that point, why not use the REQUIRES?
> 
> What you want might actually be BUILD_REQUIRES?

You need to know the BUILD_REQUIRES to be able to install the required devel 
library packages, and build tools which are not automatically installed as 
cygport dependencies, and to run Scallywag CI builds in GH Actions or Appveyor.

CI builds are useful as they run in pristine containers, so anything missing 
causes the build and/or tests to fail.

Look in the package README, INSTALL, or other build docs for build prereqs, and 
as we are affiliated via Sourceware with RedHat and Fedora and follow some of 
their approaches, look for latest Fedora Rawhide RPM specs for dependencies; if 
not Fedora, OpenSuSE Tumbleweed specs; otherwise Gentoo ebuild, Debian 
sid/unstable control + rules, or Arch PKGBUILD package build recipes, similar to 
cygport, and also any patches they provide, as they may be useful on Cygwin.

These are all accessible from repology.org by searching for a package, listing 
all platforms, and navigating from the package link beside each platform, until 
you find the package build source files.

You can refer to external source files and patches directly in cygport by 
appending to SRC_URI or PATCH_URI, linking directly to the *RAW* source files.

Given that you must know the build dependencies, you can follow the runtime 
dependencies by checking for any library packages provided and required by each 
of the devel packages in setup.ini (-S):

$ echo flac-devel, libao-devel, libavcodec-devel, libavformat-devel, 
libcddb-devel, libcdio_paranoia-devel, libdiscid-devel, libmad-devel, 
libmodplug-devel, libmpcdec-devel, libncurses-devel, libopusfile-devel, 
libpulse-devel, libsamplerate-devel, libvorbis-devel, libwavpack-devel | sed 
's/,//g' | xargs cygcheck-dep -cqSr
...

Then check for any (non-devel) packages needed by each of the library packages 
in setup.ini (-S):

$ cygcheck-dep -cqSn libFLAC{++10,12} libao{,4} libavcodec61 libavformat61 
libcddb2 libcdio_cdda2 libcdio_paranoia2 libdiscid0 libmad0 libmodplug1 
libmpcdec7 libncurses{,++}w10 libopusfile0 libpulse{-mainloop-glib,-simple,}0 
libsamplerate0 libvorbis{,0,enc2,file3} libwavpack1
...

which you may be able to simplify with some long command lines or short scripts.

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

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry


More information about the Cygwin mailing list