summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCian Mc Govern2020-01-05 00:34:10 +0000
committerCian Mc Govern2020-01-05 00:34:10 +0000
commit1bbd66304593a363a726859b874d80963a93ab1b (patch)
tree742b25a620dfe3bb62c6ce94906918777e788b2d
downloadaur-1bbd66304593a363a726859b874d80963a93ab1b.tar.gz
Initial commit
-rw-r--r--.SRCINFO48
-rw-r--r--PKGBUILD70
-rw-r--r--QTBUG-64925.diff13
-rw-r--r--QTBUG-76963.diff13
-rw-r--r--QTBUG-77037.diff65
-rw-r--r--WEBRTC-7857.diff12
-rw-r--r--fix-building-with-system-icu.diff11
-rw-r--r--qtwebengine-ffmpeg4.patch83
8 files changed, 315 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..d5a7b972f05
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,48 @@
+pkgbase = qt5-webengine-595
+ pkgdesc = Provides support for web applications using the Chromium browser project (v5.9.5)
+ pkgver = 5.9.5
+ pkgrel = 1
+ url = http://qt-project.org/
+ arch = i686
+ arch = x86_64
+ license = LGPL3
+ license = LGPL2.1
+ license = BSD
+ makedepends = python2
+ makedepends = git
+ makedepends = gperf
+ makedepends = jsoncpp
+ makedepends = ninja
+ depends = qt5-webchannel-595
+ depends = qt5-location-595
+ depends = libxcomposite
+ depends = libxrandr
+ depends = pciutils
+ depends = libxss
+ depends = libvpx
+ depends = libevent
+ depends = libsrtp
+ depends = snappy
+ depends = nss
+ depends = protobuf
+ depends = libxslt
+ depends = libxdamage
+ depends = minizip
+ depends = ffmpeg
+ source = http://download.qt.io/official_releases/qt/5.9/5.9.5/submodules/qtwebengine-opensource-src-5.9.5.tar.xz
+ source = QTBUG-76963.diff
+ source = QTBUG-64925.diff
+ source = QTBUG-77037.diff
+ source = WEBRTC-7857.diff
+ source = qtwebengine-ffmpeg4.patch
+ source = fix-building-with-system-icu.diff
+ sha256sums = 70d26db4e7944291c5f843b875916fb95ceec0f0a8fea3daea8004990199fc07
+ sha256sums = ae6b783f6dc8a6b6b97e44101a685aeca858bd5948e083ce442821b5d8db8c74
+ sha256sums = 3510f53302c6147882f43855da448b4f08cbdb10297b91474849ddbd359d5e9d
+ sha256sums = 5f1b988568f57bff1b64341d0a447d1e43189215a7c0689540f45bedcf969119
+ sha256sums = ddd8d8b64fb2f81bbc5acd3d77cc6aeb79df44db451c3fed94f0e05b73c7b078
+ sha256sums = 0be352f23946a41cddae941ecedfe1bceb62b23e2a1225dd5469e77e251ccf42
+ sha256sums = cef22eeef1dedd484dec4cf94bb0aed2881ea7b2ee6d563e6940f4362e26604f
+
+pkgname = qt5-webengine-595
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..da01566f6c1
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,70 @@
+# Maintainer: Cian McGovern <cian@cianmcgovern.com>
+# Contributor: Felix Yan <felixonmars@archlinux.org>
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=qt5-webengine-595
+_qtver=5.9.5
+pkgver=${_qtver/-/}
+pkgrel=1
+arch=('i686' 'x86_64')
+url='http://qt-project.org/'
+license=('LGPL3' 'LGPL2.1' 'BSD')
+pkgdesc='Provides support for web applications using the Chromium browser project (v5.9.5)'
+depends=('qt5-webchannel-595' 'qt5-location-595' 'libxcomposite' 'libxrandr' 'pciutils' 'libxss' 'libvpx'
+ 'libevent' 'libsrtp' 'snappy' 'nss' 'protobuf' 'libxslt' 'libxdamage' 'minizip' 'ffmpeg')
+ # namcap note: libxdamage is needed for nvidia users
+makedepends=('python2' 'git' 'gperf' 'jsoncpp' 'ninja')
+_pkgfqn="qtwebengine-opensource-src-${_qtver}"
+source=("http://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz"
+ "QTBUG-76963.diff"
+ "QTBUG-64925.diff"
+ "QTBUG-77037.diff"
+ "WEBRTC-7857.diff"
+ "qtwebengine-ffmpeg4.patch"
+ "fix-building-with-system-icu.diff")
+sha256sums=('70d26db4e7944291c5f843b875916fb95ceec0f0a8fea3daea8004990199fc07'
+ 'ae6b783f6dc8a6b6b97e44101a685aeca858bd5948e083ce442821b5d8db8c74'
+ '3510f53302c6147882f43855da448b4f08cbdb10297b91474849ddbd359d5e9d'
+ '5f1b988568f57bff1b64341d0a447d1e43189215a7c0689540f45bedcf969119'
+ 'ddd8d8b64fb2f81bbc5acd3d77cc6aeb79df44db451c3fed94f0e05b73c7b078'
+ '0be352f23946a41cddae941ecedfe1bceb62b23e2a1225dd5469e77e251ccf42'
+ 'cef22eeef1dedd484dec4cf94bb0aed2881ea7b2ee6d563e6940f4362e26604f')
+
+prepare() {
+ mkdir -p build
+
+ # Hack to force using python2
+ mkdir -p bin
+ ln -s /usr/bin/python2 bin/python
+
+ cd ${_pkgfqn}
+
+ patch -p1 -i ../QTBUG-76963.diff
+ patch -p1 -i ../QTBUG-64925.diff
+ patch -p1 -i ../QTBUG-77037.diff
+ patch -p1 -i ../WEBRTC-7857.diff
+ patch -p1 -i ../qtwebengine-ffmpeg4.patch
+ patch -p1 -i ../fix-building-with-system-icu.diff
+}
+
+build() {
+ QT_BASE_DIR=/opt/qt595
+ export QTDIR=$QT_BASE_DIR
+ export PATH=$QT_BASE_DIR/bin:$PATH
+ cd build
+
+ export PATH="$srcdir/bin:$PATH"
+ qmake CONFIG+="proprietary-codecs" WEBENGINE_CONFIG+="use_proprietary_codecs use_system_ffmpeg use_system_icu" ../${_pkgfqn}
+ make
+}
+
+package() {
+ cd build
+ make INSTALL_ROOT="$pkgdir" install
+
+ # Drop QMAKE_PRL_BUILD_DIR because reference the build dir
+ find "$pkgdir/opt/qt595/lib" -type f -name '*.prl' \
+ -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
+
+ install -Dm644 "$srcdir"/${_pkgfqn}/src/3rdparty/chromium/LICENSE "$pkgdir"/opt/qt595/share/licenses/${pkgname}/LICENSE.chromium
+}
diff --git a/QTBUG-64925.diff b/QTBUG-64925.diff
new file mode 100644
index 00000000000..8ddd98c8b87
--- /dev/null
+++ b/QTBUG-64925.diff
@@ -0,0 +1,13 @@
+diff --git a/chromium/components/url_formatter/url_formatter.cc b/chromium/components/url_formatter/url_formatter.cc
+index 1b50ada2085..ca252040a30 100644
+--- a/src/3rdparty/chromium/components/url_formatter/url_formatter.cc
++++ b/src/3rdparty/chromium/components/url_formatter/url_formatter.cc
+@@ -485,7 +485,7 @@ void IDNSpoofChecker::SetAllowedUnicodeSet(UErrorCode* status) {
+ // are added to the allowed set. The list has to be updated when a new
+ // version of Unicode is released. The current version is 9.0.0 and ICU 60
+ // will have Unicode 10.0 data.
+-#if U_ICU_VERSION_MAJOR_NUM < 60
++#if U_ICU_VERSION_MAJOR_NUM < 60 || defined(TOOLKIT_QT)
+ const icu::UnicodeSet aspirational_scripts(
+ icu::UnicodeString(
+ // Unified Canadian Syllabics \ No newline at end of file
diff --git a/QTBUG-76963.diff b/QTBUG-76963.diff
new file mode 100644
index 00000000000..ede6cacc7a8
--- /dev/null
+++ b/QTBUG-76963.diff
@@ -0,0 +1,13 @@
+--- a/src/3rdparty/chromium/third_party/webrtc/base/physicalsocketserver.cc
++++ b/src/3rdparty/chromium/third_party/webrtc/base/physicalsocketserver.cc
+@@ -52,6 +52,10 @@
+ #include "rtc_base/timeutils.h"
+ #include "rtc_base/win32socketinit.h"
+
++#if defined(WEBRTC_LINUX)
++#include <linux/sockios.h>
++#endif
++
+ #if defined(WEBRTC_WIN)
+ #define LAST_SYSTEM_ERROR (::GetLastError())
+ #elif defined(__native_client__) && __native_client__ \ No newline at end of file
diff --git a/QTBUG-77037.diff b/QTBUG-77037.diff
new file mode 100644
index 00000000000..60c29b02a42
--- /dev/null
+++ b/QTBUG-77037.diff
@@ -0,0 +1,65 @@
+--- a/src/3rdparty/chromium/media/audio/pulse/pulse.sigs
++++ b/src/3rdparty/chromium/media/audio/pulse/pulse.sigs
+@@ -22,12 +22,12 @@ void pa_context_disconnect(pa_context* c);
+ pa_operation* pa_context_get_server_info(pa_context* c, pa_server_info_cb_t cb, void* userdata);
+ pa_operation* pa_context_get_source_info_by_index(pa_context* c, uint32_t idx, pa_source_info_cb_t cb, void* userdata);
+ pa_operation* pa_context_get_source_info_list(pa_context* c, pa_source_info_cb_t cb, void* userdata);
+-pa_operation* pa_context_get_sink_info_list(pa_context* c, pa_sink_info_cb_t cb, void* userdata);
+-pa_context_state_t pa_context_get_state(pa_context* c);
++pa_operation* pa_context_get_sink_info_list(pa_context* c, pa_sink_info_cb_t cb, void* userdata);
++pa_context_state_t pa_context_get_state(const_pa_context_ptr c);
+ pa_context* pa_context_new(pa_mainloop_api* mainloop, const char* name);
+ pa_operation* pa_context_set_source_volume_by_index(pa_context* c, uint32_t idx, const pa_cvolume* volume, pa_context_success_cb_t cb, void* userdata);
+ void pa_context_set_state_callback(pa_context* c, pa_context_notify_cb_t cb, void* userdata);
+-pa_operation_state_t pa_operation_get_state(pa_operation* o);
++pa_operation_state_t pa_operation_get_state(const_pa_operation_ptr o);
+ void pa_context_unref(pa_context* c);
+ void pa_operation_unref(pa_operation* o);
+ int pa_stream_begin_write(pa_stream* p, void** data, size_t* nbytes);
+@@ -37,21 +37,23 @@ pa_operation* pa_stream_cork(pa_stream* s, int b, pa_stream_success_cb_t cb, voi
+ int pa_stream_disconnect(pa_stream* s);
+ int pa_stream_drop(pa_stream *p);
+ pa_operation* pa_stream_flush(pa_stream* s, pa_stream_success_cb_t cb, void* userdata);
+-uint32_t pa_stream_get_device_index(pa_stream* s);
++uint32_t pa_stream_get_device_index(const_pa_stream_ptr s);
+ int pa_stream_get_latency(pa_stream* s, pa_usec_t* r_usec, int* negative);
+-pa_stream_state_t pa_stream_get_state(pa_stream* p);
++pa_stream_state_t pa_stream_get_state(const_pa_stream_ptr p);
+ pa_stream* pa_stream_new(pa_context* c, const char* name, const pa_sample_spec* ss, const pa_channel_map * map);
+ pa_stream* pa_stream_new_with_proplist(pa_context* c, const char* name, const pa_sample_spec* ss, const pa_channel_map* map, pa_proplist* p);
+ pa_proplist* pa_proplist_new(void);
++int pa_proplist_contains(const_pa_proplist_ptr p, const char* key);
+ void pa_proplist_free(pa_proplist* p);
++const char* pa_proplist_gets(const_pa_proplist_ptr p, const char* key);
+ int pa_proplist_sets(pa_proplist* p, const char* key, const char* value);
+-size_t pa_stream_readable_size(pa_stream *p);
++size_t pa_stream_readable_size(const_pa_stream_ptr p);
+ int pa_stream_peek(pa_stream* p, const void** data, size_t* nbytes);
+ void pa_stream_set_read_callback(pa_stream* p, pa_stream_request_cb_t cb, void* userdata);
+ void pa_stream_set_state_callback(pa_stream* s, pa_stream_notify_cb_t cb, void* userdata);
+ int pa_stream_write(pa_stream* p, const void* data, size_t nbytes, pa_free_cb_t free_cb, int64_t offset, pa_seek_mode_t seek);
+ void pa_stream_set_write_callback(pa_stream *p, pa_stream_request_cb_t cb, void *userdata);
+ void pa_stream_unref(pa_stream* s);
+-int pa_context_errno(pa_context *c);
++int pa_context_errno(const_pa_context_ptr c);
+ const char* pa_strerror(int error);
+ pa_cvolume* pa_cvolume_set(pa_cvolume* a, unsigned channels, pa_volume_t v);
+
+--- a/src/3rdparty/chromium/media/audio/pulse/pulse_stub_header.fragment
++++ b/src/3rdparty/chromium/media/audio/pulse/pulse_stub_header.fragment
+@@ -5,4 +5,15 @@ extern "C" {
+
+ #include <pulse/pulseaudio.h>
+
++#if PA_MAJOR > 12
++typedef const pa_context* const_pa_context_ptr;
++typedef const pa_operation* const_pa_operation_ptr;
++typedef const pa_proplist* const_pa_proplist_ptr;
++typedef const pa_stream* const_pa_stream_ptr;
++#else
++typedef pa_context* const_pa_context_ptr;
++typedef pa_operation* const_pa_operation_ptr;
++typedef pa_proplist* const_pa_proplist_ptr;
++typedef pa_stream* const_pa_stream_ptr;
++#endif
+ }
diff --git a/WEBRTC-7857.diff b/WEBRTC-7857.diff
new file mode 100644
index 00000000000..b1f5f0459dd
--- /dev/null
+++ b/WEBRTC-7857.diff
@@ -0,0 +1,12 @@
+--- a/src/3rdparty/chromium/third_party/webrtc/common_audio/vad/vad_core.c
++++ b/src/3rdparty/chromium/third_party/webrtc/common_audio/vad/vad_core.c
+@@ -115,8 +115,8 @@ static int32_t WeightedAverage(int16_t* data, int16_t offset,
+ // undefined behavior, so not a good idea; this just makes UBSan ignore the
+ // violation, so that our old code can continue to do what it's always been
+ // doing.)
+-static inline int32_t OverflowingMulS16ByS32ToS32(int16_t a, int32_t b)
+- RTC_NO_SANITIZE("signed-integer-overflow") {
++static inline int32_t RTC_NO_SANITIZE("signed-integer-overflow")
++ OverflowingMulS16ByS32ToS32(int16_t a, int32_t b) {
+ return a * b;
+ } \ No newline at end of file
diff --git a/fix-building-with-system-icu.diff b/fix-building-with-system-icu.diff
new file mode 100644
index 00000000000..ed49460222b
--- /dev/null
+++ b/fix-building-with-system-icu.diff
@@ -0,0 +1,11 @@
+--- a/src/3rdparty/chromium/third_party/WebKit/Source/core/dom/Document.cpp
++++ b/src/3rdparty/chromium/third_party/WebKit/Source/core/dom/Document.cpp
+@@ -4667,7 +4667,7 @@
+
+ for (unsigned i = 0; i < length;) {
+ UChar32 c;
+- U16_NEXT(characters, i, length, c)
++ U16_NEXT(characters, i, length, c);
+ if (c == ':') {
+ if (sawColon)
+ return ParseQualifiedNameResult(QNMultipleColons);
diff --git a/qtwebengine-ffmpeg4.patch b/qtwebengine-ffmpeg4.patch
new file mode 100644
index 00000000000..df322134547
--- /dev/null
+++ b/qtwebengine-ffmpeg4.patch
@@ -0,0 +1,83 @@
+--- a/src/3rdparty/chromium/media/base/decoder_buffer.h
++++ b/src/3rdparty/chromium/media/base/decoder_buffer.h
+@@ -37,7 +37,7 @@ class MEDIA_EXPORT DecoderBuffer
+ : public base::RefCountedThreadSafe<DecoderBuffer> {
+ public:
+ enum {
+- kPaddingSize = 32,
++ kPaddingSize = 64,
+ #if defined(ARCH_CPU_ARM_FAMILY)
+ kAlignmentSize = 16
+ #else
+
+--- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc
++++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc
+@@ -30,10 +30,10 @@ EncryptionScheme GetEncryptionScheme(const AVStream* stream) {
+
+ } // 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
+@@ -444,11 +444,11 @@ void AudioDecoderConfigToAVCodecContext(const AudioDecoderConfig& config,
+ } else {
+ codec_context->extradata_size = config.extra_data().size();
+ codec_context->extradata = reinterpret_cast<uint8_t*>(
+- 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);
+ }
+ }
+
+@@ -585,11 +585,11 @@ void VideoDecoderConfigToAVCodecContext(
+ } else {
+ codec_context->extradata_size = config.extra_data().size();
+ codec_context->extradata = reinterpret_cast<uint8_t*>(
+- 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);
+ }
+ }
+
+--- a/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc
++++ b/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc
+@@ -53,7 +53,7 @@
+ // 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
+
+--- a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc
++++ b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc
+@@ -427,12 +427,11 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config,
+ 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) {