x11-misc/xosview: amd64 stable wrt bug #578564
[gentoo.git] / x11-misc / xosview / xosview-1.17.ebuild
1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 inherit eutils toolchain-funcs
8
9 DESCRIPTION="X11 operating system viewer"
10 HOMEPAGE="http://www.pogo.org.uk/~mark/xosview/"
11 SRC_URI="http://www.pogo.org.uk/~mark/${PN}/releases/${P}.tar.gz"
12
13 LICENSE="GPL-2 BSD"
14 SLOT="0"
15 KEYWORDS="amd64 ~ppc ~ppc64 ~x86"
16 IUSE="suid"
17
18 COMMON_DEPS="x11-libs/libX11
19         x11-libs/libXpm
20         x11-libs/libXt"
21 RDEPEND="${COMMON_DEPS}
22         media-fonts/font-misc-misc"
23 DEPEND="${COMMON_DEPS}
24         x11-proto/xproto"
25
26 src_prepare() {
27         sed -i -e 's:lib/X11/app:share/X11/app:g' -i ${PN}.1 || die
28         sed -i -e "s:Git:${PV}:g" ${PN}.cc || die
29         tc-export CXX
30 }
31
32 src_compile() {
33         emake OPTFLAGS=''
34 }
35
36 src_install() {
37         dobin ${PN}
38         use suid && fperms 4755 /usr/bin/${PN}
39         insinto /usr/share/X11/app-defaults
40         newins Xdefaults XOsview
41         doman *.1
42         dodoc CHANGES README.linux TODO
43 }
44
45 pkg_postinst() {
46         if ! use suid ; then
47                 ewarn "If you want to use serial meters ${PN} needs to be executed as root."
48                 ewarn "Please see ${EPREFIX}/usr/share/doc/${PF}/README.linux for details."
49         fi
50 }