sci-mathematics/rstudio: Thanks to tomboy-64 for fixing bug Bug 534152 - sci-mathemat...
[gentoo.git] / x11-wm / windowmaker / windowmaker-0.95.7.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 inherit eutils
7
8 DESCRIPTION="The fast and light GNUstep window manager"
9 HOMEPAGE="http://www.windowmaker.org/"
10 SRC_URI=" http://windowmaker.org/pub/source/release/${P/windowm/WindowM}.tar.gz
11         http://www.windowmaker.org/pub/source/release/WindowMaker-extra-0.1.tar.gz"
12
13 SLOT="0"
14 LICENSE="GPL-2"
15 IUSE="gif imagemagick jpeg modelock nls png tiff webp xinerama +xpm xrandr"
16 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
17
18 DEPEND="media-libs/fontconfig
19         >=x11-libs/libXft-2.1.0
20         x11-libs/libXmu
21         x11-libs/libXpm
22         x11-libs/libXt
23         x11-libs/libXv
24         gif? ( >=media-libs/giflib-4.1.0-r3 )
25         imagemagick? ( media-gfx/imagemagick )
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 )"
32 RDEPEND="${DEPEND}
33         nls? ( >=sys-devel/gettext-0.10.39 )
34         !app-i18n/scim-anthy[gtk3]"
35
36 S=${WORKDIR}/${P/windowm/WindowM}
37
38 src_prepare() {
39         # Fix some paths
40         for file in WindowMaker/*menu* util/wmgenmenu.c; do
41                 if [[ -r $file ]] ; then
42                         sed -i -e "s:/usr/local/GNUstep/Applications/WPrefs.app:${EPREFIX}/usr/bin/:g;" "$file" || die
43                         sed -i -e "s:/usr/local/share/WindowMaker:${EPREFIX}/usr/share/WindowMaker:g;" "$file" || die
44                         sed -i -e "s:/opt/share/WindowMaker:${EPREFIX}/usr/share/WindowMaker:g;" "$file" || die
45                 fi;
46         done;
47 }
48
49 src_configure() {
50         local myconf
51
52         # image format types
53         myconf="$(use_enable imagemagick magick) $(use_enable jpeg) $(use_enable gif) $(use_enable png) $(use_enable tiff) $(use_enable webp) $(use_enable xpm)"
54
55         # non required X capabilities
56         myconf="${myconf} $(use_enable modelock) $(use_enable xrandr randr) $(use_enable xinerama)"
57
58         if use nls; then
59                 [[ -z $LINGUAS ]] && export LINGUAS="$(ls po/*.po | sed 's:po/\(.*\)\.po$:\1:' | xargs)"
60         else
61                 myconf="${myconf} --disable-locale"
62         fi
63
64         # default settings with $myconf appended
65         econf \
66                 --sysconfdir="${EPREFIX}"/etc/X11 \
67                 --with-x \
68                 --enable-usermenu \
69                 --with-pixmapdir="${EPREFIX}"/usr/share/pixmaps \
70                 --localedir="${EPREFIX}"/usr/share/locale \
71                 ${myconf}
72
73         cd ../WindowMaker-extra-0.1
74         econf
75 }
76
77 src_compile() {
78         emake
79
80         # WindowMaker Extra Package (themes and icons)
81         cd ../WindowMaker-extra-0.1
82         emake
83 }
84
85 src_install() {
86         emake DESTDIR="${D}" install
87
88         dodoc AUTHORS BUGFORM BUGS ChangeLog INSTALL* FAQ* \
89                   README* NEWS TODO
90
91         # WindowMaker Extra
92         cd ../WindowMaker-extra-0.1
93         emake DESTDIR="${D}" install
94
95         newdoc README README.extra
96
97         # create wmaker session shell script
98         echo "#!/usr/bin/env bash" > wmaker
99         echo "${EPREFIX}/usr/bin/wmaker" >> wmaker
100         exeinto /etc/X11/Sessions/
101         doexe wmaker
102
103         insinto /usr/share/xsessions
104         doins "${FILESDIR}"/wmaker.desktop
105         make_desktop_entry /usr/bin/wmaker
106 }