Diff:
---
 NEWS                           |  5 +++++
 cygclass/autotools.cygclass    |  6 +++---
 cygclass/gnome.org.cygclass    |  2 +-
 cygclass/meson.cygclass        | 11 ++++++++++-
 cygclass/python-wheel.cygclass | 23 ++++++++++++++++++++---
 cygclass/xvfb.cygclass         | 21 +++++++++++++++++++--
 cygport.spec                   |  2 +-
 data/sample.cygport            |  2 +-
 lib/check_funcs.cygpart        |  2 +-
 lib/pkg_info.cygpart           |  2 +-
 meson.build                    |  2 +-
 11 files changed, 63 insertions(+), 15 deletions(-)

diff --git a/NEWS b/NEWS
index 388d39b1..4eabd842 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+0.37.7:
+       * autotools: Handle more autoconf version formats
+       * xvfb: Automatically wrap the existing src_test in xvfb_run
+       * meson: Add CYGMESON_TEST_ARGS
+
 0.37.6:
        * python-wheel: Disable unneeded build isolation
        * postinstall: Improve stripping of sets of hardlinked files
diff --git a/cygclass/autotools.cygclass b/cygclass/autotools.cygclass
index 1798725e..4ed85cd3 100644
--- a/cygclass/autotools.cygclass
+++ b/cygclass/autotools.cygclass
@@ -680,12 +680,13 @@ cygconf() {
        configure="${confdir}/configure"
        if [ -z ${AUTOCONF_VERSION} ]
        then
-               confver="$("$configure" --version | sed -rn 's/.*(GNU 
Autoconf|autoconf version) ([0-9\.]+)/\2/p')"
+               confver="$("$configure" --version | sed -rn 's/.*(GNU 
Autoconf|autoconf version) ([0-9\.]+).*/\2/p')"
        else
                confver=${AUTOCONF_VERSION}
        fi
        confver_maj=${confver%%.*}
-       confver_min=${confver##*.}
+       confver_min=${confver#*.}
+       confver_min=${confver_min%%.*}
        if [ -z $confver_maj ]
        then
                error "could not determine the autoconf version used to 
generate ./configure; perhaps set AUTOCONF_VERSION?";
@@ -734,7 +735,6 @@ cygconf() {
                confargs+=" --infodir=${prefix}/share/info 
--mandir=${prefix}/share/man"
        fi
 
-
        if [ $confver_min -ge 50 ]
        then
                # Always use a cache file; prior to 2.50, this was the default,
diff --git a/cygclass/gnome.org.cygclass b/cygclass/gnome.org.cygclass
index d7018f5b..32b3ce61 100644
--- a/cygclass/gnome.org.cygclass
+++ b/cygclass/gnome.org.cygclass
@@ -35,7 +35,7 @@
 #  If PN does not match the name of the original source tarball,
 #  define ORIG_PN before inherit()ing.
 #  INHERITED BY
-#  gnome2.cygclass, gtkmm.cygclass, pygtk.cygclass
+#  gnome2.cygclass, gtkmm.cygclass
 #  SEE ALSO
 #  mirror_gnome
 #****
diff --git a/cygclass/meson.cygclass b/cygclass/meson.cygclass
index cd408d67..d26f315f 100644
--- a/cygclass/meson.cygclass
+++ b/cygclass/meson.cygclass
@@ -122,8 +122,17 @@ meson_compile() {
 #  NOTE
 #  meson_test should be run in the directory containing the top-level 
meson.build.
 #****
+
+#****v* cygmeson/CYGMESON_TEST_ARGS
+#  DESCRIPTION
+#  Additional flags to pass to meson test, as a string.
+#  DEFINITION
+CYGMESON_TEST_ARGS=${CYGMESON_TEST_ARGS:-"--timeout-multiplier=2"}
+#  EXAMPLE
+#    CYGMESON_TEST_ARGS="--timeout-multiplier=10"
+#****
 meson_test() {
-       ninja_test -C _build.${CHOST}
+       meson test -C _build.${CHOST} ${CYGMESON_TEST_ARGS}
 }
 
 #****I* meson.cygclass/meson_install
diff --git a/cygclass/python-wheel.cygclass b/cygclass/python-wheel.cygclass
index d613d961..2f67fa8d 100644
--- a/cygclass/python-wheel.cygclass
+++ b/cygclass/python-wheel.cygclass
@@ -125,10 +125,23 @@ done
 #  DESCRIPTION
 #  For a NAME of python-foo, pythonXY-foo binary packages are created
 #  automatically, corresponding to each X.Y version in PYTHON_WHEEL_VERSIONS.
+#
 #  Each package also includes its own independent copy of the automatically
-#  installed documentation (COPYING, README, etc.).  For those packages which
-#  install scripts into /usr/bin, these should be added to the respective
-#  pythonXY_foo_CONTENTS.
+#  installed documentation (COPYING, README, etc.).
+#
+#  NOTES
+#  For those packages which install scripts into /usr/bin, they should be added
+#  to the respective pythonXY_foo_CONTENTS, for example:
+#
+#    declare python${PYTHON3_PKGVERSION}_foo_CONTENTS+=" usr/bin/foo"
+#
+#  or
+#
+#    for v in ${PYTHON_WHEEL_VERSIONS//:/ }
+#      do
+#        declare python${v/./}_foo_CONTENTS+=" usr/bin/foo${v}"
+#      done
+#
 #****
 if [ ${NAME%%-*} = "python" ]
 then
@@ -270,6 +283,10 @@ python_wheel_install() {
                # ENSUREPIP_OPTIONS=altinstall: pipX.Y, easy_install-X.Y
                # ENSUREPIP_OPTIONS=install: pipX, pipX.Y, easy_install-X.Y
 
+               # if there are any collisions (e.g over console script names),
+               # the last version appearing in PYTHON_WHEEL_VERSIONS is the one
+               # that gets to install them
+
                case ${ver} in
                3.9) export ENSUREPIP_OPTIONS="install" ;;
                *) export ENSUREPIP_OPTIONS="altinstall" ;;
diff --git a/cygclass/xvfb.cygclass b/cygclass/xvfb.cygclass
index 5ece3952..fd5f17d6 100644
--- a/cygclass/xvfb.cygclass
+++ b/cygclass/xvfb.cygclass
@@ -57,7 +57,7 @@ xvfb_run() {
        local xvfb_display xvfb_pid dbus_pid gamin_pid
        local xvfb_sock dbus_sock gamin_sock
 
-       check_prog_req Xorg xorg-server
+       check_prog_req Xorg xorg-server-xorg
        check_prog_req xmodmap  # relatively safe dep, required by xinit
 
        if defined DISPLAY && xmodmap -display $DISPLAY &> /dev/null
@@ -130,4 +130,21 @@ xvfb_run() {
        return $status
 }
 
-readonly -f xvfb_run
+# define a new function wrapped_previous_src_test with the same contents as
+# existing src_test
+# XXX: maybe should check that src_test is defined?
+eval wrapped_previous_"$(declare -f src_test)"
+
+#****o* meson.cygclass/src_test (xvfb)
+#  DEFINITION
+src_test() {
+       cd ${S}
+       xvfb_run wrapped_previous_src_test
+}
+#  NOTE
+# 'inherit xvfb' automatically wraps the existing src_test() function defined 
by
+# any previous cygclass in a call to xvfb_run. Usually, that is all that's
+# needed, but you can override this by writing your own src_test() if 
necessary.
+#****
+
+readonly -f xvfb_run wrapped_previous_src_test
diff --git a/cygport.spec b/cygport.spec
index 1bc51f00..14d45387 100644
--- a/cygport.spec
+++ b/cygport.spec
@@ -1,7 +1,7 @@
 %define debug_package %{nil}
 
 Name:           cygport
-Version:        0.37.6
+Version:        0.37.7
 Release:        1%{?dist}
 Summary:        Cygwin package building tool
 
diff --git a/data/sample.cygport b/data/sample.cygport
index 5e540ea5..7555dcb0 100644
--- a/data/sample.cygport
+++ b/data/sample.cygport
@@ -1,7 +1,7 @@
 inherit meson
 
 NAME="cygport"
-VERSION=0.37.6
+VERSION=0.37.7
 RELEASE=1
 CATEGORY="Devel"
 SUMMARY="Cygwin source packaging tool"
diff --git a/lib/check_funcs.cygpart b/lib/check_funcs.cygpart
index f6b273b3..1b2c9471 100644
--- a/lib/check_funcs.cygpart
+++ b/lib/check_funcs.cygpart
@@ -309,7 +309,7 @@ check_python_module() {
        check_python2_module "$@"
 }
 
-#****f* Checks/check_python2_module
+#***if* Checks/check_python2_module
 #  SYNOPSIS
 #  check_python2_module MODULE [MODULE2] ...
 #  DESCRIPTION
diff --git a/lib/pkg_info.cygpart b/lib/pkg_info.cygpart
index d5170898..e9fa2dab 100644
--- a/lib/pkg_info.cygpart
+++ b/lib/pkg_info.cygpart
@@ -563,7 +563,7 @@ for suffix, mode, type in imp.get_suffixes(): 
print(suffix)')
                done
        done
 
-       if [ "${PN}" != "ruby" ] && check_prog ruby
+       if [ "${PN}" != "ruby" ] && check_prog ruby && check_prog gem
        then
                rbdirs=($(ruby -e 'print($:.join(" "))'))
                rbdirs+=" ${DEPS_PATH//:/ }"
diff --git a/meson.build b/meson.build
index a6cf2008..d6bde5d9 100644
--- a/meson.build
+++ b/meson.build
@@ -1,5 +1,5 @@
 project('cygport',
-        version: '0.37.6')
+        version: '0.37.7')
 
 bindir = join_paths(get_option('prefix'), get_option('bindir'))
 datadir = join_paths(get_option('prefix'), get_option('datadir'))

Reply via email to