1 # Copyright © 2021-2022 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-2022 Gentoo Authors
10 # Distributed under the terms of the GNU General Public License v2
12 # The modifications include:
14 # * patch build system to install bundled manpage (2021-02)
15 # * fix prefixed installation in src_install (2021-02)
16 # * convert patches to -p1 (2022-06)
19 inherit autotools flag-o-matic desktop
21 DESCRIPTION="An extremely powerful ICCCM-compliant multiple virtual desktop window manager"
22 HOMEPAGE="https://www.fvwm.org/"
23 SRC_URI="https://github.com/fvwmorg/fvwm/releases/download/${PV}/${P}.tar.gz"
27 KEYWORDS="~alpha amd64 ~arm ~ia64 ppc ~ppc64 ~riscv ~sparc x86"
28 IUSE="bidi debug doc netpbm nls perl png readline rplay stroke svg tk truetype +vanilla xinerama lock"
45 bidi? ( dev-libs/fribidi )
46 nls? ( virtual/libintl )
47 png? ( media-libs/libpng:0= )
52 stroke? ( dev-libs/libstroke )
53 svg? ( gnome-base/librsvg )
58 xinerama? ( x11-libs/libXinerama )
60 RDEPEND="${COMMON_DEPEND}
66 >=dev-perl/X11-Protocol-0.56
69 rplay? ( media-sound/rplay )
70 lock? ( x11-misc/xlockmore )
71 netpbm? ( media-libs/netpbm )
73 DEPEND="${COMMON_DEPEND}
76 doc? ( dev-libs/libxslt )
80 "$FILESDIR/$PN-2.6.5-ar.patch" #474528
81 "$FILESDIR/$PN-2.6.8-perl528.patch" # Fix for Perl 5.28
82 "$FILESDIR/$PN-2.6.9-respect-docdir.patch"
83 "$FILESDIR/$PN-2.6.9-respect-htmldir.patch"
84 "$FILESDIR/$PN-2.6.9-bundled-manpage.patch"
87 use vanilla || PATCHES+=(
88 # Enables fast translucent menus; patch from fvwm-user mailing list.
89 "$FILESDIR/$PN-2.5.27-translucent-menus.diff"
91 # Allow more mouse buttons, bug #411811
92 "$FILESDIR/$PN-2.6.5-mouse-buttons.patch"
101 --libexecdir="${EPREFIX}"/usr/$(get_libdir)
102 --with-imagepath=/usr/include/X11/bitmaps:/usr/include/X11/pixmaps:/usr/share/icons/fvwm
104 --enable-package-subdirs
106 $(use_enable debug debug-msgs)
107 $(use_enable debug command-log)
108 $(use_enable doc htmldoc)
109 $(use_enable doc mandoc)
111 $(use_enable perl perllib)
113 $(use_with readline readline-library)
114 $(use_with rplay rplay-library)
115 $(use_with stroke stroke-library)
116 $(use_enable svg rsvg)
117 $(use_enable truetype xft)
118 $(use_enable xinerama)
121 # Non-upstream email where bugs should be sent; used in fvwm-bug.
122 export FVWM_BUGADDR="maintainer-needed@gentoo.org"
124 # Recommended by upstream, reference ????
125 append-flags -fno-strict-aliasing
127 # Signed chars are required.
128 use ppc && append-flags -fsigned-char
130 use readline && myeconfargs+=( --without-termcap-library )
132 econf "${myeconfargs[@]}"
137 make_session_desktop fvwm /usr/bin/fvwm
140 find "${ED}" -name '*fvwm-menu-xlock' -exec rm -f '{}' \; 2>/dev/null
145 rm "${ED}"/usr/share/fvwm/perllib/FVWM/Module/Tk.pm || die
146 rm "${ED}"/usr/share/fvwm/perllib/FVWM/Module/Toolkit.pm || die
147 find "${ED}"/usr/share/fvwm/perllib -depth -type d -exec rmdir '{}' \; 2>/dev/null
150 # Completely wipe it if ! use perl
151 rm -r "${ED}"/usr/bin/fvwm-perllib "${ED}"/usr/share/man/man1/fvwm-perllib.1
154 # Utility for testing FVWM behaviour by creating a simple window with
155 # configurable hints.
157 dobin "${S}"/tests/hints/hints_test
158 newdoc "${S}"/tests/hints/README README.hints
161 dodir /etc/X11/Sessions
162 echo "${EPREFIX%/}/usr/bin/fvwm" > "${ED}"/etc/X11/Sessions/${PN} || die
163 fperms a+x /etc/X11/Sessions/${PN}
165 dodoc docs/{COMMANDS,DEVELOPERS.md}
167 # README file for translucent menus patch.
168 if ! use vanilla; then
169 dodoc "${FILESDIR}"/README.translucency
170 ewarn "You are using a patched build, so, please, don't"
171 ewarn "report bugs at the fvwm-workers list unless you are"
172 ewarn "also able to reproduce them with a vanilla build (USE=vanilla)."