1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit eutils flag-o-matic toolchain-funcs pam autotools git
9 EGIT_REPO_URI
="git://git.savannah.gnu.org/screen.git"
10 DESCRIPTION
="A full-screen window manager that multiplexes a physical terminal between several processes"
11 HOMEPAGE
="http://www.gnu.org/software/screen/"
16 IUSE
="debug doc nethack pam selinux multiuser"
18 RDEPEND
=">=sys-libs/ncurses-5.2
21 sec-policy/selinux-screen
22 >=sec-policy/selinux-base-policy-20050821
25 doc? ( sys-apps/texinfo )"
30 # Make sure utmp group exists, as it's used later on.
38 # Bug 31070: configure problem which affects alpha
39 # (13 Jan 2004 agriffis)
40 epatch
"${FILESDIR}"/screen-4.0
.1-vsprintf.
patch
42 # uclibc doesnt have sys/stropts.h
43 if ! (echo '#include <sys/stropts.h>' | $
(tc-getCC
) -E - &>/dev
/null
) ; then
44 epatch
"${FILESDIR}"/4.0.2-no-pty.
patch
47 # Don't use utempter even if it is found on the system
48 epatch
"${FILESDIR}"/4.0.2-no-utempter.
patch
50 # Don't link against libelf even if it is found on the system
51 #epatch "${FILESDIR}"/9999-no-libelf.patch
55 -e "s:/usr/local/etc/screenrc:/etc/screenrc:g" \
56 -e "s:/usr/local/screens:/var/run/screen:g" \
57 -e "s:/local/etc/screenrc:/etc/screenrc:g" \
58 -e "s:/etc/utmp:/var/run/utmp:g" \
59 -e "s:/local/screens/S-:/var/run/screen/S-:g" \
61 || die
"sed doc/screen.1 failed"
69 append-flags
"-DMAXWIN=${MAX_SCREEN_WINDOWS:-100}"
70 use nethack || append-flags
"-DNONETHACK"
71 use debug
&& append-flags
"-DDEBUG"
74 --with-socket-dir=/var
/run
/screen \
75 --with-sys-screenrc=/etc
/screenrc \
76 --with-pty-mode=0620 \
84 # Second try to fix bug 12683, this time without changing term.h
85 # The last try seemed to break screen at run-time.
86 # (16 Jan 2003 agriffis)
87 LC_ALL
=POSIX
make term.h || die
"Failed making term.h"
89 emake || die
"emake failed"
94 make info || die
"make info failed"
100 dobin screen || die
"dobin failed"
101 keepdir
/var
/run
/screen || die
"keepdir failed"
105 fperms
4755 /usr
/bin
/screen || die
"fperms failed"
107 fowners root
:utmp
/{usr
/bin
,var
/run
}/screen || die
"fowners failed"
108 fperms
2755 /usr
/bin
/screen || die
"fperms failed"
111 insinto
/usr
/share
/screen
112 doins terminfo
/{screencap
,screeninfo.src
} || die
"doins failed"
113 insinto
/usr
/share
/screen
/utf8encodings
114 doins utf8encodings
/?? || die
"doins failed"
116 doins
"${FILESDIR}"/screenrc || die
"doins failed"
118 pamd_mimic_system screen auth || die
"pamd_mimic_system failed"
121 README ChangeLog INSTALL TODO NEWS
* patchlevel.h \
122 doc
/{FAQ
,README.DOTSCREEN
,fdpat.ps
,window_to_display.ps
} \
123 || die
"dodoc failed"
125 doman
doc
/screen
.1 || die
"doman failed"
129 doinfo
doc
/screen.info || die
"doinfo failed"
136 chown root
:0 "${ROOT}"/var
/run
/screen
137 chmod 0755 "${ROOT}"/var
/run
/screen
139 chown root
:utmp
"${ROOT}"/var
/run
/screen
140 chmod 0775 "${ROOT}"/var
/run
/screen
143 elog
"Some dangerous key bindings have been removed or changed to more safe values."
144 elog
"We enable some xterm hacks in our default screenrc, which might break some"
145 elog
"applications. Please check /etc/screenrc for information on these changes."