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

Collapse All | Expand All

(-)b/graphics/mesa-dri/Makefile (-5 / +25 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
28
36
29
.include <bsd.port.options.mk>
37
.include <bsd.port.options.mk>
30
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
38
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
31
39
32
ALL_DRI_DRIVERS=	I915 I965 R100 R200 SWRAST
40
ALL_DRI_DRIVERS=	I915 I965 R100 R200 SWRAST
33
ALL_GALLIUM_DRIVERS=	R300 R600 RADEONSI SVGA SWRAST
41
ALL_GALLIUM_DRIVERS=	R300 R600 RADEONSI SVGA SWRAST
34
ALL_VULKAN_DRIVERS=	INTEL AMD
42
ALL_VULKAN_DRIVERS=	INTEL AMD
35
43
36
.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH:Marm*} || ${ARCH} == i386 || ${ARCH:Mmips*} || ${ARCH:Mpowerpc*}
44
.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH:Marm*} || ${ARCH} == i386 || ${ARCH:Mmips*} || ${ARCH:Mpowerpc*}
37
GALLIUM_DRIVERS=	SWRAST	# llvmpipe
45
GALLIUM_DRIVERS=	SWRAST	# llvmpipe
38
.else
46
.else
39
GALLIUM_DRIVERS=	""
47
GALLIUM_DRIVERS=	""
40
.endif
48
.endif
41
VULKAN_DRIVERS=		#
49
VULKAN_DRIVERS=		#
42
50
43
.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH} == i386 \
51
.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH} == i386 \
44
 || ${ARCH} == powerpc || ${ARCH} == powerpc64
52
 || ${ARCH} == powerpc || ${ARCH} == powerpc64
45
DRI_DRIVERS+=		R100 R200
53
DRI_DRIVERS+=		R100 R200
46
GALLIUM_DRIVERS+=	R300 R600 RADEONSI
54
GALLIUM_DRIVERS+=	R300 R600 RADEONSI
47
VULKAN_DRIVERS+=	AMD
55
VULKAN_DRIVERS+=	AMD
48
MESON_ARGS+=		-Dgallium-xvmc=true
56
MESON_ARGS+=		-Dgallium-xvmc=true
49
.endif
57
.endif
50
.if ${ARCH} == amd64 || ${ARCH} == i386
58
.if ${ARCH} == amd64 || ${ARCH} == i386
51
DRI_DRIVERS+=		I915 I965
59
DRI_DRIVERS+=		I915 I965
52
GALLIUM_DRIVERS+=	SVGA
60
GALLIUM_DRIVERS+=	SVGA
53
. if ${OPSYS} == FreeBSD
61
. if ${OPSYS} == FreeBSD
54
EXTRA_PATCHES+=	${PATCHDIR}/extra-src_mesa_drivers_dri_i965_intel__screen.c
62
EXTRA_PATCHES+=	${PATCHDIR}/extra-src_mesa_drivers_dri_i965_intel__screen.c
55
. endif
63
. endif
56
VULKAN_DRIVERS+=	INTEL
64
VULKAN_DRIVERS+=	INTEL
57
.endif
65
.endif
58
66
59
.if ${VULKAN_DRIVERS}
67
.if ${VULKAN_DRIVERS}
60
BUILD_DEPENDS+=		${PYTHON_PKGNAMEPREFIX}mako>0:textproc/py-mako@${PY_FLAVOR}
68
BUILD_DEPENDS+=		${PYTHON_PKGNAMEPREFIX}mako>0:textproc/py-mako@${PY_FLAVOR}
61
USE_XORG+=		xcb xrandr
69
USE_XORG+=		xcb xrandr
62
.endif
70
.endif
63
71
64
LDFLAGS_i386=		-Wl,-znotext
72
LDFLAGS_i386=		-Wl,-znotext
65
73
66
# enables VK_KHR_wayland_surface in Vulkan drivers
74
.if ${PORT_OPTIONS:MPLATFORM_X11}
67
.if ${PORT_OPTIONS:MWAYLAND} && !empty(VULKAN_DRIVERS)
75
MESA_PLATFORMS+=	x11
68
MESON_ARGS+=	-Dplatforms=x11,surfaceless,drm,wayland
76
.endif
77
78
.if ${PORT_OPTIONS:MPLATFORM_DRM}
79
MESA_PLATFORMS+=	drm
69
.endif
80
.endif
70
81
82
.if ${PORT_OPTIONS:MPLATFORM_SURFACELESS}
83
MESA_PLATFORMS+=	surfaceless
84
.endif
85
86
# .if ${PORT_OPTIONS:MPLATFORM_WAYLAND} && !${PORT_OPTIONS:MWAYLAND}
87
# .error "Platform Wayland is selected but Wayland support is disabled"
88
# .endif
89
71
MESON_ARGS+=	-Ddri-drivers="${DRI_DRIVERS:ts,:tl}" \
90
MESON_ARGS+=	-Ddri-drivers="${DRI_DRIVERS:ts,:tl}" \
72
			-Dgallium-drivers="${GALLIUM_DRIVERS:ts,:tl}" \
91
			-Dgallium-drivers="${GALLIUM_DRIVERS:ts,:tl}" \
73
			-Dvulkan-drivers="${VULKAN_DRIVERS:ts,:tl}"
92
			-Dvulkan-drivers="${VULKAN_DRIVERS:ts,:tl}" \
93
			-Dplatforms="${MESA_PLATFORMS:ts,:tl}"
74
94
75
# Disable some options
95
# Disable some options
76
MESON_ARGS+=	-Dgallium-xa=false \
96
MESON_ARGS+=	-Dgallium-xa=false \
77
		-Dgles1=false \
97
		-Dgles1=false \
78
		-Dgles2=false \
98
		-Dgles2=false \
79
		-Dglx=disabled \
99
		-Dglx=disabled \
80
		-Degl=false \
100
		-Degl=false \
81
		-Dosmesa=none \
101
		-Dosmesa=none \
82
		-Dtools=""
102
		-Dtools=""
83
103
84
.for _d in ${ALL_DRI_DRIVERS}
104
.for _d in ${ALL_DRI_DRIVERS}
85
. if ${DRI_DRIVERS:M${_d}}
105
. if ${DRI_DRIVERS:M${_d}}
86
PLIST_SUB+=	${_d}_DRIVER=""
106
PLIST_SUB+=	${_d}_DRIVER=""
87
. else
107
. else
88
PLIST_SUB+=	${_d}_DRIVER="@comment "
108
PLIST_SUB+=	${_d}_DRIVER="@comment "
89
. endif
109
. endif
90
.endfor
110
.endfor
91
111
92
.for _gd in ${ALL_GALLIUM_DRIVERS}
112
.for _gd in ${ALL_GALLIUM_DRIVERS}
93
. if ${GALLIUM_DRIVERS:M${_gd}}
113
. if ${GALLIUM_DRIVERS:M${_gd}}
94
PLIST_SUB+=	${_gd}_GDRIVER=""
114
PLIST_SUB+=	${_gd}_GDRIVER=""
95
. else
115
. else
96
PLIST_SUB+=	${_gd}_GDRIVER="@comment "
116
PLIST_SUB+=	${_gd}_GDRIVER="@comment "
97
. endif
117
. endif
98
.endfor
118
.endfor
99
119
100
PLIST_SUB += ARCH=${ARCH:S/amd/x86_/}
120
PLIST_SUB += ARCH=${ARCH:S/amd/x86_/}
101
.for _vd in ${ALL_VULKAN_DRIVERS}
121
.for _vd in ${ALL_VULKAN_DRIVERS}
102
. if ${VULKAN_DRIVERS:M${_vd}}
122
. if ${VULKAN_DRIVERS:M${_vd}}
103
PLIST_SUB+=	${_vd}_VDRIVER=""
123
PLIST_SUB+=	${_vd}_VDRIVER=""
104
. else
124
. else
105
PLIST_SUB+=	${_vd}_VDRIVER="@comment "
125
PLIST_SUB+=	${_vd}_VDRIVER="@comment "
106
. endif
126
. endif
107
.endfor
127
.endfor
108
128
109
.include "${MASTERDIR}/Makefile.targets"
129
.include "${MASTERDIR}/Makefile.targets"
110
130
111
post-install:
131
post-install:
112
	@${RM} -r ${STAGEDIR}/etc/OpenCL
132
	@${RM} -r ${STAGEDIR}/etc/OpenCL
113
133
114
.include <bsd.port.post.mk>
134
.include <bsd.port.post.mk>
(-)b/graphics/mesa-libs/Makefile (-4 / +25 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
23
31
24
.include <bsd.port.options.mk>
32
.include <bsd.port.options.mk>
25
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
33
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
26
34
27
MESON_ARGS+=	-Dgallium-drivers="" \
35
MESON_ARGS+=	-Dgallium-drivers="" \
28
		-Dgallium-vdpau=false \
36
		-Dgallium-vdpau=false \
29
		-Dgallium-xvmc=false \
37
		-Dgallium-xvmc=false \
30
		-Dgallium-omx=disabled \
38
		-Dgallium-omx=disabled \
31
		-Dgallium-va=false \
39
		-Dgallium-va=false \
32
		-Dgallium-xa=false \
40
		-Dgallium-xa=false \
33
		-Dgallium-nine=false \
41
		-Dgallium-nine=false \
34
		-Dgallium-clover=disabled \
42
		-Dgallium-clover=disabled \
35
		-Dosmesa=none \
43
		-Dosmesa=none \
36
		-Dtools="" \
44
		-Dtools="" \
37
		-Degl=true \
45
		-Degl=true \
38
		-Dgbm=true \
46
		-Dgbm=true \
39
		-Dvulkan-drivers=""
47
		-Dvulkan-drivers=""
40
# Building EGL and GBM requires a dri driver so add swrast
48
# Building EGL and GBM requires a dri driver so add swrast
41
MESON_ARGS+=	-Ddri-drivers="swrast"
49
MESON_ARGS+=	-Ddri-drivers="swrast"
42
50
43
.if ${PORT_OPTIONS:MWAYLAND}
51
.if ${PORT_OPTIONS:MPLATFORM_X11}
44
MESON_ARGS+=	-Dplatforms=x11,surfaceless,drm,wayland
52
MESA_PLATFORMS+=	x11
53
.endif
54
55
.if ${PORT_OPTIONS:MPLATFORM_WAYLAND} && ${PORT_OPTIONS:MWAYLAND}
56
MESA_PLATFORMS+=	wayland
57
.endif
58
59
.if ${PORT_OPTIONS:MPLATFORM_DRM}
60
MESA_PLATFORMS+=	drm
61
.endif
62
63
.if ${PORT_OPTIONS:MPLATFORM_SURFACELESS}
64
MESA_PLATFORMS+=	surfaceless
45
.endif
65
.endif
46
66
67
MESON_ARGS+=	-Dplatforms="${MESA_PLATFORMS:ts,:tl}"
68
47
.if ${ARCH} == "i386"
69
.if ${ARCH} == "i386"
48
# PR230239 Fix the build for i386 when WITH_LLD_IS_LD is set
70
# PR230239 Fix the build for i386 when WITH_LLD_IS_LD is set
49
LDFLAGS+=-Wl,-z,notext
71
LDFLAGS+=-Wl,-z,notext
50
.elif ${ARCH} == "powerpc"
72
.elif ${ARCH} == "powerpc"
51
USE_GCC=	yes
73
USE_GCC=	yes
52
.endif
74
.endif
53
75
54
.include "${MASTERDIR}/Makefile.targets"
76
.include "${MASTERDIR}/Makefile.targets"
55
77
56
.include <bsd.port.post.mk>
78
.include <bsd.port.post.mk>
57
- 

Return to bug 246997