j...@wxcvbn.org (Jérémie Courrèges-Anglas) writes:

> "Kent R. Spillner" <kspill...@acm.org> writes:
>
>> On Tue, Dec 24, 2013 at 08:11:13AM -0600, Kent R. Spillner wrote:
>>> Here is an updated patch with the portability improvments suggested by jca@.
>>
>> Actually, after cluebat from Quilt maintainers this diff should be ignored
>> and my original diff preferred.
>>
>> When you configure quilt with --with-foo=/path/to/gnu/gfoo Quilt actually
>> creates a compat/ directory and copies gfoo to compat/foo.  Then the quilt
>> wrapper (bin/quilt.in) adds compat/ to the front of PATH.
>>
>> So long story short, those uses of sed 's/.../i' are actually portable
>> because sed is really gsed at run-time.  Slightly misleading, but portable. 
>> :) 
>
> I did not notice the compat/ symlinks, sorry if you wasted time on this.
> OTOH we have a better understanding of how this port works now. O:)
>
> I reviewed all the scripts and did not find any offender but those:
> - md5sum in quilt/scripts/inspect
> - cp --parents --blabla in quilt/scripts/backup-files
>
> The latter is handled by the script if there's an error, using
> a file-by-file copy.  Since we depend on coreutils anyway, why not use
> gcp?
>
> Another issue is that ${SYSCONFDIR} in Makefile.in wasn't expanded
> (using MAKE_FLAGS).  Let's use @sysconfdir@ instead so that quilt
> properly finds /etc/quilt.quiltrc.
>
> ok?

I intend to commit this tomorrow.

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/devel/quilt/Makefile,v
> retrieving revision 1.4
> diff -u -p -r1.4 Makefile
> --- Makefile  31 Aug 2013 17:22:16 -0000      1.4
> +++ Makefile  30 Dec 2013 17:23:19 -0000
> @@ -2,11 +2,11 @@
>  
>  COMMENT=             manage large numbers of patches
>  
> -DISTNAME=            quilt-0.60
> -REVISION=            1
> +DISTNAME=            quilt-0.61
>  CATEGORIES=          devel
>  
>  HOMEPAGE=            http://savannah.nongnu.org/projects/quilt/
> +MAINTAINER=          Kent R. Spillner <kspill...@acm.org>
>  
>  # GPLv3+
>  PERMIT_PACKAGE_CDROM=        Yes
> @@ -33,12 +33,15 @@ RUN_DEPENDS=              devel/gpatch \
>  
>  BUILD_DEPENDS=               ${RUN_DEPENDS}
>  
> -CONFIGURE_STYLE=     gnu
> -CONFIGURE_ARGS=              --with-date=${LOCALBASE}/bin/gdate \
> +CONFIGURE_STYLE=     autoconf no-autoheader
> +AUTOCONF_VERSION=    2.69
> +CONFIGURE_ARGS=              --with-cp=${LOCALBASE}/bin/gcp \
> +                     --with-date=${LOCALBASE}/bin/gdate \
>                       --with-diff=${LOCALBASE}/bin/gdiff \
>                       --with-find=${LOCALBASE}/bin/gfind \
>                       --with-getopt=${LOCALBASE}/bin/gnugetopt \
>                       --with-grep=${LOCALBASE}/bin/ggrep \
> +                     --with-md5sum=${LOCALBASE}/bin/gmd5sum \
>                       --with-patch=${LOCALBASE}/bin/gpatch \
>                       --with-sed=${LOCALBASE}/bin/gsed \
>                       --without-patch-wrapper \
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/devel/quilt/distinfo,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 distinfo
> --- distinfo  8 Oct 2012 15:14:25 -0000       1.1.1.1
> +++ distinfo  27 Dec 2013 16:18:36 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (quilt-0.60.tar.gz) = PXKikuQyvrmnP50Kz+OnfJtNfkIgmRm7JE6ZWMfP5ks=
> -SIZE (quilt-0.60.tar.gz) = 442369
> +SHA256 (quilt-0.61.tar.gz) = HuwKJwrE1B7qD9WCNgPJ0qNatrirc6kN2SzhKRsqn8M=
> +SIZE (quilt-0.61.tar.gz) = 450552
> Index: patches/patch-Makefile_in
> ===================================================================
> RCS file: /cvs/ports/devel/quilt/patches/patch-Makefile_in,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 patch-Makefile_in
> --- patches/patch-Makefile_in 8 Oct 2012 15:14:25 -0000       1.1.1.1
> +++ patches/patch-Makefile_in 30 Dec 2013 17:41:26 -0000
> @@ -1,12 +1,21 @@
>  $OpenBSD: patch-Makefile_in,v 1.1.1.1 2012/10/08 15:14:25 rpe Exp $
> ---- Makefile.in.orig Sun Sep  2 19:19:00 2012
> -+++ Makefile.in      Sun Sep  2 19:19:16 2012
> +--- Makefile.in.orig Sun Dec  8 10:40:42 2013
> ++++ Makefile.in      Mon Dec 30 18:40:55 2013
>  @@ -13,7 +13,7 @@ docdir :=  @docdir@
>   mandir :=   @mandir@
>   localedir :=        $(datadir)/locale
>   emacsdir := $(datadir)/emacs/site-lisp
>  -etcdir :=   $(subst /usr/etc,/etc,$(prefix)/etc)
> -+etcdir :=   ${SYSCONFDIR}
> ++etcdir :=   @sysconfdir@
>   
>   INSTALL :=  @INSTALL@
>   POD2MAN :=  @POD2MAN@
> +@@ -42,6 +42,8 @@ MSGCAT :=  @MSGCAT@
> + DIFFSTAT := @DIFFSTAT@
> + RPMBUILD := @RPMBUILD@
> + SENDMAIL := @SENDMAIL@
> ++CP :=               @CP@
> ++MD5SUM :=   @MD5SUM@
> + 
> + USE_NLS :=  @USE_NLS@
> + STAT_HARDLINK := @STAT_HARDLINK@
> Index: patches/patch-configure_ac
> ===================================================================
> RCS file: patches/patch-configure_ac
> diff -N patches/patch-configure_ac
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-configure_ac        30 Dec 2013 17:33:48 -0000
> @@ -0,0 +1,13 @@
> +$OpenBSD$
> +--- configure.ac.orig        Sun Dec  8 21:51:39 2013
> ++++ configure.ac     Mon Dec 30 18:28:26 2013
> +@@ -367,6 +367,9 @@ fi
> + 
> + QUILT_COMPAT_PROG_PATH(SENDMAIL, sendmail, [], [/usr/sbin])
> + 
> ++QUILT_COMPAT_PROG_PATH(CP, cp, gcp cp)
> ++QUILT_COMPAT_PROG_PATH(MD5SUM, md5sum, gmd5sum md5sum)
> ++
> + AC_PATH_PROG(MSGMERGE, [msgmerge])
> + AC_PATH_PROG(MSGFMT, [msgfmt])
> + AC_PATH_PROG(XGETTEXT, [xgettext])
> Index: patches/patch-test_delete_test
> ===================================================================
> RCS file: /cvs/ports/devel/quilt/patches/patch-test_delete_test,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 patch-test_delete_test
> --- patches/patch-test_delete_test    8 Oct 2012 15:14:25 -0000       1.1.1.1
> +++ patches/patch-test_delete_test    30 Dec 2013 17:41:25 -0000
> @@ -1,17 +1,17 @@
>  $OpenBSD: patch-test_delete_test,v 1.1.1.1 2012/10/08 15:14:25 rpe Exp $
> ---- test/delete.test.orig    Sun Sep  2 21:40:18 2012
> -+++ test/delete.test Sun Sep  2 21:40:26 2012
> +--- test/delete.test.orig    Sun Dec  8 10:40:42 2013
> ++++ test/delete.test Mon Dec 30 18:34:19 2013
>  @@ -1,3 +1,4 @@
> -+#   >~ find: `?\./dir'?: Permission denied
> ++#   >~ .*find: [`']?\./dir'?: Permission denied
>   Test the delete command.
>   
>       $ mkdir patches
> -@@ -77,7 +78,7 @@ Test the delete command.
> - 
> +@@ -79,7 +80,7 @@ Test the delete command.
> +     # running as root, but you shouldn't do that anyway.
>       $ quilt delete "test3"
>       > Removing patch %{P}test3
> --    >~ find: `?\./dir'?: Permission denied
> -+    > ${LOCALBASE}/bin/gfind: `./dir': Permission denied
> +-    >~ .*find: [`']?\./dir'?: Permission denied
> ++    >~ /usr/local/bin/gfind: [`']?\./dir'?: Permission denied
>   
>       $ chmod a+rx .pc/test3/dir
>   
> Index: patches/patch-test_remove-trailing-ws_test
> ===================================================================
> RCS file: patches/patch-test_remove-trailing-ws_test
> diff -N patches/patch-test_remove-trailing-ws_test
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-test_remove-trailing-ws_test        27 Dec 2013 16:18:36 
> -0000
> @@ -0,0 +1,63 @@
> +$OpenBSD$
> +--- test/remove-trailing-ws.test.orig        Fri Dec 13 17:38:41 2013
> ++++ test/remove-trailing-ws.test     Fri Dec 13 17:50:26 2013
> +@@ -134,21 +134,21 @@ $ %{QUILT_DIR}/scripts/remove-trailing-ws < unified.di
> + > Removing trailing whitespace from lines 12,16 of files/complex
> + > Removing trailing whitespace from lines 1,2,3 of files/create
> + $ wc -l files/add
> +-> 8 files/add
> ++>~ (\s+)?8 files/add
> + $ wc -l files/change
> +-> 3 files/change
> ++>~ (\s+)?3 files/change
> + $ wc -l files/complex
> +-> 21 files/complex
> ++>~ (\s+)?21 files/complex
> + $ wc -l files/create
> +-> 3 files/create
> ++>~ (\s+)?3 files/create
> + $ wc -l files/remove
> +-> 6 files/remove
> ++>~ (\s+)?6 files/remove
> + $ wc -l files/remove-at-end
> +-> 8 files/remove-at-end
> ++>~ (\s+)?8 files/remove-at-end
> + $ wc -l unified.diff
> +-> 85 unified.diff
> ++>~ (\s+)?85 unified.diff
> + $ wc -l unified-wsok.diff
> +-> 85 unified-wsok.diff
> ++>~ (\s+)?85 unified-wsok.diff
> + $ diff -u unified.diff unified-wsok.diff | grep '^++[^+]'
> + > ++Line 4
> + > ++to
> +@@ -167,21 +167,21 @@ $ %{QUILT_DIR}/scripts/remove-trailing-ws < context.di
> + > Removing trailing whitespace from lines 12,16 of files/complex
> + > Removing trailing whitespace from lines 1,2,3 of files/create
> + $ wc -l files/add
> +-> 8 files/add
> ++>~ (\s+)?8 files/add
> + $ wc -l files/change
> +-> 3 files/change
> ++>~ (\s+)?3 files/change
> + $ wc -l files/complex
> +-> 21 files/complex
> ++>~ (\s+)?21 files/complex
> + $ wc -l files/create
> +-> 3 files/create
> ++>~ (\s+)?3 files/create
> + $ wc -l files/remove
> +-> 6 files/remove
> ++>~ (\s+)?6 files/remove
> + $ wc -l files/remove-at-end
> +-> 8 files/remove-at-end
> ++>~ (\s+)?8 files/remove-at-end
> + $ wc -l context.diff
> +-> 104 context.diff
> ++>~ (\s+)?104 context.diff
> + $ wc -l context-wsok.diff
> +-> 104 context-wsok.diff
> ++>~ (\s+)?104 context-wsok.diff
> + $ diff -u context.diff context-wsok.diff | grep '^+[+!] '
> + > ++ Line 4
> + > ++ create
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/devel/quilt/pkg/PLIST,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 PLIST
> --- pkg/PLIST 8 Oct 2012 15:14:25 -0000       1.1.1.1
> +++ pkg/PLIST 30 Dec 2013 17:45:12 -0000
> @@ -25,11 +25,13 @@ share/quilt/annotate
>  share/quilt/applied
>  share/quilt/compat/
>  share/quilt/compat/awk
> +share/quilt/compat/cp
>  share/quilt/compat/date
>  share/quilt/compat/diff
>  share/quilt/compat/find
>  share/quilt/compat/getopt
>  share/quilt/compat/grep
> +share/quilt/compat/md5sum
>  share/quilt/compat/patch
>  share/quilt/compat/sed
>  share/quilt/compat/sendmail

-- 
jca | PGP: 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE
(previous: 0x06A11494 / 61DB D9A0 00A4 67CF 2A90  8961 6191 8FBF 06A1 1494)

Reply via email to