#1094999 0ad: Consider using Debian-provided mozjs instead of the vendored copy

#1094999#5
Date:
2025-02-02 12:44:49 UTC
From:
To:
With 0 A.D. alpha 27, upstream worked on improving the ability to use
system-provided mozjs instead of the embedded copy.

Since this build of the game relies on mozjs 115, already available in
Debian testing (Trixie) and Sid, I suggest excluding the shipped copy of
the mozjs source and build 0 A.D. against the system-provided library
instead, by calling libraries/build-source-libs.sh with
--with-system-mozjs.

I see the vendored copy of mozjs is the reason for a significant part of
the maintenance work, so I hope using the Debian-provided build instead
would help in alleviating the work on 0 A.D. packaging.

#1094999#10
Date:
2025-02-02 13:50:56 UTC
From:
To:
This would likely require someone with an interest in 0ad to take over
some or all of the responsibility for mozjs115, which was previously
(but no longer) used by GNOME's gjs, and only remains in testing/unstable
because Cinnamon's cjs (a gjs fork) has not yet moved away from it. The
GNOME team maintains quite a lot of packages and does not have much
(if any) Mozilla-specific expertise, so it doesn't scale very well to
expect the GNOME team to be responsible for more than one branch of
mozjs in parallel.

Thanks,
    smcv

#1094999#15
Date:
2025-02-02 14:01:12 UTC
From:
To:
maintenance (this is still the domain of the GNOME team), but that
mozjs builds older than the most current one (currently mozjs128) are
not reliable targets for build-dependencies?

#1094999#20
Date:
2025-02-02 21:12:13 UTC
From:
To:
On Sun, Feb 2, 2025 at 6:03 AM Antoine Le Gonidec via Pkg-games-devel <pkg-games-devel@alioth-lists.debian.net> wrote:

Exactly; src:mozjs115 would have already been removed if it weren't
blocked by reverse build-deps, see #1081039.

0ad upstream is not going to be able to track upstream
spidermonkey/mozjs releases at the pace we do in Debian sid, which is
why I opted to use the embedded copy.

Regards,
Vincent

#1094999#25
Date:
2026-02-22 02:11:56 UTC
From:
To:
Note to myself more than anything else; newest upstream release (0.28)
embeds mozjs128 but we're again not build-depending on src:mozjs128
for a handful of reasons:

- upstream mozjs128 without specific patches (that are not in Debian's
copy of src:mozjs128) breaks 0ad 0.28 [1]
- src:mozjs128 is about to be removed from Debian anyways, see #1120017 [2]

[1] https://gitea.wildfiregames.com/0ad/0ad/issues/8752
[2] https://bugs.debian.org/1120017