source: trunk/dports/_resources/port1.0/group/python31-1.0.tcl @ 102237

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

print deprecation warning in python31 portgroup

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.3 KB
Line 
1# et:ts=4
2# python31-1.0.tcl
3#
4# $Id: python31-1.0.tcl 102237 2013-01-29 15:47:26Z jmr@macports.org $
5#
6# Copyright (c) 2007 Markus W. Weissman <mww@macports.org>,
7# All rights reserved.
8#
9# Redistribution and use in source and binary forms, with or without
10# modification, are permitted provided that the following conditions are
11# met:
12#
13# 1. Redistributions of source code must retain the above copyright
14#    notice, this list of conditions and the following disclaimer.
15# 2. Redistributions in binary form must reproduce the above copyright
16#    notice, this list of conditions and the following disclaimer in the
17#    documentation and/or other materials provided with the distribution.
18# 3. Neither the name of Apple Computer, Inc. nor the names of its
19#    contributors may be used to endorse or promote products derived from
20#    this software without specific prior written permission.
21#
22# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33#
34
35# This PortGroup is DEPRECATED. Please do not use for new development.
36# Please switch existing ports using this to 'PortGroup python 1.0' (which
37# supports multiple python versions) at your earliest convenience.
38
39pre-archivefetch {
40    ui_warn "The $name port is using the deprecated 'python31'\
41PortGroup, which will be disabled in the near future and eventually removed.\
42The maintainer should switch to the 'python' PortGroup."
43}
44
45set python.branch       3.1
46set python.prefix       ${frameworks_dir}/Python.framework/Versions/${python.branch}
47set python.bin          ${python.prefix}/bin/python${python.branch}
48set python.lib          ${python.prefix}/Python
49set python.libdir       ${python.prefix}/lib/python${python.branch}
50set python.pkgd         ${python.prefix}/lib/python${python.branch}/site-packages
51set python.include      ${python.prefix}/include/python${python.branch}
52
53categories              python
54
55dist_subdir             python
56
57depends_lib             port:python31
58
59# we want the default universal variant added despite not using configure
60use_configure   no
61universal_variant yes
62
63build.cmd               ${python.bin} setup.py --no-user-cfg
64build.target    build
65options python.add_archflags
66default python.add_archflags yes
67pre-build {
68    if {${python.add_archflags}} {
69        if {[variant_exists universal] && [variant_isset universal]} {
70            build.env-append CFLAGS="${configure.universal_cflags}" \
71                             OBJCFLAGS="${configure.universal_cflags}" \
72                             CXXFLAGS="${configure.universal_cxxflags}" \
73                             LDFLAGS="${configure.universal_ldflags}"
74        } else {
75            build.env-append CFLAGS="${configure.cc_archflags}" \
76                             OBJCFLAGS="${configure.objc_archflags}" \
77                             CXXFLAGS="${configure.cxx_archflags}" \
78                             FFLAGS="${configure.f77_archflags}" \
79                             F90FLAGS="${configure.f90_archflags}" \
80                             FCFLAGS="${configure.fc_archflags}" \
81                             LDFLAGS="${configure.ld_archflags}"
82        }
83    }
84}
85
86destroot.cmd    ${python.bin} setup.py --no-user-cfg
87destroot.destdir        --prefix=${python.prefix} --root=${destroot}
88
89pre-destroot    {
90        xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}/examples
91}
92
93options         python.link_binaries python.link_binaries_suffix
94default python.link_binaries yes
95default python.link_binaries_suffix {-${python.branch}}
96post-destroot {
97    if {${python.link_binaries}} {
98        foreach bin [glob -nocomplain -tails -directory "${destroot}${python.prefix}/bin" *] {
99            if {[catch {file type "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"}]} {
100                ln -s "${python.prefix}/bin/${bin}" "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"
101            }
102        }
103    }
104}
Note: See TracBrowser for help on using the repository browser.