source: trunk/dports/lang/pure-devel/Portfile @ 57375

Last change on this file since 57375 was 57375, checked in by ryandesign@…, 11 years ago

Change deprecated livecheck.check to livecheck.type
See http://lists.macosforge.org/pipermail/macports-dev/2009-August/009699.html

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 KB
Line 
1# $Id: Portfile 57375 2009-09-10 08:16:41Z ryandesign@macports.org $
2
3PortSystem              1.0
4
5name                    pure-devel
6conflicts               pure
7version                 0.34.0.r2195
8set branch              [join [lrange [split ${version} .] 0 1] .]
9categories              lang
10platforms               darwin
11maintainers             ryandesign
12use_parallel_build      yes
13homepage                http://pure-lang.googlecode.com/
14master_sites            ${homepage}files/
15universal_variant       no
16
17fetch.type              svn
18svn.url                 ${homepage}svn/trunk/pure
19svn.tag                 [strsed ${version} {g/^.*\.r//}]
20worksrcdir              pure
21
22description \
23    functional programming language based on term rewriting
24
25long_description \
26    Pure is a functional programming language based on term rewriting. \
27    It has a modern syntax featuring curried function applications, lexical \
28    closures and equational definitions with pattern matching, and thus is \
29    somewhat similar to languages of the Haskell and ML variety. But Pure is \
30    also a very dynamic and reflective language, and is more like Lisp in \
31    this respect. The interpreter has an LLVM backend to do JIT compilation, \
32    hence programs run blazingly fast and interfacing to C modules is easy.
33
34# svn, bison and flex aren't needed for released tarballs
35# svn is really a fetch dependency, but there isn't a depends_fetch
36depends_build \
37    path:bin/llvm-config:llvm \
38    bin:svn:subversion \
39    port:bison \
40    port:flex
41
42depends_lib \
43    port:gmp \
44    port:gsl \
45    port:libiconv \
46    port:libtool \
47    port:readline
48
49depends_run \
50    path:bin/w3m:w3m
51
52patchfiles \
53    patch-Makefile.in.diff
54
55configure.args \
56    --enable-release \
57    --enable-gsl
58
59platform macosx {
60    depends_run-delete  path:bin/w3m:w3m
61    depends_run-append  path:bin/openbrowser:openbrowser
62    patchfiles-append   patch-openbrowser.diff
63}
64
65pre-extract {
66    set llvm_minimum_version 2.4
67    set llvm_installed_version [exec llvm-config --version]
68    if {[rpm-vercomp ${llvm_installed_version} ${llvm_minimum_version}] < 0} {
69        ui_error "${name} ${version} requires llvm ${llvm_minimum_version} or later but you have llvm ${llvm_installed_version}."
70        return -code error "incompatible llvm version"
71    }
72}
73
74test.run                yes
75test.target             check
76
77post-destroot {
78    # Check for old modules.
79    set old_files {}
80    foreach dir [glob -nocomplain -type d -tails -directory ${prefix}/lib pure-*] {
81        if {"pure-${branch}" == ${dir}} continue
82        if {![regexp "^pure-\[0-9.\]+$" ${dir}]} continue
83        foreach file [glob -type f -directory ${prefix}/lib/${dir} *] {
84            lappend old_files ${file}
85        }
86    }
87    set old_ports {}
88    if {[llength ${old_files}] > 0} {
89        foreach provides [split [eval exec ${prefix}/bin/port provides ${old_files}] "\n"] {
90            set old_port [lindex [split ${provides}] end]
91            if {-1 == [lsearch -glob ${old_ports} ${old_port}]} {
92                lappend old_ports ${old_port}
93            }
94        }
95    }
96    if {[llength ${old_ports}] > 0} {
97        ui_msg "Some of your pure modules were built for a different version of pure."
98        ui_msg "To use them with version ${branch}, you must rebuild them by running this command:"
99        ui_msg ""
100        ui_msg "sudo port -nf upgrade [join ${old_ports} " "]"
101    }
102}
103
104livecheck.version       [strsed ${version} {g/\.0\.r.*$//}]
105livecheck.type          regex
106livecheck.url           ${svn.url}/configure.ac
107livecheck.regex         {pure, ([0-9.]+)}
Note: See TracBrowser for help on using the repository browser.