source: trunk/dports/_resources/port1.0/group/pure-1.0.tcl @ 96776

Last change on this file since 96776 was 96776, checked in by blair@…, 7 years ago

group/*: trim trailing whitespace.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 KB
Line 
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: pure-1.0.tcl 96776 2012-08-19 05:52:01Z blair@macports.org $
3#
4# Copyright (c) 2009 The MacPorts Project
5# All rights reserved.
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions are
9# met:
10#
11# 1. Redistributions of source code must retain the above copyright
12#    notice, this list of conditions and the following disclaimer.
13# 2. Redistributions in binary form must reproduce the above copyright
14#    notice, this list of conditions and the following disclaimer in the
15#    documentation and/or other materials provided with the distribution.
16# 3. Neither the name of The MacPorts Project nor the names of its
17#    contributors may be used to endorse or promote products derived from
18#    this software without specific prior written permission.
19#
20# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31#
32#
33# This PortGroup automatically sets up the standard environment for building
34# a module for the Pure language.
35#
36# Usage:
37#
38#   PortGroup               pure 1.0
39#   pure.setup              module version
40#
41# where module is the name of the module (e.g. gsl) and version is its
42# version.
43
44
45proc pure.setup {module version} {
46    global name homepage
47
48    name                        pure-${module}
49    version                     ${version}
50    homepage                    http://code.google.com/p/pure-lang/wiki/Addons#${name}
51    master_sites                googlecode:pure-lang
52
53    depends_lib                 path:lib/libpure.dylib:pure
54
55    use_configure               no
56
57    use_parallel_build          yes
58    pre-build {
59        build.args-append       CC=${configure.cc} \
60                                CFLAGS="${configure.cflags} ${configure.cc_archflags}" \
61                                CPPFLAGS="${configure.cppflags}" \
62                                CXX=${configure.cxx} \
63                                CXXFLAGS="${configure.cxxflags} ${configure.cxx_archflags}" \
64                                LDFLAGS="${configure.ldflags} ${configure.ld_archflags}"
65    }
66
67    post-destroot {
68        xinstall -d ${destroot}${prefix}/share/doc/${name}
69        foreach f {COPYING README} {
70            if {[file exists ${worksrcpath}/${f}]} {
71                xinstall -m 644 ${worksrcpath}/${f} ${destroot}${prefix}/share/doc/${name}
72            }
73        }
74        if {[file exists ${worksrcpath}/examples]} {
75            xinstall -d ${destroot}${prefix}/share/examples
76            copy ${worksrcpath}/examples ${destroot}${prefix}/share/examples/${name}
77        }
78    }
79
80    livecheck.type              regex
81    default livecheck.url       {http://code.google.com/p/pure-lang/downloads/list?q=${name}&sort=filename}
82    default livecheck.regex     {${name}-(\[0-9.\]+)\\.tar}
83}
Note: See TracBrowser for help on using the repository browser.