source: trunk/dports/_resources/port1.0/group/python32-1.0.tcl @ 101883

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

add comments indicating deprecation of version-specific python portgroups

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
1# et:ts=4
2# python32-1.0.tcl
3#
4# $Id: python32-1.0.tcl 101883 2013-01-20 22:13:39Z 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
39set python.branch       3.2
40set python.prefix       ${frameworks_dir}/Python.framework/Versions/${python.branch}
41set python.bin          ${python.prefix}/bin/python${python.branch}
42set python.lib          ${python.prefix}/Python
43set python.libdir       ${python.prefix}/lib/python${python.branch}
44set python.pkgd         ${python.prefix}/lib/python${python.branch}/site-packages
45set python.include      ${python.prefix}/include/python${python.branch}
46
47categories              python
48
49dist_subdir             python
50
51depends_lib             port:python32
52
53# we want the default universal variant added despite not using configure
54use_configure   no
55universal_variant yes
56
57build.cmd               ${python.bin} setup.py --no-user-cfg
58build.target    build
59options python.add_archflags
60default python.add_archflags yes
61pre-build {
62    if {${python.add_archflags}} {
63        if {[variant_exists universal] && [variant_isset universal]} {
64            build.env-append CFLAGS="${configure.universal_cflags}" \
65                             OBJCFLAGS="${configure.universal_cflags}" \
66                             CXXFLAGS="${configure.universal_cxxflags}" \
67                             LDFLAGS="${configure.universal_ldflags}"
68        } else {
69            build.env-append CFLAGS="${configure.cc_archflags}" \
70                             OBJCFLAGS="${configure.objc_archflags}" \
71                             CXXFLAGS="${configure.cxx_archflags}" \
72                             FFLAGS="${configure.f77_archflags}" \
73                             F90FLAGS="${configure.f90_archflags}" \
74                             FCFLAGS="${configure.fc_archflags}" \
75                             LDFLAGS="${configure.ld_archflags}"
76        }
77    }
78}
79
80destroot.cmd    ${python.bin} setup.py --no-user-cfg
81destroot.destdir        --prefix=${python.prefix} --root=${destroot}
82
83pre-destroot    {
84        xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}/examples
85}
86
87options         python.link_binaries python.link_binaries_suffix
88default python.link_binaries yes
89default python.link_binaries_suffix {-${python.branch}}
90post-destroot {
91    if {${python.link_binaries}} {
92        foreach bin [glob -nocomplain -tails -directory "${destroot}${python.prefix}/bin" *] {
93            if {[catch {file type "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"}]} {
94                ln -s "${python.prefix}/bin/${bin}" "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"
95            }
96        }
97    }
98}
Note: See TracBrowser for help on using the repository browser.