summaryrefslogtreecommitdiff
path: root/devel/boost/Makefile.common
blob: 214d121f1880fdcad2d0edf9841a3e601487cb47 (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
# $NetBSD: Makefile.common,v 1.2 2004/06/07 04:45:11 tv Exp $
#

BOOST_VERSION=		1.31.0

DISTNAME=		boost_${BOOST_VERSION:S/./_/g}
PKGREVISION=		1
PKGNAME=		boost${BOOST_PKGNAME_ADD}-${BOOST_VERSION}
CATEGORIES=		devel
MASTER_SITES=		${MASTER_SITE_SOURCEFORGE:=boost/}
EXTRACT_SUFX=		.tar.bz2

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

DISTINFO_FILE=		${.CURDIR}/../boost/distinfo
PATCHDIR=		${.CURDIR}/../boost/patches
PLIST_SRC=		${WRKSRC}/PLIST.libs ${.CURDIR}/PLIST

USE_BUILDLINK3=		yes
USE_LANGUAGES+=		c++
GCC_REQD+=		3.2 # if using gcc; ignored otherwise

BJAM?=			${LOCALBASE}/bin/bjam
BJAM_ARGS+=		--builddir=${WRKSRC}/build
BJAM_ARGS+=		--prefix=${PREFIX}
BJAM_ARGS+=		-sBUILD=${BJAM_BUILD:Q}
BJAM_BUILD+=		<linkflags>-Wl,-R${LOCALBASE}/lib
BJAM_BUILD+=		release
BJAM_CMD=		${SETENV} ${MAKE_ENV} ${BJAM} ${BJAM_ARGS}

.include "../boost/toolset.mk"

BJAM_ARGS+=		-sTOOLS=${BOOST_TOOLSET}

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

.if defined(BOOST_DEBUG) && !empty(BOOST_DEBUG:M[Yy][Ee][Ss])
BJAM_BUILD+=		debug
.endif

userhpp-configure:
	@cd ${WRKSRC}/libs/config && ${SETENV} ${CONFIGURE_ENV} ${SH} ./configure
	${CP} -f ${WRKSRC}/libs/config/user.hpp ${WRKSRC}/boost/config/user.hpp

post-build:
	@cd ${WRKSRC}/stage && \
		${LS} -1 lib/libboost_* >${WRKSRC}/PLIST.libs

# depend on main package for subpackages (exact version match)
.ifdef BOOST_PKGNAME_ADD
.include "../../devel/boost/buildlink3.mk"
BUILDLINK_DEPENDS.boost=	${PKGNAME:S/${BOOST_PKGNAME_ADD}//}
.endif