]> Pileus Git - ~andy/sunrise/blob - x11-misc/fmenu/fmenu-0.1.ebuild
add missing die
[~andy/sunrise] / x11-misc / fmenu / fmenu-0.1.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="2"
6
7 inherit toolchain-funcs savedconfig
8
9 DESCRIPTION="a generic, highly customizable, and efficient menu for the X Window System with enhanced features"
10 HOMEPAGE="http://scytale.name/proj/fmenu/"
11 SRC_URI="http://github.com/scy/${PN}/tarball/v${PV} -> ${P}.tar.gz"
12
13 LICENSE="MIT"
14 SLOT="0"
15 KEYWORDS="~x86 ~amd64"
16 IUSE="xinerama"
17
18 DEPEND="x11-libs/libX11
19         xinerama? ( x11-libs/libXinerama )"
20 RDEPEND="${DEPEND}"
21
22 S="${WORKDIR}/scy-${PN}-431d932"
23
24 src_prepare() {
25         sed -i \
26                 -e "s/CFLAGS = -std=c99 -pedantic -Wall -Os/CFLAGS += -std=c99 -pedantic -Wall -g/" \
27                 -e "s/LDFLAGS = -s/LDFLAGS += -g/" \
28                 -e "s/XINERAMALIBS =/XINERAMALIBS ?=/" \
29                 -e "s/XINERAMAFLAGS =/XINERAMAFLAGS ?=/" \
30                 config.mk || die "sed failed"
31
32         if use savedconfig; then
33                 restore_config config.h
34         fi
35 }
36
37 src_compile() {
38         local msg
39         use savedconfig && msg=", please check the configfile"
40         if use xinerama; then
41                 emake CC=$(tc-getCC) || die "emake failed${msg}"
42         else
43                 emake CC=$(tc-getCC) XINERAMAFLAGS="" XINERAMALIBS="" \
44                         || die "emake failed${msg}"
45         fi
46 }
47
48 src_install() {
49         emake DESTDIR="${D}" PREFIX="/usr" install || die "emake install failed"
50
51         insinto /usr/share/${PN}
52         newins config.h ${P}.config.h || die "newins failed"
53
54         dodoc README || die "dodoc failed"
55
56         save_config config.h
57 }