delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/07/06/16:39:37

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_LOW,TW_GT,TW_YG
X-Spam-Check-By: sourceware.org
Message-ID: <4C33947B.2080704@cwilson.fastmail.fm>
Date: Tue, 06 Jul 2010 16:39:23 -0400
From: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
Reply-To: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: cygport patch: suppress some automatic diff excludes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

--------------050206000700080606070302
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

As discussed in this subthread:
http://cygwin.com/ml/cygwin-apps/2010-07/msg00042.html

I think cygport needs a mechanism where you can override the 
default_excludes used when cygport creates the .src.patch.  Right now, 
you can ADD files to the exclusion list using DIFF_EXCLUDES, but you 
can't remove any patterns that are already in that list.


So, I tried to create a generic facility where you could, for instance, do:

DIFF_NO_EXCLUDES="configure Makefile.in *.m4"

and then cygport would ensure that, even if it ordinarily would exclude 
a file from the diff, if that file name (or pattern) appears in 
$DIFF_NO_EXCLUDES then it would avoid doing so. But that got to be 
really hard -- and prone to error, it seemed to me -- what with all the 
word expansion and shell metacharacter worries that could show up in 
$DIFF_NO_EXCLUDES. (Plus, it would have slowed down ALL cygports in a 
pretty big way during __pkg_diff, for the benefit of only a few.)

So, instead, I whipped up a different patch to cygport which only tells 
cygport to avoid automatically adding the autoconf, automake, and 
aclocal-generated files to the diff excludes list.  I think this is the 
most common instance where something like this is needed -- at least, in 
my experience with my packages:
   (a) I run autoreconf manually, or use a specialized bootstrap
       procedure, and
   (b) I want to ship some or all of the results of that procedure,
       so that during the build process the bootstrapping is not
       (re)done.
In the past, what I've done is simply to have an empty (or missing) 
.src.patch, override src_compile() to not call cygautoreconf or any 
other bootstrap, and instead, provide a custom

    PATCH_URI="normal-.src.patch-like.path \
               results-of-bootstrap.patch"

But that quickly becomes rather awkward to maintain those two patches. 
I believe the attached patch would make this particular corner case a 
little less burdensome (and, in particular, would be useful to JonY 
currently packaging mingw64-gcc).

To use it, add this to your cygport:

RESTRICT+=" autoreconf-diff-excludes"

--
Chuck

--------------050206000700080606070302
Content-Type: text/plain;
 name="skip-autoreconf-diff-excludes.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="skip-autoreconf-diff-excludes.patch"

diff --git a/lib/pkg_pkg.cygpart b/lib/pkg_pkg.cygpart
index 64a58a9..1708b0e 100644
--- a/lib/pkg_pkg.cygpart
+++ b/lib/pkg_pkg.cygpart
@@ -167,6 +167,9 @@ __pkg_diff() {
 			;;
 	esac
 
+	if ! defined _CYGPORT_RESTRICT_autoreconf_diff_excludes_
+	then
+
 	# exclude aclocal.m4 if generated from aclocal
 	if [ -f ${S}/aclocal.m4 ]
 	then
@@ -191,6 +194,8 @@ __pkg_diff() {
 		default_excludes+=" configure";
 	fi
 
+	fi
+
 	# gtk-doc
 	if [ -f ${S}/gtk-doc.make -a "${PN}" != "gtk-doc" ]
 	then


--------------050206000700080606070302
Content-Type: text/plain; charset=us-ascii

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
--------------050206000700080606070302--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019