diff options
Diffstat (limited to 'media-libs/bcg729/bcg729-1.1.1.ebuild')
-rw-r--r-- | media-libs/bcg729/bcg729-1.1.1.ebuild | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/media-libs/bcg729/bcg729-1.1.1.ebuild b/media-libs/bcg729/bcg729-1.1.1.ebuild index 3a492a09a321..bef0e798b644 100644 --- a/media-libs/bcg729/bcg729-1.1.1.ebuild +++ b/media-libs/bcg729/bcg729-1.1.1.ebuild @@ -5,16 +5,23 @@ EAPI=7 inherit cmake +TEST_SUFFIX="tests-20210101" DESCRIPTION="encoder and decoder of the ITU G729 Annex A/B speech codec" HOMEPAGE="https://github.com/BelledonneCommunications/bcg729" -SRC_URI="https://github.com/BelledonneCommunications/bcg729/archive/${PV/_/-}.tar.gz \ - -> ${P}.tar.gz" +SRC_URI="https://github.com/BelledonneCommunications/${PN}/archive/${PV/_/-}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" test? ( http://www.belledonne-communications.com/bc-downloads/${PN}-patterns.zip -> ${PN}-${TEST_SUFFIX}.zip )" S="${WORKDIR}/${P/_/-}" LICENSE="GPL-3" SLOT="0" KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~ppc ppc64 ~x86" +IUSE="test" +RESTRICT="test" +# Not all passing yet +# TODO: Report upstream +#RESTRICT="!test? ( test )" +BDEPEND="test? ( app-arch/unzip )" RDEPEND="!media-plugins/mediastreamer-bcg729" src_prepare() { @@ -25,10 +32,21 @@ src_prepare() { src_configure() { local mycmakeargs=( -DENABLE_STATIC=no + -DENABLE_TESTS=$(usex test) ) cmake_src_configure } +src_test() { + cd "${BUILD_DIR}/test" || die + + if use test ; then + mv "${WORKDIR}/patterns" "${BUILD_DIR}/test/" || die + fi + + ./testCampaignAll || die +} + src_install() { cmake_src_install find "${ED}" -name '*.la' -delete || die |