aboutsummaryrefslogtreecommitdiffstats
path: root/devel/api-sanity-autotest/Makefile
blob: 4a1d5ca4fd198f6730ee5f488fcb77364eba2322 (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
# 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.12.5
CATEGORIES= devel perl5
MASTER_SITES=   http://linuxtesting.org/downloads/ \
        LOCAL/bf

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
.ifdef(MAINTAINER_MODE)
USE_PERL5=  yes
.else
USE_PERL5_RUN=  yes
.endif

PLIST_FILES=    bin/${PORTNAME}.pl

READELF?=   /usr/bin/readelf

.include <bsd.port.pre.mk>

.if ${ARCH} == "sparc64"
PICFLAG?=   -fPIC
.else
PICFLAG?=   -fpic
.endif

post-patch:
    @${REINPLACE_CMD} \
        -e "\|get_CmdPath(\"ar\")|s|\"ar\"|\"${AR}\"|" \
        -e "\|get_CmdPath(\"gcc\")|s|\"gcc\"|\"${CC}\"|" \
        -e "\|get_CmdPath(\"g++\")|s|\"g++\"|\"${CXX}\"|" \
        -e "\|get_CmdPath(\"objdump\")|s|\"objdump\"|\"${OBJDUMP}\"|" \
        -e "\|get_CmdPath(\"pidof\")|s|\"pidof\"|\"pgrep\"|" \
        -e "\|get_CmdPath(\"readelf\")|s|\"readelf\"|\"${READELF}\"|" \
        -e "s| -shared|& ${PICFLAG}|g" \
        ${WRKSRC}/${PORTNAME}.pl

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

.ifdef(MAINTAINER_MODE)
check regression-test test: build
    @(cd ${WRKSRC}; ${PERL} ./${PORTNAME}.pl -test )

.endif

.ifndef(NOPORTDOCS)
PORTDOCS=   Changes.html Descriptor.html Options.html Readme.html SpecType.html

post-install:
    @${MKDIR} ${DOCSDIR}
    @(cd ${WRKSRC}/doc; ${INSTALL_MAN} ${PORTDOCS} ${DOCSDIR})

.endif
.include <bsd.port.post.mk>