m4: 1.4.18 -> 1.4.19, remove patches.
libxml2: 2.9.12
wxwidgets: master (3.0.5.1 on mac for 10.7)
Run script with brew bash.
Unlink brew wxwidgets before build and relink after because it conflicts
with the built version, this needs to be fixed.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Remove keychain unlock for codesigning, that doesn't work anymore, the
key has to be in the system keychain.
Use `zip -9yr` instead of `zip -9r` to make the .zip file of the .app so
that symlinks are preserved, this was creating a corrupted .app.
Don't build zip in the mac builder, use the system zip instead.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Update to latest versions of cmake, libxml2 (and libxml2-python),
graphviz, python3, libgpg-error, libx265 and ffmpeg.
Downgrade wxWidgets to 3.0.5 because newer versions require a 10.10
target but we are still targeting 10.7.
python3 has fixed linking to static openssl and libiconv/libintl
upstream, the only thing necessary now is adding -liconv -lintl to
EXTRA_LIBS.
It was necessary to override -std=gnu++17 with -std=gnu++11 for some
sources because of issues like register variables not being allowed in
C++17. This was done in EXTRA_CXXFLAGS.
c2man and graphviz were removed from the mac build for now, there are
issues with them with the newest build tools and they are only
documentation tools.
Make some other minor adjustments to get everything to build. A trivial
patch for ffmpeg also needs to be sent upstream.
The next step is automated mac nightly builds.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Adjust compiler flags to use `-std=gnu++17` for gcc/clang instead of
`-std=gnu++11` and `/std:c++17` for msvc.
Remove Ubuntu trusty job from travis (it's too old.)
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
We are not going to release 32 bit mac builds anymore, because any mac
sold after 2007 will run a 64 bit binary. And since we are building for
10.7, which requires a 64 bit mac, and will run 64 bit binaries even on
a 32 bit kernel, the 32 bit binary was always pointless.
More on this here:
https://apple.stackexchange.com/questions/99640/how-old-are-macs-that-cannot-run-64-bit-applications/99644#99644https://apple.stackexchange.com/a/261793/206363
Remove references to 32 bit mac binary from the dev manual.
Builder updates:
- Bump cmake 3.13.0-rc1 -> 3.17.3. This is needed for the new
FetchContent feature in cmake, which we use for Sparkle (online
updates for mac.)
- Bump sfml to newer master commit.
- Add pre-build hook for libvpx on mac to set
-mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET in CFLAGS.
- Force C locale in all builder scripts, homebrew bash was erroring due
to some kind of locale bug with a non-English locale.
- Remove .app in build_project() before building, rebuilds were failing
due to reinstallation of frameworks (Sparkle.)
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Minor code improvements.
Do not suppress output of sudo invocation, this may cause it hang on an
invisible password prompt.
- Fix#676.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Update openssl version, getopt URL and roll nasm back to stable, because
the snapshot hangs on Catalina.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Search the lib-prefixed names of intl/iconv/charset libraries first to
avoid dlls being linked.
Update toolchain files to include the common source by full path, fixes
using them as toolchains for other projects broken in 3edd9ba7.
Update URL for nasm, use newer jpeg-turbo, tiff and wx.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Followup on e98d8931.
Set the BITS variable in Architecture.cmake even if
CMAKE_SYSTEM_PROCESSOR is not set, and it often isn't. This allows for
generating the right release zip for 32 bit MinGW builds.
When invoking zip to make the translations.zip, use `.` instead of `*`
as the argument, with the correct WORKING_DIRECTORY, so as not to rely
on shell globbing of any sort. This broke for the 32 bit MinGW cross
build.
Fix the keychain unlock command on mac, the keychain must be unlocked to
use the codesigning certificate.
Fix the translations.zip.asc signature overwrite prompt on Windows.
For the mac builder, automatically use Xcode 9 for 32 bit builds if
installed, this is necessary on 10.14 (Mojave) and later.
Add interactive-pause.cmake script to wait for the user to press enter
before continuing, invoke it before gpg commands so that waiting for the
passphrase does not time out. It will not run if ENV{CI} is set or
ENV{VBAM_NO_PAUSE} is set, this is so that later we can set up automated
builds.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Use ENV{MSYSTEM_PREFIX} instead of ENV{MSYSTEM} to check for msys2 as
that is more reliable.
Generate the translations.zip when building for Windows from the
generated .gmo files.
Add the UPSTREAM_RELEASE option to perform some additional release
automation steps:
- Codesign for Windows with either the Visual Studio signtool or
osslsigncode when using MinGW.
- On Windows zip up the .exe into the appropriate zip file for release.
- Generate the gpg signature .asc files for the translations zip and the
.exe zip on Windows.
- On Mac codesign the app, zip it and sign the zip.
- On all platforms try to strip the binary.
Remove the release automation steps from the builder script as they are
now in cmake.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Fix cross building glib with meson for 32 bit Windows, set cpu_family
correctly in the cross file.
Do not build ffmpeg for 32 bit Windows because it is not compatible with
Windows XP and it's better to have a smaller 32 bit binary.
Turn off LTO for 32 bit Windows because it is now broken too, in a
different way than for 64 bit Windows.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
On Windows always link setupapi with SDL2, the find_library() call with
SetupAPI was failing on mingw because of case.
Update libpng 1.6.32 -> 1.6.37.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
On Windows (msys2) ninja may fail to work with -j 64 because it runs out
of open handles.
Limit jobs for ninja to 32 on Windows.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add meson to core deps because glib requires it to build, and python is
much further in the dependency chain to build meson early enough.
Override the meson command to write and use a cross file for mingw cross
builds.
Add -DFFI_STATIC_BUILD to CPPFLAGS for glib.
Fix --env for the linux mingw cross script.
Add dist make args to the make install invocation.
Add --extra-libs=-liconv to ffmpeg ./configure invocation.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
- Update to new version of icu and patches.
- Update to newer meson based glib.
- Support meson-installed dists.
- On msys2 use the distro ninja to build ninja, because there is some
kind of issue with building on windows now.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Pass `CC="$CC $CFLAGS"` to `make` for `libgsm`, so that the `-m32` is
passed for 32 bit builds.
For `mac_install_core_deps()` make sure brew is installed and install
brew perl, otherwise perl extensions cannot be built on Mojave for 32
bit.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Use git master for `graphite2` and a better cmake patch, with these
`DIST_ARGS`:
```
-DGRAPHITE2_NFILEFACE=ON -DGRAPHITE2_TESTS=OFF -DGRAPHITE2_DOCS=OFF
```
Use `DIST_CONFIGURE_OVERRIDES` instead of `DIST_ARGS` for `libvpx` and
`ffmpeg` because their configure scripts error on the `--sysconfdir`
arg.
Change all other references to `libvpx` and `ffmpeg` `DIST_ARGS` to use
`DIST_CONFIGURE_OVERRIDES` instead.
Add `-j1` to `xvidcore` `MAKE_ARGS` because it sometimes fails parallel
builds.
Change the `mkdir` commands to `mkdir -p` in `mingw.sh` because
`core.sh` now also makes those directories.
In `mingw.sh` for `libvpx` extra `CFLAGS`, add `-mstackrealign` for 32
bit builds and `-fno-asynchronous-unwind-tables` for 64 bit builds. The
latter is necessary to build, taken from the msys2 `libvpx` mingw
package.
Also add the `stdint.h` `-include` option to `CFLAGS` for libtheora and
ffmpeg because they use the `libogg` headers.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Update the following dists:
bzip2, xz, libiconv, gettext, ninja, meson, libgcrypt, libsecret, sdl2,
flac, libogg, libvorbis, wxwidgets
and the following ffmpeg deps:
graphite2, xvidcore, libgsm, opus, libsoxr, libass, libbluray, libvpx,
libx264, libx265
Enable ffmpeg for vbam again as we now have working recording code
thanks to @denisfa.
Disable graphviz and libzvbi for the time being since we don't really
need them.
For mp3lame use the msys2 patch to remove posix code instead of linking
to catgets.
For libogg and libvorbis on mac, add `-include /path/to/stdint.h` to
`CFLAGS` when building.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Pause before `pass` asks for the `gpg` passphrase to retrieve the
password to unlock the windows codesigning certificate.
This is so that the user does not have `gpg` time out waiting for the
passphrase.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Merging some work I was doing on trying to make a working mostly static
linux binary a year ago, with some additional minor refactoring.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
For cmake, the dependency on `bin2c` when using `HostCompile.cmake` does
not work if it's set to `bin2c.exe`, for whatever reason, so remove the
suffix.
Add `-DCURL_STATICLIB` to `CPPFLAGS` etc. to link to `libcurl`
correctly, needed for `osslsigncode`.
Add `--without-brotli` to curl configure args, because it can try to
link to some existing version and fail.
Add a `gmake` symlink to the system `make` into the `PATH` because some
things like Strawberry Perl install their own copy of `gmake` into the
`PATH`.
Add `pass` to list of msys2 deps, needed to store the windows
codesigning cert password.
Use `$CMAKE_ARGS` instead of `$CMAKE_BASE_ARGS` for building vbam,
adding `-DCMAKE_INSTALL_PREFIX=/usr`, this is necessary for extracting
the locales correctly.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
LTO on 64 bit mingw still produces segfaulting binaries.
Turn off LTO for just that platform and leave it enabled for all other
platforms.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
- default ENABLE_NLS to ON except for vcpkg, broken in e2f06210
- update zlib URL
- use openssl 1.1.1c instead of 1.0.2p, parallel build works now!
- add osslsigncode for mingw to codesign windows binaries, and
automatically sign in `build_project()`
- add curl (for osslsigncode, which needs libcurl)
- use current master for wxwidgets instead of 3.1.2
- make the `translations.zip` in `build_project()` for windows
- on mac, unlock the login keychain before codesigning (this is
necessary if using e.g. ssh.)
- do not fail if the user does not have codesigning or gpg keys
- fix wxwidgets configure options on mac (need to append to
`DIST_CONFIGURE_OVERRIDES` instead of `DIST_ARGS`.)
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Bump libgpg-error 1.27 -> 1.36 and add a patch to support gawk 5.0 from
gentoo.
Add meson to list of msys2 OS deps, this is not needed right now.
Remove glib `CreateFile` patch which has been removed from msys2
MINGW-packages master and add a couple of other patches.
Unfortunately using a newer glib release is not yet possible because of
weird linking errors with meson on mingw.
Add ninja to `host_dists` for `mingw.sh`, this is not needed currently.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Rewrite the `/bin/sh -c command` construct in `command()` correctly.
Update c2man url to the github mirror because it's dead.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
msys2 does not `/bin/command` or `/usr/bin/command`, check for these and
fall back to `/bin/sh -c "command $*"`.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Pass command-line arguments to `build_project()` for use in the cmake
command.
Make `$PROJECT_ARGS` override `$CMAKE_BASE_ARGS` for the project.
Override `command()` to call `/bin/command` to avoid the bash builtin
which has undesirable behavior when overriding commands.
Override `gpg` to invoke either the `gpg` or the `gpg2` binary,
whichever is available, or print a warning that gpg is not available.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Move linux distribution detection into `detect_os()` in the core.
The appropriate routine is then called with eval.
Move linux deps installation (for fedora previously) from
`linux-cross-builder` to `mingw-cross.sh` using the `linux_distribution`
variable set by `detect_os()`.
Add a routine to install suse cross dependencies as well.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Although this is a C++ option, some dists like ninja use CFLAGS instead
of CXXFLAGS for C++ code, and this becomes even more problematic with
XCode 10 which removes libstdc++ entirely.
Set the var CC_FOR_BUILD=gcc in the core build environment. This is used
by libgpg-error to make host build tools when cross compiling, may be
used by other things as well.
libvorbis autogen.sh calls the version-suffixed autoconf/automake
scripts, which ends up calling the wrong scripts, so remove the
autogen.sh and reconfigure manually.
Add the tables DIST_EXTRA_{CPPFLAGS,CFLAGS,CXXFLAGS,OBJCXXFLAGS} for
adjustments during builds.
Add -DSYMBOL_UNDERSCORE to DIST_EXTRA_CPPFLAGS for libffi on mingw when
the target is i686, see:
https://bugzilla.mozilla.org/show_bug.cgi?id=1336569
Also set target_bits and target_cpu appropriately in the msys2 script.
Factor out non-environment code from host_env()/target_env() into
host_env_base()/target_env_base(). Such as that for creating symlinks to
root, link host binaries to the target root, as well as calling the
hook.
Call the _base() functions from the msys2 overrides so that symlinks are
created properly, remove redundant symlink code.