aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto Villa <avilla@FreeBSD.org>2016-12-22 12:37:43 +0000
committerAlberto Villa <avilla@FreeBSD.org>2016-12-22 12:37:43 +0000
commita8181ed3ed8da4768446f4d6d5576c897469b351 (patch)
treee02611fa642c146f406de2738eb01b989a0c1019
parent588c04542348d0d596b3776ea61daaacf6f6aa90 (diff)
downloadports-a8181ed3ed8da4768446f4d6d5576c897469b351.tar.gz
ports-a8181ed3ed8da4768446f4d6d5576c897469b351.zip
MFH: r429155
- Fix build with Python 3 PR: 214737 Reported by: freebsd@get-experience.com Approved by: ports-secteam (blanket)
Notes
Notes: svn path=/branches/2016Q4/; revision=429156
-rw-r--r--sysutils/qzeitgeist/Makefile20
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>