It may be extra work but planning to stabilize all qt6 modules
together not to repeat headaches users been having with qt5 and
mismatching keywords.
New modules being packaged should be added here as well unless
it is not possible to stabilize due to dependencies.
Note this is more or less a test file (or notes) currently.
Tooling may need time to understand disparities between slots
combined with ebuild quirks.
Closes: https://github.com/gentoo/gentoo/pull/32450
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Same as opengl and vulkan, qtdiag has the whole slew of
QT_CONFIG that would break if qtbase disables support.
Albeit unfortunate with unsplit qttools given USE is a
no-op (like vulkan) unless qtdiag is enabled.
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Littered in QT_CONFIG(opengl/vulkan) and needed to avoid ABI issues.
Hopefully the last of these as it is annoying for users not handling
opengl/vulkan with global flags (and portage tend to give the wrong
suggestion here). Non-issue on desktop profiles by default.
[gles2-only=] is also a thing, but less of an issue given nothing
normally depends on that and simply left unset.
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Same deal as qtquick3d, likely more cases where we are fetching
unneeded submodules (haven't verified), but this one was inconsistent.
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Nothing that needs this in PyQt6 currently, but there is no harm
in adding off-by-default support now that these are packaged.
Only ones still missing are:
- QtLocation: still disabled in project.py, so waiting on upstream
- QtPdf: needs enabling & testing in qtwebengine first
- QtRemoteObjects: thought to package this but failing to find anything
that is going to need it currently, will wait until someone requests
(remoteobjects sound interesting but seemingly scarcely used)
- QtAxContainer: this is for Windows (ActiveX), so nothing to do here
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
If add _beta and _rc odds are will not want them keyworded by
default, but == release will keyword them all the same so need
something different. If do want to keyword or match both for
one reason or another, can still do == *release.
Re-arranged to avoid repeating SRC_URI/QT6_P/S/etc... albeit it does
make it a bit less clear (then again there's not much going on there).
Also lets us merge the inherit block from below and inherit earlier
for less SRC_URI+S inherit environment pollution.
Also document QT6_BUILD_TYPE for EclassDocMissingVar.
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This is used to install compiled test executables (not source
examples or similar), meant to be executed from qtcreator
(not that I've tried it).
We do not install examples (yet), so no need to worry about files
or qtbase remembering a bad path.
Looking at other distros (at least those that do not set this to
a docdir like we were and there are many), putting this under
lib/*qt6/ alongside qt6/bin seems to be the typical choice.
For actual source code examples, Qt has opted to not support installing
these anymore (QTBUG-86302) so we'd have to doins -r ourselves either
way, likely like normal docs unless something expects to find these in
the Qt examples dir.
Bug: https://bugs.gentoo.org/881433
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Do not think this is particularly useful, but it is to avoid
false advertising when IUSE exists. As usual anyone enabling
this is on their own.
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Packaging some extra modules that are likely needed by upcoming
kde6 and were available with Qt5 in ::gentoo, so can be in a good
shape by the time need these for testing.
Please ask if need other modules that are still missing.
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Packaging some extra modules that are likely needed by upcoming
kde6 and were available with Qt5 in ::gentoo, so can be in a good
shape by the time need these for testing.
Please ask if need other modules that are still missing.
wrt IUSE=speechd, normally would do IUSE=speech, but this is more
specifically about enabling (optional) speechd support in a library
that can do tts by other means, and also do not want it to be confused
with enabling the "speech" Qt module either (nothing should need to
depend on this USE).
Note this module currently seems rather fragile (see ebuild comments),
considered just not packaging it (yet) but it will be needed and may
as well see where it goes now.
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Packaging some extra modules that are likely needed by upcoming
kde6 and were available with Qt5 in ::gentoo, so can be in a good
shape by the time need these for testing.
Please ask if need other modules that are still missing.
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Packaging some extra modules that are likely needed by upcoming
kde6 and were available with Qt5 in ::gentoo, so can be in a good
shape by the time need these for testing.
Please ask if need other modules that are still missing.
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Less jarring a little bit shorter. Made sense in Qt5 given it used
a ver_cut QT5_PV and could be used to ignore additional components,
but with PV it does nothing useful. Plus we still want _rc and _betas
to match (_p<date> are where issues start though, if ever needed we
could reintroduce QT6_PV, but for now...).
Should have done this in the previous style commit.
Still keeping :6, do prefer these being everywhere for clarity with
Qt slots (and qa-vdb!) even if essentially a no-op here. Plus, even
if this does not happen with Qt, two slots having the same version
can happen with revisions (e.g. current webkit-gtk).
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
qtbase does a single "big" test for all basic cpu features, and if
CXXFLAGS have any matching -mno-* then they will override Qt's
flags and the test fails. Surprised by this, Qt aborts unless
explicitly disable the feature.
Test can be bypassed, but then it does not perform per-flags
tests and will fail to build as-is.
Like bug #913400, debated a few options:
1. cpu_flags_x86_* to enable each feature, but given this is tied to
compiler flags we'd still need to test them to avoid failures and
not much better off, not to mention bug #913400 may have added its
own -mno-* that go against these.
2. Patching cmake files so it always pass its e.g. -mavx2 after the
user's flags (when needed), and does not rely on -march=haswell
given that does not override. But fwiw these files do get
installed and will alter expected behavior, and handling
-march is more annoying.
3. Patch out the bit that makes the x86intrin test prevent building
unless explicitly disabled, and let it auto-disable x86intrin
entirely if tests fail (subpar for performance if ignored).
4. Do self-tests and disable features that will fail, this has the
advantage that revdeps will not try to use these either.
5. One option to bug #913400 was to force simpler flags, which
would also solve this.
Picked #4 for now, not that particularly like it given it feels
like automagic. Hoping will be more temporary than qsimd_p.h
workarounds. Better than doing nothing either way, is a no-op
for non-affected users.
Bug: https://bugs.gentoo.org/908420
Closes: https://bugs.gentoo.org/913400
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
While it feels more right in configure (along with match_cpu_flags),
sometime need to check/use compiler flags in src_configure and it is
troublesome if not modified until call the eclass' src_configure.
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
qsimd_p.h tries determine if x86-64-v3 or v4 sets supported by the
compiler+flags seem complete, and errors out if not. This works out
rather badly on Gentoo, even -march=native can fail with some hard.
With qsimd_p.h being a private header this only affects dev-qt/*
packages, but fwics still need to fix all of dev-qt/* at once given
they are going to be using private bits from qtbase.
Debated a few options for this:
1. Patch headers (like old fix from bug #898644), but just not setting
e.g. __haswell__ is not enough when __AVX2__ still confuses some
code. Then unsetting these without going through the compiler leads
to left over macros and more confusion. Besides... changing system
headers behavior (why is __AVX2__ undef with -mavx2!?) only in
distros tend to end in disaster.
2. Detect issues in qtbase ebuild, then disable x86intrin altogether
if needed (carries over to other modules) + warn users (aka figure
it out yourself). Not really great, users may also end up
mismatching flags between dev-qt/ to fix this and then run into
issues anyway.
3. Backport the next (wip/unmerged) upstream fix[1] but wait, looks
like we are currently still playing whack-a-mole:
# if defined(__AVX2__)
// List of features present with -march=x86-64-v3 and not architecturally
// implied by __AVX2__
# define ARCH_HASWELL_MACROS \
(__AVX2__ && __BMI__ && __BMI2__ && __F16C__ \
&& __FMA__ && __LZCNT__ && __POPCNT__)
# if ARCH_HASWELL_MACROS == 0
# error "Please enable all x86-64-v3 extensions; <snip>
...so -mno-avx2 -mfma (bug #908420) is fine, older (bug #898644)
is too, but if for any reason (VMs, buggy hardware, or the machine
without F16C from bug #910419) anything else is disabled, then the
issue is still there and may in fact trigger more than before.
4. Similarly to #2, detect issues but in the eclass. Then append
-mno-* as needed to flags. Not too bad but passing -mno-*
leads us to bug #913400.
5. Based on users flags, pick highest usable -march=x86-64-v* and
strip everything else (or strip -march too...). Messy and think
users wouldn't be happy about this. It would be what upstream
likely wants us to do though, and causes no further problems.
Ultimately went with #4 for now, bug #913400 needs fixing either way.
- missing from set in #3 += -mno-avx2 (until #3, also -mno-fma)
- missing the AVX512* checked in qsimd_h += -mno-avx512*
(then let compiler disable features that depend on these)
Not great but better than doing nothing, no-op for non-affected users.
[1] https://codereview.qt-project.org/c/qt/qtbase/+/498799
Bug: https://bugs.gentoo.org/898644
Bug: https://bugs.gentoo.org/913400
Closes: https://bugs.gentoo.org/908420
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Essentially a rewrite, so only have a not exhaustive summary
of changes rather than split commits.
Bugs addressed:
* respect *FLAGS wrt bug #652172 (fwics should be no issues left)
* hopefully fixed musl/libcxx (tested with llvm-musl) wrt bug #876520
(not planning to review Qt5's myself, so no changes on that end)
IUSE changes:
* enable alsa by default, finding that you have no audio options
only after building is not great and alsa is cheap
* enable widgets by default, needed by both falkon and qutebrowser
* add custom-cflags, if going to use *FLAGS then should strip-flags
like chromium's ebuild
* add opengl, unfortunately littered in QT_CONFIG(opengl) and need
qtbase[opengl=] to avoid ABI/automagic issues
* add vulkan, has its own feature so should only need qtbase[vulkan?]
* add qml similarly to other packages
Misc:
* support EXTRA_GN like qtwebengine:5 and chromium (Gentoo-specific)
* build dir went from >9GB to ~6.3GB by dropping -g1
* drop estack+extglob, setting extglob is technically not needed for
use in bash [[ ]] tests which is-flagq does
* drop INCLUDEPATH, tried to sed qmake files but this is using cmake
* respect NINJA env var to allow samu (NINJA_PATH was a no-op)
* use get_NINJAOPTS for NINJAFLAGS and ignore environment (NINJAOPTS
is the var to set for this, while NINJAFLAGS is a private
qtwebengine var, ninja does not actually use this directly)
* drop icu's bundling check for simplicity (and consistency with other
system libraries), bug #630834 prompted adding this but does not
seem so fragile anymore (plus iwdevtools would report lib misuse,
albeit not headers)
* switch to bundled re2 to be spared headaches (see github PR#32281)
* optfeature on chrome-binary-plugins for widevine support
* cleanup/reduce QT_FEATURE and old comments
* fix designer automagic
* various dependencies adjustments, wrt re2c that is only needed if
we build ninja
* do not redefine _FORTIFY_SOURCE (use gentoo's defaults), upstream
actually switched to =3 in chromium-118 (albeit only for ChromeOS)
and "hopefully" is fine for this older version (tests pass at least)
Also moved patches to a tarball (like qt5). It is simple small patches
mostly adjusting macros rather than add actual code, but was beginning
to add up.
Considered reducing RAM requirements a little bit (generally *seems*
not so bad), but there is rather bad spikes and I do not think it can
be considered safe unless we assume everyone is not using RAM for
anything else. Plus usage will likely keep growing with versions.
Bug: https://bugs.gentoo.org/652172
Bug: https://bugs.gentoo.org/876520
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
git-r3_src_unpack does not run default/unpack, and then if we have
something else (patchset, assets, or so to unpack) that we need in
live ebuilds as well they'll be skipped.
Currently only needed by qtwebengine, but it would not hurt to have
it ready whenever needed in all esp. given ebuilds do not handle
git-r3 directly (qt6-build does). They would need to conditionally
inherit git-r3 (again) to make pkgcheck happy (and @PROVIDES would
be slightly wrong given conditions).
Tend to feel it would have been nicer if git-r3_src_unpack did this
by itself though.
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
clang16+glibc-2.38 -> pass
clang16-musl-1.2.4 -> pass
clang16[hardened]+glibc-2.38 -> pass
gcc13+glibc-2.38 -> pass
gcc13[hardened]+glibc-2.38 -> pass
gcc12[hardened]+musl-1.2.4 -> fail ???
And then, it passes if FEATURES=-pid-sandbox, so it's at least
not broken. Must be hitting some obscure codepath to be stopped
by sandbox (or perhaps that chroot ended up with something different
that activates something)
Have not gotten to the bottom of this, but failing only when using
sandbox is all I need to consider skipping it.
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>