Skip to contentSkip to conversation

Teach cmake.bbclass to put cmake page files in -dev packages

PATCH New Mike Crowe 1 participant 7 messages Jan 6, 2018

lore
Share & tools
lore

Mike Crowe

author
#0 lore raw

cover Teach cmake.bbclass to put cmake page files in -dev packages

We've added a few of our own recipes recently for projects that use cmake and it's a pain to have to add the required magic to ensure that cmake's package files (a bit like .pc files) end up in the -dev package. Forgetting to do this causes annoying warnings about unpackaged files.

So, let's just teach cmake.bbclass to deal with this itself.

I've tested that each of the packages build correctly without generating warnings about left-over files. But I haven't checked that anything that might be relying the package files can still find them afterwards. I did test that core-image-sato still builds, but that probably doesn't prove much.

I don't think there's any harm for third-party recipes that continue to contain equivalent FILES_${PN}-dev assignments.

Mike.

Mike Crowe (6):
cmake: Always put cmake package files in -dev packages
libsolv: Rely on cmake.bbclass to put cmake package files in dev
package
vulkan: Rely on cmake.bbclass to put cmake package files in dev
package
waffle: Rely on cmake.bbclass to put cmake package files in dev
package
libical: Rely on cmake.bbclass to put cmake package files in dev
package
libproxy: Rely on cmake.bbclass to put cmake package files in dev
package

 meta/classes/cmake.bbclass                       | 2 ++
 meta/recipes-extended/libsolv/libsolv_0.6.29.bb  | 1 -
 meta/recipes-graphics/vulkan/assimp_4.0.1.bb     | 2 --
 meta/recipes-graphics/waffle/waffle_1.5.2.bb     | 3 ---
 meta/recipes-support/libical/libical_2.0.0.bb    | 2 --
 meta/recipes-support/libproxy/libproxy_0.4.15.bb | 1 -
 6 files changed, 2 insertions(+), 9 deletions(-)
Signature · 1 line
2.11.0
author
#1 lore raw

PATCH 1/6 cmake: Always put cmake package files in -dev packages

Various recipes that inherit cmake contain FILES_${PN}-dev magic to add the generated package files to their -dev packages. Since this is a standard feature of cmake, we might as well teach cmake.bbclass to do this itself so those recipes can be simpler.

---
 meta/classes/cmake.bbclass | 2 ++
 1 file changed, 2 insertions(+)
meta/classes/cmake.bbclass +2 -0
index ac2c1519b0..a4079dab0d 100644
@@ -34,6 +34,8 @@ EXTRA_OECMAKE_append = " ${PACKAGECONFIG_CONFARGS}"
 EXTRA_OECMAKE_BUILD_prepend_task-compile = "${PARALLEL_MAKE} "
 EXTRA_OECMAKE_BUILD_prepend_task-install = "${PARALLEL_MAKEINST} "
 
+FILES_${PN}-dev += "${libdir}/cmake ${datadir}/cmake"
+
 # CMake expects target architectures in the format of uname(2),
 # which do not always match TARGET_ARCH, so all the necessary
 # conversions should happen here.
Signature · 1 line
2.11.0
author
#2 lore raw

PATCH 2/6 libsolv: Rely on cmake.bbclass to put cmake package files in dev package

In reply to Mike Crowe

cmake.bbclass now ensures that ${datadir}/cmake ends up in the dev package, so this recipe doesn't need to do so itself.

---
 meta/recipes-extended/libsolv/libsolv_0.6.29.bb | 1 -
 1 file changed, 1 deletion(-)
meta/recipes-extended/libsolv/libsolv_0.6.29.bb +0 -1
index e216921ea4..78972e5fed 100644
@@ -25,7 +25,6 @@ EXTRA_OECMAKE = "-DLIB=${baselib} -DMULTI_SEMANTICS=ON -DENABLE_RPMMD=ON -DENABL
 
 PACKAGES =+ "${PN}-tools ${PN}ext"
 
-FILES_${PN}-dev += "${datadir}/cmake/Modules/FindLibSolv.cmake"
 FILES_${PN}-tools = "${bindir}/*"
 FILES_${PN}ext = "${libdir}/${PN}ext.so.*"
 
Signature · 1 line
2.11.0
author
#3 lore raw

PATCH 3/6 vulkan: Rely on cmake.bbclass to put cmake package files in dev package

In reply to Mike Crowe

cmake.bbclass now ensures that ${libdir}/cmake ends up in the dev package, so this recipe doesn't need to do so itself.

---
 meta/recipes-graphics/vulkan/assimp_4.0.1.bb | 2 --
 1 file changed, 2 deletions(-)
meta/recipes-graphics/vulkan/assimp_4.0.1.bb +0 -2
index b2dd59ef14..75ce0d6bf9 100644
@@ -18,5 +18,3 @@ S = "${WORKDIR}/git"
 inherit cmake
 
 EXTRA_OECMAKE = "-DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_BUILD_TESTS=OFF -DASSIMP_LIB_INSTALL_DIR=${baselib}"
-
-FILES_${PN}-dev += "${libdir}/cmake/"
Signature · 1 line
2.11.0
author
#4 lore raw

PATCH 4/6 waffle: Rely on cmake.bbclass to put cmake package files in dev package

In reply to Mike Crowe

cmake.bbclass now ensures that ${libdir}/cmake and ${datadir}/cmake end up in the dev package, so this recipe doesn't need to do so itself.

---
 meta/recipes-graphics/waffle/waffle_1.5.2.bb | 3 ---
 1 file changed, 3 deletions(-)
meta/recipes-graphics/waffle/waffle_1.5.2.bb +0 -3
index a5179db1da..43c3edc05a 100644
@@ -35,6 +35,3 @@ PACKAGECONFIG[gbm] = "-Dwaffle_has_gbm=1,-Dwaffle_has_gbm=0,virtual/${MLPREFIX}l
 
 # I say virtual/libgl, actually wants egl.pc
 PACKAGECONFIG[x11-egl] = "-Dwaffle_has_x11_egl=1,-Dwaffle_has_x11_egl=0,virtual/${MLPREFIX}libgl libxcb"
-
-FILES_${PN}-dev += "${datadir}/cmake/Modules/FindWaffle.cmake \
-                    ${libdir}/cmake/Waffle/"
Signature · 1 line
2.11.0
author
#5 lore raw

PATCH 5/6 libical: Rely on cmake.bbclass to put cmake package files in dev package

In reply to Mike Crowe

cmake.bbclass now ensures that ${libdir}/cmake ends up in the dev package, so this recipe doesn't need to do so itself.

---
 meta/recipes-support/libical/libical_2.0.0.bb | 2 --
 1 file changed, 2 deletions(-)
meta/recipes-support/libical/libical_2.0.0.bb +0 -2
index d4fe868eb4..dcc21cc16e 100644
@@ -17,5 +17,3 @@ SRC_URI[sha256sum] = "654c11f759c19237be39f6ad401d917e5a05f36f1736385ed958e60cf2
 UPSTREAM_CHECK_URI = "https://github.com/libical/libical/releases"
 
 inherit cmake pkgconfig
-
-FILES_${PN}-dev += "${libdir}/cmake/*"
Signature · 1 line
2.11.0
author
#6 lore raw

PATCH 6/6 libproxy: Rely on cmake.bbclass to put cmake package files in dev package

In reply to Mike Crowe

cmake.bbclass now ensures that ${datadir}/cmake ends up in the dev package, so this recipe doesn't need to do so itself.

---
 meta/recipes-support/libproxy/libproxy_0.4.15.bb | 1 -
 1 file changed, 1 deletion(-)
meta/recipes-support/libproxy/libproxy_0.4.15.bb +0 -1
index 9a687df976..991c9d8320 100644
@@ -34,4 +34,3 @@ EXTRA_OECMAKE += " \
 SECURITY_PIE_CFLAGS_remove = "-fPIE -pie"
 
 FILES_${PN} += "${libdir}/${BPN}/${PV}/modules"
-FILES_${PN}-dev += "${datadir}/cmake"
Signature · 1 line
2.11.0