1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-04 11:23:46 +00:00

graphics/unpaper: Update to 7.0.0

Changelog:

* Tests now compare a golden file by counting the bytes that differ
  between it and the result. This allows non-byte-perfect calculations
  to be executed and still not fail the tests. This is required as fused
  multiply-add instructions can increase precision and thus deviate from
  the base C code, when using floating-point arithmetic.

* Build is now provided by Meson, replacing the Autotools based build
  system introduced in 0.4, 10½ years ago.

* Compatibility expanded to ffmpeg-5 (and newer versions), which is the
  current widely available release.

https://github.com/unpaper/unpaper/releases/tag/unpaper-7.0.0

PR:		270218
This commit is contained in:
Daniel Engberg 2023-03-17 07:30:20 +01:00 committed by Kai Knoblich
parent 419d6bb2e8
commit 1e7e52e029
3 changed files with 10 additions and 41 deletions

View File

@ -1,24 +1,23 @@
PORTNAME= unpaper
PORTVERSION= 6.1
DISTVERSION= 7.0.0
CATEGORIES= graphics
MASTER_SITES= https://www.flameeyes.eu/files/
MASTER_SITES= https://github.com/${PORTNAME}/${PORTNAME}/releases/download/${PORTNAME}-${DISTVERSION}/ \
https://www.flameeyes.eu/files/
MAINTAINER= kai@FreeBSD.org
COMMENT= Post-processing tool for scanned sheets of paper
WWW= https://www.flameeyes.eu/projects/unpaper
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
LICENSE_FILE= ${WRKSRC}/LICENSES/GPL-2.0-only.txt
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>0:textproc/py-sphinx@${PY_FLAVOR}
BUILD_DEPENDS= xsltproc:textproc/libxslt \
bash:shells/bash
LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \
libavformat.so:multimedia/ffmpeg \
libavutil.so:multimedia/ffmpeg
USES= autoreconf pkgconfig tar:xz
GNU_CONFIGURE= yes
USES= meson pkgconfig python:build tar:xz
PLIST_FILES= bin/${PORTNAME} \
man/man1/${PORTNAME}.1.gz

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1565468288
SHA256 (unpaper-6.1.tar.xz) = 237c84f5da544b3f7709827f9f12c37c346cdf029b1128fb4633f9bafa5cb930
SIZE (unpaper-6.1.tar.xz) = 2655724
TIMESTAMP = 1678808615
SHA256 (unpaper-7.0.0.tar.xz) = 2575fbbf26c22719d1cb882b59602c9900c7f747118ac130883f63419be46a80
SIZE (unpaper-7.0.0.tar.xz) = 4430572

View File

@ -1,30 +0,0 @@
Subject: Fix wrong ffmpeg API usage
Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=800312
Bug: https://github.com/Flameeyes/unpaper/issues/39
Author: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Forwarded: https://github.com/Flameeyes/unpaper/pull/42
--- file.c.orig 2014-10-26 22:35:38 UTC
+++ file.c
@@ -93,10 +93,21 @@ 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) {