From owner-svn-ports-all@freebsd.org Sun Sep 8 12:13:41 2019 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E0BA6F18D8; Sun, 8 Sep 2019 12:13:41 +0000 (UTC) (envelope-from kai@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46R9F15btXz3LJ2; Sun, 8 Sep 2019 12:13:41 +0000 (UTC) (envelope-from kai@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A3A211DC90; Sun, 8 Sep 2019 12:13:41 +0000 (UTC) (envelope-from kai@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x88CDf1r037318; Sun, 8 Sep 2019 12:13:41 GMT (envelope-from kai@FreeBSD.org) Received: (from kai@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x88CDfcA037315; Sun, 8 Sep 2019 12:13:41 GMT (envelope-from kai@FreeBSD.org) Message-Id: <201909081213.x88CDfcA037315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kai set sender to kai@FreeBSD.org using -f From: Kai Knoblich Date: Sun, 8 Sep 2019 12:13:41 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r511568 - in head/graphics/unpaper: . files X-SVN-Group: ports-head X-SVN-Commit-Author: kai X-SVN-Commit-Paths: in head/graphics/unpaper: . files X-SVN-Commit-Revision: 511568 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Sep 2019 12:13:41 -0000 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 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 +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) {