All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] cmake: don't inherit autotools
@ 2016-09-14 16:41 Ross Burton
  2016-09-14 16:41 ` [PATCH 2/3] cmake: use convenience options for clarity Ross Burton
  2016-09-14 16:41 ` [PATCH 3/3] cmake-native: rationalise system/internal library dependencies Ross Burton
  0 siblings, 2 replies; 7+ messages in thread
From: Ross Burton @ 2016-09-14 16:41 UTC (permalink / raw)
  To: openembedded-core

cmake doesn't use autotools, the functions get replaced by either cmake.bbclass
(target) or the recipe itself (native) leaving just lots of superfluous
dependencies.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-devtools/cmake/cmake-native_3.6.1.bb | 15 +++++++++++++++
 meta/recipes-devtools/cmake/cmake.inc             |  9 ---------
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/meta/recipes-devtools/cmake/cmake-native_3.6.1.bb b/meta/recipes-devtools/cmake/cmake-native_3.6.1.bb
index 33930fb..f3a485f 100644
--- a/meta/recipes-devtools/cmake/cmake-native_3.6.1.bb
+++ b/meta/recipes-devtools/cmake/cmake-native_3.6.1.bb
@@ -8,6 +8,9 @@ SRC_URI += "\
     file://cmlibarchive-disable-ext2fs.patch \
 "
 
+B = "${WORKDIR}/build"
+do_configure[cleandirs] = "${B}"
+
 # Disable ccmake since we don't depend on ncurses
 CMAKE_EXTRACONF = "\
     -DBUILD_CursesDialog=0 \
@@ -15,4 +18,16 @@ CMAKE_EXTRACONF = "\
     -DHAVE_SYS_ACL_H=0 \
 "
 
+do_configure () {
+	${S}/configure --prefix=${prefix} -- ${CMAKE_EXTRACONF}
+}
+
+do_compile() {
+	oe_runmake
+}
+
+do_install() {
+	oe_runmake 'DESTDIR=${D}' install
+}
+
 do_compile[progress] = "percent"
diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc
index 1f73b3a..4fcb0b1 100644
--- a/meta/recipes-devtools/cmake/cmake.inc
+++ b/meta/recipes-devtools/cmake/cmake.inc
@@ -21,8 +21,6 @@ SRC_URI[sha256sum] = "28ee98ec40427d41a45673847db7a905b59ce9243bb866eaf59dce0f58
 
 UPSTREAM_CHECK_REGEX = "cmake-(?P<pver>\d+(\.\d+)+)\.tar"
 
-inherit autotools
-
 # Ugly hack to work around undefined OE_QMAKE_PATH_EXTERNAL_HOST_BINS variable
 # and possibly missing qmake binary (qtbase-native can be removed from sysroot
 # e.g. in order to upgrade it, even when there is target qtbase)
@@ -45,10 +43,3 @@ do_configure_prepend() {
 	sed -i 's/^  find_package(Qt5Widgets REQUIRED)/#  find_package(Qt5Widgets REQUIRED)/g' ${S}/Tests/QtAutogen/CMakeLists.txt
 	sed -i 's/^  find_package(Qt5Core REQUIRED)/#  find_package(Qt5Core REQUIRED)/g' ${S}/Tests/QtAutogen/autorcc_depends/CMakeLists.txt
 }
-
-# Extra flags to pass to cmake invoked by bootstrap
-CMAKE_EXTRACONF = ""
-
-do_configure () {
-	${S}/configure --prefix=${prefix} -- ${CMAKE_EXTRACONF}
-}
-- 
2.8.1



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

* [PATCH 2/3] cmake: use convenience options for clarity
  2016-09-14 16:41 [PATCH 1/3] cmake: don't inherit autotools Ross Burton
@ 2016-09-14 16:41 ` Ross Burton
  2016-09-14 17:50   ` Otavio Salvador
  2016-09-14 16:41 ` [PATCH 3/3] cmake-native: rationalise system/internal library dependencies Ross Burton
  1 sibling, 1 reply; 7+ messages in thread
From: Ross Burton @ 2016-09-14 16:41 UTC (permalink / raw)
  To: openembedded-core

The intention here was "everything but jsoncpp is system provided" so use the
convenience option to ensure this remains true in the future.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-devtools/cmake/cmake_3.6.1.bb | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/meta/recipes-devtools/cmake/cmake_3.6.1.bb b/meta/recipes-devtools/cmake/cmake_3.6.1.bb
index 2f188f0..67ba9c4 100644
--- a/meta/recipes-devtools/cmake/cmake_3.6.1.bb
+++ b/meta/recipes-devtools/cmake/cmake_3.6.1.bb
@@ -25,13 +25,8 @@ python () {
 
 EXTRA_OECMAKE=" \
     -DCMAKE_DOC_DIR=${docdir_stripped}/cmake-${CMAKE_MAJOR_VERSION} \
-    -DCMAKE_USE_SYSTEM_LIBRARY_BZIP2=1 \
-    -DCMAKE_USE_SYSTEM_LIBRARY_CURL=1 \
-    -DCMAKE_USE_SYSTEM_LIBRARY_EXPAT=1 \
-    -DCMAKE_USE_SYSTEM_LIBRARY_FORM=1 \
-    -DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=1 \
-    -DCMAKE_USE_SYSTEM_LIBRARY_LIBLZMA=1 \
-    -DCMAKE_USE_SYSTEM_LIBRARY_ZLIB=1 \
+    -DCMAKE_USE_SYSTEM_LIBRARIES=1 \
+    -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
     -DKWSYS_CHAR_IS_SIGNED=1 \
     -DBUILD_CursesDialog=0 \
     ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-DKWSYS_LFS_WORKS=1', '-DKWSYS_LFS_DISABLE=1', d)} \
-- 
2.8.1



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

* [PATCH 3/3] cmake-native: rationalise system/internal library dependencies
  2016-09-14 16:41 [PATCH 1/3] cmake: don't inherit autotools Ross Burton
  2016-09-14 16:41 ` [PATCH 2/3] cmake: use convenience options for clarity Ross Burton
@ 2016-09-14 16:41 ` Ross Burton
  1 sibling, 0 replies; 7+ messages in thread
From: Ross Burton @ 2016-09-14 16:41 UTC (permalink / raw)
  To: openembedded-core

By default cmake will auto-detect if a library is present on the host and if it
isn't present will use an internal fork.  For some libraries using the internal
fork is preferable as it can be built with less dependencies, but for others
we're either already building it or the impact of building it is comparable to
internal build.

Continue to use the internal fork of libarchive as our libarchive-native has a
large number of build dependencies.  Using the internal libarchive means that
system bzip2 and zlib must be used.

Explicitly use the internal fork of jsoncpp as we don't have this in oe-core.

Explicitly depend on curl-native, expat-native, and xz-native to ensure these
dependencies are not floating.  curl-native is a non-trivial dependency but is
comparable to building the internal fork, so there's no reason to build it
twice.

Change bzip2-native to bzip2-replacement-native as bzip2-native is
ASSUME_PROVIDED.

[ YOCTO #9639 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-devtools/cmake/cmake-native_3.6.1.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/cmake/cmake-native_3.6.1.bb b/meta/recipes-devtools/cmake/cmake-native_3.6.1.bb
index f3a485f..a301ae6 100644
--- a/meta/recipes-devtools/cmake/cmake-native_3.6.1.bb
+++ b/meta/recipes-devtools/cmake/cmake-native_3.6.1.bb
@@ -1,8 +1,7 @@
 require cmake.inc
 inherit native
 
-# Using cmake's internal libarchive, so some dependencies are needed
-DEPENDS += "bzip2-native zlib-native"
+DEPENDS += "bzip2-replacement-native expat-native xz-native zlib-native curl-native"
 
 SRC_URI += "\
     file://cmlibarchive-disable-ext2fs.patch \
@@ -14,6 +13,9 @@ do_configure[cleandirs] = "${B}"
 # Disable ccmake since we don't depend on ncurses
 CMAKE_EXTRACONF = "\
     -DBUILD_CursesDialog=0 \
+    -DCMAKE_USE_SYSTEM_LIBRARIES=1 \
+    -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
+    -DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=0 \
     -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
     -DHAVE_SYS_ACL_H=0 \
 "
-- 
2.8.1



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

* Re: [PATCH 2/3] cmake: use convenience options for clarity
  2016-09-14 16:41 ` [PATCH 2/3] cmake: use convenience options for clarity Ross Burton
@ 2016-09-14 17:50   ` Otavio Salvador
  2016-09-14 20:59     ` Burton, Ross
  0 siblings, 1 reply; 7+ messages in thread
From: Otavio Salvador @ 2016-09-14 17:50 UTC (permalink / raw)
  To: Ross Burton; +Cc: Patches and discussions about the oe-core layer

On Wed, Sep 14, 2016 at 1:41 PM, Ross Burton <ross.burton@intel.com> wrote:
> The intention here was "everything but jsoncpp is system provided" so use the
> convenience option to ensure this remains true in the future.
>
> Signed-off-by: Ross Burton <ross.burton@intel.com>

Why jsoncpp cannot be also linked?

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH 2/3] cmake: use convenience options for clarity
  2016-09-14 17:50   ` Otavio Salvador
@ 2016-09-14 20:59     ` Burton, Ross
  2016-09-14 21:06       ` Otavio Salvador
  0 siblings, 1 reply; 7+ messages in thread
From: Burton, Ross @ 2016-09-14 20:59 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 175 bytes --]

On 14 September 2016 at 18:50, Otavio Salvador <
otavio.salvador@ossystems.com.br> wrote:

> Why jsoncpp cannot be also linked?
>

Because it's not in oe-core.

Ross

[-- Attachment #2: Type: text/html, Size: 584 bytes --]

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

* Re: [PATCH 2/3] cmake: use convenience options for clarity
  2016-09-14 20:59     ` Burton, Ross
@ 2016-09-14 21:06       ` Otavio Salvador
  2016-09-14 21:12         ` Burton, Ross
  0 siblings, 1 reply; 7+ messages in thread
From: Otavio Salvador @ 2016-09-14 21:06 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Patches and discussions about the oe-core layer

On Wed, Sep 14, 2016 at 5:59 PM, Burton, Ross <ross.burton@intel.com> wrote:
>
> On 14 September 2016 at 18:50, Otavio Salvador
> <otavio.salvador@ossystems.com.br> wrote:
>>
>> Why jsoncpp cannot be also linked?
>
> Because it's not in oe-core.

Ok; but this means it should be right?

If so, we can work on a recipe for it. It is better to avoid bundled
copies of recipe specially because security flaws...

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH 2/3] cmake: use convenience options for clarity
  2016-09-14 21:06       ` Otavio Salvador
@ 2016-09-14 21:12         ` Burton, Ross
  0 siblings, 0 replies; 7+ messages in thread
From: Burton, Ross @ 2016-09-14 21:12 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 413 bytes --]

On 14 September 2016 at 22:06, Otavio Salvador <
otavio.salvador@ossystems.com.br> wrote:

> Ok; but this means it should be right?
>
> If so, we can work on a recipe for it. It is better to avoid bundled
> copies of recipe specially because security flaws...
>

Nothing else wants it, cmake ships with its own trimmed copy.  I'm not
massively convinced it's worth the bother (especially now).

Ross

[-- Attachment #2: Type: text/html, Size: 827 bytes --]

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

end of thread, other threads:[~2016-09-14 21:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-14 16:41 [PATCH 1/3] cmake: don't inherit autotools Ross Burton
2016-09-14 16:41 ` [PATCH 2/3] cmake: use convenience options for clarity Ross Burton
2016-09-14 17:50   ` Otavio Salvador
2016-09-14 20:59     ` Burton, Ross
2016-09-14 21:06       ` Otavio Salvador
2016-09-14 21:12         ` Burton, Ross
2016-09-14 16:41 ` [PATCH 3/3] cmake-native: rationalise system/internal library dependencies Ross Burton

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.