screen: import 4.2.1 from packages
authorEtienne CHAMPETIER <etienne.champetier@free.fr>
Tue, 10 Jun 2014 21:17:23 +0000 (23:17 +0200)
committerEtienne CHAMPETIER <etienne.champetier@free.fr>
Tue, 10 Jun 2014 22:59:06 +0000 (00:59 +0200)
Signed-off-by: Etienne CHAMPETIER <etienne.champetier@free.fr>
utils/screen/Makefile [new file with mode: 0644]
utils/screen/files/etc/screenrc [new file with mode: 0644]
utils/screen/patches/100-cross_compile_fix.patch [new file with mode: 0644]
utils/screen/patches/110-do_not_add_srcdir_to_include_path.patch [new file with mode: 0644]

diff --git a/utils/screen/Makefile b/utils/screen/Makefile
new file mode 100644 (file)
index 0000000..3d00e5e
--- /dev/null
@@ -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 (file)
index 0000000..3337674
--- /dev/null
@@ -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 (file)
index 0000000..b4bc307
--- /dev/null
@@ -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 <sys/stropts.h>
+-#endif
++//#ifdef HAVE_STROPTS_H
++//# include <sys/stropts.h>
++//#endif
+ #if defined(sun) && defined(LOCKPTY) && !defined(TIOCEXCL)
+ # include <sys/ttold.h>
+--- a/sched.h
++++ b/sched.h
+@@ -27,6 +27,11 @@
+  * $Id$ GNU
+  */
++#ifndef __SCHED_H
++#define __SCHED_H
++
++#include <sys/time.h>
++
+ 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 (file)
index 0000000..50d00b8
--- /dev/null
@@ -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