Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 333821
Collapse All | Expand All

(-)screen-4.0.3-r4.ebuild (-29 / +34 lines)
Lines 2-10 Link Here
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/app-misc/screen/screen-4.0.3-r4.ebuild,v 1.8 2011/07/15 14:31:00 xarthisius Exp $
3
# $Header: /var/cvsroot/gentoo-x86/app-misc/screen/screen-4.0.3-r4.ebuild,v 1.8 2011/07/15 14:31:00 xarthisius Exp $
4
4
5
EAPI="3"
5
EAPI=4
6
6
7
WANT_AUTOCONF="2.5"
7
WANT_AUTOCONF=2.5
8
8
9
inherit eutils flag-o-matic toolchain-funcs pam autotools
9
inherit eutils flag-o-matic toolchain-funcs pam autotools
10
10
Lines 14-23 Link Here
14
14
15
LICENSE="GPL-2"
15
LICENSE="GPL-2"
16
SLOT="0"
16
SLOT="0"
17
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd ~hppa-hpux ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
17
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~hppa-hpux ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
18
IUSE="debug nethack pam selinux multiuser"
18
IUSE="debug nethack pam selinux multiuser"
19
19
20
RDEPEND=">=sys-libs/ncurses-5.2
20
RDEPEND=">=sys-libs/ncurses-5.7-r7
21
	pam? ( virtual/pam )
21
	pam? ( virtual/pam )
22
	selinux? ( sec-policy/selinux-screen )"
22
	selinux? ( sec-policy/selinux-screen )"
23
DEPEND="${RDEPEND}"
23
DEPEND="${RDEPEND}"
Lines 60-66 Link Here
60
	epatch "${FILESDIR}"/screen-4.0.3-config.h-autoconf-2.62.patch
60
	epatch "${FILESDIR}"/screen-4.0.3-config.h-autoconf-2.62.patch
61
61
62
	# crosscompile patch
62
	# crosscompile patch
63
	epatch "${FILESDIR}"/"${P}"-crosscompile.patch
63
	epatch "${FILESDIR}"/${P}-crosscompile.patch
64
64
65
	# sched.h is a system header and causes problems with some C libraries
65
	# sched.h is a system header and causes problems with some C libraries
66
	mv sched.h _sched.h || die
66
	mv sched.h _sched.h || die
Lines 75-84 Link Here
75
	# Fix manpage.
75
	# Fix manpage.
76
	sed -i \
76
	sed -i \
77
		-e "s:/usr/local/etc/screenrc:${EPREFIX}/etc/screenrc:g" \
77
		-e "s:/usr/local/etc/screenrc:${EPREFIX}/etc/screenrc:g" \
78
		-e "s:/usr/local/screens:${EPREFIX}/var/run/screen:g" \
78
		-e "s:/usr/local/screens:${EPREFIX}/var/lib/screen:g" \
79
		-e "s:/local/etc/screenrc:${EPREFIX}/etc/screenrc:g" \
79
		-e "s:/local/etc/screenrc:${EPREFIX}/etc/screenrc:g" \
80
		-e "s:/etc/utmp:${EPREFIX}/var/run/utmp:g" \
80
		-e "s:/etc/utmp:${EPREFIX}/var/run/utmp:g" \
81
		-e "s:/local/screens/S-:${EPREFIX}/var/run/screen/S-:g" \
81
		-e "s:/local/screens/S-:${EPREFIX}/var/lib/screen/S-:g" \
82
		doc/screen.1 \
82
		doc/screen.1 \
83
		|| die "sed doc/screen.1 failed"
83
		|| die "sed doc/screen.1 failed"
84
84
Lines 102-116 Link Here
102
	use debug && append-flags "-DDEBUG"
102
	use debug && append-flags "-DDEBUG"
103
103
104
	econf \
104
	econf \
105
		--with-socket-dir="${EPREFIX}/var/run/screen" \
105
		--with-socket-dir="${EPREFIX}/var/lib/screen" \
106
		--with-sys-screenrc="${EPREFIX}/etc/screenrc" \
106
		--with-sys-screenrc="${EPREFIX}/etc/screenrc" \
107
		--with-pty-mode=0620 \
107
		--with-pty-mode=0620 \
108
		--with-pty-group=5 \
108
		--with-pty-group=5 \
109
		--enable-rxvt_osc \
109
		--enable-rxvt_osc \
110
		--enable-telnet \
110
		--enable-telnet \
111
		--enable-colors256 \
111
		--enable-colors256 \
112
		$(use_enable pam) \
112
		$(use_enable pam)
113
		|| die "econf failed"
114
113
115
	# Second try to fix bug 12683, this time without changing term.h
114
	# Second try to fix bug 12683, this time without changing term.h
116
	# The last try seemed to break screen at run-time.
115
	# The last try seemed to break screen at run-time.
Lines 119-166 Link Here
119
}
118
}
120
119
121
src_install() {
120
src_install() {
122
	dobin screen || die "dobin failed"
121
	dobin screen
123
	keepdir /var/run/screen || die "keepdir failed"
122
	keepdir /var/lib/screen
124
123
125
	if use multiuser || use prefix
124
	if use multiuser || use prefix
126
	then
125
	then
127
		fperms 4755 /usr/bin/screen || die "fperms failed"
126
		fperms 4755 /usr/bin/screen
128
	else
127
	else
129
		fowners root:utmp /{usr/bin,var/run}/screen \
128
		fowners root:utmp /{usr/bin,var/lib}/screen
130
			|| die "fowners failed, use multiuser USE-flag instead"
129
		fperms 2755 /usr/bin/screen
131
		fperms 2755 /usr/bin/screen || die "fperms failed"
132
	fi
130
	fi
133
131
134
	insinto /usr/share/screen
132
	insinto /usr/share/screen
135
	doins terminfo/{screencap,screeninfo.src} || die "doins failed"
133
	doins terminfo/{screencap,screeninfo.src}
136
	insinto /usr/share/screen/utf8encodings
134
	insinto /usr/share/screen/utf8encodings
137
	doins utf8encodings/?? || die "doins failed"
135
	doins utf8encodings/??
138
	insinto /etc
136
	insinto /etc
139
	doins "${FILESDIR}"/screenrc || die "doins failed"
137
	doins "${FILESDIR}"/screenrc
140
138
141
	pamd_mimic_system screen auth || die "pamd_mimic_system failed"
139
	pamd_mimic_system screen auth
142
140
143
	dodoc \
141
	dodoc \
144
		README ChangeLog INSTALL TODO NEWS* patchlevel.h \
142
		README ChangeLog INSTALL TODO NEWS* patchlevel.h \
145
		doc/{FAQ,README.DOTSCREEN,fdpat.ps,window_to_display.ps} \
143
		doc/{FAQ,README.DOTSCREEN,fdpat.ps,window_to_display.ps}
146
		|| die "dodoc failed"
147
144
148
	doman doc/screen.1 || die "doman failed"
145
	doman doc/screen.1
149
	doinfo doc/screen.info* || die "doinfo failed"
146
	doinfo doc/screen.info*
150
}
147
}
151
148
152
pkg_postinst() {
149
pkg_postinst() {
153
	if use prefix; then
150
	if use prefix; then
154
		chmod 0777 "${EROOT}"/var/run/screen
151
		chmod 0777 "${EROOT}"/var/lib/screen
155
	elif use multiuser; then
152
	elif use multiuser; then
156
		chown root:0 "${EROOT}"/var/run/screen
153
		chown root:0 "${EROOT}"/var/lib/screen
157
		chmod 0755 "${EROOT}"/var/run/screen
154
		chmod 0755 "${EROOT}"/var/lib/screen
158
	else
155
	else
159
		chown root:utmp "${EROOT}"/var/run/screen
156
		chown root:utmp "${EROOT}"/var/lib/screen
160
		chmod 0775 "${EROOT}"/var/run/screen
157
		chmod 0775 "${EROOT}"/var/lib/screen
161
	fi
158
	fi
162
159
163
	elog "Some dangerous key bindings have been removed or changed to more safe values."
160
	elog "Some dangerous key bindings have been removed or changed to more safe values."
164
	elog "We enable some xterm hacks in our default screenrc, which might break some"
161
	elog "We enable some xterm hacks in our default screenrc, which might break some"
165
	elog "applications. Please check /etc/screenrc for information on these changes."
162
	elog "applications. Please check /etc/screenrc for information on these changes."
163
164
	if [[ -d ${EROOT}/var/run/screen ]] && [[ -d ${EROOT}/var/lib/screen ]]; then
165
		ebegin "Moving existing socket directories from /var/run/screen to /var/lib/screen"
166
		mv -f "${EROOT}"/var/run/screen/* "${EROOT}"/var/lib/screen &>/dev/null
167
		rm -rf "${EROOT}"/var/run/screen &>/dev/null
168
		ln -s "${EROOT}"/var/lib/screen "${EROOT}"/var/run/screen &>/dev/null
169
		eend $?
170
	fi
166
}
171
}

Return to bug 333821