- Fix build with Python 3
PR: 214737 Reported by: freebsd@get-experience.com
This commit is contained in:
parent
6a2d3ed739
commit
b6480e7315
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=429155
@ -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
|
||||
.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.mk>
|
||||
.include <bsd.port.post.mk>
|
||||
|
Loading…
Reference in New Issue
Block a user