summaryrefslogtreecommitdiff
path: root/devel/api-sanity-autotest/Makefile
blob: af9ae5a40b7ef06bf289cd1b9a6fac0307e2705c (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
# New ports collection makefile for:	api-sanity-autotest
# Date created:		February 16, 2009
# Whom:	      		bf <bf@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=	api-sanity-autotest
PORTVERSION=	1.11
CATEGORIES=	devel perl5
MASTER_SITES=	http://linuxtesting.org/downloads/

MAINTAINER=	bf@FreeBSD.org
COMMENT=	Quickly generate sanity tests for the API of a C/C++ shared library

LICENSE=	LGPL20 GPLv2
LICENSE_COMB=	dual

NO_BUILD=	yes
USE_PERL5_RUN=	yes

PLIST_FILES=	bin/${PORTNAME}.pl

CPPFILT?=	c++filt
READELF?=	readelf

post-patch:
	${REINPLACE_CMD} \
		-e "\%my% { \
			s%\"c++filt\"%\"${CPPFILT}\"%g; \
			s%\"readelf\"%\"${READELF}\"%g; \
			s%\"g++\"%\"${CXX}\"%g; \
			s%\"gcc\"%\"${CC}\"%g; }" \
		-e "\%search_for% { \
			s%\"g++\"%\"${CXX}\"%g; \
			s%\"gcc\"%\"${CC}\"%g; }" \
		-e "s% -shared%& -fPIC%g" \
		${WRKSRC}/${PORTNAME}.pl

do-install:
	@${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.pl ${PREFIX}/bin

test: build
	@(cd ${WRKSRC} && ./${PORTNAME}.pl -test )

.include <bsd.port.mk>