-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=5
+EAPI=6
EGIT_REPO_URI="git://git.savannah.gnu.org/screen.git"
EGIT_CHECKOUT_DIR="${WORKDIR}/${P}" # needed for setting S later on
LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
-IUSE="debug nethack pam selinux multiuser"
+IUSE="debug nethack pam selinux multiuser utmp"
CDEPEND="
>=sys-libs/ncurses-5.2:0=
pam? ( virtual/pam )"
RDEPEND="${CDEPEND}
- selinux? ( sec-policy/selinux-screen )"
+ selinux? ( sec-policy/selinux-screen )
+ utmp? (
+ kernel_linux? ( sys-libs/libutempter )
+ kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-lib-9.0 sys-libs/libutempter ) )
+ )
+"
DEPEND="${CDEPEND}
sys-apps/texinfo"
+RESTRICT="test"
S="${WORKDIR}"/${P}/src
+PATCHES=(
+ "${FILESDIR}"/${PN}-9999-alloca.patch
+)
+
pkg_setup() {
# Make sure utmp group exists, as it's used later on.
enewgroup utmp 406
}
src_prepare() {
- # Don't use utempter even if it is found on the system
- epatch "${FILESDIR}"/${PN}-4.3.0-no-utempter.patch
+ default
# sched.h is a system header and causes problems with some C libraries
mv sched.h _sched.h || die
- sed -i '/include/ s:sched.h:_sched.h:' screen.h || die
+ sed -i \
+ -e '/include/ s:sched.h:_sched.h:' \
+ screen.h winmsg.c canvas.h sched.c || die
+ sed -i -e 's:sched.h:_sched.h:g' Makefile.in || die
# Fix manpage.
sed -i \
use debug && append-cppflags "-DDEBUG"
econf \
- --with-socket-dir="${EPREFIX}/tmp/screen" \
- --with-sys-screenrc="${EPREFIX}/etc/screenrc" \
+ --enable-socket-dir="${EPREFIX}/tmp/screen" \
+ --with-system_screenrc="${EPREFIX}/etc/screenrc" \
--with-pty-mode=0620 \
--with-pty-group=5 \
--enable-telnet \
- $(use_enable pam)
+ $(use_enable pam) \
+ $(use_enable utmp)
}
src_compile() {