1 # Copyright © 2021 Nick Bowler
2 # License GPLv2+: GNU General Public License version 2 or any later version.
3 # This is free software: you are free to change and redistribute it.
4 # There is NO WARRANTY, to the extent permitted by law.
6 # This is a modified version of the original ebuild from Gentoo GNU/Linux,
7 # covered by the following copyright and permission notice:
9 # Copyright 1999-2020 Gentoo Authors
10 # Distributed under the terms of the GNU General Public License v2
13 inherit autotools flag-o-matic desktop
15 DESCRIPTION="An extremely powerful ICCCM-compliant multiple virtual desktop window manager"
16 HOMEPAGE="http://www.fvwm.org/"
17 SRC_URI="https://github.com/fvwmorg/fvwm/releases/download/${PV}/${P}.tar.gz"
21 KEYWORDS="~alpha amd64 ~arm ~ia64 ppc ~ppc64 ~sparc x86"
22 IUSE="bidi debug doc netpbm nls perl png readline rplay stroke svg tk truetype +vanilla xinerama lock"
39 bidi? ( dev-libs/fribidi )
40 nls? ( virtual/libintl )
41 png? ( media-libs/libpng:0= )
46 stroke? ( dev-libs/libstroke )
47 svg? ( gnome-base/librsvg )
52 xinerama? ( x11-libs/libXinerama )
54 RDEPEND="${COMMON_DEPEND}
59 >=dev-perl/X11-Protocol-0.56
62 rplay? ( media-sound/rplay )
63 lock? ( x11-misc/xlockmore )
64 userland_GNU? ( sys-apps/debianutils )
65 !x86-fbsd? ( netpbm? ( media-libs/netpbm ) )
67 DEPEND="${COMMON_DEPEND}
70 doc? ( dev-libs/libxslt )
74 "$FILESDIR/$PN-2.6.9-respect-docdir.patch"
75 "$FILESDIR/$PN-2.6.9-respect-htmldir.patch"
76 "$FILESDIR/$PN-2.6.9-bundled-manpage.patch"
80 if ! use vanilla; then
81 # Enables fast translucent menus; patch from fvwm-user mailing list.
82 eapply -p0 "${FILESDIR}/${PN}-2.5.27-translucent-menus.diff"
84 # Allow more mouse buttons, bug #411811
85 eapply -p0 "${FILESDIR}/${PN}-2.6.5-mouse-buttons.patch"
88 eapply -p0 "${FILESDIR}/${PN}-2.6.5-ar.patch" #474528
91 eapply -p0 "${FILESDIR}/${PN}-2.6.8-perl528.patch"
99 --libexecdir="${EPREFIX}"/usr/$(get_libdir)
100 --with-imagepath=/usr/include/X11/bitmaps:/usr/include/X11/pixmaps:/usr/share/icons/fvwm
102 --enable-package-subdirs
104 $(use_enable debug debug-msgs)
105 $(use_enable debug command-log)
106 $(use_enable doc htmldoc)
107 $(use_enable doc mandoc)
109 $(use_enable perl perllib)
111 $(use_with readline readline-library)
112 $(use_with rplay rplay-library)
113 $(use_with stroke stroke-library)
114 $(use_enable svg rsvg)
115 $(use_enable truetype xft)
116 $(use_enable xinerama)
119 # Non-upstream email where bugs should be sent; used in fvwm-bug.
120 export FVWM_BUGADDR="maintainer-needed@gentoo.org"
122 # Recommended by upstream, reference ????
123 append-flags -fno-strict-aliasing
125 # Signed chars are required.
126 use ppc && append-flags -fsigned-char
128 use readline && myeconfargs+=( --without-termcap-library )
130 econf "${myeconfargs[@]}"
135 make_session_desktop fvwm /usr/bin/fvwm
138 find "${ED}" -name '*fvwm-menu-xlock' -exec rm -f '{}' \; 2>/dev/null
143 rm "${ED}"/usr/share/fvwm/perllib/FVWM/Module/Tk.pm || die
144 rm "${ED}"/usr/share/fvwm/perllib/FVWM/Module/Toolkit.pm || die
145 find "${ED}"/usr/share/fvwm/perllib -depth -type d -exec rmdir '{}' \; 2>/dev/null
148 # Completely wipe it if ! use perl
149 rm -r "${ED}"/usr/bin/fvwm-perllib "${ED}"/usr/share/man/man1/fvwm-perllib.1
152 # Utility for testing FVWM behaviour by creating a simple window with
153 # configurable hints.
155 dobin "${S}"/tests/hints/hints_test
156 newdoc "${S}"/tests/hints/README README.hints
159 dodir /etc/X11/Sessions
160 echo "${EPREFIX%/}/usr/bin/fvwm" > "${ED}"/etc/X11/Sessions/${PN} || die
161 fperms a+x /etc/X11/Sessions/${PN}
163 dodoc docs/{COMMANDS,DEVELOPERS.md}
165 # README file for translucent menus patch.
166 if ! use vanilla; then
167 dodoc "${FILESDIR}"/README.translucency
168 ewarn "You are using a patched build, so, please, don't"
169 ewarn "report bugs at the fvwm-workers list unless you are"
170 ewarn "also able to reproduce them with a vanilla build (USE=vanilla)."