https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=4e713922633a5900c5aea70ef254589052861d4e commit 4e713922633a5900c5aea70ef254589052861d4e Author: Jon Turney Date: Mon Sep 19 18:02:53 2022 +0100 Bump version to 0.35.3 https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=7f73072affb2249616a4f387d8ef8cff751a625a commit 7f73072affb2249616a4f387d8ef8cff751a625a Author: William Hu Date: Sun Sep 18 13:10:46 2022 +0100 Avoid errors from find when packaging ocaml Avoid "find: ‘/usr/lib/ocaml’: No such file or directory" errors when packaging ocaml, if it's not already installed. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=a91383197c1f6031fdf3c8ee29ebf3a814fe3f22 commit a91383197c1f6031fdf3c8ee29ebf3a814fe3f22 Author: Jon Turney Date: Sat Sep 17 14:07:36 2022 +0100 Warn about missing HOMEPAGE or LICENSE The keys these variables generate in .hint files will become mandatory for uploads. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=0f386b01c361ee4042ffc5d50a4b9e8bb1d8fbdd commit 0f386b01c361ee4042ffc5d50a4b9e8bb1d8fbdd Author: Jon Turney Date: Sun Sep 11 13:41:09 2022 +0100 README: Mention some useful but currently undocmented sub-commands https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=1badea50c6bf4b1263a44f2845c3191e98c22450 commit 1badea50c6bf4b1263a44f2845c3191e98c22450 Author: Jon Turney Date: Sat Sep 10 21:11:23 2022 +0100 Use 'command -v' rather than 'hash' in check_prog() hash always returns 0 when an absolute pathname is supplied (which we do in some places), even if that pathname doesn't exist. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=9ea44177acd0757512142510a5cbf8a56c544d00 commit 9ea44177acd0757512142510a5cbf8a56c544d00 Author: Jon Turney Date: Sat Sep 10 17:37:58 2022 +0100 Allow 'cygport vars' to work when missing some cygclass prereqs Setting the env var __cygport_check_prog_req_nonfatal makes check_prog_req nonfatal. This allows 'cygport vars' to be used by automation to discover prereqs, when prereqs aren't yet installed. Future work: Fix this in a better way! Perhaps these calls to check_prog_req should only occur for certain cygport subcommands? Or it's made non-fatal for certain other cygport subcommands? https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=dc842b245d294a0e164f08744991c80924991718 commit dc842b245d294a0e164f08744991c80924991718 Author: Achim Gratz Date: Fri May 15 16:08:50 2015 +0200 bin/cygport.in: Fix handling of filenames w/o .cygport suffix on command line Fix the handling of rpm-spec-style filename (i.e. PN.cygport, not PN-PV-PR.cygport) suppplied without the .cygport suffix on the command line. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/cygport.git;h=67c895ab978039886bb4fc841acbf3f9150d5d50 commit 67c895ab978039886bb4fc841acbf3f9150d5d50 Author: Jon Turney Date: Sun Aug 14 20:25:22 2022 +0100 Add lzip to requires of cygport package This is needed by tar to be able to decompress .lz archives. Diff: --- NEWS | 5 +++++ README | 7 ++++++- bin/cygport.in | 23 ++++++++++++++++------- cygport.spec | 2 +- data/sample.cygport | 4 ++-- lib/check_funcs.cygpart | 7 +++++-- lib/help.cygpart | 8 +++++--- lib/pkg_info.cygpart | 4 ++++ lib/syntax.cygpart | 8 ++++---- meson.build | 2 +- 10 files changed, 49 insertions(+), 21 deletions(-) diff --git a/NEWS b/NEWS index 354e7ce..4c397ba 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +0.35.3: + * Fix detecting configure scripts generated by autoconf version 2.13 + * Fix handling of filenames without .cygport suffix on command line + * Warn about missing HOMEPAGE or LICENSE + 0.35.2: * New INHERITED and ARCHES variables. * Fix 'cygport vars UNDEFINED'. diff --git a/README b/README index ede53eb..24d2a67 100644 --- a/README +++ b/README @@ -153,11 +153,16 @@ to be processed. All other arguments are interpreted as a COMMAND, which may be Other COMMANDs are meant primarily for maintainers: - fetch - download the original source from the Internet + fetch - download any missing upstream sources + fetchall - download any all upstream sources check - run the testsuite postinst - re-run post-installation steps list - create a file listing suitable for the Cygwin README deps - list direct dependencies of all executables + info - show a summary of package information + diff - write a patch file capturing changes to source in the working directory + stage - as upload, but don't request processing of uploaded packages + announce - compose and send a package announcement The standard arguments --help or --version may also be passed to cygport. diff --git a/bin/cygport.in b/bin/cygport.in index 5f5c1c5..85382c2 100755 --- a/bin/cygport.in +++ b/bin/cygport.in @@ -150,7 +150,7 @@ source ${_privlibdir}/syntax.cygpart # USAGE # See # |html the manpage -# for command line options. +# for sub-commands and command line options. # REQUIRES # The following packages are required to build packages with cygport: # autoconf, automake, bash, binutils, bzip2, coreutils, diffstat, diffutils, @@ -349,11 +349,12 @@ unset _autotools_CYGCLASS_ _autotools_CYGCLASS_stage1_ ################################################################################ unset NAME VERSION RELEASE -if [ -f ${argv[1]} ] +declare cygportfile="${argv[1]%.cygport}.cygport" +if [ -f "${cygportfile}" ] then - eval $(grep '^NAME=' ${argv[1]}) - eval $(grep '^VERSION=' ${argv[1]}) - eval $(grep '^RELEASE=' ${argv[1]}) + eval $(grep '^NAME=' ${cygportfile}) + eval $(grep '^VERSION=' ${cygportfile}) + eval $(grep '^RELEASE=' ${cygportfile}) fi if [ "${NAME+y}${VERSION+y}${RELEASE+y}" = "yyy" ] @@ -362,9 +363,10 @@ declare -r PN=${NAME} declare PV=${VERSION} declare -r PR=${RELEASE} declare -r PF=${PN}-${PV}-${PR} -declare -r cygportfile=${argv[1]##*/} +declare -r cygportfile=${cygportfile##*/} else -# file must be named PN-PV-PR.cygport, but the extension is optional in argv[1] +# if we didn't get NAME VERSION and RELEASE from the .cygport, the file itself +# must be named PN-PV-PR.cygport, but the extension is optional in argv[1] PF=${argv[1]##*/} declare -r PF=${PF%.cygport} declare -r PN=${PF%%-[0-9]*}; @@ -465,6 +467,13 @@ then fi fi +for VAR in "HOMEPAGE" "LICENSE" +do + if [ ! -v ${VAR} ] + then + warning "${VAR} not defined" + fi +done for restrict in ${RESTRICT//,/ } do diff --git a/cygport.spec b/cygport.spec index a033331..48085e0 100644 --- a/cygport.spec +++ b/cygport.spec @@ -1,7 +1,7 @@ %define debug_package %{nil} Name: cygport -Version: 0.35.2 +Version: 0.35.3 Release: 1%{?dist} Summary: Cygwin package building tool diff --git a/data/sample.cygport b/data/sample.cygport index ef223e7..1ea5285 100644 --- a/data/sample.cygport +++ b/data/sample.cygport @@ -1,7 +1,7 @@ inherit meson NAME="cygport" -VERSION=0.35.2 +VERSION=0.35.3 RELEASE=1 CATEGORY="Devel" SUMMARY="Cygwin source packaging tool" @@ -19,7 +19,7 @@ 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 \ -make openssh patch perl-Authen-SASL perl-MIME-tools perl-Net-SMTP-SSL rsync \ +lzip make openssh patch perl-Authen-SASL perl-MIME-tools perl-Net-SMTP-SSL rsync \ sed tar texinfo unzip util-linux wget which xz" # We use the src_compile and src_test provided by meson.cygclass diff --git a/lib/check_funcs.cygpart b/lib/check_funcs.cygpart index 77f9e7a..858e42b 100644 --- a/lib/check_funcs.cygpart +++ b/lib/check_funcs.cygpart @@ -37,7 +37,7 @@ check_prog() { for _prog do - if ! hash ${_prog} &> /dev/null + if ! command -v ${_prog} &> /dev/null then return 1; fi @@ -61,7 +61,10 @@ check_prog_req() { if ! check_prog ${prog} then - error "${pkg} is required to build this package"; + if [ ! ${__cygport_check_prog_req_nonfatal} ] + then + error "${pkg} is required to build this package"; + fi fi return 0; diff --git a/lib/help.cygpart b/lib/help.cygpart index ff630c2..cc9e1f9 100644 --- a/lib/help.cygpart +++ b/lib/help.cygpart @@ -28,9 +28,11 @@ __show_help() { OPTIONS may include the following: - --32, -4 build package for i686 Cygwin - --64, -8 build package for x86_64 Cygwin - --debug enable debugging messages + --32, -4 build package for i686 Cygwin + --64, -8 build package for x86_64 Cygwin + --debug enable debugging messages + --version, -v show the version + --help, -h show this help The --32 and --64 options are mutually exclusive. diff --git a/lib/pkg_info.cygpart b/lib/pkg_info.cygpart index 4c51483..fe106d4 100644 --- a/lib/pkg_info.cygpart +++ b/lib/pkg_info.cygpart @@ -364,6 +364,10 @@ __list_deps() { if check_prog ocamlc.opt then mldir=$(ocamlc.opt -where) + if [ ! -d ${mldir} ] + then + mldir="" + fi if [ -d ${D}${mldir} ] then for cma in $(find ${D}${mldir} ${mldir} -name '*.cma') diff --git a/lib/syntax.cygpart b/lib/syntax.cygpart index 099a3a4..fa96fe7 100644 --- a/lib/syntax.cygpart +++ b/lib/syntax.cygpart @@ -34,10 +34,10 @@ # Since a .cygport file is itself not a functioning script, the she-bang # header (#!/bin/bash) should be omitted, and the file should not be executable. # -# The bare minimum for a working .cygport file includes a SRC_URI definition, -# and src_compile and src_install functions. Note that several Cygclasses -# provide some or all of these, so in some cases a single line inherit -# command will suffice. +# The bare minimum for a working .cygport file includes HOMEPAGE, LICENSE, a +# SRC_URI definition, and src_compile and src_install functions. Note that +# several Cygclasses provide some or all of these, so in some cases a single +# line inherit command will suffice. #**** #****** Format/Syntax diff --git a/meson.build b/meson.build index b7a3b9f..87c1ba2 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('cygport', - version: '0.35.2') + version: '0.35.3') bindir = join_paths(get_option('prefix'), get_option('bindir')) datadir = join_paths(get_option('prefix'), get_option('datadir'))