Skip to contentSkip to conversation

klibc: restylize a bit the recipes

PATCH Superseded Andrea Adami 1 participant 1 message Mar 22, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 klibc: restylize a bit the recipes

No runtime changes.
Reorder and fix some typos in the comments.
Remove unneeded empty do_install from utils.
Fix bogus PACKAGES_${PN} = "${PN}".

---
 .../recipes-devtools/klibc/klcc-cross_2.0.3.bb     | 22 +++++----
 .../klibc/klibc-static-utils_2.0.3.bb              | 13 +++---
 .../recipes-devtools/klibc/klibc-utils.inc         | 14 ++----
 .../recipes-devtools/klibc/klibc-utils_2.0.3.bb    | 13 +++---
 meta-initramfs/recipes-devtools/klibc/klibc.inc    | 52 ++++++++++------------
 .../recipes-devtools/klibc/klibc_2.0.3.bb          |  9 ++--
 6 files changed, 51 insertions(+), 72 deletions(-)
meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.3.bb +10 -12
index 068b3d5..7ff9c2e 100644
@@ -1,25 +1,29 @@
-require klibc.inc
 SUMMARY = "The klcc crosscompiler for klibc"
 
-SRC_URI += "file://use-env-for-perl.patch"
-
+require klibc.inc
 DEPENDS = "klibc"
 
 FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:"
 
+SRC_URI += "file://use-env-for-perl.patch"
+
 inherit cross
 
+# disable task already run in klibc recipe
+do_configure[noexec] = "1"
 do_compile() {
     oe_runmake 'INSTALLDIR=${STAGING_DIR_TARGET}${target_libdir}/klibc' klcc
 }
-
+# The linux-libc-headers and klibc custom headers are not machine-specific
+# but are installed into machine sysroot.
+# Klcc wrapper is hardcoding some of these paths thus, to keep the recipe
+# arch-specific, we force the rebuild of klcc-cross for each machine.
+do_compile[vardeps] += "MACHINE"
 do_install() {
     install -d ${D}${bindir}
     install -m 0755 klcc/klcc ${D}${bindir}/${TARGET_PREFIX}klcc
 }
 
-# disable task already run in klibc recipe
-do_configure[noexec] = "1"
 
 # disable unneeded tasks
 do_package[noexec] = "1"
@@ -28,9 +32,3 @@ do_package_write_ipk[noexec] = "1"
 do_package_write_rpm[noexec] = "1"
 do_package_write_deb[noexec] = "1"
 do_package_write_tar[noexec] = "1"
-
-# The linux-libc-headers and klibc custom headers are not machine-specific
-# but are installed into machine sysroot.
-# Klcc wrapper is hardcoding som eof these paths thus, to keep te recipe
-# arch-specific, we force the rebuild of klcc-cross for each machine.
-do_compile[vardeps] += "MACHINE"
meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.3.bb +5 -8
index 36d4f12..c835fd6 100644
@@ -1,15 +1,12 @@
-KLIBC_UTILS_VARIANT = "static"
-KLIBC_UTILS_PKGNAME = "klibc-static-utils"
+SUMMARY = "klibc utils for initramfs statically compiled"
 
 FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:"
 
-do_install() {
-    :
-}
-
-PACKAGES_${PN} = "${PN}"
+PACKAGES = "${PN}"
 FILES_${PN} = ""
 
+KLIBC_UTILS_VARIANT = "static"
+KLIBC_UTILS_PKGNAME = "klibc-static-utils"
+
 require klibc-utils.inc
 require klibc.inc
-SUMMARY = "klibc utils for initramfs statically compiled"
meta-initramfs/recipes-devtools/klibc/klibc-utils.inc +3 -11
index a626c96..9014f52 100644
@@ -1,12 +1,6 @@
-KLIBC_UTILS_VARIANT ?= "shared"
-KLIBC_UTILS_PKGNAME ?= "klibc-utils"
-
-# losetup goes in ${base_sbindir}
-
-do_install_append() {
+do_install() {
     install -d ${D}${base_bindir}
     install -d ${D}${base_sbindir}
-
     # debian packages kinit + kinit.shared but only sh.shared
     if [ "${KLIBC_UTILS_VARIANT}" = "shared" ]; then
         install -m 755 usr/kinit/kinit ${D}${base_bindir}/kinit
@@ -16,7 +10,6 @@ do_install_append() {
         install -m 755 usr/dash/sh ${D}${base_bindir}/sh
         install -m 755 usr/kinit/kinit ${D}${base_bindir}/kinit
     fi
-
     install -m 755 usr/gzip/gzip ${D}${base_bindir}
     install -m 755 usr/kinit/fstype/${KLIBC_UTILS_VARIANT}/fstype ${D}${base_bindir}
     install -m 755 usr/kinit/ipconfig/${KLIBC_UTILS_VARIANT}/ipconfig ${D}${base_bindir}
@@ -32,6 +25,7 @@ do_install_append() {
     install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/halt ${D}${base_bindir}
     install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/kill ${D}${base_bindir}
     install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/ln ${D}${base_bindir}
+    # losetup goes in ${base_sbindir}
     install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/losetup ${D}${base_sbindir}
     install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/ls ${D}${base_bindir}
     install -m 755 usr/utils/${KLIBC_UTILS_VARIANT}/minips ${D}${base_bindir}
@@ -54,15 +48,13 @@ do_install_append() {
     ln -s gzip ${D}${base_bindir}/zcat
 }
 
-EXTRA_KLIBC_DEPS = '${@base_conditional("KLIBC_UTILS_VARIANT", "shared", "${THIS_LIBKLIBC}", "", d)}'
+EXTRA_KLIBC_DEPS = "${@base_conditional('KLIBC_UTILS_VARIANT', 'shared', '${THIS_LIBKLIBC}', '', d)}"
 
 PACKAGES_DYNAMIC += "^${KLIBC_UTILS_PKGNAME}-.*"
 
 python populate_packages_prepend () {
-
     base_bin_dir = d.expand('${base_bindir}')
     do_split_packages(d, base_bin_dir, '(.*)', '${KLIBC_UTILS_PKGNAME}-%s', 'Klibc util for %s', extra_depends='${EXTRA_KLIBC_DEPS}', allow_links=True, allow_dirs=True)
-
     base_sbin_dir = d.expand('${base_sbindir}')
     do_split_packages(d, base_sbin_dir, '(.*)', '${KLIBC_UTILS_PKGNAME}-%s', 'Klibc util for %s', extra_depends='${EXTRA_KLIBC_DEPS}', allow_dirs=True)
 }
meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.3.bb +5 -8
index d3cebad..fc53bec 100644
@@ -1,15 +1,12 @@
-KLIBC_UTILS_VARIANT = "shared"
-KLIBC_UTILS_PKGNAME = "klibc-utils"
+SUMMARY = "klibc utils for initramfs"
 
 FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:"
 
-do_install() {
-    :
-}
-
-PACKAGES_${PN} = "${PN}"
+PACKAGES = "${PN}"
 FILES_${PN} = ""
 
+KLIBC_UTILS_VARIANT = "shared"
+KLIBC_UTILS_PKGNAME = "klibc-utils"
+
 require klibc-utils.inc
 require klibc.inc
-SUMMARY = "klibc utils for initramfs"
meta-initramfs/recipes-devtools/klibc/klibc.inc +23 -29

77 lines not on this page · raw message

meta-initramfs/recipes-devtools/klibc/klibc_2.0.3.bb +5 -4
index e97d2c7..bc80f38 100644
@@ -1,23 +1,24 @@
+SUMMARY = "klibc, a small C library for use with initramfs"
+
 do_install() {
     oe_runmake install
-
     # the crosscompiler is packaged by klcc-cross
     # remove klcc
     rm ${D}${bindir}/klcc
     # remove now empty dir
     rmdir ${D}${bindir}
-
     install -d ${D}${libdir}
     install -m 755 usr/klibc/klibc-*.so ${D}${libdir}
     (cd  ${D}${libdir}; ln -s klibc-*.so klibc.so)
 }
 
 PACKAGES = "libklibc libklibc-staticdev libklibc-dev"
+
 FILES_libklibc = "${libdir}/klibc-*.so"
 FILES_libklibc-staticdev = "${libdir}/klibc/lib/libc.a"
 FILES_libklibc-dev = "${libdir}/klibc.so \
                       ${libdir}/klibc/lib/* \
                       ${libdir}/klibc/include/* \
-"
+                      "
+
 require klibc.inc
-SUMMARY = "klibc, a small C library for use with initramfs"
Signature · 1 line
1.8.1.5