aboutsummaryrefslogtreecommitdiffstats
path: root/main/bctoolbox
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2019-05-01 09:31:06 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2019-05-01 13:59:57 +0000
commit4dee62745e4b3967a246532cdb65ccf446e78566 (patch)
treec7160e25415aeebe3a33c95da9de0f01ca127bf5 /main/bctoolbox
parent8cb89d090383465951e0de2784328902463de063 (diff)
downloadaports-4dee62745e4b3967a246532cdb65ccf446e78566.tar.bz2
aports-4dee62745e4b3967a246532cdb65ccf446e78566.tar.xz
main/bctoolbox: moved from testing, added check()
needed by ortp which is needed by sngtc_client which is needed by Freeswitch
Diffstat (limited to 'main/bctoolbox')
-rw-r--r--main/bctoolbox/APKBUILD48
-rw-r--r--main/bctoolbox/cmake-bcunit-fix.patch19
2 files changed, 67 insertions, 0 deletions
diff --git a/main/bctoolbox/APKBUILD b/main/bctoolbox/APKBUILD
new file mode 100644
index 0000000000..36dfce4302
--- /dev/null
+++ b/main/bctoolbox/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+pkgname=bctoolbox
+pkgver=0.6.0
+pkgrel=1
+pkgdesc="Utilities library used by Belledonne Communications softwares like belle-sip, mediastreamer2 and linphone"
+url="https://github.com/BelledonneCommunications/bctoolbox"
+arch="all"
+license="GPL-2.0"
+options="!check" # bcunit not available
+makedepends="cmake mbedtls-dev"
+subpackages="$pkgname-dev"
+source="$pkgname-$pkgver.tar.gz::https://github.com/BelledonneCommunications/bctoolbox/archive/$pkgver.tar.gz
+ cmake-bcunit-fix.patch"
+builddir="$srcdir/$pkgname-$pkgver"
+
+prepare() {
+ default_prepare
+ cd "$builddir"
+ mkdir -p build
+}
+
+build() {
+ cd "$builddir"/build
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DENABLE_MBEDTLS=YES \
+ -DENABLE_POLARSSL=NO \
+ -DENABLE_STATIC=NO \
+ -DENABLE_SHARED=YES \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DCMAKE_SKIP_INSTALL_RPATH=ON \
+ ..
+ make
+}
+
+check() {
+ cd "$builddir"/build
+ make check
+}
+
+package() {
+ cd "$builddir"/build
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="decdd32f2d4d597a7b1717be860b855f6f4a909936f1a957e7a0ac81ac2d8cd5f96bbbc60a2354e62d1cfbf68d4407d76c97687a51c77cc8433e89e26d137edf bctoolbox-0.6.0.tar.gz
+43928276f6059566a418b0f6730113a7d8a06f6c27f173930fde0c5236149a3f5d6ff609933559108cad4c172898e63c6ba3d6cd9c404a9557c7fa29eef5a9b1 cmake-bcunit-fix.patch"
diff --git a/main/bctoolbox/cmake-bcunit-fix.patch b/main/bctoolbox/cmake-bcunit-fix.patch
new file mode 100644
index 0000000000..fd3a747640
--- /dev/null
+++ b/main/bctoolbox/cmake-bcunit-fix.patch
@@ -0,0 +1,19 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e14e502..9711ea7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -98,14 +98,9 @@ if(POLARSSL_FOUND)
+ endif()
+
+ if(ENABLE_TESTS_COMPONENT)
+- find_package(BcUnit REQUIRED)
+- cmake_push_check_state(RESET)
+- list(APPEND CMAKE_REQUIRED_INCLUDES ${BCUNIT_INCLUDE_DIRS})
+- list(APPEND CMAKE_REQUIRED_LIBRARIES ${BCUNIT_LIBRARIES})
+ check_symbol_exists("CU_get_suite" "BCUnit/BCUnit.h" HAVE_CU_GET_SUITE)
+ check_symbol_exists("CU_curses_run_tests" "BCUnit/BCUnit.h" HAVE_CU_CURSES)
+ check_symbol_exists("CU_set_trace_handler" "BCUnit/Util.h" HAVE_CU_SET_TRACE_HANDLER)
+- cmake_pop_check_state()
+ set(TESTER_REQUIRES_PRIVATE "bcunit")
+ endif()
+