summaryrefslogtreecommitdiff
path: root/packages/xorg-driver/xorg-driver-common.inc
blob: 8053e6c2365c704f7fb0943e6970aff98bcf55b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
DESCRIPTION = "X driver"
HOMEPAGE = "http://www.x.org"
SECTION = "x11/drivers"
LICENSE = "MIT-X"
PR = "r1"

DEPENDS = "randrproto xorg-server xproto"

XORG_PN = "${PN}"
XORG_RELEASE = "${@["individual",bb.data.getVar('PV', d, 1)[0:7]+"/src"][bb.data.getVar('PV', d, 1)[0:4] == "X11R"]}"
SRC_URI = "${XORG_MIRROR}/${XORG_RELEASE}/driver/${XORG_PN}-${PV}.tar.bz2"

S = "${WORKDIR}/${XORG_PN}-${PV}"

FILES_${PN} += " ${libdir}/xorg/modules"
FILES_${PN}-dbg +=  "${libdir}/xorg/modules/*/.debug"

inherit autotools pkgconfig

do_stage() {
	autotools_stage_all
}

# Another sucky behavor from Xorg configure scripts.
# They use AC_CHECK_FILE to check for DRI headers. Yuck!
# Of course this will blow up when cross compiling.

do_configure_prepend() {
	incdir=${STAGING_INCDIR}/xorg
	for f in dri.h sarea.h dristruct.h exa.h; do
		path="$incdir/$f"
		if [ -f "$path" ]; then
			p=`echo "$path" | sed 'y%*+%pp%;s%[^_[:alnum:]]%_%g'`
			eval "export ac_cv_file_$p=yes"
		fi
	done
}

# FIXME: We don't want to include the libtool archives (*.la) from modules
# directory, as they serve no useful purpose. Upstream should fix Makefile.am
do_install_append() {
	find ${D}${libdir}/xorg/modules -regex ".*\.la$" | xargs rm -f --
}