aboutsummaryrefslogtreecommitdiffstats
path: root/math/metis/Makefile
blob: 323efb7741952d0ec41c3220b9d4ef2d9b59a5d7 (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
# New ports collection makefile for:    METIS
# Date created:         26 Oct 97
# Whom:                 Pedro Giffuni <giffunip@asme.org>
#
# $FreeBSD$
#

PORTNAME=   metis
PORTVERSION=    4.0.3
CATEGORIES= math
MASTER_SITES=   http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/    \
        http://www-users.cs.umn.edu/~karypis/metis/metis/files/

MAINTAINER= bf@FreeBSD.org
COMMENT=    A package for unstructured graph partitioning

CONFLICTS=  metis-edf-[0-9]*

ALL_TARGET=
USE_LDCONFIG=   yes

PROGRAMS=   graphchk kmetis mesh2dual mesh2nodal    \
        oemetis onmetis partnmesh partdmesh pmetis

.include <bsd.port.pre.mk>
.if ${ARCH} == "sparc64"
PICFLAG?=   -fPIC
.else
PICFLAG?=   -fpic
.endif

post-patch:
    ${MKDIR} ${WRKSRC}_SHARED ; ${CP} -r ${WRKSRC}/* ${WRKSRC}_SHARED

do-build:
    cd ${WRKSRC} ; ${MAKE}
    cd ${WRKSRC}_SHARED ; ${SETENV} CFLAGS="${CFLAGS} ${PICFLAG}" ${MAKE} ; ld -Bshareable -o libmetis.so.1 -x -soname libmetis.so.1 --whole-archive libmetis.a

do-install:
.for p in ${PROGRAMS}
    ${INSTALL_PROGRAM} ${WRKSRC}/${p} ${PREFIX}/bin
.endfor
    @${MKDIR} ${PREFIX}/include/metis
    ${INSTALL_DATA} ${WRKSRC}/Lib/*.h    ${PREFIX}/include/metis
    ${INSTALL_DATA} ${WRKSRC}/libmetis.a ${PREFIX}/lib
    ${INSTALL_DATA} ${WRKSRC}_SHARED/libmetis.so.1 ${PREFIX}/lib
    ${LN} -sf libmetis.so.1 ${PREFIX}/lib/libmetis.so

.ifndef NOPORTDOCS
    @${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/Doc/manual.ps ${DOCSDIR}
.endif

.include <bsd.port.post.mk>