diff options
author | Alberto Villa <avilla@FreeBSD.org> | 2016-12-22 12:36:23 +0000 |
---|---|---|
committer | Alberto Villa <avilla@FreeBSD.org> | 2016-12-22 12:36:23 +0000 |
commit | b6480e731565f0efe40efaa3f27fd25864e0665b (patch) | |
tree | 15506fda1d0fb9f4fa88a26d20f7c6e28109775f /sysutils/qzeitgeist/Makefile | |
parent | 6a2d3ed73913ab6119ee2bdff7d0290e83386746 (diff) | |
download | ports-b6480e731565f0efe40efaa3f27fd25864e0665b.tar.gz ports-b6480e731565f0efe40efaa3f27fd25864e0665b.zip |
- Fix build with Python 3
PR: 214737
Reported by: freebsd@get-experience.com
Notes
Notes:
svn path=/head/; revision=429155
Diffstat (limited to 'sysutils/qzeitgeist/Makefile')
-rw-r--r-- | sysutils/qzeitgeist/Makefile | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/sysutils/qzeitgeist/Makefile b/sysutils/qzeitgeist/Makefile index 40e0cdda5ca5..1a9cb51488b9 100644 --- a/sysutils/qzeitgeist/Makefile +++ b/sysutils/qzeitgeist/Makefile @@ -22,7 +22,7 @@ BUILD_DEPENDS= rapper:textproc/raptor2 \ USES= cmake kde:4 python:build tar:bzip2 USE_KDE= automoc4 -USE_QT4= dbus declarative qtestlib \ +USE_QT4= corelib dbus declarative qtestlib \ moc_build qmake_build rcc_build uic_build USE_LDCONFIG= yes @@ -38,6 +38,8 @@ post-extract: data/ontology \ ${WRKSRC}/scripts +.include <bsd.port.pre.mk> + post-patch: ${REINPLACE_CMD} -e '/\.pc/ s|pkgconfig|../libdata/pkgconfig|' \ -e 's|share/${PORTNAME}/cmake|lib/cmake/${PORTNAME}|' \ @@ -46,8 +48,16 @@ post-patch: ${WRKSRC}/src/CMakeLists.txt \ ${WRKSRC}/QZeitgeistConfig.cmake.in ${REINPLACE_CMD} -e 's|zeitgeist.datamodel|datamodel|' \ + -e 's|env python|env ${PYTHON_CMD}|g' \ ${WRKSRC}/scripts/onto2cpp.py - ${REINPLACE_CMD} -e 's|env python|env ${PYTHON_CMD}|g' \ - ${WRKSRC}/scripts/onto2cpp.py - -.include <bsd.port.mk> +.if ${PYTHON_VERSION:M*3*} + ${REINPLACE_CMD} -E -e '/except/ s|,| as |' \ + -e 's|(print) +>> +(sys\.stderr) *, *(.*)|\1(\3, file=\2)|' \ + -e 's|(print) +(.*)|\1(\2)|' \ + -e '/gettext\.install/ s|\((.*),.*\)|(\1)|' \ + -e 's|execfile\((.*)\)|exec(compile(open(\1, "rb").read(), \1, "exec"))|' \ + -e '/iter(items|keys|values)\(\)/ s|iter||g' \ + ${WRKSRC}/scripts/*.py +.endif + +.include <bsd.port.post.mk> |