Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Sep 2019 12:13:41 +0000 (UTC)
From:      Kai Knoblich <kai@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r511568 - in head/graphics/unpaper: . files
Message-ID:  <201909081213.x88CDfcA037315@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kai
Date: Sun Sep  8 12:13:40 2019
New Revision: 511568
URL: https://svnweb.freebsd.org/changeset/ports/511568

Log:
  graphics/unpaper: Update to 6.1
  
  * Add an additional patch that fixes the unpaper's usage for the
    libav/ffmpeg API. [1]
  * Remove the DOCS option as nearly all files are now in Markdown format and
    the relevant info has been transferred into the unpaper(1) manpage.
  * Take maintainership
  
  Notable changes since 0.3:
  
  * Use libav for both input and output of files, rather than custom code.
    This adds support for many different input file formats outside of
    PPM/PBM/PGM, as long as libav can redconduct them to a pixel format that
    is implemented.
  
  * Implementation of mathematically accurate interpolation, using cubic
    algorithm by default.
  
  * Options are now documented in the unpaper(1) man page, rather than in the
    code.
  
  https://github.com/Flameeyes/unpaper/blob/unpaper-6.1/NEWS
  
  Obtained from:	Debian [1]

Added:
  head/graphics/unpaper/files/
  head/graphics/unpaper/files/patch-file.c   (contents, props changed)
Modified:
  head/graphics/unpaper/Makefile
  head/graphics/unpaper/distinfo

Modified: head/graphics/unpaper/Makefile
==============================================================================
--- head/graphics/unpaper/Makefile	Sun Sep  8 12:11:44 2019	(r511567)
+++ head/graphics/unpaper/Makefile	Sun Sep  8 12:13:40 2019	(r511568)
@@ -2,31 +2,27 @@
 # $FreeBSD$
 
 PORTNAME=	unpaper
-PORTVERSION=	0.3
+PORTVERSION=	6.1
 CATEGORIES=	graphics
 MASTER_SITES=	https://www.flameeyes.eu/files/
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	kai@FreeBSD.org
 COMMENT=	Post-processing tool for scanned sheets of paper
 
 LICENSE=	GPLv2
-LICENSE_FILE=	${WRKSRC}/LICENSE
+LICENSE_FILE=	${WRKSRC}/COPYING
 
-PORTDOCS=	*
-PLIST_FILES=	bin/${PORTNAME}
+BUILD_DEPENDS=	xsltproc:textproc/libxslt \
+		bash:shells/bash
+LIB_DEPENDS=	libavcodec.so:multimedia/ffmpeg \
+		libavformat.so:multimedia/ffmpeg \
+		libavutil.so:multimedia/ffmpeg
 
-OPTIONS_DEFINE=	DOCS
+USES=		autoreconf pkgconfig tar:xz
 
-do-build:
-	@${CC} ${CFLAGS} -o ${WRKSRC}/${PORTNAME} \
-		${WRKSRC}/src/${PORTNAME}.c -lm
+GNU_CONFIGURE=	yes
 
-do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
-
-do-install-DOCS-on:
-	@${MKDIR} ${STAGEDIR}${DOCSDIR}
-	@cd ${WRKSRC}/ && ${INSTALL_DATA} CHANGELOG README ${STAGEDIR}${DOCSDIR}
-	@cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
+PLIST_FILES=	bin/${PORTNAME} \
+		man/man1/${PORTNAME}.1.gz
 
 .include <bsd.port.mk>

Modified: head/graphics/unpaper/distinfo
==============================================================================
--- head/graphics/unpaper/distinfo	Sun Sep  8 12:11:44 2019	(r511567)
+++ head/graphics/unpaper/distinfo	Sun Sep  8 12:13:40 2019	(r511568)
@@ -1,2 +1,3 @@
-SHA256 (unpaper-0.3.tar.gz) = 3433664040942bf7638946e2327e5c64119c600fde8ace918f47109fafbde5be
-SIZE (unpaper-0.3.tar.gz) = 546488
+TIMESTAMP = 1565468288
+SHA256 (unpaper-6.1.tar.xz) = 237c84f5da544b3f7709827f9f12c37c346cdf029b1128fb4633f9bafa5cb930
+SIZE (unpaper-6.1.tar.xz) = 2655724

Added: head/graphics/unpaper/files/patch-file.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/unpaper/files/patch-file.c	Sun Sep  8 12:13:40 2019	(r511568)
@@ -0,0 +1,30 @@
+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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909081213.x88CDfcA037315>