And close#78450 because I'm maintaining Chromium for approximately one
year now and it looks like I can keep maintaining it (at least as long
as I have enough time for it). I'm also working on the documentation,
automation, and cleanups so finding a new maintainer in the future
should hopefully be easier.
During d6d4228b39 I failed to notice that the current chromiumDev
version is older than the first one that contained the commit to fix the
dependency on opus in webcodecs.
This should hopefully fix build of chromiumDev (if there are no
additional issues).
Unfortunately this requires a crazy hack to support building with
Google's proprietary Widevine DRM technology as that requires fetching
the Google Chrome sources (see also 86ff1e45ce).
The hack is required because ungoogled-chromium doesn't always use tags
that correspond to a Google Chrome release.
The build was failing with:
In file included from ../../third_party/blink/renderer/modules/webcodecs/audio_encoder.cc:7:
In file included from ../../media/audio/audio_opus_encoder.h:16:
gen/shim_headers/opus_shim/third_party/opus/src/include/opus.h:5:10: error: 'opus.h' file not found with <angled> include; use "quotes" instead
#include <opus.h>
^~~~~~~~
"opus.h"
[...]
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[42272/44233] CXX obj/third_party/blink/renderer/modules/webcodecs/webcodecs/decoder_template.oo[K
Note: This also fixes the ungoogled-chromium channel name in versionRange.
I forgot that string comparison isn't enough because e.g.:
>>> "89.0.4389.9" < "89.0.4389.23"
False
distutils.version.LooseVersion is undocumented but it works and is
already available so why not use it:
>>> LooseVersion("89.0.4389.9") < LooseVersion("89.0.4389.23")
True
The "channel" variable shouldn't be part of the final derivation. This
also makes it possible to avoid unnecessary rebuilds for identical
channels (e.g. major updates are tested via the "beta" channel first and
usually neither the source-code archive nor the dependencies change when
the update makes it into the "stable" channel - this means we could
better use chromiumBeta to test major updates in advance).