diff --git a/.gitignore b/.gitignore index 6027721..cafdb13 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,11 @@ Impressive-0.10.2.tar.gz /Impressive-0.10.3.tar.gz /Impressive-0.10.4.tar.gz /Impressive-0.11.1.tar.gz +/Impressive-0.11.2.tar.gz +/Impressive-0.11.3.tar.gz +/Impressive-0.12.0.tar.gz +/Impressive-0.13.0-WIP-20190902svn275.tar.gz +/Impressive-0.13.0-WIP-20210107svn310.tar.gz +/Impressive-0.13.0-WIP-20210612svn311.tar.gz +/Impressive-0.13.1.tar.gz +/Impressive-0.13.2.tar.gz diff --git a/changelog b/changelog new file mode 100644 index 0000000..c928525 --- /dev/null +++ b/changelog @@ -0,0 +1,192 @@ +* Sat Mar 19 2022 Michael J Gruber - 0.13.1-1 +- rebase to 0.13.1 (bz #2065961) +- switch to rpmautospec + +* Thu Jan 20 2022 Fedora Release Engineering - 0.13.0-0.10.20210612svn311 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 0.13.0-0.9.20210612svn311 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Sat Jun 12 2021 Michael J Gruber - 0.13.0-0.8.20210612svn311 +- adjust to pygame 2/SDL2 (bz 1970553) +- specfile clean-ups + +* Fri Jun 04 2021 Python Maint - 0.13.0-0.7.20210107svn310 +- Rebuilt for Python 3.10 + +* Wed Jan 27 2021 - 0.13.0-6.20210107svn310 +- rebase to 0.13.0-beta2 plus hotfixes + +* Tue Jan 26 2021 Fedora Release Engineering - 0.13.0-0.5.20190902svn275 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 0.13.0-0.4.20190902svn275 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 0.13.0-0.3.20190902svn275 +- Rebuilt for Python 3.9 + +* Wed Jan 29 2020 Fedora Release Engineering - 0.13.0-0.2.20190902svn275 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Mon Sep 02 2019 Michael J Gruber - 0.13.0-0.1.20190902svn275 +- build from upstream python3 branch +- previous py3k patches have been upstreamed + +* Mon Aug 19 2019 Miro Hrončok - 0.12.0-12 +- Rebuilt for Python 3.8 + +* Mon Aug 19 2019 Michael J Gruber - 0.12.0-11 +- patch version v0.11.1-74-gc504a64 + +* Sun Aug 18 2019 Michael J Gruber - 0.12.0-10 +- port current svn version to python3 (coordinated with upstream, release pending) +- patch version v0.11.1-74-g0223cd9 +- fixes bug 1731634 + +* Fri Jul 26 2019 Michael J Gruber - 0.12.0-9 +- remove obsolete comment + +* Thu Jul 25 2019 Fedora Release Engineering - 0.12.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 0.12.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Oct 22 2018 Michael J Gruber - 0.12.0-6 +- rebuild for python2-pygame dependency update + +* Fri Jul 13 2018 Michael J Gruber - 0.12.0-5 +- adjust to py2 packaging guidelines + +* Fri Jul 13 2018 Fedora Release Engineering - 0.12.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Iryna Shcherbina - 0.12.0-3 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Tue Feb 06 2018 Michael J Gruber - 0.12.0-2 +- remove obsolete dependency + +* Tue Feb 06 2018 Michael J Gruber - 0.12.0-1 +- upstream bugfix and feature release + +* Mon Feb 05 2018 Michael J Gruber - 0.11.3-1 +- upstream bugfix release + +* Sat Jan 06 2018 Michael J Gruber - 0.11.2-4 +- use correct shebang + +* Thu Jan 04 2018 Michael J Gruber - 0.11.2-3 +- depend on Py2 packages explicitely + +* Tue Dec 26 2017 Michael J Gruber - 0.11.2-2 +- follow upstream re-tagging + +* Tue Dec 19 2017 Michael J Gruber - 0.11.2-1 +- sync with upstream + +* Wed Jul 26 2017 Fedora Release Engineering - 0.11.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 0.11.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Jul 19 2016 Fedora Release Engineering - 0.11.1-4 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Thu Feb 04 2016 Fedora Release Engineering - 0.11.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Sat Nov 21 2015 Michael J Gruber - 0.11.1-2 +- adjust to current mudraw option syntax +- use mutool for info parsing + +* Sat Nov 21 2015 Michael J Gruber - 0.11.1-1 +- sync with upstream +- fix changelog typos + +* Wed Jun 17 2015 Fedora Release Engineering - 0.10.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 0.10.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Mar 11 2014 Michael J Gruber - 0.10.4-3 +- temporarily remove R pdftk + +* Thu Jan 02 2014 Michael J Gruber - 0.10.4-2 +- upate requires as recommended by upstream + +* Thu Jan 02 2014 Michael J Gruber - 0.10.4-1 +- sync with upstream +- drop pillow compatibility patch (upstreamed) +- drop backported PDF parser fix (upstreamed) + +* Sat Aug 03 2013 Fedora Release Engineering - 0.10.3-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 0.10.3-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Jan 15 2013 Michael J Gruber - 0.10.3-10 +- pillow compatibility (bug 895270, patch by Toshio Ernie Kuratomi) + +* Thu Jul 19 2012 Fedora Release Engineering - 0.10.3-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 0.10.3-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Nov 28 2011 Michael J Gruber - 0.10.3-7 +- backport PDF parser fix + +* Mon May 02 2011 Michael J Gruber - 0.10.3-6 +- EPEL has no pdftk (recommended but optional requirement) + +* Fri Mar 11 2011 Michael J Gruber - 0.10.3-5 +- Clarify explicit requires. +- Add pdftk as requirement. + +* Wed Feb 09 2011 Fedora Release Engineering - 0.10.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sun Dec 05 2010 Michael J Gruber - 0.10.3-3 +- spec file cleanup. + +* Sun Dec 05 2010 Michael J Gruber - 0.10.3-2 +- Make summary less flashy. +- Install main program in sitelib. +- BR python-devel. + +* Fri Dec 03 2010 Michael J Gruber - 0.10.3-1 +- Sync with upstream. + +* Fri Jul 24 2009 Fedora Release Engineering - 0.10.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Feb 24 2009 Fedora Release Engineering - 0.10.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Thu Feb 19 2009 Allisson Azevedo 0.10.2-6 +- Added provides keyjnote. + +* Mon Feb 16 2009 Allisson Azevedo 0.10.2-5 +- Obsolete keyjnote. + +* Mon Feb 16 2009 Allisson Azevedo 0.10.2-4 +- Fix requires for dejavu fonts. + +* Thu Feb 12 2009 Allisson Azevedo 0.10.2-3 +- Added OpenGL wrapper. +- Fix requires for dejavu fonts. + +* Thu Feb 12 2009 Allisson Azevedo 0.10.2-2 +- Changed license. +- Added dejavu-fonts to requires. +- Added build section. + +* Mon Feb 9 2009 Allisson Azevedo 0.10.2-1 +- Initial RPM release diff --git a/impressive-0.11.1-mudraw-1.7.patch b/impressive-0.11.1-mudraw-1.7.patch deleted file mode 100644 index f26f094..0000000 --- a/impressive-0.11.1-mudraw-1.7.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- impressive.py.orig 2015-11-21 23:56:54.197386430 +0100 -+++ impressive.py 2015-11-22 00:00:11.310669086 +0100 -@@ -19,7 +19,7 @@ - - __title__ = "Impressive" - __version__ = "0.11.1" --__rev__ = 186 -+__rev__ = "v0.11.1-1-gdd43e7d" - __author__ = "Martin J. Fiedler" - __email__ = "martin.fiedler@gmx.net" - __website__ = "http://impressive.sourceforge.net/" -@@ -2973,7 +2973,7 @@ class MuPDFRenderer(PDFRendererBase): - name = "MuPDF" - binaries = ["mudraw", "pdfdraw"] - test_run_args = [] -- required_options = ["o", "r", "b"] -+ required_options = ["o", "r", "A"] - - # helper object for communication with the reader thread - class ThreadComm(object): -@@ -3016,7 +3016,7 @@ class MuPDFRenderer(PDFRendererBase): - except (OSError, IOError, AttributeError): - pass - if not antialias: -- aa_opts = ["-b", "0"] -+ aa_opts = ["-A", "0"] - else: - aa_opts = [] - try: diff --git a/impressive-0.11.1-mutool-info.patch b/impressive-0.11.1-mutool-info.patch deleted file mode 100644 index db8f981..0000000 --- a/impressive-0.11.1-mutool-info.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- impressive.py.orig 2015-11-21 23:56:54.197386430 +0100 -+++ impressive.py 2015-11-22 00:23:17.998145913 +0100 -@@ -19,7 +19,7 @@ - - __title__ = "Impressive" - __version__ = "0.11.1" --__rev__ = "v0.11.1-1-gdd43e7d" -+__rev__ = "v0.11.1-2-gbbb6abd" - __author__ = "Martin J. Fiedler" - __email__ = "martin.fiedler@gmx.net" - __website__ = "http://impressive.sourceforge.net/" -@@ -148,6 +148,7 @@ if os.name == "nt": - return path - return binary # fall-back if not found - pdftkPath = FindBinary("pdftk.exe") -+ mutoolPath = FindBinary("mutool.exe") - GhostScriptPlatformOptions = ["-I" + os.path.join(root, "gs")] - try: - import win32api -@@ -173,6 +174,7 @@ else: - MPlayerPlatformOptions = [ "-vo", "gl" ] - MPlayerColorKey = False - pdftkPath = "pdftk" -+ mutoolPath = "mutool" - FontPath = ["/usr/share/fonts", "/usr/local/share/fonts", "/usr/X11R6/lib/X11/fonts/TTF"] - FontList = ["DejaVuSans.ttf", "Vera.ttf", "Verdana.ttf"] - Nice = ["nice", "-n", "7"] -@@ -781,18 +783,6 @@ def b2s(b): - if b: return "Y" - return "N" - --# extract a number at the beginning of a string --def num(s): -- s = s.strip() -- r = "" -- while s[0] in "0123456789": -- r += s[0] -- s = s[1:] -- try: -- return int(r) -- except ValueError: -- return -1 -- - # linearly interpolate between two floating-point RGB colors represented as tuples - def lerpColor(a, b, t): - return tuple([min(1.0, max(0.0, x + t * (y - x))) for x, y in zip(a, b)]) -@@ -807,11 +797,22 @@ def my_stat(filename): - - # determine (pagecount,width,height) of a PDF file - def analyze_pdf(filename): -- f = file(filename,"rb") -+ t = TempFileName + ".txt" -+ f = file(t, "w") -+ try: -+ assert 0 == subprocess.Popen([mutoolPath, "info", filename], stdout=f).wait() -+ except OSError: -+ print >>sys.stderr, "Note: mutool not found, cannot determine output size." -+ return -+ except AssertionError: -+ print >>sys.stderr, "Note: mutool failed, cannot determine output size." -+ return -+ f.close() -+ f = file(t, "r") - pdf = f.read() - f.close() -- box = map(float, pdf.split("/MediaBox",1)[1].split("]",1)[0].split("[",1)[1].strip().split()) -- return (max(map(num, pdf.split("/Count")[1:])), box[2]-box[0], box[3]-box[1]) -+ box = map(float, pdf.split("Mediaboxes",1)[1].split("]",1)[0].split("[",1)[1].strip().split()) -+ return (int(pdf.split("Pages:")[1].split()[0]), box[2]-box[0], box[3]-box[1]) - - # unescape { literals in PDF files - re_unescape = re.compile(r'&#[0-9]+;') diff --git a/impressive-0.13-escape-escape-sequence.patch b/impressive-0.13-escape-escape-sequence.patch new file mode 100644 index 0000000..7c6890f --- /dev/null +++ b/impressive-0.13-escape-escape-sequence.patch @@ -0,0 +1,26 @@ +diff --git 1/impressive.py-orig 2/impressive.py +index edde236..86d83e3 100644 +--- 1/impressive.py-orig ++++ 2/impressive.py +@@ -1008,10 +1008,10 @@ def mutoolParse(f, page_offset=0): + pages = 0 + for line in f: + line = line.decode() +- m = re.match("pages:\s*(\d+)", line, re.I) ++ m = re.match(r'pages:\s*(\d+)', line, re.I) + if m and not(pages): + pages = int(m.group(1)) +- m = re.search("/title\s*\(", line, re.I) ++ m = re.search(r'/title\s*\(', line, re.I) + if m and not(title): + title = line[m.end():].replace(')', '\0').replace('\\(', '(').replace('\\\0', ')').split('\0', 1)[0].strip() + return (title, pages) +@@ -3938,7 +3938,7 @@ def SaveInfoScript(filename): + + # replace the PageProps of the old info script with the current ones + try: +- m = re.search("^.*(PageProps)\s*=\s*(\{).*$", script,re.MULTILINE) ++ m = re.search(r'^.*(PageProps)\s*=\s*(\{).*$', script,re.MULTILINE) + if m: + script = script[:m.start(1)] + PagePropRepr() + \ + script[CountDictChars(script, m.end(2)) + 1 :] diff --git a/impressive.spec b/impressive.spec index ff317a9..832e954 100644 --- a/impressive.spec +++ b/impressive.spec @@ -1,27 +1,23 @@ Name: impressive -Version: 0.11.1 -Release: 4%{?dist} +Version: 0.13.2 +Release: %autorelease Summary: A program that displays presentation slides -Group: Applications/Productivity -License: GPLv2 +License: GPL-2.0-or-later URL: http://impressive.sourceforge.net/ Source0: http://downloads.sourceforge.net/%{name}/Impressive-%{version}.tar.gz # Wrapper script for making sure hardware acceleration is available Source1: %{name}.sh -Patch1: impressive-0.11.1-mudraw-1.7.patch -Patch2: impressive-0.11.1-mutool-info.patch - +Patch: impressive-0.13-escape-escape-sequence.patch + BuildArch: noarch -BuildRequires: python-devel +BuildRequires: python3-devel # The following requires are not picked up by rpm: # - imported modules (required): -Requires: python-imaging -Requires: pygame -Requires: PyOpenGL +Requires: python3-imaging +Requires: python3-pygame Requires: opengl-games-utils # - external tools for displaying and parsing pdf (required): -Requires: poppler-utils Requires: mupdf # - external tool for acting on links (strongly recommended): Requires: xdg-utils @@ -40,130 +36,28 @@ that are really useful for presentations. %prep -%setup -q -n Impressive-%{version} - -# adjust to current mudraw option syntax -%patch1 -# use mutool for info parsing -%patch2 +%autosetup -n Impressive-%{version} -p1 +sed -i -e '1s#/usr/bin/env python#/usr/bin/python3#' impressive.py %build -sed -e "s|@PYTHON_SITELIB@|%{python_sitelib}|" %{SOURCE1} > impressive.sh +sed -e "s|@PYTHON_SITELIB@|%{python3_sitelib}|" %{SOURCE1} > impressive.sh # This package doesn't build anything, just copy files under build root. %install rm -rf %{buildroot} -install -D -p -m 755 impressive.py %{buildroot}%{python_sitelib}/impressive.py +install -D -p -m 755 impressive.py %{buildroot}%{python3_sitelib}/impressive.py install -D -p -m 644 impressive.1 %{buildroot}%{_mandir}/man1/impressive.1 install -D -p -m 755 impressive.sh %{buildroot}%{_bindir}/impressive -%clean -rm -rf %{buildroot} - %files -%defattr(-,root,root,-) %doc changelog.txt demo.pdf impressive.html license.txt %{_bindir}/impressive -%{python_sitelib}/impressive.py* +%{python3_sitelib}/impressive.py +%{python3_sitelib}/__pycache__/* %{_mandir}/man1/impressive.1* %changelog -* Tue Jul 19 2016 Fedora Release Engineering - 0.11.1-4 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - -* Thu Feb 04 2016 Fedora Release Engineering - 0.11.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Sat Nov 21 2015 Michael J Gruber - 0.11.1-2 -- adjust to current mudraw option syntax -- use mutool for info parsing - -* Sat Nov 21 2015 Michael J Gruber - 0.11.1-1 -- sync with upstream -- fix changelog typos - -* Wed Jun 17 2015 Fedora Release Engineering - 0.10.4-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Sat Jun 07 2014 Fedora Release Engineering - 0.10.4-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Tue Mar 11 2014 Michael J Gruber - 0.10.4-3 -- temporarily remove R pdftk - -* Thu Jan 02 2014 Michael J Gruber - 0.10.4-2 -- upate requires as recommended by upstream - -* Thu Jan 02 2014 Michael J Gruber - 0.10.4-1 -- sync with upstream -- drop pillow compatibility patch (upstreamed) -- drop backported PDF parser fix (upstreamed) - -* Sat Aug 03 2013 Fedora Release Engineering - 0.10.3-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Thu Feb 14 2013 Fedora Release Engineering - 0.10.3-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Tue Jan 15 2013 Michael J Gruber - 0.10.3-10 -- pillow compatibility (bug 895270, patch by Toshio Ernie Kuratomi) - -* Thu Jul 19 2012 Fedora Release Engineering - 0.10.3-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Fri Jan 13 2012 Fedora Release Engineering - 0.10.3-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Mon Nov 28 2011 Michael J Gruber - 0.10.3-7 -- backport PDF parser fix - -* Mon May 02 2011 Michael J Gruber - 0.10.3-6 -- EPEL has no pdftk (recommended but optional requirement) - -* Fri Mar 11 2011 Michael J Gruber - 0.10.3-5 -- Clarify explicit requires. -- Add pdftk as requirement. - -* Wed Feb 09 2011 Fedora Release Engineering - 0.10.3-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Sun Dec 05 2010 Michael J Gruber - 0.10.3-3 -- spec file cleanup. - -* Sun Dec 05 2010 Michael J Gruber - 0.10.3-2 -- Make summary less flashy. -- Install main program in sitelib. -- BR python-devel. - -* Fri Dec 03 2010 Michael J Gruber - 0.10.3-1 -- Sync with upstream. - -* Fri Jul 24 2009 Fedora Release Engineering - 0.10.2-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Tue Feb 24 2009 Fedora Release Engineering - 0.10.2-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Thu Feb 19 2009 Allisson Azevedo 0.10.2-6 -- Added provides keyjnote. - -* Mon Feb 16 2009 Allisson Azevedo 0.10.2-5 -- Obsolete keyjnote. - -* Mon Feb 16 2009 Allisson Azevedo 0.10.2-4 -- Fix requires for dejavu fonts. - -* Thu Feb 12 2009 Allisson Azevedo 0.10.2-3 -- Added OpenGL wrapper. -- Fix requires for dejavu fonts. - -* Thu Feb 12 2009 Allisson Azevedo 0.10.2-2 -- Changed license. -- Added dejavu-fonts to requires. -- Added build section. - -* Mon Feb 9 2009 Allisson Azevedo 0.10.2-1 -- Initial RPM release +%autochangelog diff --git a/sources b/sources index c677465..26695e6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0fdac7431208ff5866a6443bbdddeaee Impressive-0.11.1.tar.gz +SHA512 (Impressive-0.13.2.tar.gz) = 0b24ef39cba25d8813fd3f95f220c466defa50c3ba4a63d2f37b284de2826c2110225fe2016f58c401d1ca239d672ba28ba65069523ab57b1b5711a4222cff92