[87371] trunk/dports/lang/pure/Portfile

ryandesign at macports.org ryandesign at macports.org
Fri Nov 18 17:01:14 PST 2011


Revision: 87371
          http://trac.macports.org/changeset/87371
Author:   ryandesign at macports.org
Date:     2011-11-18 17:01:14 -0800 (Fri, 18 Nov 2011)
Log Message:
-----------
pure: whitespace changes and other minor rearrangement that won't affect what the port installs, in preparation for integrating pure-mode.el as a subport

Modified Paths:
--------------
    trunk/dports/lang/pure/Portfile

Modified: trunk/dports/lang/pure/Portfile
===================================================================
--- trunk/dports/lang/pure/Portfile	2011-11-19 00:34:04 UTC (rev 87370)
+++ trunk/dports/lang/pure/Portfile	2011-11-19 01:01:14 UTC (rev 87371)
@@ -13,93 +13,98 @@
 use_parallel_build      yes
 homepage                http://pure-lang.googlecode.com/
 master_sites            ${homepage}files/
+distname                pure-${version}
+dist_subdir             pure
 
-description \
-    functional programming language based on term rewriting
+description             functional programming language based on term rewriting
 
-long_description \
-    Pure is a functional programming language based on term rewriting. \
-    It has a modern syntax featuring curried function applications, lexical \
-    closures and equational definitions with pattern matching, and thus is \
-    somewhat similar to languages of the Haskell and ML variety. But Pure is \
-    also a very dynamic and reflective language, and is more like Lisp in \
-    this respect. The interpreter has an LLVM backend to do JIT compilation, \
-    hence programs run blazingly fast and interfacing to C modules is easy. \
-    The libraries are licensed under LGPL-3, the interpreter is GPL-3, and \
-    the examples are BSD-licensed.
+long_description        Pure is a functional programming language based on \
+                        term rewriting. It has a modern syntax featuring \
+                        curried function applications, lexical closures and \
+                        equational definitions with pattern matching, and \
+                        thus is somewhat similar to languages of the Haskell \
+                        and ML variety. But Pure is also a very dynamic and \
+                        reflective language, and is more like Lisp in this \
+                        respect. The interpreter has an LLVM backend to do \
+                        JIT compilation, hence programs run blazingly fast \
+                        and interfacing to C modules is easy. The libraries \
+                        are licensed under LGPL-3, the interpreter is GPL-3, \
+                        and the examples are BSD-licensed.
 
-use_autoreconf          yes
-
 checksums               rmd160  644c235fa4f385edce0020d869194f68d621bf7a \
                         sha256  c8f370f29a156e1b2960316365da8887d9f76b7d0f75a66604d5031c5f1858a2
 
-depends_lib \
-    port:llvm \
-    port:gmp \
-    port:libiconv \
-    port:libtool \
-    port:mpfr \
-    port:readline
-
-depends_run \
-    path:bin/w3m:w3m
-
-# llvm is not universal
-universal_variant       no
-
-configure.args          --without-elisp
-
-platform macosx {
-    depends_run-replace s|path:bin/w3m:w3m|path:bin/openbrowser:openbrowser|
-    patchfiles-append   patch-openbrowser.diff
-}
-
-platform powerpc {
-    configure.args-append --disable-fastcc
-}
-
-pre-configure {
-    if {"i386" == ${os.arch}} {
-        set arch Intel
-        set llvm_minimum_version 2.5
-    } else {
-        set arch PowerPC
-        set llvm_minimum_version 2.6
+if {${name} == ${subport}} {
+    depends_lib                 port:gmp \
+                                port:libiconv \
+                                port:libtool \
+                                port:llvm \
+                                port:mpfr \
+                                port:readline
+    
+    depends_run                 path:bin/w3m:w3m
+    
+    # llvm is not universal
+    universal_variant           no
+    
+    use_autoreconf              yes
+    
+    configure.args              --without-elisp
+    
+    platform macosx {
+        depends_run-replace s|path:bin/w3m:w3m|path:bin/openbrowser:openbrowser|
+        patchfiles-append       patch-openbrowser.diff
     }
-    set llvm_installed_version [exec ${prefix}/bin/llvm-config --version]
-    if {[rpm-vercomp ${llvm_installed_version} ${llvm_minimum_version}] < 0} {
-        ui_error "${name} ${version} requires llvm ${llvm_minimum_version} or later on ${arch} but you have llvm ${llvm_installed_version}."
-        return -code error "incompatible llvm version"
+    
+    platform powerpc {
+        configure.args-append   --disable-fastcc
     }
-    set llvm_cflags [exec ${prefix}/bin/llvm-config --cflags]
-    if {-1 != [string first -mdynamic-no-pic ${llvm_cflags}]} {
-        ui_error "${name} ${version} requires llvm be compiled using position-independent code (PIC)"
-        return -code error "incompatible llvm installation"
+    
+    pre-configure {
+        if {"i386" == ${os.arch}} {
+            set arch Intel
+            set llvm_minimum_version 2.5
+        } else {
+            set arch PowerPC
+            set llvm_minimum_version 2.6
+        }
+        set llvm_installed_version [exec ${prefix}/bin/llvm-config --version]
+        if {[rpm-vercomp ${llvm_installed_version} ${llvm_minimum_version}] < 0} {
+            ui_error "${name} ${version} requires llvm ${llvm_minimum_version} or later on ${arch} but you have llvm ${llvm_installed_version}."
+            return -code error "incompatible llvm version"
+        }
+        set llvm_cflags [exec ${prefix}/bin/llvm-config --cflags]
+        if {-1 != [string first -mdynamic-no-pic ${llvm_cflags}]} {
+            ui_error "${name} ${version} requires llvm be compiled using position-independent code (PIC)"
+            return -code error "incompatible llvm installation"
+        }
+        
+        # http://groups.google.com/group/pure-lang/msg/109b9577a084bc08
+        if {[file exists ${prefix}/lib/libLLVM-${llvm_installed_version}.dylib]} {
+            configure.ldflags-append -lLLVM-${llvm_installed_version}
+        }
     }
     
-    # http://groups.google.com/group/pure-lang/msg/109b9577a084bc08
-    if {[file exists ${prefix}/lib/libLLVM-${llvm_installed_version}.dylib]} {
-        configure.ldflags-append -lLLVM-${llvm_installed_version}
+    post-destroot {
+        set docdir ${destroot}${prefix}/share/doc/${name}
+        xinstall -d ${docdir} ${destroot}${prefix}/share/examples
+        xinstall -W ${destroot.dir} -m 644 \
+            COPYING \
+            COPYING.LESSER \
+            ChangeLog \
+            NEWS \
+            README \
+            TODO \
+            ${docdir}
+        copy ${destroot.dir}/examples ${destroot}${prefix}/share/examples/${name}
     }
+    
+    test.run                    yes
+    test.target                 check
+    
+    livecheck.type              regex
+    livecheck.url               http://code.google.com/p/pure-lang/downloads/list
+    livecheck.regex             ${name}-(\[0-9.\]+\[a-z\]*)\\.tar
+} else {
+    livecheck.type              none
 }
-
-post-destroot {
-    set docdir ${destroot}${prefix}/share/doc/${name}
-    xinstall -d ${docdir} ${destroot}${prefix}/share/examples
-    xinstall -W ${destroot.dir} -m 644 \
-        COPYING \
-        COPYING.LESSER \
-        ChangeLog \
-        NEWS \
-        README \
-        TODO \
-        ${docdir}
-    copy ${destroot.dir}/examples ${destroot}${prefix}/share/examples/${name}
-}
-
-test.run                yes
-test.target             check
-
-livecheck.type          regex
-livecheck.url           http://code.google.com/p/pure-lang/downloads/list
-livecheck.regex         ${name}-(\[0-9.\]+\[a-z\]*)\\.tar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111118/85c7f60a/attachment.html>


More information about the macports-changes mailing list