From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id EAA3C3854165; Sun, 3 Jul 2022 12:13:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EAA3C3854165 To: cygwin-apps-cvs@sourceware.org Subject: [cygport - the Cygwin packaging tool] branch master, updated. 0.35.2 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 6d0200bc2b0cce8b3535328ed01229e45bc10069 X-Git-Newrev: 096f27644bd3b28f29d7522e816bebd327cf24cb Message-Id: <20220703121322.EAA3C3854165@sourceware.org> Date: Sun, 3 Jul 2022 12:13:22 +0000 (GMT) From: Jon TURNEY X-BeenThere: cygwin-apps-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin-apps git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jul 2022 12:13:23 -0000 https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=096f27644bd3b28f29d7522e816bebd327cf24cb commit 096f27644bd3b28f29d7522e816bebd327cf24cb Author: Jon Turney Date: Sat Jun 18 13:04:29 2022 +0100 Bump version to 0.35.2 https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=c12a43648cf4496ddeaa328749a7cb8403b926a5 commit c12a43648cf4496ddeaa328749a7cb8403b926a5 Author: Jon Turney Date: Tue Jun 7 16:04:37 2022 +0100 Define the variable ARCHES with the supported arches for this cygport This allows tools inspecting the cygport to distinguish between "we are building for x86_64 because that's the host arch" and "we are building for x86_64 because that's the only architecture this cygport permits". Clarify the documentation for ARCH. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=62fda21bc87f83d9ad2d1fd728cdd8a42d7f753e commit 62fda21bc87f83d9ad2d1fd728cdd8a42d7f753e Author: Jon Turney Date: Tue Jun 7 15:23:46 2022 +0100 Define the variable INHERITED with the names of all inherited cygclasses This means we don't have to parse the cygport file to determine what it inherits. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=9a94db7dd9f07f1ff7caffb16793c0c3ccb97dde commit 9a94db7dd9f07f1ff7caffb16793c0c3ccb97dde Author: Jon Turney Date: Tue Jun 7 15:09:11 2022 +0100 Fix 'cygport vars UNDEFINED' Make 'cygport vars' silently output nothing for an undefined variables (source-ing that lack of output reproduces the undefined state of the variable), rather than stopping with an error. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=bca14b1530201397e5bb2acf6a35bd79ed9607cc commit bca14b1530201397e5bb2acf6a35bd79ed9607cc Author: Jon Turney Date: Sat May 28 15:59:26 2022 +0100 python-wheel: Make a python3-name virtual package When making python3x-name package (where 3.x is the current default python version), also make a python3-name virtual package, which causes python3x-name to be installed. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=5ca2c856b6eb95aca021966023c46e7fa6beeef9 commit 5ca2c856b6eb95aca021966023c46e7fa6beeef9 Author: Jon Turney Date: Fri May 27 14:46:39 2022 +0100 Fix dependency detection for python3 shebang Automatic dependency detection can't turn a python3 shebang into a dependency on python3, as /usr/bin/python3 is now an alternatives symlink, which (i) cygcheck can't see through, and (ii) even if it could, that wouldn't lead to the correct package ('python3x' rather than 'python3'). Instead, explicitly add the 'python3' dependency. v2: Avoid an extra space in requires: if expldeps is empty https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=e41a17d999be7b15c3e8626543344932956886d7 commit e41a17d999be7b15c3e8626543344932956886d7 Author: Jon Turney Date: Fri May 27 15:04:16 2022 +0100 Add LICENSE variable Pass it's value through to the source package hint. Diff: --- NEWS | 7 ++++++ bin/cygport.in | 11 +++++++++ cygclass/python-wheel.cygclass | 18 +++++++++++---- cygport.spec | 2 +- data/sample.cygport | 2 +- lib/compilers.cygpart | 15 ++++++++----- lib/inheritance.cygpart | 1 + lib/pkg_info.cygpart | 26 ++++++++++++++++++++-- lib/pkg_pkg.cygpart | 6 +++++ lib/src_postinst.cygpart | 11 +++++++-- lib/syntax.cygpart | 14 ++++++++++++ meson.build | 2 +- testsuite/basic/info/foo.cygport | 1 + testsuite/basic/info/info.out | 1 + .../python3-clang/python3-clang-9.0.1-1.hint | 6 +++++ .../dist/lv2/lv2-devel/lv2-devel-1.12.0-1.hint | 2 +- 16 files changed, 107 insertions(+), 18 deletions(-) diff --git a/NEWS b/NEWS index 68e8525..354e7ce 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,10 @@ +0.35.2: + * New INHERITED and ARCHES variables. + * Fix 'cygport vars UNDEFINED'. + * python-wheel: Make a python3-name virtual package. + * Fix dependency detection for python3 shebang. + * New LICENSE variable. + 0.35.1: * Fixed regression causing missing test: label in srcpkg hint diff --git a/bin/cygport.in b/bin/cygport.in index e2d7fac..5f5c1c5 100755 --- a/bin/cygport.in +++ b/bin/cygport.in @@ -437,6 +437,17 @@ do done unset n VALUE ARCHES VAR +# probe if the cygport sets ARCH - if it does, set ARCHES to that value, +# otherwise set it to the default value "all". +PROBE_ARCH=$(unset ARCH; source ${top}/${cygportfile}; echo "${ARCH}") +if [ -z "${PROBE_ARCH}" ] +then + declare -r ARCHES="all" +else + declare -r ARCHES="${PROBE_ARCH}" +fi +unset PROBE_ARCH + ### load .cygport source ${top}/${cygportfile} || error "could not read ${cygportfile}" ### diff --git a/cygclass/python-wheel.cygclass b/cygclass/python-wheel.cygclass index 90b0faa..b6ed68b 100644 --- a/cygclass/python-wheel.cygclass +++ b/cygclass/python-wheel.cygclass @@ -86,8 +86,8 @@ inherit python.org # are already available. #**** -# when the default versions of Python change, this and the ENSUREPIP_OPTIONS -# switches need to be updated accordingly +# when the default versions of Python change, this, the python3 virtual package +# target, and the ENSUREPIP_OPTIONS switches need to be updated accordingly _tmp_wheel_v= : ${PYTHON_WHEEL_VERSIONS:=default} for ver in ${PYTHON_WHEEL_VERSIONS//:/ } @@ -124,11 +124,21 @@ then for ver in ${PYTHON_WHEEL_VERSIONS//:/ } do PKG_NAMES+=" python${ver/.}-${PYTHON_WHEEL_NAME}" - # these were 2&3 at the time of the XY-version split, + # this was 2 at the time of the XY-version split, # and MUST NOT be updated when defaults change case ${ver} in 2.7) declare -g python27_${PYTHON_WHEEL_NAME//[-\.]/_}_OBSOLETES="python-${PYTHON_WHEEL_NAME} python2-${PYTHON_WHEEL_NAME}" ;; - 3.6) declare -g python36_${PYTHON_WHEEL_NAME//[-\.]/_}_OBSOLETES="python3-${PYTHON_WHEEL_NAME}" ;; + # this is the default 3.x version + 3.9) + # If we are making a 3.x package (where x is the default), + # also make a python3-wheelname virtual package, which just + # requires python3x-wheelname + PKG_NAMES+=" python3-${PYTHON_WHEEL_NAME}" + declare -g python3_${PYTHON_WHEEL_NAME//[-\.]/_}_DESCRIPTION="The python3-${PYTHON_WHEEL_NAME} virtual package. Selecting this package for installation will cause the python${ver/.}-${PYTHON_WHEEL_NAME} package to be installed." + declare -g python3_${PYTHON_WHEEL_NAME//[-\.]/_}_CATEGORY="Python Virtual" + declare -g python3_${PYTHON_WHEEL_NAME//[-\.]/_}_REQUIRES="python${ver/.}-${PYTHON_WHEEL_NAME}" + declare -g python3_${PYTHON_WHEEL_NAME//[-\.]/_}_CONTENTS="" + ;; esac declare -g python${ver/.}_${PYTHON_WHEEL_NAME//[-\.]/_}_CONTENTS="usr/lib/python${ver}/site-packages/ usr/share/doc/python${ver/.}-${PYTHON_WHEEL_NAME}" done diff --git a/cygport.spec b/cygport.spec index 13613aa..a033331 100644 --- a/cygport.spec +++ b/cygport.spec @@ -1,7 +1,7 @@ %define debug_package %{nil} Name: cygport -Version: 0.35.1 +Version: 0.35.2 Release: 1%{?dist} Summary: Cygwin package building tool diff --git a/data/sample.cygport b/data/sample.cygport index da5e627..ef223e7 100644 --- a/data/sample.cygport +++ b/data/sample.cygport @@ -1,7 +1,7 @@ inherit meson NAME="cygport" -VERSION=0.35.1 +VERSION=0.35.2 RELEASE=1 CATEGORY="Devel" SUMMARY="Cygwin source packaging tool" diff --git a/lib/compilers.cygpart b/lib/compilers.cygpart index 129e115..f9b8c69 100644 --- a/lib/compilers.cygpart +++ b/lib/compilers.cygpart @@ -224,17 +224,20 @@ declare TOOLCHAIN_TARGET=""; #****d* Compiling/ARCH # DESCRIPTION -# The Cygwin architecture of the binaries being built (i686 or x86_64), -# or "noarch" when using cross.cygclass. +# The Cygwin architecture the binaries are being built for (i686 or x86_64), +# or "noarch". # NOTE -# This variable should only be redefined in a .cygport in one of the +# This variable should only be defined in a .cygport in one of the # following cases: # * the package has no Cygwin compiled code, e.g. it consists only of -# data or scripts, in which case ARCH="noarch" may be defined; +# data or scripts, in which case ARCH="noarch" should be defined; # * the package only builds or works on one architecture due to portability -# issues (e.g. ILP32 assumptions occasionaly found in older code), in which +# issues (e.g. ILP32 assumptions occasionally found in older code), in which # case ARCH should be defined to the working architecture, and cygport will -# refuse to build this package for the other. +# refuse to build this package for any other. +# +# This variable is automatically set to "noarch" by certain cygclasses +# e.g. cross.cygclass. #**** declare ARCH=${CHOST%%-*}; diff --git a/lib/inheritance.cygpart b/lib/inheritance.cygpart index 4e484a0..6d4359a 100644 --- a/lib/inheritance.cygpart +++ b/lib/inheritance.cygpart @@ -42,6 +42,7 @@ inherit() { if ! defined _${classname//[-\.]/_}_CYGCLASS_ then export _${classname//[-\.]/_}_CYGCLASS_=1 + INHERITED="${class} ${INHERITED}" source ${_privclassdir}/${classname}.cygclass || error "inherit ${classname} failed" fi done diff --git a/lib/pkg_info.cygpart b/lib/pkg_info.cygpart index 1ad8baa..4c51483 100644 --- a/lib/pkg_info.cygpart +++ b/lib/pkg_info.cygpart @@ -43,6 +43,12 @@ __pager() { # what address will be displayed in BROWSER by the homepage command. #**** +#****v* Information/LICENSE +# DESCRIPTION +# A SPDX license expression (See https://spdx.dev/ids/) for the license(s) of +# the package. +#**** + __show_info() { __pager <<-_EOF Cygport package information @@ -50,6 +56,7 @@ __show_info() { Package version: ${PV} Cygwin release: ${PR} Homepage: ${HOMEPAGE} + License: ${LICENSE} Summary: ${SUMMARY:-${DESCRIPTION}} Description: ${DESCRIPTION:-${SUMMARY}} @@ -70,7 +77,7 @@ __list_debug_files() { __list_deps() { local d f ext - local alldeps shdep girdep jar jpkg ladep luadep luapaths pcdep pctgt pidep + local alldeps expldeps shdep girdep jar jpkg ladep luadep luapaths pcdep pctgt pidep local mldep mldir mllib local phpdep phpmoddir pldep pldirs plver local pydep pydirs pyexts pyscr pysite pyver @@ -194,6 +201,14 @@ __list_deps() { alldeps+=" "${D}${shdep}; elif [ -f ${shdep} ] then + # python{,3} are alternatives symlinks, which 'cygcheck + # -f' can't translate to a package name, so we explicitly + # translate to a package name ourself. + case ${shdep} in + /usr/bin/python|/usr/bin/python3) + expldeps+=" python3"; + ;; + esac alldeps+=" "${shdep}; fi done @@ -629,6 +644,10 @@ for suffix, mode, type in imp.get_suffixes(): print(suffix)') if [ "${CBUILD##*-}" = "cygwin" ] then + if [ -n "$expldeps" ] + then + echo $expldeps | sort -u; + fi echo $alldeps | sort -u | xargs -r /bin/cygcheck -f; else # cannot determine Cygwin package dependencies, but we can give @@ -677,7 +696,10 @@ __show_web() { __show_vars() { for v in "$@" do - declare -p "${v}" + if [ -v ${v} ] + then + declare -p "${v}" + fi done } diff --git a/lib/pkg_pkg.cygpart b/lib/pkg_pkg.cygpart index db998f0..82112e1 100644 --- a/lib/pkg_pkg.cygpart +++ b/lib/pkg_pkg.cygpart @@ -556,6 +556,12 @@ _EOF then cat >> ${distdir}/${PN}/${PN}-${PVR}-src.hint <<-_EOF homepage: ${HOMEPAGE} +_EOF + fi + if [ -n "${LICENSE}" ] + then + cat >> ${distdir}/${PN}/${PN}-${PVR}-src.hint <<-_EOF +license: ${LICENSE} _EOF fi else diff --git a/lib/src_postinst.cygpart b/lib/src_postinst.cygpart index 4b51325..b0361b1 100644 --- a/lib/src_postinst.cygpart +++ b/lib/src_postinst.cygpart @@ -430,6 +430,7 @@ __prepdoc() { local html; local -i n=0; local p; + local pkg_contents_var; local pkg_docs_var; local pkg_hint; local default_docs="\ @@ -451,10 +452,16 @@ __prepdoc() { inform "Skipping package doc installation per request"; elif defined _CYGPORT_INTERNAL_multi_doc_ then + # install docs in a package-specific path in every non-empty + # subpackage for p in ${PKG_NAMES} do - _docinto_dir=/$p - dodoc ${default_docs} ${DOCS}; + pkg_contents_var=${p//[-\.]/_}_CONTENTS + if [ -n "${!pkg_contents_var}" ] + then + _docinto_dir=/$p + dodoc ${default_docs} ${DOCS}; + fi done unset _docinto_dir; else diff --git a/lib/syntax.cygpart b/lib/syntax.cygpart index 9ec12f2..099a3a4 100644 --- a/lib/syntax.cygpart +++ b/lib/syntax.cygpart @@ -370,6 +370,20 @@ __target_is_embedded() { # occur in or into this directory. #**** +#****** Format/State +#**** +#****v* State/INHERITED +# DESCRIPTION +# The names of all Cygclasses which have been inherit-ed. Rather than testing +# this directly, use inherited. +#**** + +#****d* State/ARCHES +# DESCRIPTION +# The Cygwin architectures which this package can be built for: "noarch", +# "all" or a specific architecture. +#**** + readonly -f defined pushd popd error warning inform verbose __stage __step \ __log_init __check_triplet cross_compiling __cross_compiling_error \ __host_prefix __host_sysconfdir __host_localstatedir \ diff --git a/meson.build b/meson.build index 6ebf3b5..b7a3b9f 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('cygport', - version: '0.35.1') + version: '0.35.2') bindir = join_paths(get_option('prefix'), get_option('bindir')) datadir = join_paths(get_option('prefix'), get_option('datadir')) diff --git a/testsuite/basic/info/foo.cygport b/testsuite/basic/info/foo.cygport index a5d73b7..188b13c 100644 --- a/testsuite/basic/info/foo.cygport +++ b/testsuite/basic/info/foo.cygport @@ -3,4 +3,5 @@ VERSION=2.3.4 RELEASE=1 DESCRIPTION="Cygport messages test package" HOMEPAGE="http://sourceware.org/cygwinports/" +LICENSE="GPL-3.0-or-later" SRC_URI="http://sourceware.org/cygwinports/\${P}.ABC" diff --git a/testsuite/basic/info/info.out b/testsuite/basic/info/info.out index 0cd2a1a..8308681 100644 --- a/testsuite/basic/info/info.out +++ b/testsuite/basic/info/info.out @@ -3,6 +3,7 @@ Cygport package information Package version: 2.3.4 Cygwin release: 1 Homepage: http://sourceware.org/cygwinports/ + License: GPL-3.0-or-later Summary: Cygport messages test package Description: Cygport messages test package diff --git a/testsuite/download/svn/hints/python-clang-9.0.1-1.noarch/dist/python-clang/python3-clang/python3-clang-9.0.1-1.hint b/testsuite/download/svn/hints/python-clang-9.0.1-1.noarch/dist/python-clang/python3-clang/python3-clang-9.0.1-1.hint new file mode 100644 index 0000000..3a0f8a6 --- /dev/null +++ b/testsuite/download/svn/hints/python-clang-9.0.1-1.noarch/dist/python-clang/python3-clang/python3-clang-9.0.1-1.hint @@ -0,0 +1,6 @@ +category: Python Virtual +requires: python39-clang +sdesc: "Python bindings for Clang-C Source Indexing Library" +ldesc: "The python3-clang virtual package. Selecting this package for installation will cause the python39-clang package to be installed." +external-source: python-clang + diff --git a/testsuite/waf/all/hints/lv2-1.12.0-1.x86_64/dist/lv2/lv2-devel/lv2-devel-1.12.0-1.hint b/testsuite/waf/all/hints/lv2-1.12.0-1.x86_64/dist/lv2/lv2-devel/lv2-devel-1.12.0-1.hint index 7f1d068..0e21dae 100644 --- a/testsuite/waf/all/hints/lv2-1.12.0-1.x86_64/dist/lv2/lv2-devel/lv2-devel-1.12.0-1.hint +++ b/testsuite/waf/all/hints/lv2-1.12.0-1.x86_64/dist/lv2/lv2-devel/lv2-devel-1.12.0-1.hint @@ -1,5 +1,5 @@ category: Audio -requires: pkg-config lv2 +requires: pkg-config python3 lv2 sdesc: "LV2 audio plugin specification" ldesc: "LV2 is a portable plugin standard for audio systems, similar in scope to LADSPA, VST, AU, and others. It defines a C API for code and a format