summaryrefslogtreecommitdiffstats
path: root/graphics/libdrm/Makefile
blob: a8b21d84cd91b6fbfbc108f3211b2cff02c6c825 (plain) (blame)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Created by: lesi@FreeBSD.org
# $FreeBSD$

PORTNAME=   libdrm
PORTVERSION=    2.4.55
PORTEPOCH=  1
CATEGORIES= graphics x11
MASTER_SITES=   http://dri.freedesktop.org/libdrm/

MAINTAINER= x11@FreeBSD.org
COMMENT=    Userspace interface to kernel Direct Rendering Module services

LIB_DEPENDS=    libpciaccess.so:${PORTSDIR}/devel/libpciaccess \
        libpthread-stubs.so:${PORTSDIR}/devel/libpthread-stubs

USES=       libtool pkgconfig tar:bzip2
GNU_CONFIGURE=  yes
USE_LDCONFIG=   yes
INSTALL_TARGET= install-strip

OPTIONS_DEFINE= MANPAGES

.if defined(PACKAGE_BUILDING)
OPTIONS_DEFAULT+=   MANPAGES
.endif

USES+=      gmake

.include <bsd.port.options.mk>

# KMS support in the kernel is only build on these archs, disable others
.if ${ARCH} == "amd64" || ${ARCH} == "i386"
CONFIGURE_ARGS+=--enable-libkms
PLIST_SUB+= KMS="" NOUVEAU=""
.else
CONFIGURE_ARGS+=--disable-libkms
PLIST_SUB+= KMS="@comment " NOUVEAU="@comment "
.endif

.if ${PORT_OPTIONS:MMANPAGES}
BUILD_DEPENDS+= ${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:${PORTSDIR}/textproc/docbook-xsl
USE_GNOME+= libxslt:build
PLIST_SUB+= MAN=""
.else
CONFIGURE_ARGS+=--disable-manpages
PLIST_SUB+= MAN="@comment "
.endif

CONFIGURE_ARGS+=--disable-vmwgfx

.if ${ARCH} == amd64 || ${ARCH} == i386
PLIST_SUB+= INTEL_DRIVER=""
PLIST_SUB+= RADEON_DRIVERS=""
.elif ${ARCH} == ia64 || ${ARCH} == powerpc || ${ARCH} == powerpc64
PLIST_SUB+= INTEL_DRIVER="@comment "
PLIST_SUB+= RADEON_DRIVERS=""
.else
PLIST_SUB+= INTEL_DRIVER="@comment "
PLIST_SUB+= RADEON_DRIVERS="@comment "
.endif

pre-patch:
    @${REINPLACE_CMD} 's|{libdir}/pkgconfig|{prefix}/libdata/pkgconfig|g; \
               s,i?86|x86_64),i?86|amd64|x86_64),g' \
        ${WRKSRC}/configure

.include <bsd.port.mk>