[oe] [meta-oe][PATCH 2/2] cpprest: add new recipe based on Debian packaging

Gianfranco Costamagna costamagna.gianfranco at gmail.com
Thu Apr 19 15:44:46 UTC 2018


Hello,

I prefer whenever possible to fix upstream defaults instead of downstream
patching.
My goal is to drop this patch on next upstream release, rather than
hardcoding a path in the bb file.

https://github.com/Microsoft/cpprestsdk/pull/737

I already opened an upstream pull request.

G.

2018-04-19 16:43 GMT+02:00 Andreas Müller <schnitzeltony at gmail.com>:

> On Thu, Apr 19, 2018 at 4:17 PM, Gianfranco Costamagna
> <costamagna.gianfranco at gmail.com> wrote:
> > Signed-off-by: Gianfranco Costamagna <locutusofborg at debian.org>
> > Signed-off-by: Gianfranco Costamagna <gianfranco.costamagna at abinsula.com
> >
> > Co-developed-by: Cristiano Prato <cristiano.prato at cnhind.com>
> > ---
> >  .../cpprest/cpprest-2.10.2/fix-cmake-install.patch    | 15
> +++++++++++++++
> >  meta-oe/recipes-support/cpprest/cpprest_2.10.2.bb     | 19
> +++++++++++++++++++
> >  2 files changed, 34 insertions(+)
> >  create mode 100644 meta-oe/recipes-support/cpprest/cpprest-2.10.2/fix-
> cmake-install.patch
> >  create mode 100644 meta-oe/recipes-support/cpprest/cpprest_2.10.2.bb
> >
> > diff --git a/meta-oe/recipes-support/cpprest/cpprest-2.10.2/fix-cmake-install.patch
> b/meta-oe/recipes-support/cpprest/cpprest-2.10.2/fix-cmake-install.patch
> > new file mode 100644
> > index 000000000..aeb8da052
> > --- /dev/null
> > +++ b/meta-oe/recipes-support/cpprest/cpprest-2.10.2/fix-
> cmake-install.patch
> > @@ -0,0 +1,15 @@
> > +Description: install cmake files into /usr/lib/cmake/cpprestsdk
> > +Author: Gianfranco Costamagna <locutusofborg at debian.org>
> > +Last-Update: 2018-04-19
> > +
> > +--- cpprest-2.10.2.orig/CMakeLists.txt
> > ++++ cpprest-2.10.2/CMakeLists.txt
> > +@@ -18,7 +18,7 @@ enable_testing()
> > + 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_EXPORT_DIR lib/cmake/cpprestsdk CACHE STRING "Directory to
> install CMake config files.")
> ^ Instead of patching (for mulitlib?): Why not use this option? Something
> like
>
> EXTRA_OECMAKE = "-DCPPREST_EXPORT_DIR=${baselib}/cpprestsdk"
>
> > + set(CPPREST_INSTALL_HEADERS ON CACHE BOOL "Install header files.")
> > + set(CPPREST_INSTALL ON CACHE BOOL "Add install commands.")
> > +
> > diff --git a/meta-oe/recipes-support/cpprest/cpprest_2.10.2.bb
> b/meta-oe/recipes-support/cpprest/cpprest_2.10.2.bb
> > new file mode 100644
> > index 000000000..5f19d14ae
> > --- /dev/null
> > +++ b/meta-oe/recipes-support/cpprest/cpprest_2.10.2.bb
> > @@ -0,0 +1,19 @@
> > +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
> > +
> > +FILES_${PN}-dev += "${libdir}/cmake"
> > --
> > 2.14.1
> >
> > --
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel at lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>



More information about the Openembedded-devel mailing list