Lines 1-51
Link Here
|
1 |
# Created by: bremner@unb.ca |
1 |
# Created by: bremner@unb.ca |
2 |
|
2 |
|
3 |
PORTNAME= nauty |
3 |
PORTNAME= nauty |
4 |
PORTVERSION= 27r1 |
4 |
PORTVERSION= 27r3 |
5 |
PORTREVISION= 3 |
|
|
6 |
CATEGORIES= math |
5 |
CATEGORIES= math |
7 |
MASTER_SITES= https://users.cecs.anu.edu.au/~bdm/nauty/ |
6 |
MASTER_SITES= https://users.cecs.anu.edu.au/~bdm/nauty/ |
8 |
DISTNAME= ${PORTNAME}${PORTVERSION} |
7 |
DISTNAME= ${PORTNAME}${PORTVERSION} |
9 |
|
8 |
|
10 |
MAINTAINER= moritz@schmi.tt |
9 |
MAINTAINER= moritz@schmi.tt |
11 |
COMMENT= Nauty & Traces are programs for computing graph automorphisms |
10 |
COMMENT= Nauty & Traces are programs for computing graph automorphism |
12 |
|
11 |
|
13 |
LICENSE= APACHE20 |
12 |
LICENSE= APACHE20 |
14 |
|
13 |
|
15 |
USES= gmake |
14 |
USES= gmake |
16 |
|
15 |
|
17 |
GNU_CONFIGURE= yes |
16 |
GNU_CONFIGURE= yes |
18 |
CONFIGURE_ARGS= --enable-tls # math/libnormaliz requires nauty with tls |
17 |
CONFIGURE_ARGS= --enable-tls # this makes nauty thread-safe, math/libnormaliz requires nauty with tls |
19 |
|
18 |
|
20 |
MAKEFILE= makefile |
19 |
MAKEFILE= makefile |
|
|
20 |
MAKE_ARGS= includedir=${PREFIX}/include/${PORTNAME} # place headers into a dedicated directory |
21 |
|
21 |
|
22 |
TEST_TARGET= check |
22 |
TEST_TARGET= check |
23 |
|
23 |
|
24 |
CFLAGS+= -fPIC |
24 |
OPTIONS_DEFINE= DOCS NATIVE |
25 |
|
25 |
|
26 |
OPTIONS_DEFINE= DOCS |
26 |
NATIVE_DESC= Build with native optimizations (-march=native, etc) |
|
|
27 |
NATIVE_CONFIGURE_ON= --disable-generic --enable-clz --enable-popcnt |
28 |
NATIVE_CONFIGURE_OFF= --enable-generic --disable-clz --disable-popcnt |
27 |
|
29 |
|
28 |
post-build: |
30 |
post-build: # build shared libraries: based on how static libraries are created |
29 |
@cd ${WRKSRC} && ${CC} ${LDFLAGS} -shared -o libnauty.so \ |
31 |
# rebuild .o files with -fPIC |
30 |
gtnauty.o gtools.o gutil1.o gutil2.o naugraph.o naugroup.o naurng.o nausparse.o nautil.o nautinv.o \ |
32 |
@cd ${WRKSRC} ; \ |
31 |
naututil.o nauty.o nautycliquer.o schreier.o traces.o |
33 |
objects=$$(ls *.o) ; \ |
|
|
34 |
${RM} $${objects} ; \ |
35 |
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${_MAKE_JOBS} ${MAKE_ARGS} FREEBSD_EXTRA_CFLAGS="-fPIC" $${objects} |
36 |
# build libraries |
37 |
cd ${WRKSRC} && ${CC} ${LDFLAGS} -shared -o libnauty.so -Wl,-soname,libnauty.so \ |
38 |
nauty.o nautil.o nausparse.o naugraph.o schreier.o naurng.o traces.o gtools.o naututil.o \ |
39 |
nautinv.o gutil1.o gutil2.o gtnauty.o naugroup.o nautycliquer.o |
40 |
cd ${WRKSRC} && ${CC} ${LDFLAGS} -shared -o libnauty1.so -Wl,-soname,libnauty1.so \ |
41 |
nauty1.o nautil1.o nausparse.o naugraph1.o schreier.o naurng.o traces.o gtools.o naututil1.o \ |
42 |
nautinv1.o gutil1.o gutil2.o gtnauty.o naugroup.o nautycliquer.o |
43 |
cd ${WRKSRC} && ${CC} ${LDFLAGS} -shared -o libnautyW.so -Wl,-soname,libnautyW.so \ |
44 |
nautyW.o nautilW.o nausparseW.o naugraphW.o schreierW.o naurng.o traces.o gtoolsW.o naututilW.o \ |
45 |
nautinvW.o gutil1W.o gutil2W.o gtnautyW.o naugroupW.o nautycliquerW.o |
46 |
cd ${WRKSRC} && ${CC} ${LDFLAGS} -shared -o libnautyW1.so -Wl,-soname,libnautyW1.so \ |
47 |
nautyW1.o nautilW1.o nausparseW.o naugraphW1.o schreierW.o naurng.o traces.o gtoolsW.o naututilW1.o \ |
48 |
nautinvW1.o gutil1W1.o gutil2W1.o gtnautyW1.o naugroupW.o nautycliquerW.o |
49 |
cd ${WRKSRC} && ${CC} ${LDFLAGS} -shared -o libnautyL.so -Wl,-soname,libnautyL.so \ |
50 |
nautyL.o nautilL.o nausparseL.o naugraphL.o schreierL.o naurng.o traces.o gtoolsL.o naututilL.o \ |
51 |
nautinvL.o gutil1L.o gutil2L.o gtnautyL.o naugroupL.o nautycliquerL.o |
52 |
cd ${WRKSRC} && ${CC} ${LDFLAGS} -shared -o libnautyL1.so -Wl,-soname,libnautyL1.so \ |
53 |
nautyL1.o nautilL1.o nausparseL.o naugraphL1.o schreierL.o naurng.o traces.o gtoolsL.o naututilL1.o \ |
54 |
nautinvL1.o gutil1L1.o gutil2L1.o gtnautyL1.o naugroupL.o nautycliquerL.o |
32 |
|
55 |
|
33 |
do-install: |
56 |
post-install: |
34 |
${MKDIR} ${STAGEDIR}${PREFIX}/include/nauty |
57 |
# install shared libraries |
35 |
.for h in nauty.h nautycliquer.h nausparse.h traces.h naugroup.h |
58 |
.for l in libnauty.so libnauty1.so libnautyW.so libnautyW1.so libnautyL.so libnautyL1.so |
36 |
${INSTALL_DATA} ${WRKSRC}/${h} ${STAGEDIR}${PREFIX}/include/nauty |
59 |
${INSTALL_LIB} ${WRKSRC}/${l} ${STAGEDIR}${PREFIX}/lib |
37 |
.endfor |
|
|
38 |
# Do not use ${INSTALL_LIB} to strip the library! |
39 |
${INSTALL_DATA} ${WRKSRC}/nauty.a ${STAGEDIR}${PREFIX}/lib/libnauty.a |
40 |
${INSTALL_LIB} ${WRKSRC}/libnauty.so ${STAGEDIR}${PREFIX}/lib |
41 |
.for e in \ |
42 |
NRswitchg addedgeg amtog assembleg biplabg catg complg converseg copyg countg \ |
43 |
cubhamg deledgeg delptg directg dreadnaut dretodot dretog edgetransg genbg genbgL \ |
44 |
geng gengL genquarticg genrang genspecialg gentourng gentreeg hamheuristic labelg linegraphg \ |
45 |
listg multig newedgeg pickg planarg ranlabg shortg showg subdivideg twohamg \ |
46 |
underlyingg vcolg watercluster2 |
47 |
${INSTALL_PROGRAM} ${WRKSRC}/${e} ${STAGEDIR}${PREFIX}/bin |
48 |
.endfor |
60 |
.endfor |
|
|
61 |
# correct the include path in .pc files |
62 |
@${REINPLACE_CMD} -i '' -e 's|-I$${includedir}|&/${PORTNAME}|' ${STAGEDIR}${PREFIX}/libdata/pkgconfig/*.pc |
63 |
# strip executables |
64 |
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/* |
49 |
|
65 |
|
50 |
do-install-DOCS-on: |
66 |
do-install-DOCS-on: |
51 |
@${MKDIR} ${STAGEDIR}${DOCSDIR} |
67 |
@${MKDIR} ${STAGEDIR}${DOCSDIR} |