Files
Chih-Hsuan Yen b8f86e01bc Orphan all my ports
I don't use macOS as my daily driver anymore.
2019-12-19 23:16:46 +08:00

66 lines
2.1 KiB
Tcl

# -*- 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
PortSystem 1.0
PortGroup select 1.0
name python2_select
version 0.0
revision 3
categories sysutils
platforms darwin
supported_archs noarch
configure.cxx_stdlib
license BSD
maintainers nomaintainer
description Common files for selecting default Python 2 version
long_description This port installs files that allow 'port select' \
to create links to the preferred default version \
of Python 2.
homepage https://www.macports.org/
distfiles
use_configure no
build {}
destroot {}
# Documentation for Python 2 ports:
# PortGroup select 1.0
# set pythonNoDot python[string map {. {}} $branch]
# select.entries [list python2 python2-$pythonNoDot $pythonNoDot]
# install all files
select.entries {python2 base} \
{python2 none}
platform darwin {
set apple_pythons [
if {${os.major} == 8} {
list python23-apple
} elseif {${os.major} == 9} {
list python25-apple
} elseif {${os.major} == 10} {
list python25-apple \
python26-apple
} elseif {${os.major} == 11} {
list python25-apple \
python26-apple \
python27-apple
} elseif {${os.major} == 12 || ${os.major} == 13} {
list {python25-apple.mtln python25-apple} \
{python26-apple.mtln python26-apple} \
{python27-apple.mtln python27-apple}
} elseif {${os.major} == 14 || ${os.major} == 15 || ${os.major} == 16} {
list {python26-apple.mtln python26-apple} \
{python27-apple.mtln python27-apple}
} elseif {${os.major} >= 17} {
list {python27-apple.mtln python27-apple}
}
]
foreach python $apple_pythons {
select.entries-append [list python2 {*}$python]
}
}
livecheck.type none