freebsd-ports/Mk
John Marino 6819d5d636 Mk/Scripts/smart_makepatch.sh: Fix multi-patch file and locals bug
There were two issues with the new smart_makepatch script.

1) use of "local" declaration

All function variables were declared "local" during the review.  This
caused the script to break, at least on FreeBSD 9.2.  Given that it's
not being seen on 9.3R or later, it might be a bug in Bourne shell that
has since been fixed.

e.g. This resulted in stderr error on second iteration:
  local contains=$(grep "^+++ " ${existing_patch} | awk '{x++; print x}')

however, this works fine:
  local contains
  contains=$(grep "^+++ " ${existing_patch} | awk '{x++; print x}')

To be safe, all local variables are assigned with $(<shell cmd>) on
separate lines now.

2) The comment extraction was flawed for files that contain multiple
patches.  It was not counting the hunk lines properly which caused some
portion of a patch to be considered as a comment for the next patch.  The
hunk traversal algorithm has been fixed.

Since 1) involved the introduction of local declarations that broke the
script and since only Scripts/smart_makepatch.sh is touched, I will
piggy-back on the original approval.  The fix was tested with devel/nspr,
the port listed in the PR, which uses multi-patch files.

Approved by:		portmgr
Differential Revision:	D4136
PR:			204725
2015-11-22 09:18:07 +00:00
..
Scripts Mk/Scripts/smart_makepatch.sh: Fix multi-patch file and locals bug 2015-11-22 09:18:07 +00:00
Uses www/seamonkey-i18n: unbreak after r401981 2015-11-21 20:04:28 +00:00
bsd.apache.mk Fix static modules in www/apache24 2015-07-14 22:34:53 +00:00
bsd.autotools.mk Mark USE_AUTOTOOLS deprecated and remove support for libtoolize. 2015-04-19 18:16:40 +00:00
bsd.ccache.mk Let WITH_CCACHE_BUILD work on the pkg port that is not PKG_ORIGIN. 2015-04-14 20:58:26 +00:00
bsd.commands.mk Introduce a BSDMAKE?= /usr/bin/make and use it as the default MAKE_CMD. 2015-03-23 04:03:00 +00:00
bsd.database.mk databases/mariadb-client,scripts,server: Remove 2015-11-18 10:51:14 +00:00
bsd.default-versions.mk Rework change in r399791 for default perl to not execute it on 'make clean' 2015-10-20 20:26:59 +00:00
bsd.destdir.mk - Fix DESTDIR support. 2014-09-08 20:44:21 +00:00
bsd.emacs.mk GNU Emacs Updates 2015-04-27 10:28:00 +00:00
bsd.fpc.mk - editors/lazarus update to 1.4.2 2015-08-09 08:06:43 +00:00
bsd.gcc.mk Since there is not going to be any new version of GCC in the FreeBSD 2015-04-22 21:29:21 +00:00
bsd.gecko.mk devel/nspr: cleanup cruft to improve style 2015-11-21 02:26:15 +00:00
bsd.gnome.mk Mk/bsd.gnome.mk : remove net/linc from the component list. 2015-09-27 10:52:16 +00:00
bsd.gstreamer.mk Update gstreamer1 ports to 1.6.0. 2015-09-26 14:36:23 +00:00
bsd.java.mk Make OpenJDK 1.8 the default 2015-10-19 16:14:29 +00:00
bsd.kde4.mk Update KDE SC to 4.14.3 2015-03-11 23:11:47 +00:00
bsd.ldap.mk net/openldap24-*: 2014-07-24 18:34:16 +00:00
bsd.licenses.db.mk Adding CPAL-1.0, https://opensource.org/licenses/CPAL-1.0 2015-10-11 17:52:00 +00:00
bsd.licenses.mk Register license files with absolute path 2014-09-23 12:42:00 +00:00
bsd.linux-apps.mk Re-commit of 2015-08-09 19:14:13 +00:00
bsd.linux-rpm.mk Fix build with DOCS=off after r400846. 2015-11-06 18:57:01 +00:00
bsd.local.mk
bsd.mate.mk Update MATE DE to 1.10.0. 2015-07-27 20:19:33 +00:00
bsd.ocaml.mk Explicitly run the ocaml command in post (de)installation 2015-09-26 08:41:45 +00:00
bsd.octave.mk Explicly force runnning load-octave-pkg during post (de)installation 2015-09-26 08:39:49 +00:00
bsd.openssl.mk security/libressl: Update to 2.2.2 2015-08-06 19:13:18 +00:00
bsd.options.desc.mk Add GCC_DESC to Mk/bsd.options.desc.mk. Use this in a number of ports 2015-11-16 00:30:00 +00:00
bsd.options.mk Refactor the list of all excluded options so that the second place it is 2015-11-13 13:50:35 +00:00
bsd.php.mk Add a message explaining how to fix poudriere build failures if the 2015-09-27 18:37:34 +00:00
bsd.port.mk Currently, when bsd.port.mk outputs a message addressed to a user, it would 2015-11-18 09:19:42 +00:00
bsd.port.options.mk tabspace: 8 2014-06-18 12:21:35 +00:00
bsd.port.post.mk
bsd.port.pre.mk
bsd.port.subdir.mk Apply export handling fixes from bsd.port.mk. 2015-10-12 22:42:57 +00:00
bsd.qt.mk Readd PORTSDIR for now we will only start removing them after 2016Q1 is branched 2015-10-15 07:36:38 +00:00
bsd.ruby.mk Readd PORTSDIR for now we will only start removing them after 2016Q1 is branched 2015-10-15 07:36:38 +00:00
bsd.sanity.mk Remove support for WANT_SDL/HAVE_SDL knobs 2015-11-09 14:30:02 +00:00
bsd.sdl.mk Remove support for WANT_SDL/HAVE_SDL knobs 2015-11-09 14:30:02 +00:00
bsd.sites.mk Mk/bsd.sites.mk: Remove non-PEP449 Python mirrors [Part III] 2015-10-24 04:28:37 +00:00
bsd.ssp.mk - Enable SSP by default. 2014-11-02 20:01:31 +00:00
bsd.tex.mk Readd PORTSDIR for now we will only start removing them after 2016Q1 is branched 2015-10-15 07:36:38 +00:00
bsd.wx.mk Readd PORTSDIR for now we will only start removing them after 2016Q1 is branched 2015-10-15 07:36:38 +00:00
bsd.xorg.mk Readd PORTSDIR for now we will only start removing them after 2016Q1 is branched 2015-10-15 07:36:38 +00:00