mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-27 05:10:36 +00:00
f914799192
Meson seems to not care that a llvm-config binary exists and will prefer to use llvm-config-devel for some reason. Using a native-file fixes that and meson will correctly use the llvm specified in it. PR: 247026 Approved by: zeising (x11@ implicit)
111 lines
3.1 KiB
Makefile
111 lines
3.1 KiB
Makefile
# 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/libosmesa
|
|
# - graphics/mesa-dri
|
|
# - graphics/mesa-libs
|
|
# - lang/clover
|
|
#
|
|
# $FreeBSD$
|
|
|
|
MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/}
|
|
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/}
|
|
|
|
MESABASEVERSION= 19.0.8
|
|
# if there is a subversion, don't include the '-' between 7.11-rc2.
|
|
MESASUBVERSION=
|
|
|
|
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}
|
|
|
|
MAINTAINER= x11@FreeBSD.org
|
|
|
|
COMPONENT= ${PORTNAME:tl:C/^lib//:C/mesa-//}
|
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:devel/libpthread-stubs \
|
|
${PYTHON_PKGNAMEPREFIX}mako>0:textproc/py-mako@${PY_FLAVOR}
|
|
LIB_DEPENDS+= libexpat.so:textproc/expat2
|
|
.if ${COMPONENT} != clover
|
|
USES+= xorg
|
|
.endif
|
|
.if ${COMPONENT} != osmesa
|
|
LIB_DEPENDS+= libdrm.so:graphics/libdrm
|
|
.endif
|
|
.if ${COMPONENT} != libs
|
|
LIB_DEPENDS+= libglapi.so:graphics/mesa-libs
|
|
.endif
|
|
.if ${ARCH} == amd64 || ${ARCH} == i386
|
|
LIB_DEPENDS+= libunwind.so:devel/libunwind
|
|
.endif
|
|
.if ${OPSYS} == DragonFly
|
|
LIB_DEPENDS+= libelf.so:devel/libelf
|
|
.endif
|
|
|
|
USES+= compiler:c++11-lib bison meson pathfix pkgconfig \
|
|
python:3.6+,build shebangfix tar:xz
|
|
|
|
USE_LDCONFIG= yes
|
|
|
|
.if ${/usr/bin/ld:L:tA} != /usr/bin/ld.lld
|
|
# --build-id isn't supported by old GNU ld.bfd in base
|
|
# Also ld.bfd have problems that seems related to --as-needed
|
|
USE_BINUTILS= yes
|
|
LDFLAGS+= -B${LOCALBASE}/bin
|
|
.endif
|
|
|
|
# only have one port to check with portscout.
|
|
.if ${PORTNAME} != mesa-dri
|
|
PORTSCOUT= ignore:1
|
|
.endif
|
|
|
|
python_OLD_CMD= /usr/bin/env[[:space:]]python2 /usr/bin/python2 /bin/env[[:space:]]python
|
|
SHEBANG_FILES= src/gallium/*/*/*.py src/gallium/tools/trace/*.py \
|
|
src/gallium/drivers/svga/svgadump/svga_dump.py \
|
|
src/mapi/glapi/gen/*.py src/mapi/mapi_abi.py \
|
|
src/util/xmlpool/gen_xmlpool.py \
|
|
src/mesa/main/get_*.py src/util/format_srgb.py \
|
|
src/amd/*/*.py src/intel/genxml/gen_pack_header.py
|
|
|
|
MASTERDIR= ${.CURDIR:H:H}/graphics/mesa-dri
|
|
PATCHDIR= ${MASTERDIR}/files
|
|
WRKSRC= ${WRKDIR}/mesa-${MESADISTVERSION}
|
|
DESCR= ${.CURDIR}/pkg-descr
|
|
PLIST= ${.CURDIR}/pkg-plist
|
|
PKGHELP= ${.CURDIR}/pkg-help
|
|
PKGINSTALL= ${.CURDIR}/pkg-install
|
|
PKGDEINSTALL= ${.CURDIR}/pkg-deinstall
|
|
INSTALL_TARGET= install-strip
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if ${ARCH} == powerpc64
|
|
LLVM_DEFAULT= 90
|
|
.elif ${LLVM_DEFAULT:C/[1-5]./&0/:S,-devel,990,} >= 90
|
|
LLVM_DEFAULT= 80
|
|
.endif
|
|
|
|
BINARY_ALIAS+= python3=${PYTHON_VERSION}
|
|
|
|
.if ${ARCH} == sparc64
|
|
MESON_ARGS+= -Dllvm=false
|
|
.else
|
|
BUILD_DEPENDS+= llvm${LLVM_DEFAULT}>=3.9.0_4:devel/llvm${LLVM_DEFAULT}
|
|
.if ${COMPONENT} != libs
|
|
RUN_DEPENDS+= llvm${LLVM_DEFAULT}>=3.9.0_4:devel/llvm${LLVM_DEFAULT}
|
|
.endif
|
|
MESON_ARGS+= --native-file="${WRKSRC}/llvm.ini"
|
|
LDFLAGS+= -Wl,-rpath=${LOCALBASE}/llvm${LLVM_DEFAULT}/lib
|
|
MESON_ARGS+= -Dllvm=true
|
|
.endif
|
|
|
|
# we don't care about GLes v1
|
|
MESON_ARGS+= -Dgles1=false
|
|
|