[oe] [PATCH 01/13] xkeyboard-config: avoid recipe code duplication and depends on intltool-native

Khem Raj raj.khem at gmail.com
Wed Feb 16 23:03:20 UTC 2011


On (16/02/11 11:18), Otavio Salvador wrote:
> Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
> ---
>  recipes/xkeyboard-config/xkeyboard-config.inc    |   18 ++++++++++++++++++
>  recipes/xkeyboard-config/xkeyboard-config_1.4.bb |   18 +++---------------
>  recipes/xkeyboard-config/xkeyboard-config_1.8.bb |   18 +++---------------
>  recipes/xkeyboard-config/xkeyboard-config_git.bb |   17 +++--------------
>  4 files changed, 27 insertions(+), 44 deletions(-)
>  create mode 100644 recipes/xkeyboard-config/xkeyboard-config.inc
> 
> diff --git a/recipes/xkeyboard-config/xkeyboard-config.inc b/recipes/xkeyboard-config/xkeyboard-config.inc
> new file mode 100644
> index 0000000..a236cd5
> --- /dev/null
> +++ b/recipes/xkeyboard-config/xkeyboard-config.inc
> @@ -0,0 +1,18 @@
> +DESCRIPTION = "Common X11 Keyboard layouts"
> +LICENSE = "MIT"
> +DEPENDS = "intltool-native xkbcomp-native"
> +RDEPENDS_${PN} = "xkbcomp"
> +INC_PR = "r6"
> +
> +SRC_URI = "http://xlibs.freedesktop.org/xkbdesc/xkeyboard-config-${PV}.tar.bz2"
> +
> +S = "${WORKDIR}/${PN}-${PV}"
> +
> +inherit autotools
> +
> +do_install_append () {
> +    install -d ${D}/usr/share/X11/xkb/compiled

whynot use meta vars for datadir instead of hardcoding /usr/share ?
like below :)

> +    cd ${D}${datadir}/X11/xkb/rules && ln -sf base xorg
> +}
> +
> +FILES_${PN} += "${datadir}/X11/xkb"
> diff --git a/recipes/xkeyboard-config/xkeyboard-config_1.4.bb b/recipes/xkeyboard-config/xkeyboard-config_1.4.bb
> index 3bca763..d8b9e3f 100644
> --- a/recipes/xkeyboard-config/xkeyboard-config_1.4.bb
> +++ b/recipes/xkeyboard-config/xkeyboard-config_1.4.bb
> @@ -1,20 +1,8 @@
> -DESCRIPTION = "Common X11 Keyboard layouts"
> -LICENSE = "MIT"
> -DEPENDS = "intltool xkbcomp-native"
> -RDEPENDS_${PN} = "xkbcomp"
> -PR = "r5"
> +require xkeyboard-config.inc
>  
> -SRC_URI = "http://xlibs.freedesktop.org/xkbdesc/xkeyboard-config-${PV}.tar.bz2 \
> -           file://abnt2-fixes.patch"
> +PR = "${INC_PR}.0"
>  
> -inherit autotools
> -
> -do_install_append () {
> -    install -d ${D}/usr/share/X11/xkb/compiled
> -    cd ${D}${datadir}/X11/xkb/rules && ln -sf base xorg
> -}
> -
> -FILES_${PN} += "${datadir}/X11/xkb"
> +SRC_URI += "file://abnt2-fixes.patch"
>  
>  SRC_URI[md5sum] = "a9fe7efbc67a6966c4d4501f0cf88073"
>  SRC_URI[sha256sum] = "921a857dcf90a59df7feb26da5aabcf0bbfb749c46e2a46c3bc7a0280b83b0e1"
> diff --git a/recipes/xkeyboard-config/xkeyboard-config_1.8.bb b/recipes/xkeyboard-config/xkeyboard-config_1.8.bb
> index fbf4f1d..fdeb667 100644
> --- a/recipes/xkeyboard-config/xkeyboard-config_1.8.bb
> +++ b/recipes/xkeyboard-config/xkeyboard-config_1.8.bb
> @@ -1,20 +1,8 @@
> -DESCRIPTION = "Common X11 Keyboard layouts"
> -LICENSE = "MIT"
> -DEPENDS = "intltool xkbcomp-native"
> -RDEPENDS_${PN} = "xkbcomp"
> -PR = "r0"
> +require xkeyboard-config.inc
>  
> -SRC_URI = "http://xlibs.freedesktop.org/xkbdesc/xkeyboard-config-${PV}.tar.bz2 \
> -           file://abnt2-fixes.patch"
> +PR = "${INC_PR}.0"
>  
> -inherit autotools
> -
> -do_install_append () {
> -    install -d ${D}/usr/share/X11/xkb/compiled
> -    cd ${D}${datadir}/X11/xkb/rules && ln -sf base xorg
> -}
> -
> -FILES_${PN} += "${datadir}/X11/xkb"
> +SRC_URI += "file://abnt2-fixes.patch"
>  
>  SRC_URI[md5sum] = "37ae41628cd2ce35d202d30b1820c8ba"
>  SRC_URI[sha256sum] = "7dc3e6ca00adb105f46e40f8382e83d50b3fcd626bc8654293dae8b1e80506ce"
> diff --git a/recipes/xkeyboard-config/xkeyboard-config_git.bb b/recipes/xkeyboard-config/xkeyboard-config_git.bb
> index b92bdc1..ac8d03f 100644
> --- a/recipes/xkeyboard-config/xkeyboard-config_git.bb
> +++ b/recipes/xkeyboard-config/xkeyboard-config_git.bb
> @@ -1,20 +1,9 @@
> -DESCRIPTION = "Common X11 Keyboard layouts"
> -LICENSE = "MIT"
> -DEPENDS = "intltool xkbcomp-native"
> -RDEPENDS_${PN} = "xkbcomp"
> +require xkeyboard-config.inc
> +
>  SRCREV = "547ae8589afb208d7b44ffe1e0ff7aba466c2ee3"
>  PV = "2.0+gitr${SRCPV}"
> -PR = "r0"
> +PR = "${INC_PR}.0"
>  
>  SRC_URI = "git://anongit.freedesktop.org/xkeyboard-config;protocol=git;branch=master"
>  
>  S = "${WORKDIR}/git"
> -
> -inherit autotools
> -
> -do_install_append () {
> -    install -d ${D}/usr/share/X11/xkb/compiled
> -    cd ${D}${datadir}/X11/xkb/rules && ln -sf base xorg
> -}
> -
> -FILES_${PN} += "${datadir}/X11/xkb"
> -- 
> 1.7.2.3
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

-- 
-Khem




More information about the Openembedded-devel mailing list