mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-18 08:02:48 +00:00
ef2181dc7a
* OpenGL 4.5 support for RadeonSI and recent Intel * Use LLVM 4.0 by default, building with 3.9 is possible via MESA_LLVM_VER * DRI3 remains enabled at compile time, but is now disabled at runtime for stock FreeBSD. Set LIBGL_DRI3_ENABLE in the environment to enable DRI3. This extra check is added when compiling on stock FreeBSD, not DRM-next. This change was made to work around a problem in libEGL, which fails to fall back to using DRI2 when run on a system without DRI3 support. Reviewed by: jmd, mat Approved by: swills (mentor) Differential Revision: https://reviews.freebsd.org/D10250
56 lines
1.7 KiB
XML
56 lines
1.7 KiB
XML
# $FreeBSD$
|
|
#
|
|
# this file holds common targets
|
|
|
|
post-patch:
|
|
.if ${OPSYS} == FreeBSD
|
|
@${REINPLACE_CMD} -e 's|x86_64|amd64|' \
|
|
${WRKSRC}/configure
|
|
# Clang 3.4 in 10.x on i386 fails with the following error when using "GCC atomics"
|
|
#
|
|
# glsl/cache.c:613:4: error: cannot compile this atomic library call yet
|
|
# p_atomic_add(cache->size, size); note: expanded from macro 'p_atomic_add'
|
|
# define p_atomic_add(v, i) (void) __atomic_add_fetch((v), (i), __ATOMIC_ACQ_REL)
|
|
#
|
|
.if ${OSVERSION} < 1100000 && ${ARCH} == "i386"
|
|
@${REINPLACE_CMD} -e 's|-DUSE_GCC_ATOMIC_BUILTINS||' ${WRKSRC}/configure
|
|
.endif
|
|
.else # ${OPSYS} == DragonFly
|
|
# Sed on dragonfly doesn't support \< or \>
|
|
@${REINPLACE_CMD} -e 's|\\>//|[[:>:]]//|' \
|
|
${WRKSRC}/configure
|
|
.endif # ${OPSYS}
|
|
@${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' \
|
|
${WRKSRC}/src/mesa/drivers/dri/common/xmlconfig.c
|
|
@${REINPLACE_CMD} -e 's|#!/use/bin/python|#!${PYTHON_CMD}|g' \
|
|
${WRKSRC}/src/mesa/drivers/dri/common/xmlpool/gen_xmlpool.py
|
|
@${REINPLACE_CMD} -e 's|!/use/bin/python2|!${PYTHON_CMD}|g' \
|
|
${WRKSRC}/src/mesa/main/get_hash_generator.py \
|
|
${WRKSRC}/src/mapi/glapi/gen/gl_enums.py \
|
|
${WRKSRC}/src/mapi/glapi/gen/gl_table.py
|
|
|
|
pre-build: mesa-pre-build
|
|
|
|
#custom targets so we can build parts of Mesa
|
|
mesa-pre-build:
|
|
# do propper gmake target.
|
|
@cd ${WRKSRC}/src/mesa/drivers/dri/common/ && ${MAKE_CMD}
|
|
@cd ${WRKSRC}/src/loader && ${MAKE_CMD}
|
|
# libloader.la
|
|
|
|
.if defined(MESA_BUILD_WRKSRC)
|
|
do-build:
|
|
. for dir in ${MESA_BUILD_WRKSRC}
|
|
(cd ${WRKSRC}/${dir}; ${DO_MAKE_BUILD} ${ALL_TARGET};)
|
|
. endfor
|
|
.endif
|
|
|
|
.if defined(MESA_INSTALL_WRKSRC)
|
|
do-install:
|
|
. for dir in ${MESA_INSTALL_WRKSRC}
|
|
(cd ${WRKSRC}/${dir} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \
|
|
${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
|
|
. endfor
|
|
.endif
|
|
|