summaryrefslogtreecommitdiff
blob: e17ad34afe3bd5d83af5f7569f0418b8a5a93c66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-wm/flwm/flwm-1.02.ebuild,v 1.3 2011/03/22 10:01:31 jlec Exp $

EAPI=1

inherit savedconfig eutils flag-o-matic multilib toolchain-funcs

DESCRIPTION="A lightweight window manager based on fltk"
HOMEPAGE="http://flwm.sourceforge.net/"
SRC_URI="http://flwm.sourceforge.net/${P}.tgz"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="opengl"

DEPEND="
	>=x11-libs/fltk-1.1.10-r2:1
	opengl? ( virtual/opengl )"
RDEPEND="${DEPEND}"

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}/${P}-strip.patch"

	restore_config config.h
	tc-export CXX
}

src_compile() {
	use opengl && export X_EXTRA_LIBS=-lGL
	append-flags -I$(fltk-config --includedir)
	append-ldflags -L$(dirname $(fltk-config --libs))

	econf || die "econf failed"
	emake || die "emake failed"
}

src_install() {
	doman flwm.1 || die
	dodoc README flwm_wmconfig || die
	dobin flwm || die

	save_config config.h
}