pkgsrc-Changes archive

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

CVS commit: pkgsrc/graphics/py-img2pdf



Module Name:    pkgsrc
Committed By:   wiz
Date:           Mon Nov  2 20:23:53 UTC 2026

Added Files:
        pkgsrc/graphics/py-img2pdf: ALTERNATIVES COMMIT_MSG DESCR Makefile
            PLIST distinfo

Log Message:
graphics/py-img2pdf: import py-img2pdf-0.6.3

Packaged by martin, leot, and myself in wip.

Lossless conversion of raster images to PDF. You should use img2pdf if
your priorities are (in this order):

  always lossless: the image embedded in the PDF will always have the
      exact same color information for every pixel as the input

  small: if possible, the difference in filesize between the input
      image and the output PDF will only be the overhead of the PDF container
      itself

  fast: if possible, the input image is just pasted into the PDF
      document as-is without any CPU hungry re-encoding of the pixel data


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/graphics/py-img2pdf/ALTERNATIVES \
    pkgsrc/graphics/py-img2pdf/COMMIT_MSG pkgsrc/graphics/py-img2pdf/DESCR \
    pkgsrc/graphics/py-img2pdf/Makefile pkgsrc/graphics/py-img2pdf/PLIST \
    pkgsrc/graphics/py-img2pdf/distinfo

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

Added files:

Index: pkgsrc/graphics/py-img2pdf/ALTERNATIVES
diff -u /dev/null pkgsrc/graphics/py-img2pdf/ALTERNATIVES:1.1
--- /dev/null   Mon Nov  2 20:23:53 2026
+++ pkgsrc/graphics/py-img2pdf/ALTERNATIVES     Mon Nov  2 20:23:52 2026
@@ -0,0 +1,2 @@
+bin/img2pdf @PREFIX@/bin/img2pdf@PYVERSSUFFIX@
+bin/img2pdf-gui @PREFIX@/bin/img2pdf-gui@PYVERSSUFFIX@
Index: pkgsrc/graphics/py-img2pdf/COMMIT_MSG
diff -u /dev/null pkgsrc/graphics/py-img2pdf/COMMIT_MSG:1.1
--- /dev/null   Mon Nov  2 20:23:53 2026
+++ pkgsrc/graphics/py-img2pdf/COMMIT_MSG       Mon Nov  2 20:23:52 2026
@@ -0,0 +1,2 @@
+Add py-img2pdf, a tool (and python library) to add image files to PDFs
+without recoding them.
Index: pkgsrc/graphics/py-img2pdf/DESCR
diff -u /dev/null pkgsrc/graphics/py-img2pdf/DESCR:1.1
--- /dev/null   Mon Nov  2 20:23:53 2026
+++ pkgsrc/graphics/py-img2pdf/DESCR    Mon Nov  2 20:23:52 2026
@@ -0,0 +1,12 @@
+Lossless conversion of raster images to PDF. You should use img2pdf if
+your priorities are (in this order):
+
+  always lossless: the image embedded in the PDF will always have the
+      exact same color information for every pixel as the input
+
+  small: if possible, the difference in filesize between the input
+      image and the output PDF will only be the overhead of the PDF container
+      itself
+
+  fast: if possible, the input image is just pasted into the PDF
+      document as-is without any CPU hungry re-encoding of the pixel data
Index: pkgsrc/graphics/py-img2pdf/Makefile
diff -u /dev/null pkgsrc/graphics/py-img2pdf/Makefile:1.1
--- /dev/null   Mon Nov  2 20:23:53 2026
+++ pkgsrc/graphics/py-img2pdf/Makefile Mon Nov  2 20:23:52 2026
@@ -0,0 +1,51 @@
+# $NetBSD: Makefile,v 1.1 2026/11/02 20:23:52 wiz Exp $
+
+DISTNAME=      img2pdf-0.6.3
+PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
+CATEGORIES=    graphics python
+MASTER_SITES=  ${MASTER_SITE_PYPI:=i/img2pdf/}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://pypi.org/project/img2pdf/
+COMMENT=       Lossless conversion of raster images to PDF
+LICENSE=       gnu-lgpl-v3
+
+TOOL_DEPENDS+= ${PYPKGPREFIX}-flit_core>=3.2:../../devel/py-flit_core
+DEPENDS+=      ${PYPKGPREFIX}-Pillow-[0-9]*:../../graphics/py-Pillow
+DEPENDS+=      ${PYPKGPREFIX}-pikepdf-[0-9]*:../../print/py-pikepdf
+DEPENDS+=      colord-[0-9]*:../../graphics/colord
+TEST_DEPENDS+= ${PYPKGPREFIX}-numpy-[0-9]*:../../math/py-numpy
+TEST_DEPENDS+= ${PYPKGPREFIX}-scipy-[0-9]*:../../math/py-scipy
+# convert
+TEST_DEPENDS+= ImageMagick-[0-9]*:../../graphics/ImageMagick
+# pdfimages, pdftocairo
+TEST_DEPENDS+= poppler-utils-[0-9]*:../../print/poppler-utils
+# exiftool
+TEST_DEPENDS+= p5-Image-ExifTool-[0-9]*:../../graphics/p5-Image-ExifTool
+# jpegtopnm
+TEST_DEPENDS+= netpbm-[0-9]*:../../graphics/netpbm
+# date --utc
+TEST_DEPENDS+= coreutils-[0-9]*:../../sysutils/coreutils
+
+TOOLS_PATH.date=       ${TOOLBASE}/gnu/bin/date
+
+# as of 0.6.3:
+# 4 failed, 278 passed, 24 skipped, 5 warnings, 48 errors
+# mostly due to lack of tiff support with
+# PKG_DEFAULT_OPTIONS=-tiff
+
+REPLACE_PYTHON+=       src/img2pdf.py
+
+SUBST_CLASSES+=                icc
+SUBST_FILES.icc+=      src/img2pdf.py
+SUBST_SED.icc+=                -e "s,/usr/share/color/icc/sRGB.icc,${PREFIX}/share/color/icc/colord/sRGB.icc,"
+SUBST_STAGE.icc=       pre-build
+SUBST_MESSAGE.icc=     Fixing path to color profile.
+
+post-install:
+       ${MV} ${DESTDIR}${PREFIX}/bin/img2pdf ${DESTDIR}${PREFIX}/bin/img2pdf${PYVERSSUFFIX}
+       ${MV} ${DESTDIR}${PREFIX}/bin/img2pdf-gui ${DESTDIR}${PREFIX}/bin/img2pdf-gui${PYVERSSUFFIX}
+
+.include "../../lang/python/application.mk"
+.include "../../lang/python/wheel.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/graphics/py-img2pdf/PLIST
diff -u /dev/null pkgsrc/graphics/py-img2pdf/PLIST:1.1
--- /dev/null   Mon Nov  2 20:23:53 2026
+++ pkgsrc/graphics/py-img2pdf/PLIST    Mon Nov  2 20:23:52 2026
@@ -0,0 +1,11 @@
+@comment $NetBSD: PLIST,v 1.1 2026/11/02 20:23:52 wiz Exp $
+bin/img2pdf${PYVERSSUFFIX}
+bin/img2pdf-gui${PYVERSSUFFIX}
+${PYSITELIB}/${WHEEL_INFODIR}/METADATA
+${PYSITELIB}/${WHEEL_INFODIR}/RECORD
+${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
+${PYSITELIB}/${WHEEL_INFODIR}/entry_points.txt
+${PYSITELIB}/${WHEEL_INFODIR}/licenses/LICENSE
+${PYSITELIB}/img2pdf.py
+${PYSITELIB}/img2pdf.pyc
+${PYSITELIB}/img2pdf.pyo
Index: pkgsrc/graphics/py-img2pdf/distinfo
diff -u /dev/null pkgsrc/graphics/py-img2pdf/distinfo:1.1
--- /dev/null   Mon Nov  2 20:23:53 2026
+++ pkgsrc/graphics/py-img2pdf/distinfo Mon Nov  2 20:23:53 2026
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1 2026/11/02 20:23:53 wiz Exp $
+
+BLAKE2s (img2pdf-0.6.3.tar.gz) = e21fda7b4129d7112de22105c82030b8684ce8d04c95dc55a71fb26d2d5247b5
+SHA512 (img2pdf-0.6.3.tar.gz) = d9d2bfb078765e43727d89f0c9723f9a3cd1ffea745f657540de6e301f287c3fd4a1c9efb9233ee99e3e6d337c701e75ff20908190d0f3ae39c5c32debeaedb2
+Size (img2pdf-0.6.3.tar.gz) = 120350 bytes



Home | Main Index | Thread Index | Old Index