aboutsummaryrefslogtreecommitdiff
path: root/graphics/mesa-dri/Makefile.common
diff options
context:
space:
mode:
authorMatthew Rezny <rezny@FreeBSD.org>2017-05-21 19:30:54 +0000
committerMatthew Rezny <rezny@FreeBSD.org>2017-05-21 19:30:54 +0000
commit943c52c8ccd51fa22033423130cb792b2a6c7083 (patch)
tree7954e3cb78911029ebb69dec626e64a28b5dd491 /graphics/mesa-dri/Makefile.common
parent049c1705f1c09d0d7e93924f6fced8765cba045d (diff)
downloadports-943c52c8ccd51fa22033423130cb792b2a6c7083.tar.gz
ports-943c52c8ccd51fa22033423130cb792b2a6c7083.zip
Notes
Diffstat (limited to 'graphics/mesa-dri/Makefile.common')
-rw-r--r--graphics/mesa-dri/Makefile.common45
1 files changed, 30 insertions, 15 deletions
diff --git a/graphics/mesa-dri/Makefile.common b/graphics/mesa-dri/Makefile.common
index 287e8c5e320a..f3582e064c60 100644
--- a/graphics/mesa-dri/Makefile.common
+++ b/graphics/mesa-dri/Makefile.common
@@ -14,7 +14,7 @@
MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/}
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/}
-MESABASEVERSION= 17.0.4
+MESABASEVERSION= 17.1.0
# if there is a subversion, don't include the '-' between 7.11-rc2.
MESASUBVERSION=
@@ -27,14 +27,28 @@ 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
+LIB_DEPENDS+= libexpat.so:textproc/expat2
+.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 gettext-tools gmake libtool \
localbase pathfix pkgconfig python:2,build shebangfix tar:xz
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
-PKGINSTALL= ${.CURDIR}/pkg-install
-PKGDEINSTALL= ${.CURDIR}/pkg-deinstall
-
# only have one port to check with portscout.
.if ${PORTNAME} != mesa-dri
PORTSCOUT= ignore:1
@@ -43,34 +57,39 @@ PORTSCOUT= ignore:1
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/gallium/drivers/freedreno/ir3/ir3_nir_trig.py \
src/mapi/glapi/gen/*.py src/mapi/mapi_abi.py \
src/mesa/drivers/dri/common/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}/../../graphics/mesa-dri
+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
-COMPONENT= ${PORTNAME:tl:C/^lib//:C/mesa-//}
+.include <bsd.port.pre.mk>
-.if (${ARCH} != sparc64 && ${ARCH} != ia64) # no working LLVM
+# need LLVM for libEGL wherever possible, but mixing GCC and LLVM breaks Gallium
+.if ${CHOSEN_COMPILER_TYPE} == clang \
+ || (${COMPONENT} == libs && ${ARCH} != sparc64) # no working LLVM
MESA_LLVM_VER?= 40
.endif
.if "${MESA_LLVM_VER}" != ""
BUILD_DEPENDS+= llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER}
+.if ${COMPONENT} != libs
RUN_DEPENDS+= llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER}
+.endif
CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${MESA_LLVM_VER}
LDFLAGS+= -Wl,-rpath=${LOCALBASE}/llvm${MESA_LLVM_VER}/lib
-# The gallium-llvm switch is the global llvm switch for historical reasons
-CONFIGURE_ARGS+= --enable-gallium-llvm
+CONFIGURE_ARGS+= --enable-llvm
.else
-CONFIGURE_ARGS+= --disable-gallium-llvm
+CONFIGURE_ARGS+= --disable-llvm
.endif
# There are issues that need to be fixed to use TLS model "initial-exec"
@@ -84,7 +103,3 @@ CONFIGURE_ARGS+= --disable-glx-tls
# we don't care about GLes v1
CONFIGURE_ARGS+= --disable-gles1
-.if ${OPSYS} == DragonFly
-LIB_DEPENDS+= libelf.so:devel/libelf
-.endif
-