1 |
# Copyright 1999-2015 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/x11-wm/fluxbox/fluxbox-1.3.6-r1.ebuild,v 1.11 2015/07/03 10:11:10 ago Exp $ |
4 |
|
5 |
EAPI=5 |
6 |
inherit eutils flag-o-matic toolchain-funcs prefix |
7 |
|
8 |
IUSE="nls xinerama bidi +truetype +imlib +slit +toolbar vim-syntax" |
9 |
|
10 |
DESCRIPTION="Fluxbox is an X11 window manager featuring tabs and an iconbar" |
11 |
|
12 |
SRC_URI="mirror://sourceforge/fluxbox/${P}.tar.xz" |
13 |
HOMEPAGE="http://www.fluxbox.org" |
14 |
SLOT="0" |
15 |
LICENSE="MIT" |
16 |
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux" |
17 |
|
18 |
RDEPEND=" |
19 |
!!<=x11-misc/fbdesk-1.2.1 |
20 |
!!<=x11-misc/fluxconf-0.9.9 |
21 |
!!<x11-themes/fluxbox-styles-fluxmod-20040809-r1 |
22 |
bidi? ( >=dev-libs/fribidi-0.19.2 ) |
23 |
imlib? ( >=media-libs/imlib2-1.2.0[X] ) |
24 |
truetype? ( media-libs/freetype ) |
25 |
vim-syntax? ( app-vim/fluxbox-syntax ) |
26 |
x11-libs/libXext |
27 |
x11-libs/libXft |
28 |
x11-libs/libXpm |
29 |
x11-libs/libXrandr |
30 |
x11-libs/libXrender |
31 |
xinerama? ( x11-libs/libXinerama ) |
32 |
|| ( x11-misc/gxmessage x11-apps/xmessage ) |
33 |
" |
34 |
DEPEND=" |
35 |
${RDEPEND} |
36 |
bidi? ( virtual/pkgconfig ) |
37 |
nls? ( sys-devel/gettext ) |
38 |
x11-proto/xextproto |
39 |
" |
40 |
|
41 |
src_prepare() { |
42 |
# We need to be able to include directories rather than just plain |
43 |
# files in menu [include] items. This patch will allow us to do clever |
44 |
# things with style ebuilds. |
45 |
epatch "${FILESDIR}"/gentoo_style_location-1.1.x.patch |
46 |
# Fix the semantic issue of icon paths, bug #536370 |
47 |
epatch "${FILESDIR}"/1.3.5-generate_menu-printf-fix.patch |
48 |
|
49 |
eprefixify util/fluxbox-generate_menu.in |
50 |
|
51 |
epatch "${FILESDIR}"/osx-has-otool.patch |
52 |
|
53 |
# Add in the Gentoo -r number to fluxbox -version output. |
54 |
if [[ "${PR}" == "r0" ]] ; then |
55 |
suffix="gentoo" |
56 |
else |
57 |
suffix="gentoo-${PR}" |
58 |
fi |
59 |
sed -i \ |
60 |
-e "s~\(__fluxbox_version .@VERSION@\)~\1-${suffix}~" \ |
61 |
version.h.in || die "version sed failed" |
62 |
} |
63 |
|
64 |
src_configure() { |
65 |
use bidi && append-cppflags "$($(tc-getPKG_CONFIG) --cflags fribidi)" |
66 |
|
67 |
econf ${myconf} \ |
68 |
$(use_enable bidi fribidi ) \ |
69 |
$(use_enable imlib imlib2) \ |
70 |
$(use_enable nls) \ |
71 |
$(use_enable slit ) \ |
72 |
$(use_enable toolbar ) \ |
73 |
$(use_enable toolbar systray ) \ |
74 |
$(use_enable truetype xft) \ |
75 |
$(use_enable xinerama) \ |
76 |
--sysconfdir="${EPREFIX}"/etc/X11/${PN} \ |
77 |
--with-style="${EPREFIX}"/usr/share/fluxbox/styles/Emerge |
78 |
} |
79 |
|
80 |
src_compile() { |
81 |
default |
82 |
|
83 |
ebegin "Creating a menu file (may take a while)" |
84 |
mkdir -p "${T}/home/.fluxbox" || die "mkdir home failed" |
85 |
# Call fluxbox-generate_menu through bash since it lacks +x |
86 |
# chmod 744 may be an equal fix |
87 |
MENUFILENAME="${S}/data/menu" MENUTITLE="Fluxbox ${PV}" \ |
88 |
CHECKINIT="no. go away." HOME="${T}/home" \ |
89 |
bash "${S}/util/fluxbox-generate_menu" -is -ds \ |
90 |
|| die "menu generation failed" |
91 |
eend $? |
92 |
} |
93 |
|
94 |
src_install() { |
95 |
emake DESTDIR="${D}" STRIP="" install |
96 |
dodoc README* AUTHORS TODO* ChangeLog NEWS |
97 |
|
98 |
# Install the generated menu |
99 |
insinto /usr/share/fluxbox |
100 |
doins data/menu |
101 |
|
102 |
insinto /usr/share/xsessions |
103 |
doins "${FILESDIR}"/${PN}.desktop |
104 |
|
105 |
exeinto /etc/X11/Sessions |
106 |
newexe "${FILESDIR}"/${PN}.xsession fluxbox |
107 |
|
108 |
# Styles menu framework |
109 |
insinto /usr/share/fluxbox/menu.d/styles |
110 |
doins "${FILESDIR}"/styles-menu-fluxbox |
111 |
doins "${FILESDIR}"/styles-menu-commonbox |
112 |
doins "${FILESDIR}"/styles-menu-user |
113 |
} |