Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
cafbb9a
Add Mumble dependency packages
phreed Sep 10, 2025
5cf5b1f
Merge branch 'main' of https://github.com/conda-forge/staged-recipes …
phreed Sep 10, 2025
c2cc65d
Convert speexdsp from building with autotools to building with cmake
phreed Sep 10, 2025
3afdf98
Simplified build scripts and properly separated tests from build
phreed Sep 11, 2025
e26c88d
Simplify the speexdsp build
phreed Sep 11, 2025
9420b2a
Merge branch 'main' into mumble-deps
phreed Sep 17, 2025
91e3bf1
Merge branch 'main' into mumble-deps
phreed Sep 30, 2025
56c51b6
Merge branch 'main' into mumble-deps
phreed Oct 1, 2025
12f7297
Update build.nu
phreed Oct 1, 2025
5e693cd
Merge branch 'mumble-deps' of github.com:FreeTAKTeam/staged-recipes i…
phreed Oct 1, 2025
6a56337
When building paths with nushell do not just contatenate strings
phreed Oct 6, 2025
7467142
Merge branch 'main' into mumble-deps
phreed Oct 6, 2025
17e67f0
Fix Windows CMake path escaping issues
phreed Oct 6, 2025
d36b821
remove all but speexdsp
phreed Nov 14, 2025
ede1176
Merge branch 'main' into speexdsp
phreed Nov 14, 2025
c60a22a
Merge branch 'main' into speexdsp
phreed Nov 17, 2025
1d25947
Merge branch 'main' into speexdsp
phreed Nov 19, 2025
6e9d1a7
simplify the recipe.yaml and reduce the number of files generally,
phreed Nov 19, 2025
1107cd5
Update recipe.yaml
phreed Nov 21, 2025
3739b3c
aligned cmake behavior with https://github.com/xiph/speexdsp/pull/53
phreed Nov 24, 2025
f99a208
use the proper upstream source
phreed Nov 24, 2025
1a0e482
Merge remote-tracking branch 'upstream' into speexdsp
phreed Mar 24, 2026
40fcab0
Update recipe.yaml
phreed Mar 24, 2026
3e590ac
Merge branch 'main' into speexdsp
phreed Mar 25, 2026
7d83632
some files not being added on the windows build
phreed Mar 25, 2026
acdadc4
Merge branch 'speexdsp' of github.com:FreeTAKTeam/staged-recipes into…
phreed Mar 25, 2026
0e81b37
Update readme.md
phreed Mar 25, 2026
b47ca35
Merge branch 'main' into speexdsp
phreed Mar 25, 2026
8048862
Update recipe.yaml
phreed Mar 25, 2026
d306e52
Merge branch 'main' into speexdsp
phreed Mar 25, 2026
0d3f374
the .lib file was not produced on windows
phreed Mar 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions recipes/speexdsp/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SpeexDSP Recipe - Windows Build Modernization

This recipe packages the SpeexDSP library, a patent-free, Open Source/Free Software DSP library derived from Speex.
This recipe has been modernized to use industry-standard Windows development tools (CMake + MSVC) instead of legacy MSYS2/autotools.
https://conda-forge.org/docs/maintainer/knowledge_base/#moving-from-an-autotools-build-to-a-cmake-build

While there is tooling to make autotools work on Windows,
I have found reworking the project to use CMake regardless of platform is clearer and gives consistent builds.
There is an outstanding issue and branch which add CMake support.

* https://gitlab.xiph.org/xiph/speexdsp/-/issues/17
* https://gitlab.com/babeloff/speexdsp/-/tree/cmake

The `src` files in this project are copied from that branch.
105 changes: 105 additions & 0 deletions recipes/speexdsp/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
schema_version: 1

context:
version: "1.2.1"

package:
name: speexdsp
version: ${{ version }}

source:
- url: https://gitlab.xiph.org/xiph/speexdsp/-/archive/SpeexDSP-${{ version }}/speexdsp-SpeexDSP-${{ version }}.tar.gz
sha256: d17ca363654556a4ff1d02cc13d9eb1fc5a8642c90b40bd54ce266c3807b91a7
- path: ./src/
target_directory: "./"

build:
number: 0
script:
- if: win
then: |
cmake -GNinja -DBUILD_SHARED_LIBS=ON %CMAKE_ARGS% %SRC_DIR%
cmake --build . --config Release
cmake --install . --config Release
else: |
cmake -GNinja -DBUILD_SHARED_LIBS=ON $CMAKE_ARGS $SRC_DIR
cmake --build . --config Release
cmake --install . --config Release

requirements:
build:
- ${{ compiler('cxx') }}
- ${{ compiler('c') }}
- ${{ stdlib('c') }}
- cmake
- ninja
- if: win
then:
- vs2022_win-64
host:
- if: linux
then:
- libgomp >=4.0
run:
- if: linux
then:
- libgomp >=4.0

tests:
- package_contents:
lib:
- speexdsp
include:
- speex/speex_preprocess.h
- speex/speexdsp_config_types.h
- speex/speex_buffer.h
- speex/speex_echo.h
- speex/speex_jitter.h
- speex/speex_preprocess.h
- speex/speex_resampler.h
- speex/speexdsp_config_types.h
- speex/speexdsp_types.h

files:
exists:
- if: win
then:
- Library/lib/pkgconfig/speexdsp.pc
- Library/lib/cmake/speexdsp/speexdspConfig.cmake
- Library/lib/cmake/speexdsp/speexdspConfigVersion.cmake
else:
- lib/pkgconfig/speexdsp.pc
- lib/cmake/speexdsp/speexdspConfig.cmake
- lib/cmake/speexdsp/speexdspConfigVersion.cmake

about:
homepage: https://speex.org/
summary: SpeexDSP is a patent-free, Open Source/Free Software DSP library derived from Speex
description: |
SpeexDSP is a patent-free, Open Source/Free Software DSP library derived from Speex.

It is designed to be a simple, small-footprint audio processing library that is
especially suitable for embedded applications. The library provides:

- Echo cancellation
- Noise reduction
- Automatic gain control
- Voice activity detection
- Resampling

SpeexDSP was split off from the main Speex project to allow more modular use
of the DSP functionality without requiring the codec components.

This package uses modern build tools:
- Unix/Linux: autotools (configure, make)
- Windows: CMake with MSVC (Visual Studio Build Tools)
- macOS: autotools with clang
license: BSD-3-Clause
license_file: COPYING
documentation: https://speex.org/docs/
repository: https://github.com/xiph/speexdsp

extra:
recipe-maintainers:
- phreed
feedstock-name: speexdsp
173 changes: 173 additions & 0 deletions recipes/speexdsp/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
cmake_minimum_required(VERSION 3.10)

project(speexdsp
VERSION 1.2.1
DESCRIPTION "speexdsp audio processing library"
LANGUAGES C
)

include(GNUInstallDirs)
include(CheckIncludeFile)
include(CheckTypeSize)
include(CheckFunctionExists)
include(TestBigEndian)

option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
option(USE_FIXED_POINT "Use fixed-point arithmetic" OFF)

# Fixed vs. floating-point arithmetic (used by config.h.in via #cmakedefine)
if(USE_FIXED_POINT)
set(FIXED_POINT 1)
else()
set(FLOATING_POINT 1)
endif()

# Check for headers
check_include_file(stdint.h HAVE_STDINT_H)
check_include_file(alloca.h HAVE_ALLOCA_H)
check_include_file(memory.h HAVE_MEMORY_H)
check_include_file(strings.h HAVE_STRINGS_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
check_include_file(unistd.h HAVE_UNISTD_H)
check_include_file(dlfcn.h HAVE_DLFCN_H)

# Check for alloca
check_function_exists(alloca HAVE_ALLOCA)
if(HAVE_ALLOCA)
set(USE_ALLOCA 1)
endif()

# Check endianness
test_big_endian(WORDS_BIGENDIAN)

# Check sizes of integer types
check_type_size("short" SIZEOF_SHORT)
check_type_size("int" SIZEOF_INT)
check_type_size("long" SIZEOF_LONG)

# Set type definitions based on size checks
if(SIZEOF_SHORT EQUAL 2)
set(SIZE16 "short")
set(USIZE16 "unsigned short")
elseif(SIZEOF_INT EQUAL 2)
set(SIZE16 "int")
set(USIZE16 "unsigned int")
else()
set(SIZE16 "int16_t")
set(USIZE16 "uint16_t")
endif()

if(SIZEOF_INT EQUAL 4)
set(SIZE32 "int")
set(USIZE32 "unsigned int")
elseif(SIZEOF_LONG EQUAL 4)
set(SIZE32 "long")
set(USIZE32 "unsigned long")
else()
set(SIZE32 "int32_t")
set(USIZE32 "uint32_t")
endif()

# Tell source files to include config.h
add_compile_definitions(HAVE_CONFIG_H)

# Generate config.h (replaces the autoconf-generated file)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/config.h.in"
"${CMAKE_BINARY_DIR}/config.h"
@ONLY
)

# Generate speexdsp_config_types.h
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/include/speex")
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/speexdsp_config_types.h.in"
"${CMAKE_BINARY_DIR}/include/speex/speexdsp_config_types.h"
@ONLY
)

# Include directories
include_directories(
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/libspeexdsp
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/include
${CMAKE_BINARY_DIR}/include/speex
)

# Source files (exclude test programs)
file(GLOB SPEEXDSP_SOURCES libspeexdsp/*.c)
list(REMOVE_ITEM SPEEXDSP_SOURCES
${CMAKE_SOURCE_DIR}/libspeexdsp/testdenoise.c
${CMAKE_SOURCE_DIR}/libspeexdsp/testecho.c
${CMAKE_SOURCE_DIR}/libspeexdsp/testjitter.c
${CMAKE_SOURCE_DIR}/libspeexdsp/testresample.c
${CMAKE_SOURCE_DIR}/libspeexdsp/testresample2.c
)

add_library(speexdsp ${SPEEXDSP_SOURCES})

# On Windows, auto-export all symbols so an import library (.lib) is generated
set_target_properties(speexdsp PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)

# Link math library if available
find_library(MATH_LIBRARY m)
if(MATH_LIBRARY)
target_link_libraries(speexdsp PRIVATE ${MATH_LIBRARY})
endif()

target_include_directories(speexdsp PUBLIC
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)

# Installation rules
install(TARGETS speexdsp
EXPORT speexdspTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(FILES "${CMAKE_BINARY_DIR}/include/speex/speexdsp_config_types.h"
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/speex
)

# Create and install pkg-config file
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/speexdsp.pc.in"
"${CMAKE_BINARY_DIR}/speexdsp.pc"
@ONLY
)
install(FILES "${CMAKE_BINARY_DIR}/speexdsp.pc"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
)

# Create CMake package config files
include(CMakePackageConfigHelpers)

configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/speexdspConfig.cmake.in"
"${CMAKE_BINARY_DIR}/speexdspConfig.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/speexdsp
)

write_basic_package_version_file(
"${CMAKE_BINARY_DIR}/speexdspConfigVersion.cmake"
VERSION ${PROJECT_VERSION}
COMPATIBILITY SameMajorVersion
)

install(EXPORT speexdspTargets
FILE speexdspTargets.cmake
NAMESPACE speexdsp::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/speexdsp
)

install(FILES
"${CMAKE_BINARY_DIR}/speexdspConfig.cmake"
"${CMAKE_BINARY_DIR}/speexdspConfigVersion.cmake"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/speexdsp
)
8 changes: 8 additions & 0 deletions recipes/speexdsp/src/cmake/SpeexDSPConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SpeexDSPConfig.cmake.in - compatibility shim
# This file is superseded by speexdspConfig.cmake.in.
# It is retained only to avoid breaking any existing references to the
# capital-S name; the canonical configuration is speexdspConfig.cmake.in.

@PACKAGE_INIT@

include("${CMAKE_CURRENT_LIST_DIR}/speexdspConfig.cmake")
92 changes: 92 additions & 0 deletions recipes/speexdsp/src/cmake/config.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/* cmake/config.h.in - CMake configuration header template for SpeexDSP */

#ifndef CONFIG_H
#define CONFIG_H

/* Version information */
#define PACKAGE_VERSION "@PROJECT_VERSION@"
#define VERSION "@PROJECT_VERSION@"
#define PACKAGE_NAME "@PROJECT_NAME@"
#define PACKAGE_STRING "@PROJECT_NAME@ @PROJECT_VERSION@"

/* Package metadata */
#define PACKAGE "speexdsp"
#define PACKAGE_BUGREPORT "speex-dev@xiph.org"
#define PACKAGE_TARNAME "speexdsp"
#define PACKAGE_URL ""

/* Build configuration */
#cmakedefine FLOATING_POINT
#cmakedefine FIXED_POINT

/* FFT implementation */
#define USE_KISS_FFT 1

/* Platform-specific definitions */
#ifdef _WIN32
#define HAVE_ALLOCA 1
#define USE_ALLOCA 1
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#ifndef EXPORT
#define EXPORT
#endif
#else
#cmakedefine HAVE_ALLOCA_H
#cmakedefine HAVE_ALLOCA
#cmakedefine USE_ALLOCA
#define EXPORT
#endif

/* Standard headers */
#cmakedefine HAVE_STDINT_H
#define HAVE_INTTYPES_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#cmakedefine HAVE_MEMORY_H
#cmakedefine HAVE_STRINGS_H
#cmakedefine HAVE_SYS_STAT_H
#cmakedefine HAVE_SYS_TYPES_H
#cmakedefine HAVE_UNISTD_H
#cmakedefine HAVE_DLFCN_H

/* Integer sizes */
#define SIZEOF_SHORT @SIZEOF_SHORT@
#define SIZEOF_INT @SIZEOF_INT@
#ifdef _WIN64
#define SIZEOF_LONG 4
#else
#define SIZEOF_LONG @SIZEOF_LONG@
#endif

/* Variable length arrays */
#ifdef _MSC_VER
#undef VAR_ARRAYS
#define USE_ALLOCA 1
#include <malloc.h>
#define ALLOC(var, size, type) type *var = (type*)_alloca(sizeof(type)*(size))
#else
#define VAR_ARRAYS 1
#define ALLOC(var, size, type) type var[size]
#endif

/* Endianness */
#cmakedefine WORDS_BIGENDIAN

/* ANSI C headers */
#define STDC_HEADERS 1

/* libtool object directory */
#define LT_OBJDIR ".libs/"

/* Compiler keyword compatibility */
#ifdef _MSC_VER
#define inline __inline
#define restrict __restrict
#endif
#ifndef _MSC_VER
#define typeof __typeof__
#endif

#endif /* CONFIG_H */
Loading
Loading