Changeset View
Changeset View
Standalone View
Standalone View
www/qt5-webengine/Makefile
Show All 10 Lines | |||||
# newer releases more easily. | # newer releases more easily. | ||||
# | # | ||||
# Also note that, due to the insane amount of patches this port needs, it tends | # Also note that, due to the insane amount of patches this port needs, it tends | ||||
# to lag behind the rest of the official Qt5 ones, which is why we set | # to lag behind the rest of the official Qt5 ones, which is why we set | ||||
# QT5_VERSION and DISTINFO_FILE here. | # QT5_VERSION and DISTINFO_FILE here. | ||||
PORTNAME= webengine | PORTNAME= webengine | ||||
DISTVERSION= ${QT5_VERSION} | DISTVERSION= ${QT5_VERSION} | ||||
PORTREVISION= 8 | PORTREVISION= 0 | ||||
CATEGORIES= www | CATEGORIES= www | ||||
PKGNAMEPREFIX= qt5- | PKGNAMEPREFIX= qt5- | ||||
MAINTAINER= kde@FreeBSD.org | MAINTAINER= kde@FreeBSD.org | ||||
COMMENT= Qt 5 library to render web content | COMMENT= Qt 5 library to render web content | ||||
BUILD_DEPENDS= bison:devel/bison \ | BUILD_DEPENDS= bison:devel/bison \ | ||||
yasm:devel/yasm \ | |||||
${LOCALBASE}/include/linux/input.h:devel/evdev-proto \ | ${LOCALBASE}/include/linux/input.h:devel/evdev-proto \ | ||||
${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat | ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat | ||||
LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \ | LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \ | ||||
libdbus-1.so:devel/dbus \ | libdbus-1.so:devel/dbus \ | ||||
libdouble-conversion.so:devel/double-conversion \ | libdouble-conversion.so:devel/double-conversion \ | ||||
libevent.so:devel/libevent \ | libevent.so:devel/libevent \ | ||||
libfontconfig.so:x11-fonts/fontconfig \ | libfontconfig.so:x11-fonts/fontconfig \ | ||||
libfreetype.so:print/freetype2 \ | libfreetype.so:print/freetype2 \ | ||||
libharfbuzz.so:print/harfbuzz \ | libharfbuzz.so:print/harfbuzz \ | ||||
libjsoncpp.so:devel/jsoncpp \ | libjsoncpp.so:devel/jsoncpp \ | ||||
liblcms2.so:graphics/lcms2 \ | liblcms2.so:graphics/lcms2 \ | ||||
libnspr4.so:devel/nspr \ | libnspr4.so:devel/nspr \ | ||||
libnss3.so:security/nss \ | libnss3.so:security/nss \ | ||||
libopenh264.so:multimedia/openh264 \ | |||||
libopus.so:audio/opus \ | libopus.so:audio/opus \ | ||||
libpci.so:devel/libpci \ | libpci.so:devel/libpci \ | ||||
libpng.so:graphics/png \ | libpng.so:graphics/png \ | ||||
libre2.so:devel/re2 \ | libre2.so:devel/re2 \ | ||||
libsnappy.so:archivers/snappy \ | libsnappy.so:archivers/snappy \ | ||||
libvpx.so:multimedia/libvpx \ | libvpx.so:multimedia/libvpx \ | ||||
libwebp.so:graphics/webp | libwebp.so:graphics/webp | ||||
DISTINFO_FILE= ${.CURDIR}/distinfo | DISTINFO_FILE= ${.CURDIR}/distinfo | ||||
QT5_VERSION= 5.15.2 | QT5_VERSION= 5.15.8 | ||||
# Add extra-patch-no-mempcpy-nasm only when there's no mempcpy() in base. | |||||
# Nested variable expansion avoids executing the test when not needed for | |||||
# expanding EXTRA_PATCHES. | |||||
# mempcpy was introduced in ee37f64cf875255338f917a9da76c643cf59786c | |||||
EXTRA_PATCHES+= ${"${:!${GREP} mempcpy ${CROSS_SYSROOT}/usr/include/string.h \ | |||||
|| ${TRUE}!}" == "":?${PATCHDIR}/extra-patch-no-mempcpy-nasm:} | |||||
WRKSRC= ${WRKDIR}/qtwebengine-everywhere-src-${DISTVERSION} | |||||
OPTIONS_SINGLE= AUDIO | OPTIONS_SINGLE= AUDIO | ||||
OPTIONS_SINGLE_AUDIO= ALSA PULSEAUDIO SNDIO | OPTIONS_SINGLE_AUDIO= ALSA PULSEAUDIO SNDIO | ||||
OPTIONS_DEFAULT= ALSA | OPTIONS_DEFAULT= ALSA | ||||
AUDIO_DESC= Audio backend | AUDIO_DESC= Audio backend | ||||
# Need the alsa plugins to get sound at runtime, otherwise messages | # Need the alsa plugins to get sound at runtime, otherwise messages | ||||
# that the pcm_oss plugin can't be opened. | # that the pcm_oss plugin can't be opened. | ||||
ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib | ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib | ||||
ALSA_RUN_DEPENDS= alsa-plugins>=0:audio/alsa-plugins | ALSA_RUN_DEPENDS= alsa-plugins>=0:audio/alsa-plugins | ||||
ALSA_VARS= QMAKE_CONFIGURE_ARGS+=-alsa | ALSA_VARS= QMAKE_CONFIGURE_ARGS+=-alsa | ||||
ALSA_VARS_OFF= QMAKE_CONFIGURE_ARGS+=-no-alsa | ALSA_VARS_OFF= QMAKE_CONFIGURE_ARGS+=-no-alsa | ||||
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio | PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio | ||||
PULSEAUDIO_VARS= QMAKE_CONFIGURE_ARGS+=-pulseaudio | PULSEAUDIO_VARS= QMAKE_CONFIGURE_ARGS+=-pulseaudio | ||||
PULSEAUDIO_VARS_OFF= QMAKE_CONFIGURE_ARGS+=-no-pulseaudio | PULSEAUDIO_VARS_OFF= QMAKE_CONFIGURE_ARGS+=-no-pulseaudio | ||||
SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio | SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio | ||||
SNDIO_VARS= QMAKE_CONFIGURE_ARGS+=-sndio | SNDIO_VARS= QMAKE_CONFIGURE_ARGS+=-sndio | ||||
SNDIO_VARS_OFF= QMAKE_CONFIGURE_ARGS+=-no-sndio | SNDIO_VARS_OFF= QMAKE_CONFIGURE_ARGS+=-no-sndio | ||||
# We pass `norecursive' to USES=qmake because src/plugins/plugins.pro checks | # We pass `norecursive' to USES=qmake because src/plugins/plugins.pro checks | ||||
# whether webenginewidgets is available, which fails when qmake processes all | # whether webenginewidgets is available, which fails when qmake processes all | ||||
# .pro files at once. | # .pro files at once. | ||||
USES= gl gnome gperf jpeg ninja:build pkgconfig python:2.7,build \ | USES= gl gnome gperf jpeg minizip ninja:build nodejs:build,lts \ | ||||
qmake:norecursive,outsource qt-dist:5,webengine shebangfix xorg | pkgconfig python:2.7,build qmake:norecursive,outsource \ | ||||
qt-dist:5,webengine shebangfix xorg | |||||
USE_GL= gl | USE_GL= gl | ||||
USE_GNOME= glib20 libxml2 libxslt | USE_GNOME= glib20 libxml2 libxslt | ||||
USE_QT= core declarative gui location network printsupport \ | USE_QT= core declarative gui location network printsupport \ | ||||
webchannel widgets \ | webchannel widgets \ | ||||
buildtools:build designer:build qmake:build | buildtools:build designer:build qmake:build | ||||
USE_XORG= x11 xcb xcomposite xcursor xdamage xext xfixes xi xorgproto \ | USE_XORG= x11 xcb xcomposite xcursor xdamage xext xfixes xi xkbfile \ | ||||
xrandr xrender xscrnsaver xtst | xorgproto xrandr xrender xscrnsaver xtst | ||||
QMAKE_CONFIGURE_ARGS= -proprietary-codecs -system-ffmpeg | QMAKE_CONFIGURE_ARGS= -proprietary-codecs -system-ffmpeg | ||||
# We could just set it to an empty string as well. "all" does not account for | # We could just set it to an empty string as well. "all" does not account for | ||||
# dependencies correctly in the generated Makefiles, use the right target here. | # dependencies correctly in the generated Makefiles, use the right target here. | ||||
ALL_TARGET= first | ALL_TARGET= first | ||||
# We need ar(1) from ports because the Chromium code uses the @file syntax. | # We need ar(1) from ports because the Chromium code uses the @file syntax. | ||||
Show All 36 Lines | post-extract-SNDIO-on: | ||||
@${CP} ${FILESDIR}/sndio_*put.* \ | @${CP} ${FILESDIR}/sndio_*put.* \ | ||||
${WRKSRC}/src/3rdparty/chromium/media/audio/sndio | ${WRKSRC}/src/3rdparty/chromium/media/audio/sndio | ||||
@${CP} ${FILESDIR}/audio_manager_openbsd.* \ | @${CP} ${FILESDIR}/audio_manager_openbsd.* \ | ||||
${WRKSRC}/src/3rdparty/chromium/media/audio/openbsd | ${WRKSRC}/src/3rdparty/chromium/media/audio/openbsd | ||||
post-patch: | post-patch: | ||||
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ | @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ | ||||
${WRKSRC}/src/3rdparty/chromium/base/linux_util.cc \ | ${WRKSRC}/src/3rdparty/chromium/base/linux_util.cc \ | ||||
${WRKSRC}/src/3rdparty/chromium/base/test/BUILD.gn \ | |||||
${WRKSRC}/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni \ | ${WRKSRC}/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni \ | ||||
${WRKSRC}/src/3rdparty/chromium/chrome/common/chrome_paths.cc \ | ${WRKSRC}/src/3rdparty/chromium/chrome/common/chrome_paths.cc \ | ||||
${WRKSRC}/src/3rdparty/chromium/third_party/pdfium/core/fxge/fx_ge_linux.cpp \ | ${WRKSRC}/src/3rdparty/chromium/third_party/pdfium/core/fxge/fx_ge_linux.cpp \ | ||||
${WRKSRC}/src/3rdparty/chromium/third_party/pdfium/xfa/fgas/font/cfx_fontsourceenum_file.cpp \ | |||||
${WRKSRC}/src/3rdparty/gn/build/gen.py | ${WRKSRC}/src/3rdparty/gn/build/gen.py | ||||
.if ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} || ${ARCH} == sparc64 | .if ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} || ${ARCH} == sparc64 | ||||
@${REINPLACE_CMD} -e 's/icudtl.dat/icudtb.dat/' \ | @${REINPLACE_CMD} -e 's/icudtl.dat/icudtb.dat/' \ | ||||
${WRKSRC}/src/core/core_module.pro | ${WRKSRC}/src/core/core_module.pro | ||||
.endif | .endif | ||||
pre-configure: | pre-configure: | ||||
# Link in ${PYTHON_CMD} to ${CONFIGURE_WRKSRC}/bin -- the scripts hardcode 'python' | # Link in ${PYTHON_CMD} to ${CONFIGURE_WRKSRC}/bin -- the scripts hardcode 'python' | ||||
# in too many places to reasonably patch. So just link in ${PYTHON_CMD} to work around | # in too many places to reasonably patch. So just link in ${PYTHON_CMD} to work around | ||||
# $LOCALBASE/bin/python being python3 if the default versions is set to 3.x. | # $LOCALBASE/bin/python being python3 if the default versions is set to 3.x. | ||||
${MKDIR} ${CONFIGURE_WRKSRC}/bin && ${LN} -s ${PYTHON_CMD} ${CONFIGURE_WRKSRC}/bin/python | ${MKDIR} ${CONFIGURE_WRKSRC}/bin && ${LN} -s ${PYTHON_CMD} ${CONFIGURE_WRKSRC}/bin/python | ||||
# Unbundle a few dependencies. | # Unbundle a few dependencies. | ||||
${PYTHON_CMD} ${WRKSRC}/src/3rdparty/chromium/build/linux/unbundle/replace_gn_files.py \ | cd ${WRKSRC}/src/3rdparty/chromium && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \ | ||||
--system-libraries libwebp libxml libxslt yasm | ./build/linux/unbundle/replace_gn_files.py --system-libraries\ | ||||
fontconfig freetype harfbuzz-ng libdrm libevent libpng libwebp libxml libxslt openh264 opus || ${FALSE} | |||||
# Rerun syncqt.pl -- otherwise the resulting package misses some forwarding headers. | # Rerun syncqt.pl -- otherwise the resulting package misses some forwarding headers. | ||||
cd ${WRKSRC} && ${QT_BINDIR}/syncqt.pl -version ${QT5_VERSION} | cd ${WRKSRC} && ${QT_BINDIR}/syncqt.pl -version ${QT5_VERSION} | ||||
.include <bsd.port.post.mk> | .include <bsd.port.post.mk> |