From 729ac34dce472378cec5447c366a28de2081e7de Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Thu, 5 Dec 2019 16:43:43 +0100 Subject: kbd: update to 2.2.0 Rebase set-proper-path-of-resources.patch Add a patch to address a string format error; as it modifies a .l file, add a dependency on flex which is processing that into C source code. License-Update: file with copyright statements was replaced with original GPLv2 text Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- .../0001-analyze.l-add-missing-string-format.patch | 24 ++++++++ .../kbd/kbd/set-proper-path-of-resources.patch | 57 +++++++++++------- meta/recipes-core/kbd/kbd_2.0.4.bb | 64 --------------------- meta/recipes-core/kbd/kbd_2.2.0.bb | 67 ++++++++++++++++++++++ 4 files changed, 126 insertions(+), 86 deletions(-) create mode 100644 meta/recipes-core/kbd/kbd/0001-analyze.l-add-missing-string-format.patch delete mode 100644 meta/recipes-core/kbd/kbd_2.0.4.bb create mode 100644 meta/recipes-core/kbd/kbd_2.2.0.bb diff --git a/meta/recipes-core/kbd/kbd/0001-analyze.l-add-missing-string-format.patch b/meta/recipes-core/kbd/kbd/0001-analyze.l-add-missing-string-format.patch new file mode 100644 index 0000000000..8916fd9f5e --- /dev/null +++ b/meta/recipes-core/kbd/kbd/0001-analyze.l-add-missing-string-format.patch @@ -0,0 +1,24 @@ +From dc6bf2ae0835c6569b270e8e1f26a3173f3927d9 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Wed, 4 Dec 2019 13:14:01 +0100 +Subject: [PATCH] analyze.l: add missing string format + +Upstream-Status: Submitted [https://github.com/legionus/kbd/pull/35] +Signed-off-by: Alexander Kanavin +--- + src/libkeymap/analyze.l | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libkeymap/analyze.l b/src/libkeymap/analyze.l +index e32ace6..de62f46 100644 +--- a/src/libkeymap/analyze.l ++++ b/src/libkeymap/analyze.l +@@ -463,7 +463,7 @@ To to|To|TO + + strerror_r(errno, buf, sizeof(buf)); + +- ERR(yyextra, buf); ++ ERR(yyextra, "%s", buf); + return(ERROR); + } + diff --git a/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch b/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch index a9a3ab8abf..5872cef36b 100644 --- a/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch +++ b/meta/recipes-core/kbd/kbd/set-proper-path-of-resources.patch @@ -1,3 +1,8 @@ +From 7f953dd689155bc1224a3369205c310bb5b760a7 Mon Sep 17 00:00:00 2001 +From: Kai Kang +Date: Fri, 30 Sep 2016 16:49:55 +0800 +Subject: [PATCH] kbd: create ptest sub-package + Upstream-Status: Inappropriate [embedded specific] kbd is out of source built, then the value of $(srcdir) is relative path of @@ -13,38 +18,46 @@ run as expected. Signed-off-by: Kai Kang -Index: kbd-2.0.4/tests/Makefile.am -=================================================================== ---- kbd-2.0.4.orig/tests/Makefile.am -+++ kbd-2.0.4/tests/Makefile.am -@@ -1,7 +1,7 @@ - AM_CPPFLAGS = \ - -I$(srcdir)/../src/libkeymap \ +--- + tests/Makefile.am | 2 +- + tests/alt-is-meta.in | 6 ++---- + tests/dumpkeys-fulltable.in | 2 +- + 3 files changed, 4 insertions(+), 6 deletions(-) + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index f32b9aa..973cd26 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -7,7 +7,7 @@ AM_CPPFLAGS = \ -I$(builddir)/../src/libkeymap \ -- -DDATADIR=\"$(srcdir)\" -DBUILDDIR=\"$(builddir)\" -+ -DDATADIR=\".\" -DBUILDDIR=\"$(builddir)\" + -I$(srcdir)/../src/libkbdfile \ + -I$(builddir)/../src/libkbdfile \ +- -DDATADIR=\"$(srcdir)\" \ ++ -DDATADIR=\".\" \ + -DABS_DATADIR=\"$(realpath $(srcdir))\" \ + -DBUILDDIR=\"$(builddir)\" - AM_CFLAGS = $(CHECK_CFLAGS) - LDADD = $(top_builddir)/src/libkeymap/libkeymap.la $(CHECK_LIBS) @INTLLIBS@ -Index: kbd-2.0.4/tests/alt-is-meta.in -=================================================================== ---- kbd-2.0.4.orig/tests/alt-is-meta.in -+++ kbd-2.0.4/tests/alt-is-meta.in -@@ -7,8 +7,8 @@ cd "$cwd" +diff --git a/tests/alt-is-meta.in b/tests/alt-is-meta.in +index 3a1441f..772fb51 100755 +--- a/tests/alt-is-meta.in ++++ b/tests/alt-is-meta.in +@@ -7,10 +7,8 @@ cd "$cwd" rc=0 temp="$(mktemp "@BUILDDIR@/temp.XXXXXXXXX")" --./libkeymap-showmaps "@DATADIR@"/alt-is-meta.map > "$temp" || rc=$? --cmp -s "@DATADIR@//alt-is-meta.output" "$temp" || rc=$? +-datadir="@DATADIR@/data/alt-is-meta" +- +-./libkeymap-showmaps "$datadir"/alt-is-meta.map > "$temp" || rc=$? +-cmp -s "$datadir/alt-is-meta.output" "$temp" || rc=$? +./libkeymap-showmaps ./alt-is-meta.map > "$temp" || rc=$? +cmp -s "./alt-is-meta.output" "$temp" || rc=$? if [ "$rc" != 0 ]; then printf 'failed\n' -Index: kbd-2.0.4/tests/dumpkeys-fulltable.in -=================================================================== ---- kbd-2.0.4.orig/tests/dumpkeys-fulltable.in -+++ kbd-2.0.4/tests/dumpkeys-fulltable.in +diff --git a/tests/dumpkeys-fulltable.in b/tests/dumpkeys-fulltable.in +index a3a5ece..67a73ef 100755 +--- a/tests/dumpkeys-fulltable.in ++++ b/tests/dumpkeys-fulltable.in @@ -5,7 +5,7 @@ cwd="$(readlink -ev "${0%/*}")" cd "$cwd" diff --git a/meta/recipes-core/kbd/kbd_2.0.4.bb b/meta/recipes-core/kbd/kbd_2.0.4.bb deleted file mode 100644 index 4af3256fff..0000000000 --- a/meta/recipes-core/kbd/kbd_2.0.4.bb +++ /dev/null @@ -1,64 +0,0 @@ -SUMMARY = "Keytable files and keyboard utilities" -HOMEPAGE = "http://www.kbd-project.org/" -# everything minus console-fonts is GPLv2+ -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=a5fcc36121d93e1f69d96a313078c8b5" - -inherit autotools gettext ptest pkgconfig - -RREPLACES_${PN} = "console-tools" -RPROVIDES_${PN} = "console-tools" -RCONFLICTS_${PN} = "console-tools" - -SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \ - file://run-ptest \ - ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'file://set-proper-path-of-resources.patch', '', d)} \ - " - -SRC_URI[md5sum] = "c1635a5a83b63aca7f97a3eab39ebaa6" -SRC_URI[sha256sum] = "5fd90af6beb225a9bb9b9fb414c090fba53c9a55793e172f508cd43652e59a88" - -PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ - ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests','', d)} \ - " - -PACKAGECONFIG[pam] = "--enable-vlock, --disable-vlock, libpam," -PACKAGECONFIG[tests] = "--enable-tests, --disable-tests, libcheck" - -do_compile_ptest() { - oe_runmake -C ${B}/tests dumpkeys-fulltable alt-is-meta -} - -do_install_ptest() { - install -D ${B}/tests/Makefile ${D}${PTEST_PATH}/tests/Makefile - sed -i -e '/Makefile:/,/^$/d' -e '/%: %.in/,/^$/d' \ - -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \ - -e 's:${DEBUG_PREFIX_MAP}::g' \ - -e 's:${HOSTTOOLS_DIR}/::g' \ - -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ - -e 's:${RECIPE_SYSROOT}::g' \ - -e 's:${S}/config/missing::g' \ - -e 's:${WORKDIR}::g' \ - -e '/libkeymap_.*_SOURCES =/d' -e '/$(EXEEXT):/,/^$/d' ${D}${PTEST_PATH}/tests/Makefile - - find ${B}/tests -executable -exec install {} ${D}${PTEST_PATH}/tests \; - find ${S}/tests \( -name \*.map -o -name \*.bin -o -name \*.output \) -exec install {} ${D}${PTEST_PATH}/tests \; - - install -D -m 755 ${S}/config/test-driver ${D}${PTEST_PATH}/config/test-driver -} - -PACKAGES += "${PN}-consolefonts ${PN}-keymaps ${PN}-unimaps ${PN}-consoletrans" - -FILES_${PN}-consolefonts = "${datadir}/consolefonts" -FILES_${PN}-consoletrans = "${datadir}/consoletrans" -FILES_${PN}-keymaps = "${datadir}/keymaps" -FILES_${PN}-unimaps = "${datadir}/unimaps" - -RDEPENDS_${PN}-ptest = "make" - -inherit update-alternatives - -ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt showkey" -ALTERNATIVE_PRIORITY = "100" - -BBCLASSEXTEND = "native" diff --git a/meta/recipes-core/kbd/kbd_2.2.0.bb b/meta/recipes-core/kbd/kbd_2.2.0.bb new file mode 100644 index 0000000000..9556302ab5 --- /dev/null +++ b/meta/recipes-core/kbd/kbd_2.2.0.bb @@ -0,0 +1,67 @@ +SUMMARY = "Keytable files and keyboard utilities" +HOMEPAGE = "http://www.kbd-project.org/" +# everything minus console-fonts is GPLv2+ +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a" + +inherit autotools gettext ptest pkgconfig + +DEPENDS += "flex-native" + +RREPLACES_${PN} = "console-tools" +RPROVIDES_${PN} = "console-tools" +RCONFLICTS_${PN} = "console-tools" + +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \ + file://run-ptest \ + ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'file://set-proper-path-of-resources.patch', '', d)} \ + file://0001-analyze.l-add-missing-string-format.patch \ + " + +SRC_URI[md5sum] = "d1d7ae0b5fb875dc082731e09cd0c8bc" +SRC_URI[sha256sum] = "21a1bc5f6fb3b18ce9fdd717e4533368060a3182a39c7155eaf7ec0f5f83e9f7" + +PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ + ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests','', d)} \ + " + +PACKAGECONFIG[pam] = "--enable-vlock, --disable-vlock, libpam," +PACKAGECONFIG[tests] = "--enable-tests, --disable-tests, libcheck" + +do_compile_ptest() { + oe_runmake -C ${B}/tests dumpkeys-fulltable alt-is-meta +} + +do_install_ptest() { + install -D ${B}/tests/Makefile ${D}${PTEST_PATH}/tests/Makefile + sed -i -e '/Makefile:/,/^$/d' -e '/%: %.in/,/^$/d' \ + -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \ + -e 's:${DEBUG_PREFIX_MAP}::g' \ + -e 's:${HOSTTOOLS_DIR}/::g' \ + -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ + -e 's:${RECIPE_SYSROOT}::g' \ + -e 's:${S}/config/missing::g' \ + -e 's:${WORKDIR}::g' \ + -e '/libkeymap_.*_SOURCES =/d' -e '/$(EXEEXT):/,/^$/d' ${D}${PTEST_PATH}/tests/Makefile + + find ${B}/tests -executable -exec install {} ${D}${PTEST_PATH}/tests \; + find ${S}/tests \( -name \*.map -o -name \*.bin -o -name \*.output \) -exec install {} ${D}${PTEST_PATH}/tests \; + + install -D -m 755 ${S}/config/test-driver ${D}${PTEST_PATH}/config/test-driver +} + +PACKAGES += "${PN}-consolefonts ${PN}-keymaps ${PN}-unimaps ${PN}-consoletrans" + +FILES_${PN}-consolefonts = "${datadir}/consolefonts" +FILES_${PN}-consoletrans = "${datadir}/consoletrans" +FILES_${PN}-keymaps = "${datadir}/keymaps" +FILES_${PN}-unimaps = "${datadir}/unimaps" + +RDEPENDS_${PN}-ptest = "make" + +inherit update-alternatives + +ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt showkey" +ALTERNATIVE_PRIORITY = "100" + +BBCLASSEXTEND = "native" -- cgit 1.2.3-korg