summaryrefslogtreecommitdiffstats
path: root/science
diff options
context:
space:
mode:
authorFlorian Franzmann2019-08-11 11:55:16 +0200
committerFlorian Franzmann2019-08-11 12:55:08 +0200
commitcfdf3ded7f9fbc839995b631d2a92a76bb59569d (patch)
tree8afdd6fd119bdf7c51cde3822cbfaa0eef969712 /science
parent55dce7b1b86ca7a3b78e6f64ceefffb4cfb10115 (diff)
science/codec2: new spell, a speech codec
Diffstat (limited to 'science')
-rwxr-xr-xscience/codec2/BUILD1
-rwxr-xr-xscience/codec2/DEPENDS2
-rwxr-xr-xscience/codec2/DETAILS15
-rw-r--r--science/codec2/HISTORY6
-rwxr-xr-xscience/codec2/PRE_BUILD5
-rw-r--r--science/codec2/codec2-0.8.1-unused-deps.patch79
6 files changed, 108 insertions, 0 deletions
diff --git a/science/codec2/BUILD b/science/codec2/BUILD
new file mode 100755
index 0000000000..e013b8d866
--- /dev/null
+++ b/science/codec2/BUILD
@@ -0,0 +1 @@
+cmake_build
diff --git a/science/codec2/DEPENDS b/science/codec2/DEPENDS
new file mode 100755
index 0000000000..ce741a9d6f
--- /dev/null
+++ b/science/codec2/DEPENDS
@@ -0,0 +1,2 @@
+depends cmake &&
+depends gcc
diff --git a/science/codec2/DETAILS b/science/codec2/DETAILS
new file mode 100755
index 0000000000..c75554824a
--- /dev/null
+++ b/science/codec2/DETAILS
@@ -0,0 +1,15 @@
+ SPELL=codec2
+ VERSION=0.8.1
+ SOURCE="${SPELL}-${VERSION}.tar.xz"
+ SOURCE_URL[0]=https://hobbes1069.fedorapeople.org/freetel/${SPELL}/${SOURCE}
+ SOURCE_HASH=sha512:4f2633d510ab68102b77b15492d87d25fe5fa96d90dc1ca6b3bf7deea04a3765382bfbbde981c9cac70d3e9d091c56b2099544b09b36a84ed62cb9087c9bb819
+SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-${VERSION}"
+ WEB_SITE="https://freedv.org/"
+ LICENSE[0]=LGPL
+ ENTERED=20190811
+ SHORT="a codec for digital voice encoding"
+cat << EOF
+Codec 2 is an open source speech codec designed for communications quality
+speech between 700 and 3200 bit/s. The main application is low bandwidth HF/VHF
+digital radio. It fills a gap in open source voice codecs beneath 5000 bit/s.
+EOF
diff --git a/science/codec2/HISTORY b/science/codec2/HISTORY
new file mode 100644
index 0000000000..b4d5fc8697
--- /dev/null
+++ b/science/codec2/HISTORY
@@ -0,0 +1,6 @@
+2019-08-11 Florian Franzmann <siflfran@hawo.stw.uni-erlangen.de>
+ * BUILD, DEPENDS, DETAILS: spell created
+ * PRE_BUILD, codec2-0.8.1-unused-deps.patch: patch from gentoo that
+ removes some unused dependencies
+
+
diff --git a/science/codec2/PRE_BUILD b/science/codec2/PRE_BUILD
new file mode 100755
index 0000000000..f73465c098
--- /dev/null
+++ b/science/codec2/PRE_BUILD
@@ -0,0 +1,5 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+
+patch -p1 < "$SPELL_DIRECTORY/codec2-0.8.1-unused-deps.patch"
+
diff --git a/science/codec2/codec2-0.8.1-unused-deps.patch b/science/codec2/codec2-0.8.1-unused-deps.patch
new file mode 100644
index 0000000000..174e5173aa
--- /dev/null
+++ b/science/codec2/codec2-0.8.1-unused-deps.patch
@@ -0,0 +1,79 @@
+From 3f786481d49e25a089586df4656cab563c90ae41 Mon Sep 17 00:00:00 2001
+From: David <david@rowetel.com>
+Date: Thu, 25 Apr 2019 06:47:06 +0930
+Subject: [PATCH] removed unneeded dependancy on libspeex and libsamplerate,
+ these were just used for random misc programs
+
+---
+ CMakeLists.txt | 30 ------------------------------
+ unittest/CMakeLists.txt | 9 ---------
+ 2 files changed, 8 insertions(+), 48 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 669b8be1..6c8eae19 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -195,36 +195,6 @@ if(UNITTEST)
+ find_package(Threads REQUIRED)
+ message(STATUS "Threads library flags: ${CMAKE_THREAD_LIBS_INIT}")
+
+- #
+- # Find speex library
+- #
+- message(STATUS "Looking for Speex DSP library.")
+- find_path(SPEEXDSP_INCLUDE_DIR speex/speex_preprocess.h)
+- find_library(SPEEXDSP_LIBRARY speexdsp)
+- message(STATUS " Speex DSP headers: ${SPEEXDSP_INCLUDE_DIR}")
+- 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()
+-
+- #
+- # Samplerate Library
+- #
+- message(STATUS "Looking for samplerate...")
+- find_library(LIBSAMPLERATE samplerate)
+- find_path(LIBSAMPLERATE_INCLUDE_DIR samplerate.h)
+- message(STATUS " samplerate headers: ${LIBSAMPLERATE_INCLUDE_DIR}")
+- message(STATUS " samplerate library: ${LIBSAMPLERATE}")
+- if(LIBSAMPLERATE AND LIBSAMPLERATE_INCLUDE_DIR)
+- list(APPEND FREEDV_LINK_LIBS ${CMAKE_REQUIRED_LIBRARIES})
+- include_directories(${LIBSAMPLERATE_INCLUDE_DIR})
+- else(LIBSTAMPLERATE AND LIBSAMPLERATE_INCLUDE_DIR)
+- message(FATAL_ERROR "samplerate library not found.
+-On Linux systems try installing:
+- samplerate-devel (RPM based systems)
+- libsamplerate-dev (DEB based systems)")
+- endif(LIBSAMPLERATE AND LIBSAMPLERATE_INCLUDE_DIR)
+-
+ add_subdirectory(unittest)
+ add_subdirectory(misc)
+ endif(UNITTEST)
+diff --git a/unittest/CMakeLists.txt b/unittest/CMakeLists.txt
+index 35a944fe..9b2e0e95 100644
+--- a/unittest/CMakeLists.txt
++++ b/unittest/CMakeLists.txt
+@@ -73,12 +73,6 @@
+ add_executable(tfifo tfifo.c ../src/fifo.c)
+ target_link_libraries(tfifo codec2 ${CMAKE_THREAD_LIBS_INIT})
+
+-add_executable(speexnoisesup speexnoisesup.c)
+-target_link_libraries(speexnoisesup ${SPEEXDSP_LIBRARY})
+-set_target_properties(speexnoisesup
+- PROPERTIES INCLUDE_DIRECTORIES ${SPEEXDSP_INCLUDE_DIR}
+-)
+-
+ add_executable(fdmdv_mem fdmdv_mem.c)
+
+ add_executable(raw2h raw2h.c)
+@@ -91,9 +85,6 @@
+ add_executable(tnewamp1 tnewamp1.c ../src/quantise.c ../src/newamp1.c ../src/mbest.c ../src/kiss_fft.c ../src/sine.c ../src/nlp.c ../src/dump.c ../src/octave.c ${CODEBOOKS})
+ target_link_libraries(tnewamp1 codec2)
+
+-add_executable(tsrc tsrc.c)
+-target_link_libraries(tsrc samplerate)
+-
+ add_executable(tlininterp tlininterp.c)
+ add_executable(tdec tdec.c)
+