Update Mesa to 10.6.9.

* Unbreak build on powerpc and other !x86 archs by moving the
  --with-dri-drivers logic from dri/Makefile to the
  libGL/Makefile.common file. So the settings are applied to all mesa ports,
  this was missed in the 10.6.6 update. [1]
* Don't try to enable OpenCL support on anything other then i386 and amd64. [1]
* Move the texture-float and vdpau logic to Makefile.common even if the latter
  isn't supported yet. Keep OPTIONS_DEFINE/DEFAULT in dri/Makefile since they
  need to defined before bsd.port.options.mk is included, and they only affect
  the dri modules.
* Sed on 11 and 10 supports \< and \> however sed on 9.x and dragonfly do not,
  replace the sed keywords with some magic to get the intended results. [2]

Submitted by:		marino@ [2]
Reported and tested by:	arved@ (on ppc32)[1]
This commit is contained in:
Koop Mast 2015-10-10 21:04:44 +00:00
parent 2af7305829
commit f28b16021b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=399021
5 changed files with 56 additions and 52 deletions

View File

@ -25,56 +25,12 @@ PKGHELP= ${.CURDIR}/pkg-help
.include <bsd.port.options.mk>
ALL_DRI_DRIVERS=I915 I965 R200 RADEON SWRAST
.include "${.CURDIR}/../../graphics/libGL/Makefile.common"
#src/mesa/libmesagallium.la
#MESA_BUILD_WRKSRC= src/util src/gallium
#MESA_INSTALL_WRKSRC= src/gallium
PLIST_SUB+= VERSION=${MESADISTVERSION}
.if ${ARCH} == amd64 || ${ARCH} == i386 || ${ARCH} == ia64
DRI_DRIVERS= ${ALL_DRI_DRIVERS}
.endif
.if ${PORT_OPTIONS:MTEXTURE}
CONFIGURE_ARGS+=--enable-texture-float
.endif
.if 0 #${PORT_OPTIONS:MVDPAU}
.if ${PORT_OPTIONS:MGALLIUM} == ""
IGNORE= VDPAU option requires GALLIUM support to be enabled
.endif
CONFIGURE_ARGS+=--enable-vdpau
LIB_DEPENDS+= libvdpau.so:${PORTSDIR}/multimedia/libvdpau
PLIST_SUB+= VDPAU=""
.else
CONFIGURE_ARGS+=--disable-vdpau
PLIST_SUB+= VDPAU="@comment "
.endif
.if ${ARCH} == powerpc || ${ARCH} == powerpc64
DRI_DRIVERS= RADEON SWRAST
.endif
.if ${ARCH} == sparc64 || ${ARCH} == armv6
DRI_DRIVERS= SWRAST
.endif
# empty for unsupported arches
DRI_DRIVERS+=
.for _d in ${ALL_DRI_DRIVERS}
. if ${DRI_DRIVERS:M${_d}}
PLIST_SUB+= ${_d}_DRIVER=""
. else
PLIST_SUB+= ${_d}_DRIVER="@comment "
. endif
.endfor
CONFIGURE_ARGS+=--with-dri-drivers="${DRI_DRIVERS:tl}"
.include "${.CURDIR}/../../graphics/libGL/Makefile.targets"
post-install:

View File

@ -18,7 +18,7 @@
MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/}
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/}
MESABASEVERSION= 10.6.8
MESABASEVERSION= 10.6.9
# if there is a subversion, don't include the '-' between 7.11-rc2.
MESASUBVERSION=
@ -81,7 +81,9 @@ CONFIGURE_ARGS+= --enable-egl --with-egl-platforms=x11,drm
CONFIGURE_ARGS+= --enable-gles2
# Clover (OpenCL).
.if ${OPSYS} == DragonFly || (${OPSYS} == FreeBSD && ${OSVERSION} >= 1000000)
.if ${OPSYS} == DragonFly || \
(${OPSYS} == FreeBSD && ${OSVERSION} >= 1000000 && \
(${ARCH} == i386 || ${ARCH} == amd64))
BUILD_DEPENDS+= libclc>=0.0.r222830:${PORTSDIR}/devel/libclc
# We need the clang port too even if it is not used to compile because
@ -103,19 +105,65 @@ BUILD_DEPENDS+= llvm${MESA_LLVM_VER}>=0:${PORTSDIR}/devel/llvm${MESA_LLVM_VER}
.if ${COMPONENT:Mdri} != "" || ${COMPONENT:Mclover} != "" || ${COMPONENT:Megl} != ""
RUN_DEPENDS+= llvm${MESA_LLVM_VER}>=0:${PORTSDIR}/devel/llvm${MESA_LLVM_VER}
.endif
CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${MESA_LLVM_VER}
CONFIGURE_ARGS+=--enable-gallium-llvm \
--enable-xvmc \
--with-gallium-drivers=r300,r600,radeonsi,svga,swrast
.if ${PORT_OPTIONS:MTEXTURE}
CONFIGURE_ARGS+=--enable-texture-float
.endif
.if !(${ARCH} == amd64 || ${ARCH} == i386)
CONFIGURE_ARGS+=--disable-gallium-intel
.endif
# this is disabled because our kernel driver is too old
# merge this and the one below when support does land.
.if 0 #${PORT_OPTIONS:MVDPAU}
.if ${PORT_OPTIONS:MGALLIUM} == ""
IGNORE= VDPAU option requires GALLIUM support to be enabled
.endif
CONFIGURE_ARGS+=--enable-vdpau
LIB_DEPENDS+= libvdpau.so:${PORTSDIR}/multimedia/libvdpau
PLIST_SUB+= VDPAU=""
.else
CONFIGURE_ARGS+=--disable-vdpau
PLIST_SUB+= VDPAU="@comment "
.endif
# what to do with this one? Currently disabled in dri.
.if ${COMPONENT:Mvdpau} == ""
CONFIGURE_ARGS+=--disable-vdpau
.else
CONFIGURE_ARGS+=--enable-vdpau
.endif
ALL_DRI_DRIVERS=I915 I965 R200 RADEON SWRAST
.if ${ARCH} == amd64 || ${ARCH} == i386 || ${ARCH} == ia64
DRI_DRIVERS= ${ALL_DRI_DRIVERS}
.endif
.if ${ARCH} == powerpc || ${ARCH} == powerpc64
DRI_DRIVERS= RADEON SWRAST
.endif
.if ${ARCH} == sparc64 || ${ARCH} == armv6
DRI_DRIVERS= SWRAST
.endif
# empty for unsupported arches
DRI_DRIVERS+=
.for _d in ${ALL_DRI_DRIVERS}
. if ${DRI_DRIVERS:M${_d}}
PLIST_SUB+= ${_d}_DRIVER=""
. else
PLIST_SUB+= ${_d}_DRIVER="@comment "
. endif
.endfor
CONFIGURE_ARGS+=--with-dri-drivers="${DRI_DRIVERS:tl}"

View File

@ -3,7 +3,9 @@
# this file holds common targets
post-patch:
# Sed on 9.x and dragonfly don't support \< or \>
@${REINPLACE_CMD} -e 's|-ffast-math|${FAST_MATH}|' -e 's|x86_64|amd64|' \
-e "/\>\/\// s|/-|/ -|; s|\\\>||" \
-e 's|python2 python|python2disabled pythondisabled|g' \
${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' \

View File

@ -1,2 +1,2 @@
SHA256 (mesa-10.6.8.tar.xz) = e36ee5ceeadb3966fb5ce5b4cf18322dbb76a4f075558ae49c3bba94f57d58fd
SIZE (mesa-10.6.8.tar.xz) = 7042260
SHA256 (mesa-10.6.9.tar.xz) = b04c4de6280b863babc2929573da17218d92e9e4ba6272d548d135415723e8c3
SIZE (mesa-10.6.9.tar.xz) = 7041588

View File

@ -16,7 +16,7 @@ RUN_DEPENDS= opencl>=0:${PORTSDIR}/devel/opencl
USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto \
presentproto xvmc xshmfence
ONLY_FOR_ARCHS= i386 amd64 powerpc64
ONLY_FOR_ARCHS= i386 amd64
ONLY_FOR_ARCHS_REASON= Clover needs a graphics driver supported by the Radeon KMS driver
.include <bsd.port.options.mk>
@ -25,9 +25,7 @@ ONLY_FOR_ARCHS_REASON= Clover needs a graphics driver supported by the Radeon KM
#MESA_BUILD_WRKSRC= src/util src/glsl src/mesa src/gallium
MESA_INSTALL_WRKSRC= src/gallium/targets/opencl src/gallium/targets/pipe-loader
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1001514 && ${ARCH} == powerpc64
IGNORE= Clover is only support on powerpc64 in FreeBSD 10.2
.elif ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000 && ${ARCH} != powerpc64
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1001000
IGNORE= Clover is only supported on FreeBSD 10.1 and newer
.endif