blob: c60841cda6102b0d25ade5479e066ae38cce9189 (
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
# Created by: Eric Anholt <anholt@FreeBSD.org>
# $FreeBSD$
PORTNAME= mesa-dri
PORTVERSION= ${MESAVERSION}
PORTREVISION= 1
CATEGORIES= graphics
COMMENT= OpenGL hardware acceleration drivers for DRI2+
USE_XORG= xorgproto x11 xdamage xext xfixes xshmfence xv xvmc
OPTIONS_DEFINE= TEXTURE VAAPI VDPAU WAYLAND
OPTIONS_DEFAULT=TEXTURE
OPTIONS_SUB= yes
TEXTURE_DESC= Enable texture-float support (patent encumbered)
TEXTURE_CONFIGURE_ENABLE= texture-float
VAAPI_CONFIGURE_ENABLE= va
VAAPI_LIB_DEPENDS= libva.so:multimedia/libva
VAAPI_USE= XORG=xcb
VDPAU_CONFIGURE_ENABLE= vdpau
VDPAU_LIB_DEPENDS= libvdpau.so:multimedia/libvdpau
WAYLAND_DESC= Enable support for the Wayland platform in Vulkan drivers
WAYLAND_BUILD_DEPENDS= wayland-protocols>=1.8:graphics/wayland-protocols
WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland
.include <bsd.port.options.mk>
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
ALL_DRI_DRIVERS= I915 I965 RADEON R200 SWRAST
ALL_GALLIUM_DRIVERS= FREEDRENO R300 R600 RADEONSI SVGA SWRAST VC4
ALL_VULKAN_DRIVERS= INTEL RADEON
DRI_DRIVERS= SWRAST # classic swrast
.if "${MESA_LLVM_VER}" != ""
GALLIUM_DRIVERS= SWRAST # llvmpipe
.else
GALLIUM_DRIVERS= ""
.endif
VULKAN_DRIVERS= #
.if ${ARCH} == amd64 || ${ARCH} == i386 \
|| ${ARCH} == powerpc || ${ARCH} == powerpc64
DRI_DRIVERS+= RADEON R200
GALLIUM_DRIVERS+= R600
. if "${MESA_LLVM_VER}" != "" && (${ARCH} == amd64 || ${ARCH} == i386)
# https://cgit.freedesktop.org/mesa/mesa/commit/?id=58952675f6d4
GALLIUM_DRIVERS+= R300
. endif
. if "${MESA_LLVM_VER}" != "" # until PPC gets LLVM in base
GALLIUM_DRIVERS+= RADEONSI
VULKAN_DRIVERS+= RADEON
. endif
.endif
.if ${ARCH} == amd64 || ${ARCH} == i386
DRI_DRIVERS+= I915 I965
GALLIUM_DRIVERS+= SVGA
. if ${OPSYS} == FreeBSD
EXTRA_PATCHES+= ${PATCHDIR}/extra-src_mesa_drivers_dri_i965_intel__screen.c
. endif
VULKAN_DRIVERS+= INTEL
.elif ${ARCH} == aarch64 || ${ARCH} == armv6 || ${ARCH} == armv7
GALLIUM_DRIVERS+= FREEDRENO VC4
. if ${ARCH} == armv6 || ${ARCH} == armv7
EXTRA_PATCHES+= ${PATCHDIR}/extra-src_gallium_drivers_vc4_Makefile.in
. endif
.endif
.if ${VULKAN_DRIVERS}
BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}mako>0:textproc/py-mako@${PY_FLAVOR}
.endif
LDFLAGS_i386= -Wl,-znotext
.if ${DRI_DRIVERS} || ${VULKAN_DRIVERS:MINTEL}
. if ${/usr/bin/ld:L:tA} != /usr/bin/ld.lld
# --build-id isn't supported by old GNU ld.bfd in base
USE_BINUTILS= yes
LDFLAGS+= -B${LOCALBASE}/bin
. endif
.endif
# enables VK_KHR_wayland_surface in Vulkan drivers
.if ${PORT_OPTIONS:MWAYLAND} && !empty(VULKAN_DRIVERS)
CONFIGURE_ARGS+= --with-platforms=x11,surfaceless,drm,wayland
.endif
CONFIGURE_ARGS+= --with-dri-drivers="${DRI_DRIVERS:tl}" \
--with-gallium-drivers="${GALLIUM_DRIVERS:tl}" \
--with-vulkan-drivers="${VULKAN_DRIVERS:tl}"
.for _d in ${ALL_DRI_DRIVERS}
. if ${DRI_DRIVERS:M${_d}}
PLIST_SUB+= ${_d}_DRIVER=""
. else
PLIST_SUB+= ${_d}_DRIVER="@comment "
. endif
.endfor
.for _gd in ${ALL_GALLIUM_DRIVERS}
. if ${GALLIUM_DRIVERS:M${_gd}}
PLIST_SUB+= ${_gd}_GDRIVER=""
. else
PLIST_SUB+= ${_gd}_GDRIVER="@comment "
. endif
.endfor
.for _vd in ${ALL_VULKAN_DRIVERS}
. if ${VULKAN_DRIVERS:M${_vd}}
PLIST_SUB+= ${_vd}_VDRIVER="" ARCH="${ARCH}"
. else
PLIST_SUB+= ${_vd}_VDRIVER="@comment "
. endif
.endfor
.include "${MASTERDIR}/Makefile.targets"
post-install:
@${RM} -r ${STAGEDIR}/etc/OpenCL
.include <bsd.port.post.mk>
|