aboutsummaryrefslogtreecommitdiffstats
path: root/devel/cunit/Makefile
blob: 780fed460c3ec8cdb94fae1bb5bdc5be757e6ff9 (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
# Created by: Stefan Pauly <stefan@fh-mainz.de>
# $FreeBSD$

PORTNAME=   cunit
PORTVERSION=    2.1.3
PORTREVISION=   1
CATEGORIES= devel
MASTER_SITES=   SF/${PORTNAME}/CUnit/${PORTVERSION:R}-${PORTVERSION:E}
DISTNAME=   CUnit-${PORTVERSION:R}-${PORTVERSION:E}

MAINTAINER= sunpoet@FreeBSD.org
COMMENT=    Automated unit testing framework for C

LICENSE=    LGPL20

CONFLICTS=  c-unit-[0-9]*

OPTIONS_DEFINE= AUTOMATED BASIC CONSOLE CURSES DEBUG EXAMPLES MEMTRACE TEST
OPTIONS_DEFAULT=AUTOMATED BASIC CONSOLE CURSES DEBUG EXAMPLES MEMTRACE TEST
#OPTIONS_DEFAULT=AUTOMATED BASIC CONSOLE
OPTIONS_SUB=    yes
AUTOMATED_DESC= Automated (XML) interface
BASIC_DESC= Basic interface
CONSOLE_DESC=   Console interface
CURSES_DESC=    Curses interface
DEBUG_DESC= Debug interface
EXAMPLES_DESC=  Example programs
MEMTRACE_DESC=  Internal memory tracking
TEST_DESC=  Internal test program

GNU_CONFIGURE=  yes
USES=       gmake libtool pathfix tar:bzip2
USE_AUTOTOOLS=  aclocal autoconf autoheader automake libtoolize
USE_LDCONFIG=   yes

DATADIR=    ${PREFIX}/share/CUnit
DOCSDIR=    ${PREFIX}/share/doc/CUnit
EXAMPLESDIR=    ${PREFIX}/share/examples/CUnit
PORTDATA=   *
PORTDOCS=   *
PORTEXAMPLES=   *

AUTOMAKE_ARGS=  --add-missing
LIBTOOLIZE_ARGS=--copy --force --install
PATHFIX_MAKEFILEIN= Makefile.am

AUTOMATED_CONFIGURE_ENABLE= automated
BASIC_CONFIGURE_ENABLE= basic
CONSOLE_CONFIGURE_ENABLE=   console
CURSES_CONFIGURE_ENABLE=curses
DEBUG_CONFIGURE_ENABLE=debug
EXAMPLES_CONFIGURE_ENABLE=  examples
MEMTRACE_CONFIGURE_ENABLE=  memtrace
TEST_CONFIGURE_ENABLE=  test

post-patch:
    @${REINPLACE_CMD} -e 's|/doc/@PACKAGE@|/share/doc/@PACKAGE@|g' ${WRKSRC}/doc/Makefile.am ${WRKSRC}/doc/headers/Makefile.am
    @${REINPLACE_CMD} -e 's|/@PACKAGE@/Examples/|/examples/@PACKAGE@/|g' ${WRKSRC}/Examples/*/Makefile.am
    @${REINPLACE_CMD} -e 's|CUnit-[A-Z][a-z]*\.[a-z]*|${DATADIR}/&|' ${WRKSRC}/CUnit/Sources/Automated/Automated.c
    @${REINPLACE_CMD} -e '/fprintf/ s|Memory-Dump\.[a-z]*|${DATADIR}/&|' ${WRKSRC}/CUnit/Sources/Framework/MyMem.c

post-install:
    ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libcunit.so.1.0.1

regression-test test: build
    cd ${WRKSRC}/ && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} check

.include <bsd.port.mk>