aboutsummaryrefslogtreecommitdiff
path: root/devel/valgrind/Makefile
blob: 6e3b4d1f77c04dbb5978863442428bee5a5b5f17 (plain) (blame)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Created by: Simon Barner <barner@gmx.de>

PORTNAME=	valgrind
PORTVERSION=	3.10.1.20160113
DISTVERSIONPREFIX=	freebsd-
PORTREVISION=	8
PORTEPOCH=	1
CATEGORIES=	devel
MASTER_SITES=	https://bitbucket.org/${BB_ACCOUNT}/${BB_PROJECT}/get/${BB_COMMIT}.tar.gz?dummy=/ \
		http://mirror.shatow.net/freebsd/${PORTNAME}/

MAINTAINER=	zeising@FreeBSD.org
COMMENT=	Memory debugging and profiling tool

BB_COMMIT=	ce1acb28953f
BB_ACCOUNT=	stass
BB_PROJECT=	valgrind-freebsd

LICENSE=	GPLv2

BROKEN=		fails at runtime: valgrind: mmap(0x200000, 45056) failed in UME with error 22 (Invalid argument)

CONFLICTS=	valgrind-devel-[0-9]*

ONLY_FOR_ARCHS=	i386 amd64

LIB32_PATH?=	${DESTDIR}/usr/lib32/libc.so

OPTIONS_DEFINE=		DOCS MANPAGES MPI
OPTIONS_DEFINE_amd64=	32BIT
OPTIONS_DEFAULT=	MANPAGES
.if exists(${LIB32_PATH})
OPTIONS_DEFAULT_amd64=	32BIT
.endif
32BIT_DESC=	Enable debugging of 32-bit programs (requires lib32)
MPI_DESC=	Enable build of MPI wrappers

DOCS_BUILD_DEPENDS=    docbook-xsl>=0:textproc/docbook-xsl \
                       xsltproc:textproc/libxslt
MANPAGES_BUILD_DEPENDS=        docbook-xsl>=0:textproc/docbook-xsl \
                       xsltproc:textproc/libxslt
MPI_LIB_DEPENDS=	libmpich.so:net/mpich

OPTIONS_SUB=	yes
USES=		pathfix pkgconfig gmake perl5 shebangfix autoreconf
USE_PERL5=	build
GNU_CONFIGURE=	yes
USE_LDCONFIG=	yes
SHEBANG_FILES=	callgrind/callgrind_annotate.in callgrind/callgrind_control.in

EXTRA_PATCHES=	\
		${FILESDIR}/accept4_syscall.patch:-p1 \
		${FILESDIR}/jail_syscalls.patch:-p1 \
		${FILESDIR}/kldload_syscalls.patch:-p1 \
		${FILESDIR}/missing_fcntls.patch:-p1

PORTDOCS=	html

WRKSRC=		${WRKDIR}/${BB_ACCOUNT}-${BB_PROJECT}-${BB_COMMIT}

CONFIGURE_ENV+=	ac_cv_path_PERL=${PERL}

.include <bsd.port.options.mk>

.if ${OSVERSION} > 1200030
EXTRA_PATCHES+=	${FILESDIR}/extra-patch-ino64:-p1
.endif

.if ${ARCH} == "amd64"
PLIST_SUB+=	AMD64="" ARCH=amd64
. if !${PORT_OPTIONS:M32BIT}
CONFIGURE_ARGS+=	--enable-only64bit
PLIST_SUB+=	X86="@comment "
. else
.  if !exists(${LIB32_PATH})
IGNORE=The lib32 distribution was not found. Please install the lib32\
distribution or run 'make config' and uncheck 32BIT option
.  endif
PLIST_SUB+=	X86=""
. endif
.else
PLIST_SUB+=	X86="" ARCH=x86
PLIST_SUB+=	AMD64="@comment "
.endif

.if !${PORT_OPTIONS:MDOCS}
post-patch:
	@${RM} -r ${WRKSRC}/docs/html
.endif

post-build:
.if ${PORT_OPTIONS:MMANPAGES}
	cd ${WRKSRC}/docs && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} man-pages
.endif
.if ${PORT_OPTIONS:MDOCS}
	cd ${WRKSRC}/docs && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} html-docs
.endif

.include <bsd.port.mk>