diff options
author | Bernd Kuhls <bernd.kuhls@t-online.de> | 2015-08-11 20:16:50 +0200 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2015-08-29 12:39:46 +0200 |
commit | 67027b6f4bfb3fdeed8bce5bd389fbcbe385678a (patch) | |
tree | 3731691c9ae6555f30bd139186e55d550c6a95be /package/libcodec2/0002-Add-option-to-disable-unit-tests.patch | |
parent | eb4cb5e0da8574e16bb1f87f75509b566dbfbf52 (diff) | |
download | buildroot-67027b6f4bfb3fdeed8bce5bd389fbcbe385678a.tar.gz buildroot-67027b6f4bfb3fdeed8bce5bd389fbcbe385678a.zip |
package/libcodec2: new package
[Thomas:
- replace patches from Bernd by patches that are Git formatted and
have a chance of being upstream.
- remove the no longer necessary post configure hook to build
generate_cookbook for the host
- pass --disable-unittests to disable unit tests.]
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/libcodec2/0002-Add-option-to-disable-unit-tests.patch')
-rw-r--r-- | package/libcodec2/0002-Add-option-to-disable-unit-tests.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/package/libcodec2/0002-Add-option-to-disable-unit-tests.patch b/package/libcodec2/0002-Add-option-to-disable-unit-tests.patch new file mode 100644 index 0000000000..7822702092 --- /dev/null +++ b/package/libcodec2/0002-Add-option-to-disable-unit-tests.patch @@ -0,0 +1,50 @@ +From 19db6244200b870317382294f14b7d561d55a64e Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +Date: Sat, 29 Aug 2015 12:05:53 +0200 +Subject: [PATCH] Add option to disable unit tests + +The unittests require C++, while the rest of the library does not, so +this commit implements a --{enable,disable}-unittests option to +selectively enable the build of the unit tests. When not provided, the +option defaults to yes so that the existing behavior is preserved. + +Based on initial work by Bernd Kuhls. + +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +--- + Makefile.am | 6 +++++- + configure.ac | 5 +++++ + 2 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index bd3ce01..1da250b 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -95,4 +95,8 @@ src/codebook/lsp8.txt \ + src/codebook/lsp9.txt \ + src/codebook/lsp10.txt + +-SUBDIRS = src unittest ++SUBDIRS = src ++ ++if UNITTESTS ++SUBDIRS += unittest ++endif +diff --git a/configure.ac b/configure.ac +index 7520af6..55b7215 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -24,5 +24,10 @@ AC_CHECK_HEADERS([stdlib.h string.h]) + AC_FUNC_MALLOC + AC_CHECK_FUNCS([floor pow sqrt]) + ++AC_ARG_ENABLE([unittests], ++ AS_HELP_STRING([--disable-unittests], [Disable unittests]), ++ [], [enable_unittests=yes]) ++AM_CONDITIONAL([UNITTESTS], [test "${enable_unittests}" = "yes"]) ++ + AC_CONFIG_FILES([Makefile src/Makefile unittest/Makefile codec2.pc]) + AC_OUTPUT +-- +2.5.0 + |