source: trunk/dports/_resources/port1.0/group/octave-1.0.tcl @ 101750

Last change on this file since 101750 was 101750, checked in by and.damore@…, 7 years ago

octave-1.0 portgroup: check file exists before moving it

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.9 KB
Line 
1# $Id: octave-1.0.tcl 101750 2013-01-18 15:44:51Z and.damore@macports.org $
2#
3# Copyright (c) 2010 The MacPorts Project
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met:
9#
10# 1. Redistributions of source code must retain the above copyright
11#    notice, this list of conditions and the following disclaimer.
12# 2. Redistributions in binary form must reproduce the above copyright
13#    notice, this list of conditions and the following disclaimer in the
14#    documentation and/or other materials provided with the distribution.
15# 3. Neither the name of The MacPorts Project nor the names of its
16#    contributors may be used to endorse or promote products derived from
17#    this software without specific prior written permission.
18#
19# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30#
31#
32# This PortGroup automatically sets up the standard environment for building
33# an octave module.
34#
35# Usage:
36#
37#   PortGroup               octave 1.0
38#   octave.setup            module version
39#
40# where module is the name of the module (e.g. communications) and version is
41# its version.
42
43
44options octave.module
45
46proc octave.setup {module version} {
47    global octave.module
48
49    octave.module               ${module}
50    name                        octave-${module}
51    version                     ${version}
52    categories                  math science
53    homepage                    http://octave.sourceforge.net/${octave.module}/
54    master_sites                sourceforge:octave
55    distname                    ${octave.module}-${version}
56
57    depends_lib                 path:bin/octave:octave
58
59    # octave is not universal
60    universal_variant           no
61
62    livecheck.type              regex
63    livecheck.url               http://octave.sourceforge.net/packages.php
64    livecheck.regex             http://downloads\\.sourceforge\\.net/octave/${octave.module}-(\\d+(\\.\\d+)*)\\.tar
65}
66
67post-destroot {
68    if {[file exists ${destroot}${prefix}/share/octave/octave_packages]} {
69        move ${destroot}${prefix}/share/octave/octave_packages ${destroot}${prefix}/share/octave/octave_packages_${name}
70    }
71}
72
73post-activate {
74    system "${prefix}/bin/octave --eval \"pkg rebuild\""
75}
Note: See TracBrowser for help on using the repository browser.