Lines 1-8
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} |
Lines 15-51
LICENSE= APACHE20
Link Here
|
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 |
21 |
|
20 |
|
|
|
21 |
CFLAGS+= -pthread |
22 |
|
22 |
TEST_TARGET= check |
23 |
TEST_TARGET= check |
23 |
|
24 |
|
24 |
CFLAGS+= -fPIC |
25 |
MAKE_ARGS= includedir=${PREFIX}/include/${PORTNAME} # place headers into a dedicated directory |
25 |
|
26 |
|
26 |
OPTIONS_DEFINE= DOCS |
27 |
OPTIONS_DEFINE= DOCS NATIVE |
27 |
|
28 |
|
28 |
post-build: |
29 |
NATIVE_DESC= Build with native optimizations (-march=native, etc) |
29 |
@cd ${WRKSRC} && ${CC} ${LDFLAGS} -shared -o libnauty.so \ |
30 |
NATIVE_CONFIGURE_ON= --disable-generic --enable-clz --enable-popcnt |
30 |
gtnauty.o gtools.o gutil1.o gutil2.o naugraph.o naugroup.o naurng.o nausparse.o nautil.o nautinv.o \ |
31 |
NATIVE_CONFIGURE_OFF= --enable-generic --disable-clz --disable-popcnt |
31 |
naututil.o nauty.o nautycliquer.o schreier.o traces.o |
|
|
32 |
|
32 |
|
33 |
do-install: |
33 |
post-build: # build shared libraries: based on how static libraries are created |
34 |
${MKDIR} ${STAGEDIR}${PREFIX}/include/nauty |
34 |
# rebuild .o files with -fPIC |
35 |
.for h in nauty.h nautycliquer.h nausparse.h traces.h naugroup.h |
35 |
@cd ${WRKSRC} ; \ |
36 |
${INSTALL_DATA} ${WRKSRC}/${h} ${STAGEDIR}${PREFIX}/include/nauty |
36 |
objects=$$(ls *.o) ; \ |
37 |
.endfor |
37 |
${RM} *.o ; \ |
38 |
# Do not use ${INSTALL_LIB} to strip the library! |
38 |
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${_MAKE_JOBS} ${MAKE_ARGS} FREEBSD_EXTRA_CFLAGS="-fPIC" $${objects} |
39 |
${INSTALL_DATA} ${WRKSRC}/nauty.a ${STAGEDIR}${PREFIX}/lib/libnauty.a |
39 |
# build libraries |
40 |
${INSTALL_LIB} ${WRKSRC}/libnauty.so ${STAGEDIR}${PREFIX}/lib |
40 |
cd ${WRKSRC} && ${CC} ${LDFLAGS} -shared -o libnauty.so -Wl,-soname,libnauty.so \ |
41 |
.for e in \ |
41 |
nauty.o nautil.o nausparse.o naugraph.o schreier.o naurng.o traces.o gtools.o naututil.o \ |
42 |
NRswitchg addedgeg amtog assembleg biplabg catg complg converseg copyg countg \ |
42 |
nautinv.o gutil1.o gutil2.o gtnauty.o naugroup.o \ |
43 |
cubhamg deledgeg delptg directg dreadnaut dretodot dretog edgetransg genbg genbgL \ |
43 |
nautycliquer.o |
44 |
geng gengL genquarticg genrang genspecialg gentourng gentreeg hamheuristic labelg linegraphg \ |
44 |
cd ${WRKSRC} && ${CC} ${LDFLAGS} -shared -o libnauty1.so -Wl,-soname,libnauty1.so \ |
45 |
listg multig newedgeg pickg planarg ranlabg shortg showg subdivideg twohamg \ |
45 |
nauty1.o nautil1.o nausparse.o naugraph1.o schreier.o naurng.o traces.o gtools.o naututil1.o \ |
46 |
underlyingg vcolg watercluster2 |
46 |
nautinv1.o gutil1.o gutil2.o gtnauty.o naugroup.o nautycliquer.o |
47 |
${INSTALL_PROGRAM} ${WRKSRC}/${e} ${STAGEDIR}${PREFIX}/bin |
47 |
cd ${WRKSRC} && ${CC} ${LDFLAGS} -shared -o libnautyW.so -Wl,-soname,libnautyW.so \ |
|
|
48 |
nautyW.o nautilW.o nausparseW.o naugraphW.o schreierW.o naurng.o traces.o gtoolsW.o naututilW.o \ |
49 |
nautinvW.o gutil1W.o gutil2W.o gtnautyW.o naugroupW.o nautycliquerW.o |
50 |
cd ${WRKSRC} && ${CC} ${LDFLAGS} -shared -o libnautyW1.so -Wl,-soname,libnautyW1.so \ |
51 |
nautyW1.o nautilW1.o nausparseW.o naugraphW1.o schreierW.o naurng.o traces.o gtoolsW.o naututilW1.o \ |
52 |
nautinvW1.o gutil1W1.o gutil2W1.o gtnautyW1.o naugroupW.o nautycliquerW.o |
53 |
cd ${WRKSRC} && ${CC} ${LDFLAGS} -shared -o libnautyL.so -Wl,-soname,libnautyL.so \ |
54 |
nautyL.o nautilL.o nausparseL.o naugraphL.o schreierL.o naurng.o traces.o gtoolsL.o naututilL.o \ |
55 |
nautinvL.o gutil1L.o gutil2L.o gtnautyL.o naugroupL.o nautycliquerL.o |
56 |
cd ${WRKSRC} && ${CC} ${LDFLAGS} -shared -o libnautyL1.so -Wl,-soname,libnautyL1.so \ |
57 |
nautyL1.o nautilL1.o nausparseL.o naugraphL1.o schreierL.o naurng.o traces.o gtoolsL.o naututilL1.o \ |
58 |
nautinvL1.o gutil1L1.o gutil2L1.o gtnautyL1.o naugroupL.o nautycliquerL.o |
59 |
|
60 |
post-install: |
61 |
# install shared libraries |
62 |
.for l in libnauty.so libnauty1.so libnautyW.so libnautyW1.so libnautyL.so libnautyL1.so |
63 |
${INSTALL_LIB} ${WRKSRC}/${l} ${STAGEDIR}${PREFIX}/lib |
48 |
.endfor |
64 |
.endfor |
|
|
65 |
# strip executables |
66 |
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/* |
49 |
|
67 |
|
50 |
do-install-DOCS-on: |
68 |
do-install-DOCS-on: |
51 |
@${MKDIR} ${STAGEDIR}${DOCSDIR} |
69 |
@${MKDIR} ${STAGEDIR}${DOCSDIR} |