summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMATSUU Takuto <matsuu@gentoo.org>2009-07-13 23:43:35 +0900
committerMATSUU Takuto <matsuu@gentoo.org>2009-07-13 23:43:35 +0900
commita0f9f4eca7a8e4cd143835cfa27da47fbdccbcb4 (patch)
tree352a82eb3209ab5363723af523701313bc3927d4 /app-misc
parentapp-misc/dvtm: Version bumped. (diff)
downloadmatsuu-a0f9f4eca7a8e4cd143835cfa27da47fbdccbcb4.tar.gz
matsuu-a0f9f4eca7a8e4cd143835cfa27da47fbdccbcb4.tar.bz2
matsuu-a0f9f4eca7a8e4cd143835cfa27da47fbdccbcb4.zip
app-misc/tscreen: Initial import.
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/tscreen/Manifest6
-rw-r--r--app-misc/tscreen/files/4.0.2-no-pty.patch14
-rw-r--r--app-misc/tscreen/files/4.0.2-no-utempter.patch14
-rw-r--r--app-misc/tscreen/files/tscreen-0.4.9-config.h-autoconf-2.62.patch10
-rw-r--r--app-misc/tscreen/files/tscreen-0.4.9-no-libelf.patch18
-rw-r--r--app-misc/tscreen/tscreen-0.4.9.ebuild131
6 files changed, 193 insertions, 0 deletions
diff --git a/app-misc/tscreen/Manifest b/app-misc/tscreen/Manifest
new file mode 100644
index 0000000..7b87240
--- /dev/null
+++ b/app-misc/tscreen/Manifest
@@ -0,0 +1,6 @@
+AUX 4.0.2-no-pty.patch 392 RMD160 d29aec55c6b76f66a8340096f627afe2e4dca3e8 SHA1 bd1328e0dbb321397692846b5c2ac62df1885a9c SHA256 edc29bc7b7bea89c2f937ca9c95f2ce51b437e4ea042741d9f4ac6d7954178d5
+AUX 4.0.2-no-utempter.patch 440 RMD160 3e0ee3492e5ae84bf05716a1787dee495362bc39 SHA1 f0f810a969790c7d2f6ecd6787909371bab79879 SHA256 cc0178fb86971c0975e3d6d60677f2ad3a393ea126790dc5d56f566c42ebe384
+AUX tscreen-0.4.9-config.h-autoconf-2.62.patch 356 RMD160 93cac0aa412867092618df0a8f1dba65398bf219 SHA1 84f3e8c15f6e4cec6dd77182aff1456ba30c91cf SHA256 0f23c7b4267c3383934a0938f952996997b47e044f948b900db7bbd8133f25b0
+AUX tscreen-0.4.9-no-libelf.patch 598 RMD160 f9f3da969e4508db4d717c5df54c50ddaa88aba7 SHA1 db5b03097e0645c9555b20e8914c4cbbb31034d3 SHA256 11a6c144936ee2c403cf10d3083708756144f549638226a46a2cf32c9a0fb2bc
+DIST tscreen-0.4.9.tar.gz 856586 RMD160 e5b0a8d6702df9724332251cda68eaa701ca0343 SHA1 9cda106252b6abc459568d99905c96c63e842d73 SHA256 b920f1a96dfa8a390601a8e78fc7ab49d4599f7544e30cfdae5ea0e0aeb0305d
+EBUILD tscreen-0.4.9.ebuild 3535 RMD160 380a46b4f0c7a3eefc5d18489be163e5562bd304 SHA1 7d7d5a000f543042795386a4971bf9ce53c12128 SHA256 854bd2e11491162699bd104411faba2c78c327bdd3a037ba8835ccd9ce28af57
diff --git a/app-misc/tscreen/files/4.0.2-no-pty.patch b/app-misc/tscreen/files/4.0.2-no-pty.patch
new file mode 100644
index 0000000..7b7b798
--- /dev/null
+++ b/app-misc/tscreen/files/4.0.2-no-pty.patch
@@ -0,0 +1,14 @@
+--- screen-4.0.2/pty.c.orig 2004-07-29 23:53:45.313533536 -0400
++++ screen-4.0.2/pty.c 2004-07-29 23:53:59.011451136 -0400
+@@ -33,11 +33,6 @@
+ # include <sys/ioctl.h>
+ #endif
+
+-/* for solaris 2.1, Unixware (SVR4.2) and possibly others */
+-#ifdef HAVE_SVR4_PTYS
+-# include <sys/stropts.h>
+-#endif
+-
+ #if defined(sun) && defined(LOCKPTY) && !defined(TIOCEXCL)
+ # include <sys/ttold.h>
+ #endif
diff --git a/app-misc/tscreen/files/4.0.2-no-utempter.patch b/app-misc/tscreen/files/4.0.2-no-utempter.patch
new file mode 100644
index 0000000..2a06119
--- /dev/null
+++ b/app-misc/tscreen/files/4.0.2-no-utempter.patch
@@ -0,0 +1,14 @@
+--- screen-4.0.2/configure.in.orig 2004-12-17 19:55:45.314670411 +0100
++++ screen-4.0.2/configure.in 2004-12-17 19:55:50.575941541 +0100
+@@ -855,11 +855,6 @@
+ #include <utmp.h>
+ #endif
+ ],[struct utmp u; u.ut_host[0] = 0;], AC_DEFINE(UTHOST))
+-AC_CHECK_HEADER(utempter.h, have_utempter=yes, have_utempter=no)
+-if test "$have_utempter" = yes; then
+- AC_DEFINE(HAVE_UTEMPTER)
+- LIBS="$LIBS -lutempter"
+-fi
+
+ dnl
+ dnl **** loadav ****
diff --git a/app-misc/tscreen/files/tscreen-0.4.9-config.h-autoconf-2.62.patch b/app-misc/tscreen/files/tscreen-0.4.9-config.h-autoconf-2.62.patch
new file mode 100644
index 0000000..cc707cb
--- /dev/null
+++ b/app-misc/tscreen/files/tscreen-0.4.9-config.h-autoconf-2.62.patch
@@ -0,0 +1,10 @@
+--- tscreen-0.4.9.orig/config.h.in 2008-11-03 04:55:03.000000000 +0900
++++ tscreen-0.4.9/config.h.in 2009-07-13 12:51:41.000000000 +0900
+@@ -548,7 +548,6 @@
+ /* KEEP_UNDEF_HERE override system value
+ * (Will this even work as expected? -mjc) */
+ #undef NAME_MAX
+-#undef NAME_MAX
+
+ /*
+ * define HAVE_NL_LANGINFO if your system has the nl_langinfo() call
diff --git a/app-misc/tscreen/files/tscreen-0.4.9-no-libelf.patch b/app-misc/tscreen/files/tscreen-0.4.9-no-libelf.patch
new file mode 100644
index 0000000..5a668ca
--- /dev/null
+++ b/app-misc/tscreen/files/tscreen-0.4.9-no-libelf.patch
@@ -0,0 +1,18 @@
+diff -Naur tscreen-0.4.9.orig/configure.in tscreen-0.4.9/configure.in
+--- tscreen-0.4.9.orig/configure.in 2008-10-31 22:08:15.000000000 +0900
++++ tscreen-0.4.9/configure.in 2009-07-13 12:48:51.000000000 +0900
+@@ -200,14 +200,6 @@
+ #endif
+ ], LIBS="$LIBS -lsocket -linet";seqptx=1)
+
+-oldlibs="$LIBS"
+-LIBS="$LIBS -lelf"
+-AC_CHECKING(SVR4)
+-AC_TRY_LINK([#include <utmpx.h>
+-],,
+-[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN),
+-[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])]
+-,LIBS="$oldlibs")
+ AC_CHECK_HEADERS([stropts.h])
+
+ AC_CHECKING(for Solaris 2.x)
diff --git a/app-misc/tscreen/tscreen-0.4.9.ebuild b/app-misc/tscreen/tscreen-0.4.9.ebuild
new file mode 100644
index 0000000..290e4a2
--- /dev/null
+++ b/app-misc/tscreen/tscreen-0.4.9.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+WANT_AUTOCONF="2.5"
+
+inherit eutils flag-o-matic toolchain-funcs pam autotools
+
+DESCRIPTION="tscreen is a fork of GNU Screen"
+HOMEPAGE="http://www.steve.org.uk/Software/tscreen/"
+SRC_URI="http://www.steve.org.uk/Software/tscreen/dist/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug nethack pam selinux multiuser"
+
+RDEPEND=">=sys-libs/ncurses-5.2
+ pam? ( virtual/pam )
+ selinux? (
+ sec-policy/selinux-screen
+ >=sec-policy/selinux-base-policy-20050821
+ )"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ # Make sure utmp group exists, as it's used later on.
+ enewgroup utmp 406
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # uclibc doesnt have sys/stropts.h
+ if ! (echo '#include <sys/stropts.h>' | $(tc-getCC) -E - &>/dev/null) ; then
+ epatch "${FILESDIR}"/4.0.2-no-pty.patch
+ fi
+
+ # Don't use utempter even if it is found on the system
+ epatch "${FILESDIR}"/4.0.2-no-utempter.patch
+
+ # Don't link against libelf even if it is found on the system
+ epatch "${FILESDIR}"/${P}-no-libelf.patch
+
+ # compability for sys-devel/autoconf-2.62
+ epatch "${FILESDIR}"/${P}-config.h-autoconf-2.62.patch
+
+ # Fix manpage.
+ sed -i \
+ -e "s:/usr/local/etc/screenrc:/etc/tscreenrc:g" \
+ -e "s:/usr/local/screens:/var/run/tscreen:g" \
+ -e "s:/local/etc/tscreenrc:/etc/tscreenrc:g" \
+ -e "s:/etc/utmp:/var/run/utmp:g" \
+ -e "s:/local/screens/S-:/var/run/tscreen/S-:g" \
+ doc/tscreen.1 \
+ || die "sed doc/screen.1 failed"
+
+ eautoconf
+}
+
+src_compile() {
+# append-flags "-DMAXWIN=${MAX_SCREEN_WINDOWS:-100}"
+#
+# use nethack || append-flags "-DNONETHACK"
+# use debug && append-flags "-DDEBUG"
+
+ econf \
+ --with-socket-dir=/var/run/tscreen \
+ --with-sys-screenrc=/etc/tscreenrc \
+ --with-pty-mode=0620 \
+ --with-pty-group=5 \
+ --enable-rxvt_osc \
+ --enable-telnet \
+ --enable-colors256 \
+ $(use_enable nls locale) \
+ $(use_enable pam) \
+ || die "econf failed"
+
+# LC_ALL=POSIX make term.h || die "Failed making term.h"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ dobin tscreen || die "dobin failed"
+ keepdir /var/run/tscreen || die "keepdir failed"
+
+ if use multiuser
+ then
+ fperms 4755 /usr/bin/tscreen || die "fperms failed"
+ else
+ fowners root:utmp /{usr/bin,var/run}/tscreen || die "fowners failed"
+ fperms 2755 /usr/bin/tscreen || die "fperms failed"
+ fi
+
+ insinto /usr/share/tscreen
+# doins terminfo/{screencap,screeninfo.src} || die "doins failed"
+ insinto /usr/share/tscreen/utf8encodings
+ doins utf8encodings/?? || die "doins failed"
+ insinto /etc
+ doins etc/tscreenrc || die "doins failed"
+
+ pamd_mimic_system tscreen auth || die "pamd_mimic_system failed"
+
+ dodoc \
+ README patchlevel.h \
+ doc/{FAQ,fdpat.ps,window_to_display.ps} \
+ || die "dodoc failed"
+
+ doman doc/tscreen.1 || die "doman failed"
+ doinfo doc/tscreen.info || die "doinfo failed"
+}
+
+pkg_postinst() {
+ if use multiuser
+ then
+ chown root:0 "${ROOT}"/var/run/tscreen
+ chmod 0755 "${ROOT}"/var/run/tscreen
+ else
+ chown root:utmp "${ROOT}"/var/run/tscreen
+ chmod 0775 "${ROOT}"/var/run/tscreen
+ fi
+
+ elog "Some dangerous key bindings have been removed or changed to more safe values."
+ elog "We enable some xterm hacks in our default tscreenrc, which might break some"
+ elog "applications. Please check /etc/tscreenrc for information on these changes."
+
+ ewarn "Please terminate your running screen sessions, as screen now uses sockets"
+ ewarn "instead of fifos and the new version can't attach to the old sessions."
+}