From: Changqing Li <changqing...@windriver.com>

For cross compile, TIC will be native tic in recipe-sysroot-native, and
the terminfo path will be native path, the rxvt-unicode terminfo will be
wrongly installed to native path.

disable the terminfo installation by setting TIC to : and use qemu to
install terminfo to make sure ncurses on target env use the correct
terminfo

Signed-off-by: Changqing Li <changqing...@windriver.com>
---
 .../rxvt-unicode/rxvt-unicode.inc             | 20 +++++++++-
 ...ble-the-terminfo-installation-by-set.patch | 37 +++++++++++++++++++
 2 files changed, 55 insertions(+), 2 deletions(-)
 create mode 100644 
meta/recipes-sato/rxvt-unicode/rxvt-unicode/0001-Makefile.in-disable-the-terminfo-installation-by-set.patch

diff --git a/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc 
b/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
index e7d520ebef..e6ca10f6e0 100644
--- a/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
+++ b/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
@@ -11,9 +11,11 @@ DEPENDS = "virtual/libx11 libxt libxft gdk-pixbuf libxmu 
libptytty"
 SRC_URI = 
"http://dist.schmorp.de/rxvt-unicode/Attic/rxvt-unicode-${PV}.tar.bz2 \
           file://xwc.patch \
           file://rxvt.desktop \
-          file://rxvt.png"
+          file://rxvt.png \
+          
file://0001-Makefile.in-disable-the-terminfo-installation-by-set.patch \
+"
 
-inherit autotools pkgconfig update-alternatives
+inherit autotools pkgconfig update-alternatives qemu
 
 PROVIDES = "virtual/x-terminal-emulator"
 ALTERNATIVE:${PN} = "x-terminal-emulator"
@@ -53,6 +55,20 @@ do_install:append () {
 
        install -m 0644 ${WORKDIR}/rxvt.png ${D}/${datadir}/pixmaps
        install -m 0644 ${WORKDIR}/rxvt.desktop ${D}/${datadir}/applications
+
+       install -d ${D}/${sysconfdir}
+       install -m 0644 ${S}/doc/etc/rxvt-unicode.terminfo 
${D}/${sysconfdir}/rxvt-unicode.terminfo
+}
+
+RDEPENDS:${PN} = "ncurses-tools"
+PACKAGE_WRITE_DEPS += "qemu-native"
+pkg_postinst:${PN} () {
+       if [ -n "$D" ]; then
+               if ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 
'true', 'false', d)}; then
+                       outdir=$(${@qemu_run_binary(d, '$D', '${bindir}/tic')} 
-D 2>&1 | sed -n "2p" | awk '{ print $2 }')
+                       ${@qemu_run_binary(d, '$D', '${bindir}/tic')} -x 
${sysconfdir}/rxvt-unicode.terminfo -o $D$outdir
+               fi
+       fi
 }
 
 FILES:${PN} += "${datadir}/applications/rxvt.desktop 
${datadir}/pixmaps/rxvt.png"
diff --git 
a/meta/recipes-sato/rxvt-unicode/rxvt-unicode/0001-Makefile.in-disable-the-terminfo-installation-by-set.patch
 
b/meta/recipes-sato/rxvt-unicode/rxvt-unicode/0001-Makefile.in-disable-the-terminfo-installation-by-set.patch
new file mode 100644
index 0000000000..6bdbedb3c4
--- /dev/null
+++ 
b/meta/recipes-sato/rxvt-unicode/rxvt-unicode/0001-Makefile.in-disable-the-terminfo-installation-by-set.patch
@@ -0,0 +1,37 @@
+From ff5c75995485ee9c5331e52bb9bf3aa5db6d8837 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing...@windriver.com>
+Date: Wed, 7 Feb 2024 10:35:23 +0800
+Subject: [PATCH] Makefile.in: disable the terminfo installation by setting TIC
+ to :
+
+For cross compile, TIC will be native tic in recipe-sysroot-native, and
+the terminfo path will be native path, the rxvt-unicode terminfo will be
+installed to native path.
+
+disable the terminfo installation by setting TIC to :
+
+Upstream-Status: Inappropriate [ oe specific ]
+
+Signed-off-by: Changqing Li <changqing...@windriver.com>
+---
+ doc/Makefile.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/doc/Makefile.in b/doc/Makefile.in
+index e3d1fe8..1961c93 100644
+--- a/doc/Makefile.in
++++ b/doc/Makefile.in
+@@ -100,8 +100,8 @@ install: all
+       $(INSTALL_DATA) rxvtd.1.man   
$(DESTDIR)$(man1dir)/$(RXVTNAME)d.$(man1ext)
+       $(INSTALL_DATA) rxvt.7.man    
$(DESTDIR)$(man7dir)/$(RXVTNAME).$(man7ext)
+       $(INSTALL_DATA) rclock.1.man  $(DESTDIR)$(man1dir)/urclock.$(man1ext)
+-      @TIC@ -x $(srcdir)/etc/rxvt-unicode.terminfo || \
+-           @TIC@ $(srcdir)/etc/rxvt-unicode.terminfo
++      : -x $(srcdir)/etc/rxvt-unicode.terminfo || \
++           : $(srcdir)/etc/rxvt-unicode.terminfo
+ 
+ distdepend: alldoc
+ 
+-- 
+2.25.1
+
-- 
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#196243): 
https://lists.openembedded.org/g/openembedded-core/message/196243
Mute This Topic: https://lists.openembedded.org/mt/104598938/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to