56d17e3405a959ca24f9ed02ee36d5adba6dfbf9
[gentoo.git] / x11-drivers / xf86-video-ati / xf86-video-ati-18.0.1-r2.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit linux-info
7
8 DESCRIPTION="ATI video driver"
9 HOMEPAGE="https://www.x.org/wiki/ati/"
10
11 if [[ ${PV} == 9999* ]]; then
12         EGIT_REPO_URI="https://anongit.freedesktop.org/git/xorg/driver/${PN}"
13         inherit autotools git-r3
14         LIVE_DEPEND=">=x11-misc/util-macros-1.18"
15 else
16         SRC_URI="mirror://xorg/driver/${P}.tar.bz2"
17         KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
18 fi
19
20 LICENSE="MIT"
21 SLOT="0"
22 IUSE="+glamor udev"
23
24 BDEPEND="
25         virtual/pkgconfig
26 "
27 RDEPEND="
28         >=x11-libs/libdrm-2.4.78[video_cards_radeon]
29         >=x11-libs/libpciaccess-0.8.0
30         glamor? ( x11-base/xorg-server[glamor] )
31         udev? ( virtual/libudev:= )
32 "
33 DEPEND="
34         ${LIVE_DEPEND}
35         ${RDEPEND}
36         x11-base/xorg-proto
37 "
38
39 pkg_pretend() {
40         if use kernel_linux ; then
41                 if kernel_is -ge 3 9; then
42                         CONFIG_CHECK="~!DRM_RADEON_UMS ~!FB_RADEON"
43                 else
44                         CONFIG_CHECK="~DRM_RADEON_KMS ~!FB_RADEON"
45                 fi
46         fi
47         check_extra_config
48 }
49
50 src_prepare() {
51         default
52         [[ ${PV} == 9999 ]] eautoreconf
53 }
54
55 src_configure() {
56         local econfargs=(
57                 $(use_enable glamor)
58                 $(use_enable udev)
59         )
60         econf "${econfargs[@]}"
61 }
62
63 src_install() {
64         default
65         find "${D}" -name '*.la' -delete || die
66 }