• Maxim Cournoyer's avatar
    packaging: Limit the number of parallel jobs when building Qt. · 78c6b88a
    Maxim Cournoyer authored
    Workaround <https://bugreports.qt.io/browse/QTBUG-94800>.
    This is to avoid out of memory conditions during the build, which
    requires up to about 2 GiB of memory per parallel process.  There was
    also a problem with how the MAKEFLAGS was passed, which led
    qtwebengine to be built using all the CPU cores even when specifying a
    lesser NO_CPUS value.
    * packaging/rules/debian-qt/rules (min, max): New functions.
    (NO_CPUS): Express in terms of max.
    (JOB_COUNT, MAX_PARALLEL_BUILDS): New variables.
    (override_dh_auto_build): Override to manually control job count.
    Specify NINJAFLAGS for the Chromium build.
    * packaging/rules/rpm/jami-libqt.spec (min, max, cpu_count)
    (available_memory, computed_job_count, job_count): New macros.
    (%build): Re-indent and use the above 'job_count' variable as
    the number of parallel jobs.
    (%install): Likewise.
    Change-Id: I9134c1e63e92104a1da8435670e2919ce692040c