windows git gui test
[PupinuxGentooOverlay.git] / x11-wm / fvwm / fvwm-2.5.26.ebuild
bloba992a505ba3c12f5d3b4178d175adaf1d44c79b4
1 # Copyright 1999-2008 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.5.26.ebuild,v 1.1 2008/05/14 21:29:51 omp Exp $
5 inherit eutils flag-o-matic
7 DESCRIPTION="An extremely powerful ICCCM-compliant multiple virtual desktop window manager"
8 HOMEPAGE="http://www.fvwm.org/"
9 SRC_URI="ftp://ftp.fvwm.org/pub/fvwm/version-2/${P}.tar.bz2"
11 LICENSE="GPL-2 FVWM"
12 SLOT="0"
13 KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
14 IUSE="bidi debug doc gtk gtk2-perl imlib netpbm nls perl png readline rplay stroke svg tk truetype vanilla xinerama"
17 COMMON_DEPEND="
18 dev-libs/libxml2
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 gtk? (
34 =x11-libs/gtk+-1.2*
35 imlib? ( media-libs/imlib )
37 png? ( media-libs/libpng )
38 readline? (
39 sys-libs/ncurses
40 sys-libs/readline
42 stroke? ( dev-libs/libstroke )
43 svg? ( gnome-base/librsvg )
44 truetype? (
45 media-libs/fontconfig
46 virtual/xft
48 xinerama? (
49 x11-proto/xineramaproto
50 x11-libs/libXinerama
53 RDEPEND="${COMMON_DEPEND}
54 dev-lang/perl
55 gtk2-perl? ( dev-perl/gtk2-perl )
56 perl? ( tk? (
57 dev-lang/tk
58 dev-perl/perl-tk
59 >=dev-perl/X11-Protocol-0.56
62 rplay? ( media-sound/rplay )
63 userland_GNU? ( sys-apps/debianutils )
64 !x86-fbsd? ( netpbm? ( media-libs/netpbm ) )"
66 DEPEND="${COMMON_DEPEND}
67 dev-util/pkgconfig
68 doc? ( dev-libs/libxslt )
69 x11-proto/xextproto
70 x11-proto/xproto"
72 src_unpack() {
73 unpack ${A}
75 if ! use vanilla; then
76 cd "${S}"
78 # Applies various patches relatives to fvwm apparence; from fvw.lair.be
79 epatch "${FILESDIR}/01-fvwm-translucent-menus.patch"
80 epatch "${FILESDIR}/02-fvwm-menu-xlock-xlockmore-compat.patch"
81 epatch "${FILESDIR}/03-ColourBorders.patch"
82 epatch "${FILESDIR}/04-ResizeOutlineThin.patch"
83 epatch "${FILESDIR}/05-Conditionals.patch"
84 epatch "${FILESDIR}/06-FlatSeparators.patch"
85 epatch "${FILESDIR}/07-BorderUnderTitle.patch"
86 epatch "${FILESDIR}/08-InactiveFont.patch"
87 epatch "${FILESDIR}/09-FluxRoundedCorners.patch"
88 epatch "${FILESDIR}/10-TopBorder.patch"
89 epatch "${FILESDIR}/11-ButtonWidth.patch"
90 epatch "${FILESDIR}/12-MultiBorder.patch"
91 epatch "${FILESDIR}/13-FvwmButtonsTips.patch"
92 epatch "${FILESDIR}/14-FvwmIconMan.patch"
93 epatch "${FILESDIR}/15-Hover.patch"
94 epatch "${FILESDIR}/16-FirstItemUnderPointer.patch"
95 epatch "${FILESDIR}/17-TextOffset.patch"
96 epatch "${FILESDIR}/18-ThinGeometryProxy.patch"
100 src_compile() {
101 local myconf="--libexecdir=/usr/lib --with-imagepath=/usr/include/X11/bitmaps:/usr/include/X11/pixmaps:/usr/share/icons/fvwm --enable-package-subdirs --without-gnome"
103 # Non-upstream email where bugs should be sent; used in fvwm-bug.
104 export FVWM_BUGADDR="desktop-wm@gentoo.org"
106 # Recommended by upstream.
107 append-flags -fno-strict-aliasing
109 # Signed chars are required.
110 use ppc && append-flags -fsigned-char
112 if use gtk; then
113 if ! use imlib; then
114 einfo "ATTN: You can safely ignore any imlib related configure errors."
115 myconf="${myconf} --with-imlib-prefix=${T}"
117 else
118 myconf="${myconf} --disable-gtk"
121 use readline && myconf="${myconf} --without-termcap-library"
123 econf ${myconf} \
124 $(use_enable bidi) \
125 $(use_enable debug debug-msgs) \
126 $(use_enable debug command-log) \
127 $(use_enable doc htmldoc) \
128 $(use_enable nls) \
129 $(use_enable nls iconv) \
130 $(use_enable perl perllib) \
131 $(use_with png png-library) \
132 $(use_with readline readline-library) \
133 $(use_with rplay rplay-library) \
134 $(use_with stroke stroke-library) \
135 $(use_enable svg rsvg) \
136 $(use_enable truetype xft) \
137 $(use_enable xinerama) \
138 || die "econf failed"
140 emake || die "emake failed"
143 src_install() {
144 emake DESTDIR="${D}" install || die "emake install failed"
146 # These are always removed, because gentoo doesn't have anymore
147 # a dev-perl/gtk-perl package, so, these modules are pointless.
148 rm -f "${D}/usr/share/fvwm/perllib/FVWM/Module/Gtk.pm"
149 find "${D}" -name '*FvwmGtkDebug*' -exec rm -f '{}' \; 2>/dev/null
151 if use perl; then
152 if ! use tk; then
153 rm -f "${D}/usr/share/fvwm/perllib/FVWM/Module/Tk.pm"
154 if ! use gtk2-perl; then # no tk and no gtk2 bindings
155 rm -f "${D}/usr/share/fvwm/perllib/FVWM/Module/Toolkit.pm"
156 find "${D}/usr/share/fvwm/perllib" -depth -type d -exec rmdir '{}' \; 2>/dev/null
160 # Now, the Gtk2.pm file, it will require dev-perl/gtk2-perl
161 # so it implies gtk2 as well. That's why we need another use flag.
162 if ! use gtk2-perl; then
163 rm -f "${D}/usr/share/fvwm/perllib/FVWM/Module/Gtk2.pm"
165 else
166 # Completely wipe it if ! use perl
167 rm -rf "${D}/usr/bin/fvwm-perllib" \
168 "${D}/usr/share/man/man1/fvwm-perllib.1"
171 # Utility for testing FVWM behaviour by creating a simple window with
172 # configurable hints.
173 if use debug; then
174 dobin "${S}/tests/hints/hints_test"
175 newdoc "${S}/tests/hints/README" README.hints
178 # Remove fvwm-convert-2.6 as it does not contain any code.
179 rm -f "${D}/usr/bin/fvwm-convert-2.6" \
180 "${D}/usr/share/man/man1/fvwm-convert-2.6.1"
182 echo "/usr/bin/fvwm" > "${D}/etc/X11/Sessions/${PN}"
184 dodoc AUTHORS ChangeLog NEWS README \
185 docs/{ANNOUNCE,BUGS,COMMANDS,CONVENTIONS} \
186 docs/{DEVELOPERS,error_codes,FAQ,TODO,fvwm.lsm}
188 # README file for translucent menus patch.
189 use vanilla || dodoc "${FILESDIR}/README.translucency"