opnsense-ports/graphics/libGL/Makefile.common
Franco Fichtner 56aa0b10b5 */*: sync with upstream
Taken from: FreeBSD
2015-09-28 07:00:15 +02:00

121 lines
3.6 KiB
Text

# Makefile.common - shared code between MesaLib ports.
#
# !!! Here be dragons !!! (they seem to be everywhere these days)
#
# Remember to upgrade the following ports everytime you bump MESAVERSION:
#
# - graphics/dri
# - graphics/gbm
# - graphics/libEGL
# - graphics/libGL
# - graphics/libglapi
# - graphics/libglesv2
# - graphics/libosmesa
# - lang/clover
#
# $FreeBSD$
MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/}
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/}
MESABASEVERSION= 10.6.8
# if there is a subversion, don't include the '-' between 7.11-rc2.
MESASUBVERSION=
MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/${MESABASEVERSION}/
DISTFILES= mesa-${MESADISTVERSION}${EXTRACT_SUFX}
MAINTAINER= x11@FreeBSD.org
BUILD_DEPENDS+= makedepend:${PORTSDIR}/devel/makedepend
LIB_DEPENDS+= libdevq.so:${PORTSDIR}/devel/libdevq
USES+= compiler:c++11-lib gettext-tools gmake libtool \
pathfix pkgconfig python:2,build shebangfix tar:xz
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
CPPFLAGS+= -isystem${LOCALBASE}/include
LDFLAGS+= -Wl,-Y${LOCALBASE}/lib
PKGINSTALL= ${.CURDIR}/pkg-install
PKGDEINSTALL= ${.CURDIR}/pkg-deinstall
# only have one port to check with portscout.
.if ${PORTNAME} != libGL
PORTSCOUT= ignore:1
.endif
.if ${OSVERSION} < 1000033
BUILD_DEPENDS+= ${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex
CONFIGURE_ENV+= ac_cv_prog_LEX=${LOCALBASE}/bin/flex
.endif
python_OLD_CMD= "/usr/bin/env[[:space:]]python"
python_CMD= ${LOCALBASE}/bin/python2
SHEBANG_FILES= src/gallium/*/*/*.py src/gallium/tools/trace/*.py \
src/gallium/drivers/svga/svgadump/svga_dump.py \
src/glsl/tests/compare_ir src/mapi/glapi/gen/*.py
SHEBANG_FILES+= src/mapi/mapi_abi.py
MASTERDIR= ${.CURDIR}/../../graphics/libGL
PATCHDIR= ${MASTERDIR}/files
WRKSRC= ${WRKDIR}/mesa-${MESADISTVERSION}
DESCR= ${.CURDIR}/pkg-descr
PLIST= ${.CURDIR}/pkg-plist
INSTALL_TARGET= install-strip
COMPONENT= ${PORTNAME:tl:C/^lib//:C/mesa-//}
MESA_LLVM_VER=36
# DRI3 needs PRIME support in the kernel to work
CONFIGURE_ARGS+= --disable-dri3
CONFIGURE_ARGS+= --enable-gbm
# libEGL, dri and clover need gallium enabled.
# the third option in --with-egl-platforms is wayland.
CONFIGURE_ARGS+= --enable-egl --with-egl-platforms=x11,drm
CONFIGURE_ARGS+= --enable-gles2
# Clover (OpenCL).
.if ${OPSYS} == DragonFly || (${OPSYS} == FreeBSD && ${OSVERSION} >= 1000000)
BUILD_DEPENDS+= libclc>=0.0.r222830:${PORTSDIR}/devel/libclc
# We need the clang port too even if it is not used to compile because
# Clover needs some of the clang includes to build.
.if ${COMPONENT:Mdri} != "" || ${COMPONENT:Mclover} != "" || ${COMPONENT:Mosmesa} != ""
BUILD_DEPENDS+= clang${MESA_LLVM_VER}>=0:${PORTSDIR}/lang/clang${MESA_LLVM_VER}
.endif
CONFIGURE_ARGS+= --enable-opencl \
--enable-opencl-icd
.else
CONFIGURE_ARGS+= --disable-opencl
.endif
CONFIGURE_ARGS+= --enable-osmesa
# gallium
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 !(${ARCH} == amd64 || ${ARCH} == i386)
CONFIGURE_ARGS+=--disable-gallium-intel
.endif
# what to do with this one? Currently disabled in dri.
.if ${COMPONENT:Mvdpau} == ""
CONFIGURE_ARGS+=--disable-vdpau
.else
CONFIGURE_ARGS+=--enable-vdpau
.endif