Bump to a post-6.1 git snapshot e515408

This commit is contained in:
Petr Písař 2022-02-25 16:38:46 +01:00
parent c733c7eb9d
commit 382a7325f7
7 changed files with 40 additions and 137 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
unpaper-0.3.tar.gz
/unpaper-6.1.tar.xz
/unpaper-6.1.tar.xz.sig
/unpaper-6.1^20220117.gite515408.tar.xz

View File

@ -1,2 +0,0 @@
from Config import *
addFilter("spelling-error .* deskewing");

View File

@ -1,2 +1 @@
SHA512 (unpaper-6.1.tar.xz) = afef705985d3c265672c9e42130acc34befc080c361f3169e299b5110c662d0b9845a9d0ca4fc3aad468f49967ded36fb60ffed296373569dd7337c3cb81e79c
SHA512 (unpaper-6.1.tar.xz.sig) = b1047d94cb521beb95d502f00d24ba47d52fbd5aa327f6ec07e54f1427bcb242af57625dda7fc95039ed34d242f2d6c29449f1e2ffc1d1cc00597c9ae881d40f
SHA512 (unpaper-6.1^20220117.gite515408.tar.xz) = b18055a00f75336cca0eba32564baca23891b22c673d97596ed87c510058f523d0aa5f4f23d89fc9db5a3d523c1f1638d9cbcdcf717fbaec154aae6296cd10f1

View File

@ -1,30 +0,0 @@
From 78480f765f26f4bc2e5ac521fa78ba62bd899213 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Fri, 8 Jul 2016 10:29:29 +0200
Subject: [PATCH] Do not install COPYING into docdir
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
Makefile.am | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 461d7ef..5e518d2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,7 +6,8 @@ unpaper_SOURCES = file.c imageprocess.c imageprocess.h parse.c \
unpaper_CFLAGS = $(LIBAV_CFLAGS)
unpaper_LDADD = $(LIBAV_LIBS)
-dist_doc_DATA = NEWS COPYING README.md AUTHORS
+extra_DIST = COPYING
+dist_doc_DATA = NEWS README.md AUTHORS
dist_man_MANS = unpaper.1
dist_html_DATA = doc/basic-concepts.md doc/image-processing.md \
--
2.5.5

View File

@ -1,55 +0,0 @@
From 89bce4417c35a8cbaa35f5a7451abca3d1c95adc Mon Sep 17 00:00:00 2001
From: Thomas Koch <thomas@koch.ro>
Date: Mon, 28 Sep 2015 07:39:30 +0200
Subject: [PATCH] fix ffmpeg incompatibility
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Thanks to Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> for the patch.
Received 2015-09-28 via debian bug
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=800312
with the following comment:
Not really. unpaper just doesn't use the API correctly.
More specifically, it doesn't make sure it actually got a frame.
The following change makes it work:
Closes: #39
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
file.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/file.c b/file.c
index c92994d..3989447 100644
--- a/file.c
+++ b/file.c
@@ -93,12 +93,23 @@ void loadImage(const char *filename, AVFrame **image) {
if (pkt.stream_index != 0)
errOutput("unable to open file %s: invalid stream.", filename);
+ while (!got_frame && pkt.data) {
+
+ if (pkt.size <= 0) {
+ pkt.data = NULL;
+ pkt.size = 0;
+ }
+
ret = avcodec_decode_video2(avctx, frame, &got_frame, &pkt);
if (ret < 0) {
av_strerror(ret, errbuff, sizeof(errbuff));
errOutput("unable to open file %s: %s", filename, errbuff);
}
+ pkt.data += ret;
+ pkt.size -= ret;
+ }
+
switch(frame->format) {
case AV_PIX_FMT_Y400A: // 8-bit grayscale PNG
case AV_PIX_FMT_GRAY8:
--
2.5.5

1
unpaper.rpmlintrc Normal file
View File

@ -0,0 +1 @@
addFilter('spelling-error .* deskewing')

View File

@ -1,40 +1,42 @@
Name: unpaper
Version: 6.1
Version: 6.1^20220117.gite515408
Release: 1%{?dist}
Summary: Post-processing of scanned and photocopied book pages
# COPYING: GPLv2 text
# LICENSES/GPL-2.0-only.txt: GPLv2 text
# other files: GPLv2
# README.md: GPLv2
## Not in the binary package
# aclocal.m4: FSFULLR and GPLv2+ with Autoconf exception
# configure: FSFUL
# depcomp: GPLv2+ with Autoconf exception
# install-sh: MIT
# Makefile.in: FSFULLR
# missing: GPLv2+ with Autoconf exception
# test-driver: GPLv2+ with Autoconf exception
# doc/conf.py: MIT
# LICENSES/Apache-2.0.txt: ASL 2.0 text
# LICENSES/MIT.txt: MIT text
# meson.build: MIT
# tests/unpaper_tests.py: GPLv2 and MIT
# .dir-locals.el: MIT
# .github/workflows/meson-build-and-test.yml: ASL 2.0
# .github/workflows/pre-commit.yml: MIT
# .gitignore: MIT
# .mergify.yml: MIT
# .mailmap: MIT
# .pre-commit-config.yaml: MIT
License: GPLv2
URL: https://www.flameeyes.eu/projects/{%name}
Source0: https://www.flameeyes.eu/files/%{name}-%{version}.tar.xz
Source1: https://www.flameeyes.eu/files/%{name}-%{version}.tar.xz.sig
# A key exported from keyserver <hkp://pgp.surfnet.nl> on 2022-02-25.
Source2: gpgkey-BDAEF3008A1CC62079C2A16847664B94E36B629F.gpg
# Do not put COPYING into docdir, not upstreamable,
Patch0: unpaper-6.1-Do-not-install-COPYING-into-docdir.patch
# Restore compatibility with ffmpeg-2.8,
# <https://github.com/Flameeyes/unpaper/issues/39>
Patch1: unpaper-6.1-fix-ffmpeg-incompatibility.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bash
BuildRequires: coreutils
#Source0: https://www.flameeyes.eu/files/%%{name}-%%{version}.tar.xz
#Source1: https://www.flameeyes.eu/files/%%{name}-%%{version}.tar.xz.sig
## A key exported from keyserver <hkp://pgp.surfnet.nl> on 2022-02-25.
#Source2: gpgkey-BDAEF3008A1CC62079C2A16847664B94E36B629F.gpg
# A git snapshot because of a fix for porting to libav 5.0
# <https://github.com/unpaper/unpaper/pull/104> depends on too many changes.
Source0: %{name}-%{version}.tar.xz
BuildRequires: gcc
BuildRequires: gnupg2
#BuildRequires: gnupg2
BuildRequires: meson >= 0.57
BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(libavutil)
BuildRequires: sed
# xsltproc not used, there is no XML source for the manual
BuildRequires: python3-sphinx >= 3.4
# Tests:
BuildRequires: python3-pytest
BuildRequires: python3dist(pillow)
%description
unpaper is a post-processing tool for scanned sheets of paper, especially for
@ -53,41 +55,28 @@ and will automatically straighten each page by rotating it to the correct
angle. This process is called "deskewing".
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
#%%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup -p1
# Fix end-of-line coding
sed -i -e 's/\r//' COPYING
autoreconf -fi
%build
%configure --disable-silent-rules
%{make_build}
%meson
%meson_build
%check
# The F and G tests fail. Because of CPU optimizations, resulting image cannot
# be deterministic. Fixed in upstream by commit:
#
# commit 5bdd7acd09675086114b4006eff50b8fe78f95cc
# Author: Diego Elio Pettenò <flameeyes@flameeyes.eu>
# Date: Tue Nov 11 19:31:40 2014 +0000
# Subject: Rewrite tests to use an image comparison binary instead of md5sum.
#
# Because the patch is huge (test data) and the bug is in the tests, not in
# the tool, I will disable tests for now.
#
# make check %{?_smp_mflags}
%meson_test
%install
%{make_install}
%meson_install
%files
%license COPYING
%license LICENSES/GPL-2.0-only.txt
%{_bindir}/*
%doc AUTHORS doc NEWS README.md
%{_mandir}/man1/*
%doc AUTHORS doc/*.md doc/img NEWS README.md
%changelog
* Fri Feb 25 2022 Petr Pisar <ppisar@redhat.com> - 6.1-1
- 6.1 bump from Flameeyes fork
* Fri Feb 25 2022 Petr Pisar <ppisar@redhat.com> - 6.1^20220117.gite515408-1
- 6.1 bump from upstream git tree
- License changed to GPLv2
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.3-27