From ed2b96f05b41b7b20dce47d16880f32826cc5ed5 Mon Sep 17 00:00:00 2001 From: Andrej Redeky <41929176+WSSDude@users.noreply.github.com> Date: Sun, 16 Jul 2023 02:35:02 +0200 Subject: [PATCH] Add libsamplerate 0.2.2 (#2331) * Add libsamplerate 0.2.2 * Update xmake.lua --------- Co-authored-by: ruki --- packages/l/libsamplerate/xmake.lua | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 packages/l/libsamplerate/xmake.lua diff --git a/packages/l/libsamplerate/xmake.lua b/packages/l/libsamplerate/xmake.lua new file mode 100644 index 000000000..353d917ef --- /dev/null +++ b/packages/l/libsamplerate/xmake.lua @@ -0,0 +1,27 @@ +package("libsamplerate") + + set_homepage("http://libsndfile.github.io/libsamplerate/") + set_description("An audio Sample Rate Conversion library") + set_license("BSD-2-Clause") + + add_urls("https://github.com/libsndfile/libsamplerate/archive/$(version).tar.gz", + "https://github.com/libsndfile/libsamplerate.git") + + add_versions("0.2.2", "16e881487f184250deb4fcb60432d7556ab12cb58caea71ef23960aec6c0405a") + + add_deps("cmake") + + on_install("windows", "linux", "macosx", "iphoneos", "mingw", "android", function (package) + local configs = {} + table.insert(configs, "-DBUILD_PROGRAMS=OFF") + table.insert(configs, "-DBUILD_EXAMPLES=OFF") + table.insert(configs, "-DBUILD_TESTING=OFF") + table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) + table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) + table.insert(configs, "-DLIBSAMPLERATE_EXAMPLES=OFF") + import("package.tools.cmake").install(package, configs) + end) + + on_test(function (package) + assert(package:has_cfuncs("src_simple", {includes = "samplerate.h"})) + end)