From: Elan Ruusamäe Date: Mon, 15 Jun 2015 12:26:46 +0000 (+0300) Subject: improvements to rpmspec lexer X-Git-Tag: auto/th/python-pygments-2.0.2-2~1 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=971b9c53c7f692c2964e9715cfd55207892fc377;p=packages%2Fpython-pygments.git improvements to rpmspec lexer --- diff --git a/python-pygments.spec b/python-pygments.spec index f5b486c..4900d10 100644 --- a/python-pygments.spec +++ b/python-pygments.spec @@ -8,11 +8,12 @@ Summary: A generic syntax highlighter as Python 2.x module Summary(pl.UTF-8): Moduł Pythona 2.x do ogólnego podświetlania składni Name: python-%{module} Version: 2.0.2 -Release: 1 +Release: 2 License: BSD Group: Development/Languages/Python Source0: http://pypi.python.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz # Source0-md5: 238587a1370d62405edabd0794b3ec4a +Patch0: rpmspec.patch URL: http://pygments.org/ %if %{with python2} BuildRequires: python @@ -104,6 +105,7 @@ forów, wiki i inne plikacje wymagające ładnego wyświetlania kodu %prep %setup -q -n Pygments-%{version} +%patch0 -p1 %build %if %{with python2} diff --git a/rpmspec.patch b/rpmspec.patch new file mode 100644 index 0000000..f638ef4 --- /dev/null +++ b/rpmspec.patch @@ -0,0 +1,12 @@ +--- Pygments-2.0.2/pygments/lexers/installers.py~ 2014-11-10 21:17:51.000000000 +0200 ++++ Pygments-2.0.2/pygments/lexers/installers.py 2015-06-15 14:57:19.665609691 +0300 +@@ -201,7 +201,8 @@ + (r'.', Text), + ], + 'macro': [ +- (r'%define.*\n', Comment.Preproc), ++ (r'%(?:un)?define.*\n', Comment.Preproc), ++ (r'%include.*\n', Comment.Preproc), + (r'%\{\!\?.*%define.*\}', Comment.Preproc), + (r'(%(?:if(?:n?arch)?|else(?:if)?|endif))(.*)$', + bygroups(Comment.Preproc, Text)),