From 6cfede980445e3f232634e202459782be587f011 Mon Sep 17 00:00:00 2001 From: Lukas Rusak Date: Mon, 25 Apr 2016 10:37:15 -0700 Subject: [PATCH] screen: add package --- .../system-tools-depends/screen/package.mk | 49 ++++++++++++++ .../screen/patches/screen-cross-compile.patch | 64 +++++++++++++++++++ .../screen-dont_link_against_libelf.patch | 22 +++++++ 3 files changed, 135 insertions(+) create mode 100644 packages/addons/addon-depends/system-tools-depends/screen/package.mk create mode 100644 packages/addons/addon-depends/system-tools-depends/screen/patches/screen-cross-compile.patch create mode 100644 packages/addons/addon-depends/system-tools-depends/screen/patches/screen-dont_link_against_libelf.patch diff --git a/packages/addons/addon-depends/system-tools-depends/screen/package.mk b/packages/addons/addon-depends/system-tools-depends/screen/package.mk new file mode 100644 index 0000000000..d37adf12f6 --- /dev/null +++ b/packages/addons/addon-depends/system-tools-depends/screen/package.mk @@ -0,0 +1,49 @@ +################################################################################ +# This file is part of LibreELEC - http://www.libreelec.tv +# Copyright (C) 2016 Team LibreELEC +# +# LibreELEC is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# LibreELEC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with LibreELEC. If not, see . +################################################################################ + +PKG_NAME="screen" +PKG_VERSION="4.3.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.gnu.org/software/screen/" +PKG_URL="http://ftp.gnu.org/gnu/screen/screen-${PKG_VERSION}.tar.gz" +PKG_DEPENDS_TARGET="toolchain netbsd-curses" +PKG_PRIORITY="optional" +PKG_SECTION="shell/console" +PKG_SHORTDESC="terminal multiplexor with VT100/ANSI terminal emulation" +PKG_LONGDESC="screen is a terminal multiplexor that runs several separate "screens" on a single physical character-based terminal. Each virtual terminal emulates a DEC VT100 plus several ANSI X3.64 and ISO 2022 functions. Screen sessions can be detached and resumed later on a different terminal." +PKG_AUTORECONF="no" + +PKG_CONFIGURE_OPTS_TARGET="ac_cv_header_utempter_h=no \ + --disable-pam \ + --disable-use-locale \ + --disable-telnet \ + --disable-socket-dir" + +pre_configure_target() { + export LDFLAGS=`echo $LDFLAGS | sed -e "s|-Wl,--as-needed||"` + +# screen fails to build in subdirs + cd $ROOT/$PKG_BUILD + rm -rf .$TARGET_NAME +} + +makeinstall_target() { + : # nop +} diff --git a/packages/addons/addon-depends/system-tools-depends/screen/patches/screen-cross-compile.patch b/packages/addons/addon-depends/system-tools-depends/screen/patches/screen-cross-compile.patch new file mode 100644 index 0000000000..b4bc30797c --- /dev/null +++ b/packages/addons/addon-depends/system-tools-depends/screen/patches/screen-cross-compile.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/packages/addons/addon-depends/system-tools-depends/screen/patches/screen-dont_link_against_libelf.patch b/packages/addons/addon-depends/system-tools-depends/screen/patches/screen-dont_link_against_libelf.patch new file mode 100644 index 0000000000..496246a3ec --- /dev/null +++ b/packages/addons/addon-depends/system-tools-depends/screen/patches/screen-dont_link_against_libelf.patch @@ -0,0 +1,22 @@ +diff -Naur screen-4.3.1/configure screen-4.3.1.patch/configure +--- screen-4.3.1/configure 2015-06-28 23:42:40.000000000 +0200 ++++ screen-4.3.1.patch/configure 2016-03-26 17:52:12.807054501 +0100 +@@ -4156,7 +4156,6 @@ + + + oldlibs="$LIBS" +-LIBS="$LIBS -lelf" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking SVR4..." >&5 + $as_echo "$as_me: checking SVR4..." >&6;} + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +diff -Naur screen-4.3.1/configure.ac screen-4.3.1.patch/configure.ac +--- screen-4.3.1/configure.ac 2015-06-28 23:22:55.000000000 +0200 ++++ screen-4.3.1.patch/configure.ac 2016-03-26 17:52:03.538036990 +0100 +@@ -203,7 +203,6 @@ + ], LIBS="$LIBS -lsocket -linet";seqptx=1) + + oldlibs="$LIBS" +-LIBS="$LIBS -lelf" + AC_CHECKING(SVR4) + AC_TRY_LINK([#include + ],,