summaryrefslogtreecommitdiff
path: root/graphics/Mesa/Makefile.common
blob: 71312cc03f62d5791a01021d39342085be6ecf15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# $NetBSD: Makefile.common,v 1.41 2005/04/11 21:46:00 tv Exp $

DISTNAME=	MesaLib-${MESA_VERSION}
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
DISTFILES+=	${DISTNAME:S/MesaLib/MesaDemos/}${EXTRACT_SUFX}
WRKSRC=		${WRKDIR}/${DISTNAME:S/Lib//}
CATEGORIES=	graphics
MASTER_SITES= 	${MASTER_SITE_SOURCEFORGE:=mesa3d/}
EXTRACT_SUFX=	.tar.bz2

MESA_VERSION=	6.2.1

MAINTAINER=	tech-pkg@NetBSD.org
HOMEPAGE=	http://www.mesa3d.org/

PKG_INSTALLATION_TYPES=	overwrite pkgviews

USE_LIBTOOL=		yes
USE_X11=		yes

BUILDING_MESA=		yes
NO_CONFIGURE=		yes
DIST_SUBDIR=		Mesa-${MESA_VERSION}
PATCHDIR?=		${.CURDIR}/../MesaLib/patches
DISTINFO_FILE?=		${.CURDIR}/../MesaLib/distinfo

INSTALLATION_DIRS+=	lib

.include "../../mk/compiler.mk"
.include "../../mk/bsd.prefs.mk"

# Mesa has proper support for Solaris and SunPro, use it.
.if ${OPSYS} == "SunOS"
.  if ${MACHINE_ARCH} == "sparc"
.    if !empty(PKGSRC_COMPILER:Msunpro)
.      if ${SPARC_TARGET_ARCH} == "sparcv7"
BUILD_TARGET=		sunos5
.      elif ${SPARC_TARGET_ARCH} == "sparcv8"
BUILD_TARGET=		sunos5-v8
.      elif ${SPARC_TARGET_ARCH} == "sparcv9"
BUILD_TARGET=		sunos5-v9
.      endif
.    else
BUILD_TARGET=		sunos5-gcc
.    endif
.  else	# i386
.    if !empty(PKGSRC_COMPILER:Msunpro)
BUILD_TARGET=		solaris-x86
.    else
BUILD_TARGET=		solaris-x86-gcc
.    endif
.  endif
.else
BUILD_TARGET=		pkgsrc
.endif

pre-install:
	@if [ -n "${INSTLIBS}" ]; then					\
		${ECHO_MSG} "Installing libraries.";			\
		for lib in ${INSTLIBS}; do				\
			${LIBTOOL} --mode=install ${INSTALL_LIB}	\
				$${lib} ${PREFIX}/lib;			\
		done;							\
	fi