public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jon TURNEY <jturney@sourceware.org>
To: cygwin-apps-cvs@sourceware.org
Subject: [cygport - the Cygwin packaging tool] branch master, updated. 0.34.2-9-gdae0245
Date: Wed, 13 Apr 2022 13:14:16 +0000 (GMT)	[thread overview]
Message-ID: <20220413131416.41B0F3858025@sourceware.org> (raw)




https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=dae02450f5b77434ee2313254653df923a45fb54

commit dae02450f5b77434ee2313254653df923a45fb54
Author: Adam Dinwoodie <adam@dinwoodie.org>
Date:   Mon Mar 14 22:15:16 2022 +0000

    autotools.cygclass: correctly detect Autoconf 2.70+
    
    The latest version of Autoconf is 2.71, but the version detection
    incorrectly considers 2.70 and higher as being the same as 2.59 and
    lower for the purposes of specifying documentation directories.  Correct
    that, and make the version detection a bit more future-proof by parsing
    out the actual version parts and performing numeric comparison.
    
    While we're at it, add a bit more commentary explaining the intent of
    the different behaviour over the different Autoconf versions.

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=b72cdf07b92f99da38801a7e8ab76c19bc49bcdd

commit b72cdf07b92f99da38801a7e8ab76c19bc49bcdd
Author: Achim Gratz <Stromeko@Stromeko.DE>
Date:   Sat Jun 26 15:35:46 2021 +0200

    cygclass/perl.cygclass: do not clobber HOMEPAGE and provide a correct default
    
    do not clobber explicit HOMEPAGE
    https://metacpan.org/release/ now redirects to https://metacpan.org/dist/

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=34a4639b849b7283557ce68e73235f27e950ccaa

commit 34a4639b849b7283557ce68e73235f27e950ccaa
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Tue Mar 1 15:09:45 2022 +0000

    Add git-archive-all to build-depends
    
    Add git-archive-all to build-depends, needed to make a packaged release
    with 'ninja bootstrap'.

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=0dac514e6efc3d586151ff8a95e6ec53889e32f9

commit 0dac514e6efc3d586151ff8a95e6ec53889e32f9
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Mon Jan 23 13:25:11 2017 +0000

    Add srcpackage command
    
    Add srcpackage command, which only creates source package
    
    Move src.hint generation from __pkg_dist to __pkg_srcpkg
    Various tweaks to allow it to work when 'cygport prep' hasn't been run.
    
    This is intended for use in automation, to build from the source
    package, rather than a packaging repository, ensuring that all files
    used by the build are properly present in the source package.

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=59a8f2b69ceeb560146aa04a8943d9918b888048

commit 59a8f2b69ceeb560146aa04a8943d9918b888048
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Wed May 26 14:49:47 2021 +0100

    Add 'vars' command to output arbitrary .cygport variables
    
    Since variables in a .cygport file can be computed from arbitrary shell
    expressions, perhaps containing variables that cygport itself defines,
    other programs can't determine their value just by parsing the .cygport
    file.
    
    Add 'vars' command to output arbitrary variables defined by the .cygport
    file.
    
    The idea is that the output from this should be source-able in a shell
    to be further used. e.g
    
    > $ cygport libX11.cygport vars PVR BUILD_REQUIRES
    > PVR='1.7.1-1'
    > BUILD_REQUIRES='xtrans xorgproto libxcb-devel xmlto xorg-sgml-doctools docbook-xml43'
    
    > $ source <(cygport libX11.cygport vars BUILD_REQUIRES) ; for r in ${BUILD_REQUIRES} ; do echo $r; done
    > xtrans
    > xorgproto
    > libxcb-devel
    > xmlto
    > xorg-sgml-doctools
    > docbook-xml43
    
    v2: use 'declare -p'

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=e31cdc53b87b097865cb70539be85c8ee16c6431

commit e31cdc53b87b097865cb70539be85c8ee16c6431
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Wed Feb 23 12:48:20 2022 +0000

    Don't ignore errors from make in cygtest()
    
    This reverts commit 4a6fe2a99ff70082886edd22cc9392860047b71e
    
    This makes the behaviour of the default src_test() consistent with more
    specialized versions (i.e. exit with non zero status if tests failed).


Diff:
---
 bin/cygport.in                                     | 11 +++
 cygclass/autotools.cygclass                        | 40 +++++++----
 cygclass/perl.cygclass                             |  2 +-
 data/cygport-bash-completion                       |  4 +-
 data/sample.cygport                                |  2 +-
 lib/help.cygpart                                   |  1 +
 lib/pkg_info.cygpart                               | 10 ++-
 lib/pkg_pkg.cygpart                                | 81 ++++++++++++----------
 lib/src_test.cygpart                               |  4 +-
 lib/syntax.cygpart                                 |  1 +
 .../perl-Text-Glob/perl-Text-Glob-0.11-1-src.hint  |  2 +-
 .../dist/perl-Carp/perl-Carp-1.38-1-src.hint       |  2 +-
 .../dist/perl-Lchown/perl-Lchown-1.01-1-src.hint   |  2 +-
 13 files changed, 102 insertions(+), 60 deletions(-)

diff --git a/bin/cygport.in b/bin/cygport.in
index afc6f7e..81dd166 100755
--- a/bin/cygport.in
+++ b/bin/cygport.in
@@ -623,6 +623,11 @@ do
 			__show_info;
 			_status=$?;
 			;;
+		vars)
+			__show_vars ${argv[@]:$((++arg_n))};
+			_status=$?;
+			arg_n=$argc;  # consumed all remaining args
+			;;
 		homepage|web*|www*)
 			__show_web;
 			_status=$?;
@@ -636,6 +641,12 @@ do
 			(__pkg_binpkg && __pkg_pkgcheck && __pkg_srcpkg && __pkg_dist ${_pkg_tag}) 2>&1 | tee -a ${pkglog};
 			_status=${PIPESTATUS[0]};
 			;;
+		srcpackage|srcpkg)
+			__stage Packaging Source;
+			__log_init ${pkglog};
+			(__pkg_srcpkg) 2>&1 | tee -a ${pkglog};
+			_status=${PIPESTATUS[0]};
+			;;
 		diff|mkdiff|mkpatch)
 			__pkg_diff;
 			_status=$?;
diff --git a/cygclass/autotools.cygclass b/cygclass/autotools.cygclass
index cce9be0..b40828b 100644
--- a/cygclass/autotools.cygclass
+++ b/cygclass/autotools.cygclass
@@ -619,6 +619,8 @@ cygconf() {
 	local confdir;
 	local configure;
 	local confver;
+	local confver_maj;
+	local confver_min;
 	local f;
 	local foo_config;
 	local prefix;
@@ -650,7 +652,13 @@ cygconf() {
 	fi
 
 	configure="${confdir}/configure"
-	confver=$(grep -m 1 'GNU Autoconf' ${configure} | cut -d ' ' -f 6)
+	confver="$("$configure" --version | sed -rn 's/.*GNU Autoconf ([0-9\.]+)/\1/p')"
+	confver_maj=${confver%%.*}
+	confver_min=${confver##*.}
+	if [ $confver_maj -ne 2 ]
+	then
+		error "unexpected autoconf version";
+	fi
 
 	# AC_CONFIG_FILES should not be dist'ed, but it sometimes happens anyway
 	eval $(grep -h '^ac_config_files=' ${configure})
@@ -678,18 +686,26 @@ cygconf() {
 		confargs+=" --libdir=${prefix}/${MULTILIB_LIBDIR}"
 	fi
 
-	case "x${confver}" in
-		x2.6[0-9]*)
-			confargs+=" --docdir=/usr/share/doc/${PN} --htmldir=/usr/share/doc/${PN}/html"
-			;;
-		*)
-			confargs+=" --infodir=${prefix}/share/info --mandir=${prefix}/share/man"
-			;;
-	esac
+	if [ $confver_min -ge 60 ]
+	then
+		# Autoconf version supports --docdir and --htmldir, which will
+		# need to be specified manually.  It also supports --infodir
+		# and --mandir, but the defaults for those match the FHS.
+		confargs+=" --docdir=/usr/share/doc/${PN} --htmldir=/usr/share/doc/${PN}/html"
+	else
+		# Autoconf version does not support --docdir or --htmldir, so
+		# don't specify those.  Set --infodir and --mandir, as those
+		# have defaults that don't match the FHS.
+		confargs+=" --infodir=${prefix}/share/info --mandir=${prefix}/share/man"
+	fi
 
-	case "x${confver}" in
-		x2.[5-9]*)	confargs+=" -C" ;;
-	esac
+
+	if [ $confver_min -ge 50 ]
+	then
+		# Always use a cache file; prior to 2.50, this was the default,
+		# thereafter it needs to be requested explicitly.
+		confargs+=" -C"
+	fi
 
 	if cross_compiling || inherited toolchain
 	then
diff --git a/cygclass/perl.cygclass b/cygclass/perl.cygclass
index bb594ca..7e0fb8c 100644
--- a/cygclass/perl.cygclass
+++ b/cygclass/perl.cygclass
@@ -182,7 +182,7 @@ SUMMARY="Perl distribution ${ORIG_PN}"
 #  This variable is set only if CPAN_AUTHOR is defined before inherit()ing
 #  perl.cygclass.
 #****
-HOMEPAGE="https://metacpan.org/release/${ORIG_PN}"
+HOMEPAGE="${HOMEPAGE-https://metacpan.org/dist/${ORIG_PN}}"
 
 #****o* perl.cygclass/SRC_URI (perl)
 #  DESCRIPTION
diff --git a/data/cygport-bash-completion b/data/cygport-bash-completion
index 86df238..a97416d 100644
--- a/data/cygport-bash-completion
+++ b/data/cygport-bash-completion
@@ -9,10 +9,10 @@ _cygport()
 
 	commands='download fetch wget get \
 		prep unpack oldpatch compile build make \
-		check test inst install list dep depends \
+		check test inst install list dep depends srcpackage srcpkg \
 		package pkg package-test pkg-test diff mkdiff mkpatch \
 		upload stage announce almostall all all-test clean finish \
-		help info version homepage website'
+		help info version homepage website vars'
 
 	if [[ $COMP_CWORD -eq 1 ]] ; then
 		# first arg: source file completion
diff --git a/data/sample.cygport b/data/sample.cygport
index aea8540..8de294c 100644
--- a/data/sample.cygport
+++ b/data/sample.cygport
@@ -15,7 +15,7 @@ SRC_URI="https://github.com/cygwin/cygport/${VERSION}/cygport-${VERSION}.tar.gz"
 ARCH=noarch
 
 # Build dependencies only
-BUILD_REQUIRES="groff help2man robodoc"
+BUILD_REQUIRES="git-archive-all groff help2man robodoc"
 # runtime deps to go in setup.hint, and note the escaped newline
 REQUIRES="autoconf automake binutils bzip2 coreutils diffstat diffutils \
 dos2unix findutils file gawk gcc-core gcc-g++ grep gzip lftp libtool lndir \
diff --git a/lib/help.cygpart b/lib/help.cygpart
index dfb943d..ff630c2 100644
--- a/lib/help.cygpart
+++ b/lib/help.cygpart
@@ -45,6 +45,7 @@ __show_help() {
 		  compile       run all compilation steps
 		  test          run the package's test suite, if one exists
 		  install       install into a DESTDIR, and run post-installation steps
+		  srcpackage    create source package
 		  package       create binary and source packages
 		  package-test  create binary and source packages, marked as test
 		  upload        upload finished packages to cygwin.com
diff --git a/lib/pkg_info.cygpart b/lib/pkg_info.cygpart
index 08ddd69..9f768d5 100644
--- a/lib/pkg_info.cygpart
+++ b/lib/pkg_info.cygpart
@@ -650,5 +650,13 @@ __show_web() {
 	${mybrowser} ${mywww} &>/dev/null &
 }
 
+__show_vars() {
+	for v in "$@"
+	do
+		declare -p "${v}"
+	done
+}
+
 readonly -f __list_files __list_debug_files __list_deps \
-	    __show_deps __show_info __show_web __pager
+	    __show_deps __show_info __show_web __pager \
+	    __show_vars
diff --git a/lib/pkg_pkg.cygpart b/lib/pkg_pkg.cygpart
index 586f1fe..b4c5c6f 100644
--- a/lib/pkg_pkg.cygpart
+++ b/lib/pkg_pkg.cygpart
@@ -462,12 +462,16 @@ __gpg_sign() {
 __pkg_srcpkg() {
 	local src;
 
+	mkdir -p ${spkgdir};
 	rm -fr ${spkgdir}/*;
 
-	echo;
-	__step "Creating source patches";
+	if [ -d ${patchdir} ]
+	then
+		echo;
+		__step "Creating source patches";
 
-	__pkg_diff;
+		__pkg_diff;
+	fi
 
 	if [ -s ${patchdir}/${cygwin_patchfile} ]
 	then
@@ -519,8 +523,44 @@ __pkg_srcpkg() {
 
 	cd ${spkgdir%/*};
 
+	mkdir -p ${distdir}/${PN};
 	tar Jcvf ${distdir}/${PN}/${PF}-src.tar.xz ${spkgdir##*/}/ || error "Source package creation failed"
 	echo;
+
+	# source package hint
+	if [ ! -f ${distdir}/${PN}/${PN}-${PVR}-src.hint ]
+	then
+		pkg_category_var=${PN//[-+\.]/_}_CATEGORY;
+		pkg_summary_var=${PN//[-+\.]/_}_SUMMARY;
+		pkg_description_var=${PN//[-+\.]/_}_DESCRIPTION;
+
+		if [ -f ${C}/${PN}-src.hint ]
+		then
+			cp ${C}/${PN}-src.hint ${distdir}/${PN}/${PN}-${PVR}-src.hint
+		elif [ -f ${C}/setup.hint ]
+		then
+			cp ${C}/setup.hint ${distdir}/${PN}/${PN}-${PVR}-src.hint
+		elif [ -n "${!pkg_category_var:-${CATEGORY}}" \
+			-a -n "${!pkg_summary_var:-${SUMMARY}}${!pkg_description_var:-${DESCRIPTION}}" ]
+		then
+			cat > ${distdir}/${PN}/${PN}-${PVR}-src.hint <<-_EOF
+category: ${!pkg_category_var:-${CATEGORY}}
+build-depends: cygport ${BUILD_REQUIRES}
+sdesc: "${!pkg_summary_var:-${SUMMARY}}"
+ldesc: "${!pkg_description_var:-${DESCRIPTION:-${!pkg_summary_var:-${SUMMARY}}}}"
+skip:
+${pkg_tag}
+_EOF
+			if [ -n "${HOMEPAGE}" ]
+			then
+				cat >> ${distdir}/${PN}/${PN}-${PVR}-src.hint <<-_EOF
+homepage: ${HOMEPAGE}
+_EOF
+			fi
+		else
+			warning "${PN}-src.hint is missing";
+		fi
+	fi
 }
 
 __pkg_dist() {
@@ -851,41 +891,6 @@ _EOF
 			fi
 		fi
 	fi
-
-	# source package hint
-	if [ ! -f ${distdir}/${PN}/${PN}-${PVR}-src.hint ]
-	then
-		pkg_category_var=${PN//[-+\.]/_}_CATEGORY;
-		pkg_summary_var=${PN//[-+\.]/_}_SUMMARY;
-		pkg_description_var=${PN//[-+\.]/_}_DESCRIPTION;
-
-		if [ -f ${C}/${PN}-src.hint ]
-		then
-			cp ${C}/${PN}-src.hint ${distdir}/${PN}/${PN}-${PVR}-src.hint
-		elif [ -f ${C}/setup.hint ]
-		then
-			cp ${C}/setup.hint ${distdir}/${PN}/${PN}-${PVR}-src.hint
-		elif [ -n "${!pkg_category_var:-${CATEGORY}}" \
-			-a -n "${!pkg_summary_var:-${SUMMARY}}${!pkg_description_var:-${DESCRIPTION}}" ]
-		then
-			cat > ${distdir}/${PN}/${PN}-${PVR}-src.hint <<-_EOF
-category: ${!pkg_category_var:-${CATEGORY}}
-build-depends: cygport ${BUILD_REQUIRES}
-sdesc: "${!pkg_summary_var:-${SUMMARY}}"
-ldesc: "${!pkg_description_var:-${DESCRIPTION:-${!pkg_summary_var:-${SUMMARY}}}}"
-skip:
-${pkg_tag}
-_EOF
-			if [ -n "${HOMEPAGE}" ]
-			then
-				cat >> ${distdir}/${PN}/${PN}-${PVR}-src.hint <<-_EOF
-homepage: ${HOMEPAGE}
-_EOF
-			fi
-		else
-			warning "${PN}-src.hint is missing";
-		fi
-	fi
 }
 
 # protect functions
diff --git a/lib/src_test.cygpart b/lib/src_test.cygpart
index 8886334..39a81c4 100644
--- a/lib/src_test.cygpart
+++ b/lib/src_test.cygpart
@@ -35,10 +35,10 @@ cygtest() {
 	then
 		if make -n check &> /dev/null
 		then
-			make -k check || true
+			make -k check
 		elif make -n test &> /dev/null
 		then
-			make -k test || true
+			make -k test
 		else
 			inform "No testsuite detected.";
 		fi
diff --git a/lib/syntax.cygpart b/lib/syntax.cygpart
index 4ff9973..9ec12f2 100644
--- a/lib/syntax.cygpart
+++ b/lib/syntax.cygpart
@@ -151,6 +151,7 @@ __step() {
 
 __log_init() {
 	local log=${1}
+	mkdir -p ${logdir}
 	rm -f ${log}
 
 	echo -e cygport ${_cygport_version} '\n' >> ${log}
diff --git a/testsuite/download/perl/hints/perl-Text-Glob-0.11-1.noarch/dist/perl-Text-Glob/perl-Text-Glob-0.11-1-src.hint b/testsuite/download/perl/hints/perl-Text-Glob-0.11-1.noarch/dist/perl-Text-Glob/perl-Text-Glob-0.11-1-src.hint
index 8e657f8..eab4c67 100644
--- a/testsuite/download/perl/hints/perl-Text-Glob-0.11-1.noarch/dist/perl-Text-Glob/perl-Text-Glob-0.11-1-src.hint
+++ b/testsuite/download/perl/hints/perl-Text-Glob-0.11-1.noarch/dist/perl-Text-Glob/perl-Text-Glob-0.11-1-src.hint
@@ -4,4 +4,4 @@ sdesc: "Perl Text::Glob distribution"
 ldesc: "Perl module for matching globbing patterns against text"
 skip:
 
-homepage: https://metacpan.org/release/Text-Glob
+homepage: https://metacpan.org/dist/Text-Glob
diff --git a/testsuite/perl/ExtUtils-MakeMaker/hints/perl-Carp-1.38-1.noarch/dist/perl-Carp/perl-Carp-1.38-1-src.hint b/testsuite/perl/ExtUtils-MakeMaker/hints/perl-Carp-1.38-1.noarch/dist/perl-Carp/perl-Carp-1.38-1-src.hint
index bf840db..487ca20 100644
--- a/testsuite/perl/ExtUtils-MakeMaker/hints/perl-Carp-1.38-1.noarch/dist/perl-Carp/perl-Carp-1.38-1-src.hint
+++ b/testsuite/perl/ExtUtils-MakeMaker/hints/perl-Carp-1.38-1.noarch/dist/perl-Carp/perl-Carp-1.38-1-src.hint
@@ -6,4 +6,4 @@ like die() or warn(), but with a message which is more likely to be useful
 to a user of your module."
 skip:
 
-homepage: https://metacpan.org/release/Carp
+homepage: https://metacpan.org/dist/Carp
diff --git a/testsuite/perl/Module-Build/hints/perl-Lchown-1.01-1.x86_64/dist/perl-Lchown/perl-Lchown-1.01-1-src.hint b/testsuite/perl/Module-Build/hints/perl-Lchown-1.01-1.x86_64/dist/perl-Lchown/perl-Lchown-1.01-1-src.hint
index 1ebd347..1591d8c 100644
--- a/testsuite/perl/Module-Build/hints/perl-Lchown-1.01-1.x86_64/dist/perl-Lchown/perl-Lchown-1.01-1-src.hint
+++ b/testsuite/perl/Module-Build/hints/perl-Lchown-1.01-1.x86_64/dist/perl-Lchown/perl-Lchown-1.01-1-src.hint
@@ -6,4 +6,4 @@ system call, on systems that support lchown.  The lchown(2) call is used to
 change the ownership and group of symbolic links."
 skip:
 
-homepage: https://metacpan.org/release/Lchown
+homepage: https://metacpan.org/dist/Lchown



                 reply	other threads:[~2022-04-13 13:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220413131416.41B0F3858025@sourceware.org \
    --to=jturney@sourceware.org \
    --cc=cygwin-apps-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).