From 5e4b227f68d9241001e73ed080b411d4bbe53c7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Thu, 26 Dec 2024 19:48:06 +0300 Subject: [PATCH 01/13] init --- packages/p/pffft/port/xmake.lua | 20 ++++++++++++++++++++ packages/p/pffft/xmake.lua | 28 ++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 packages/p/pffft/port/xmake.lua create mode 100644 packages/p/pffft/xmake.lua diff --git a/packages/p/pffft/port/xmake.lua b/packages/p/pffft/port/xmake.lua new file mode 100644 index 00000000000..dd428d3dc27 --- /dev/null +++ b/packages/p/pffft/port/xmake.lua @@ -0,0 +1,20 @@ +add_rules("mode.debug", "mode.release") + +option("nosimd") + set_default(false) + set_description("Build without SIMD support.") + add_defines("PFFFT_SIMD_DISABLE") + +target("pffft") + set_kind("$(kind)") + add_options("nosimd") + if is_kind("shared") then + add_rules("utils.symbols.export_all") + end + add_files("*.c") + add_headerfiles("*.h") + if not is_plat("windows") then + add_syslinks("m") + else + add_defines("_USE_MATH_DEFINES", {public = true}) + end diff --git a/packages/p/pffft/xmake.lua b/packages/p/pffft/xmake.lua new file mode 100644 index 00000000000..e91aa2f484d --- /dev/null +++ b/packages/p/pffft/xmake.lua @@ -0,0 +1,28 @@ +package("pffft") + + set_homepage("https://bitbucket.org/jpommier/pffft/") + set_description("PFFFT, a pretty fast Fourier Transform.") + set_license("BSD-like (FFTPACK license)") + + add_urls("https://bitbucket.org/jpommier/pffft/get/$(version).zip") + add_versions("02fe7715a5bf", "81e1b91bad77092681e5ed6c2eef1a3bae7eb2154d3358a10c663867cd947396") + + add_configs("nosimd", {description = "Build without SIMD support.", default = false, type = "boolean"}) + + add_deps("cmake") + if not is_plat("windows") then + add_syslinks("m") + end + + on_install(function (package) + os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua") + local configs = {} + if package:config("nosimd") then + table.insert(configs, "-DPFFFT_SIMD_DISABLE=ON") + end + import("package.tools.xmake").install(package, configs) + end) + + on_test(function (package) + assert(package:has_cfuncs("pffft_simd_size", {includes = "pffft.h"})) + end) From eb985c378b1678d6ca6e68586f404cdfa4a483b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Thu, 26 Dec 2024 21:00:13 +0300 Subject: [PATCH 02/13] revise url --- packages/p/pffft/xmake.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/p/pffft/xmake.lua b/packages/p/pffft/xmake.lua index e91aa2f484d..fe163a6d085 100644 --- a/packages/p/pffft/xmake.lua +++ b/packages/p/pffft/xmake.lua @@ -3,13 +3,9 @@ package("pffft") set_homepage("https://bitbucket.org/jpommier/pffft/") set_description("PFFFT, a pretty fast Fourier Transform.") set_license("BSD-like (FFTPACK license)") - - add_urls("https://bitbucket.org/jpommier/pffft/get/$(version).zip") - add_versions("02fe7715a5bf", "81e1b91bad77092681e5ed6c2eef1a3bae7eb2154d3358a10c663867cd947396") - + add_urls("https://bitbucket.org/jpommier/pffft.git") add_configs("nosimd", {description = "Build without SIMD support.", default = false, type = "boolean"}) - add_deps("cmake") if not is_plat("windows") then add_syslinks("m") end From 9083e591935e6711ea70205f651f837eaafaa0d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Thu, 26 Dec 2024 21:16:12 +0300 Subject: [PATCH 03/13] check nosimd --- packages/p/pffft/xmake.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/p/pffft/xmake.lua b/packages/p/pffft/xmake.lua index fe163a6d085..f81b84a5f1a 100644 --- a/packages/p/pffft/xmake.lua +++ b/packages/p/pffft/xmake.lua @@ -4,7 +4,7 @@ package("pffft") set_description("PFFFT, a pretty fast Fourier Transform.") set_license("BSD-like (FFTPACK license)") add_urls("https://bitbucket.org/jpommier/pffft.git") - add_configs("nosimd", {description = "Build without SIMD support.", default = false, type = "boolean"}) + add_configs("nosimd", {description = "Build without SIMD support.", default = true, type = "boolean"}) if not is_plat("windows") then add_syslinks("m") @@ -12,10 +12,6 @@ package("pffft") on_install(function (package) os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua") - local configs = {} - if package:config("nosimd") then - table.insert(configs, "-DPFFFT_SIMD_DISABLE=ON") - end import("package.tools.xmake").install(package, configs) end) From 215de29fdf41427fadfdd5acb91be21699a011e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Thu, 26 Dec 2024 21:26:16 +0300 Subject: [PATCH 04/13] revise adding files --- packages/p/pffft/port/xmake.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/p/pffft/port/xmake.lua b/packages/p/pffft/port/xmake.lua index dd428d3dc27..e7522600f38 100644 --- a/packages/p/pffft/port/xmake.lua +++ b/packages/p/pffft/port/xmake.lua @@ -11,8 +11,8 @@ target("pffft") if is_kind("shared") then add_rules("utils.symbols.export_all") end - add_files("*.c") - add_headerfiles("*.h") + add_files("fftpack.c", "pffft.c") + add_headerfiles("fftpack.h", "pffft.h") if not is_plat("windows") then add_syslinks("m") else From e9084dc81b0c3cfe481d8279973512853d4f5814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Thu, 26 Dec 2024 21:40:36 +0300 Subject: [PATCH 05/13] check simd support --- packages/p/pffft/xmake.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/p/pffft/xmake.lua b/packages/p/pffft/xmake.lua index f81b84a5f1a..fe911491b04 100644 --- a/packages/p/pffft/xmake.lua +++ b/packages/p/pffft/xmake.lua @@ -4,7 +4,7 @@ package("pffft") set_description("PFFFT, a pretty fast Fourier Transform.") set_license("BSD-like (FFTPACK license)") add_urls("https://bitbucket.org/jpommier/pffft.git") - add_configs("nosimd", {description = "Build without SIMD support.", default = true, type = "boolean"}) + add_configs("nosimd", {description = "Build without SIMD support.", default = false, type = "boolean"}) if not is_plat("windows") then add_syslinks("m") From f6520d546661c43bc997a775347b6c9321c4b0e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Fri, 27 Dec 2024 08:36:14 +0300 Subject: [PATCH 06/13] fmt --- packages/p/pffft/port/xmake.lua | 2 +- packages/p/pffft/xmake.lua | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/p/pffft/port/xmake.lua b/packages/p/pffft/port/xmake.lua index e7522600f38..21beff92cec 100644 --- a/packages/p/pffft/port/xmake.lua +++ b/packages/p/pffft/port/xmake.lua @@ -1,6 +1,6 @@ add_rules("mode.debug", "mode.release") -option("nosimd") +option("simd") set_default(false) set_description("Build without SIMD support.") add_defines("PFFFT_SIMD_DISABLE") diff --git a/packages/p/pffft/xmake.lua b/packages/p/pffft/xmake.lua index fe911491b04..8319a4e5269 100644 --- a/packages/p/pffft/xmake.lua +++ b/packages/p/pffft/xmake.lua @@ -3,8 +3,10 @@ package("pffft") set_homepage("https://bitbucket.org/jpommier/pffft/") set_description("PFFFT, a pretty fast Fourier Transform.") set_license("BSD-like (FFTPACK license)") + add_urls("https://bitbucket.org/jpommier/pffft.git") - add_configs("nosimd", {description = "Build without SIMD support.", default = false, type = "boolean"}) + + add_configs("simd", {description = "Build without SIMD support.", default = true, type = "boolean"}) if not is_plat("windows") then add_syslinks("m") From cde87ae394c2bf22b5a4045de86f7601f74ec3c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Fri, 27 Dec 2024 09:29:39 +0300 Subject: [PATCH 07/13] fixup option --- packages/p/pffft/port/xmake.lua | 11 ++++------- packages/p/pffft/xmake.lua | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/p/pffft/port/xmake.lua b/packages/p/pffft/port/xmake.lua index 21beff92cec..2455fbff1d3 100644 --- a/packages/p/pffft/port/xmake.lua +++ b/packages/p/pffft/port/xmake.lua @@ -1,14 +1,11 @@ add_rules("mode.debug", "mode.release") -option("simd") - set_default(false) - set_description("Build without SIMD support.") - add_defines("PFFFT_SIMD_DISABLE") - target("pffft") set_kind("$(kind)") - add_options("nosimd") - if is_kind("shared") then + if not has_config("simd") then + add_defines("PFFFT_SIMD_DISABLE") + end + if is_kind("shared") and is_plat("windows") then add_rules("utils.symbols.export_all") end add_files("fftpack.c", "pffft.c") diff --git a/packages/p/pffft/xmake.lua b/packages/p/pffft/xmake.lua index 8319a4e5269..37425b2a61f 100644 --- a/packages/p/pffft/xmake.lua +++ b/packages/p/pffft/xmake.lua @@ -6,7 +6,7 @@ package("pffft") add_urls("https://bitbucket.org/jpommier/pffft.git") - add_configs("simd", {description = "Build without SIMD support.", default = true, type = "boolean"}) + add_configs("simd", {description = "Build with SIMD support.", default = true, type = "boolean"}) if not is_plat("windows") then add_syslinks("m") From c713984d16b7f6e563060ac59b1353cbffe148de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Fri, 27 Dec 2024 10:06:57 +0300 Subject: [PATCH 08/13] add_options("simd") --- packages/p/pffft/port/xmake.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/p/pffft/port/xmake.lua b/packages/p/pffft/port/xmake.lua index 2455fbff1d3..712e73f77d3 100644 --- a/packages/p/pffft/port/xmake.lua +++ b/packages/p/pffft/port/xmake.lua @@ -2,6 +2,7 @@ add_rules("mode.debug", "mode.release") target("pffft") set_kind("$(kind)") + add_options("simd") if not has_config("simd") then add_defines("PFFFT_SIMD_DISABLE") end From 0fa1eb71a3dd71d134a8ea7436c8fce1ecdb5db4 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 27 Dec 2024 15:11:19 +0800 Subject: [PATCH 09/13] Update xmake.lua --- packages/p/pffft/port/xmake.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/p/pffft/port/xmake.lua b/packages/p/pffft/port/xmake.lua index 712e73f77d3..661e471ee52 100644 --- a/packages/p/pffft/port/xmake.lua +++ b/packages/p/pffft/port/xmake.lua @@ -1,8 +1,9 @@ add_rules("mode.debug", "mode.release") +option("simd", {default = true, description = "Build with simd"}) + target("pffft") set_kind("$(kind)") - add_options("simd") if not has_config("simd") then add_defines("PFFFT_SIMD_DISABLE") end From 10124fc505ead7dbb1562e551e4aac22e63c2836 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 27 Dec 2024 15:12:04 +0800 Subject: [PATCH 10/13] Update xmake.lua --- packages/p/pffft/xmake.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/p/pffft/xmake.lua b/packages/p/pffft/xmake.lua index 37425b2a61f..74b7d5b181d 100644 --- a/packages/p/pffft/xmake.lua +++ b/packages/p/pffft/xmake.lua @@ -14,6 +14,8 @@ package("pffft") on_install(function (package) os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua") + local configs = {} + configs.simd = package:config("simd") import("package.tools.xmake").install(package, configs) end) From aa22078c07f1ca91fc1382c4173411be9908d83d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Fri, 27 Dec 2024 10:42:46 +0300 Subject: [PATCH 11/13] revise urls, ver --- packages/p/pffft/xmake.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/p/pffft/xmake.lua b/packages/p/pffft/xmake.lua index 74b7d5b181d..2f8a184cf0f 100644 --- a/packages/p/pffft/xmake.lua +++ b/packages/p/pffft/xmake.lua @@ -4,8 +4,9 @@ package("pffft") set_description("PFFFT, a pretty fast Fourier Transform.") set_license("BSD-like (FFTPACK license)") - add_urls("https://bitbucket.org/jpommier/pffft.git") - + add_urls("https://bitbucket.org/jpommier/pffft/$(version).tar.gz", + "https://bitbucket.org/jpommier/pffft.git") + add_versions("02fe7715a5bf8bfd914681c53429600f94e0f536", "9adeb18ac7bb52e9fb921c31c0c6a4e9ae150cc6fcb20a899d4b3a2275176ded") add_configs("simd", {description = "Build with SIMD support.", default = true, type = "boolean"}) if not is_plat("windows") then From a9a061d75eb9f1c6ac444345a4e25bf902e69a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Fri, 27 Dec 2024 12:36:57 +0300 Subject: [PATCH 12/13] revise versioning --- packages/p/pffft/xmake.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/p/pffft/xmake.lua b/packages/p/pffft/xmake.lua index 2f8a184cf0f..542a4d60d88 100644 --- a/packages/p/pffft/xmake.lua +++ b/packages/p/pffft/xmake.lua @@ -4,9 +4,15 @@ package("pffft") set_description("PFFFT, a pretty fast Fourier Transform.") set_license("BSD-like (FFTPACK license)") - add_urls("https://bitbucket.org/jpommier/pffft/$(version).tar.gz", - "https://bitbucket.org/jpommier/pffft.git") - add_versions("02fe7715a5bf8bfd914681c53429600f94e0f536", "9adeb18ac7bb52e9fb921c31c0c6a4e9ae150cc6fcb20a899d4b3a2275176ded") + add_urls("https://bitbucket.org/jpommier/pffft/$(version)", {version = function (version) + local hash = "02fe7715a5bf8bfd914681c53429600f94e0f536" + if version:le("2024+100") then + hash = "02fe7715a5bf8bfd914681c53429600f94e0f536" + end + return "get/" .. hash .. ".tar.gz" + end}) + add_versions("2024+100", "9adeb18ac7bb52e9fb921c31c0c6a4e9ae150cc6fcb20a899d4b3a2275176ded") + add_configs("simd", {description = "Build with SIMD support.", default = true, type = "boolean"}) if not is_plat("windows") then From 4cf22214c82a6ae5960bec9e45f5920cdc386ba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=8F=E3=82=89=E3=81=BF=E3=81=93?= Date: Fri, 27 Dec 2024 14:01:15 +0300 Subject: [PATCH 13/13] revise versioning --- packages/p/pffft/xmake.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/p/pffft/xmake.lua b/packages/p/pffft/xmake.lua index 542a4d60d88..a2708347493 100644 --- a/packages/p/pffft/xmake.lua +++ b/packages/p/pffft/xmake.lua @@ -6,12 +6,12 @@ package("pffft") add_urls("https://bitbucket.org/jpommier/pffft/$(version)", {version = function (version) local hash = "02fe7715a5bf8bfd914681c53429600f94e0f536" - if version:le("2024+100") then + if version:le("2024.11.29") then hash = "02fe7715a5bf8bfd914681c53429600f94e0f536" end return "get/" .. hash .. ".tar.gz" end}) - add_versions("2024+100", "9adeb18ac7bb52e9fb921c31c0c6a4e9ae150cc6fcb20a899d4b3a2275176ded") + add_versions("2024.11.29", "9adeb18ac7bb52e9fb921c31c0c6a4e9ae150cc6fcb20a899d4b3a2275176ded") add_configs("simd", {description = "Build with SIMD support.", default = true, type = "boolean"})