x11-wm/icewm: Bump to version 1.6.6
[gentoo.git] / x11-wm / icewm / icewm-1.6.6.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit autotools unpacker
7
8 DESCRIPTION="Ice Window Manager with Themes"
9 HOMEPAGE="https://ice-wm.org/ https://github.com/ice-wm/icewm"
10 LICENSE="GPL-2"
11 SRC_URI="https://github.com/ice-wm/icewm/releases/download/${PV}/${P}.tar.lz"
12
13 SLOT="0"
14 KEYWORDS="~amd64 ~ppc ~sparc ~x86"
15 IUSE="+alsa ao bidi debug +gdk-pixbuf nls truetype uclibc xinerama"
16
17 # Tests broken in all versions, patches welcome, bug #323907, #389533
18 RESTRICT="test"
19
20 REQUIRED_USE="|| ( alsa ao )"
21
22 #fix for icewm preversion package names
23 S="${WORKDIR}/${P/_}"
24
25 # These are the core dependencies of icewm.
26 # Look into configure.ac and search for PKG_CHECK_MODULES([CORE]
27 CORE_DEPEND="
28         media-libs/fontconfig
29         x11-libs/libX11
30         x11-libs/libXcomposite
31         x11-libs/libXdamage
32         x11-libs/libXext
33         x11-libs/libXfixes
34         x11-libs/libXrender
35 "
36
37 RDEPEND="
38         ${CORE_DEPEND}
39         x11-libs/libICE
40         x11-libs/libSM
41         x11-libs/libXft
42         x11-libs/libXpm
43         x11-libs/libXrandr
44         alsa? (
45                 media-libs/alsa-lib
46                 media-libs/libsndfile[alsa]
47         )
48         ao? (
49                 media-libs/libao
50                 media-libs/libsndfile
51         )
52         bidi? ( dev-libs/fribidi )
53         gdk-pixbuf? (
54                 x11-libs/gdk-pixbuf:2[X]
55         )
56         !gdk-pixbuf? (
57                 media-libs/libpng:0=
58                 virtual/jpeg
59         )
60         xinerama? ( x11-libs/libXinerama )
61 "
62 DEPEND="
63         ${RDEPEND}
64         $(unpacker_src_uri_depends)
65         dev-libs/glib:2
66         gnome-base/librsvg
67         x11-base/xorg-proto
68         gdk-pixbuf? ( gnome-base/librsvg:2 )
69 "
70
71 BDEPEND="
72         app-text/asciidoc
73         virtual/pkgconfig
74         nls? ( >=sys-devel/gettext-0.19.6 )
75 "
76
77 src_prepare() {
78         # Fix bug #486710 - TODO: Still needed?
79         #use uclibc && PATCHES+=( "${FILESDIR}/${PN}-1.3.8-uclibc.patch" )
80
81         default
82         eautoreconf
83 }
84
85 src_configure() {
86         local icesound
87         if use alsa && use ao ; then
88                 icesound="alsa,ao"
89         elif use alsa ; then
90                 icesound="alsa"
91         elif use ao ; then
92                 icesound="ao"
93         fi
94
95         local myconf=(
96                 --enable-logevents
97                 --enable-xrandr
98                 --with-cfgdir=/etc/icewm
99                 --with-docdir=/usr/share/doc/${PF}/html
100                 --with-icesound="${icesound}"
101                 --with-libdir=/usr/share/icewm
102                 $(use_enable bidi fribidi)
103                 $(use_enable debug)
104                 $(use_enable gdk-pixbuf)
105                 $(use_enable nls i18n)
106                 $(use_enable nls)
107                 $(use_enable xinerama)
108         )
109         if use truetype ; then
110                 myconf+=(
111                         --enable-shape
112                 )
113         else
114                 myconf+=(
115                         --disable-xfreetype
116                         --enable-corefonts
117                 )
118         fi
119
120         econf "${myconf[@]}"
121
122         sed -i "s:/icewm-\$(VERSION)::" src/Makefile || die
123         sed -i "s:ungif:gif:" src/Makefile || die "libungif fix failed"
124 }
125
126 src_install() {
127         local DOCS=( AUTHORS ChangeLog NEWS README.md TODO VERSION )
128
129         default
130
131         docinto html
132         dodoc doc/icewm.html
133         dodoc man/*.html
134
135         exeinto /etc/X11/Sessions
136         doexe "${FILESDIR}/icewm"
137 }