Changeset View
Changeset View
Standalone View
Standalone View
graphics/mesa/Makefile.common
# Makefile.common - shared code between MesaLib ports. | # Makefile.common - shared code between MesaLib ports. | ||||
# | # | ||||
# !!! Here be dragons !!! (they seem to be everywhere these days) | # !!! Here be dragons !!! (they seem to be everywhere these days) | ||||
# | # | ||||
# Remember to upgrade the following ports everytime you bump MESAVERSION: | # Remember to upgrade the following ports everytime you bump MESAVERSION: | ||||
# | # | ||||
# - graphics/libosmesa | # - graphics/libosmesa | ||||
# - graphics/mesa-dri | # - graphics/mesa | ||||
# - graphics/mesa-libs | |||||
# - 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= 18.3.2 | MESABASEVERSION= 19.2.8 | ||||
# 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= https://mesa.freedesktop.org/archive/ \ | MASTER_SITES= https://mesa.freedesktop.org/archive/ \ | ||||
https://mesa.freedesktop.org/archive/${MESABASEVERSION}/ \ | 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 | ||||
COMPONENT= ${PORTNAME:tl:C/^lib//:C/mesa-//} | COMPONENT= ${PORTNAME:tl:C/^lib//:C/mesa-//} | ||||
BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:devel/libpthread-stubs | BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:devel/libpthread-stubs \ | ||||
${PYTHON_PKGNAMEPREFIX}mako>=0.8.0:textproc/py-mako@${PY_FLAVOR} | |||||
LIB_DEPENDS+= libexpat.so:textproc/expat2 | LIB_DEPENDS+= libexpat.so:textproc/expat2 | ||||
.if ${COMPONENT} != clover | .if ${COMPONENT} != clover | ||||
USES+= xorg | USES+= xorg | ||||
.endif | .endif | ||||
.if ${COMPONENT} != osmesa | .if ${COMPONENT} != osmesa | ||||
LIB_DEPENDS+= libdrm.so:graphics/libdrm | LIB_DEPENDS+= libdrm.so:graphics/libdrm | ||||
.endif | .endif | ||||
.if ${COMPONENT} != libs | |||||
LIB_DEPENDS+= libglapi.so:graphics/mesa-libs | |||||
.endif | |||||
.if ${ARCH} == amd64 || ${ARCH} == i386 | .if ${ARCH} == amd64 || ${ARCH} == i386 | ||||
LIB_DEPENDS+= libunwind.so:devel/libunwind | LIB_DEPENDS+= libunwind.so:devel/libunwind | ||||
.endif | .endif | ||||
.if ${OPSYS} == DragonFly | .if ${OPSYS} == DragonFly | ||||
LIB_DEPENDS+= libelf.so:devel/libelf | LIB_DEPENDS+= libelf.so:devel/libelf | ||||
.endif | .endif | ||||
USES+= compiler:c++11-lib bison gettext-tools gmake libtool \ | USES+= bison compiler:c++11-lib gettext-tools localbase \ | ||||
localbase pathfix pkgconfig python:2.7,build shebangfix tar:xz | meson pathfix pkgconfig python:3.6+,build shebangfix tar:xz | ||||
USE_LDCONFIG= yes | USE_LDCONFIG= yes | ||||
GNU_CONFIGURE= yes | |||||
# only have one port to check with portscout. | # only have one port to check with portscout. | ||||
.if ${PORTNAME} != mesa-dri | .if ${PORTNAME} != mesa | ||||
PORTSCOUT= ignore:1 | PORTSCOUT= ignore:1 | ||||
.endif | .endif | ||||
python_OLD_CMD= /usr/bin/env[[:space:]]python2 /usr/bin/python2 /bin/env[[:space:]]python | BINARY_ALIAS= python3=${PYTHON_CMD} | ||||
SHEBANG_FILES= src/gallium/*/*/*.py src/gallium/tools/trace/*.py \ | SHEBANG_FILES= src/gallium/*/*/*.py src/gallium/tools/trace/*.py \ | ||||
src/gallium/drivers/svga/svgadump/svga_dump.py \ | src/gallium/drivers/svga/svgadump/svga_dump.py \ | ||||
src/mapi/glapi/gen/*.py src/mapi/mapi_abi.py \ | src/mapi/glapi/gen/*.py src/mapi/mapi_abi.py \ | ||||
src/util/xmlpool/gen_xmlpool.py \ | src/util/xmlpool/gen_xmlpool.py \ | ||||
src/mesa/main/get_*.py src/util/format_srgb.py \ | src/mesa/main/get_*.py src/util/format_srgb.py \ | ||||
src/amd/*/*.py src/intel/genxml/gen_pack_header.py | src/amd/*/*.py src/intel/genxml/gen_pack_header.py | ||||
MASTERDIR= ${.CURDIR:H:H}/graphics/mesa-dri | MASTERDIR= ${.CURDIR:H:H}/graphics/mesa | ||||
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 | ||||
PKGHELP= ${.CURDIR}/pkg-help | PKGHELP= ${.CURDIR}/pkg-help | ||||
PKGINSTALL= ${.CURDIR}/pkg-install | PKGINSTALL= ${.CURDIR}/pkg-install | ||||
PKGDEINSTALL= ${.CURDIR}/pkg-deinstall | PKGDEINSTALL= ${.CURDIR}/pkg-deinstall | ||||
INSTALL_TARGET= install-strip | INSTALL_TARGET= install-strip | ||||
.include <bsd.port.pre.mk> | |||||
.if ${LLVM_DEFAULT:S,-devel,990,} >= 90 | |||||
LLVM_DEFAULT= 80 | |||||
.endif | |||||
.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH:Marm*} || ${ARCH} == i386 || ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} | .if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH:Marm*} || ${ARCH} == i386 || ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} | ||||
BUILD_DEPENDS+= llvm${LLVM_DEFAULT}>=3.9.0_4:devel/llvm${LLVM_DEFAULT} | BUILD_DEPENDS+= llvm${LLVM_DEFAULT}>=3.9.0_4:devel/llvm${LLVM_DEFAULT} | ||||
.if ${COMPONENT} != libs | .if ${COMPONENT} != libs | ||||
RUN_DEPENDS+= llvm${LLVM_DEFAULT}>=3.9.0_4:devel/llvm${LLVM_DEFAULT} | RUN_DEPENDS+= llvm${LLVM_DEFAULT}>=3.9.0_4:devel/llvm${LLVM_DEFAULT} | ||||
.endif | .endif | ||||
CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${LLVM_DEFAULT} | CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${LLVM_DEFAULT} | ||||
LDFLAGS+= -Wl,-rpath=${LOCALBASE}/llvm${LLVM_DEFAULT}/lib | LDFLAGS+= -Wl,-rpath=${LOCALBASE}/llvm${LLVM_DEFAULT}/lib | ||||
CONFIGURE_ARGS+= --enable-llvm | MESON_ARGS+= -Dllvm=true | ||||
.else | .else | ||||
CONFIGURE_ARGS+= --disable-llvm | MESON_ARGS+= -Dllvm=false | ||||
.endif | .endif | ||||
# 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+= --disable-glx-tls | #MESON_ARGS+= -Duse-elf-tls=false # maybe import this patch? | ||||
# we don't care about GLes v1 | # we don't care about GLes v1 | ||||
CONFIGURE_ARGS+= --disable-gles1 | MESON_ARGS+= -Dgles1=false | ||||
.include <bsd.port.mk> |