diff --git a/graphics/py-gphoto2/Makefile b/graphics/py-gphoto2/Makefile index 9112e6fce79c..b643690186c9 100644 --- a/graphics/py-gphoto2/Makefile +++ b/graphics/py-gphoto2/Makefile @@ -14,11 +14,9 @@ COMMENT= Python bindings for libgphoto2 LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/LICENSE.txt -BROKEN_powerpc64= fails to compile: unrecognized command line option "-Wno-unused-but-set-variable" - LIB_DEPENDS= libgphoto2.so:graphics/libgphoto2 -USES= pkgconfig python shebangfix +USES= compiler pkgconfig python shebangfix USE_PYTHON= autoplist concurrent distutils SHEBANG_FILES= examples/*.py @@ -30,4 +28,10 @@ post-patch: -e 's|share/python-gphoto2|${DOCSDIR:S,${PREFIX}/,,}|' \ ${WRKSRC}/setup.py -.include +.include + +.if ${CHOSEN_COMPILER_TYPE} == gcc +EXTRA_PATCHES= ${FILESDIR}/extra-patch-setup.py +.endif + +.include diff --git a/graphics/py-gphoto2/files/extra-patch-setup.py b/graphics/py-gphoto2/files/extra-patch-setup.py new file mode 100644 index 000000000000..8ee48823122a --- /dev/null +++ b/graphics/py-gphoto2/files/extra-patch-setup.py @@ -0,0 +1,11 @@ +--- setup.py.orig 2018-01-02 11:44:51 UTC ++++ setup.py +@@ -83,7 +83,7 @@ mod_src_dir = os.path.join( + 'src', mod_src_dir + '-gp' + '.'.join(map(str, best_match))) + + extra_compile_args = [ +- '-O3', '-Wno-unused-variable', '-Wno-unused-but-set-variable', ++ '-O3', '-Wno-unused-variable', + '-Wno-unused-label', '-Wno-strict-prototypes', + '-DGPHOTO2_VERSION=' + '0x{:02x}{:02x}{:02x}'.format(*gphoto2_version)] + if 'PYTHON_GPHOTO2_STRICT' in os.environ: