Index: head/www/qt5-webengine/Makefile =================================================================== --- head/www/qt5-webengine/Makefile (revision 468396) +++ head/www/qt5-webengine/Makefile (revision 468397) @@ -1,123 +1,123 @@ # $FreeBSD$ # QtWebEngine itself is a very thin layer of Qt code on top of a large part of # Chromium (everything up to the content/ layer). As such, most of the work in # this port revolves around taming Chromium and getting it to build on FreeBSD. # While it does build at the moment, there are several items that should be # investigated or improved: # - We are using several stub files, especially in Chromium's base/ and net/ # layers. We should look at implementing the missing bits instead. # - We are currently not using any sandboxing mechanism. # - We are disabling support for features such as WebRTC and printing. We need # to see what it would take to properly support them. # - We need to see if more "use_system_" flags can be passed. # - The process of porting QtWebEngine needs to be documented so we can move to # newer releases more easily. PORTNAME= webengine DISTVERSION= ${QT5_VERSION} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www PKGNAMEPREFIX= qt5- MAINTAINER= kde@FreeBSD.org COMMENT= Qt 5 library to render web content BUILD_DEPENDS= bison:devel/bison \ ninja:devel/ninja \ yasm:devel/yasm \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \ libdbus-1.so:devel/dbus \ libevent.so:devel/libevent \ libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libjsoncpp.so:devel/jsoncpp \ libnspr4.so:devel/nspr \ libnss3.so:security/nss \ libopus.so:audio/opus \ libpci.so:devel/libpci \ libpng.so:graphics/png \ libre2.so:devel/re2 \ libsnappy.so:archivers/snappy \ libsrtp.so:net/libsrtp \ libwebp.so:graphics/webp OPTIONS_SINGLE= AUDIO OPTIONS_SINGLE_AUDIO= ALSA PULSEAUDIO OPTIONS_DEFAULT= ALSA AUDIO_DESC= Audio backend ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_QMAKE_ON= QT_CONFIG+=alsa PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_QMAKE_ON= QT_CONFIG+=pulseaudio # We pass `norecursive' to USES=qmake because src/plugins/plugins.pro checks # whether webenginewidgets is available, which fails when qmake processes all # .pro files at once. USES= gperf jpeg python:2.7,build pkgconfig \ qmake:norecursive,outsource shebangfix USE_GNOME= glib20 libxml2 libxslt USE_QT5= core designer gui location network qml quick webchannel \ widgets buildtools_build qmake_build USE_XORG= scrnsaverproto x11 xcb xcomposite xcursor xext xi xproto \ xrandr xrender xscrnsaver xtst USE_LDCONFIG= ${QT_LIBDIR} QT_DIST= ${PORTNAME} QMAKE_CONFIGURE_ARGS= -no-printing-and-pdf -proprietary-codecs -system-ffmpeg # 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. ALL_TARGET= first .include .if ${OPSYS} == FreeBSD && ${OSVERSION} < 1100000 EXTRA_PATCHES+= ${FILESDIR}/extra-patch-10 BUILD_DEPENDS+= clang50:devel/llvm50 CC= clang50 CXX= clang++50 .endif # ${OPSYS} == FreeBSD && ${OSVERSION} < 1100000 # We need ar(1) from ports because the Chromium code uses the @file syntax. # We then need to ensure ld(1) from ports is used because of the archives ar(1) # generated. USE_BINUTILS= yes CC+= "-B${LOCALBASE}/bin" CXX+= "-B${LOCALBASE}/bin" # The build system reads the environment variable $NINJA_PATH to decide whether # to boostrap ninja or not (and also to invoke it afterwards). CC and CXX are # read by some Chromium code to determine which compiler to invoke when running # some configuration tests. # Since we use USES=qmake:norecursive, we also need to pass some variables to # MAKE_ENV because part of the configuration process happens during the build. CONFIGURE_ENV+= NINJAFLAGS="-j${MAKE_JOBS_NUMBER}" \ NINJA_PATH="${LOCALBASE}/bin/ninja" \ PATH=${CONFIGURE_WRKSRC}/bin:${LOCALBASE}/bin:${PATH} MAKE_ENV+= CC="${CC}" CXX="${CXX}" \ C_INCLUDE_PATH=${LOCALBASE}/include \ CPLUS_INCLUDE_PATH=${LOCALBASE}/include \ ${CONFIGURE_ENV} post-extract: # Install FreeBSD's freebsd.pri file. ${CP} ${FILESDIR}/freebsd.pri ${WRKSRC}/src/core/config/freebsd.pri pre-configure: # 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 # $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 # Unbundle a few dependencies. ${PYTHON_CMD} ${WRKSRC}/src/3rdparty/chromium/build/linux/unbundle/replace_gn_files.py \ --system-libraries libwebp libxml libxslt yasm .include Index: head/www/qt5-webengine/files/patch-archgit_qtwebengine-ffmpeg4 =================================================================== --- head/www/qt5-webengine/files/patch-archgit_qtwebengine-ffmpeg4 (nonexistent) +++ head/www/qt5-webengine/files/patch-archgit_qtwebengine-ffmpeg4 (revision 468397) @@ -0,0 +1,86 @@ +Fix build with ffmpeg-4.x + +Obtained from: +https://git.archlinux.org/svntogit/packages.git/tree/trunk/qtwebengine-ffmpeg4.patch?h=packages/qt5-webengine&id=421103a8798335f7788498e56b5eef3f33ecba26 + +--- src/3rdparty/chromium/media/base/decoder_buffer.h.orig 2018-01-15 11:39:43 UTC ++++ src/3rdparty/chromium/media/base/decoder_buffer.h +@@ -37,7 +37,7 @@ class MEDIA_EXPORT DecoderBuffer + : public base::RefCountedThreadSafe { + public: + enum { +- kPaddingSize = 32, ++ kPaddingSize = 64, + #if defined(ARCH_CPU_ARM_FAMILY) + kAlignmentSize = 16 + #else +--- src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc.orig 2018-01-15 11:39:43 UTC ++++ src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc +@@ -30,10 +30,10 @@ EncryptionScheme GetEncryptionScheme(const AVStream* s + + } // namespace + +-// Why FF_INPUT_BUFFER_PADDING_SIZE? FFmpeg assumes all input buffers are ++// Why AV_INPUT_BUFFER_PADDING_SIZE? FFmpeg assumes all input buffers are + // padded. Check here to ensure FFmpeg only receives data padded to its + // specifications. +-static_assert(DecoderBuffer::kPaddingSize >= FF_INPUT_BUFFER_PADDING_SIZE, ++static_assert(DecoderBuffer::kPaddingSize >= AV_INPUT_BUFFER_PADDING_SIZE, + "DecoderBuffer padding size does not fit ffmpeg requirement"); + + // Alignment requirement by FFmpeg for input and output buffers. This need to +@@ -429,11 +429,11 @@ void AudioDecoderConfigToAVCodecContext(const AudioDec + } else { + codec_context->extradata_size = config.extra_data().size(); + codec_context->extradata = reinterpret_cast( +- av_malloc(config.extra_data().size() + FF_INPUT_BUFFER_PADDING_SIZE)); ++ av_malloc(config.extra_data().size() + AV_INPUT_BUFFER_PADDING_SIZE)); + memcpy(codec_context->extradata, &config.extra_data()[0], + config.extra_data().size()); + memset(codec_context->extradata + config.extra_data().size(), '\0', +- FF_INPUT_BUFFER_PADDING_SIZE); ++ AV_INPUT_BUFFER_PADDING_SIZE); + } + } + +@@ -561,11 +561,11 @@ void VideoDecoderConfigToAVCodecContext( + } else { + codec_context->extradata_size = config.extra_data().size(); + codec_context->extradata = reinterpret_cast( +- av_malloc(config.extra_data().size() + FF_INPUT_BUFFER_PADDING_SIZE)); ++ av_malloc(config.extra_data().size() + AV_INPUT_BUFFER_PADDING_SIZE)); + memcpy(codec_context->extradata, &config.extra_data()[0], + config.extra_data().size()); + memset(codec_context->extradata + config.extra_data().size(), '\0', +- FF_INPUT_BUFFER_PADDING_SIZE); ++ AV_INPUT_BUFFER_PADDING_SIZE); + } + } + +--- src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc.orig 2018-01-15 11:39:43 UTC ++++ src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc +@@ -53,7 +53,7 @@ static void ReleaseAudioBufferImpl(void* opaque, uint8 + // AVCodecContext.opaque to get the object reference in order to call + // GetAudioBuffer() to do the actual allocation. + static int GetAudioBuffer(struct AVCodecContext* s, AVFrame* frame, int flags) { +- DCHECK(s->codec->capabilities & CODEC_CAP_DR1); ++ DCHECK(s->codec->capabilities & AV_CODEC_CAP_DR1); + DCHECK_EQ(s->codec_type, AVMEDIA_TYPE_AUDIO); + + // Since this routine is called by FFmpeg when a buffer is required for audio +--- src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc.orig 2018-01-15 11:39:43 UTC ++++ src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc +@@ -415,12 +415,11 @@ bool FFmpegVideoDecoder::ConfigureDecoder(bool low_del + codec_context_->thread_type = + FF_THREAD_SLICE | (low_delay ? 0 : FF_THREAD_FRAME); + codec_context_->opaque = this; +- codec_context_->flags |= CODEC_FLAG_EMU_EDGE; + codec_context_->get_buffer2 = GetVideoBufferImpl; + codec_context_->refcounted_frames = 1; + + if (decode_nalus_) +- codec_context_->flags2 |= CODEC_FLAG2_CHUNKS; ++ codec_context_->flags2 |= AV_CODEC_FLAG2_CHUNKS; + + AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); + if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) { Property changes on: head/www/qt5-webengine/files/patch-archgit_qtwebengine-ffmpeg4 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property