[oe-commits] [meta-openembedded] 15/28: evolution-data-server: Add PACKAGECONFIG entry for phonenumber.

git at git.openembedded.org git at git.openembedded.org
Sat Aug 24 12:21:39 UTC 2019


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master-next
in repository meta-openembedded.

commit f6767fe969d0099514f9fa51b17c9a062e2d2b74
Author: Piotr Tworek <tworaz at tworaz.net>
AuthorDate: Thu Aug 22 19:17:20 2019 +0200

    evolution-data-server: Add PACKAGECONFIG entry for phonenumber.
    
    This feature needs some minor patches to be usable. First the
    libphonenumber does not use pkgconfig so eds has its own cmake support
    for detection location of the lib. Unfortunately this ends up adding
    -L/usr/lib to LDFLAGS.
    
    Another problem can be observed when building the code agains musl libc.
    Libphoneumber support code in eds tries to use LC_ADDRESS to determine
    the language which should be used for some address related localization
    features libphonenumber has. Since LC_ADDRESS is not available in musl
    the build will fail. We can use LC_MESSAGES for musl however.
    
    Signed-off-by: Piotr Tworek <tworaz at tworaz.net>
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 ...AGES-for-address-localization-when-LC_ADD.patch | 33 ++++++++++++++++++++
 ...r-lib-to-LDFLAGS-when-linking-libphonenum.patch | 36 ++++++++++++++++++++++
 .../eds/evolution-data-server_3.32.4.bb            |  3 ++
 3 files changed, 72 insertions(+)

diff --git a/meta-gnome/recipes-gnome/eds/evolution-data-server/0005-Use-LC_MESSAGES-for-address-localization-when-LC_ADD.patch b/meta-gnome/recipes-gnome/eds/evolution-data-server/0005-Use-LC_MESSAGES-for-address-localization-when-LC_ADD.patch
new file mode 100644
index 0000000..55ab5a7
--- /dev/null
+++ b/meta-gnome/recipes-gnome/eds/evolution-data-server/0005-Use-LC_MESSAGES-for-address-localization-when-LC_ADD.patch
@@ -0,0 +1,33 @@
+From 95425206e7317e59b7ca06d7f838ad357cdd200c Mon Sep 17 00:00:00 2001
+From: Piotr Tworek <tworaz at tworaz.net>
+Date: Wed, 14 Aug 2019 00:31:54 +0200
+Subject: [PATCH 5/7] Use LC_MESSAGES for address localization when LC_ADDRESS
+ is not available.
+
+Musl does not define LC_ADDRESS unfortunately.
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Piotr Tworek <tworaz at tworaz.net>
+---
+ src/addressbook/libebook-contacts/e-phone-number-private.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/addressbook/libebook-contacts/e-phone-number-private.cpp b/src/addressbook/libebook-contacts/e-phone-number-private.cpp
+index 4c5aebb..9abcebd 100644
+--- a/src/addressbook/libebook-contacts/e-phone-number-private.cpp
++++ b/src/addressbook/libebook-contacts/e-phone-number-private.cpp
+@@ -36,6 +36,10 @@
+ #include <phonenumbers/logger.h>
+ #include <phonenumbers/phonenumberutil.h>
+ 
++#ifndef LC_ADDRESS
++#define LC_ADDRESS LC_MESSAGES
++#endif
++
+ using i18n::phonenumbers::PhoneNumber;
+ using i18n::phonenumbers::PhoneNumberUtil;
+ 
+-- 
+2.21.0
+
diff --git a/meta-gnome/recipes-gnome/eds/evolution-data-server/0006-Dont-add-usr-lib-to-LDFLAGS-when-linking-libphonenum.patch b/meta-gnome/recipes-gnome/eds/evolution-data-server/0006-Dont-add-usr-lib-to-LDFLAGS-when-linking-libphonenum.patch
new file mode 100644
index 0000000..c0c1427
--- /dev/null
+++ b/meta-gnome/recipes-gnome/eds/evolution-data-server/0006-Dont-add-usr-lib-to-LDFLAGS-when-linking-libphonenum.patch
@@ -0,0 +1,36 @@
+From fb9164bbca5b425f1cf1bb3cac51d06afe81938a Mon Sep 17 00:00:00 2001
+From: Piotr Tworek <tworaz at tworaz.net>
+Date: Wed, 14 Aug 2019 00:47:59 +0200
+Subject: [PATCH 6/7] Dont add /usr/lib to LDFLAGS when linking libphonenumber.
+
+This will refer to host lib dir which is not what we want.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Piotr Tworek <tworaz at tworaz.net>
+---
+ cmake/modules/FindPhonenumber.cmake | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/cmake/modules/FindPhonenumber.cmake b/cmake/modules/FindPhonenumber.cmake
+index 04d1056..70c0c41 100644
+--- a/cmake/modules/FindPhonenumber.cmake
++++ b/cmake/modules/FindPhonenumber.cmake
+@@ -37,12 +37,10 @@ string(TOUPPER "${WITH_PHONENUMBER}" optupper)
+ if(("${optupper}" STREQUAL "ON") OR ("${substr}" STREQUAL "${CMAKE_BINARY_DIR}"))
+ 	set(WITH_PHONENUMBER "ON")
+ 	set(PHONENUMBER_INCLUDE_DIRS "${INCLUDE_INSTALL_DIR}")
+-	set(PHONENUMBER_LIB_DIRS ${LIB_INSTALL_DIR})
+-	set(PHONENUMBER_LDFLAGS -L${PHONENUMBER_LIB_DIRS} ${PHONENUMBER_LDFLAGS})
++	set(PHONENUMBER_LDFLAGS  ${PHONENUMBER_LDFLAGS})
+ else(("${optupper}" STREQUAL "ON") OR ("${substr}" STREQUAL "${CMAKE_BINARY_DIR}"))
+ 	set(PHONENUMBER_INCLUDE_DIRS "${WITH_PHONENUMBER}/include")
+-	set(PHONENUMBER_LIB_DIRS ${WITH_PHONENUMBER}/lib${LIB_SUFFIX})
+-	set(PHONENUMBER_LDFLAGS -L${PHONENUMBER_LIB_DIRS} ${PHONENUMBER_LDFLAGS})
++	set(PHONENUMBER_LDFLAGS ${PHONENUMBER_LDFLAGS})
+ endif(("${optupper}" STREQUAL "ON") OR ("${substr}" STREQUAL "${CMAKE_BINARY_DIR}"))
+ 
+ unset(bindirlen)
+-- 
+2.21.0
+
diff --git a/meta-gnome/recipes-gnome/eds/evolution-data-server_3.32.4.bb b/meta-gnome/recipes-gnome/eds/evolution-data-server_3.32.4.bb
index 4f1adb5..8d6c3ad 100644
--- a/meta-gnome/recipes-gnome/eds/evolution-data-server_3.32.4.bb
+++ b/meta-gnome/recipes-gnome/eds/evolution-data-server_3.32.4.bb
@@ -21,6 +21,8 @@ SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}
            file://0002-CMakeLists.txt-remove-CHECK_C_SOURCE_RUNS-check.patch \
            file://0003-contact-Replace-the-Novell-sample-contact-with-somet.patch \
            file://0004-Add-native-suffix-to-exacutables-produced-and-run-du.patch \
+           file://0005-Use-LC_MESSAGES-for-address-localization-when-LC_ADD.patch \
+           file://0006-Dont-add-usr-lib-to-LDFLAGS-when-linking-libphonenum.patch \
            file://0007-Modify-gobject-intrispection-support-to-work-with-OE.patch \
            file://iconv-detect.h \
            "
@@ -42,6 +44,7 @@ PACKAGECONFIG[oauth2] = "-DENABLE_OAUTH2=ON,-DENABLE_OAUTH2=OFF,json-glib webkit
 PACKAGECONFIG[mitkrb5] = "-DWITH_KRB5=ON,-DWITH_KRB5=OFF,krb5"
 PACKAGECONFIG[goa] = "-DENABLE_GOA=ON,-DENABLE_GOA=OFF,gnome-online-accounts"
 PACKAGECONFIG[weather] = "-DENABLE_WEATHER=ON,-DENABLE_WEATHER=OFF,libgweather"
+PACKAGECONFIG[phonenumber] = "-DWITH_PHONENUMBER=ON,-DWITH_PHONENUMBER=OFF,libphonenumber"
 PACKAGECONFIG[introspection] = "-DENABLE_INTROSPECTION=ON,-DENABLE_INTROSPECTION=OFF"
 PACKAGECONFIG[vala] = "-DENABLE_VALA_BINDINGS=ON -DVAPIGEN=${STAGING_BINDIR_NATIVE}/vapigen,-DENABLE_VALA_BINDINGS=OFF"
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list