Skip to contentSkip to conversation

move cpprest to meta-oe

PATCH New Khem Raj 1 participant 2 messages Jun 17, 2018

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 move cpprest to meta-oe

---
 .../cpprest-2.10.2/fix-cmake-install.patch    | 59 -------------------
 .../recipes-support/cpprest/cpprest_2.10.2.bb | 17 ------
 2 files changed, 76 deletions(-)
 delete mode 100644 meta-networking/recipes-support/cpprest/cpprest-2.10.2/fix-cmake-install.patch
 delete mode 100644 meta-networking/recipes-support/cpprest/cpprest_2.10.2.bb
meta-networking/recipes-support/cpprest/cpprest-2.10.2/fix-cmake-install.patch deleted +0 -59
deleted file mode 100644
index 56fd704ad7..0000000000
@@ -1,59 +0,0 @@
-Description: install cmake files into /usr/lib/cmake/cpprestsdk
-Author: Gianfranco Costamagna <[email protected]>
-Upstream-Status: https://github.com/Microsoft/cpprestsdk/pull/737
-Forwarded: https://github.com/Microsoft/cpprestsdk/pull/737
-Last-Update: 2018-04-19
-
-Index: cpprest/CMakeLists.txt
-===================================================================
---- cpprest.orig/CMakeLists.txt
-+++ cpprest/CMakeLists.txt
-@@ -18,7 +18,6 @@
- set(WERROR ON CACHE BOOL "Treat Warnings as Errors.")
- set(CPPREST_EXCLUDE_WEBSOCKETS OFF CACHE BOOL "Exclude websockets functionality.")
- set(CPPREST_EXCLUDE_COMPRESSION OFF CACHE BOOL "Exclude compression functionality.")
--set(CPPREST_EXPORT_DIR lib/cpprestsdk CACHE STRING "Directory to install CMake config files.")
- set(CPPREST_INSTALL_HEADERS ON CACHE BOOL "Install header files.")
- set(CPPREST_INSTALL ON CACHE BOOL "Add install commands.")
- 
-@@ -63,6 +62,9 @@
- include(cmake/cpprest_find_openssl.cmake)
- include(cmake/cpprest_find_websocketpp.cmake)
- include(CheckIncludeFiles)
-+if(UNIX)
-+include(GNUInstallDirs)
-+endif(UNIX)
- 
- find_package(Threads REQUIRED)
- if(THREADS_HAVE_PTHREAD_ARG)
-Index: cpprest/src/CMakeLists.txt
-===================================================================
---- cpprest.orig/src/CMakeLists.txt
-+++ cpprest/src/CMakeLists.txt
-@@ -250,21 +250,21 @@
-   install(
-     TARGETS ${CPPREST_TARGETS}
-     EXPORT cpprestsdk-targets
--    RUNTIME DESTINATION bin
--    LIBRARY DESTINATION lib
--    ARCHIVE DESTINATION lib
-+    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
-+    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
-+    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
-   )
- 
-   configure_file(../cmake/cpprestsdk-config.in.cmake "${CMAKE_CURRENT_BINARY_DIR}/cpprestsdk-config.cmake" @ONLY)
- 
-   install(
-     FILES "${CMAKE_CURRENT_BINARY_DIR}/cpprestsdk-config.cmake"
--    DESTINATION ${CPPREST_EXPORT_DIR}
-+    DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake
-   )
-   install(
-     EXPORT cpprestsdk-targets
-     FILE cpprestsdk-targets.cmake
-     NAMESPACE cpprestsdk::
--    DESTINATION ${CPPREST_EXPORT_DIR}
-+    DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake
-   )
- endif()
meta-networking/recipes-support/cpprest/cpprest_2.10.2.bb deleted +0 -17
deleted file mode 100644
index 2ba6fc66cc..0000000000
@@ -1,17 +0,0 @@
-SUMMARY = "Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design."
-SECTION = "libs/network"
-HOMEPAGE = "https://github.com/Microsoft/cpprestsdk/"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${S}/../license.txt;md5=a2e15b954769218ff912468eecd6a02f"
-DEPENDS = "openssl websocketpp zlib boost"
-
-SRC_URI = "git://github.com/Microsoft/cpprestsdk.git;protocol=https;branch=master"
-
-SRC_URI += "file://fix-cmake-install.patch"
-
-# tag 2.10.2
-SRCREV= "fea848e2a77563cf2a6f28f8eab396fd6e787fbf"
-
-S = "${WORKDIR}/git/Release"
-
-inherit cmake
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 2/2 spice: Fix build with musl

---
 ...0001-Convert-pthread_t-to-be-numeric.patch | 66 +++++++++++++++++++
 .../recipes-support/spice/spice_git.bb        |  1 +
 2 files changed, 67 insertions(+)
 create mode 100644 meta-networking/recipes-support/spice/spice/0001-Convert-pthread_t-to-be-numeric.patch
meta-networking/recipes-support/spice/spice/0001-Convert-pthread_t-to-be-numeric.patch new file +66 -0
new file mode 100644
index 0000000000..505b7c890b
@@ -0,0 +1,66 @@
+From 0726ce6d6f52e135e28f15ca8392568c84909b1d Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sat, 16 Jun 2018 16:21:39 -0700
+Subject: [PATCH] Convert pthread_t to be numeric
+
+typecast pthread_t to unsigned long
+pthread_t is implemented as a struct point in musl and its as per standard
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ server/red-channel.c | 5 +++--
+ server/red-client.c  | 6 +++---
+ 2 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/server/red-channel.c b/server/red-channel.c
+index 1b38f04d..11dc667b 100644
+--- a/server/red-channel.c
++++ b/server/red-channel.c
+@@ -192,7 +192,7 @@ red_channel_constructed(GObject *object)
+ {
+     RedChannel *self = RED_CHANNEL(object);
+ 
+-    red_channel_debug(self, "thread_id 0x%lx", self->priv->thread_id);
++    red_channel_debug(self, "thread_id 0x%lx", (unsigned long)self->priv->thread_id);
+ 
+     RedChannelClass *klass = RED_CHANNEL_GET_CLASS(self);
+ 
+@@ -475,7 +475,8 @@ void red_channel_remove_client(RedChannel *channel, RedChannelClient *rcc)
+         red_channel_warning(channel, "channel->thread_id (0x%lx) != pthread_self (0x%lx)."
+                             "If one of the threads is != io-thread && != vcpu-thread, "
+                             "this might be a BUG",
+-                            channel->priv->thread_id, pthread_self());
++                            (unsigned long)channel->priv->thread_id,
++                            (unsigned long)pthread_self());
+     }
+     spice_return_if_fail(channel);
+     link = g_list_find(channel->priv->clients, rcc);
+diff --git a/server/red-client.c b/server/red-client.c
+index ddfc5400..76986640 100644
+--- a/server/red-client.c
++++ b/server/red-client.c
+@@ -180,7 +180,7 @@ void red_client_migrate(RedClient *client)
+         spice_warning("client->thread_id (0x%lx) != pthread_self (0x%lx)."
+                       "If one of the threads is != io-thread && != vcpu-thread,"
+                       " this might be a BUG",
+-                      client->thread_id, pthread_self());
++                      (unsigned long)client->thread_id, (unsigned long)pthread_self());
+     }
+     FOREACH_CHANNEL_CLIENT(client, rcc) {
+         if (red_channel_client_is_connected(rcc)) {
+@@ -199,8 +199,8 @@ void red_client_destroy(RedClient *client)
+         spice_warning("client->thread_id (0x%lx) != pthread_self (0x%lx)."
+                       "If one of the threads is != io-thread && != vcpu-thread,"
+                       " this might be a BUG",
+-                      client->thread_id,
+-                      pthread_self());
++                      (unsigned long)client->thread_id,
++                      (unsigned long)pthread_self());
+     }
+     red_client_set_disconnecting(client);
+     FOREACH_CHANNEL_CLIENT(client, rcc) {
+-- 
+2.17.1
+
meta-networking/recipes-support/spice/spice_git.bb +1 -0
index 508bb36996..bf4b083461 100644
@@ -23,6 +23,7 @@ SRCREV_FORMAT = "spice_spice-common"
 SRC_URI = " \
     git://anongit.freedesktop.org/spice/spice;name=spice \
     git://anongit.freedesktop.org/spice/spice-common;destsuffix=git/spice-common;name=spice-common \
+    file://0001-Convert-pthread_t-to-be-numeric.patch \
 "
 FOO = "\
     file://0001-build-allow-separated-src-and-build-dirs.patch \
Signature · 1 line
2.17.1