Ticket #36889: Portfile.diff
File Portfile.diff, 1.9 KB (added by lockhart (Thomas Lockhart), 12 years ago) |
---|
-
Portfile
old new 5 5 6 6 name levmar 7 7 version 2.6 8 revision 28 revision 3 9 9 categories math 10 10 platforms darwin 11 11 license GPL … … 32 32 checksums rmd160 2b29daea12804050c8d3939b8c142d27d36bffc8 \ 33 33 sha256 3bf4ef1ea4475ded5315e8d8fc992a725f2e7940a74ca3b0f9029d9e6e94bad7 34 34 35 depends_lib-append port:atlas36 37 35 # Patch taken from levmar RPM by Eric Smith <eric@brouhaha.com> 38 36 patch.pre_args -p1 39 37 patchfiles patch-Makefile.so.diff 40 38 41 use_configure no 39 default_variants +atlas 42 40 43 41 variant universal {} 44 42 43 variant atlas description {Use MacPorts' ATLAS instead of Accelerate Framework} { 44 depends_lib-append port:atlas 45 } 46 47 if {! [variant_isset atlas]} { 48 conflicts port:atlas 49 } 50 51 global makefile 52 set makefile ${worksrcpath}/Makefile.so 53 54 use_configure no 55 45 56 set ver_major [lindex [split ${version} "."] 0] 46 57 set ver_minor [lindex [split ${version} "."] 1] 47 58 set abi_major 2 48 59 set abi_minor 2 49 60 50 61 post-patch { 51 set fl [open ${ worksrcpath}/Makefile.so]62 set fl [open ${makefile}] 52 63 set lines [read $fl] 53 64 close $fl 54 65 foreach line [split $lines \n] { … … 68 79 return -code error 69 80 } 70 81 82 if {[variant_isset atlas]} { 83 reinplace "s|^LAPACKLIBS=.*$|LAPACKLIBS= -L${prefix}/lib -lsatlas|g" ${makefile} 84 } 85 71 86 reinplace "s|\r||g" ${worksrcpath}/README.txt 72 87 file mkdir ${worksrcpath}/sobj 73 88 } 74 89 75 build.args-append -f Makefile.so90 build.args-append -f ${makefile} 76 91 build.args-append CC="${configure.cc} [get_canonical_archflags cc]" 77 92 build.args-append LDFLAGS+=-Wl,-rpath,${prefix}/lib 78 93 # Add this local rpath to allow port test to run successfully