Commit Graph

34 Commits

Author SHA1 Message Date
Rafael Kitover adbaeacf20
build: use OpenSSL for FFmpeg for Mac builder
Link FFmpeg to OpenSSL for the Mac builder for the TLS functionality it
needs.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-25 11:53:22 -07:00
Rafael Kitover 8d8ecd8dfa
build: remove glib from Mac builder
Remove glib from the Mac builder, it is not a dependency of anything on
Mac.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-25 01:55:50 -07:00
Rafael Kitover 66aabab61f
build: yet another Mac builder fix
Remove header paths from flags, keep frameworks path.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-24 20:46:37 -07:00
Andy Vandijck 34cba3bb2c Fix build for macOS
Fix build for macOS
2025-07-24 12:00:45 +02:00
Andy Vandijck 9b78b26010 Fix dependency build
Fix dependency build
2025-07-24 11:26:46 +02:00
Andy Vandijck 94f9df4baa Fix build for macOS
Fix build for macOS
2025-07-24 11:12:56 +02:00
Rafael Kitover 3d69bde8cb
build: fix adding/removing Mac SDK paths in flags
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-23 13:04:48 -07:00
Andy Vandijck 69809ff556 Fix compile of flac
Fix compile of flac
2025-07-23 21:05:10 +02:00
Andy Vandijck ea7b9e5049 Fix glib build
Fix glib build
2025-07-23 20:29:56 +02:00
Andy Vandijck 18701fc0a4 Fix glib patch
Fix glib patch
2025-07-23 20:10:54 +02:00
Andy Vandijck 6b596c7ad7 Fix patch for glib 2025-07-23 20:06:36 +02:00
Rafael Kitover 51ae605850
build: fix -intel build for Mac builder
Make some adjustments to the Mac builder for the Intel build to build
with `-intel`.

Remove unzip and zip and replace with 7zip.

Remove `-mtune=generic` from the base flags.

Remove flex and swig and use them from brew.

Add giflib, needed by libwebp.

Add the `no_autotools_cross_options` and
`remove_arch_flags_from_build_ninja` dist flags.

Set intel macOS target to 10.10 when on an ARM64 host.

Add a patch for glib to build with an older macOS.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-23 06:31:36 -07:00
Rafael Kitover 8c3d0f0984
build: fix regression in Mac builder
Fix the Mac builder, broken by 3d4c03d0 (build: fix Mac M1 build on my
Mini, 2025-07-19). Remove `-lintl -liconv` from `LDFLAGS` because they
are not available before they are built.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-19 17:23:18 +00:00
Rafael Kitover 3d4c03d0e6
build: fix Mac M1 build on my Mini
Fix the Mac builder on my M1 Mini.

Update glib and get it building.

Add command line tools include and lib directories to flags.

Add a necessary clang flag to fix vbam build with CoreAudio.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-07-19 17:16:20 +00:00
Rafael Kitover 2c2ee70109
build: minor improvements to the Mac builder
Remove explicit include and framework paths which were only there to
work around hidden code inserted by the NSA to break our build.

Adjust CMake dist builds to support flags in the `CC` and `CXX`
environment variables, which CMake does not like.

Fix the error in the build environment block caused by using a glob by
using `find` with a shell expansion instead.

Set the build root include path with `-isystem` as the first element of
`CPPFLAGS`.

Remove the doxygen dist, as it should not be needed anymore.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-06-10 09:58:19 +00:00
Rafael Kitover 90e17d86ad
build: remove outdated wx patch for macOS
Remove the outdated patch to fix the alert sound in the override in
`macOS/builder`, the working patch is in `core.sh`.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-05-30 12:52:27 +00:00
Rafael Kitover 5972e73e37
build: patch wxWidgets on macOS for alert bug
Add a patch to our build of wxWidgets for macOS to fix the alert sound
bug, as described here:

https://github.com/wxWidgets/wxWidgets/issues/25262#issuecomment-2745905462

. Add a macro to disable our workaround for this bug when a CMake option
indicating that this patch was applied is `TRUE`.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-05-29 15:45:12 +00:00
Rafael Kitover 9712c424fd
build: make some minor fixes to Mac builder
Make some minor updates and fixes to the Mac builder scripts:

- use Git master for libpsl.
- Bump libicu.
- Bump libxml2 and switch it to meson.
- Link brew m4 into build root for autotools.
- Make brew precede system paths in `PATH`.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-05-18 20:33:45 +00:00
Andy Vandijck 81dbe6de6e Fix wxwidgets build 2025-05-18 17:22:22 +02:00
Rafael Kitover 0aecfb5d1b
build: make minor improvements to the Mac builder
Refactor the code a bit in the Mac builder.

Get `getopt` from brew, and symlink it to the build root because it is
keg-only.

Include latest Command Line Tools `clang` includes with `-isystem`
before the SDK.

Use the latest SDK instead of the oldest one from the Command Line
Tools.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-05-03 03:44:00 +00:00
Rafael Kitover 44b274c9fa
builder: use cmake from brew for Mac builder
Use `cmake` from Homebrew instead of building it due to a compilation
error.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-05-03 00:13:37 +00:00
Rafael Kitover 491bc1c009
build: set framework search path in Mac builder
Use `-F` to pass the `Frameworks` path of the selected SDK to clang.

Also remove things already in `CPPFLAGS` from `CFLAGS`, `CXXFLAGS` and
`OBJCXXFLAGS`.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-05-02 23:51:26 +00:00
Rafael Kitover 24643675c5
build: find oldest macOS SDK for Mac builder
In the macOS builder script, find the oldest macOS SDK included in the
Command Line Tools and use its C and C++ header directories in
`CPPFLAGS` with `-isystem`.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-05-02 23:11:45 +00:00
Rafael Kitover dae4397dff
build: lower bundled SFML C++17 to C++14
Convert the C++17 code in the bundled SFML code to C++14 to hopefully
allow for targeting macOS 10.10 (Yosemite) instead of 10.15 (Catalina.)

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-05-02 21:41:39 +00:00
Rafael Kitover 4cf6cccbaf build: bundle SFML 3.x sys/network in third_party
Remove the SFML external dependency, include the SFML 3.0.1 system and
network libraries in third_party and adjust the build code, tools and
documentation accordingly.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-04-24 16:34:42 +00:00
Rafael Kitover 9e724ea4b8 build: support building ARM64 binary for Mac
Make some adjustments to the Mac build scripts to support building an
ARM64 binary for Apple Silicon.

Also support cross-compiling for Intel on Apple Silicon.

Also prefer using Ninja for CMake ports.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2025-04-22 05:55:19 +00:00
Rafael Kitover 41952d0625
build: update macOS linker tool to 1.5
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-04-18 08:02:51 +00:00
Rafael Kitover ff3b5ee042
build: update mac link tool to 1.4
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-04-16 02:13:37 +00:00
Rafael Kitover 710ffeb1b2
build: update mac build
Update dists for gettext and gsed to get around new compile errors from
clang.

Update SDL and ffmpeg and add FAudio.

Make some other minor adjustments for recent changes.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2024-04-10 22:52:35 +00:00
Rafael Kitover df83b4ba80
build: macOS builder updates
Bump openssl, curl, glib, sdl2, sfml, wxWidgets and ffmpeg.

Add support for DIST_INSTALL_TARGETS in order to use `make install_sw`
instead of `make install` for openssl because installing the man pages
and symlinks to them is very painfully slow with my install code. It's
even more painfully slow with whatever whoever did to my macOS virtual
machine.

Add `brew unlink openssl@3` in the brew setup code because someone broke
my compiler and it's not giving precedence to the include directories
passed on the command line, breaking the build.

Remove `-stdlib=libc++` from compiler flags. This was only necessary
when using a 10.7 macOS target, which has both libstdc++ and libc++,
libc++ being the newer and current distribution of the C++ standard
library for clang and macOS. We are now using a 10.10 macOS target which
does not have the old libstdc++, and this compiler option no longer
exists, causing a build failure in glib due to -Werror and an unused
command line option warning.

Remove my patch to link gettext statically for glib, this has been fixed
in the newer versions.

Install meson using pip in the python3 POST_BUILD instead of using a
dist.

Add the variables MAKE and MESON to point to the respective invoking
commands.

Check for /usr/bin/perl before /usr/local/bin/perl, the brew perl no
longer works but the macOS perl does.

Fix overwriting meson with a symlink when meson has already been
installed.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-10-18 23:40:22 +00:00
Rafael Kitover 0e5d63cd9a
build: update to Mac third_party_libs_tool 1.3
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-08-27 17:19:08 +00:00
Rafael Kitover 7b8c4242fb
builder: macOS build updates
Update glib/gvdb to fix a compile error with newer clang compilers.

Add link flags for ffmpeg to link the static libraries and frameworks it
needs.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-05-31 13:38:44 +00:00
Rafael Kitover df81959825
builder: update macOS build to 10.10, Wx 3.2.2.1
Bump the macOS target OS from 10.7 Lion to 10.10 Yosemite to use the
newest Wx, 3.2.2.1.

This also fixes dark mode support on macOS 13 Ventura.

Remove --enable-static from base CONFIGURE_ARGS because it breaks Wx,
and add it to DIST_ARGS where it's needed, libffi, libicu and libx264.

Make the necessary adjustments to build the new Wx and a couple of other
minor fixes.

Fix #1102

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2023-03-27 14:59:10 +00:00
Rafael Kitover 61b503ada4 builder: update core dists and macOS build
cmake:

Add cmake option `DISABLE_MACOS_PACKAGE_MANAGERS` to disable
automatically using macOS Homebrew, MacPorts or Fink.

Use `-Ofast` instead of `-O2` for default compiler optimization flags,
which enables `-ffast-math` among a few other tweaks. There is a lot of
controversy about this, but in our testing on MSVC with `/fp:fast` the
performance increase for this specific app is dramatic.

Update version regexps on the SFML headers in `FindSFML.cmake` to allow
for a variable number of spaces between the macro and its definition.

Update the version of the Sparkle update checker framework for macOS
from 1.23.0 to 2.3.0-beta.2, and add a command to the cmake commands for
copying the framework to the `.app` to delete it first if already
copied.

Builder dist changes:

Updates:

dist                    old v                   new v
==============================================================
xz                      5.2.4                   5.2.6
openssl                 1.1.1f                  1.1.1g
curl                    7.65.3                  7.85.0
ccache                  3.4.3                   4.6.3
cmake                   3.19.4                  3.24.1
autoconf                2.69                    2.71
autoconf-archive        2017.09.28              2022.09.03
libtool                 2.4.6                   2.4.7
help2man                1.47.5                  1.49.2
libiconv                1.16                    1.17
gsed                    4.4                     4.8
bison                   3.0.5                   3.8.2
texinfo                 6.5                     6.8
flex                    e7d45afc                ea6493d9
libicu                  65_1                    71_1
nasm                    2.14.02                 2.15.05
pcre                    8.41                    8.45
libffi                  3.2.1                   3.4.2
libxml2                 2.9.12                  2.10.2
libxslt                 1.1.33-rc2              1.1.37
XML-SAX                 0.99                    1.02
expat                   2.2.4                   2.4.8
libjpeg-turbo           2.0.4                   2.1.4
libtiff                 4.1.0                   4.4.0
freetype                2.10.0                  2.12.1
libgd                   2.2.5                   2.3.3
liberation              2.0.1                   2.1.5
urw                     91edd6ec                20200910
graphviz                4bf0ec9b                5.0.1
python2                 2.7.15                  2.7.18
python3                 3.9.1                   3.10.6
swig                    3.0.12                  4.0.2
doxygen                 1.8.14                  1.9.5
bakefile                33c270a5                7a218d89
XML-Parser              2.44                    2.46
ninja                   1.9.0                   1.11.1
meson                   0.51.2                  0.63.2
glib                    2.62.2                  51251940
libgpg-error            1.41                    1.45
libgcrypt               1.8.5                   1.10.1
libsecret               0.19.1                  0.20.5
sdl2                    2.0.10                  2.24.0
flac                    1.3.3                   1.3.4
libogg                  1.3.4                   1.3.5
libvorbis               1.3.6                   1.3.7
harfbuzz                1.7.5                   5.1.0
sfml                    03375688                2.5.1
shared-mime-info        1.9                     2.2
wxwidgets               9cc0c9a0                31720e1e
graphite2               ce0e793f                425da3d0
xvidcore                1.3.5                   1.3.7
fribidi                 1.0.1                   1.0.12
libgsm                  1.0.18                  1.0.22
libmodplug              5a39f591                d1b97ed0
libopencore-amrnb       0.1.5                   0.1.6
snappy                  1.1.7                   af720f9a
speex                   1.2.0                   1.2.1
vidstab                 1.1.0                   90c76aca
libvo-amrwbenc          0.1.3                   3b3fcd0d
libass                  0.14.0                  0.16.0
libbluray               1.1.2                   1.3.2
libvpx                  1.8.1                   1.12.0
libx264                 20190913-2245           f7074e12
libxavs                 distrotech-xavs-git     8300fbf4
libzmq                  4.2.2                   4.3.4
ffmpeg                  4.3.1                   5.1.1

Removed dists:

dist            ver
=========================
zlib            1.2.11
pkgconfig       0.29.2
docbook5.0      5.0
libwavpack      5.1.0

Added dists:

dist            ver
========================
zlib-ng         ce01b1e4
zstd            1.5.2
hiredis         1.0.2
pkgconf         1.9.3
pcre2           10.40
docbook5.0.1    5.0.1
docbook5.1      5.1

Changes:

Update all non-working dist URLs.

Replace zlib 1.2.11 with a recent zlib-ng built with `--zlib-compat`.

Add zstd and hiredis, new deps of ccache.

Replace pkgconfig with pkgconf.

Use both pcre1 and pcre2.

Remove the libxml2-python dist alias and rebuild libxml2 `--with-python`
and `--with-python3` after python 2 and 3 have built.

Remove libwavpack as ffmpeg 5 no longer uses it as a dependency.

Builder core:

Rename some of the directories and files to be a bit nicer.

Add `-Ofast -march=core2 -mtune=generic -pipe` to the global
`{C,CXX,OBJC,LD}FLAGS`. These are the optimization settings used by
default in the project as well, while `-pipe` significantly reduces
build time by making the compiler use pipes internally.

Add `-DFLOAT_APPROX` to the global `{CPP,C,CXX,OBJC}FLAGS` because we
are now using `-Ofast` and consequently, `-ffast-math`.

Set the `LIBRARY_PATH` variable in the global environment.

Make some adjustments for the new dist versions and make some other
improvements.

macOS builder fixes (tested on High Sierra 10.13 and Catalina 10.15):

Add support for predefined BUILD_ROOT and append BUILD_ROOT_SUFFIX.

Allow pre-defined CHECKOUT directory for building the project sources.

Sanitize `PATH` before build to remove `/usr/local` etc., use
/usr/local/bin/brew explicitly for deps instead.

If llvm and clang is installed from nix or brew, prepend the path of the
highest version found to `PATH`.

Remove `-lm` from build environment as macOS has never had an `m` math
library and this causes problems in some config checks.

Add LLVM `libunwind` from the LLVM archive.

Add a patch for `glib`'s `meson.build` to statically link
`gettext`/`libintl`, adds `-liconv -framework CoreFoundation`.

Add an extra location to check for `stdint.h` in XCode.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-11-12 13:23:54 +00:00