summaryrefslogtreecommitdiff
path: root/graphics/mesa/Makefile
blob: 6066ea0de211922a902b6070119d310290b230f3 (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
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
# $OpenBSD: Makefile.template,v 1.83 2019/07/02 12:03:14 sthen Exp $

#ONLY_FOR_ARCHS =	???
#NOT_FOR_ARCHS =	???

COMMENT =	the Mesa 3D Graphics Library 

DISTNAME =	mesa-19.2.8

SHARED_LIBS =	EGL 1.1 gbm 0.4 glapi 0.2 GL 17.1 GLESv1_CM 2.0 GLESv2 2.0 \
                OSMesa 11.0

CATEGORIES =	graphics

HOMEPAGE =	https://mesa3d.org/

MAINTAINER =	xenocara@openbsd.org

# MIT
PERMIT_PACKAGE =	Yes

WANTLIB =		drm m pthread z expat Xau xcb X11-xcb X11 \
			xcb-dri3 xcb-xfixes xcb-present xcb-sync \
			xshmfence Xext Xdamage Xfixes xcb-glx xcb-dri2 \
			Xxf86vm c++ c++abi LLVM elf xcb-randr drm_amdgpu

MASTER_SITES =		https://mesa.freedesktop.org/archive/
EXTRACT_SUFX =		.tar.xz

BUILD_DEPENDS =		sysutils/libdrm \
			devel/xorgproto \
			www/py-mako

LIB_DEPENDS =		sysutils/libdrm \
			x11/libX11 \
			x11/libxcb \
			x11/libXext \
			x11/libXdamage \
			x11/libXfixes \
			x11/libXxf86vm \
			x11/libxshmfence

#TEST_DEPENDS =		???

SEPARATE_BUILD =	Yes 
USE_GMAKE =		Yes
CONFIGURE_STYLE =	autoreconf

DRI_DRIVERS=            swrast
GALLIUM_DRIVERS=        swrast
VULKAN_DRIVERS=         no
WITH_LLVM=              --disable-llvm

.if ${MACHINE} == i386 || ${MACHINE} == amd64
DRI_DRIVERS=swrast,radeon,r200,i915,i965
GALLIUM_DRIVERS=swrast,r300,r600,radeonsi
VULKAN_DRIVERS=         intel,radeon
WITH_LLVM=              --enable-llvm
.endif

.if ${MACHINE} == arm64 || ${MACHINE} == loongson || \
    ${MACHINE} == macppc || ${MACHINE} == sparc64
DRI_DRIVERS=swrast,radeon,r200
GALLIUM_DRIVERS=swrast,r300,r600
.endif

CONFIGURE_ARGS=         --with-dri-drivers=${DRI_DRIVERS} \
                        --with-gallium-drivers=${GALLIUM_DRIVERS} \
                        --with-vulkan-drivers=${VULKAN_DRIVERS} \
                        --disable-silent-rules \
                        ${WITH_LLVM} \
                        --disable-glx-tls \
                        --disable-regen-sources \
                        --enable-gles1 --enable-gles2 \
                        --enable-shared-glapi \
                        --enable-osmesa \
                        --enable-gbm \
                        --enable-texture-float \
                        --enable-autotools \
                        --with-platforms="x11,drm" \
                        --prefix=${LOCALBASE} \
                        --with-dri-driverdir=${LOCALBASE}/lib/modules/dri \
                        --with-dri-searchpath=${LOCALBASE}/lib/modules/dri

CONFIGURE_ARGS+=        --enable-dri3

AUTOCONF_VERSION =	2.69
AUTOMAKE_VERSION =	1.12

#NO_TEST =		Yes

.include <bsd.port.mk>