Changeset View
Changeset View
Standalone View
Standalone View
head/graphics/libGL/Makefile.common
Show All 12 Lines | |||||
# - graphics/libosmesa | # - graphics/libosmesa | ||||
# - lang/clover | # - lang/clover | ||||
# | # | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/} | MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/} | ||||
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/} | MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/} | ||||
MESABASEVERSION= 13.0.5 | MESABASEVERSION= 13.0.6 | ||||
# if there is a subversion, don't include the '-' between 7.11-rc2. | # if there is a subversion, don't include the '-' between 7.11-rc2. | ||||
MESASUBVERSION= | MESASUBVERSION= | ||||
MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/${MESABASEVERSION}/ | MASTER_SITES= https://mesa.freedesktop.org/archive/ \ | ||||
https://mesa.freedesktop.org/archive/${MESABASEVERSION}/ \ | |||||
ftp://ftp.freedesktop.org/pub/mesa/ \ | |||||
ftp://ftp.freedesktop.org/pub/mesa/${MESABASEVERSION}/ | |||||
DISTFILES= mesa-${MESADISTVERSION}${EXTRACT_SUFX} | DISTFILES= mesa-${MESADISTVERSION}${EXTRACT_SUFX} | ||||
MAINTAINER= x11@FreeBSD.org | MAINTAINER= x11@FreeBSD.org | ||||
BUILD_DEPENDS+= makedepend:devel/makedepend | BUILD_DEPENDS+= makedepend:devel/makedepend | ||||
USES+= compiler:c++11-lib bison gettext-tools gmake libtool \ | USES+= compiler:c++11-lib bison gettext-tools gmake libtool \ | ||||
localbase pathfix pkgconfig python:2,build shebangfix tar:xz | localbase pathfix pkgconfig python:2,build shebangfix tar:xz | ||||
USE_LDCONFIG= yes | USE_LDCONFIG= yes | ||||
GNU_CONFIGURE= yes | GNU_CONFIGURE= yes | ||||
LDFLAGS+= -Wl,-rpath=${LOCALBASE}/llvm${MESA_LLVM_VER}/lib | |||||
PKGINSTALL= ${.CURDIR}/pkg-install | PKGINSTALL= ${.CURDIR}/pkg-install | ||||
PKGDEINSTALL= ${.CURDIR}/pkg-deinstall | PKGDEINSTALL= ${.CURDIR}/pkg-deinstall | ||||
# only have one port to check with portscout. | # only have one port to check with portscout. | ||||
.if ${PORTNAME} != libGL | .if ${PORTNAME} != libGL | ||||
PORTSCOUT= ignore:1 | PORTSCOUT= ignore:1 | ||||
.endif | .endif | ||||
Show All 9 Lines | |||||
PATCHDIR= ${MASTERDIR}/files | PATCHDIR= ${MASTERDIR}/files | ||||
WRKSRC= ${WRKDIR}/mesa-${MESADISTVERSION} | WRKSRC= ${WRKDIR}/mesa-${MESADISTVERSION} | ||||
DESCR= ${.CURDIR}/pkg-descr | DESCR= ${.CURDIR}/pkg-descr | ||||
PLIST= ${.CURDIR}/pkg-plist | PLIST= ${.CURDIR}/pkg-plist | ||||
INSTALL_TARGET= install-strip | INSTALL_TARGET= install-strip | ||||
COMPONENT= ${PORTNAME:tl:C/^lib//:C/mesa-//} | COMPONENT= ${PORTNAME:tl:C/^lib//:C/mesa-//} | ||||
MESA_LLVM_VER=39 | .if (${ARCH} != sparc64 && ${ARCH} != ia64) # no working LLVM | ||||
MESA_LLVM_VER?= 39 | |||||
LDFLAGS+= -Wl,-rpath=${LOCALBASE}/llvm${MESA_LLVM_VER}/lib | |||||
.endif | |||||
CONFIGURE_ARGS+= --with-sha1=libcrypto | CONFIGURE_ARGS+= --with-sha1=libcrypto | ||||
CONFIGURE_ARGS+= --enable-gbm | CONFIGURE_ARGS+= --enable-gbm | ||||
# There are issues that need to be fixed to use TLS model "initial-exec" | # There are issues that need to be fixed to use TLS model "initial-exec" | ||||
# So stick with "global-dynamic"'s model for now. kan@ is working on a | # So stick with "global-dynamic"'s model for now. kan@ is working on a | ||||
# patch for rtld. We might want to backport global-dynamic or | # patch for rtld. We might want to backport global-dynamic or | ||||
# pthread_setspecific which it uses now by default. But since this | # pthread_setspecific which it uses now by default. But since this | ||||
# configure switch is going away ... | # configure switch is going away ... | ||||
# https://lists.freebsd.org/pipermail/freebsd-arch/2016-February/017699.html | # https://lists.freebsd.org/pipermail/freebsd-arch/2016-February/017699.html | ||||
#CONFIGURE_ARGS+= --enable-glx-tls | CONFIGURE_ARGS+= --disable-glx-tls | ||||
# libEGL, dri and clover need gallium enabled. | # libEGL, dri and clover need gallium enabled. | ||||
# the third option in --with-egl-platforms is wayland. | # the third option in --with-egl-platforms is wayland. | ||||
.if (${MESA_LLVM_VER} != "") | |||||
CONFIGURE_ARGS+= --enable-egl --with-egl-platforms=x11,drm | CONFIGURE_ARGS+= --enable-egl --with-egl-platforms=x11,drm | ||||
.else | |||||
CONFIGURE_ARGS+= --disable-egl | |||||
.endif | |||||
# we don't care about GLes v1 | # we don't care about GLes v1 | ||||
CONFIGURE_ARGS+= --disable-gles1 --enable-gles2 | CONFIGURE_ARGS+= --disable-gles1 --enable-gles2 | ||||
# Clover (OpenCL). | # Clover (OpenCL). | ||||
.if ${OPSYS} == DragonFly || \ | .if ${OPSYS} == DragonFly || \ | ||||
(${OPSYS} == FreeBSD && \ | (${OPSYS} == FreeBSD && \ | ||||
(${ARCH} == amd64 || ${ARCH} == i386)) | (${ARCH} == amd64 || ${ARCH} == i386)) | ||||
Show All 14 Lines | clover-pre-configure: | ||||
fi | fi | ||||
.endif | .endif | ||||
CONFIGURE_ARGS+= --enable-opencl --enable-opencl-icd | CONFIGURE_ARGS+= --enable-opencl --enable-opencl-icd | ||||
.else | .else | ||||
CONFIGURE_ARGS+= --disable-opencl | CONFIGURE_ARGS+= --disable-opencl | ||||
.endif | .endif | ||||
CONFIGURE_ARGS+= --enable-osmesa | CONFIGURE_ARGS+= --enable-osmesa --enable-xvmc | ||||
# gallium | # gallium | ||||
.if (${MESA_LLVM_VER} != "") | |||||
BUILD_DEPENDS+= llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER} | BUILD_DEPENDS+= llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER} | ||||
.if ${COMPONENT:Mdri} != "" || ${COMPONENT:Mclover} != "" || ${COMPONENT:Megl} != "" | .if ${COMPONENT:Mdri} != "" || ${COMPONENT:Mclover} != "" || ${COMPONENT:Megl} != "" | ||||
RUN_DEPENDS+= llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER} | RUN_DEPENDS+= llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER} | ||||
.endif | .endif | ||||
CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${MESA_LLVM_VER} | CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${MESA_LLVM_VER} | ||||
CONFIGURE_ARGS+=--enable-gallium-llvm --enable-llvm-shared-libs \ | CONFIGURE_ARGS+= --enable-gallium-llvm --enable-llvm-shared-libs | ||||
--enable-xvmc | .else | ||||
CONFIGURE_ARGS+= --disable-gallium-llvm | |||||
.endif | |||||
.if ${PORT_OPTIONS:MTEXTURE} | .if ${PORT_OPTIONS:MTEXTURE} | ||||
CONFIGURE_ARGS+=--enable-texture-float | CONFIGURE_ARGS+=--enable-texture-float | ||||
.endif | .endif | ||||
# only support on DragonFly. FreeBSD's drm doesn't support it. | # only support on DragonFly. FreeBSD's drm doesn't support it. | ||||
.if ${OPSYS} == DragonFly && ${COMPONENT:Mdri} != "" | .if ${OPSYS} == DragonFly && ${COMPONENT:Mdri} != "" | ||||
CONFIGURE_ARGS+=--enable-vdpau | CONFIGURE_ARGS+=--enable-vdpau | ||||
Show All 37 Lines | |||||
.for _gd in ${ALL_GALLIUM_DRIVERS} | .for _gd in ${ALL_GALLIUM_DRIVERS} | ||||
. if ${GALLIUM_DRIVERS:M${_gd}} | . if ${GALLIUM_DRIVERS:M${_gd}} | ||||
PLIST_SUB+= ${_gd}_GDRIVER="" | PLIST_SUB+= ${_gd}_GDRIVER="" | ||||
. else | . else | ||||
PLIST_SUB+= ${_gd}_GDRIVER="@comment " | PLIST_SUB+= ${_gd}_GDRIVER="@comment " | ||||
. endif | . endif | ||||
.endfor | .endfor | ||||
.if (${MESA_LLVM_VER} != "") | |||||
CONFIGURE_ARGS+=--with-gallium-drivers="${GALLIUM_DRIVERS:tl}" | CONFIGURE_ARGS+=--with-gallium-drivers="${GALLIUM_DRIVERS:tl}" | ||||
.endif | |||||
.if ${OPSYS} == DragonFly | .if ${OPSYS} == DragonFly | ||||
LIB_DEPENDS+= libelf.so:devel/libelf | LIB_DEPENDS+= libelf.so:devel/libelf | ||||
.endif | .endif | ||||