[BACK]Return to options.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / graphics / MesaLib

File: [cvs.NetBSD.org] / pkgsrc / graphics / MesaLib / options.mk (download)

Revision 1.27, Mon Mar 9 19:54:44 2015 UTC (9 years, 1 month ago) by tnn
Branch: MAIN
CVS Tags: pkgsrc-2015Q1-base, pkgsrc-2015Q1
Changes since 1.26: +2 -1 lines

Force a full dependency on libpciaccess in situations where we definitely
need to link with it but might have included x11/xf86driproto's bl3.mk first,
because we have:
x11/xf86driproto/buildlink3.mk:BUILDLINK_DEPMETHOD.libpciaccess?=  build

(This issue appears only on non-x86 because on x86 we get libpciaccess
 through libdrm)

Bump PKGREVISION to get the dependency expressed.

# $NetBSD: options.mk,v 1.27 2015/03/09 19:54:44 tnn Exp $

PKG_OPTIONS_VAR=	PKG_OPTIONS.MesaLib
PKG_SUPPORTED_OPTIONS=

# Assembler code build configurations
.if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && \
    ${OPSYS} != "Darwin"
#PKG_SUPPORTED_OPTIONS+=		${MACHINE_ARCH}
#PKG_SUGGESTED_OPTIONS+=		${MACHINE_ARCH}
.endif
###
### XXX  There are [probably] others, but let's not get crazy just yet.
### 	 This will take a while to test for the myriad platforms we
### 	 support.
###
.if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" || \
     ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc" || \
     ${MACHINE_ARCH} == "sparc64") && \
    (${OPSYS} == "NetBSD" || \
     ${OPSYS} == "FreeBSD" || ${OPSYS} == "OpenBSD" || \
     ${OPSYS} == "DragonFly" || ${OPSYS} == "Linux" || \
     ${OPSYS} == "SunOS")
PKG_SUPPORTED_OPTIONS+=		dri
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-[4-9]*-*86*)
PKG_SUGGESTED_OPTIONS+=		dri
.endif
.if !empty(MACHINE_PLATFORM:MLinux-*-*86*)
PKG_SUGGESTED_OPTIONS+=		dri
.endif

.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly" || (${OPSYS} == "SunOS" && ${OS_VERSION} == "5.11")
PKG_SUGGESTED_OPTIONS+=		dri
.endif

.include "../../mk/bsd.options.mk"
###
### XXX Yes, this is a bit overly verbose; with Mesa, that can't hurt much.
###	NOTE: there is no assembler code built with libOSMesa.
#.if (!empty(PKG_OPTIONS:Mi386) || !empty(PKG_OPTIONS:Mx86_64)) && \
#     !empty(PKG_OPTIONS:Mdri)
#BUILD_TARGET_SUFFIX=	-${MACHINE_ARCH}
#.else
#BUILD_TARGET_SUFFIX=	# empty
#.endif

.if !empty(PKG_OPTIONS:Mdri)
CONFIGURE_ARGS+=        --with-driver=dri
PLIST.dri=	yes
BUILDLINK_DEPMETHOD.libpciaccess=	full
.  include "../../sysutils/libpciaccess/buildlink3.mk"
USE_BUILTIN.MesaLib=	no
.  include "../../graphics/MesaLib/dri.mk"
CONFIGURE_ARGS+=        --with-dri-drivers="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon savage sis swrast tdfx unichrome"
.else
CONFIGURE_ARGS+=        --with-driver=xlib
PLIST.nodri=	yes
.if !empty(MACHINE_PLATFORM:MNetBSD-[4-9]*-*86*)
PKG_FAIL_REASON=	"The dri option needs to be enabled for this to build on NetBSD."
.endif
###
### XXX building libOSMesa breaks with -j, and GNU make has no .WAIT
###
#MAKE_JOBS_SAFE=			no
.endif