git: 661bb5cdf9db - main - graphics/py-pypdf2: New port: Pure-python PDF library for splitting, merging, cropping, transforming

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Thu, 09 Jul 2026 05:20:23 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=661bb5cdf9dbd021e3c7417f0b94d92f2a166cb8

commit 661bb5cdf9dbd021e3c7417f0b94d92f2a166cb8
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-07-09 01:05:20 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-07-09 05:20:14 +0000

    graphics/py-pypdf2: New port: Pure-python PDF library for splitting, merging, cropping, transforming
---
 graphics/Makefile            |  1 +
 graphics/py-pypdf2/Makefile  | 25 +++++++++++++++++++++++++
 graphics/py-pypdf2/distinfo  |  3 +++
 graphics/py-pypdf2/pkg-descr |  4 ++++
 4 files changed, 33 insertions(+)

diff --git a/graphics/Makefile b/graphics/Makefile
index cef105ca7687..1683f1d533eb 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -1032,6 +1032,7 @@
     SUBDIR += py-pymaging-png
     SUBDIR += py-pyocr
     SUBDIR += py-pyogrio
+    SUBDIR += py-pypdf2
     SUBDIR += py-pypdfium2
     SUBDIR += py-pypillowfight
     SUBDIR += py-pyproj
diff --git a/graphics/py-pypdf2/Makefile b/graphics/py-pypdf2/Makefile
new file mode 100644
index 000000000000..8eaf57c3a151
--- /dev/null
+++ b/graphics/py-pypdf2/Makefile
@@ -0,0 +1,25 @@
+PORTNAME=	pypdf2
+PORTVERSION=	3.0.1
+CATEGORIES=	graphics python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+DISTNAME=	PyPDF2-${PORTVERSION}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Pure-python PDF library for splitting, merging, cropping, transforming
+WWW=		https://pypi.org/project/pypdf2/
+
+LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}flit-core>0:devel/py-flit-core@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	autoplist concurrent pep517
+
+NO_ARCH=	yes
+
+post-extract:
+	@${REINPLACE_CMD} -e 's/^license = "\([^"]*\)"/license = {text = "\1"}/' -e '/^license-files/d' ${WRKSRC}/pyproject.toml
+
+.include <bsd.port.mk>
diff --git a/graphics/py-pypdf2/distinfo b/graphics/py-pypdf2/distinfo
new file mode 100644
index 000000000000..f96f0b33881a
--- /dev/null
+++ b/graphics/py-pypdf2/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1783064069
+SHA256 (PyPDF2-3.0.1.tar.gz) = a74408f69ba6271f71b9352ef4ed03dc53a31aa404d29b5d31f53bfecfee1440
+SIZE (PyPDF2-3.0.1.tar.gz) = 227419
diff --git a/graphics/py-pypdf2/pkg-descr b/graphics/py-pypdf2/pkg-descr
new file mode 100644
index 000000000000..ead975e4f4d4
--- /dev/null
+++ b/graphics/py-pypdf2/pkg-descr
@@ -0,0 +1,4 @@
+PyPDF2 is a pure-Python PDF library capable of splitting, merging,
+cropping, and transforming PDF files. It provides utilities for
+extracting text and metadata, rotating pages, adding watermarks,
+and performing other common PDF manipulation tasks.