aboutsummaryrefslogtreecommitdiff
path: root/graphics/py-dj52-sorl-thumbnail
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/py-dj52-sorl-thumbnail')
-rw-r--r--graphics/py-dj52-sorl-thumbnail/Makefile62
-rw-r--r--graphics/py-dj52-sorl-thumbnail/distinfo3
-rw-r--r--graphics/py-dj52-sorl-thumbnail/files/patch-pyproject.toml11
-rw-r--r--graphics/py-dj52-sorl-thumbnail/pkg-descr16
4 files changed, 92 insertions, 0 deletions
diff --git a/graphics/py-dj52-sorl-thumbnail/Makefile b/graphics/py-dj52-sorl-thumbnail/Makefile
new file mode 100644
index 000000000000..64060b76a523
--- /dev/null
+++ b/graphics/py-dj52-sorl-thumbnail/Makefile
@@ -0,0 +1,62 @@
+PORTNAME= sorl-thumbnail
+DISTVERSION= 12.11.0
+CATEGORIES= graphics python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}dj52-
+DISTNAME= sorl_thumbnail-${DISTVERSION}
+
+MAINTAINER= kai@FreeBSD.org
+COMMENT= Sorl-thumbnail provides an easy way to generate image thumbnails
+WWW= https://github.com/jazzband/sorl-thumbnail
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PY_SETUPTOOLS} \
+ ${PYTHON_PKGNAMEPREFIX}setuptools-scm>=8:devel/py-setuptools-scm@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django52>=4.2:www/py-django52@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= autoplist concurrent pep517
+
+CONFLICTS_INSTALL= ${PYTHON_PKGNAMEPREFIX}*${PORTNAME}
+
+NO_ARCH= yes
+PORTDOCS= *
+
+OPTIONS_DEFINE= DOCS
+OPTIONS_DEFAULT= PILLOW
+OPTIONS_SINGLE= IMAGELIB
+OPTIONS_GROUP= CACHING
+
+# An PGMAGICK option would still be possible as well, but the ports tree does
+# not yet have a py-pgmagick port.
+OPTIONS_SINGLE_IMAGELIB= GRAPHICSMAGICK IMAGEMAGICK PILLOW WAND
+OPTIONS_GROUP_CACHING= REDIS
+
+GRAPHICSMAGICK_DESC= Use GraphicsMagick for image processing (faster)
+IMAGEMAGICK_DESC= Use ImageMagick for image processing
+PILLOW_DESC= Use internal image processing
+REDIS_DESC= Use REDIS as Key Value Store
+WAND_DESC= Use Wand with ImageMagick
+
+DOCS_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>=0,1:textproc/py-sphinx@${PY_FLAVOR}
+
+GRAPHICSMAGICK_RUN_DEPENDS= ${LOCALBASE}/bin/gm:graphics/GraphicsMagick
+IMAGEMAGICK_USES= magick:6,run
+PILLOW_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow@${PY_FLAVOR}
+REDIS_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}redis>0:databases/py-redis@${PY_FLAVOR}
+WAND_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}Wand>0:graphics/py-wand@${PY_FLAVOR}
+
+post-build-DOCS-on:
+ ${SETENV} PYTHONPATH=${WRKSRC} ${LOCALBASE}/bin/sphinx-build-${PYTHON_VER} \
+ -d ${WRKDIR} -b html ${WRKSRC}/docs ${WRKSRC}/build/sphinx/html
+
+post-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ (cd ${WRKSRC}/build/sphinx/html && \
+ ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} \
+ "! -name .buildinfo -and ! -name objects.inv")
+
+.include <bsd.port.mk>
diff --git a/graphics/py-dj52-sorl-thumbnail/distinfo b/graphics/py-dj52-sorl-thumbnail/distinfo
new file mode 100644
index 000000000000..71659dc4d34c
--- /dev/null
+++ b/graphics/py-dj52-sorl-thumbnail/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1755414298
+SHA256 (sorl_thumbnail-12.11.0.tar.gz) = 191b89c27ecb40b5c2a35549d557d17c4841c6aff439b2e17b938b91eea463b3
+SIZE (sorl_thumbnail-12.11.0.tar.gz) = 667102
diff --git a/graphics/py-dj52-sorl-thumbnail/files/patch-pyproject.toml b/graphics/py-dj52-sorl-thumbnail/files/patch-pyproject.toml
new file mode 100644
index 000000000000..f38468089e04
--- /dev/null
+++ b/graphics/py-dj52-sorl-thumbnail/files/patch-pyproject.toml
@@ -0,0 +1,11 @@
+Relax version requirements.
+
+--- pyproject.toml.orig 2025-08-20 12:07:03 UTC
++++ pyproject.toml
+@@ -1,5 +1,5 @@
+ [build-system]
+-requires = ["setuptools>=64", "setuptools_scm>=8"]
++requires = ["setuptools", "setuptools_scm>=8"]
+ build-backend = "setuptools.build_meta"
+
+ [project]
diff --git a/graphics/py-dj52-sorl-thumbnail/pkg-descr b/graphics/py-dj52-sorl-thumbnail/pkg-descr
new file mode 100644
index 000000000000..dbfc4c434b13
--- /dev/null
+++ b/graphics/py-dj52-sorl-thumbnail/pkg-descr
@@ -0,0 +1,16 @@
+The sorl-thumbnail package provides an easy way to generate image
+thumbnails.
+
+Some of its features:
+- Storage support
+- Pluggable Engine support for Pillow, GraphicsMagick, ImageMagick and Wand
+- Pluggable Key Value Store support (cached db and redis)
+- Pluggable Backend support
+- Admin integration with possibility to delete
+- Dummy generation (placeholders)
+- Flexible, simple syntax, generates no html
+- ImageField for model that deletes thumbnails
+- CSS style cropping options
+- Back smart cropping, and remove borders from the images when cropping
+- Margin calculation for vertical positioning
+- Alternative resolutions versions of a thumbnail