aboutsummaryrefslogtreecommitdiff
path: root/math/nauty/Makefile
blob: 40c055e44331c12eb9bed6680d3d0ae8d296c2f5 (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
# Created by: bremner@unb.ca

PORTNAME=	nauty
PORTVERSION=	27r1
PORTREVISION=	2
CATEGORIES=	math
MASTER_SITES=	https://users.cecs.anu.edu.au/~bdm/nauty/
DISTNAME=	${PORTNAME}${PORTVERSION}

MAINTAINER=	moritz@schmi.tt
COMMENT=	Nauty & Traces are programs for computing graph automorphisms

LICENSE=	APACHE20

USES=		gmake

GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--enable-tls # math/libnormaliz requires nauty with tls

MAKEFILE=	makefile

TEST_TARGET=	check

CFLAGS+=	-fPIC

OPTIONS_DEFINE=	DOCS

post-build:
	@cd ${WRKSRC} && ${CC} ${LDFLAGS} -shared -o libnauty.so \
		gtnauty.o gtools.o gutil1.o gutil2.o naugraph.o naugroup.o naurng.o nausparse.o nautil.o nautinv.o \
		naututil.o nauty.o nautycliquer.o schreier.o traces.o

do-install:
	${MKDIR} ${STAGEDIR}${PREFIX}/include/nauty
.for h in  nauty.h nausparse.h traces.h naugroup.h
	${INSTALL_DATA} ${WRKSRC}/${h} ${STAGEDIR}${PREFIX}/include/nauty
.endfor
	# Do not use ${INSTALL_LIB} to strip the library!
	${INSTALL_DATA} ${WRKSRC}/nauty.a ${STAGEDIR}${PREFIX}/lib/libnauty.a
	${INSTALL_LIB} ${WRKSRC}/libnauty.so ${STAGEDIR}${PREFIX}/lib
.for e in \
	NRswitchg addedgeg amtog assembleg biplabg catg complg converseg copyg countg \
	cubhamg deledgeg delptg directg dreadnaut dretodot dretog edgetransg genbg genbgL \
	geng gengL genquarticg genrang genspecialg gentourng gentreeg hamheuristic labelg linegraphg \
	listg multig newedgeg pickg planarg ranlabg shortg showg subdivideg twohamg \
	underlyingg vcolg watercluster2
	${INSTALL_PROGRAM} ${WRKSRC}/${e} ${STAGEDIR}${PREFIX}/bin
.endfor

do-install-DOCS-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_MAN} ${WRKSRC}/nug27.pdf ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>