sys-boot/plymouth: use HTTPS for freedesktop.org
[gentoo.git] / x11-wm / windowmaker / windowmaker-9999.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit autotools eutils git-r3
6
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"
11 EGIT_BRANCH="next"
12
13 SLOT="0"
14 LICENSE="GPL-2"
15 IUSE="gif imagemagick jpeg modelock nls png tiff webp xinerama +xpm xrandr"
16 KEYWORDS=""
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: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 )"
32 RDEPEND="${DEPEND}
33         nls? ( >=sys-devel/gettext-0.10.39 )"
34
35 src_unpack() {
36         # wm-extras
37         unpack ${A}
38
39         git-r3_src_unpack
40 }
41
42 src_prepare() {
43         # Fix some paths
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
49                 fi;
50         done;
51
52         if has_version '>=media-gfx/imagemagick-7.0.1.0' ; then
53                 eapply "${FILESDIR}/${PN}-0.95.8-imagemagick7.patch"
54         fi
55
56         default
57         eautoreconf
58 }
59
60 src_configure() {
61         local myconf
62
63         # image format types
64         myconf="$(use_enable imagemagick magick) $(use_enable jpeg) $(use_enable gif) $(use_enable png) $(use_enable tiff) $(use_enable webp) $(use_enable xpm)"
65
66         # non required X capabilities
67         myconf="${myconf} $(use_enable modelock) $(use_enable xrandr randr) $(use_enable xinerama)"
68
69         if use nls; then
70                 [[ -z $LINGUAS ]] && export LINGUAS="$(ls po/*.po | sed 's:po/\(.*\)\.po$:\1:' | xargs)"
71         else
72                 myconf="${myconf} --disable-locale"
73         fi
74
75         # default settings with $myconf appended
76         econf \
77                 --sysconfdir="${EPREFIX}"/etc/X11 \
78                 --with-x \
79                 --enable-usermenu \
80                 --with-pixmapdir="${EPREFIX}"/usr/share/pixmaps \
81                 --localedir="${EPREFIX}"/usr/share/locale \
82                 ${myconf}
83
84         cd ../WindowMaker-extra-0.1
85         econf
86 }
87
88 src_compile() {
89         emake
90
91         # WindowMaker Extra Package (themes and icons)
92         cd ../WindowMaker-extra-0.1
93         emake
94 }
95
96 src_install() {
97         emake DESTDIR="${D}" install
98
99         dodoc AUTHORS BUGFORM BUGS ChangeLog INSTALL* FAQ* \
100                   README* NEWS TODO
101
102         # WindowMaker Extra
103         cd ../WindowMaker-extra-0.1
104         emake DESTDIR="${D}" install
105
106         newdoc README README.extra
107
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/
112         doexe wmaker
113
114         insinto /usr/share/xsessions
115         doins "${FILESDIR}"/wmaker.desktop
116         make_desktop_entry /usr/bin/wmaker
117 }