Patchwork [2/2] screen: enable terminfo and install screenrc

login
register
mail settings
Submitter Gustavo Zacarias
Date May 7, 2012, 10:33 a.m.
Message ID <1336386817-29877-2-git-send-email-gustavo@zacarias.com.ar>
Download mbox | patch
Permalink /patch/157288/
State Accepted
Headers show

Comments

Gustavo Zacarias - May 7, 2012, 10:33 a.m.
Enable terminfo support as reported on bug #5198
Also install screenrc if it's not already present in the target.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/screen/screen.mk |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
Peter Korsgaard - May 7, 2012, 9:22 p.m.
>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:

 Gustavo> Enable terminfo support as reported on bug #5198
 Gustavo> Also install screenrc if it's not already present in the target.

Committed, thanks.

Patch

diff --git a/package/screen/screen.mk b/package/screen/screen.mk
index 4b3d427..d117bde 100644
--- a/package/screen/screen.mk
+++ b/package/screen/screen.mk
@@ -7,8 +7,17 @@ 
 SCREEN_VERSION = 4.0.3
 SCREEN_SITE = $(BR2_GNU_MIRROR)/screen
 SCREEN_DEPENDENCIES = ncurses
-SCREEN_CONF_ENV = ac_cv_header_elf_h=no ac_cv_header_dwarf_h=no
+SCREEN_CONF_ENV = ac_cv_header_elf_h=no ac_cv_header_dwarf_h=no \
+	CFLAGS="$(TARGET_CFLAGS) -DTERMINFO"
 SCREEN_MAKE = $(MAKE1)
 SCREEN_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) SCREEN=screen install_bin
 
+define SCREEN_INSTALL_SCREENRC
+	if [ ! -f $(TARGET_DIR)/etc/screenrc ]; then \
+		$(INSTALL) -m 0755 -D $(@D)/etc/screenrc $(TARGET_DIR)/etc/screenrc; \
+	fi
+endef
+
+SCREEN_POST_INSTALL_TARGET_HOOKS += SCREEN_INSTALL_SCREENRC
+
 $(eval $(call AUTOTARGETS))