[Flatpak] Build libx264 as it is the h264 encoder we support in WebRTC
[WebKit-https.git] / Tools / flatpak / org.webkit.WebKit.yaml
1 app-id: %(PORTNAME)s
2 runtime: org.gnome.Platform
3 runtime-version: "3.28"
4 # Control the exact version of the Sdk/Runtime that is being used.
5 sdk-hash: ba3017972f1cc6c7c8b0ed7f80d3297ad4c6f4076bd799d0bab0e2cbaa3e3c0a
6 runtime-hash: 9d3fe926d425ad837e40a0945020a00f09c1f531335987a753e07f276d76ee36
7 sdk: org.gnome.Sdk
8 command: %(COMMAND)s
9 finish-args:
10   # Basically no sandboxing, the goal here is to make it flexible
11   # for developers, not really to isolate (openning all devices
12   # to allow acces video cameras until we have a portal at least).
13   - --share=ipc
14   - --socket=x11
15   - --socket=wayland
16   - --device=all
17   - --share=network
18   - --socket=pulseaudio
19   - --system-talk-name=org.freedesktop.GeoClue2
20   - --filesystem=host
21   - --socket=system-bus
22   - --talk-name=org.freedesktop.Flatpak
23   - --env=GST_PRESET_PATH=/app/share/gstreamer-1.0/presets/
24 build-options:
25   cflags: -O2 -g
26   cxxflags: -O2 -g
27   strip: false
28   no-debuginfo: true
29 modules:
30   # http and dependencies.
31   - name: apr
32     sources:
33       - type: archive
34         url: https://www.apache.org/dist/apr/apr-1.6.5.tar.bz2
35         sha256: a67ca9fcf9c4ff59bce7f428a323c8b5e18667fdea7b0ebad47d194371b0a105
36   - name: apr-util
37     sources:
38       - type: archive
39         url: https://www.apache.org/dist/apr/apr-util-1.6.1.tar.bz2
40         sha512: "40eff8a37c0634f7fdddd6ca5e596b38de15fd10767a34c30bbe49c632816e8f3e1e230678034f578dd5816a94f246fb5dfdf48d644829af13bf28de3225205d"
41     config-opts:
42       - --with-apr=/app/bin/apr-1-config
43   - name: httpd
44     sources:
45       - type: git
46         url: https://github.com/apache/httpd.git
47         branch: 2.4.33
48       - type : file
49         path : files/httpd-autogen.sh
50         dest-filename : autogen.sh
51       # The version embedded in the sandbox doesn't have a working pcre-config
52       - type: patch
53         path: patches/httpd-0001-configure-use-pkg-config-for-PCRE-detection.patch
54     config-opts:
55       - --enable-mpms-shared=all
56       - --enable-modules=all
57       - --with-apr=/app/bin/apr-1-config
58       - --with-apr-util=/app/bin/apu-1-config
59       - --with-pcre=/app
60       - --enable-authnz-fcgi
61       - --enable-cgi
62       - --enable-cgid
63   - name: php
64     sources:
65       - type: archive
66         url: https://php.net/distributions/php-7.2.6.tar.xz
67         sha512: da86b1ff2df3b9e2d46e59a80296b940d81132975b621bdec9602f8b4c8d91a3fdcd4ffd7cb982d63d3ec974b3a12a7854e42a73b7f2cc8eefade14335aa7c71
68     config-opts:
69       - --disable-xml
70       - --disable-dom
71       - --disable-libxml
72       - --disable-simplexml
73       - --disable-xmlreader
74       - --disable-xmlwriter
75       - --without-pear
76       - --with-apxs2
77       - --with-zlib
78       - --with-libzip
79       - --enable-sockets=shared
80   - name: libevent
81     sources:
82       - type: git
83         url: https://github.com/libevent/libevent.git
84         branch: e7ff4ef # 2.1.8
85     config-opts:
86       - --disable-libevent-regress
87
88   # Requirement for flatpkutils
89   - name: python3-pyaml
90     buildsystem: simple
91     build-commands:
92     - pip3 install --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} pyaml
93     sources:
94     - type: file
95       url: https://files.pythonhosted.org/packages/4a/85/db5a2df477072b2902b0eb892feb37d88ac635d36245a72a6a69b23b383a/PyYAML-3.12.tar.gz
96       sha256: 592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab
97     - type: file
98       url: https://files.pythonhosted.org/packages/9e/17/1d4ed6e1a4c0918a0357dfa2fdbe26bf63f6e616013c04a14bce9fd33e40/pyaml-17.12.1.tar.gz
99       sha256: 66623c52f34d83a2c0fc963e08e8b9d0c13d88404e3b43b1852ef71eda19afa3
100
101   - name: python2-pyaml
102     buildsystem: simple
103     build-commands:
104     - pip2 install --no-index --find-links="file://${PWD}" --target=/app/lib/python2.7/site-packages/ pyaml
105     sources:
106     - type: file
107       url: https://files.pythonhosted.org/packages/4a/85/db5a2df477072b2902b0eb892feb37d88ac635d36245a72a6a69b23b383a/PyYAML-3.12.tar.gz
108       sha256: 592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab
109     - type: file
110       url: https://files.pythonhosted.org/packages/9e/17/1d4ed6e1a4c0918a0357dfa2fdbe26bf63f6e616013c04a14bce9fd33e40/pyaml-17.12.1.tar.gz
111       sha256: 66623c52f34d83a2c0fc963e08e8b9d0c13d88404e3b43b1852ef71eda19afa3
112
113   # GStreamer modules
114   - name: libvpx
115     no-autogen: true
116     sources:
117       - type: git
118         url: https://chromium.googlesource.com/webm/libvpx
119         branch: v1.7.0
120     config-opts:
121       - --enable-pic
122       - --as=yasm
123       - --disable-unit-tests
124       - --size-limit=16384x16384
125       - --enable-postproc
126       - --enable-multi-res-encoding
127       - --enable-temporal-denoising
128       - --enable-vp9-temporal-denoising
129       - --enable-vp9-postproc
130       - --enable-shared
131   - name: libunwind
132     sources:
133       - type: git
134         url: https://github.com/libunwind/libunwind.git
135         commit: v1.2.1
136   - name: libopenh264
137     buildsystem: meson
138     sources:
139       - type: git
140         url: https://github.com/cisco/openh264.git
141         branch: a1b3f07c5271f312997fcc3451237031444c4475 # 1.8.0 + fix for gcc 8
142   - name: gstreamer
143     buildsystem: meson
144     sources:
145       - type: git
146         url: https://anongit.freedesktop.org/git/gstreamer/gstreamer
147         branch: 1.14.1
148     config-opts:
149       - -Ddisable_gtkdoc=true
150   - name: gst-plugins-base
151     buildsystem: meson
152     sources:
153       - type: git
154         url: https://anongit.freedesktop.org/git/gstreamer/gst-plugins-base
155         branch: 1.14.1
156     config-opts:
157       - -Ddisable_gtkdoc=true
158   - name: gst-plugins-good
159     buildsystem: meson
160     sources:
161       - type: git
162         url: https://anongit.freedesktop.org/git/gstreamer/gst-plugins-good
163         branch: 1.14.1
164       - type: patch
165         path: ../gstreamer/patches/gst-plugins-good-0002-qtdemux-add-context-for-a-preferred-protection.patch
166       - type: patch
167         path: ../gstreamer/patches/gst-plugins-good-0003-qtdemux-also-push-buffers-without-encryption-info-in.patch
168       - type: patch
169         path: ../gstreamer/patches/gst-plugins-good-0001-qtdemux-Do-not-run-the-preferred-decryptor-context-q.patch
170       - type: patch
171         path: ../gstreamer/patches/gst-plugins-good-0002-qtdemux-Do-not-unref-a-NULL-stream_tags.patch
172       - type: patch
173         path: ../gstreamer/patches/gst-plugins-good-0003-qtdemux-Clarify-field-name-about-stream-encryption-s.patch
174     config-opts:
175       - -Ddisable_gtkdoc=true
176   - name: x264
177     config-opts:
178     - "--enable-shared"
179     - "--enable-static"
180     - "--enable-pic"
181     - "--disable-lavf"
182     sources:
183       - type: archive
184         url: http://download.videolan.org/pub/x264/snapshots/x264-snapshot-20140212-2245-stable.tar.bz2
185         sha256: 5d98e9e4faf6dd55e7193ed379aff477b8acbda6777758956ef7e5f05067be18
186
187   - name: gst-plugins-ugly
188     buildsystem: meson
189     sources:
190       - type: git
191         url: https://anongit.freedesktop.org/git/gstreamer/gst-plugins-ugly
192         branch: 1.14.1
193     config-opts:
194       - -Ddisable_gtkdoc=true
195
196   - name: gst-plugins-bad
197     buildsystem: meson
198     sources:
199       - type: git
200         url: https://anongit.freedesktop.org/git/gstreamer/gst-plugins-bad
201         branch: 1.14.1
202     config-opts:
203       - -Ddisable_gtkdoc=true
204   - name: gst-libav
205     buildsystem: meson
206     sources:
207       - type: archive
208         url: https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.14.1.tar.xz
209         sha256: eff80a02d2f2fb9f34b67e9a26e9954d3218c7aa18e863f2a47805fa7066029d
210     config-opts:
211       - -Ddisable_gtkdoc=true
212
213   - name: libgcrypt # Speedup libgrcypt
214     sources:
215       - type: git
216         url: https://dev.gnupg.org/source/libgcrypt.git
217         branch: libgcrypt-1.7.6
218       - type: patch
219         path: patches/libgcrypt-0001-Use-pkg-config-to-detect-gpg-error.patch
220       - type: patch
221         path: ../gtk/patches/libgcrypt-use-only-dev-urandom-for-testing.patch
222     config-opts:
223       - --disable-doc
224
225   - name: perl-cgi-pm
226     buildsystem: simple
227     build-commands:
228       - perl Makefile.PL PREFIX=/app LIB=/app/lib/perl/
229       - make install
230     sources:
231       - type: archive
232         url: https://cpan.metacpan.org/authors/id/L/LE/LEEJO/CGI-4.38.tar.gz
233         sha256: 8c58f4a529bb92a914b22b7e64c5e31185c9854a4070a6dfad44fe5cc248e7d4
234
235   - name: python2-virtualenv
236     buildsystem: simple
237     build-commands:
238     - pip2 install --no-index --find-links="file://${PWD}" --target=/app/lib/python2.7/site-packages/ virtualenv
239     - ln -s /app/lib/python2.7/site-packages/virtualenv.py /app/bin/virtualenv
240     - chmod +x /app/bin/virtualenv
241     sources:
242     - type: file
243       url: https://files.pythonhosted.org/packages/33/bc/fa0b5347139cd9564f0d44ebd2b147ac97c36b2403943dbee8a25fd74012/virtualenv-16.0.0.tar.gz
244       sha256: ca07b4c0b54e14a91af9f34d0919790b016923d157afda5efdde55c96718f752
245
246   - name: libcap-ng
247     sources:
248       - type: git
249         url: https://github.com/stevegrubb/libcap-ng
250         branch: v0.7.9
251     config-opts:
252       - --with-python=no
253       - --with-python3=no
254
255   - name: lzo2
256     sources:
257       - type: archive
258         url: http://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz
259         sha1: 4924676a9bae5db58ef129dc1cebce3baa3c4b5d
260
261   - name: icecc
262     sources:
263       - type: git
264         url: https://github.com/icecc/icecream
265         branch: "1.1"
266     config-opts:
267       - --without-man
268
269   # Port specific components.
270   - %(PORTNAME)s.yaml