Line 0
Link Here
|
|
|
1 |
# Copyright 1999-2011 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/x11-wm/fvwm/fvwm-2.6.3.ebuild,v 1.3 2011/12/07 07:50:39 phajdan.jr Exp $ |
4 |
|
5 |
EAPI=2 |
6 |
|
7 |
inherit eutils flag-o-matic |
8 |
|
9 |
DESCRIPTION="An extremely powerful ICCCM-compliant multiple virtual desktop window manager" |
10 |
HOMEPAGE="http://www.fvwm.org/" |
11 |
SRC_URI="ftp://ftp.fvwm.org/pub/fvwm/version-2/${P}.tar.bz2" |
12 |
|
13 |
LICENSE="GPL-2 FVWM" |
14 |
SLOT="0" |
15 |
KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86 ~x86-fbsd" |
16 |
IUSE="bidi debug doc gtk2-perl netpbm nls perl png readline rplay stroke svg tk truetype +vanilla xinerama lock" |
17 |
|
18 |
COMMON_DEPEND=" |
19 |
sys-libs/zlib |
20 |
x11-libs/libICE |
21 |
x11-libs/libSM |
22 |
x11-libs/libX11 |
23 |
x11-libs/libXau |
24 |
x11-libs/libxcb |
25 |
x11-libs/libXcursor |
26 |
x11-libs/libXdmcp |
27 |
x11-libs/libXext |
28 |
x11-libs/libXfixes |
29 |
x11-libs/libXpm |
30 |
x11-libs/libXrandr |
31 |
x11-libs/libXrender |
32 |
bidi? ( dev-libs/fribidi ) |
33 |
png? ( media-libs/libpng ) |
34 |
readline? ( |
35 |
sys-libs/ncurses |
36 |
sys-libs/readline |
37 |
) |
38 |
stroke? ( dev-libs/libstroke ) |
39 |
svg? ( gnome-base/librsvg ) |
40 |
truetype? ( |
41 |
media-libs/fontconfig |
42 |
x11-libs/libXft |
43 |
) |
44 |
xinerama? ( |
45 |
x11-proto/xineramaproto |
46 |
x11-libs/libXinerama |
47 |
)" |
48 |
|
49 |
RDEPEND="${COMMON_DEPEND} |
50 |
dev-lang/perl |
51 |
gtk2-perl? ( dev-perl/gtk2-perl ) |
52 |
perl? ( tk? ( |
53 |
dev-lang/tk |
54 |
dev-perl/perl-tk |
55 |
>=dev-perl/X11-Protocol-0.56 |
56 |
) |
57 |
) |
58 |
rplay? ( media-sound/rplay ) |
59 |
lock? ( x11-misc/xlockmore ) |
60 |
userland_GNU? ( sys-apps/debianutils ) |
61 |
!x86-fbsd? ( netpbm? ( media-libs/netpbm ) )" |
62 |
|
63 |
DEPEND="${COMMON_DEPEND} |
64 |
dev-util/pkgconfig |
65 |
doc? ( dev-libs/libxslt ) |
66 |
x11-proto/xextproto |
67 |
x11-proto/xproto" |
68 |
|
69 |
src_prepare() { |
70 |
if ! use vanilla; then |
71 |
# Enables fast translucent menus; patch from fvwm-user mailing list. |
72 |
epatch "${FILESDIR}/${PN}-2.5.27-translucent-menus.diff" |
73 |
fi |
74 |
} |
75 |
|
76 |
src_configure() { |
77 |
local myconf="--libexecdir=/usr/lib --with-imagepath=/usr/include/X11/bitmaps:/usr/include/X11/pixmaps:/usr/share/icons/fvwm --enable-package-subdirs --without-gnome" |
78 |
|
79 |
# Non-upstream email where bugs should be sent; used in fvwm-bug. |
80 |
export FVWM_BUGADDR="desktop-wm@gentoo.org" |
81 |
|
82 |
# Recommended by upstream. |
83 |
append-flags -fno-strict-aliasing |
84 |
|
85 |
# Signed chars are required. |
86 |
use ppc && append-flags -fsigned-char |
87 |
|
88 |
myconf="${myconf} --disable-gtk" |
89 |
|
90 |
use readline && myconf="${myconf} --without-termcap-library" |
91 |
|
92 |
econf ${myconf} \ |
93 |
$(use_enable bidi) \ |
94 |
$(use_enable debug debug-msgs) \ |
95 |
$(use_enable debug command-log) \ |
96 |
$(use_enable doc htmldoc) \ |
97 |
$(use_enable nls) \ |
98 |
$(use_enable nls iconv) \ |
99 |
$(use_enable perl perllib) \ |
100 |
$(use_with png png-library) \ |
101 |
$(use_with readline readline-library) \ |
102 |
$(use_with rplay rplay-library) \ |
103 |
$(use_with stroke stroke-library) \ |
104 |
$(use_enable svg rsvg) \ |
105 |
$(use_enable truetype xft) \ |
106 |
$(use_enable xinerama) \ |
107 |
--docdir="/usr/share/doc/${P}" |
108 |
} |
109 |
|
110 |
src_install() { |
111 |
emake DESTDIR="${D}" docdir="/usr/share/doc/${P}" install || die |
112 |
|
113 |
# These are always removed, because gentoo doesn't have anymore |
114 |
# a dev-perl/gtk-perl package, so, these modules are pointless. |
115 |
rm -f "${D}/usr/share/fvwm/perllib/FVWM/Module/Gtk.pm" |
116 |
find "${D}" -name '*FvwmGtkDebug*' -exec rm -f '{}' \; 2>/dev/null |
117 |
|
118 |
if ! use lock; then |
119 |
find "${D}" -name '*fvwm-menu-xlock' -exec rm -f '{}' \; 2>/dev/null |
120 |
fi |
121 |
|
122 |
if use perl; then |
123 |
if ! use tk; then |
124 |
rm -f "${D}/usr/share/fvwm/perllib/FVWM/Module/Tk.pm" |
125 |
if ! use gtk2-perl; then # no tk and no gtk2 bindings |
126 |
rm -f "${D}/usr/share/fvwm/perllib/FVWM/Module/Toolkit.pm" |
127 |
find "${D}/usr/share/fvwm/perllib" -depth -type d -exec rmdir '{}' \; 2>/dev/null |
128 |
fi |
129 |
fi |
130 |
|
131 |
# Now, the Gtk2.pm file, it will require dev-perl/gtk2-perl |
132 |
# so it implies gtk2 as well. That's why we need another use flag. |
133 |
if ! use gtk2-perl; then |
134 |
rm -f "${D}/usr/share/fvwm/perllib/FVWM/Module/Gtk2.pm" |
135 |
fi |
136 |
else |
137 |
# Completely wipe it if ! use perl |
138 |
rm -rf "${D}/usr/bin/fvwm-perllib" \ |
139 |
"${D}/usr/share/man/man1/fvwm-perllib.1" |
140 |
fi |
141 |
|
142 |
# Utility for testing FVWM behaviour by creating a simple window with |
143 |
# configurable hints. |
144 |
if use debug; then |
145 |
dobin "${S}/tests/hints/hints_test" |
146 |
newdoc "${S}/tests/hints/README" README.hints |
147 |
fi |
148 |
|
149 |
dodir /etc/X11/Sessions |
150 |
echo "/usr/bin/fvwm" > "${D}/etc/X11/Sessions/${PN}" || die |
151 |
fperms a+x /etc/X11/Sessions/${PN} || die |
152 |
|
153 |
dodoc AUTHORS ChangeLog NEWS README \ |
154 |
docs/{ANNOUNCE,BUGS,COMMANDS,CONVENTIONS} \ |
155 |
docs/{DEVELOPERS,error_codes,FAQ,TODO,fvwm.lsm} |
156 |
|
157 |
# README file for translucent menus patch. |
158 |
if ! use vanilla; then |
159 |
dodoc "${FILESDIR}"/README.translucency |
160 |
ewarn "You are using a patched build, so, please, don't" |
161 |
ewarn "ever dare to report bugs at the fvwm-workers list" |
162 |
ewarn "unless you are also able to reproduce them with a" |
163 |
ewarn "vanilla build (USE=vanilla)." |
164 |
fi |
165 |
} |