View | Details | Raw Unified | Return to bug 246997 | Differences between
and this patch

Collapse All | Expand All

(-)b/graphics/mesa-dri/Makefile (-5 / +26 lines)
Lines 1-114 Link Here
1
# Created by: Eric Anholt <anholt@FreeBSD.org>
1
# Created by: Eric Anholt <anholt@FreeBSD.org>
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	mesa-dri
4
PORTNAME=	mesa-dri
5
PORTVERSION=	${MESAVERSION}
5
PORTVERSION=	${MESAVERSION}
6
PORTREVISION=	2
6
PORTREVISION=	2
7
CATEGORIES=	graphics
7
CATEGORIES=	graphics
8
8
9
COMMENT=	OpenGL hardware acceleration drivers for DRI2+
9
COMMENT=	OpenGL hardware acceleration drivers for DRI2+
10
10
11
USES=		xorg
11
USES=		xorg
12
USE_XORG=	xorgproto x11 xdamage xext xfixes xshmfence xv xvmc
12
USE_XORG=	xorgproto x11 xdamage xext xfixes xshmfence xv xvmc
13
13
14
OPTIONS_GROUP=			PLATFORM
15
OPTIONS_GROUP_PLATFORM=		PLATFORM_X11 PLATFORM_WAYLAND PLATFORM_DRM PLATFORM_SURFACELESS
16
PLATFORM_X11_DESC=		Enable X11 support for GBM/EGL
17
PLATFORM_WAYLAND_DESC=		Enable Wayland support for GBM/EGL
18
PLATFORM_DRM_DESC=		Enable DRM support for GBM/EGL
19
PLATFORM_SURFACELESS_DESC=	Enable Surfaceless support for GBM/EGL
20
PLATFORM_WAYLAND_IMPLIES=	WAYLAND
21
14
OPTIONS_DEFINE=	VAAPI VDPAU WAYLAND
22
OPTIONS_DEFINE=	VAAPI VDPAU WAYLAND
15
OPTIONS_DEFAULT=WAYLAND
23
OPTIONS_DEFAULT=WAYLAND PLATFORM_X11 PLATFORM_WAYLAND PLATFORM_DRM PLATFORM_SURFACELESS
16
OPTIONS_SUB=	yes
24
OPTIONS_SUB=	yes
17
25
18
VAAPI_MESON_ON=		-Dgallium-va=true
26
VAAPI_MESON_ON=		-Dgallium-va=true
19
VAAPI_LIB_DEPENDS=	libva.so:multimedia/libva
27
VAAPI_LIB_DEPENDS=	libva.so:multimedia/libva
20
VAAPI_USE=		XORG=xcb
28
VAAPI_USE=		XORG=xcb
21
29
22
VDPAU_MESON_ON=		-Dgallium-vdpau=true
30
VDPAU_MESON_ON=		-Dgallium-vdpau=true
23
VDPAU_LIB_DEPENDS=	libvdpau.so:multimedia/libvdpau
31
VDPAU_LIB_DEPENDS=	libvdpau.so:multimedia/libvdpau
24
32
25
WAYLAND_DESC=		Enable support for the Wayland platform in Vulkan drivers
33
WAYLAND_DESC=		Enable support for the Wayland platform in Vulkan drivers
26
WAYLAND_BUILD_DEPENDS=	wayland-protocols>=1.8:graphics/wayland-protocols
34
WAYLAND_BUILD_DEPENDS=	wayland-protocols>=1.8:graphics/wayland-protocols
27
WAYLAND_LIB_DEPENDS=	libwayland-client.so:graphics/wayland
35
WAYLAND_LIB_DEPENDS=	libwayland-client.so:graphics/wayland
36
WAYLAND_IMPLIES=	PLATFORM_WAYLAND
28
37
29
.include <bsd.port.options.mk>
38
.include <bsd.port.options.mk>
30
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
39
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
31
40
32
ALL_DRI_DRIVERS=	I915 I965 R100 R200 SWRAST
41
ALL_DRI_DRIVERS=	I915 I965 R100 R200 SWRAST
33
ALL_GALLIUM_DRIVERS=	R300 R600 RADEONSI SVGA SWRAST
42
ALL_GALLIUM_DRIVERS=	R300 R600 RADEONSI SVGA SWRAST
34
ALL_VULKAN_DRIVERS=	INTEL AMD
43
ALL_VULKAN_DRIVERS=	INTEL AMD
35
44
36
.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH:Marm*} || ${ARCH} == i386 || ${ARCH:Mmips*} || ${ARCH:Mpowerpc*}
45
.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH:Marm*} || ${ARCH} == i386 || ${ARCH:Mmips*} || ${ARCH:Mpowerpc*}
37
GALLIUM_DRIVERS=	SWRAST	# llvmpipe
46
GALLIUM_DRIVERS=	SWRAST	# llvmpipe
38
.else
47
.else
39
GALLIUM_DRIVERS=	""
48
GALLIUM_DRIVERS=	""
40
.endif
49
.endif
41
VULKAN_DRIVERS=		#
50
VULKAN_DRIVERS=		#
42
51
43
.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH} == i386 \
52
.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH} == i386 \
44
 || ${ARCH} == powerpc || ${ARCH} == powerpc64
53
 || ${ARCH} == powerpc || ${ARCH} == powerpc64
45
DRI_DRIVERS+=		R100 R200
54
DRI_DRIVERS+=		R100 R200
46
GALLIUM_DRIVERS+=	R300 R600 RADEONSI
55
GALLIUM_DRIVERS+=	R300 R600 RADEONSI
47
VULKAN_DRIVERS+=	AMD
56
VULKAN_DRIVERS+=	AMD
48
MESON_ARGS+=		-Dgallium-xvmc=true
57
MESON_ARGS+=		-Dgallium-xvmc=true
49
.endif
58
.endif
50
.if ${ARCH} == amd64 || ${ARCH} == i386
59
.if ${ARCH} == amd64 || ${ARCH} == i386
51
DRI_DRIVERS+=		I915 I965
60
DRI_DRIVERS+=		I915 I965
52
GALLIUM_DRIVERS+=	SVGA
61
GALLIUM_DRIVERS+=	SVGA
53
. if ${OPSYS} == FreeBSD
62
. if ${OPSYS} == FreeBSD
54
EXTRA_PATCHES+=	${PATCHDIR}/extra-src_mesa_drivers_dri_i965_intel__screen.c
63
EXTRA_PATCHES+=	${PATCHDIR}/extra-src_mesa_drivers_dri_i965_intel__screen.c
55
. endif
64
. endif
56
VULKAN_DRIVERS+=	INTEL
65
VULKAN_DRIVERS+=	INTEL
57
.endif
66
.endif
58
67
59
.if ${VULKAN_DRIVERS}
68
.if ${VULKAN_DRIVERS}
60
BUILD_DEPENDS+=		${PYTHON_PKGNAMEPREFIX}mako>0:textproc/py-mako@${PY_FLAVOR}
69
BUILD_DEPENDS+=		${PYTHON_PKGNAMEPREFIX}mako>0:textproc/py-mako@${PY_FLAVOR}
61
USE_XORG+=		xcb xrandr
70
USE_XORG+=		xcb xrandr
62
.endif
71
.endif
63
72
64
LDFLAGS_i386=		-Wl,-znotext
73
LDFLAGS_i386=		-Wl,-znotext
65
74
66
# enables VK_KHR_wayland_surface in Vulkan drivers
75
.if ${PORT_OPTIONS:MPLATFORM_X11}
67
.if ${PORT_OPTIONS:MWAYLAND} && !empty(VULKAN_DRIVERS)
76
MESA_PLATFORMS+=	x11
68
MESON_ARGS+=	-Dplatforms=x11,surfaceless,drm,wayland
77
.endif
78
79
.if ${PORT_OPTIONS:MPLATFORM_DRM}
80
MESA_PLATFORMS+=	drm
69
.endif
81
.endif
70
82
83
.if ${PORT_OPTIONS:MPLATFORM_SURFACELESS}
84
MESA_PLATFORMS+=	surfaceless
85
.endif
86
87
# .if ${PORT_OPTIONS:MPLATFORM_WAYLAND} && !${PORT_OPTIONS:MWAYLAND}
88
# .error "Platform Wayland is selected but Wayland support is disabled"
89
# .endif
90
71
MESON_ARGS+=	-Ddri-drivers="${DRI_DRIVERS:ts,:tl}" \
91
MESON_ARGS+=	-Ddri-drivers="${DRI_DRIVERS:ts,:tl}" \
72
			-Dgallium-drivers="${GALLIUM_DRIVERS:ts,:tl}" \
92
			-Dgallium-drivers="${GALLIUM_DRIVERS:ts,:tl}" \
73
			-Dvulkan-drivers="${VULKAN_DRIVERS:ts,:tl}"
93
			-Dvulkan-drivers="${VULKAN_DRIVERS:ts,:tl}" \
94
			-Dplatforms="${MESA_PLATFORMS:ts,:tl}"
74
95
75
# Disable some options
96
# Disable some options
76
MESON_ARGS+=	-Dgallium-xa=false \
97
MESON_ARGS+=	-Dgallium-xa=false \
77
		-Dgles1=false \
98
		-Dgles1=false \
78
		-Dgles2=false \
99
		-Dgles2=false \
79
		-Dglx=disabled \
100
		-Dglx=disabled \
80
		-Degl=false \
101
		-Degl=false \
81
		-Dosmesa=none \
102
		-Dosmesa=none \
82
		-Dtools=""
103
		-Dtools=""
83
104
84
.for _d in ${ALL_DRI_DRIVERS}
105
.for _d in ${ALL_DRI_DRIVERS}
85
. if ${DRI_DRIVERS:M${_d}}
106
. if ${DRI_DRIVERS:M${_d}}
86
PLIST_SUB+=	${_d}_DRIVER=""
107
PLIST_SUB+=	${_d}_DRIVER=""
87
. else
108
. else
88
PLIST_SUB+=	${_d}_DRIVER="@comment "
109
PLIST_SUB+=	${_d}_DRIVER="@comment "
89
. endif
110
. endif
90
.endfor
111
.endfor
91
112
92
.for _gd in ${ALL_GALLIUM_DRIVERS}
113
.for _gd in ${ALL_GALLIUM_DRIVERS}
93
. if ${GALLIUM_DRIVERS:M${_gd}}
114
. if ${GALLIUM_DRIVERS:M${_gd}}
94
PLIST_SUB+=	${_gd}_GDRIVER=""
115
PLIST_SUB+=	${_gd}_GDRIVER=""
95
. else
116
. else
96
PLIST_SUB+=	${_gd}_GDRIVER="@comment "
117
PLIST_SUB+=	${_gd}_GDRIVER="@comment "
97
. endif
118
. endif
98
.endfor
119
.endfor
99
120
100
PLIST_SUB += ARCH=${ARCH:S/amd/x86_/}
121
PLIST_SUB += ARCH=${ARCH:S/amd/x86_/}
101
.for _vd in ${ALL_VULKAN_DRIVERS}
122
.for _vd in ${ALL_VULKAN_DRIVERS}
102
. if ${VULKAN_DRIVERS:M${_vd}}
123
. if ${VULKAN_DRIVERS:M${_vd}}
103
PLIST_SUB+=	${_vd}_VDRIVER=""
124
PLIST_SUB+=	${_vd}_VDRIVER=""
104
. else
125
. else
105
PLIST_SUB+=	${_vd}_VDRIVER="@comment "
126
PLIST_SUB+=	${_vd}_VDRIVER="@comment "
106
. endif
127
. endif
107
.endfor
128
.endfor
108
129
109
.include "${MASTERDIR}/Makefile.targets"
130
.include "${MASTERDIR}/Makefile.targets"
110
131
111
post-install:
132
post-install:
112
	@${RM} -r ${STAGEDIR}/etc/OpenCL
133
	@${RM} -r ${STAGEDIR}/etc/OpenCL
113
134
114
.include <bsd.port.post.mk>
135
.include <bsd.port.post.mk>
(-)b/graphics/mesa-libs/Makefile (-4 / +26 lines)
Lines 1-56 Link Here
1
# Created by: Eric Anholt <anholt@FreeBSD.org>
1
# Created by: Eric Anholt <anholt@FreeBSD.org>
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	mesa-libs
4
PORTNAME=	mesa-libs
5
PORTVERSION=	${MESAVERSION}
5
PORTVERSION=	${MESAVERSION}
6
CATEGORIES=	graphics
6
CATEGORIES=	graphics
7
7
8
COMMENT=	OpenGL libraries that support GLX and EGL clients
8
COMMENT=	OpenGL libraries that support GLX and EGL clients
9
9
10
CONFLICTS_INSTALL=	libglvnd # include/GL/gl.h
10
CONFLICTS_INSTALL=	libglvnd # include/GL/gl.h
11
11
12
USES=		xorg
12
USES=		xorg
13
USE_XORG=	xorgproto x11 xcb xdamage xext \
13
USE_XORG=	xorgproto x11 xcb xdamage xext \
14
		xfixes xshmfence xxf86vm xrandr
14
		xfixes xshmfence xxf86vm xrandr
15
15
16
OPTIONS_GROUP=			PLATFORM
17
OPTIONS_GROUP_PLATFORM=		PLATFORM_X11 PLATFORM_WAYLAND PLATFORM_DRM PLATFORM_SURFACELESS
18
PLATFORM_X11_DESC=		Enable X11 support for GBM/EGL
19
PLATFORM_WAYLAND_DESC=		Enable Wayland support for GBM/EGL
20
PLATFORM_DRM_DESC=		Enable DRM support for GBM/EGL
21
PLATFORM_SURFACELESS_DESC=	Enable Surfaceless support for GBM/EGL
22
PLATFORM_WAYLAND_IMPLIES=	WAYLAND
23
16
OPTIONS_DEFINE=	WAYLAND
24
OPTIONS_DEFINE=	WAYLAND
17
OPTIONS_DEFAULT=WAYLAND
25
OPTIONS_DEFAULT=WAYLAND PLATFORM_X11 PLATFORM_WAYLAND PLATFORM_DRM PLATFORM_SURFACELESS
18
OPTIONS_SUB=	yes
26
OPTIONS_SUB=	yes
19
27
20
WAYLAND_DESC=		Enable support for the Wayland platform in EGL
28
WAYLAND_DESC=		Enable support for the Wayland platform in EGL
21
WAYLAND_BUILD_DEPENDS=	wayland-protocols>=1.8:graphics/wayland-protocols
29
WAYLAND_BUILD_DEPENDS=	wayland-protocols>=1.8:graphics/wayland-protocols
22
WAYLAND_LIB_DEPENDS=	libwayland-egl.so:graphics/wayland
30
WAYLAND_LIB_DEPENDS=	libwayland-egl.so:graphics/wayland
31
WAYLAND_IMPLIES=	PLATFORM_WAYLAND
23
32
24
.include <bsd.port.options.mk>
33
.include <bsd.port.options.mk>
25
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
34
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
26
35
27
MESON_ARGS+=	-Dgallium-drivers="" \
36
MESON_ARGS+=	-Dgallium-drivers="" \
28
		-Dgallium-vdpau=false \
37
		-Dgallium-vdpau=false \
29
		-Dgallium-xvmc=false \
38
		-Dgallium-xvmc=false \
30
		-Dgallium-omx=disabled \
39
		-Dgallium-omx=disabled \
31
		-Dgallium-va=false \
40
		-Dgallium-va=false \
32
		-Dgallium-xa=false \
41
		-Dgallium-xa=false \
33
		-Dgallium-nine=false \
42
		-Dgallium-nine=false \
34
		-Dgallium-clover=disabled \
43
		-Dgallium-clover=disabled \
35
		-Dosmesa=none \
44
		-Dosmesa=none \
36
		-Dtools="" \
45
		-Dtools="" \
37
		-Degl=true \
46
		-Degl=true \
38
		-Dgbm=true \
47
		-Dgbm=true \
39
		-Dvulkan-drivers=""
48
		-Dvulkan-drivers=""
40
# Building EGL and GBM requires a dri driver so add swrast
49
# Building EGL and GBM requires a dri driver so add swrast
41
MESON_ARGS+=	-Ddri-drivers="swrast"
50
MESON_ARGS+=	-Ddri-drivers="swrast"
42
51
43
.if ${PORT_OPTIONS:MWAYLAND}
52
.if ${PORT_OPTIONS:MPLATFORM_X11}
44
MESON_ARGS+=	-Dplatforms=x11,surfaceless,drm,wayland
53
MESA_PLATFORMS+=	x11
54
.endif
55
56
.if ${PORT_OPTIONS:MPLATFORM_WAYLAND} && ${PORT_OPTIONS:MWAYLAND}
57
MESA_PLATFORMS+=	wayland
58
.endif
59
60
.if ${PORT_OPTIONS:MPLATFORM_DRM}
61
MESA_PLATFORMS+=	drm
62
.endif
63
64
.if ${PORT_OPTIONS:MPLATFORM_SURFACELESS}
65
MESA_PLATFORMS+=	surfaceless
45
.endif
66
.endif
46
67
68
MESON_ARGS+=	-Dplatforms="${MESA_PLATFORMS:ts,:tl}"
69
47
.if ${ARCH} == "i386"
70
.if ${ARCH} == "i386"
48
# PR230239 Fix the build for i386 when WITH_LLD_IS_LD is set
71
# PR230239 Fix the build for i386 when WITH_LLD_IS_LD is set
49
LDFLAGS+=-Wl,-z,notext
72
LDFLAGS+=-Wl,-z,notext
50
.elif ${ARCH} == "powerpc"
73
.elif ${ARCH} == "powerpc"
51
USE_GCC=	yes
74
USE_GCC=	yes
52
.endif
75
.endif
53
76
54
.include "${MASTERDIR}/Makefile.targets"
77
.include "${MASTERDIR}/Makefile.targets"
55
78
56
.include <bsd.port.post.mk>
79
.include <bsd.port.post.mk>
57
- 

Return to bug 246997