source: trunk/dports/_resources/port1.0/group/python24-1.0.tcl @ 102184

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

Print deprecation warning in ports using the python24 and python32 portgroups. All ports in the main tree have been moved off of these already.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.0 KB
Line 
1# et:ts=4
2# python24-1.0.tcl
3#
4# $Id: python24-1.0.tcl 102184 2013-01-29 11:20:38Z jmr@macports.org $
5#
6# Copyright (c) 2004 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 'python24'\
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       2.4
46set python.bin          ${prefix}/bin/python${python.branch}
47set python.lib          ${prefix}/lib/libpython${python.branch}.dylib
48set python.pkgd         ${prefix}/lib/python${python.branch}/site-packages
49set python.libdir       ${frameworks_dir}/Python.framework/Versions/${python.branch}/lib/python${python.branch}
50set python.include      ${frameworks_dir}/Python.framework/Versions/${python.branch}/include/python${python.branch}
51if {![file isfile ${python.include}/Python.h] &&
52    ([file isfile ${prefix}/include/python${python.branch}/Python.h] || [string match *64* $build_arch])} {
53    set python.libdir   ${prefix}/lib/python${python.branch}
54    set python.include  ${prefix}/include/python${python.branch}
55}
56
57categories              python
58
59dist_subdir             python
60
61depends_lib             port:python24
62
63# we want the default universal variant added despite not using configure
64use_configure   no
65universal_variant yes
66
67build.cmd               ${python.bin} setup.py
68build.target    build
69options python.add_archflags
70default python.add_archflags yes
71pre-build {
72    if {${python.add_archflags}} {
73        if {[variant_exists universal] && [variant_isset universal]} {
74            build.env-append CFLAGS="${configure.universal_cflags}" \
75                             OBJCFLAGS="${configure.universal_cflags}" \
76                             CXXFLAGS="${configure.universal_cxxflags}" \
77                             LDFLAGS="${configure.universal_ldflags}"
78        } else {
79            build.env-append CFLAGS="${configure.cc_archflags}" \
80                             OBJCFLAGS="${configure.objc_archflags}" \
81                             CXXFLAGS="${configure.cxx_archflags}" \
82                             FFLAGS="${configure.f77_archflags}" \
83                             F90FLAGS="${configure.f90_archflags}" \
84                             FCFLAGS="${configure.fc_archflags}" \
85                             LDFLAGS="${configure.ld_archflags}"
86        }
87    }
88}
89
90destroot.cmd    ${python.bin} setup.py
91destroot.destdir        --prefix=${prefix} --root=${destroot}
92
93pre-destroot    {
94        xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}/examples
95}
Note: See TracBrowser for help on using the repository browser.