Skip to content

Commit

Permalink
graphics/py-gphoto2: update the port to version 2.5.0
Browse files Browse the repository at this point in the history
Remove no longer useful DOCS option, propagate EXAMPLES
down to `setup.py', garbage-collect `post-patch' target.

Reported by:	portscout
  • Loading branch information
Alexey Dokuchaev authored and Alexey Dokuchaev committed Sep 27, 2023
1 parent 7474699 commit 0b601c7
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 10 deletions.
10 changes: 3 additions & 7 deletions graphics/py-gphoto2/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PORTNAME= gphoto2
PORTVERSION= 2.3.4
PORTVERSION= 2.5.0
CATEGORIES= graphics python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
Expand All @@ -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>
6 changes: 3 additions & 3 deletions graphics/py-gphoto2/distinfo
Original file line number Diff line number Diff line change
@@ -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
22 changes: 22 additions & 0 deletions graphics/py-gphoto2/files/patch-setup.py
Original file line number Diff line number Diff line change
@@ -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')

0 comments on commit 0b601c7

Please sign in to comment.