Lines 4-24
Link Here
|
4 |
# |
4 |
# |
5 |
# Remember to upgrade the following ports everytime you bump MESAVERSION: |
5 |
# Remember to upgrade the following ports everytime you bump MESAVERSION: |
6 |
# |
6 |
# |
7 |
# - graphics/dri |
|
|
8 |
# - graphics/gbm |
9 |
# - graphics/libEGL |
10 |
# - graphics/libGL |
11 |
# - graphics/libglapi |
12 |
# - graphics/libglesv2 |
13 |
# - graphics/libosmesa |
7 |
# - graphics/libosmesa |
|
|
8 |
# - graphics/mesa-dri |
9 |
# - graphics/mesa-libs |
14 |
# - lang/clover |
10 |
# - lang/clover |
15 |
# |
11 |
# |
16 |
# $FreeBSD: head/graphics/libGL/Makefile.common 438198 2017-04-10 19:14:48Z rezny $ |
12 |
# $FreeBSD: head/graphics/mesa-libs/Makefile.common 438198 2017-04-10 19:14:48Z rezny $ |
17 |
|
13 |
|
18 |
MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/} |
14 |
MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/} |
19 |
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/} |
15 |
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/} |
20 |
|
16 |
|
21 |
MESABASEVERSION= 17.0.3 |
17 |
MESABASEVERSION= 17.0.4 |
22 |
# if there is a subversion, don't include the '-' between 7.11-rc2. |
18 |
# if there is a subversion, don't include the '-' between 7.11-rc2. |
23 |
MESASUBVERSION= |
19 |
MESASUBVERSION= |
24 |
|
20 |
|
Lines 31-38
Link Here
|
31 |
|
27 |
|
32 |
MAINTAINER= x11@FreeBSD.org |
28 |
MAINTAINER= x11@FreeBSD.org |
33 |
|
29 |
|
34 |
BUILD_DEPENDS+= makedepend:devel/makedepend |
|
|
35 |
|
36 |
USES+= compiler:c++11-lib bison gettext-tools gmake libtool \ |
30 |
USES+= compiler:c++11-lib bison gettext-tools gmake libtool \ |
37 |
localbase pathfix pkgconfig python:2,build shebangfix tar:xz |
31 |
localbase pathfix pkgconfig python:2,build shebangfix tar:xz |
38 |
USE_LDCONFIG= yes |
32 |
USE_LDCONFIG= yes |
Lines 42-59
Link Here
|
42 |
PKGDEINSTALL= ${.CURDIR}/pkg-deinstall |
36 |
PKGDEINSTALL= ${.CURDIR}/pkg-deinstall |
43 |
|
37 |
|
44 |
# only have one port to check with portscout. |
38 |
# only have one port to check with portscout. |
45 |
.if ${PORTNAME} != libGL |
39 |
.if ${PORTNAME} != mesa-dri |
46 |
PORTSCOUT= ignore:1 |
40 |
PORTSCOUT= ignore:1 |
47 |
.endif |
41 |
.endif |
48 |
|
42 |
|
49 |
python_OLD_CMD= "/usr/bin/env[[:space:]]python" |
43 |
python_OLD_CMD= /usr/bin/env[[:space:]]python2 /usr/bin/python2 /bin/env[[:space:]]python |
50 |
python_CMD= ${LOCALBASE}/bin/python2 |
|
|
51 |
SHEBANG_FILES= src/gallium/*/*/*.py src/gallium/tools/trace/*.py \ |
44 |
SHEBANG_FILES= src/gallium/*/*/*.py src/gallium/tools/trace/*.py \ |
52 |
src/gallium/drivers/svga/svgadump/svga_dump.py \ |
45 |
src/gallium/drivers/svga/svgadump/svga_dump.py \ |
53 |
src/mapi/glapi/gen/*.py |
46 |
src/gallium/drivers/freedreno/ir3/ir3_nir_trig.py \ |
54 |
SHEBANG_FILES+= src/mapi/mapi_abi.py |
47 |
src/mapi/glapi/gen/*.py src/mapi/mapi_abi.py \ |
|
|
48 |
src/mesa/drivers/dri/common/xmlpool/gen_xmlpool.py \ |
49 |
src/mesa/main/get_*.py src/util/format_srgb.py \ |
50 |
src/amd/*/*.py src/intel/genxml/gen_pack_header.py |
55 |
|
51 |
|
56 |
MASTERDIR= ${.CURDIR}/../../graphics/libGL |
52 |
MASTERDIR= ${.CURDIR}/../../graphics/mesa-dri |
57 |
PATCHDIR= ${MASTERDIR}/files |
53 |
PATCHDIR= ${MASTERDIR}/files |
58 |
WRKSRC= ${WRKDIR}/mesa-${MESADISTVERSION} |
54 |
WRKSRC= ${WRKDIR}/mesa-${MESADISTVERSION} |
59 |
DESCR= ${.CURDIR}/pkg-descr |
55 |
DESCR= ${.CURDIR}/pkg-descr |
Lines 64-70
Link Here
|
64 |
|
60 |
|
65 |
.if (${ARCH} != sparc64 && ${ARCH} != ia64) # no working LLVM |
61 |
.if (${ARCH} != sparc64 && ${ARCH} != ia64) # no working LLVM |
66 |
MESA_LLVM_VER?= 40 |
62 |
MESA_LLVM_VER?= 40 |
|
|
63 |
.endif |
64 |
|
65 |
.if ${MESA_LLVM_VER} != "" |
66 |
BUILD_DEPENDS+= llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER} |
67 |
RUN_DEPENDS+= llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER} |
68 |
CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${MESA_LLVM_VER} |
67 |
LDFLAGS+= -Wl,-rpath=${LOCALBASE}/llvm${MESA_LLVM_VER}/lib |
69 |
LDFLAGS+= -Wl,-rpath=${LOCALBASE}/llvm${MESA_LLVM_VER}/lib |
|
|
70 |
# The gallium-llvm switch is the global llvm switch for historical reasons |
71 |
CONFIGURE_ARGS+= --enable-gallium-llvm |
72 |
.else |
73 |
CONFIGURE_ARGS+= --disable-gallium-llvm |
68 |
.endif |
74 |
.endif |
69 |
|
75 |
|
70 |
# There are issues that need to be fixed to use TLS model "initial-exec" |
76 |
# There are issues that need to be fixed to use TLS model "initial-exec" |
Lines 75-173
Link Here
|
75 |
# https://lists.freebsd.org/pipermail/freebsd-arch/2016-February/017699.html |
81 |
# https://lists.freebsd.org/pipermail/freebsd-arch/2016-February/017699.html |
76 |
CONFIGURE_ARGS+= --disable-glx-tls |
82 |
CONFIGURE_ARGS+= --disable-glx-tls |
77 |
|
83 |
|
78 |
# libEGL, dri and clover need gallium enabled. |
|
|
79 |
# the third option in --with-egl-platforms is wayland. |
80 |
.if (${MESA_LLVM_VER} != "") |
81 |
CONFIGURE_ARGS+= --enable-egl --with-egl-platforms=x11,drm |
82 |
.else |
83 |
CONFIGURE_ARGS+= --disable-egl |
84 |
.endif |
85 |
|
86 |
# we don't care about GLes v1 |
84 |
# we don't care about GLes v1 |
87 |
CONFIGURE_ARGS+= --disable-gles1 --enable-gles2 |
85 |
CONFIGURE_ARGS+= --disable-gles1 |
88 |
|
|
|
89 |
# Clover (OpenCL). |
90 |
.if ${OPSYS} == DragonFly || \ |
91 |
(${OPSYS} == FreeBSD && \ |
92 |
(${ARCH} == amd64 || ${ARCH} == i386)) |
93 |
|
94 |
BUILD_DEPENDS+= libclc>=0.2.0.20160915:devel/libclc |
95 |
|
96 |
# We need the clang port too even if it is not used to compile because |
97 |
# Clover needs some of the clang includes to build. |
98 |
.if ${COMPONENT:Mdri} != "" || ${COMPONENT:Mclover} != "" || ${COMPONENT:Mosmesa} != "" |
99 |
_USES_pre_configure+= 290:clover-pre-configure |
100 |
|
101 |
# .if !exists() evaluates too early before cairo has a chance to be installed |
102 |
clover-pre-configure: |
103 |
@if [ -e ${LOCALBASE}/bin/llvm-config${MESA_LLVM_VER} ] && \ |
104 |
! [ -e ${LOCALBASE}/bin/clang${MESA_LLVM_VER} ]; then \ |
105 |
${ECHO_MSG} "Your llvm${MESA_LLVM_VER} is not build with clang support, which is required."; \ |
106 |
${FALSE}; \ |
107 |
fi |
108 |
.endif |
109 |
|
110 |
CONFIGURE_ARGS+= --enable-opencl --enable-opencl-icd |
111 |
.else |
112 |
CONFIGURE_ARGS+= --disable-opencl |
113 |
.endif |
114 |
|
115 |
CONFIGURE_ARGS+= --enable-osmesa --enable-xvmc |
116 |
|
117 |
# gallium |
118 |
.if (${MESA_LLVM_VER} != "") |
119 |
BUILD_DEPENDS+= llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER} |
120 |
.if ${COMPONENT:Mdri} != "" || ${COMPONENT:Mclover} != "" || ${COMPONENT:Megl} != "" |
121 |
RUN_DEPENDS+= llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER} |
122 |
.endif |
123 |
|
124 |
CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${MESA_LLVM_VER} |
125 |
|
126 |
CONFIGURE_ARGS+= --enable-gallium-llvm --enable-llvm-shared-libs |
127 |
.else |
128 |
CONFIGURE_ARGS+= --disable-gallium-llvm |
129 |
.endif |
130 |
|
131 |
ALL_DRI_DRIVERS= I915 I965 RADEON R200 SWRAST |
132 |
ALL_GALLIUM_DRIVERS= R300 R600 RADEONSI SVGA SWRAST |
133 |
|
134 |
.if ${ARCH} == amd64 || ${ARCH} == i386 |
135 |
DRI_DRIVERS= I915 I965 RADEON R200 |
136 |
GALLIUM_DRIVERS= R300 R600 RADEONSI SVGA |
137 |
.endif |
138 |
|
139 |
.if ${ARCH} == powerpc || ${ARCH} == powerpc64 |
140 |
DRI_DRIVERS= RADEON R200 |
141 |
GALLIUM_DRIVERS= R300 R600 RADEONSI |
142 |
.endif |
143 |
|
144 |
# software rendering for all arches |
145 |
DRI_DRIVERS+= SWRAST |
146 |
GALLIUM_DRIVERS+= SWRAST |
147 |
|
148 |
.for _d in ${ALL_DRI_DRIVERS} |
149 |
. if ${DRI_DRIVERS:M${_d}} |
150 |
PLIST_SUB+= ${_d}_DRIVER="" |
151 |
. else |
152 |
PLIST_SUB+= ${_d}_DRIVER="@comment " |
153 |
. endif |
154 |
.endfor |
155 |
|
156 |
CONFIGURE_ARGS+=--with-dri-drivers="${DRI_DRIVERS:tl}" |
157 |
|
158 |
.for _gd in ${ALL_GALLIUM_DRIVERS} |
159 |
. if ${GALLIUM_DRIVERS:M${_gd}} |
160 |
PLIST_SUB+= ${_gd}_GDRIVER="" |
161 |
. else |
162 |
PLIST_SUB+= ${_gd}_GDRIVER="@comment " |
163 |
. endif |
164 |
.endfor |
165 |
|
166 |
.if (${MESA_LLVM_VER} != "") |
167 |
CONFIGURE_ARGS+=--with-gallium-drivers="${GALLIUM_DRIVERS:tl}" |
168 |
.endif |
169 |
|
86 |
|
170 |
.if ${OPSYS} == DragonFly |
87 |
.if ${OPSYS} == DragonFly |
171 |
LIB_DEPENDS+= libelf.so:devel/libelf |
88 |
LIB_DEPENDS+= libelf.so:devel/libelf |
172 |
.endif |
89 |
.endif |
173 |
|
90 |
|