Ticket #35018: Portfile.diff
File Portfile.diff, 4.7 KB (added by zan@…, 12 years ago) |
---|
-
Portfile
old new 1 # $Id: Portfile 84527 2011-09-27 18:05:29Z jmr@macports.org $ 1 # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 2 # $Id$ 2 3 3 PortSystem 4 PortSystem 1.0 4 5 5 6 name metis 6 version 4.0.3 7 revision 1 7 version 5.0.2 8 8 categories math 9 9 # Included license is for "evaluation purposes" only (whatever that means) if 10 10 # you're not a non-profit or US government agency. … … 19 19 and \[KK95e\]. METIS provides high quality partitions, is extremely fast, and \ 20 20 produces low fill orderings. 21 21 22 homepage http://glaros.dtc.umn.edu/gkhome/metis/metis/overview22 homepage http://glaros.dtc.umn.edu/gkhome/metis/metis/overview 23 23 master_sites http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/ freebsd 24 24 25 # 4.0.3 was stealth-updated (#28930) 26 dist_subdir ${name}/${version}_${revision} 25 checksums sha1 b5a278fa06c581e068a8296d158576a4b750f983 \ 26 rmd160 737bac9b1c50ea0cf950d16c44ef8f7f9fa0b8f8 27 27 28 checksums sha1 63303786414a857eaeea2b2a006521401bccda5e \ 29 rmd160 9d67c92a2a90ece012443fa623442027c0c21297 30 31 patchfiles patch-Makefile.diff 32 33 build.target 34 35 # Prevent -lmetis from finding library ${prefix}/lib 28 # Metis uses a GNU make file to fire off a cmake command. 29 # Used for configure, build, and install. 30 depends_build port:cmake 31 32 # Building static 33 configure.cmd /usr/bin/make 34 configure.pre_args {} 35 configure.args config \ 36 cc=${configure.cc} \ 37 prefix=${prefix} 36 38 configure.ldflags-delete -L${prefix}/lib 37 39 38 set ver0 [join [lrange [split ${version} .] 0 0] .] 39 set ver1 [join [lrange [split ${version} .] 0 1] .] 40 configure.universal_args {} 40 41 41 configure { 42 # ensure that the correct compiler and compiler options are used. 43 set optflags ${configure.cflags} 44 set ldflags ${configure.ldflags} 45 46 if {[variant_isset universal]} { 47 append optflags " " ${configure.universal_cflags} 48 append ldflags " " ${configure.universal_ldflags} 49 } else { 50 append optflags " " ${configure.cc_archflags} 51 append ldflags " " ${configure.cc_archflags} 52 } 42 build.cmd /usr/bin/make 43 build.pre_args {} 44 build.args {} 45 46 destroot.cmd /usr/bin/make 47 destroot.pre_args {} 48 destroot.args install 49 50 post-destroot { 51 # Move metis.h to include/metis/metis.h 52 xinstall -d -m 755 ${destroot}${prefix}/include/metis 53 file rename ${destroot}${prefix}/include/metis.h \ 54 ${destroot}${prefix}/include/metis/metis.h 53 55 54 reinplace "s|CC = .*|CC = ${configure.cc}|" ${worksrcpath}/Makefile.in 55 reinplace "s|OPTFLAGS = .*|OPTFLAGS = ${optflags}|" ${worksrcpath}/Makefile.in 56 if { [info exists ldflags] } { 57 reinplace "s|LDOPTIONS = .*|LDOPTIONS = ${ldflags}|" ${worksrcpath}/Makefile.in 58 } 59 60 reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/Makefile 61 reinplace "s|__VERSION__|${version}|g" ${worksrcpath}/Lib/Makefile 62 reinplace "s|__COMPAT_VER__|${ver0}|g" ${worksrcpath}/Lib/Makefile 63 } 64 65 destroot { 66 xinstall -m 755 -d ${destroot}${prefix}/include/metis \ 67 ${destroot}${prefix}/share/doc/${name} 68 xinstall -m 755 -W ${worksrcpath} graphchk kmetis mesh2dual mesh2nodal \ 69 oemetis onmetis partdmesh partnmesh pmetis ${destroot}${prefix}/bin 70 xinstall -W ${worksrcpath}/Lib -m 644 defs.h macros.h metis.h proto.h rename.h \ 71 struct.h ${destroot}${prefix}/include/metis 72 reinplace "s,#include <defs.h>,#include <metis/defs.h>," ${destroot}${prefix}/include/metis/metis.h 73 reinplace "s,#include <struct.h>,#include <metis/struct.h>," ${destroot}${prefix}/include/metis/metis.h 74 reinplace "s,#include <macros.h>,#include <metis/macros.h>," ${destroot}${prefix}/include/metis/metis.h 75 reinplace "s,#include <rename.h>,#include <metis/rename.h>," ${destroot}${prefix}/include/metis/metis.h 76 reinplace "s,#include <proto.h>,#include <metis/proto.h>," ${destroot}${prefix}/include/metis/metis.h 77 xinstall -m 644 ${worksrcpath}/libmetis.a ${destroot}${prefix}/lib 78 xinstall -m 644 ${worksrcpath}/Doc/manual.ps \ 56 # Install documentation 57 xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name} 58 xinstall -m 644 ${worksrcpath}/manual/manual.pdf \ 79 59 ${destroot}${prefix}/share/doc/${name} 60 } 80 61 81 xinstall -m 0755 ${worksrcpath}/libmetis.dylib ${destroot}${prefix}/lib/libmetis.${version}.dylib 82 ln -s libmetis.${version}.dylib ${destroot}${prefix}/lib/libmetis.dylib 83 ln -s libmetis.${version}.dylib ${destroot}${prefix}/lib/libmetis.${ver0}.dylib 84 ln -s libmetis.${version}.dylib ${destroot}${prefix}/lib/libmetis.${ver1}.dylib 62 variant openmpi description {Build Metis with MPI support} { 63 depends_build-append port:openmpi 64 configure.args-append openmp=1 85 65 } 86 66 87 67 livecheck.type regex