summaryrefslogtreecommitdiff
path: root/math/kfr
diff options
context:
space:
mode:
Diffstat (limited to 'math/kfr')
-rw-r--r--math/kfr/Makefile15
-rw-r--r--math/kfr/distinfo6
-rw-r--r--math/kfr/files/patch-CMakeLists.txt19
-rw-r--r--math/kfr/files/patch-tools_CMakeLists.txt10
-rw-r--r--math/kfr/files/patch-tools_sample__rate__converter.cpp11
-rw-r--r--math/kfr/pkg-plist1
6 files changed, 54 insertions, 8 deletions
diff --git a/math/kfr/Makefile b/math/kfr/Makefile
index 47ac1b10a450..d314966dedcb 100644
--- a/math/kfr/Makefile
+++ b/math/kfr/Makefile
@@ -1,5 +1,5 @@
PORTNAME= kfr
-DISTVERSION= 6.1.1
+DISTVERSION= 6.3.0
CATEGORIES= math
MAINTAINER= yuri@FreeBSD.org
@@ -18,7 +18,7 @@ USES= cmake:testing compiler:c++17-lang
USE_GITHUB= yes
GH_ACCOUNT= kfrlib
-CMAKE_ON= BUILD_SHARED_LIBS
+CMAKE_ON= BUILD_SHARED_LIBS ENABLE_EXAMPLES
CMAKE_TESTING_ON= ENABLE_TESTS
CMAKE_TESTING_TARGET= ${ALL_TARGET}
@@ -27,7 +27,7 @@ CMAKE_ARGS_armv6= -DCMT_FORCE_GENERIC_CPU=1 # to fix: ARM builds require NEON su
.include <bsd.port.options.mk>
-.if ${ARCH} == amd64 || ${ARCH} == i386
+.ifndef CPUTYPE && (${ARCH} == amd64 || ${ARCH} == i386)
PLIST_FILES= lib/libkfr_dft_avx.so \
lib/libkfr_dft_avx2.so \
lib/libkfr_dft_avx512.so \
@@ -38,12 +38,17 @@ PLIST_FILES= lib/libkfr_dft_avx.so \
lib/libkfr_dsp_avx512.so \
lib/libkfr_dsp_sse2.so \
lib/libkfr_dsp_sse41.so
+.else
+CMAKE_OFF= KFR_ENABLE_MULTIARCH
+PLIST_FILES= lib/libkfr_dft.so \
+ lib/libkfr_dsp.so
.endif
+post-install:
+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/bin/sample_rate_converter ${STAGEDIR}${PREFIX}/bin/kfr_src
+
post-test: # see https://github.com/kfrlib/kfr/issues/164
@cd ${BUILD_WRKSRC} && \
${BUILD_WRKSRC}/bin/all_tests
-# tests as of 6.1.1: [--SUCCESS--] 199/199 tests 2810450/2810450 checks
-
.include <bsd.port.mk>
diff --git a/math/kfr/distinfo b/math/kfr/distinfo
index 752e7b2efd5d..a5fdbd4e47ac 100644
--- a/math/kfr/distinfo
+++ b/math/kfr/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1737283736
-SHA256 (kfrlib-kfr-6.1.1_GH0.tar.gz) = 71ee9f807e0c6d3cc63740ffee681fa82110ab7eaf524360e9e40ef8e7cda91c
-SIZE (kfrlib-kfr-6.1.1_GH0.tar.gz) = 11273875
+TIMESTAMP = 1754130652
+SHA256 (kfrlib-kfr-6.3.0_GH0.tar.gz) = 3b2eb54edb9c1ba6d30648b47d11bd445cda4883052d592801bd5482f837162c
+SIZE (kfrlib-kfr-6.3.0_GH0.tar.gz) = 11284158
diff --git a/math/kfr/files/patch-CMakeLists.txt b/math/kfr/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..636950f32a42
--- /dev/null
+++ b/math/kfr/files/patch-CMakeLists.txt
@@ -0,0 +1,19 @@
+--- CMakeLists.txt.orig 2025-07-18 13:33:23 UTC
++++ CMakeLists.txt
+@@ -180,8 +180,6 @@ option(ENABLE_TESTS "Enable KFR tests" OFF)
+ "Multiple architectures will be built with runtime dispatch" ON)
+
+ option(ENABLE_TESTS "Enable KFR tests" OFF)
+-cmake_dependent_option(ENABLE_EXAMPLES "Enable KFR examples" ON "ENABLE_TESTS"
+- OFF)
+ if (CLANG)
+ option(KFR_ENABLE_DFT "Enable DFT and related algorithms." ON)
+ else ()
+@@ -390,7 +388,6 @@ if (ENABLE_EXAMPLES)
+ endif ()
+
+ if (ENABLE_EXAMPLES)
+- add_subdirectory(examples)
+ add_subdirectory(tools)
+ endif ()
+ if (ENABLE_TESTS)
diff --git a/math/kfr/files/patch-tools_CMakeLists.txt b/math/kfr/files/patch-tools_CMakeLists.txt
new file mode 100644
index 000000000000..13bf54e7a7b9
--- /dev/null
+++ b/math/kfr/files/patch-tools_CMakeLists.txt
@@ -0,0 +1,10 @@
+--- tools/CMakeLists.txt.orig 2025-08-02 10:33:46 UTC
++++ tools/CMakeLists.txt
+@@ -23,5 +23,5 @@ target_link_libraries(sample_rate_converter kfr kfr_ds
+ add_executable(sample_rate_converter sample_rate_converter.cpp)
+ target_link_libraries(sample_rate_converter kfr kfr_dsp kfr_io use_arch)
+
+-add_executable(ebu_test ebu_test.cpp)
+-target_link_libraries(ebu_test kfr kfr_io use_arch)
++#add_executable(ebu_test ebu_test.cpp)
++#target_link_libraries(ebu_test kfr kfr_io use_arch)
diff --git a/math/kfr/files/patch-tools_sample__rate__converter.cpp b/math/kfr/files/patch-tools_sample__rate__converter.cpp
new file mode 100644
index 000000000000..9787bbd6e27d
--- /dev/null
+++ b/math/kfr/files/patch-tools_sample__rate__converter.cpp
@@ -0,0 +1,11 @@
+--- tools/sample_rate_converter.cpp.orig 2025-08-02 11:51:50 UTC
++++ tools/sample_rate_converter.cpp
+@@ -18,7 +18,7 @@ int main(int argc, char** argv)
+ println(library_version());
+ if (argc < 4)
+ {
+- println("Usage: sample_rate_converter <INPUT_FILE> <OUTPUT_FILE> <TARGET_SAMPLE_RATE>");
++ println("Usage: kfr_src <INPUT_FILE> <OUTPUT_FILE> <TARGET_SAMPLE_RATE>");
+ println("Supported formats: WAV/W64, 16, 24, 32-bit PCM, 32, 64-bit IEEE");
+ return 1;
+ }
diff --git a/math/kfr/pkg-plist b/math/kfr/pkg-plist
index 1ea587a3ec63..f3458a431250 100644
--- a/math/kfr/pkg-plist
+++ b/math/kfr/pkg-plist
@@ -1,3 +1,4 @@
+bin/kfr_src
include/kfr/all.hpp
include/kfr/base.hpp
include/kfr/base/basic_expressions.hpp