From c0846cc62512f55ea39bdddd28327c352b7ddd0f Mon Sep 17 00:00:00 2001 From: Olav Vitters Date: Thu, 30 Apr 2020 12:13:42 +0200 Subject: expand some of the clean-spec regular expressions to make these easier to read --- mgagnome | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/mgagnome b/mgagnome index 4881333..0759b9f 100755 --- a/mgagnome +++ b/mgagnome @@ -505,7 +505,7 @@ class SpecFile(): 'metacpan.org instead of www.cpan.org and search.cpan.org', r'\ghttps://cpan.metacpan.org/\g\g', re.compile(r'^(?PSource[0-9]*[ \t]*:[^\n]+)' - r'https?://(?:(?:www\.cpan\.org)(?:/CPAN)?|(?:(?i)search\.cpan\.org)/CPAN)/+' + r'https?://(?:(?:www\.cpan\.org)(?:/CPAN)?|(?:search\.cpan\.org)/CPAN)/+' r'(?Pauthors/id/|modules/by-module/|modules/by-authors/id/)' r'(?P[^\n]+\n)', re.MULTILINE + re.IGNORECASE) @@ -520,9 +520,26 @@ class SpecFile(): r'\g\n\g.*', re.compile(r'^(?P%{_libdir}[^\n]+})$\n(?P=keeppre)\{,\.\*\}$', re.MULTILINE) ), - ('make use of autopatch', r'%autopatch -p1', re.compile(r'^%apply_patches$', re.MULTILINE)), - ('change configure2_5x macro to configure', r'%configure', re.compile(r'^%configure2_5x\b', re.MULTILINE)), - ('change make macro to make_build', r'%make_build', re.compile(r'^%make\b', re.MULTILINE)), + ( + 'make use of autopatch', + r'%autopatch -p1', + re.compile(r'^%apply_patches$', re.MULTILINE) + ), + ( + 'change configure2_5x macro to configure', + r'%configure', + re.compile(r'^%configure2_5x\b', re.MULTILINE) + ), + ( + 'change make macro to make_build', + r'%make_build', + re.compile(r'^%make\b', re.MULTILINE) + ), + ( + 'make_build already implies V=1 and VERBOSE=1, remove these', + r'%make_build', + re.compile(r'^%make_build(?:[ \t]+(?:V=1|VERBOSE=1))+\b', re.MULTILINE) + ), ( 'change find_lang --with-help into --with-gnome', r'\g --with-gnome\g', -- cgit v1.2.1