summaryrefslogtreecommitdiff
blob: c54fa06f6db04a7b0dcd232fae094ae8fc548513 (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
# Copyright 1999-2007 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.1 2007/12/15 21:15:38 coldwind Exp $

EAPI=1

inherit savedconfig eutils flag-o-matic multilib

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.7-r3:1.1
	opengl? ( virtual/opengl )"
RDEPEND="${DEPEND}"

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

	restore_config config.h
}

src_compile() {
	use opengl && export X_EXTRA_LIBS=-lGL
	append-flags -I/usr/include/fltk-1.1
	append-ldflags -L/usr/$(get_libdir)/fltk-1.1

	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
}