removing deprecated escape sequences because of Python-3.6, ship COPYING as license (patch provided by Ville Skyttä)
This commit is contained in:
parent
648490e989
commit
9368c9723d
94
gutenprint-python36syntax.patch
Normal file
94
gutenprint-python36syntax.patch
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
--- gutenprint-5.2.12/src/cups/cups-genppdupdate.in.python36syntax
|
||||||
|
+++ gutenprint-5.2.12/src/cups/cups-genppdupdate.in
|
||||||
|
@@ -287,7 +287,7 @@ def update_ppd (ppd_source_filename):
|
||||||
|
for line in orig.readlines ():
|
||||||
|
line.rstrip ()
|
||||||
|
if line.find ("*StpLocale:") != -1:
|
||||||
|
- match = re.search ("\*StpLocale:\s*\"(.*)\"$", line)
|
||||||
|
+ match = re.search (r'\*StpLocale:\s*"(.*)"$', line)
|
||||||
|
if match:
|
||||||
|
groups = match.groups ()
|
||||||
|
if len (groups) >= 1:
|
||||||
|
@@ -295,26 +295,26 @@ def update_ppd (ppd_source_filename):
|
||||||
|
orig_locale = locale
|
||||||
|
valid = 1
|
||||||
|
elif line.startswith ("*LanguageVersion"):
|
||||||
|
- match = re.search ("^\*LanguageVersion:\s*(.*)$", line)
|
||||||
|
+ match = re.search (r'^\*LanguageVersion:\s*(.*)$', line)
|
||||||
|
if match:
|
||||||
|
groups = match.groups ()
|
||||||
|
if len (groups) >= 1:
|
||||||
|
lingo = groups[0]
|
||||||
|
elif line.startswith ("*StpDriverName:"):
|
||||||
|
- match = re.search ("^\*StpDriverName:\s*\"(.*)\"$", line)
|
||||||
|
+ match = re.search (r'^\*StpDriverName:\s*"(.*)"$', line)
|
||||||
|
if match:
|
||||||
|
groups = match.groups ()
|
||||||
|
if len (groups) >= 1:
|
||||||
|
driver = groups[0]
|
||||||
|
valid = 1
|
||||||
|
elif line.find ("*%End of ") != -1 and driver == "":
|
||||||
|
- match = re.search ("^\*%End of\s*(.*).ppd$", line)
|
||||||
|
+ match = re.search (r'^\*%End of\s*(.*).ppd$', line)
|
||||||
|
if match:
|
||||||
|
groups = match.groups ()
|
||||||
|
if len (groups) >= 1:
|
||||||
|
driver = groups[0]
|
||||||
|
elif line.startswith ("*StpPPDLocation:"):
|
||||||
|
- match = re.search ("^\*StpPPDLocation:\s*\"(.*)\"$", line)
|
||||||
|
+ match = re.search (r'^\*StpPPDLocation:\s*"(.*)"$', line)
|
||||||
|
if match:
|
||||||
|
groups = match.groups ()
|
||||||
|
if len (groups) >= 1:
|
||||||
|
@@ -436,7 +436,7 @@ def update_ppd (ppd_source_filename):
|
||||||
|
lines = source_data.rstrip ().split ("\n")
|
||||||
|
source_data = ""
|
||||||
|
for line in lines:
|
||||||
|
- m = re.search ("(\*StpLocale:\s*\")(.*)(\")", line)
|
||||||
|
+ m = re.search (r'(\*StpLocale:\s*")(.*)(")', line)
|
||||||
|
if m:
|
||||||
|
groups = m.groups ()
|
||||||
|
line = groups[0] + orig_locale + groups[2]
|
||||||
|
@@ -689,7 +689,7 @@ def get_ppd_data (fh, types, opts, resolutions, defaults, data):
|
||||||
|
line = line.strip ()
|
||||||
|
|
||||||
|
if (types or opts) and line.startswith ("*OpenUI"):
|
||||||
|
- m = re.search ("^\*OpenUI\s\*(\w+).*:\s(\w+)",
|
||||||
|
+ m = re.search (r'^\*OpenUI\s\*(\w+).*:\s(\w+)',
|
||||||
|
line)
|
||||||
|
if m:
|
||||||
|
groups = m.groups ()
|
||||||
|
@@ -704,7 +704,7 @@ def get_ppd_data (fh, types, opts, resolutions, defaults, data):
|
||||||
|
|
||||||
|
optionlist = []
|
||||||
|
elif opts and line.startswith ("*%s" % cur_opt):
|
||||||
|
- m = re.search ("^\*%s\s*(\w+)[\/:]" % cur_opt, line)
|
||||||
|
+ m = re.search (r'^\*%s\s*(\w+)[\/:]' % cur_opt, line)
|
||||||
|
if m:
|
||||||
|
groups = m.groups()
|
||||||
|
if len (groups) >= 1:
|
||||||
|
@@ -717,7 +717,7 @@ def get_ppd_data (fh, types, opts, resolutions, defaults, data):
|
||||||
|
old = s[2]
|
||||||
|
resolution_map[old] = new
|
||||||
|
elif defaults and line.startswith ("*Default"):
|
||||||
|
- m = re.search ("^\*(\w+):\s*(\w+)", line)
|
||||||
|
+ m = re.search (r'^\*(\w+):\s*(\w+)', line)
|
||||||
|
if m:
|
||||||
|
groups = m.groups ()
|
||||||
|
key = groups[0]
|
||||||
|
@@ -844,13 +844,13 @@ def find_ppd (gutenprintfilename, drivername, lang, region):
|
||||||
|
global debug
|
||||||
|
|
||||||
|
key = '^\\*FileVersion:[ ]*' + file_version
|
||||||
|
- match = re.search (".*/([^/]+\.[0-9]+\.[0-9]+)(\.sim)?(\.ppd)?(\.gz)?$",
|
||||||
|
+ match = re.search (r'.*/([^/]+\.[0-9]+\.[0-9]+)(\.sim)?(\.ppd)?(\.gz)?$',
|
||||||
|
gutenprintfilename)
|
||||||
|
if not match:
|
||||||
|
return None
|
||||||
|
|
||||||
|
stored_name = match.groups ()[0]
|
||||||
|
- if re.search (".*/([^/]*)(\.sim)(\.ppd)?(\.gz)?$", gutenprintfilename):
|
||||||
|
+ if re.search (r'.*/([^/]*)(\.sim)(\.ppd)?(\.gz)?$', gutenprintfilename):
|
||||||
|
simplified = ".sim"
|
||||||
|
else:
|
||||||
|
simplified = ""
|
@ -5,7 +5,7 @@
|
|||||||
Name: gutenprint
|
Name: gutenprint
|
||||||
Summary: Printer Drivers Package
|
Summary: Printer Drivers Package
|
||||||
Version: 5.2.12
|
Version: 5.2.12
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
URL: http://gimp-print.sourceforge.net/
|
URL: http://gimp-print.sourceforge.net/
|
||||||
Source0: http://downloads.sourceforge.net/gimp-print/%{name}-%{VERSION}.tar.bz2
|
Source0: http://downloads.sourceforge.net/gimp-print/%{name}-%{VERSION}.tar.bz2
|
||||||
# Post-install script to update CUPS native PPDs.
|
# Post-install script to update CUPS native PPDs.
|
||||||
@ -16,6 +16,7 @@ Patch2: gutenprint-selinux.patch
|
|||||||
Patch3: gutenprint-postscriptdriver.patch
|
Patch3: gutenprint-postscriptdriver.patch
|
||||||
Patch4: gutenprint-yyin.patch
|
Patch4: gutenprint-yyin.patch
|
||||||
Patch5: gutenprint-manpage.patch
|
Patch5: gutenprint-manpage.patch
|
||||||
|
Patch6: gutenprint-python36syntax.patch
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
|
|
||||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
@ -118,6 +119,9 @@ Epson, HP and compatible printers.
|
|||||||
|
|
||||||
cp %{SOURCE1} src/cups/cups-genppdupdate.in
|
cp %{SOURCE1} src/cups/cups-genppdupdate.in
|
||||||
|
|
||||||
|
# Python 3.6 invalid escape sequence deprecation fixes, COPYING as license (bug #1448303)
|
||||||
|
%patch6 -p1 -b .python36syntax
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# autoreconf has been added due to bug #925535,
|
# autoreconf has been added due to bug #925535,
|
||||||
# should be safe to remove once configure is Autoconf > 2.68 generated,
|
# should be safe to remove once configure is Autoconf > 2.68 generated,
|
||||||
@ -189,14 +193,15 @@ exit 0
|
|||||||
|
|
||||||
|
|
||||||
%files -f %{name}.lang
|
%files -f %{name}.lang
|
||||||
%doc COPYING
|
%license COPYING
|
||||||
%{_bindir}/escputil
|
%{_bindir}/escputil
|
||||||
%{_mandir}/man1/escputil.1*
|
%{_mandir}/man1/escputil.1*
|
||||||
%{_datadir}/%{name}
|
%{_datadir}/%{name}
|
||||||
%{_libdir}/%{name}
|
%{_libdir}/%{name}
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%doc COPYING AUTHORS NEWS README doc/FAQ.html doc/gutenprint-users-manual.odt doc/gutenprint-users-manual.pdf
|
%doc AUTHORS NEWS README doc/FAQ.html doc/gutenprint-users-manual.odt doc/gutenprint-users-manual.pdf
|
||||||
|
%license COPYING
|
||||||
|
|
||||||
%files libs
|
%files libs
|
||||||
%{_libdir}/libgutenprint.so.*
|
%{_libdir}/libgutenprint.so.*
|
||||||
@ -235,6 +240,9 @@ exit 0
|
|||||||
%{_mandir}/man8/cups-genppd*.8*
|
%{_mandir}/man8/cups-genppd*.8*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri May 05 2017 Zdenek Dohnal <zdohnal@redhat.com> - 5.2.12-4
|
||||||
|
- removing deprecated escape sequences because of Python-3.6, ship COPYING as license (patch provided by Ville Skyttä)
|
||||||
|
|
||||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.12-3
|
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.12-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user