aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2023-09-27 03:47:34 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2023-09-27 03:47:34 +0000
commit0b601c7a3719272e7fb1dd6698771acfe14d67ac (patch)
tree0213b151bd29043a5351a897b501c8918322cc4c
parent7474699c6a0da00052bee1f461c63f8627706900 (diff)
downloadports-0b601c7a3719272e7fb1dd6698771acfe14d67ac.tar.gz
ports-0b601c7a3719272e7fb1dd6698771acfe14d67ac.zip
graphics/py-gphoto2: update the port to version 2.5.0
Remove no longer useful DOCS option, propagate EXAMPLES down to `setup.py', garbage-collect `post-patch' target. Reported by: portscout
-rw-r--r--graphics/py-gphoto2/Makefile10
-rw-r--r--graphics/py-gphoto2/distinfo6
-rw-r--r--graphics/py-gphoto2/files/patch-setup.py22
3 files changed, 28 insertions, 10 deletions
diff --git a/graphics/py-gphoto2/Makefile b/graphics/py-gphoto2/Makefile
index 45ddb99331f5..9467230dd7d6 100644
--- a/graphics/py-gphoto2/Makefile
+++ b/graphics/py-gphoto2/Makefile
@@ -1,5 +1,5 @@
PORTNAME= gphoto2
-PORTVERSION= 2.3.4
+PORTVERSION= 2.5.0
CATEGORIES= graphics python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -18,12 +18,8 @@ USES= pkgconfig python shebangfix
USE_PYTHON= autoplist concurrent distutils
SHEBANG_FILES= examples/*.py
-OPTIONS_DEFINE= DOCS EXAMPLES
+OPTIONS_DEFINE= EXAMPLES
-post-patch:
- @${REINPLACE_CMD} -e '/-O3/d' \
- -e 's|share/python-gphoto2/examples|${EXAMPLESDIR_REL}|' \
- -e 's|share/python-gphoto2|${DOCSDIR_REL}|' \
- ${WRKSRC}/setup.py
+EXAMPLES_MAKE_ENV= WITH_EXAMPLES=yes
.include <bsd.port.mk>
diff --git a/graphics/py-gphoto2/distinfo b/graphics/py-gphoto2/distinfo
index a0e1831d752a..d37d35e51e71 100644
--- a/graphics/py-gphoto2/distinfo
+++ b/graphics/py-gphoto2/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1657095211
-SHA256 (python-gphoto2/gphoto2-2.3.4.tar.gz) = 9846c5fdf3adc34714fdbc7b0e041c9a627fcaa6a5f07b3fd4a68b182ddee3f7
-SIZE (python-gphoto2/gphoto2-2.3.4.tar.gz) = 556634
+TIMESTAMP = 1693652752
+SHA256 (python-gphoto2/gphoto2-2.5.0.tar.gz) = 97d07a3c42067fcae4525600a4ecad5b6b3d3a181cc4c1d594381f411e599e80
+SIZE (python-gphoto2/gphoto2-2.5.0.tar.gz) = 497135
diff --git a/graphics/py-gphoto2/files/patch-setup.py b/graphics/py-gphoto2/files/patch-setup.py
new file mode 100644
index 000000000000..f6b4d43f38b2
--- /dev/null
+++ b/graphics/py-gphoto2/files/patch-setup.py
@@ -0,0 +1,22 @@
+--- setup.py.orig 2023-08-22 09:51:12 UTC
++++ setup.py
+@@ -25,7 +25,9 @@ import os
+ import subprocess
+ import sys
+
+-packages = ['gphoto2', 'gphoto2.examples']
++packages = ['gphoto2']
++if 'WITH_EXAMPLES' in os.environ:
++ packages.append('gphoto2.examples')
+ package_dir = {'gphoto2.examples': 'examples'}
+ package_data = {'gphoto2.examples': ['*']}
+ exclude_package_data = {'': ['*.c']}
+@@ -141,7 +143,7 @@ mod_src_dir = os.path.join('src', mod_src_dir)
+ package_dir['gphoto2'] = mod_src_dir
+
+ extra_compile_args = [
+- '-O3', '-Wno-unused-variable', '-Wno-unused-but-set-variable',
++ '-Wno-unused-variable', '-Wno-unused-but-set-variable',
+ '-Wno-unused-label', '-Wno-strict-prototypes']
+ if 'PYTHON_GPHOTO2_STRICT' in os.environ:
+ extra_compile_args.append('-Werror')