Index: head/audio/codec2/Makefile =================================================================== --- head/audio/codec2/Makefile (revision 546106) +++ head/audio/codec2/Makefile (revision 546107) @@ -1,55 +1,56 @@ # $FreeBSD$ PORTNAME= codec2 DISTVERSION= 0.8.1 +PORTREVISION= 1 CATEGORIES= audio hamradio MASTER_SITES= https://hobbes1069.fedorapeople.org/freetel/codec2/ MAINTAINER= hamradio@FreeBSD.org COMMENT= Low bit rate codec LICENSE= LGPL21 LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libspeexdsp.so:audio/speexdsp CONFLICTS= libcodec2-[0-9]* USES= cmake pathfix pkgconfig shebangfix tar:xz USE_LDCONFIG= yes OPTIONS_DEFINE= EXAMPLES TEST OPTIONS_SUB= yes EXAMPLES_CMAKE_ON= -DINSTALL_EXAMPLES=ON TEST_CMAKE_ON= -DUNITTEST=ON TEST_SRCFILES= cohpsk_ch cohpsk_demod cohpsk_get_test_bits cohpsk_mod\ cohpsk_put_test_bits fdmdv_channel freedv_rx freedv_tx\ generate_codebook TEST_UNITTESTFILES= c2validate create_interleaver de extract fdmdv_mem\ genlsp genres polar2rect\ pre raw2h scalarlsptest speexnoisesup t16_8\ t16_8_short tcohpsk test_cohpsk_ch tfdmdv tfifo\ tnlp tprede vq_train_jvm\ vqtrain SHEBANG_FILES= ${WRKSRC}/octave/fsk_horus_stream.m\ ${WRKSRC}/script/menu.sh SHEBANG_LANG= octave TEST_RUN_DEPENDS= octave:math/octave TEST_LIB_DEPENDS= libsamplerate.so:audio/libsamplerate PORTEXAMPLES= * pre-patch-TEST-on: ${REINPLACE_CMD} 's|%ld|%u|' ${WRKSRC}/unittest/fdmdv_mem.c post-install-TEST-on: .for a in ${TEST_SRCFILES} ${INSTALL_PROGRAM} ${WRKDIR}/.build/src/${a} ${STAGEDIR}${PREFIX}/bin .endfor .for a in ${TEST_UNITTESTFILES} ${INSTALL_PROGRAM} ${WRKDIR}/.build/unittest/${a} ${STAGEDIR}${PREFIX}/bin .endfor .include Index: head/audio/codec2/files/patch-CMakeLists.txt =================================================================== --- head/audio/codec2/files/patch-CMakeLists.txt (revision 546106) +++ head/audio/codec2/files/patch-CMakeLists.txt (revision 546107) @@ -1,38 +1,38 @@ ---- CMakeLists.txt.orig 2018-09-04 06:22:53 UTC +--- CMakeLists.txt.orig 2020-08-24 16:23:49 UTC +++ CMakeLists.txt @@ -14,6 +14,7 @@ mark_as_advanced(CLEAR CMAKE_INSTALL_BINDIR CMAKE_INSTALL_INCLUDEDIR CMAKE_INSTALL_LIBDIR + CMAKE_INSTALL_LIBEXECDIR ) # -@@ -114,7 +115,7 @@ option(INSTALL_EXAMPLES "Install example +@@ -114,7 +115,7 @@ option(INSTALL_EXAMPLES "Install example code." OFF) if(INSTALL_EXAMPLES) install(DIRECTORY octave raw script wav USE_SOURCE_PERMISSIONS - DESTINATION ${CMAKE_INSTALL_DATADIR}/codec2) + DESTINATION share/examples/codec2) endif() -@@ -179,6 +180,18 @@ if(UNITTEST) - endif() - - # +@@ -176,6 +177,18 @@ if(UNITTEST) + message(STATUS " Speex DSP library: ${SPEEXDSP_LIBRARY}") + if(NOT SPEEXDSP_INCLUDE_DIR AND NOT SPEEXDSP_LIBRARY) + message(FATAL_ERROR "Speex DSP library not found!") ++ endif() ++ ++ # + # Find samplerate library + # + message(STATUS "Looking for samplerate library.") + find_path(SAMPLERATE_INCLUDE_DIR samplerate.h) + find_library(SAMPLERATE_LIBRARY samplerate) + message(STATUS " samplerate headers: ${SAMPLERATE_INCLUDE_DIR}") + message(STATUS " samplerate library: ${SAMPLERATE_LIBRARY}") + if(NOT SAMPLERATE_INCLUDE_DIR AND NOT SAMPLERATE_LIBRARY) + message(FATAL_ERROR "samplerate library not found!") -+ endif() -+ -+ # - # Samplerate Library + endif() + # - message(STATUS "Looking for samplerate...") Index: head/audio/codec2/files/patch-src__freedv_api.c =================================================================== --- head/audio/codec2/files/patch-src__freedv_api.c (revision 546106) +++ head/audio/codec2/files/patch-src__freedv_api.c (revision 546107) @@ -1,11 +1,11 @@ ---- src/freedv_api.c.orig 2018-05-24 09:41:22 UTC +--- src/freedv_api.c.orig 2020-08-24 17:11:35 UTC +++ src/freedv_api.c -@@ -36,7 +36,7 @@ - #ifdef __APPLE__ - #include - #else --#include -+#include - #endif /* __APPLE__ */ +@@ -76,6 +76,8 @@ - #include "fsk.h" + /* OFDM payload data test frame for 700D */ + ++extern const struct OFDM_CONFIG * OFDM_CONFIG_700D; ++ + extern int payload_data_bits[]; + + /*---------------------------------------------------------------------------*\ Index: head/audio/codec2/files/patch-src_codec2__ofdm.h =================================================================== --- head/audio/codec2/files/patch-src_codec2__ofdm.h (nonexistent) +++ head/audio/codec2/files/patch-src_codec2__ofdm.h (revision 546107) @@ -0,0 +1,14 @@ +--- src/codec2_ofdm.h.orig 2018-05-24 01:33:34 UTC ++++ src/codec2_ofdm.h +@@ -49,9 +49,10 @@ extern "C" { + #define OFDM_SYNC_MANUAL 2 /* fall out of sync only under operator control */ + + struct OFDM; ++struct OFDM_CONFIG; + + /* Default configuration for '700D' mode */ +-const struct OFDM_CONFIG * OFDM_CONFIG_700D; ++//const struct OFDM_CONFIG * OFDM_CONFIG_700D; + + /* create and destroy modem states */ + Property changes on: head/audio/codec2/files/patch-src_codec2__ofdm.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/audio/codec2/files/patch-src_ofdm__demod.c =================================================================== --- head/audio/codec2/files/patch-src_ofdm__demod.c (nonexistent) +++ head/audio/codec2/files/patch-src_ofdm__demod.c (revision 546107) @@ -0,0 +1,11 @@ +--- src/ofdm_demod.c.orig 2020-08-24 16:51:44 UTC ++++ src/ofdm_demod.c +@@ -49,6 +49,8 @@ + #define NFRAMES 100 /* just log the first 100 frames */ + #define NDISCARD 20 /* BER2measure disctrds first 20 frames */ + ++const struct OFDM_CONFIG * OFDM_CONFIG_700D; ++ + extern int payload_data_bits[]; + extern int test_bits_ofdm[]; + Property changes on: head/audio/codec2/files/patch-src_ofdm__demod.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/audio/codec2/files/patch-src_ofdm__get__test__bits.c =================================================================== --- head/audio/codec2/files/patch-src_ofdm__get__test__bits.c (nonexistent) +++ head/audio/codec2/files/patch-src_ofdm__get__test__bits.c (revision 546107) @@ -0,0 +1,11 @@ +--- src/ofdm_get_test_bits.c.orig 2020-08-24 17:10:37 UTC ++++ src/ofdm_get_test_bits.c +@@ -36,6 +36,8 @@ + #include "ofdm_internal.h" + #include "test_bits_ofdm.h" + ++extern const struct OFDM_CONFIG * OFDM_CONFIG_700D; ++ + int main(int argc, char *argv[]) + { + struct OFDM *ofdm; Property changes on: head/audio/codec2/files/patch-src_ofdm__get__test__bits.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/audio/codec2/files/patch-src_ofdm__mod.c =================================================================== --- head/audio/codec2/files/patch-src_ofdm__mod.c (nonexistent) +++ head/audio/codec2/files/patch-src_ofdm__mod.c (revision 546107) @@ -0,0 +1,10 @@ +--- src/ofdm_mod.c.orig 2020-08-24 17:09:09 UTC ++++ src/ofdm_mod.c +@@ -41,6 +41,7 @@ + + extern int payload_data_bits[]; + extern int test_bits_ofdm[]; ++extern const struct OFDM_CONFIG * OFDM_CONFIG_700D; + + int opt_exists(char *argv[], int argc, char opt[]) { + int i; Property changes on: head/audio/codec2/files/patch-src_ofdm__mod.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/audio/codec2/files/patch-src_ofdm__put__test__bits.c =================================================================== --- head/audio/codec2/files/patch-src_ofdm__put__test__bits.c (nonexistent) +++ head/audio/codec2/files/patch-src_ofdm__put__test__bits.c (revision 546107) @@ -0,0 +1,11 @@ +--- src/ofdm_put_test_bits.c.orig 2020-08-24 17:20:41 UTC ++++ src/ofdm_put_test_bits.c +@@ -36,6 +36,8 @@ + #include "codec2_ofdm.h" + #include "test_bits_ofdm.h" + ++extern const struct OFDM_CONFIG * OFDM_CONFIG_700D; ++ + #define LOG_FRAMES 100 + #define NDISCARD 20 + Property changes on: head/audio/codec2/files/patch-src_ofdm__put__test__bits.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property