summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2024-09-09 02:19:50 +0800
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2024-09-09 02:37:41 +0800
commit0360e8e0d4deec9c6d425200e43e4a2b47950bd3 (patch)
tree3a839696886ff731ee3ad9a815076afcf2461f0f
parentgraphics/py-contextily: Update to 1.6.2 (diff)
graphics/py-imageio: Add RAWPY option
-rw-r--r--graphics/py-imageio/Makefile5
-rw-r--r--graphics/py-imageio/files/patch-setup.py11
2 files changed, 15 insertions, 1 deletions
diff --git a/graphics/py-imageio/Makefile b/graphics/py-imageio/Makefile
index 15a90eb7334a..d84ff14cefcd 100644
--- a/graphics/py-imageio/Makefile
+++ b/graphics/py-imageio/Makefile
@@ -33,12 +33,13 @@ USE_PYTHON= autoplist concurrent pep517 pytest
NO_ARCH= yes
-OPTIONS_DEFINE= FFMPEG FITS PILLOW_HEIF PYAV TIFFFILE
+OPTIONS_DEFINE= FFMPEG FITS PILLOW_HEIF PYAV RAWPY TIFFFILE
OPTIONS_DEFAULT=FFMPEG
FFMPEG_DESC= Read/Write video using FFmpeg
FITS_DESC= Read FITS files
PILLOW_HEIF_DESC= Read HEIF files
PYAV_DESC= Read/Write video and image files
+RAWPY_DESC= Read/Write images via rawpy
TIFFFILE_DESC= Read/Write TIFF files
FFMPEG_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}imageio-ffmpeg>=0:graphics/py-imageio-ffmpeg@${PY_FLAVOR} \
@@ -46,6 +47,8 @@ FFMPEG_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}imageio-ffmpeg>=0:graphics/py-imageio
FITS_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}astropy>=0,2:astro/py-astropy@${PY_FLAVOR}
PILLOW_HEIF_RUN_DEPENDS=${PYTHON_PKGNAMEPREFIX}pillow-heif>=0:graphics/py-pillow-heif@${PY_FLAVOR}
PYAV_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}av>=0:multimedia/py-av@${PY_FLAVOR}
+RAWPY_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>=0,1:math/py-numpy@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}rawpy>=0:graphics/py-rawpy@${PY_FLAVOR}
TIFFFILE_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tifffile>=0:graphics/py-tifffile@${PY_FLAVOR}
.include <bsd.port.mk>
diff --git a/graphics/py-imageio/files/patch-setup.py b/graphics/py-imageio/files/patch-setup.py
new file mode 100644
index 000000000000..795ebaad2833
--- /dev/null
+++ b/graphics/py-imageio/files/patch-setup.py
@@ -0,0 +1,11 @@
+--- setup.py.orig 2024-08-13 04:41:56 UTC
++++ setup.py
+@@ -117,7 +117,7 @@ extras_require = {
+ # TODO: move this to cpython_only_plugins when python 3.8 support is dropped
+ "rawpy": [
+ "rawpy",
+- "numpy>2",
++ "numpy",
+ ], # rawpy doesn't support python 3.8 (due to numpy > 2 requirement)
+ "pillow-heif": ["pillow-heif"], # pillow-heif doesn#t support py3.8 on MacOS ARM
+ }