1
0
forked from mirrors/0ad
Commit Graph

157 Commits

Author SHA1 Message Date
Stan 3499efe014 Add two missed files in previous commit 2024-12-30 23:42:34 +01:00
Stan df6ed56667 Add OpenAL Soft for macOS 2024-12-30 22:48:41 +01:00
Stan f14a98e26f Bump minimum macOS SDK to 10.15
According to https://firefox-source-docs.mozilla.org/widget/cocoa/sdks.html Firefox doesn't support anything lower than 10.15 at runtime. So neither do we.
Fixes #7370
2024-12-30 11:14:59 +01:00
Lancelot de Ferrière a6693e8c1f Fix samply profiling of SM JS code 2024-12-30 09:13:06 +01:00
Itms ba0e2d0217 Self-host gloox tarball
Upstream seems less and less reliable, with the bug tracker inaccessible
and the website now entirely down.
2024-12-22 11:19:05 +01:00
Itms c9e4eb1539 Fix amd64 cross-compilation on macOS 2024-12-21 23:03:24 +01:00
Stan f27afa5c17 Update Windows libs reference commit
Fixes: #6991
Refs: #3004
2024-12-21 18:31:09 +01:00
Ralph Sennhauser 00813ff99a Backport premake extra arch support
Grab upstream patches adding support for building premake on riscv64
[1], loongarch64 [2], and e2k [3].

[1] 82c9d90495940e2d0d574e1c7849e9698f23b090
[2] 928397f72c00979d57ec4688cb1fb26ec7f2449b
[3] 5c524b6d53307bcb4ba7b02c9dba20100df68943

Fixes: #7346
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-12-21 12:10:03 +01:00
Ralph Sennhauser 9db50f48e7 Add help to build-source-libs.sh
The number of options is increasing, add a --help option to print usage
and available options.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-12-21 09:18:16 +01:00
Ralph Sennhauser accecc5894 Bump premake-core to 5.0.0-beta3
This is the version used for Windows already and contains the fix for
building against spidermonkey on all Linux distributions.

Backport patch to fix running on *BSD. Also make clang default on *BSD
as a toolset will always added to generated makefiles in beta3, so it
won't magically do what we expect when not adding --cc explicitly.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-12-15 18:34:27 +01:00
Stan d15f1c29e4 Unify library building logs 2024-12-15 15:41:37 +01:00
Dunedan 721e90ba6a Fix compilation of SM with recent Python versions
This adds a patch for a bug in SpiderMonkey, preventing compilation of
SpiderMonkey with Python >=3.12.8 and Python >=3.13.1. The bug is
tracked upstream in https://bugzilla.mozilla.org/show_bug.cgi?id=1935621
2024-12-10 22:51:31 +01:00
Itms 72ea129751 Fix SpiderMonkey debug DEFINEs in pkg-config 2024-12-09 10:46:13 +01:00
Itms 0de5f2fb25 Upgrade SpiderMonkey to ESR 115 2024-12-09 10:46:12 +01:00
Itms 6a5488832e Upgrade SpiderMonkey to ESR 102 2024-12-09 10:43:31 +01:00
Itms 2e32636a53 Use Mozilla's mach to build SpiderMonkey
This removes the need for many customizations in the build script.
2024-12-09 10:42:21 +01:00
Itms 88d3550aaa Fix SpiderMonkey build on Windows 2024-12-09 10:31:34 +01:00
Itms f88bac98b4 Fix SpiderMonkey build on recent macOS
Fixes #6905
Fixes #6915
2024-12-09 10:30:49 +01:00
Itms 682de9f289 Unbundle SpiderMonkey
This deletes the RETRY flag from the build script, which can be
manually mocked if needed.
2024-12-09 10:11:34 +01:00
Lancelot de Ferrière ffa6943057 Reapply "Update various macos Libraries"
This reverts commit e609af395d.
2024-12-07 18:36:33 +01:00
Lancelot de Ferrière e609af395d Revert "Update various macos Libraries"
This reverts commit 8c9ed820cb.
2024-12-07 18:20:16 +01:00
Lancelot de Ferrière 8c9ed820cb Update various macos Libraries 2024-12-07 18:15:15 +01:00
Itms 91289c8362 Fix error in build-macos-libs.sh
Issue introduced in 9fd05e38a4, revealed by c280df9e64.
2024-12-05 09:51:24 +01:00
Antoine Le Gonidec 2451167a37 Update the MacOS libraries build process to avoid "empty" error messages
The die function now only displays a message if it has been called with
a message argument.
2024-12-03 13:53:42 +01:00
Antoine Le Gonidec c280df9e64 Fix errors handling when building the libraries for MacOS
The shell option "set -e" has a tricky, but standard, behaviour:
Anything called on the left side of a || or && token ignores "set -e",
so failure in a command in a subshell called on the left side of "|| die"
does not prevent the execution of the following commands in the subshell.

Adding explicit "|| die" calls after each command that could fail (and
should interrupt the process) works around this behaviour, by emulating
the intuitive "set -e" behaviour.
2024-12-03 13:53:34 +01:00
Stan ce588689ee Move Windows tool executables to win source libs. 2024-11-13 21:13:18 +01:00
Ralph Sennhauser 1f60a9b22d Include system mozjs with -idirafter
Cherry-pick upstream patch adding support for -idirafter [1] which
allows us to work around the issue of some distributions bundling the
icu headers with spidermonkey resulting in a conflict.

Further add support to our premake pkgconfig module to allow using this
feature and make use of it for when building with --with-system-mozjs.

[1] premake-core baf145dc388509c953a01bcd964835e2027208bf

Fixes: #5868
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-11-11 20:04:10 +01:00
Ralph Sennhauser 3ba61ed39e Improve cxxtest python compatibility
Use patch by Debian [1] replacing python in shebang with python3 and fixing
some warnings with recent python versions.

The reason being some use an alias of python for python3 instead of the
customary symlink. Aliases are only expanded in interactive shells
unless expansion is explicitly enabled.

[1] https://sources.debian.org/patches/cxxtest/4.4%2Bgit171022-2/python3.patch/

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-11-03 07:10:06 +01:00
Ralph Sennhauser 486509d5b9 Package and bump premake-core
Treat premake like any other dependency and package it separately, this
makes it much easier to bump it in future by making it easier to track
modifications if any.

Moving it to libraries as it is handled the same as other packages. An
argument could be made to have it in build due to it's special nature.
The issue with that approach would be how to handle clean-workspace.sh.
If we split it out we would need a separate clean-premake.sh script and
if we have it cleaned by clean-workspace we through away the download
and already built binary.

Also bump version to 5.0.0-beta2 and backport patch for macOS fix
instead of the Makefile changes. The same fix is needed for gcc-14
(reported upstream), so add a patch injecting unistd.h for Unixes.

Fixes: #6816
Fixes: #6632
Refs: #6847
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-10-26 20:18:56 +02:00
Ralph Sennhauser 31365e7aed Adopt clean-source-libs.sh to split sources
After 26994b156b just removing the
libraries/source directory will delete files under version control
needed to build the packages.

Use git clean instead to get back to a clean slate.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-10-24 19:11:47 +02:00
Ralph Sennhauser 28a9692893 Allow system cxxtest
Add option to build-source-libs and premake to uses system provided
cxxtest.

Closes: #5792

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-10-13 18:27:18 +02:00
Ralph Sennhauser 4f93ddf47e Use upstream tarball for cxxtest
Update source build.sh to use upstream tarball and drop any custom
patches at the same time.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-10-13 18:27:18 +02:00
Ralph Sennhauser 39f3fa7d5b Package spirv-reflect for building shaders
Usually not available in Linux Distributions as it isn't customary to
package the SDK but only the bits needed as separate packages.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-09-24 18:45:22 +02:00
Stanislas Daniel Claude Dolcini 9c72741e69 Fix x86_64 cross-compilation on macOS 2024-09-22 16:16:40 +02:00
Ralph Sennhauser 26994b156b Split source package downloads
Instead of fetching the whole svn repo containing all current
dependencies into source, fetch them individually into subdirectories of
source.

Adds a wrapper script to each package to place the build output where
it's currently expected.

This allows adding and removing dependencies as well as changing origin
of those packages on a case by case basis.

It's recommended to run "git clean -dxf libraries/source" to free up
extra space and remove untracked files no longer covered by changes in
.gitignore.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-09-08 22:17:08 +02:00
Ralph Sennhauser 2b5ecd02a7 build-source-libs.sh: drop Perl dependency
Instead of using Perl to get the absolute path due to readlink -f
implementations differing behaviour use realpath. Since the inclusion
into coreutils this should be a valid alternative.

Also check for [[:space:]] instead of only \s as if that one is an issue
the others are as well.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-09-08 17:51:16 +02:00
Ralph Sennhauser bf82871ca8 build-source-libs.sh: remove --source-libs-dir
During the migration it apparently looked possibly useful at some point,
in the end it remained unused.

Further the clean-source-libs.sh doesn't handle the case where
build-source-libs.sh was invoked with --source-libs-dir.

Finally, when switching to support individual package this becomes very
complex to support.

For all the above reason remove the option.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-09-08 17:51:16 +02:00
Itms 33134af6c3 Stop using the source-libs repository on Windows
All prebuilt files for Windows libraries are now stored in the
windows-libs SVN repository for the foreseeable future.
2024-09-08 17:51:15 +02:00
Stan 9fd05e38a4 Update libraries to fix some build errors on recent macOS.
Fixes #6797
Fixes #6902
Refs #6915
Fixes #6916
Refs #4362
2024-09-03 11:17:12 +02:00
Ralph Sennhauser f87dfebc71 build-macos-libs.sh: move to posix shell
This removes the remaining bashisms and changes the shebang.

Also remove command chaining in subshells as this allows for comments
to go where they belong and shellcheck directives to be more specific.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-09-02 15:37:44 +02:00
Ralph Sennhauser 9ac60514c3 build-macos-libs.sh: partial move to posix shell
Change all non posix constructs except for stacked pushd/popd for the
sake of reviewability.

The reminder will be done in a separate commit.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-08-30 18:36:09 +02:00
Ralph Sennhauser 6f5ac7c4ae Fix issues pointed out by shellcheck
Some are real bugs, some are bashisms, but most is zealous quoting of
variables.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-08-28 18:23:18 +02:00
Ralph Sennhauser abdda50892 Format shell scripts using shfmt
This updates shell scripts to use a consistent style that can be enforced
via pre-commit hook.

As for choosing tabs over spaces, some arguments are:

- tabs can help people with visual impairment
- tabs allow for indenting heredocs in bash
- tabs are the default for the tool shfmt

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-08-26 09:03:00 +02:00
Itms 0b7da91992 Adapt libraries scripts to the new SVN repo. 2024-08-20 20:58:09 +02:00
Itms 0aeaa8f70a Adapt macOS libraries to the new build flow. 2024-08-20 19:10:25 +02:00
Itms 5c1195f66a New Linux/BSD build flow.
Getting and building libraries is now clearly separated from preparing
workspaces.
Some disk space is automatically reclaimed and cleanup is streamlined.
2024-08-20 19:09:23 +02:00
Itms 17ae3b224d Retrieve Windows binaries for the build, fixes #1814. 2024-08-20 18:54:00 +02:00
bb 157c6af18e Make the space in 0 A.D. non-breaking throughout the codebase.
Avoid cases of filenames
Update years in terms and other legal(ish) documents
Don't update years in license headers, since change is not meaningful

Will add linter rule in seperate commit

Happy recompiling everyone!

Original Patch By: Nescio
Comment By: Gallaecio
Differential Revision: D2620
This was SVN commit r27786.
2023-07-27 20:54:46 +00:00
wraitii 0d5cc1b994 Fix game crash when communicating with the lobby on macOS 13
Summary:
On macOS Ventura (at least version 13.2.1 and above), the game crashes
instantly when clicking on buttons communicating with the lobby.

This issue is solved by upgrading nettle to 3.9 and GNUTLS to 3.8.

Patch by: froissant
Accepted By: wraitii
Trac Tickets: #6807

Differential Revision: https://code.wildfiregames.com/D5018
This was SVN commit r27667.
2023-06-06 07:07:50 +00:00
Stan a4d4df9dd8 Check for the existence of libMoltenVK
Patch by: @Langbart
Fixes #6729

This was SVN commit r27541.
2023-02-13 12:07:35 +00:00