From d6078ba4a0e5ed2b659df047fc5d67c40ccd2df9 Mon Sep 17 00:00:00 2001 From: Etienne CHAMPETIER Date: Tue, 10 Jun 2014 23:17:23 +0200 Subject: [PATCH] screen: import 4.2.1 from packages Signed-off-by: Etienne CHAMPETIER --- utils/screen/Makefile | 52 +++++++++++++++ utils/screen/files/etc/screenrc | 1 + .../patches/100-cross_compile_fix.patch | 64 +++++++++++++++++++ ...10-do_not_add_srcdir_to_include_path.patch | 11 ++++ 4 files changed, 128 insertions(+) create mode 100644 utils/screen/Makefile create mode 100644 utils/screen/files/etc/screenrc create mode 100644 utils/screen/patches/100-cross_compile_fix.patch create mode 100644 utils/screen/patches/110-do_not_add_srcdir_to_include_path.patch diff --git a/utils/screen/Makefile b/utils/screen/Makefile new file mode 100644 index 0000000000..3d00e5ea6d --- /dev/null +++ b/utils/screen/Makefile @@ -0,0 +1,52 @@ +# +# Copyright (C) 2006-2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=screen +PKG_VERSION:=4.2.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@GNU/screen +PKG_MD5SUM:=419a0594e2b25039239af8b90eda7d92 + +include $(INCLUDE_DIR)/package.mk + +define Package/screen + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libncurses + TITLE:=Full-screen terminal window manager + URL:=http://www.gnu.org/software/screen/ +endef + +define Package/screen/description + Screen is a full-screen window manager that multiplexes a physical + terminal between several processes, typically interactive shells. +endef + +define Build/Configure + $(call Build/Configure/Default,\ + --with-sys-screenrc=/etc/screenrc \ + ) + # XXX: memmove() works well with overlapped memory areas + echo "#define USEMEMMOVE 1" >>$(PKG_BUILD_DIR)/config.h +endef + +define Package/screen/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/screen $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/etc/screenrc $(1)/etc/screenrc +endef + +define Package/screen/conffiles +/etc/screenrc +endef + +$(eval $(call BuildPackage,screen)) diff --git a/utils/screen/files/etc/screenrc b/utils/screen/files/etc/screenrc new file mode 100644 index 0000000000..33376745b5 --- /dev/null +++ b/utils/screen/files/etc/screenrc @@ -0,0 +1 @@ +startup_message off diff --git a/utils/screen/patches/100-cross_compile_fix.patch b/utils/screen/patches/100-cross_compile_fix.patch new file mode 100644 index 0000000000..b4bc30797c --- /dev/null +++ b/utils/screen/patches/100-cross_compile_fix.patch @@ -0,0 +1,64 @@ +--- a/configure ++++ b/configure +@@ -414,7 +414,7 @@ as_fn_error () + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 +- as_fn_exit $as_status ++ # as_fn_exit $as_status + } # as_fn_error + + if expr a : '\(a\)' >/dev/null 2>&1 && +@@ -5941,8 +5941,6 @@ else + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +-test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec" +-test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow" + oldlibs="$LIBS" + LIBS="$LIBS -lsun" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking IRIX sun library..." >&5 +@@ -7023,7 +7021,7 @@ as_fn_error () + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 +- as_fn_exit $as_status ++ # as_fn_exit $as_status + } # as_fn_error + + +--- a/pty.c ++++ b/pty.c +@@ -39,9 +39,9 @@ + #endif + + /* for solaris 2.1, Unixware (SVR4.2) and possibly others */ +-#ifdef HAVE_STROPTS_H +-# include +-#endif ++//#ifdef HAVE_STROPTS_H ++//# include ++//#endif + + #if defined(sun) && defined(LOCKPTY) && !defined(TIOCEXCL) + # include +--- a/sched.h ++++ b/sched.h +@@ -27,6 +27,11 @@ + * $Id$ GNU + */ + ++#ifndef __SCHED_H ++#define __SCHED_H ++ ++#include ++ + struct event + { + struct event *next; +@@ -46,3 +51,5 @@ struct event + #define EV_READ 1 + #define EV_WRITE 2 + #define EV_ALWAYS 3 ++ ++#endif diff --git a/utils/screen/patches/110-do_not_add_srcdir_to_include_path.patch b/utils/screen/patches/110-do_not_add_srcdir_to_include_path.patch new file mode 100644 index 0000000000..50d00b8697 --- /dev/null +++ b/utils/screen/patches/110-do_not_add_srcdir_to_include_path.patch @@ -0,0 +1,11 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -79,7 +79,7 @@ screen: $(OFILES) + $(CC) $(LDFLAGS) -o $@ $(OFILES) $(LIBS) + + .c.o: +- $(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(CPPFLAGS) $(DEFS) \ ++ $(CC) -c $(M_CFLAGS) $(CPPFLAGS) $(DEFS) \ + $(OPTIONS) $(CFLAGS) $< + + install_bin: .version screen