summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* qt6-build.eclass: handle extra -mno-* for qtwebengineIonen Wolkens2024-06-221-0/+11
| | | | | | | | Had forgotten chromium needed extras, so went to look at chromium's ebuild to see which ones were getting stripped that we aren't already handling. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: use different workaround for cpu flags issuesIonen Wolkens2024-06-021-29/+58
| | | | | | | | | | | | | | | | This also replaces the nasty workaround from qtbase's ebuild on top of the function here. Should "hopefully" be far less error prone, while still allowing -march=native for people who aren't affected. Does mean slightly worse optimizations for those affected, but this still tries to use the highest x86-64-v* and should be insignificant. Tentative, can't fully test without having an affected cpu so may still need work. Closes: https://bugs.gentoo.org/933374 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: sort eclass variablesIonen Wolkens2024-04-201-7/+7
| | | | Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: add QT6_RESTRICT_TESTS variableIonen Wolkens2024-04-201-2/+13
| | | | | | | | At same time, remove the qttranslations special logic, it can just make use of the variable instead. Bug: https://bugs.gentoo.org/930266 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: shorten intrin test a bitIonen Wolkens2024-01-081-3/+0
| | | | | | | | | Felt more correct but do not actually need the header for these. Could alternatively use tc-cpp-is-true too, but fwiw current method allows batching in a single compiler call. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: cleanup deprecated qt6_symlink_binary_to_pathIonen Wolkens2024-01-031-15/+1
| | | | | | | | | | | | | No consumers left for a while, kind of forgot about it. If overlays were packaging additional Qt modules, their facing links should be handled automatically even if this function call fails. That is, unless they were doing extra links not suggested by upstream. At that point I'd suggest doing a normal dosym, or better yet report it to Qt so that it will be suggested in user_facing_tool_links.txt for future versions. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: cleanup <6.5.3 and 6.6.0 workaroundsIonen Wolkens2023-12-191-8/+2
| | | | | | | Only >=6.6.1 in the tree now and, even if someone wanted to restore 6.5.2, lacking this wouldn't prevent typical usage. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: extend avx2/fma mismatch workaround to 6.6.0Ionen Wolkens2023-10-131-2/+2
| | | | | | | 6.6.0 is lacking qsimd_p.h changes that 6.5.3 had, will be in 6.6.1. Closes: https://bugs.gentoo.org/915691 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: triple qtest function timeoutIonen Wolkens2023-09-261-2/+1
| | | | | | | | | | | May help prevent flaky failures under load. Could increase further if ever a problem on some arches (beyond 1500 would be meaningless without also passing bigger --timeout to ctest). Also align exports and drop kinda unnecessary comment. Closes: https://bugs.gentoo.org/914737 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: skip matching fma in 6.5.3+Ionen Wolkens2023-09-141-2/+3
| | | | | | | | | | | | | | | | | | Should no longer hard fail if lack AVX2 while have FMA, however it does (still) require to disable AVX2 if lacking anything else for any reason (e.g. broken VMs, oddball hardware, perhaps even users intentionally disabling a feature because they have a problem with it). Generally few users should see their flags modified. Feel the ideal would be for upstream to simply not use features that are disabled rather than error about an incomplete set, or just not use AVX2 if incomplete. Bug: https://bugs.gentoo.org/898644 Bug: https://bugs.gentoo.org/908420 Bug: https://bugs.gentoo.org/913843 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: include patch version in subslot for >=6.5.3Ionen Wolkens2023-09-111-1/+5
| | | | | | | | | | | | | | | | This matches Qt5 which had been doing the same. While working on qt-creator bump, noticed that it broke with qtquick3d-6.5.9999, which turned out because of changes in private APIs that will land in 6.5.3. In other words, it is going to need a rebuild when that lands but current SLOT=0/6.5 do not allow this. This could be a one-off issue but let's stay safer when private APIs are abused. This also keeps the 9999 in live subslot, so switching between live and releases will trigger rebuilds too. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* Revert "qt6-build.eclass: switch examples dir to /usr/lib*/qt6/examples"Ionen Wolkens2023-09-091-1/+1
| | | | | | | | | | | | | | This reverts commit c2d1b889127af2b11559f0ac3c41313058a4969a. See bug #881433, turns out probably should not build examples. So old location makes more sense if we are only going to install sources in it. Note does mean qtbase will need to be rebuilt before start using that location though (unused currently). Bug: https://bugs.gentoo.org/881433 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: pass eclass' cmakeargs before the ebuild'sIonen Wolkens2023-09-091-7/+7
| | | | | | | | | | To allow ebuilds to override default options if ever needed. wrt == *a*, not super necessary but still checked given this avoids picking up a mycmakeargs that may be set in the environment (arrays are always from ebuilds). Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: minor style & comments adjustmentsIonen Wolkens2023-09-091-8/+7
| | | | | | | | | | wrt skip->error comment, shortened partially for correctness. Most packages still fail either way due to `ninja install` having nothing to do (unless some files did get registered for install anyway). Albeit still want this to error during configure when required conditions are not met either way. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: more aggressively disable cpu flags mismatchIonen Wolkens2023-09-071-1/+1
| | | | | Closes: https://bugs.gentoo.org/913843 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: error harderIonen Wolkens2023-09-071-1/+1
| | | | | | Oops. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: abort build rather than skip on deps issuesIonen Wolkens2023-09-071-0/+6
| | | | | | | | | | | | | | Does not cover everything, there are some more "custom" checks that may either abort or skip. This is for the generic top level one that is the same across all of dev-qt/*:6 Afaik none of these should be able to trigger right now, but not impossible been overlooking if it just been skipped. Skipping+succeeding on tinderboxes that use minimal dependencies may especially lead to confusing issues without this. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: re-arrange QT6_BUILD_TYPE, add pre-releaseIonen Wolkens2023-09-051-28/+26
| | | | | | | | | | | | | | | | 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>
* qt6-build.eclass: switch examples dir to /usr/lib*/qt6/examplesIonen Wolkens2023-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | 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>
* qt6-build.eclass: skip filter-lto if custom-cflags existsIonen Wolkens2023-09-051-1/+1
| | | | | | | | 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>
* qt6-build.eclass: move filter-lto to src_prepareIonen Wolkens2023-09-051-11/+11
| | | | | | | | 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>
* qt6-build.eclass: workaround mismatching cpu flags setsIonen Wolkens2023-09-051-1/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* qt6-build.eclass: export src_unpack to aid live ebuildsIonen Wolkens2023-09-051-1/+11
| | | | | | | | | | | | | | | | | 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>
* qt6-build.eclass: use upstream intended user_facing_tool_links.txtIonen Wolkens2023-09-051-4/+42
| | | | | | | | | | | | | | | | | | Primary goal is to reduce the amount of things we need to track, both what to install and when the symlink needs to be created based on USE. Without this, a module could introduce a new tool and may not even notice that it needs a symlink. Essentially replaces qt6_symlink_binary_to_path which I do not believe will have further uses (thus marking deprecated). That is, unless we want to diverge from upstream intended links, but even then may as well use a normal dosym in ebuilds. Also re-arrange mycmakeargs a bit because yet again qttranslations is the odd one out. Bug: https://bugs.gentoo.org/863395 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: drop qtbase dependencyIonen Wolkens2023-09-051-4/+0
| | | | | | | | | | | | qttest is now built by default and there is no need to require USE=gui, and can rely on ebuild's RDEPEND for qtbase itself. Does come with a caveat that tests may fail if have USE=-gui until update to >=qtbase-6.5.2-r1, but does not seem worth having permanent logic to enforce that as it'll be cleared with 6.5.3 ebuilds depending on =6.5.3*. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: prevent passing -O2 after user's C(XX)FLAGSIonen Wolkens2023-09-051-0/+3
| | | | | | | | Skip on qttranslation given it is the only that compiles nothing, and so gives a unused option warning. Closes: https://bugs.gentoo.org/911822 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: filter-lto globallyIonen Wolkens2023-09-051-1/+12
| | | | | | | | | | | | | | | Been using LTO by default when testing packages and, while working on Qt6 test support, just kept running into more and more components hitting test failures only with LTO. Formerly added this directly in ebuilds, but at this point feel this warrent a global filter until can figure out what's wrong. Technically needs revbumps but Qt 6.5.3 is not that far away and that will take care of rebuilds. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: add QT6_MKSPECSDIR for consistency, drop TESTSDIRIonen Wolkens2023-09-051-1/+1
| | | | | | | | | | | | qtbase ebuild currently sets /mkspecs itself instead, chances are may never need the variable but there's no need to have an odd one out TESTSDIR was unused, and currently installs to /usr/tests which we are deleting anyway -- and would give QA if that failed (note changing the path can be messy given qtbase will keep telling other packages to use old paths until it is itself updated). Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: support+unrestrict tests, export src_test+installIonen Wolkens2023-09-051-10/+48
| | | | | | | | | | | | Qt5's may be a lost cause at this point wrt bug #457182, but can do this fairly easily for Qt6 going forward (or at least for most components, qtbase, qttools, and qtdeclarative are messier). About src_install, it was defined but not exported. Not an issue before but now we need it for cleanups. Bug: https://bugs.gentoo.org/457182 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: add cmake to @PROVIDESIonen Wolkens2023-09-051-0/+1
| | | | | | | | | | | Essentially a wrapper to cmake.eclass and may as well advertise the various things from it as usable (currently already using e.g. "mycmakeargs" rather than some private "myconf" like qt5-build). Should be no reasons to call phases directly, but CMAKE_SKIP_TESTS and BUILD_DIR (rather than the removed QT6_BUILD_DIR) can be useful. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: drop virtualxIonen Wolkens2023-09-051-9/+2
| | | | | | | | | Currently unused given ebuilds were not wired for tests, and hardly needed either way with QT_QPA_PLATFORM=offscreen. If need arise, ebuild should inherit virtualx directly. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: drop IUSE=debug and QT6_{VERSION_MINOR,BUILD_DIR}Ionen Wolkens2023-09-051-9/+1
| | | | | | | | | | | | | | | | | | | | | All these are currently unused by both the eclass and consumers. * IUSE=debug: This was used by qt5-build but is no-op here. There's a commented out debug feature in qtwebengine:6, but if that is ever used it should just add its own IUSE. * QT6_VERSION_MINOR: Undocumented and assume may be a unused left-over from writing the case ${PV}. Dropping saves a $(ver_cut) fork in global scope. Could add properly if ever felt needed, but for now... * QT6_BUILD_DIR: cmake.eclass' BUILD_DIR should be used instead, this variable is essentially just guessing what cmake will use and could be wrong if an ebuild changes anything from cmake defaults. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: tidy eclass a bitIonen Wolkens2023-09-051-59/+61
| | | | | | | | | | | | | | | | | | | | | | | | No functional changes here unless (at most) consumers were misusing internals, so kept as a single commit for convenience. Rough overview: * streamline use of quotes * minor descriptions adjustments * replace MY_P with QT6_P (MY_* tend to be reserved for ebuilds), and then unset it to avoid pkgcheck undocumented variables warnings * use readonly keyword with assignments to avoid maintaining two lists of variables * re-order qt6_prepare_env, and keep separate blocks for QT6_* variables referenced by other variables to avoid mis-ordering * avoid calling $(get_libdir) twice for nothing by re-using LIBDIR * rename internal qt6_prepare_env to _qt6-build_prepare_env * swap SLOT from ver_cut to ${PV%.*}, both to be consistent with usage in SRC_URI but also to optimize (less subshells in global scope) Note have no intention to keep in-sync with qt5-build, considering it legacy and Qt5 just needs to keep working until it can go Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* qt6-build.eclass: Quote argument of ":" commandUlrich Müller2023-03-261-5/+5
| | | | | | This avoids globbing, see: https://www.shellcheck.net/wiki/SC2223 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* qt6-build.eclass: add 'qt6_symlink_binary_to_path'Jimi Huotari2023-03-191-0/+10
| | | | Signed-off-by: Jimi Huotari <chiitoo@gentoo.org>
* eclass: standardize prologue/epilogueDavid Seifert2023-03-171-9/+13
| | | | | Closes: https://github.com/gentoo/gentoo/pull/30061 Signed-off-by: David Seifert <soap@gentoo.org>
* qt6-build.eclass: add qt6-build_src_installJimi Huotari2022-11-021-0/+7
| | | | | Signed-off-by: Jimi Huotari <chiitoo@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* qt6-build.eclass: rename @ECLASS-VARIABLESam James2022-08-021-3/+3
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* dev-qt/qtbase: new packageJimi Huotari2022-08-021-0/+161
Version 6.3.1 qtbase in non-split form. Bug: https://bugs.gentoo.org/838970 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Jimi Huotari <chiitoo@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>