Commit fbc8eb91 authored by Sandrine Avakian's avatar Sandrine Avakian

Moving recipes to use Cmake - first commit

parent 240192fd
......@@ -10,13 +10,13 @@ PROVIDES = "libantlr3c-bc"
S = "${WORKDIR}/git/runtime/C"
ALLOW_EMPTY_${PN}="1"
inherit autotools pkgconfig
inherit cmake pkgconfig
do_autoreconf() {
./autogen.sh
}
#do_autoreconf() {
# ./autogen.sh
#}
do_install_append() {
do_package_prepend() {
mkdir -p ${STAGING_DIR_HOST}/usr/share/java
cp ${S}/../../antlr-3.4-complete.jar ${STAGING_DIR_HOST}/usr/share/java/antlr.jar
}
\ No newline at end of file
......@@ -12,10 +12,31 @@ S = "${WORKDIR}/git"
INSANE_SKIP_${PN} += "dev-deps "
inherit cmake
EXTRA_OECMAKE += "-DENABLE_TESTS_COMPONENT=OFF -DCMAKE_SKIP_INSTALL_RPATH=ON"
do_autoreconf () {
./autogen.sh
}
PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-dev "
inherit cmake pkgconfig
EXTRA_OECMAKE += " -DENABLE_STATIC=NO -DENABLE_TESTS=OFF -DENABLE_TESTS_COMPONENT=OFF -DCMAKE_SKIP_INSTALL_RPATH=ON"
FILES_${PN} += "\
${bindir}/* \
${sbindir}/* \
${libexecdir}/* \
${libdir}/lib*.so.* \
${sysconfdir} \
${sharedstatedir} \
${localstatedir} \
/bin/* \
/sbin/* \
/lib/*.so* \
${datadir}/${PN} \
${libdir}/${PN}/* "
FILES_${PN}-dev += " \
${includedir} \
${libdir}/lib*.so \
${libdir}/*.la \
${libdir}/*.a \
${libdir}/*.o \
${libdir}/pkgconfig \
${prefix}/share/bctoolbox/
FILESEXTRAPATHS_prepend := "${THISDIR}/files/:"
SRC_URI += " file://findmbetls.patch\
file://cmakelists.patch \
file://pc.patch"
--- a/CMakeLists.txt 2017-04-21 15:40:04.000000000 +0200
+++ b/CMakeLists.txt 2017-04-21 15:39:56.000000000 +0200
@@ -94,7 +94,7 @@
endif()
if(POLARSSL_FOUND)
get_filename_component(polarssl_library_path "${POLARSSL_LIBRARIES}" PATH)
- set(LIBS_PRIVATE "${LIBS_PRIVATE} -L${polarssl_library_path} -lpolarssl")
+ set(LIBS_PRIVATE "${LIBS_PRIVATE} -lpolarssl")
endif()
if(ENABLE_TESTS_COMPONENT)
--- a/cmake/FindMbedTLS.cmake 2017-04-06 12:38:13.000000000 +0200
+++ b/cmake/FindMbedTLS.cmake 2017-04-20 17:16:01.000000000 +0200
@@ -40,6 +40,7 @@
# find the three mbedtls library
find_library(MBEDTLS_LIBRARY
NAMES mbedtls
+ PATH_SUFFIXES bin lib
)
find_library(MBEDX509_LIBRARY
--- a/bctoolbox.pc.in 2017-04-21 15:40:12.000000000 +0200
+++ b/bctoolbox.pc.in 2017-04-21 15:39:46.000000000 +0200
@@ -6,5 +6,5 @@
Description: A common set of tools used by Belledonne Communication's softwares
Version: @PROJECT_VERSION@
Libs: -L@CMAKE_INSTALL_FULL_LIBDIR@ -lbctoolbox
-Libs.private: @LIBS_PRIVATE@
+Libs.private: -L@CMAKE_INSTALL_FULL_LIBDIR@ @LIBS_PRIVATE@
Cflags: -I@CMAKE_INSTALL_FULL_INCLUDEDIR@
......@@ -9,12 +9,9 @@ PN = "bcunit"
PROVIDES = "bcunit"
S = "${WORKDIR}/git"
EXTRA_OECONF += " --enable-shared"
EXTRA_OECMAKE += " -DENABLE_SHARED=ON"
FILES_${PN} += "${datadir}/CUnit \
/usr/doc"
inherit autotools pkgconfig
inherit cmake pkgconfig
do_autoreconf () {
./autogen.sh
}
......@@ -9,15 +9,25 @@ DEPENDS = "libantlr3c-bc bctoolbox zlib"
PROVIDES = "libbellesip"
S = "${WORKDIR}/git"
EXTRA_OECONF += "--disable-strict --with-antlr=${STAGING_DIR_HOST}${layout_exec_prefix}/usr "
INSANE_SKIP_${PN} += "dev-deps"
inherit autotools pkgconfig
EXTRA_OECMAKE += " -DENABLE_STRICT=NO -DCMAKE_SKIP_INSTALL_RPATH=ON "
ANTLR_CFLAGS += " -I ${STAGING_DIR_HOST}${layout_exec_prefix}/usr/include"
ANTLR_LIBS += " -L ${STAGING_DIR_HOST}${layout_exec_prefix}/usr/lib"
do_autoreconf () {
./autogen.sh
}
CFLAGS += " ${ANTLR_CFLAGS} ${ANTLR_LIBS} -lantlr3c"
INSANE_SKIP_${PN} += "dev-deps"
inherit cmake pkgconfig
FILES_${PN}-dev = " \
${includedir} \
${libdir}/lib*.so \
${libdir}/*.la \
${libdir}/*.a \
${libdir}/*.o \
${libdir}/pkgconfig \
${prefix}/share/BelleSIP/"
FILESEXTRAPATHS_prepend := "${THISDIR}/files/:"
SRC_URI += " file://pc.patch"
--- a/CMakeLists.txt 2017-04-06 12:38:13.000000000 +0200
+++ b/CMakeLists.txt 2017-04-28 15:09:09.000000000 +0200
@@ -123,9 +123,9 @@
set(libdir ${prefix}/lib)
set(includedir ${prefix}/include)
get_filename_component(antlr3c_library_path "${ANTLR3C_LIBRARIES}" PATH)
-set(LIBS_PRIVATE "-L${antlr3c_library_path} -lantlr3c")
+set(LIBS_PRIVATE " -lantlr3c")
get_filename_component(bctoolbox_library_path "${BCTOOLBOX_CORE_LIBRARIES}" PATH)
-set(LIBS_PRIVATE "${LIBS_PRIVATE} -L${bctoolbox_library_path} -lbctoolbox")
+set(LIBS_PRIVATE "${LIBS_PRIVATE} -lbctoolbox")
if(ZLIB_FOUND)
set(REQUIRES_PRIVATE "${REQUIRES_PRIVATE} z")
endif()
--- a/belle-sip.pc.in 2017-04-28 14:47:09.000000000 +0200
+++ b/belle-sip.pc.in 2017-04-28 15:08:05.000000000 +0200
@@ -9,5 +9,5 @@
Requires.private: @REQUIRES_PRIVATE@ @TLS_PC@
Version: @VERSION@
Libs: -L@libdir@ -lbellesip
-Libs.private: @LIBS_PRIVATE@
+Libs.private: -L@CMAKE_INSTALL_FULL_LIBDIR@ @LIBS_PRIVATE@
Cflags: -I@includedir@
--- a/cmake/FindAntlr3.cmake 2017-04-28 15:17:49.000000000 +0200
+++ b/cmake/FindAntlr3.cmake 2017-04-28 15:18:03.000000000 +0200
@@ -27,7 +27,6 @@
# ANTLR3C_LIBRARIES - The libraries needed to use antlr3c
# ANTLR3_COMMAND - The command to run the antlr jar
-find_package(Java COMPONENTS Runtime REQUIRED)
set(_ANTLR3C_ROOT_PATHS
${CMAKE_INSTALL_PREFIX}
@@ -59,10 +58,12 @@
NAMES antlr3
HINTS ${_ANTLR3_JAR_ROOT_PATHS}
PATH_SUFFIXES bin
+ NO_CMAKE_FIND_ROOT_PATH
)
if(NOT ANTLR3_COMMAND)
# antlr3 command not found, search for the jar file
+ find_package(Java COMPONENTS Runtime REQUIRED)
find_file(ANTLR3_JAR_PATH
NAMES antlr3.jar antlr.jar
HINTS ${_ANTLR3_JAR_ROOT_PATHS}
\ No newline at end of file
......@@ -11,4 +11,4 @@ S = "${WORKDIR}/git"
EXTRA_OECONF = " --prefix=${STAGING_DIR_HOST}${layout_exec_prefix}/usr"
inherit autotools pkgconfig
inherit cmake
......@@ -13,14 +13,16 @@ PROVIDES = "liblinphone linphonec"
S = "${WORKDIR}/git"
inherit autotools pkgconfig gettext
inherit cmake gettext
PACKAGECONFIG ??= "sqlite zlib video"
PACKAGECONFIG[sqlite] = "--enable-msg-storage=yes, --enable-msg-storage=no, sqlite3"
PACKAGECONFIG[zlib] = ", --disable-zlib, zlib"
PACKAGECONFIG[video]= ",--disable-video"
EXTRA_OECONF += " --without-readline --enable-external-mediastreamer=yes --enable-external-ortp=yes --enable-gtk_ui=no --disable-x11"
#EXTRA_OECONF += " --without-readline --enable-external-mediastreamer=yes --enable-external-ortp=yes --enable-gtk_ui=no --disable-x11"
EXTRA_OECMAKE += " -DENABLE_CONSOLE_UI=NO -DENABLE_GTK_UI=NO "
INSANE_SKIP_${PN} += "dev-deps"
PACKAGES += " ${PN}c ${PN}-common ${PN}-utils ${PN}-tester ${PN}-rings"
......
......@@ -9,19 +9,20 @@ DEPENDS = "intltool-native libortp speex alsa-lib spandsp libv4l"
PROVIDES += "libmediastreamer2"
S = "${WORKDIR}/git"
PACKAGECONFIG ??= "ffmpeg vp8 opus srtp bzrtp ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
PACKAGECONFIG[ffmpeg] = ", --disable-ffmpeg, libav"
PACKAGECONFIG[vp8] = ", --disable-vp8, libvpx"
PACKAGECONFIG[opus] = ", --disable-opus, opus-bc"
PACKAGECONFIG[srtp] = ", --with-srtp=none, libsrtp-bc"
PACKAGECONFIG[bzrtp] = "--enable-zrtp=yes, --enable-zrtp=no, libbzrtp"
PACKAGECONFIG[x11] = "--enable-x11=yes --enable-xv=yes, --enable-x11=no --enable-xv=no, libxv"
PACKAGECONFIG ??= "ffmpeg vpx opus srtp bzrtp ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
PACKAGECONFIG[ffmpeg] = ", -DENABLE_FFMPEG=NO, libav"
PACKAGECONFIG[vpx] = ", -DENABLE_VPX=NO, libvpx"
PACKAGECONFIG[opus] = ", -DENABLE_OPUS=NO, opus-bc"
PACKAGECONFIG[srtp] = ", -DENABLE_SRTP=NO, libsrtp-bc"
PACKAGECONFIG[bzrtp] = " -DENABLE_BZRTP=YES, -DENABLE_BZRTP=NO, libbzrtp"
PACKAGECONFIG[x11] = " -DENABLE_X11=YES -DENABLE_XV=YES, -DENABLE_X11=NO -DENABLE_XV=NO, libxv"
EXTRA_OECONF += " --disable-glx --disable-pcap"
EXTRA_OECMAKE += " -DENABLE_GLX_DEFAULT_VALUE=NO -DENABLE_PCAP=NO "
PACKAGES += "${PN}-bin"
FILES_${PN}-bin = "${bindir}/mediastream ${bindir}/msaudiocmp"
FILES_${PN} += " ${libdir}/mediastreamer/plugins ${datadir}/images/nowebcamCIF.jpg"
inherit autotools pkgconfig gettext
inherit cmake gettext pkgconfig
......@@ -16,4 +16,4 @@ EXTRA_OECONF = "${MSAMR_WIDEBAND}"
FILES_${PN} = "${libdir}/mediastreamer/plugins/*.so.*"
FILES_${PN}-dev = "${libdir}/mediastreamer/plugins/*.la ${libdir}/mediastreamer/plugins/*.so"
FILES_${PN}-dbg += "${libdir}/mediastreamer/plugins/.debug"
inherit autotools pkgconfig
inherit cmake
......@@ -6,11 +6,11 @@ LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
EXTRA_OECONF="--with-openh264=${STAGING_DIR_HOST}/usr"
#EXTRA_OECONF="--with-openh264=${STAGING_DIR_HOST}/usr"
EXTRA_OECMAKE += "--with-openh264=${STAGING_DIR_HOST}/usr"
DEPENDS = "linphone openh264"
inherit autotools pkgconfig
inherit cmake
FILES_${PN} = "${libdir}/mediastreamer/plugins/*.so.*"
FILES_${PN}-dev = "${libdir}/mediastreamer/plugins/*.la ${libdir}/mediastreamer/plugins/*.so"
......
......@@ -15,4 +15,4 @@ FILES_${PN}-dbg = "${libdir}/mediastreamer/plugins/.debug/*.so.* /usr/src/debug"
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
inherit autotools pkgconfig
inherit cmake
......@@ -23,11 +23,11 @@ EXTRA_OECONF = " \
"
python () {
if d.getVar('TARGET_FPU') in [ 'soft' ]:
if d.getVar('TARGET_FPU', True) in [ 'soft' ]:
d.appendVar('PACKAGECONFIG', ' fixed-point')
# Ne10 is only available for armv7 and aarch64
if any((t.startswith('armv7') or t.startswith('aarch64')) for t in d.getVar('TUNE_FEATURES').split()):
if any((t.startswith('armv7') or t.startswith('aarch64')) for t in d.getVar('TUNE_FEATURES', True).split()):
d.appendVar('DEPENDS', ' ne10')
}
......
......@@ -5,7 +5,19 @@ SECTION = "libs/network"
INC_PR = "r0"
EXTRA_OECMAKE += " -DCMAKE_SKIP_INSTALL_RPATH=ON "
PROVIDES = "libortp"
S = "${WORKDIR}/git"
inherit autotools pkgconfig
\ No newline at end of file
inherit cmake
FILES_${PN}-dev = " \
${includedir} \
${libdir}/lib*.so \
${libdir}/*.la \
${libdir}/*.a \
${libdir}/*.o \
${libdir}/pkgconfig \
${prefix}/share/oRTP/"
......@@ -9,14 +9,11 @@ PN = "polarssl-bc"
PROVIDES = "libpolarssl-bc"
S = "${WORKDIR}/git"
EXTRA_OECONF += " --enable-shared"
EXTRA_OECMAKE += "-DENABLE_SHARED=ON"
PACKAGES += " ${PN}-utils"
FILES_${PN}-utils += "${bindir}/polarssl_*"
inherit autotools pkgconfig
inherit cmake
do_autoreconf () {
./autogen.sh
}
......@@ -9,4 +9,4 @@ PN = "srtp-bc"
PROVIDES = "libsrtp-bc"
S = "${WORKDIR}/git"
inherit autotools pkgconfig
\ No newline at end of file
inherit cmake
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment