]> Pileus Git - ~andy/sunrise/blob - x11-wm/qlwm/qlwm-3.1.ebuild
app-misc/bsc: Remove qt3 version
[~andy/sunrise] / x11-wm / qlwm / qlwm-3.1.ebuild
1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="2"
6
7 inherit eutils toolchain-funcs
8
9 DESCRIPTION="A Qt based window manager"
10 HOMEPAGE="http://www.mynetcologne.de/~nc-lindenal/qlwm/
11         http://www.alinden.mynetcologne.de/qlwm/"
12 SRC_URI="http://www.alinden.mynetcologne.de/${PN}/${P}.tar.gz"
13 LICENSE="GPL-2"
14
15 SLOT="3"
16 KEYWORDS="~x86"
17 IUSE=""
18
19 DEPEND="x11-libs/qt:3
20         x11-libs/libX11
21         x11-libs/libXext"
22 RDEPEND="${DEPEND}"
23
24 src_prepare() {
25         # fix path to shared files
26         sed -i -e 's!^DEST .*$!DEST = /usr/share/'"${PN}-${SLOT}"'!' "Makefile" \
27            || die "Cannot fix DEST variable for shared files"
28         # in the source code, fix path to config files and images
29         sed -i -e 's!\bCONFDIR ".*$!CONFDIR "/usr/share/'"${PN}-${SLOT}"'/files/"!' \
30            "src/conf.h" || die "Cannot change CONFDIR in src/conf.h"
31         # fixing path/filename to qtconfig
32         sed -i -e 's!qtconfig!/usr/qt/3/bin/qtconfig!' "files/menuconfig" \
33            || die "Cannot fix menu entry for qtconfig"
34
35         epatch "${FILESDIR}/${PN}-3-Makefiles.patch"
36 }
37
38 src_compile() {
39         emake CXX=$(tc-getCXX) || die "emake failed"
40 }
41
42 src_install() {
43         # install binaries with slotted filenames
44         newbin src/qlwm qlwm-${SLOT} || die "Cannot install binary qlwm"
45         newbin dclock/dclock dclock-${SLOT} || die "Cannot install binary dclock"
46         newbin mail/biff biff-${SLOT} || die "Cannot install binary dclock"
47
48         # install man page with slotted filename
49         newman qlwm.1 qlwm-${SLOT}.1 || die "Cannot install manual file"
50
51         # renaming defaults file
52         mv files/defaults.in files/defaults || die "Cannot rename default config"
53         # disable font name entries in default config file
54         sed -i -e 's!^\(\S*FontName\S*\)\b!# \1!g;
55                    s!^\(Style \)!# \1!g' \
56            files/defaults || die "Cannot fix font names in default configuration"
57         # rename entries for dclock and biff to match $SLOT
58         sed -i -e 's!\S*\(dclock\|biff\)\b!/usr/bin/\1-'${SLOT}'!g' \
59            files/defaults || die "Cannot fix font names in default configuration"
60
61         # install config files and images
62         insinto /usr/share/${PN}-${SLOT}
63         doins -r files/ || die "Cannot install shared files"
64
65         # install documentation
66         dodoc README CHANGES || die "Cannot install documentation"
67 }