1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit autotools eutils git-r3
7 DESCRIPTION="The fast and light GNUstep window manager"
8 HOMEPAGE="http://www.windowmaker.org/"
9 SRC_URI="http://www.windowmaker.org/pub/source/release/WindowMaker-extra-0.1.tar.gz"
10 EGIT_REPO_URI="git://repo.or.cz/wmaker-crm.git"
15 IUSE="gif imagemagick jpeg modelock nls png tiff webp xinerama +xpm xrandr"
18 DEPEND="media-libs/fontconfig
19 >=x11-libs/libXft-2.1.0
24 gif? ( >=media-libs/giflib-4.1.0-r3 )
25 imagemagick? ( media-gfx/imagemagick:0= )
26 jpeg? ( virtual/jpeg:0= )
27 png? ( media-libs/libpng:0= )
28 tiff? ( media-libs/tiff:0 )
29 webp? ( media-libs/libwebp )
30 xinerama? ( x11-libs/libXinerama )
31 xrandr? ( x11-libs/libXrandr )"
33 nls? ( >=sys-devel/gettext-0.10.39 )"
44 for file in WindowMaker/*menu* util/wmgenmenu.c; do
45 if [[ -r $file ]] ; then
46 sed -i -e "s:/usr/local/GNUstep/Applications/WPrefs.app:${EPREFIX}/usr/bin/:g;" "$file" || die
47 sed -i -e "s:/usr/local/share/WindowMaker:${EPREFIX}/usr/share/WindowMaker:g;" "$file" || die
48 sed -i -e "s:/opt/share/WindowMaker:${EPREFIX}/usr/share/WindowMaker:g;" "$file" || die
52 if has_version '>=media-gfx/imagemagick-7.0.1.0' ; then
53 eapply "${FILESDIR}/${PN}-0.95.8-imagemagick7.patch"
64 myconf="$(use_enable imagemagick magick) $(use_enable jpeg) $(use_enable gif) $(use_enable png) $(use_enable tiff) $(use_enable webp) $(use_enable xpm)"
66 # non required X capabilities
67 myconf="${myconf} $(use_enable modelock) $(use_enable xrandr randr) $(use_enable xinerama)"
70 [[ -z $LINGUAS ]] && export LINGUAS="$(ls po/*.po | sed 's:po/\(.*\)\.po$:\1:' | xargs)"
72 myconf="${myconf} --disable-locale"
75 # default settings with $myconf appended
77 --sysconfdir="${EPREFIX}"/etc/X11 \
80 --with-pixmapdir="${EPREFIX}"/usr/share/pixmaps \
81 --localedir="${EPREFIX}"/usr/share/locale \
84 cd ../WindowMaker-extra-0.1
91 # WindowMaker Extra Package (themes and icons)
92 cd ../WindowMaker-extra-0.1
97 emake DESTDIR="${D}" install
99 dodoc AUTHORS BUGFORM BUGS ChangeLog INSTALL* FAQ* \
103 cd ../WindowMaker-extra-0.1
104 emake DESTDIR="${D}" install
106 newdoc README README.extra
108 # create wmaker session shell script
109 echo "#!/usr/bin/env bash" > wmaker
110 echo "${EPREFIX}/usr/bin/wmaker" >> wmaker
111 exeinto /etc/X11/Sessions/
114 insinto /usr/share/xsessions
115 doins "${FILESDIR}"/wmaker.desktop
116 make_desktop_entry /usr/bin/wmaker