From 5930109e8ef02d47e1be967f2448c6438b53cbac Mon Sep 17 00:00:00 2001 From: Brendan Fabeny Date: Mon, 9 Jul 2012 11:11:44 +0000 Subject: add math/metis4 to math/Makefile; update math/metis to 5.0.2; add appropriate CONFLICTS, LATEST_LINK, and PORTSCOUT; adjust dependent ports; explicitly note the restrictive license of the metis ports (while here, append the MPI port to *DEPENDS in math/parmetis, rather than using an assignment) PR: 169578 --- math/metis/Makefile | 137 ++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 107 insertions(+), 30 deletions(-) (limited to 'math/metis/Makefile') diff --git a/math/metis/Makefile b/math/metis/Makefile index 2175f2209ac9..e24afd1e2f10 100644 --- a/math/metis/Makefile +++ b/math/metis/Makefile @@ -6,55 +6,132 @@ # PORTNAME= metis -PORTVERSION= 4.0.3 +PORTVERSION= 5.0.2 CATEGORIES= math -MASTER_SITES= http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/ \ - http://www-users.cs.umn.edu/~karypis/metis/metis/files/ +MASTER_SITES= http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/ MAINTAINER= bf@FreeBSD.org COMMENT= A package for unstructured graph partitioning -CONFLICTS= metis-edf-[0-9]* +LICENSE= METIS +LICENSE_NAME= University of Minnesota METIS License +LICENSE_FILE= ${WRKSRC}/LICENSE.txt +LICENSE_PERMS= auto-accept -USE_LDCONFIG= yes +CONFLICTS= metis-4* metis-edf-[0-9]* -PROGRAMS= graphchk kmetis mesh2dual mesh2nodal \ - oemetis onmetis partnmesh partdmesh pmetis +USE_CMAKE= yes -.include +OPTIONS_DEFINE = OPENMP STATIC SHARED + +OPENMP_DESC= multithreading via OpenMP +#PROFILE_DESC= profiling libraries +SHARED_DESC= shared library and dynamically-linked executables +STATIC_DESC= libmetis archive + +OPTIONS_DEFAULT= SHARED STATIC + +.include + +.if ${PORT_OPTIONS:MOPENMP} +.if !empty(CC:T:M*clang*) +IGNORE = : clang does not support OpenMP. Disable the OPENMP option or\ + use another compiler +.endif +CMAKE_ARGS+= -DOPENMP=1 +.endif + +#.if ${PORT_OPTIONS:MPROFILE} +#.if !exists(/usr/lib/libc_p.a) +#IGNORE = : you have enabled the PROFILE option, but have not installed \ +# the base system profiling libraries +#.endif +#ALL_TARGET_PROFILE= metis +#CMAKE_ARGS_PROFILE= -DGPROF=1 +#PLIST_SUB+= PROFILE="" +##PROFILE_FLAGS ?= -pg +#WRKSRC_PROFILE = ${WRKSRC}_PROFILE +#INSTALL_WRKSRC_PROFILE = ${WRKSRC_PROFILE}/libmetis +#.else +#PLIST_SUB+= PROFILE="@comment " +#.endif + +.if ${PORT_OPTIONS:MSHARED} +ALL_TARGET_SHARED= all +CMAKE_ARGS_SHARED= -DSHARED=1 +PLIST_SUB+= SHARED="" .if ${ARCH} == "sparc64" -PICFLAG?= -fPIC +SHARED_FLAGS?= -fPIC +.else +SHARED_FLAGS?= -fpic +.endif +SHLIB_MAJOR?= 2 +CMAKE_ARGS+= -DSHLIB_MAJOR="${SHLIB_MAJOR}" +USE_LDCONFIG= yes +WRKSRC_SHARED= ${WRKSRC}_SHARED +INSTALL_WRKSRC_SHARED= ${WRKSRC_SHARED} .else -PICFLAG?= -fpic +PLIST_SUB+= SHARED="@comment " +.endif + +.if ${PORT_OPTIONS:MSTATIC} +ALL_TARGET_STATIC= metis +PLIST_SUB+= STATIC="" +WRKSRC_STATIC= ${WRKSRC} +INSTALL_WRKSRC_STATIC= ${WRKSRC_STATIC}/libmetis +.else +PLIST_SUB+= STATIC="@comment " .endif post-patch: - ${CP} -R ${WRKSRC} ${WRKSRC}_SHARED + @${REINPLACE_CMD} -e "/^# Add compiler flags/,/^$$/d" \ + -e "/^check_include_file(execinfo.h/d" \ + ${WRKSRC}/GKlib/GKlibSystem.cmake + @${REINPLACE_CMD} -e "\|/home/karypis/|d" \ + ${WRKSRC}/programs/CMakeLists.txt +.for o in SHARED #PROFILE +.if ${PORT_OPTIONS:M${o}} + @${CP} -R ${WRKSRC} ${WRKSRC_${o}} +.endif +.endfor + +do-configure: +.for o in SHARED STATIC #PROFILE +.if ${PORT_OPTIONS:M${o}} + @${PRINTF} "\n\nConfiguring ${o}:\n\n\n" + @cd ${WRKSRC_${o}}; ${SETENV} ${CMAKE_ENV} ${CMAKE_BIN} \ + ${CMAKE_ARGS:C|${CFLAGS}|& ${${o}_FLAGS}|g} ${CMAKE_ARGS_${o}} \ + -DGKLIB_PATH="${WRKSRC_${o}}/GKlib" ${CMAKE_SOURCE_PATH} +.endif +.endfor 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 +.for o in SHARED STATIC #PROFILE +.if ${PORT_OPTIONS:M${o}} + @${PRINTF} "\n\nBuilding ${o}:\n\n\n" + @cd ${WRKSRC_${o}}; ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} \ + ${MAKE_ARGS} ${ALL_TARGET_${o}} +.endif +.endfor check regression-test test: build - cd ${WRKSRC}/Graphs ; ./mtest 4elt.graph + cd ${WRKSRC_SHARED}/graphs ; ../programs/gpmetis ./4elt.graph 5 do-install: - cd ${WRKSRC} ; ${INSTALL_PROGRAM} ${PROGRAMS} ${PREFIX}/bin - @${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 +.for o in SHARED STATIC #PROFILE +.if ${PORT_OPTIONS:M${o}} + @${PRINTF} "\n\nInstalling ${o}:\n\n\n" + @cd ${INSTALL_WRKSRC_${o}}; ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} \ + ${MAKE_ARGS} install +.endif +.endfor + +.if ${PORT_OPTIONS:MDOCS} +PORTDOCS= manual.pdf + +post-install: @${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/Doc/manual.ps ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/manual/manual.pdf ${DOCSDIR} .endif -.include +.include -- cgit v1.2.3