upgrade fluidsynth and fix missing symbol in recent xmake (#4575)

* upgrade fluidsynth and fix missing symbol in recent xmake

* update patch for newer version

* apply patch on linux

* add systemd option for linux

* fix line ending of patch on linux

* fix deps

* lower checksum

* fix checksum

* fix deps again

* improve cmake finder of transitive dependencies

* apply changes to version 2.3.3
pull/4573/head
Yiheng Wu 5 months ago committed by GitHub
parent 117ab12b31
commit 2d6a369251
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 83
      packages/f/fluidsynth/patches/2.3.3/find-intl.patch
  2. 385
      packages/f/fluidsynth/patches/2.3.5/find-intl.patch
  3. 16
      packages/f/fluidsynth/xmake.lua

@ -124,41 +124,35 @@ index 2de2f41..0000000
-mark_as_advanced(FLAC_LIBRARY FLAC_INCLUDE_DIR FLAC++_LIBRARY
- FLAC++_INCLUDE_DIR)
diff --git a/cmake_admin/FindGLib2.cmake b/cmake_admin/FindGLib2.cmake
index f6fa6f1..b7821bf 100644
index f6fa6f1..e29d4b1 100644
--- a/cmake_admin/FindGLib2.cmake
+++ b/cmake_admin/FindGLib2.cmake
@@ -64,6 +64,14 @@ find_library(
NAMES "gobject-2.0"
HINTS "${PC_GOBJECT2_LIBDIR}")
+find_library(
+ Intl_LIBRARY
+ NAMES "intl")
+
+find_library(
+ Pcre_LIBRARY
+ NAMES "pcre")
+
# GLib stores its config in lib/glib-2.0/include
get_filename_component(_glib2_libdir "${GLib2_glib-2_LIBRARY}" PATH)
find_path(
@@ -102,12 +110,15 @@ find_package_handle_standard_args(
"GLib2_INCLUDE_DIRS"
VERSION_VAR "GLib2_VERSION")
+get_filename_component(_intl_path "${Intl_LIBRARY}" DIRECTORY)
+
# Create the targets
if(GLib2_glib-2_LIBRARY AND NOT TARGET GLib2::glib-2)
# Handle transitive dependencies
@@ -108,6 +108,24 @@ if(GLib2_glib-2_LIBRARY AND NOT TARGET GLib2::glib-2)
if(PC_GLIB2_FOUND)
get_target_properties_from_pkg_config("${GLib2_glib-2_LIBRARY}" "PC_GLIB2"
"_glib2")
+ list(APPEND _glib2_link_directories "${_intl_path}")
+
+ find_library(
+ Intl_LIBRARY
+ NAMES "intl")
+ if(NOT "${Intl_LIBRARY}" STREQUAL "Intl_LIBRARY-NOTFOUND")
+ get_filename_component(_intl_path "${Intl_LIBRARY}" DIRECTORY)
+ list(APPEND _glib2_link_directories "${_intl_path}")
+ list(APPEND _glib2_link_libraries "intl")
+ endif()
+
+ find_library(
+ Iconv_LIBRARY
+ NAMES "iconv")
+ if(NOT "${Iconv_LIBRARY}" STREQUAL "Iconv_LIBRARY-NOTFOUND")
+ get_filename_component(_iconv_path "${Iconv_LIBRARY}" DIRECTORY)
+ list(APPEND _glib2_link_directories "${_iconv_path}")
+ list(APPEND _glib2_link_libraries "iconv")
+ endif()
else()
find_package(Intl QUIET)
find_package(Iconv QUIET)
@@ -118,36 +129,9 @@ if(GLib2_glib-2_LIBRARY AND NOT TARGET GLib2::glib-2)
@@ -118,35 +136,14 @@ if(GLib2_glib-2_LIBRARY AND NOT TARGET GLib2::glib-2)
list(APPEND _glib2_link_libraries "Threads::Threads")
endif()
list(APPEND _glib2_link_libraries ${MATH_LIBRARY})
@ -191,36 +185,17 @@ index f6fa6f1..b7821bf 100644
- else()
- list(APPEND _glib2_link_libraries "pcre")
- endif()
+ endif()
+ find_library(
+ Pcre_LIBRARY
+ NAMES "pcre2-8")
+ if(NOT "${Pcre_LIBRARY}" STREQUAL "Pcre_LIBRARY-NOTFOUND")
+ get_filename_component(_pcre_path "${Pcre_LIBRARY}" DIRECTORY)
+ list(APPEND _glib2_link_directories "${_pcre_path}")
+ list(APPEND _glib2_link_libraries "pcre2-8")
endif()
+ get_filename_component(_pcre_path "${Pcre_LIBRARY}" DIRECTORY)
+ list(APPEND _glib2_link_directories "${_pcre_path}")
# pkg_check_modules consider these as LDFLAGS_OTHER rather instead of
# libraries
@@ -172,6 +156,7 @@ if(GLib2_gthread-2_LIBRARY AND NOT TARGET GLib2::gthread-2)
if(PC_GTHREAD2_FOUND)
get_target_properties_from_pkg_config("${GLib2_gthread-2_LIBRARY}"
"PC_GTHREAD2" "_gthread2")
+ list(APPEND _glib2_link_directories "${_intl_path}")
else()
set(_gthread2_link_libraries "Threads::Threads" "GLib2::glib-2")
endif()
@@ -191,6 +176,7 @@ if(GLib2_gmodule-2_LIBRARY AND NOT TARGET GLib2::gmodule-2)
if(PC_GMODULE2_FOUND)
get_target_properties_from_pkg_config("${GLib2_gmodule-2_LIBRARY}"
"PC_GMODULE2" "_gmodule2")
+ list(APPEND _glib2_link_directories "${_intl_path}")
else()
set(_gmodule2_link_libraries "GLib2::glib-2")
endif()
@@ -210,6 +196,7 @@ if(GLib2_gobject-2_LIBRARY AND NOT TARGET GLib2::gobject-2)
if(PC_GOBJECT2_FOUND)
get_target_properties_from_pkg_config("${GLib2_gobject-2_LIBRARY}"
"PC_OBJECT2" "_gobject2")
+ list(APPEND _glib2_link_directories "${_intl_path}")
else()
find_package(libffi QUIET)
set(_gobject2_link_libraries "libffi" "GLib2::glib-2")
diff --git a/cmake_admin/FindSndFile.cmake b/cmake_admin/FindSndFile.cmake
deleted file mode 100644
index d77333b..0000000

@ -0,0 +1,385 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 606bf8e..0f78e48 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -356,6 +356,8 @@ endif ( WIN32 )
# Check for threads and math
find_package ( Threads REQUIRED )
+unset ( HAS_LIBM CACHE )
+unset ( MATH_LIBRARY CACHE )
find_library ( HAS_LIBM NAMES "m" )
if ( HAS_LIBM )
set ( MATH_LIBRARY "m" )
diff --git a/cmake_admin/FindFLAC.cmake b/cmake_admin/FindFLAC.cmake
deleted file mode 100644
index 2de2f41..0000000
--- a/cmake_admin/FindFLAC.cmake
+++ /dev/null
@@ -1,106 +0,0 @@
-#[=======================================================================[.rst:
-FindFLAC
--------
-
-Finds the FLAC library.
-
-Imported Targets
-^^^^^^^^^^^^^^^^
-
-This module provides the following imported targets, if found:
-
-``FLAC::FLAC``
- The FLAC C library.
-``FLAC::FLAC++``
- The FLAC C++ library.
-
-Result Variables
-^^^^^^^^^^^^^^^^
-
-This will define the following variables:
-
-``FLAC_FOUND``
- True if both libraries were found.
-``FLAC_FLAC_FOUND``
- True if the C library was found.
-``FLAC_FLAC++_FOUND``
- True if the C++ library was found..
-
-#]=======================================================================]
-
-# Use pkg-config if available
-find_package(PkgConfig QUIET)
-pkg_check_modules(PC_FLAC QUIET flac)
-pkg_check_modules(PC_FLAC++ QUIET flac++)
-
-# Find the headers and libraries
-find_path(
- FLAC_INCLUDE_DIR
- NAMES "FLAC/all.h"
- HINTS "PC_FLAC_INCLUDEDIR")
-
-find_path(
- FLAC++_INCLUDE_DIR
- NAMES "FLAC++/all.h"
- HINTS "PC_FLAC++_INCLUDEDIR")
-
-find_library(
- FLAC_LIBRARY
- NAMES "FLAC"
- HINTS "${PC_FLAC_LIBDIR}")
-
-find_library(
- FLAC++_LIBRARY
- NAMES "FLAC++"
- HINTS "${PC_FLAC++_LIBDIR}")
-
-# Handle transitive dependencies
-if(PC_FLAC_FOUND)
- get_target_properties_from_pkg_config("${FLAC_LIBRARY}" "PC_FLAC" "_flac")
-else()
- if(NOT TARGET "Ogg::ogg")
- find_package(Ogg QUIET)
- endif()
- set(_flac_link_libraries "Ogg::ogg" ${MATH_LIBRARY})
-endif()
-
-if(PC_FLAC++_FOUND)
- get_target_properties_from_pkg_config("${FLAC++_LIBRARY}" "PC_FLAC++"
- "_flac++")
-else()
- set(_flac++_link_libraries "FLAC::FLAC")
-endif()
-
-# Forward the result to CMake
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(
- FLAC REQUIRED_VARS "FLAC_LIBRARY" "FLAC_INCLUDE_DIR" "FLAC++_LIBRARY"
- "FLAC++_INCLUDE_DIR")
-
-# Create the target
-if(FLAC_FOUND AND NOT TARGET FLAC::FLAC)
- add_library(FLAC::FLAC UNKNOWN IMPORTED)
- set_target_properties(
- FLAC::FLAC
- PROPERTIES IMPORTED_LOCATION "${FLAC_LIBRARY}"
- INTERFACE_COMPILE_OPTIONS "${_flac_compile_options}"
- INTERFACE_INCLUDE_DIRECTORIES "${FLAC_INCLUDE_DIR}"
- INTERFACE_LINK_LIBRARIES "${_flac_link_libraries}"
- INTERFACE_LINK_DIRECTORIES "${_flac_link_directories}")
- set(FLAC_FLAC_FOUND TRUE)
-endif()
-
-if(FLAC_FOUND AND NOT TARGET FLAC::FLAC++)
- add_library(FLAC::FLAC++ UNKNOWN IMPORTED)
- set_target_properties(
- FLAC::FLAC++
- PROPERTIES IMPORTED_LOCATION "${FLAC++_LIBRARY}"
- INTERFACE_COMPILE_OPTIONS "${_flac++_compile_options}"
- INTERFACE_INCLUDE_DIRECTORIES "${FLAC++_INCLUDE_DIR}"
- INTERFACE_LINK_LIBRARIES "${_flac++_link_libraries}"
- INTERFACE_LINK_DIRECTORIES "${_flac++_link_directories}")
- set(FLAC_FLAC++_FOUND TRUE)
-endif()
-
-mark_as_advanced(FLAC_LIBRARY FLAC_INCLUDE_DIR FLAC++_LIBRARY
- FLAC++_INCLUDE_DIR)
diff --git a/cmake_admin/FindGLib2.cmake b/cmake_admin/FindGLib2.cmake
index f6fa6f1..e29d4b1 100644
--- a/cmake_admin/FindGLib2.cmake
+++ b/cmake_admin/FindGLib2.cmake
@@ -108,6 +108,24 @@ if(GLib2_glib-2_LIBRARY AND NOT TARGET GLib2::glib-2)
if(PC_GLIB2_FOUND)
get_target_properties_from_pkg_config("${GLib2_glib-2_LIBRARY}" "PC_GLIB2"
"_glib2")
+
+ find_library(
+ Intl_LIBRARY
+ NAMES "intl")
+ if(NOT "${Intl_LIBRARY}" STREQUAL "Intl_LIBRARY-NOTFOUND")
+ get_filename_component(_intl_path "${Intl_LIBRARY}" DIRECTORY)
+ list(APPEND _glib2_link_directories "${_intl_path}")
+ list(APPEND _glib2_link_libraries "intl")
+ endif()
+
+ find_library(
+ Iconv_LIBRARY
+ NAMES "iconv")
+ if(NOT "${Iconv_LIBRARY}" STREQUAL "Iconv_LIBRARY-NOTFOUND")
+ get_filename_component(_iconv_path "${Iconv_LIBRARY}" DIRECTORY)
+ list(APPEND _glib2_link_directories "${_iconv_path}")
+ list(APPEND _glib2_link_libraries "iconv")
+ endif()
else()
find_package(Intl QUIET)
find_package(Iconv QUIET)
@@ -118,35 +136,14 @@ if(GLib2_glib-2_LIBRARY AND NOT TARGET GLib2::glib-2)
list(APPEND _glib2_link_libraries "Threads::Threads")
endif()
list(APPEND _glib2_link_libraries ${MATH_LIBRARY})
-
- # Glib can link to either PCRE 1 or 2
- find_library(
- _pcre2_8bit_library
- NAMES "pcre2-8"
- HINTS "${PC_GLIB2_LIBDIR}")
- if(_pcre2_8bit_library)
- include(CheckCSourceCompiles)
- set(_backup_includes ${CMAKE_REQUIRED_INCLUDES})
- set(_backup_libraries ${CMAKE_REQUIRED_LIBRARIES})
- set(_backup_libdir ${CMAKE_REQUIRED_LIBRARIES})
- set(CMAKE_REQUIRED_INCLUDES "${GLib2_INCLUDE_DIRS}")
- set(CMAKE_REQUIRED_LIBRARIES
- "${GLib2_glib-2_LIBRARY}" "${_glib2_link_libraries}"
- "${_pcre2_8bit_library}")
- check_c_source_compiles(
- "#include <glib.h>
- int main(){
- g_regex_error_quark();
- }"
- GLIB2_USES_PCRE2)
- set(CMAKE_REQUIRED_INCLUDES ${_backup_includes})
- set(CMAKE_REQUIRED_LIBRARIES ${_backup_libraries})
- endif()
- if(GLIB2_USES_PCRE2)
- list(APPEND _glib2_link_libraries "${_pcre2_8bit_library}")
- else()
- list(APPEND _glib2_link_libraries "pcre")
- endif()
+ endif()
+ find_library(
+ Pcre_LIBRARY
+ NAMES "pcre2-8")
+ if(NOT "${Pcre_LIBRARY}" STREQUAL "Pcre_LIBRARY-NOTFOUND")
+ get_filename_component(_pcre_path "${Pcre_LIBRARY}" DIRECTORY)
+ list(APPEND _glib2_link_directories "${_pcre_path}")
+ list(APPEND _glib2_link_libraries "pcre2-8")
endif()
# pkg_check_modules consider these as LDFLAGS_OTHER rather instead of
diff --git a/cmake_admin/FindSndFile.cmake b/cmake_admin/FindSndFile.cmake
deleted file mode 100644
index 271bb06..0000000
--- a/cmake_admin/FindSndFile.cmake
+++ /dev/null
@@ -1,181 +0,0 @@
-#[=======================================================================[.rst:
-FindSndFile
--------
-
-Finds the SndFile library.
-
-Imported Targets
-^^^^^^^^^^^^^^^^
-
-This module provides the following imported targets, if found:
-
-``SndFile::sndfile``
- The SndFile library
-
-Result Variables
-^^^^^^^^^^^^^^^^
-
-This will define the following variables:
-
-``SndFile_FOUND``
- True if the system has the SndFile library.
-``SndFile_VERSION``
- The version of the SndFile library which was found.
-``SndFile_WITH_EXTERNAL_LIBS``
- True if the library was built with Xiph codecs.
-
-For compatibility with upstream, the following variables are also set:
-
-``SndFile_WITH_MPEG``
-``SndFile_VERSION_MAJOR``
-``SndFile_VERSION_MINOR``
-``SndFile_VERSION_PATCH``
-``SndFile_LIBRARY``
-``SndFile_LIBRARIES``
-``SNDFILE_LIBRARY``
-``SNDFILE_LIBRARIES``
-``SNDFILE_INCLUDE_DIR``
-
-#]=======================================================================]
-
-# Use pkg-config if available
-find_package(PkgConfig QUIET)
-pkg_check_modules(PC_SNDFILE QUIET sndfile)
-
-# Find the headers and libraries
-find_path(
- SndFile_INCLUDE_DIR
- NAMES "sndfile.h"
- HINTS "${PC_SNDFILE_INCLUDEDIR}")
-
-find_library(
- _sndfile_library
- NAMES "sndfile" "sndfile-1"
- HINTS "${PC_SNDFILE_LIBDIR}")
-
-# Get version from pkg-config or read the config header
-if(PC_SNDFILE_VERSION)
- set(SndFile_VERSION "${PC_SNDFILE_VERSION}")
- string(REPLACE "." ";" _sndfile_version_list "${SndFile_VERSION}")
- list(GET _sndfile_version_list 0 SndFile_VERSION_MAJOR)
- list(GET _sndfile_version_list 1 SndFile_VERSION_MINOR)
- list(GET _sndfile_version_list 2 SndFile_VERSION_PATCH)
-elseif(SndFile_INCLUDE_DIR)
- file(READ "${SndFile_INCLUDE_DIR}/sndfile.h" _sndfile_h)
- if("#define SNDFILE_1" MATCHES _snfile_h)
- set(SndFile_VERSION "1")
- set(SndFile_VERSION_MAJOR "1")
- endif()
-endif()
-
-# Check the features SndFile was built with
-# 2024-01-02: Recent versions of libsndfile don't seem to provide a pkgconfig file and older version who did are lacking private libraries like OGG.
-if(FALSE) #PC_SNDFILE_FOUND
- if("vorbis" IN_LIST PC_SNDFILE_STATIC_LIBRARIES)
- set(SndFile_WITH_EXTERNAL_LIBS TRUE)
- endif()
- if("mpg123" IN_LIST PC_SNDFILE_STATIC_LIBRARIES)
- set(SndFile_WITH_MPEG TRUE)
- endif()
-elseif(_sndfile_library)
- # sndfile may need any of these libraries
- find_package(Ogg 1.3 QUIET)
- find_package(Vorbis QUIET)
- find_package(FLAC QUIET)
- find_package(Opus QUIET)
- find_package(mp3lame QUIET)
- find_package(mpg123 QUIET)
-
- if(NOT CMAKE_CROSSCOMPILING)
- include(CheckSourceRuns)
- set(_backup_includes ${CMAKE_REQUIRED_INCLUDES})
- set(_backup_libraries ${CMAKE_REQUIRED_LIBRARIES})
- set(CMAKE_REQUIRED_INCLUDES "${SndFile_INCLUDE_DIR}")
- set(CMAKE_REQUIRED_LIBRARIES "${_sndfile_library}")
-
- set(_optional_libs "MPG123::libmpg123" "mp3lame::mp3lame" "FLAC::FLAC"
- "Opus::opus" "Vorbis::vorbisenc" "Ogg::ogg")
- foreach(_target ${_optional_libs})
- if(TARGET "${_target}")
- list(APPEND CMAKE_REQUIRED_LIBRARIES "${_target}")
- endif()
- endforeach()
-
- check_source_runs(
- C
- "#include <stdlib.h>
-#include <sndfile.h>
-int main() {
- SF_FORMAT_INFO info = {SF_FORMAT_VORBIS};
- sf_command(NULL, SFC_GET_FORMAT_INFO, &info, sizeof info);
- return info.name != NULL ? EXIT_SUCCESS : EXIT_FAILURE;
-}"
- SNDFILE_SUPPORTS_VORBIS)
-
- check_source_runs(
- C
- "#include <stdlib.h>
-#include <sndfile.h>
-int main() {
- SF_FORMAT_INFO info = {SF_FORMAT_MPEG_LAYER_III};
- sf_command(NULL, SFC_GET_FORMAT_INFO, &info, sizeof info);
- return info.name != NULL ? EXIT_SUCCESS : EXIT_FAILURE;
-}"
- SNDFILE_SUPPORTS_MPEG)
-
- set(SndFile_WITH_EXTERNAL_LIBS ${SNDFILE_SUPPORTS_VORBIS})
- set(SndFile_WITH_MPEG ${SNDFILE_SUPPORTS_MPEG})
- set(CMAKE_REQUIRED_INCLUDES ${_backup_includes})
- set(CMAKE_REQUIRED_LIBRARIES ${_backup_libraries})
- else()
- message(
- STATUS
- "Cross-compiling without pkg-config - cannot check for external libraries."
- "If you have the upstream CMake config set CMAKE_FIND_PACKAGE_PREFER_CONFIG to true for accurate results."
- )
- set(SndFile_WITH_EXTERNAL_LIBS FALSE)
- set(SndFile_WITH_MPEG FALSE)
- endif()
-endif()
-
-# Handle transitive dependencies
-if(PC_SNDFILE_FOUND)
- get_target_properties_from_pkg_config("${_sndfile_library}" "PC_SNDFILE"
- "_sndfile")
-else()
- if(SndFile_WITH_EXTERNAL_LIBS)
- list(APPEND _sndfile_link_libraries "FLAC::FLAC" "Opus::opus"
- "Vorbis::vorbisenc" "Ogg::ogg")
- endif()
- if(SndFile_WITH_MPEG)
- list(APPEND _sndfile_link_libraries "MPG123::libmpg123" "mp3lame::mp3lame")
- endif()
-endif()
-
-# Forward the result to CMake
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(
- SndFile
- REQUIRED_VARS "_sndfile_library" "SndFile_INCLUDE_DIR"
- VERSION_VAR "SndFile_VERSION")
-
-if(SndFile_FOUND AND NOT TARGET SndFile::sndfile)
- add_library(SndFile::sndfile UNKNOWN IMPORTED)
- set_target_properties(
- SndFile::sndfile
- PROPERTIES IMPORTED_LOCATION "${_sndfile_library}"
- INTERFACE_COMPILE_OPTIONS "${_sndfile_compile_options}"
- INTERFACE_INCLUDE_DIRECTORIES "${SndFile_INCLUDE_DIR}"
- INTERFACE_LINK_LIBRARIES "${_sndfile_link_libraries}"
- INTERFACE_LINK_DIRECTORIES "${_sndfile_link_directories}")
-
- # Set additional variables for compatibility with upstream config
- set(SNDFILE_FOUND TRUE)
- set(SndFile_LIBRARY SndFile::sndfile)
- set(SndFile_LIBRARIES SndFile::sndfile)
- set(SNDFILE_LIBRARY SndFile::sndfile)
- set(SNDFILE_LIBRARIES SndFile::sndfile)
- set(SNDFILE_INCLUDE_DIR "${SndFile_INCLUDE_DIR}")
-endif()
-
-mark_as_advanced(_sndfile_library)

@ -7,10 +7,10 @@ package("fluidsynth")
add_urls("https://github.com/FluidSynth/fluidsynth/archive/refs/tags/$(version).zip",
"https://github.com/FluidSynth/fluidsynth.git")
add_versions("v2.3.3", "0ab6f1aae1c7652b9249de2d98070313f3083046fddd673277556f1cca65568e")
add_versions("v2.3.5", "3cdaa24777f11fbc6da506d7f7b41fef31822006f83886dcf6e758a9941cae40")
if is_plat("windows", "macosx") then
add_patches("v2.3.3", path.join(os.scriptdir(), "patches", "find-intl.patch"), "dafdb8f11957ed2f396832fe3b63933e8a32b96d8c836166b2fefacf3f918a9d")
end
add_patches("v2.3.3", path.join(os.scriptdir(), "patches", "2.3.3", "find-intl.patch"), "0c80989cce85b8e69409498e3a5d1df41c1ce29bf11261bcb441fdbf08c42f85")
add_patches("v2.3.5", path.join(os.scriptdir(), "patches", "2.3.5", "find-intl.patch"), "b71c50191e3799e93606b2cf79e61098bdf52d681bd3e758103d2c43c192bfc5")
add_configs("aufile", {description = "Compile support for sound file output", default = true, type = "boolean"})
add_configs("dbus", {description = "Compile DBUS support", default = not is_plat("windows"), type = "boolean"})
@ -21,6 +21,7 @@ package("fluidsynth")
add_configs("sdl2", {description = "Compile SDL2 audio support ", default = false, type = "boolean"})
if is_plat("linux") then
add_configs("pulseaudio", {description = "Compile PulseAudio support", default = false, type = "boolean"})
add_configs("systemd", {description = "Compile systemd support", default = true, type = "boolean"})
end
add_configs("readline", {description = "Compile support for sound file output", default = false, type = "boolean"})
add_configs("threads", {description = "Enable multi-threading support (such as parallel voice synthesis)", default = true, type = "boolean"})
@ -31,14 +32,15 @@ package("fluidsynth")
add_deps("cmake")
add_deps("glib")
add_deps("libiconv")
if is_plat("windows") then
add_deps("libintl")
add_deps("libiconv")
add_deps("pkgconf")
add_syslinks("ws2_32")
elseif is_plat("linux") then
add_deps("libiconv")
add_deps("pkg-config")
else
elseif is_plat("macosx") then
add_deps("libiconv", {system = true})
add_deps("libintl")
add_deps("pkg-config")
end
@ -64,7 +66,7 @@ package("fluidsynth")
on_install("windows", "linux", "macosx", function (package)
local configs = {}
local configopts = {
"aufile", "dbus", "jack", "libsndfile", "opensles", "network", "sdl2", "readline", "pulseaudio", "threads", "openmp"
"aufile", "dbus", "jack", "libsndfile", "opensles", "network", "sdl2", "readline", "pulseaudio", "systemd", "threads", "openmp"
}
for _, config in ipairs(configopts) do
table.insert(configs, "-Denable-" .. config .. "=" .. (package:config(config) and "ON" or "OFF"))

Loading…
Cancel
Save