aboutsummaryrefslogtreecommitdiffstats
path: root/meta-gnome
diff options
context:
space:
mode:
authorPiotr Tworek <tworaz@tworaz.net>2019-08-22 19:17:20 +0200
committerKhem Raj <raj.khem@gmail.com>2019-08-24 05:20:42 -0700
commitf6767fe969d0099514f9fa51b17c9a062e2d2b74 (patch)
tree45d994e71664edfddeadde124179be047a6aa820 /meta-gnome
parent07ced16e90f2890956b4cd4e4799987ad291596b (diff)
downloadmeta-openembedded-contrib-f6767fe969d0099514f9fa51b17c9a062e2d2b74.tar.gz
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@tworaz.net> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-gnome')
-rw-r--r--meta-gnome/recipes-gnome/eds/evolution-data-server/0005-Use-LC_MESSAGES-for-address-localization-when-LC_ADD.patch33
-rw-r--r--meta-gnome/recipes-gnome/eds/evolution-data-server/0006-Dont-add-usr-lib-to-LDFLAGS-when-linking-libphonenum.patch36
-rw-r--r--meta-gnome/recipes-gnome/eds/evolution-data-server_3.32.4.bb3
3 files changed, 72 insertions, 0 deletions
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 0000000000..55ab5a7fca
--- /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@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@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 0000000000..c0c1427fd2
--- /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@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@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 4f1adb5306..8d6c3aded6 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"