pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

unpaper: update to 7.0.0.



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <wiz%NetBSD.org@localhost>
Pushed By:	wiz
Date:		Thu Oct 29 17:57:27 2026 +0100
Changeset:	3b85ca847288d8411651e09b42aed56c803e3a24

Modified Files:
	unpaper/Makefile
	unpaper/PLIST
	unpaper/distinfo
	unpaper/patches/patch-unpaper.c
Removed Files:
	unpaper/patches/patch-file.c

Log Message:
unpaper: update to 7.0.0.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=3b85ca847288d8411651e09b42aed56c803e3a24

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 unpaper/Makefile                | 13 +++---
 unpaper/PLIST                   | 30 -------------
 unpaper/distinfo                |  9 ++--
 unpaper/patches/patch-file.c    | 96 -----------------------------------------
 unpaper/patches/patch-unpaper.c | 20 +++++----
 5 files changed, 23 insertions(+), 145 deletions(-)

diffs:
diff --git a/unpaper/Makefile b/unpaper/Makefile
index 56a1efac37..f3ff555eb4 100644
--- a/unpaper/Makefile
+++ b/unpaper/Makefile
@@ -1,7 +1,6 @@
 # $NetBSD: Makefile,v 1.3 2012/11/12 16:26:52 othyro Exp $
-#
 
-DISTNAME=	unpaper-6.1
+DISTNAME=	unpaper-7.0.0
 CATEGORIES=	textproc
 MASTER_SITES=	https://www.flameeyes.eu/files/
 EXTRACT_SUFX=	.tar.xz
@@ -11,10 +10,14 @@ HOMEPAGE=	https://www.flameeyes.eu/projects/unpaper
 COMMENT=	Post-processing scanned and photocopied book pages
 LICENSE=	gnu-gpl-v2
 
-GNU_CONFIGURE=	yes
+TOOL_DEPENDS+=	${PYPKGPREFIX}-sphinx-[0-9]*:../../textproc/py-sphinx
+
 USE_TOOLS+=	pkg-config
 
-INSTALLATION_DIRS=	bin
+pre-configure:
+	${LN} -s ${PREFIX}/bin/sphinx-build-${PYVERSSUFFIX} ${TOOLS_DIR}/bin/sphinx-build
 
-.include "../../multimedia/ffmpeg2/buildlink3.mk"
+.include "../../devel/meson/build.mk"
+.include "../../lang/python/tool.mk"
+.include "../../multimedia/ffmpeg8/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/unpaper/PLIST b/unpaper/PLIST
index 5936193512..221bde5df9 100644
--- a/unpaper/PLIST
+++ b/unpaper/PLIST
@@ -1,33 +1,3 @@
 @comment $NetBSD$
 bin/unpaper
 man/man1/unpaper.1
-share/doc/unpaper/AUTHORS
-share/doc/unpaper/COPYING
-share/doc/unpaper/NEWS
-share/doc/unpaper/README.md
-share/doc/unpaper/basic-concepts.md
-share/doc/unpaper/file-formats.md
-share/doc/unpaper/image-processing.md
-share/doc/unpaper/img/blackfilter-detail.png
-share/doc/unpaper/img/blackfilter.png
-share/doc/unpaper/img/blurfilter-detail.png
-share/doc/unpaper/img/blurfilter.png
-share/doc/unpaper/img/border-align.png
-share/doc/unpaper/img/border-scan.png
-share/doc/unpaper/img/deskew-detail1.png
-share/doc/unpaper/img/deskew-detail2.png
-share/doc/unpaper/img/deskew.png
-share/doc/unpaper/img/documentation.odg
-share/doc/unpaper/img/input-pages.png
-share/doc/unpaper/img/layout-templates.png
-share/doc/unpaper/img/mask-center.png
-share/doc/unpaper/img/mask-scan-detail1.png
-share/doc/unpaper/img/mask-scan-detail2.png
-share/doc/unpaper/img/mask-scan.png
-share/doc/unpaper/img/multiple-input-files.png
-share/doc/unpaper/img/multiple-output-files.png
-share/doc/unpaper/img/noisefilter.png
-share/doc/unpaper/img/output-pages.png
-share/doc/unpaper/img/processing-order.png
-share/doc/unpaper/img/sheetspages.png
-share/doc/unpaper/img/standard-deviation.png
diff --git a/unpaper/distinfo b/unpaper/distinfo
index c2098f5919..35210c3a0f 100644
--- a/unpaper/distinfo
+++ b/unpaper/distinfo
@@ -1,7 +1,6 @@
 $NetBSD$
 
-RMD160 (unpaper-6.1.tar.xz) = 3337c18090c13e388eade98b1010b44893901c82
-SHA512 (unpaper-6.1.tar.xz) = afef705985d3c265672c9e42130acc34befc080c361f3169e299b5110c662d0b9845a9d0ca4fc3aad468f49967ded36fb60ffed296373569dd7337c3cb81e79c
-Size (unpaper-6.1.tar.xz) = 2655724 bytes
-SHA1 (patch-file.c) = 6560d8173e776600b0db9c976f1fa565d2d5ccec
-SHA1 (patch-unpaper.c) = 90f1b85de7c8aa22d4daed1be2a57dffde19cc5b
+BLAKE2s (unpaper-7.0.0.tar.xz) = 43744fffacaa08d2507c760c725e1918f1469110cf04984e2444cdfb50837179
+SHA512 (unpaper-7.0.0.tar.xz) = 58da969e773bf16ffee98b96f903ac5347f66d9a93c63bdb9131f5d45f4d7973c09f364ac2f27f8cb61f75de0421c6b01aa248fa9619fbdbde30fcebc76aa484
+Size (unpaper-7.0.0.tar.xz) = 4430572 bytes
+SHA1 (patch-unpaper.c) = e8b25f519ebe4da132edf35f3d203a00f4ce9e8e
diff --git a/unpaper/patches/patch-file.c b/unpaper/patches/patch-file.c
deleted file mode 100644
index bfb3a31c92..0000000000
--- a/unpaper/patches/patch-file.c
+++ /dev/null
@@ -1,96 +0,0 @@
-$NetBSD$
-
-This ensures that we close the context and streams that are created from
-libav; this might still not be complete, but there seems to be different
-APIs between libav and ffmpeg so I'm changing one piece at a time.
-
-Works towards closing Issue #26.
-
---- file.c
-+++ file.c
-@@ -105,7 +105,7 @@ void loadImage(const char *filename, AVFrame **image) {
-     case AV_PIX_FMT_RGB24:
-     case AV_PIX_FMT_MONOBLACK:
-     case AV_PIX_FMT_MONOWHITE:
--        *image = frame;
-+        *image = av_frame_clone(frame);
-         break;
- 
-     case AV_PIX_FMT_PAL8:
-@@ -123,6 +123,10 @@ void loadImage(const char *filename, AVFrame **image) {
-     default:
-         errOutput("unable to open file %s: unsupported pixel format", filename);
-     }
-+
-+    avcodec_close(avctx);
-+    av_free(avctx);
-+    avformat_close_input(&s);
- }
- 
- 
-@@ -134,13 +138,14 @@ void loadImage(const char *filename, AVFrame **image) {
-  * @param type filetype of the image to save
-  * @return true on success, false on failure
-  */
--void saveImage(char *filename, AVFrame *image, int outputPixFmt) {
-+void saveImage(char *filename, AVFrame *input, int outputPixFmt) {
-     AVOutputFormat *fmt = NULL;
-     enum AVCodecID output_codec = -1;
-     AVCodec *codec;
-     AVFormatContext *out_ctx;
-     AVCodecContext *codec_ctx;
-     AVStream *video_st;
-+    AVFrame *output = input;
-     int ret;
-     char errbuff[1024];
- 
-@@ -174,13 +179,11 @@ void saveImage(char *filename, AVFrame *image, int outputPixFmt) {
-         break;
-     }
- 
--    if ( image->format != outputPixFmt ) {
--        AVFrame *output;
--        initImage(&output, image->width, image->height,
-+    if ( input->format != outputPixFmt ) {
-+        initImage(&output, input->width, input->height,
-                   outputPixFmt, -1);
--        copyImageArea(0, 0, image->width, image->height,
--                      image, 0, 0, output);
--        image = output;
-+        copyImageArea(0, 0, input->width, input->height,
-+                      input, 0, 0, output);
-     }
- 
-     codec = avcodec_find_encoder(output_codec);
-@@ -194,9 +197,9 @@ void saveImage(char *filename, AVFrame *image, int outputPixFmt) {
-     }
- 
-     codec_ctx = video_st->codec;
--    codec_ctx->width = image->width;
--    codec_ctx->height = image->height;
--    codec_ctx->pix_fmt = image->format;
-+    codec_ctx->width = output->width;
-+    codec_ctx->height = output->height;
-+    codec_ctx->pix_fmt = output->format;
-     video_st->time_base.den = codec_ctx->time_base.den = 1;
-     video_st->time_base.num = codec_ctx->time_base.num = 1;
- 
-@@ -221,7 +224,7 @@ void saveImage(char *filename, AVFrame *image, int outputPixFmt) {
-     av_init_packet(&pkt);
- 
-     /* encode the image */
--    ret = avcodec_encode_video2(video_st->codec, &pkt, image, &got_packet);
-+    ret = avcodec_encode_video2(video_st->codec, &pkt, output, &got_packet);
- 
-     if (ret < 0) {
-         av_strerror(ret, errbuff, sizeof(errbuff));
-@@ -237,6 +240,9 @@ void saveImage(char *filename, AVFrame *image, int outputPixFmt) {
- 
-     avio_close(out_ctx->pb);
-     av_free(out_ctx);
-+
-+    if ( output != input )
-+        av_frame_free(&output);
- }
- 
- /**
diff --git a/unpaper/patches/patch-unpaper.c b/unpaper/patches/patch-unpaper.c
index 32dc41f1fe..714e816559 100644
--- a/unpaper/patches/patch-unpaper.c
+++ b/unpaper/patches/patch-unpaper.c
@@ -1,13 +1,15 @@
 $NetBSD$
 
---- unpaper.c.orig	2014-10-26 21:43:51.000000000 +0000
+NetBSD does not provide getopt_long_only.
+
+--- unpaper.c.orig	2026-10-29 16:55:42.846529708 +0000
 +++ unpaper.c
-@@ -367,7 +367,7 @@ int main(int argc, char* argv[]) {
-             { NULL,                         no_argument,       NULL, 0    }
-         };
+@@ -357,7 +357,7 @@ int main(int argc, char *argv[]) {
+         {"interpolate", required_argument, NULL, 0xcd},
+         {NULL, no_argument, NULL, 0}};
  
--        c = getopt_long_only(argc, argv, "hVl:S:x::n::M:s:z:p:m:W:B:w:b:Tt:qv",
-+        c = getopt_long(argc, argv, "hVl:S:x::n::M:s:z:p:m:W:B:w:b:Tt:qv",
-                              long_options, &option_index);
-         if (c == -1)
-             break;
+-    c = getopt_long_only(argc, argv, "hVl:S:x::n::M:s:z:p:m:W:B:w:b:Tt:qv",
++    c = getopt_long(argc, argv, "hVl:S:x::n::M:s:z:p:m:W:B:w:b:Tt:qv",
+                          long_options, &option_index);
+     if (c == -1)
+       break;


Home | Main Index | Thread Index | Old Index