summaryrefslogtreecommitdiffstats
path: root/math/metis4/Makefile
blob: 5160ae968fe03f21f233bb093ba66422ad38f6b6 (plain)
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
# Created by: Pedro Giffuni <giffunip@asme.org>
# $FreeBSD$

PORTNAME=	metis4
PORTVERSION=	4.0.3
PORTREVISION=	1
CATEGORIES=	math
MASTER_SITES=	http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD/
DISTNAME=	metis-${PORTVERSION}

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

LICENSE=	METIS
LICENSE_NAME=	University of Minnesota METIS License
LICENSE_FILE=	${WRKSRC}/LICENSE
LICENSE_PERMS=	auto-accept

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

USE_LDCONFIG=	yes

PORTSCOUT=	limit:4.*
PROGRAMS=	graphchk kmetis mesh2dual mesh2nodal	\
		oemetis onmetis partnmesh partdmesh pmetis

OPTIONS_DEFINE=	DOCS

.include <bsd.port.pre.mk>

.if ${ARCH} == "sparc64"
PICFLAG?=	-fPIC
.else
PICFLAG?=	-fpic
.endif

post-patch:
	${CP} -R ${WRKSRC} ${WRKSRC}_SHARED

do-build:
	@cd ${WRKSRC} ; ${SETENV} ${MAKE_ENV} \
	COPTIONS="${CFLAGS}" LDOPTIONS="${LDFLAGS}" \
	${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS}
	@cd ${WRKSRC}_SHARED ; ${SETENV} ${MAKE_ENV} \
	COPTIONS="${CFLAGS} ${PICFLAG}" LDOPTIONS="${LDFLAGS} ${PICFLAG}" \
	${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} ; \
	${LD} -Bshareable -o libmetis.so.1 -x -soname libmetis.so.1 \
	--whole-archive libmetis.a --no-whole-archive

check regression-test test: build
	cd ${WRKSRC}/Graphs ; ./mtest 4elt.graph

do-install:
	cd ${WRKSRC} ; ${INSTALL_PROGRAM} ${PROGRAMS} ${STAGEDIR}${PREFIX}/bin
	@${MKDIR} ${STAGEDIR}${PREFIX}/include/metis
	${INSTALL_DATA} ${WRKSRC}/Lib/*.h    ${STAGEDIR}${PREFIX}/include/metis
	${INSTALL_DATA} ${WRKSRC}/libmetis.a ${STAGEDIR}${PREFIX}/lib
	${INSTALL_DATA} ${WRKSRC}_SHARED/libmetis.so.1 ${STAGEDIR}${PREFIX}/lib
	${LN} -sf libmetis.so.1 ${STAGEDIR}${PREFIX}/lib/libmetis.so
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libmetis.so
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/Doc/manual.ps ${STAGEDIR}${DOCSDIR}

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud