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"
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"
32 bidi? ( dev-libs/fribidi )
35 imlib? ( media-libs/imlib )
37 png? ( media-libs/libpng )
42 stroke? ( dev-libs/libstroke )
43 svg? ( gnome-base/librsvg )
49 x11-proto/xineramaproto
53 RDEPEND
="${COMMON_DEPEND}
55 gtk2-perl? ( dev-perl/gtk2-perl )
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}
68 doc? ( dev-libs/libxslt )
75 if ! use vanilla
; then
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"
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
114 einfo
"ATTN: You can safely ignore any imlib related configure errors."
115 myconf
="${myconf} --with-imlib-prefix=${T}"
118 myconf
="${myconf} --disable-gtk"
121 use readline
&& myconf
="${myconf} --without-termcap-library"
125 $
(use_enable debug debug-msgs
) \
126 $
(use_enable debug command-log
) \
127 $
(use_enable doc htmldoc
) \
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"
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
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"
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.
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"