From 5917153886099d717f61c0af276737041532af73 Mon Sep 17 00:00:00 2001 From: Evgeny Ermakov Date: Mon, 29 Nov 2021 00:50:13 +1100 Subject: [PATCH] New package: codec2-1.0.1 --- common/shlibs | 1 + srcpkgs/codec2-devel | 1 + srcpkgs/codec2/patches/cross.patch | 15 ++++++++ srcpkgs/codec2/template | 62 ++++++++++++++++++++++++++++++ 4 files changed, 79 insertions(+) create mode 120000 srcpkgs/codec2-devel create mode 100644 srcpkgs/codec2/patches/cross.patch create mode 100644 srcpkgs/codec2/template diff --git a/common/shlibs b/common/shlibs index b7e6f298a2..4edfe7d909 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4090,3 +4090,4 @@ libkmaillanguagetool.so.5 kdepim-addons-21.08.3_1 libkaddressbookmergelibprivate.so.5 kdepim-addons-21.08.3_1 libkmailconfirmbeforedeleting.so.5 kdepim-addons-21.08.3_1 libkaddressbookprivate.so.5 kaddressbook-21.08.3_1 +libcodec2.so.1.0 codec2-1.0.1_1 diff --git a/srcpkgs/codec2-devel b/srcpkgs/codec2-devel new file mode 120000 index 0000000000..d959612878 --- /dev/null +++ b/srcpkgs/codec2-devel @@ -0,0 +1 @@ +codec2 \ No newline at end of file diff --git a/srcpkgs/codec2/patches/cross.patch b/srcpkgs/codec2/patches/cross.patch new file mode 100644 index 0000000000..46b52c0b80 --- /dev/null +++ b/srcpkgs/codec2/patches/cross.patch @@ -0,0 +1,15 @@ +# reason: +# [110/327] Generating codebookjvm.c +# FAILED: src/codebookjvm.c /builddir/codec2-1.0.1/build/src/codebookjvm.c +# /bin/sh: line 1: /builddir/codec2-1.0.1/build/src/generate_codebook: cannot execute binary file: Exec format error + +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -68,6 +68,7 @@ + ExternalProject_Add(codec2_native + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/.. + BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/codec2_native ++ CMAKE_ARGS -DCMAKE_C_COMPILER=$ENV{CC_FOR_BUILD} -DCMAKE_C_FLAGS=$ENV{CFLAGS_FOR_BUILD} + BUILD_COMMAND ${CMAKE_COMMAND} --build . --target generate_codebook + INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/codec2_native/src/generate_codebook ${CMAKE_CURRENT_BINARY_DIR} + BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/generate_codebook diff --git a/srcpkgs/codec2/template b/srcpkgs/codec2/template new file mode 100644 index 0000000000..10521d98c0 --- /dev/null +++ b/srcpkgs/codec2/template @@ -0,0 +1,62 @@ +# Template file for 'codec2' +pkgname=codec2 +version=1.0.1 +revision=1 +build_style=cmake +checkdepends="gnuplot octave python3-numpy sox valgrind" +short_desc="Low bit rate speech codec" +maintainer="Evgeny Ermakov " +license="LGPL-2.1-only" +homepage="https://www.rowetel.com/codec2.html" +distfiles="https://github.com/drowe67/codec2/archive/v${version}.tar.gz" +checksum=14227963940d79e0ec5af810f37101b30e1c7e8555abd96c56b3c0473abac8ef + +do_check() { + cd build + ctest -E "test_CML_ldpcut|\ +test_COHPSK_modem_octave_port|\ +test_OFDM_modem_burst_acq_port|\ +test_OFDM_modem_datac0_octave_burst|\ +test_OFDM_modem_datac1_octave|\ +test_OFDM_modem_datac3_octave|\ +test_OFDM_modem_esno_est_c|\ +test_OFDM_modem_esno_est_octave|\ +test_OFDM_modem_fading_BER|\ +test_OFDM_modem_fading_DPSK_BER|\ +test_OFDM_modem_octaeve_datac0_mpp|\ +test_OFDM_modem_octave_burst_acq|\ +test_OFDM_modem_octave_datac0_mpp|\ +test_OFDM_modem_octave_datac0_mpp_coded|\ +test_OFDM_modem_octave_datac0_postamble|\ +test_OFDM_modem_octave_port|\ +test_OFDM_modem_octave_port_Nc_31|\ +test_OFDM_modem_octave_qam16_uncoded|\ +test_OFDM_modem_phase_est_bw|\ +test_OFDM_modem_time_sync_700D|\ +test_codec2_700c_octave_port|\ +test_demo_700d|\ +test_demo_700d_python|\ +test_freedv_api_700D_backwards_compatability|\ +test_freedv_api_700D_burble|\ +test_freedv_data_raw_fsk_ldpc_100|\ +test_freedv_reliable_text_awgn_700D|\ +test_freedv_reliable_text_fade_1600|\ +test_freedv_reliable_text_fade_700D|\ +test_freedv_reliable_text_fade_700E|\ +test_fsk_lib_4fsk_ldpc|\ +test_fsk_modem_octave_port|\ +test_ldpc_enc_dec_HRA_56_56|\ +test_ldpc_enc_dec_H_16200_9720|\ +test_ldpc_enc_dec_H_2064_516_sparse" +} + +codec2-devel_package() { + depends="${sourcepkg}>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/cmake + vmove usr/lib/pkgconfig + vmove "usr/lib/*.so" + } +}