All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe] [PATCH] rapidjson: fix cmake artifacts installation for non-default BASELIB case
@ 2019-02-07 11:00 Ruslan Bilovol
  2019-02-07 17:31 ` Ruslan Bilovol
  0 siblings, 1 reply; 4+ messages in thread
From: Ruslan Bilovol @ 2019-02-07 11:00 UTC (permalink / raw)
  To: openembedded-devel, Khem Raj; +Cc: xe-linux-external

If BASELIB is set to non-default value (like lib64),
next 'installed but not shipped' issue happens:
  /usr/lib
  /usr/lib/cmake
  /usr/lib/pkgconfig
  /usr/lib/cmake/RapidJSON
  /usr/lib/cmake/RapidJSON/RapidJSONConfigVersion.cmake
  /usr/lib/cmake/RapidJSON/RapidJSONConfig.cmake
  /usr/lib/pkgconfig/RapidJSON.pc

This is because rapidjson has library installation dir set
to 'lib' by default and hardcoded in another place.
Fix this by next changes:
 - set appropriate LIB_INSTALL_DIR
 - fix hardcoded 'lib' in CMAKECONFIG_INSTALL_DIR case

Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com>
---
 ...ve-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch | 36 ++++++++++++++++++++++
 .../recipes-devtools/rapidjson/rapidjson_git.bb    |  5 +--
 2 files changed, 39 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-devtools/rapidjson/rapidjson/0001-CMake-remove-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch

diff --git a/meta-oe/recipes-devtools/rapidjson/rapidjson/0001-CMake-remove-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch b/meta-oe/recipes-devtools/rapidjson/rapidjson/0001-CMake-remove-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch
new file mode 100644
index 0000000..745f5d0
--- /dev/null
+++ b/meta-oe/recipes-devtools/rapidjson/rapidjson/0001-CMake-remove-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch
@@ -0,0 +1,36 @@
+From 8d272e53a4d1dc405e08ce2dd50159c58f4451e9 Mon Sep 17 00:00:00 2001
+From: Ruslan Bilovol <rbilovol@cisco.com>
+Date: Thu, 24 Jan 2019 18:11:39 +0200
+Subject: [PATCH] CMake: remove hardcoded CMAKECONFIG_INSTALL_DIR path
+
+Currently this path is hardcoded to lib/cmake.
+Some distributions have different library path (like lib64).
+So reuse LIB_INSTALL_DIR for that to make CMAKECONFIG_INSTALL_DIR
+configurable and usable in such distros.
+
+Upstream-Status: Backport [https://github.com/Tencent/rapidjson/commit/8d272e53a4d1dc405e08ce2dd50159c58f4451e9]
+
+Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com>
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7c60407..0275672 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -199,9 +199,9 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}ConfigVersion.cmake.in
+     ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake @ONLY)
+ 
+ # ... for the install tree
+-SET( CMAKECONFIG_INSTALL_DIR lib/cmake/${PROJECT_NAME} )
++SET( CMAKECONFIG_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/${PROJECT_NAME} )
+ FILE( RELATIVE_PATH REL_INCLUDE_DIR
+-    "${CMAKE_INSTALL_PREFIX}/${CMAKECONFIG_INSTALL_DIR}"
++    "${CMAKECONFIG_INSTALL_DIR}"
+     "${CMAKE_INSTALL_PREFIX}/include" )
+ 
+ SET( ${PROJECT_NAME}_INCLUDE_DIR "\${${PROJECT_NAME}_CMAKE_DIR}/${REL_INCLUDE_DIR}" )
+-- 
+1.9.1
+
diff --git a/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb b/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
index c90eab0..e3ed9c6 100644
--- a/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
+++ b/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
@@ -4,7 +4,8 @@ SECTION = "libs"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://license.txt;md5=ba04aa8f65de1396a7e59d1d746c2125"
 
-SRC_URI = "git://github.com/miloyip/rapidjson.git;nobranch=1"
+SRC_URI = "git://github.com/miloyip/rapidjson.git;nobranch=1 \
+           file://0001-CMake-remove-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch"
 
 SRCREV = "6a905f9311f82d306da77bd963ec5aa5da07da9c"
 
@@ -14,7 +15,7 @@ S = "${WORKDIR}/git"
 
 inherit cmake
 
-EXTRA_OECMAKE += "-DRAPIDJSON_BUILD_DOC=OFF -DRAPIDJSON_BUILD_TESTS=OFF -DRAPIDJSON_BUILD_EXAMPLES=OFF"
+EXTRA_OECMAKE += "-DRAPIDJSON_BUILD_DOC=OFF -DRAPIDJSON_BUILD_TESTS=OFF -DRAPIDJSON_BUILD_EXAMPLES=OFF -DLIB_INSTALL_DIR:STRING=${libdir}"
 
 # RapidJSON is a header-only C++ library, so the main package will be empty.
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [meta-oe] [PATCH] rapidjson: fix cmake artifacts installation for non-default BASELIB case
  2019-02-07 11:00 [meta-oe] [PATCH] rapidjson: fix cmake artifacts installation for non-default BASELIB case Ruslan Bilovol
@ 2019-02-07 17:31 ` Ruslan Bilovol
  2019-02-07 17:59   ` Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Ruslan Bilovol @ 2019-02-07 17:31 UTC (permalink / raw)
  To: openembedded-devel, Khem Raj; +Cc: xe-linux-external

Hi Khem,

I see you picked up this patch to master-next, but the patch's author
is incorrect:
https://git.openembedded.org/meta-openembedded/commit/?h=master-next&id=cf54629463841242ce1faa90f6ad4a2383df3b2c

Could you please fix it?

This is the same issue we faced with oe-core mailing list, I remember
Richard Purdie had some scripts to fix it automatically

Thanks,
Ruslan

On 2/7/19 1:00 PM, Ruslan Bilovol wrote:
> If BASELIB is set to non-default value (like lib64),
> next 'installed but not shipped' issue happens:
>    /usr/lib
>    /usr/lib/cmake
>    /usr/lib/pkgconfig
>    /usr/lib/cmake/RapidJSON
>    /usr/lib/cmake/RapidJSON/RapidJSONConfigVersion.cmake
>    /usr/lib/cmake/RapidJSON/RapidJSONConfig.cmake
>    /usr/lib/pkgconfig/RapidJSON.pc
> 
> This is because rapidjson has library installation dir set
> to 'lib' by default and hardcoded in another place.
> Fix this by next changes:
>   - set appropriate LIB_INSTALL_DIR
>   - fix hardcoded 'lib' in CMAKECONFIG_INSTALL_DIR case
> 
> Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com>
> ---
>   ...ve-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch | 36 ++++++++++++++++++++++
>   .../recipes-devtools/rapidjson/rapidjson_git.bb    |  5 +--
>   2 files changed, 39 insertions(+), 2 deletions(-)
>   create mode 100644 meta-oe/recipes-devtools/rapidjson/rapidjson/0001-CMake-remove-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch
> 
> diff --git a/meta-oe/recipes-devtools/rapidjson/rapidjson/0001-CMake-remove-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch b/meta-oe/recipes-devtools/rapidjson/rapidjson/0001-CMake-remove-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch
> new file mode 100644
> index 0000000..745f5d0
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/rapidjson/rapidjson/0001-CMake-remove-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch
> @@ -0,0 +1,36 @@
> +From 8d272e53a4d1dc405e08ce2dd50159c58f4451e9 Mon Sep 17 00:00:00 2001
> +From: Ruslan Bilovol <rbilovol@cisco.com>
> +Date: Thu, 24 Jan 2019 18:11:39 +0200
> +Subject: [PATCH] CMake: remove hardcoded CMAKECONFIG_INSTALL_DIR path
> +
> +Currently this path is hardcoded to lib/cmake.
> +Some distributions have different library path (like lib64).
> +So reuse LIB_INSTALL_DIR for that to make CMAKECONFIG_INSTALL_DIR
> +configurable and usable in such distros.
> +
> +Upstream-Status: Backport [https://github.com/Tencent/rapidjson/commit/8d272e53a4d1dc405e08ce2dd50159c58f4451e9]
> +
> +Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com>
> +---
> + CMakeLists.txt | 4 ++--
> + 1 file changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index 7c60407..0275672 100644
> +--- a/CMakeLists.txt
> ++++ b/CMakeLists.txt
> +@@ -199,9 +199,9 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}ConfigVersion.cmake.in
> +     ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake @ONLY)
> +
> + # ... for the install tree
> +-SET( CMAKECONFIG_INSTALL_DIR lib/cmake/${PROJECT_NAME} )
> ++SET( CMAKECONFIG_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/${PROJECT_NAME} )
> + FILE( RELATIVE_PATH REL_INCLUDE_DIR
> +-    "${CMAKE_INSTALL_PREFIX}/${CMAKECONFIG_INSTALL_DIR}"
> ++    "${CMAKECONFIG_INSTALL_DIR}"
> +     "${CMAKE_INSTALL_PREFIX}/include" )
> +
> + SET( ${PROJECT_NAME}_INCLUDE_DIR "\${${PROJECT_NAME}_CMAKE_DIR}/${REL_INCLUDE_DIR}" )
> +--
> +1.9.1
> +
> diff --git a/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb b/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
> index c90eab0..e3ed9c6 100644
> --- a/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
> +++ b/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
> @@ -4,7 +4,8 @@ SECTION = "libs"
>   LICENSE = "MIT"
>   LIC_FILES_CHKSUM = "file://license.txt;md5=ba04aa8f65de1396a7e59d1d746c2125"
>   
> -SRC_URI = "git://github.com/miloyip/rapidjson.git;nobranch=1"
> +SRC_URI = "git://github.com/miloyip/rapidjson.git;nobranch=1 \
> +           file://0001-CMake-remove-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch"
>   
>   SRCREV = "6a905f9311f82d306da77bd963ec5aa5da07da9c"
>   
> @@ -14,7 +15,7 @@ S = "${WORKDIR}/git"
>   
>   inherit cmake
>   
> -EXTRA_OECMAKE += "-DRAPIDJSON_BUILD_DOC=OFF -DRAPIDJSON_BUILD_TESTS=OFF -DRAPIDJSON_BUILD_EXAMPLES=OFF"
> +EXTRA_OECMAKE += "-DRAPIDJSON_BUILD_DOC=OFF -DRAPIDJSON_BUILD_TESTS=OFF -DRAPIDJSON_BUILD_EXAMPLES=OFF -DLIB_INSTALL_DIR:STRING=${libdir}"
>   
>   # RapidJSON is a header-only C++ library, so the main package will be empty.
>   
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [meta-oe] [PATCH] rapidjson: fix cmake artifacts installation for non-default BASELIB case
  2019-02-07 17:31 ` Ruslan Bilovol
@ 2019-02-07 17:59   ` Khem Raj
  2019-02-07 21:03     ` Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2019-02-07 17:59 UTC (permalink / raw)
  To: Ruslan Bilovol, Michael Halstead; +Cc: openembeded-devel, XE-Linux

On Thu, Feb 7, 2019 at 9:31 AM Ruslan Bilovol <rbilovol@cisco.com> wrote:
>
> Hi Khem,
>
> I see you picked up this patch to master-next, but the patch's author
> is incorrect:
> https://git.openembedded.org/meta-openembedded/commit/?h=master-next&id=cf54629463841242ce1faa90f6ad4a2383df3b2c
>
> Could you please fix it?
>

sure


> This is the same issue we faced with oe-core mailing list, I remember
> Richard Purdie had some scripts to fix it automatically
>

I wonder why is this happening? May be Michael can help us understand,
why patchwork would feed a worng author or is it
some email client error somewhere?
> Thanks,
> Ruslan
>
> On 2/7/19 1:00 PM, Ruslan Bilovol wrote:
> > If BASELIB is set to non-default value (like lib64),
> > next 'installed but not shipped' issue happens:
> >    /usr/lib
> >    /usr/lib/cmake
> >    /usr/lib/pkgconfig
> >    /usr/lib/cmake/RapidJSON
> >    /usr/lib/cmake/RapidJSON/RapidJSONConfigVersion.cmake
> >    /usr/lib/cmake/RapidJSON/RapidJSONConfig.cmake
> >    /usr/lib/pkgconfig/RapidJSON.pc
> >
> > This is because rapidjson has library installation dir set
> > to 'lib' by default and hardcoded in another place.
> > Fix this by next changes:
> >   - set appropriate LIB_INSTALL_DIR
> >   - fix hardcoded 'lib' in CMAKECONFIG_INSTALL_DIR case
> >
> > Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com>
> > ---
> >   ...ve-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch | 36 ++++++++++++++++++++++
> >   .../recipes-devtools/rapidjson/rapidjson_git.bb    |  5 +--
> >   2 files changed, 39 insertions(+), 2 deletions(-)
> >   create mode 100644 meta-oe/recipes-devtools/rapidjson/rapidjson/0001-CMake-remove-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch
> >
> > diff --git a/meta-oe/recipes-devtools/rapidjson/rapidjson/0001-CMake-remove-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch b/meta-oe/recipes-devtools/rapidjson/rapidjson/0001-CMake-remove-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch
> > new file mode 100644
> > index 0000000..745f5d0
> > --- /dev/null
> > +++ b/meta-oe/recipes-devtools/rapidjson/rapidjson/0001-CMake-remove-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch
> > @@ -0,0 +1,36 @@
> > +From 8d272e53a4d1dc405e08ce2dd50159c58f4451e9 Mon Sep 17 00:00:00 2001
> > +From: Ruslan Bilovol <rbilovol@cisco.com>
> > +Date: Thu, 24 Jan 2019 18:11:39 +0200
> > +Subject: [PATCH] CMake: remove hardcoded CMAKECONFIG_INSTALL_DIR path
> > +
> > +Currently this path is hardcoded to lib/cmake.
> > +Some distributions have different library path (like lib64).
> > +So reuse LIB_INSTALL_DIR for that to make CMAKECONFIG_INSTALL_DIR
> > +configurable and usable in such distros.
> > +
> > +Upstream-Status: Backport [https://github.com/Tencent/rapidjson/commit/8d272e53a4d1dc405e08ce2dd50159c58f4451e9]
> > +
> > +Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com>
> > +---
> > + CMakeLists.txt | 4 ++--
> > + 1 file changed, 2 insertions(+), 2 deletions(-)
> > +
> > +diff --git a/CMakeLists.txt b/CMakeLists.txt
> > +index 7c60407..0275672 100644
> > +--- a/CMakeLists.txt
> > ++++ b/CMakeLists.txt
> > +@@ -199,9 +199,9 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}ConfigVersion.cmake.in
> > +     ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake @ONLY)
> > +
> > + # ... for the install tree
> > +-SET( CMAKECONFIG_INSTALL_DIR lib/cmake/${PROJECT_NAME} )
> > ++SET( CMAKECONFIG_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/${PROJECT_NAME} )
> > + FILE( RELATIVE_PATH REL_INCLUDE_DIR
> > +-    "${CMAKE_INSTALL_PREFIX}/${CMAKECONFIG_INSTALL_DIR}"
> > ++    "${CMAKECONFIG_INSTALL_DIR}"
> > +     "${CMAKE_INSTALL_PREFIX}/include" )
> > +
> > + SET( ${PROJECT_NAME}_INCLUDE_DIR "\${${PROJECT_NAME}_CMAKE_DIR}/${REL_INCLUDE_DIR}" )
> > +--
> > +1.9.1
> > +
> > diff --git a/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb b/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
> > index c90eab0..e3ed9c6 100644
> > --- a/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
> > +++ b/meta-oe/recipes-devtools/rapidjson/rapidjson_git.bb
> > @@ -4,7 +4,8 @@ SECTION = "libs"
> >   LICENSE = "MIT"
> >   LIC_FILES_CHKSUM = "file://license.txt;md5=ba04aa8f65de1396a7e59d1d746c2125"
> >
> > -SRC_URI = "git://github.com/miloyip/rapidjson.git;nobranch=1"
> > +SRC_URI = "git://github.com/miloyip/rapidjson.git;nobranch=1 \
> > +           file://0001-CMake-remove-hardcoded-CMAKECONFIG_INSTALL_DIR-path.patch"
> >
> >   SRCREV = "6a905f9311f82d306da77bd963ec5aa5da07da9c"
> >
> > @@ -14,7 +15,7 @@ S = "${WORKDIR}/git"
> >
> >   inherit cmake
> >
> > -EXTRA_OECMAKE += "-DRAPIDJSON_BUILD_DOC=OFF -DRAPIDJSON_BUILD_TESTS=OFF -DRAPIDJSON_BUILD_EXAMPLES=OFF"
> > +EXTRA_OECMAKE += "-DRAPIDJSON_BUILD_DOC=OFF -DRAPIDJSON_BUILD_TESTS=OFF -DRAPIDJSON_BUILD_EXAMPLES=OFF -DLIB_INSTALL_DIR:STRING=${libdir}"
> >
> >   # RapidJSON is a header-only C++ library, so the main package will be empty.
> >
> >


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [meta-oe] [PATCH] rapidjson: fix cmake artifacts installation for non-default BASELIB case
  2019-02-07 17:59   ` Khem Raj
@ 2019-02-07 21:03     ` Richard Purdie
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2019-02-07 21:03 UTC (permalink / raw)
  To: Khem Raj, Ruslan Bilovol, Michael Halstead; +Cc: openembeded-devel, XE-Linux

On Thu, 2019-02-07 at 09:59 -0800, Khem Raj wrote:
> On Thu, Feb 7, 2019 at 9:31 AM Ruslan Bilovol <rbilovol@cisco.com>
> wrote:
> > I see you picked up this patch to master-next, but the patch's
> > author
> > is incorrect:
> > https://git.openembedded.org/meta-openembedded/commit/?h=master-next&id=cf54629463841242ce1faa90f6ad4a2383df3b2c
> > 
> > Could you please fix it?
> > 
> 
> sure
> 
> 
> > This is the same issue we faced with oe-core mailing list, I
> > remember
> > Richard Purdie had some scripts to fix it automatically
> > 
> 
> I wonder why is this happening? May be Michael can help us
> understand,
> why patchwork would feed a worng author or is it
> some email client error somewhere?

Its an email client problem. Roughly speaking the email was sent from
an IP address which according to DMARC shouldn't be sending email. The
list servers therefore rewrite it to a valid address to stop it being
stopped as spam.

Cheers,

Richard





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-02-07 21:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-07 11:00 [meta-oe] [PATCH] rapidjson: fix cmake artifacts installation for non-default BASELIB case Ruslan Bilovol
2019-02-07 17:31 ` Ruslan Bilovol
2019-02-07 17:59   ` Khem Raj
2019-02-07 21:03     ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.