1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit autotools flag-o-matic desktop
7 DESCRIPTION="An extremely powerful ICCCM-compliant multiple virtual desktop window manager"
8 HOMEPAGE="http://www.fvwm.org/"
9 SRC_URI="https://github.com/fvwmorg/fvwm/releases/download/${PV}/${P}.tar.gz"
13 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
14 IUSE="bidi debug doc netpbm nls perl png readline rplay stroke svg tk truetype +vanilla xinerama lock"
31 bidi? ( dev-libs/fribidi )
32 nls? ( virtual/libintl )
33 png? ( media-libs/libpng:0= )
38 stroke? ( dev-libs/libstroke )
39 svg? ( gnome-base/librsvg )
44 xinerama? ( x11-libs/libXinerama )
46 RDEPEND="${COMMON_DEPEND}
51 >=dev-perl/X11-Protocol-0.56
54 rplay? ( media-sound/rplay )
55 lock? ( x11-misc/xlockmore )
56 userland_GNU? ( sys-apps/debianutils )
57 !x86-fbsd? ( netpbm? ( media-libs/netpbm ) )
59 DEPEND="${COMMON_DEPEND}
62 doc? ( dev-libs/libxslt )
66 if ! use vanilla; then
67 # Enables fast translucent menus; patch from fvwm-user mailing list.
68 eapply -p0 "${FILESDIR}/${PN}-2.5.27-translucent-menus.diff"
70 # Allow more mouse buttons, bug #411811
71 eapply -p0 "${FILESDIR}/${PN}-2.6.5-mouse-buttons.patch"
74 eapply -p0 "${FILESDIR}/${PN}-2.6.5-ar.patch" #474528
77 eapply -p0 "${FILESDIR}/${PN}-2.6.8-perl528.patch"
85 --libexecdir="${EPREFIX}"/usr/$(get_libdir)
86 --with-imagepath=/usr/include/X11/bitmaps:/usr/include/X11/pixmaps:/usr/share/icons/fvwm
88 --enable-package-subdirs
89 --docdir="/usr/share/doc/${P}"
91 $(use_enable debug debug-msgs)
92 $(use_enable debug command-log)
93 $(use_enable doc htmldoc)
95 $(use_enable perl perllib)
97 $(use_with readline readline-library)
98 $(use_with rplay rplay-library)
99 $(use_with stroke stroke-library)
100 $(use_enable svg rsvg)
101 $(use_enable truetype xft)
102 $(use_enable xinerama)
105 # Non-upstream email where bugs should be sent; used in fvwm-bug.
106 export FVWM_BUGADDR="maintainer-needed@gentoo.org"
108 # Recommended by upstream, reference ????
109 append-flags -fno-strict-aliasing
111 # Signed chars are required.
112 use ppc && append-flags -fsigned-char
114 use readline && myeconfargs+=( --without-termcap-library )
116 econf "${myeconfargs[@]}"
121 make_session_desktop fvwm /usr/bin/fvwm
124 find "${D}" -name '*fvwm-menu-xlock' -exec rm -f '{}' \; 2>/dev/null
129 rm "${D}"/usr/share/fvwm/perllib/FVWM/Module/Tk.pm || die
130 rm "${D}"/usr/share/fvwm/perllib/FVWM/Module/Toolkit.pm || die
131 find "${D}"/usr/share/fvwm/perllib -depth -type d -exec rmdir '{}' \; 2>/dev/null
134 # Completely wipe it if ! use perl
135 rm -r "${D}"/usr/bin/fvwm-perllib "${D}"/usr/share/man/man1/fvwm-perllib.1
138 # Utility for testing FVWM behaviour by creating a simple window with
139 # configurable hints.
141 dobin "${S}"/tests/hints/hints_test
142 newdoc "${S}"/tests/hints/README README.hints
145 dodir /etc/X11/Sessions
146 echo "/usr/bin/fvwm" > "${D}"/etc/X11/Sessions/${PN} || die
147 fperms a+x /etc/X11/Sessions/${PN}
149 dodoc docs/{COMMANDS,DEVELOPERS.md}
151 # README file for translucent menus patch.
152 if ! use vanilla; then
153 dodoc "${FILESDIR}"/README.translucency
154 ewarn "You are using a patched build, so, please, don't"
155 ewarn "report bugs at the fvwm-workers list unless you are"
156 ewarn "also able to reproduce them with a vanilla build (USE=vanilla)."