Skip to content

Commit

Permalink
MXE: Upgrade toolchain
Browse files Browse the repository at this point in the history
Switch to Fluidlite because latest Glib versions dropped Windows XP
support and Fluidsynth needs Glib.
  • Loading branch information
lephilousophe committed Jun 30, 2024
1 parent a503ea9 commit d21303b
Show file tree
Hide file tree
Showing 19 changed files with 141 additions and 244 deletions.
12 changes: 9 additions & 3 deletions check-versions/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
'prefix': 'v',
}


libiconv_check = {
'check': 'git tag',
'repository': 'https://git.savannah.gnu.org/git/libiconv.git',
Expand Down Expand Up @@ -320,9 +321,9 @@
('./toolchains/miyoo/packages/toolchain/build.sh', 'BUILDROOT'): 'ignore',

('./toolchains/mxe/Dockerfile.m4', 'MXE'): {
'check': 'git tag',
'check': 'git commit',
'repository': 'https://github.com/mxe/mxe.git',
'pattern': '^build-',
'branch': 'master',
},
('./toolchains/mxe/packages/discord-rpc/discord-rpc.mk', ''): discord_rpc_check,
('./toolchains/mxe/packages/discord-rpc/rapidjson.mk', ''): {
Expand All @@ -332,7 +333,12 @@
'exclude pattern': r'.*-beta$',
},
# This is the system version so no need to check
('./toolchains/mxe/packages/lld/lld.mk', ''): 'ignore',
('./toolchains/mxe/packages/fluidlite/fluidlite.mk', ''): {
'check': 'git commit',
'repository': 'https://github.com/divideconcept/FluidLite.git',
'branch': 'master',
'short': True,
},
('./toolchains/mxe/packages/retrowave/retrowave.mk', ''): retrowave_check,
('./toolchains/mxe/packages/winsparkle/winsparkle.mk', ''): {
'check': 'git tag',
Expand Down
15 changes: 8 additions & 7 deletions toolchains/mxe/Dockerfile.m4
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
m4_define(`MXE_VERSION',build-2022-01-13)m4_dnl
m4_define(`MXE_VERSION',ae6c66957d6a5bb124358ef93ffc57976876a599)m4_dnl

m4_include(`paths.m4')m4_dnl
m4_include(`packages.m4')m4_dnl
Expand Down Expand Up @@ -30,6 +30,8 @@ RUN apt-get update && \
lzip \
p7zip-full \
python-is-python3 \
python3-mako \
python3-packaging \
ruby && \
rm -rf /var/lib/apt/lists/*

Expand All @@ -48,12 +50,11 @@ local_package(toolchain)
# That will install cmake configuration files as well
mxe_package(cmake)

# peldd will be used when creating package: only build native version
# Use a local version to have target wrapper scripts
local_mxe_package(pe-util)
# peldd will be used when creating package
mxe_package(pe-util)

# LLD links ScummVM faster
local_mxe_package(lld)
mxe_package(lld)

# Install everything through MXE to not mess with environment variables
# This lets MXE build all platforms and avoids to mess with its settings
Expand Down Expand Up @@ -97,9 +98,9 @@ mxe_package(libiconv)

local_mxe_package(sdl2)

local_mxe_package(sdl2_net)
mxe_package(sdl2_net)

local_mxe_package(fluidsynth-light)
local_mxe_package(fluidlite)

local_mxe_package(winsparkle)

Expand Down
2 changes: 1 addition & 1 deletion toolchains/mxe/packages/curl-light/curl-light.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ endef
define $(PKG)_BUILD
cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \
$(MXE_CONFIGURE_OPTS) \
--with-schannel \
--with-winssl \
--without-ssl \
--without-winidn \
--enable-sspi \
Expand Down
51 changes: 51 additions & 0 deletions toolchains/mxe/packages/fluidlite/fluidlite-1-static-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
From 849751658e68ae734dcf493153d012da63c2652a Mon Sep 17 00:00:00 2001
From: Le Philousophe <lephilousophe@users.noreply.github.com>
Date: Fri, 5 May 2023 22:58:29 +0200
Subject: [PATCH] Fix static build

---
CMakeLists.txt | 3 ++-
include/{fluidlite.h => fluidlite.h.in} | 6 ++++++
2 files changed, 8 insertions(+), 1 deletion(-)
rename include/{fluidlite.h => fluidlite.h.in} (95%)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4aead6c..530651f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,10 +33,11 @@ include(CheckIncludeFile)
check_include_file(fcntl.h HAVE_FCNTL_H)

list(APPEND HEADERS
- include/fluidlite.h
+ ${PROJECT_BINARY_DIR}/fluidlite.h
)

configure_file(src/version.cmake ${PROJECT_BINARY_DIR}/fluidlite/version.h @ONLY)
+configure_file(include/fluidlite.h.in ${PROJECT_BINARY_DIR}/fluidlite.h)

list(APPEND SCOPED_HEADERS
include/fluidlite/types.h
diff --git a/include/fluidlite.h b/include/fluidlite.h.in
similarity index 95%
rename from include/fluidlite.h
rename to include/fluidlite.h.in
index a159ddd..5e6ea4b 100644
--- a/include/fluidlite.h
+++ b/include/fluidlite.h.in
@@ -27,6 +27,12 @@
extern "C" {
#endif

+#cmakedefine01 FLUIDLITE_BUILD_SHARED
+
+#if (FLUIDLITE_BUILD_SHARED == 0) && !defined(FLUIDLITE_STATIC)
+#define FLUIDLITE_STATIC
+#endif
+
#if defined(_WIN32)
#if defined(FLUIDLITE_STATIC)
#define FLUIDSYNTH_API
--
2.34.1

16 changes: 16 additions & 0 deletions toolchains/mxe/packages/fluidlite/fluidlite.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
PKG := fluidlite
$(PKG)_WEBSITE := https://github.com/divideconcept/FluidLite
$(PKG)_DESCR := Fluidlite
$(PKG)_IGNORE :=
$(PKG)_VERSION := d59d232
$(PKG)_CHECKSUM := f119ff09fa7e3a87874eb51546de66ce50342bbefd9ab11e37f292a71b097c5e
$(PKG)_GH_CONF := divideconcept/FluidLite/branches/master
$(PKG)_DEPS := cc

define $(PKG)_BUILD
cd '$(BUILD_DIR)' && '$(TARGET)-cmake' '$(SOURCE_DIR)' \
-DFLUIDLITE_BUILD_SHARED=OFF \
$($(PKG)_CONFIGURE_OPTS)
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' VERBOSE=1
$(MAKE) -C '$(BUILD_DIR)' -j 1 install VERBOSE=1
endef
38 changes: 0 additions & 38 deletions toolchains/mxe/packages/fluidsynth-light/fluidsynth-light.mk

This file was deleted.

3 changes: 0 additions & 3 deletions toolchains/mxe/packages/fluidsynth-light/gettext-patch.mk

This file was deleted.

37 changes: 0 additions & 37 deletions toolchains/mxe/packages/fluidsynth-light/glib-light.mk

This file was deleted.

8 changes: 0 additions & 8 deletions toolchains/mxe/packages/lld/lld.mk

This file was deleted.

17 changes: 0 additions & 17 deletions toolchains/mxe/packages/pe-util/patch.mk

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/configure.ac b/configure.ac
index b6783a08..28234207 100644
index 3dadf542c..071f4e0f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3889,7 +3889,7 @@ case "$host" in
@@ -4169,7 +4169,7 @@ case "$host" in
VERSION_SOURCES="$srcdir/src/main/windows/*.rc"
SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"
SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
diff -u a/configure.ac b/configure.ac
diff --git a/configure.ac b/configure.ac
index 071f4e0f3..646dd9554 100644
--- a/configure.ac
+++ b/configure.ac
@@ -230,27 +230,6 @@
@@ -250,24 +250,6 @@ if test x$enable_dependency_tracking = xyes; then
fi
fi

-AC_MSG_CHECKING(for linker option --no-undefined)
-have_no_undefined=no
-case "$host" in
- dnl Skip this on platforms where it is just simply busted.
-dnl Skip this on platforms where it is just simply busted.
- *-*-openbsd*)
- ;;
-
- *)
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -Wl,--no-undefined"
- AC_TRY_LINK([
- ],[
- ],[
- AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [
- have_no_undefined=yes
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--no-undefined"
- ])
- BUILD_LDFLAGS="$BUILD_LDFLAGS -Wl,--no-undefined"
- ],[])
- LDFLAGS="$save_LDFLAGS"
- ;;
-esac
Expand Down
22 changes: 22 additions & 0 deletions toolchains/mxe/packages/sdl2/sdl2-9999-fix-sdl2-config-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From ab671b54d34363297f449053b53a035fec960879 Mon Sep 17 00:00:00 2001
From: Le Philousophe <lephilousophe@users.noreply.github.com>
Date: Sun, 30 Jun 2024 16:15:18 +0200
Subject: [PATCH 3/3] PATCH4


diff --git a/sdl2-config.in b/sdl2-config.in
index f6eca7668..1fe584a39 100644
--- a/sdl2-config.in
+++ b/sdl2-config.in
@@ -1,7 +1,7 @@
#!/bin/sh

# Get the canonical path of the folder containing this script
-bindir=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)")
+bindir=$(cd -P -- "$(dirname -- "$(readlink -e "$0")")" && printf '%s\n' "$(pwd -P)")

# Calculate the canonical path of the prefix, relative to the folder of this script
prefix=$(cd -P -- "$bindir/@bin_prefix_relpath@" && printf '%s\n' "$(pwd -P)")
--
2.44.2

Loading

0 comments on commit d21303b

Please sign in to comment.