-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Portfile
87 lines (73 loc) · 3.1 KB
/
Portfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# -*- 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 python 1.0
PortGroup select 1.0
name py-docutils
version 0.21.2
categories-append textproc
license public-domain BSD PSF-2.1.1
maintainers {jmr @jmroot} alexnicksay.com:alex openmaintainer
description A set of tools for processing plaintext documentation
long_description Docutils is a set of tools for processing plaintext \
documentation into useful formats, such as HTML, XML, \
and LaTeX. Includes reStructuredText, the easy to read, \
easy to use, what-you-see-is-what-you-get plaintext \
markup language.
platforms {darwin any}
supported_archs noarch
homepage https://docutils.sourceforge.io/
checksums md5 c4064e1e0e3cd142951fd2b95b830874 \
rmd160 68fb601868f8d64c5d4f1aba0d4a0359b3fc30b5 \
sha256 3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f
python.versions 27 35 36 37 38 39 310 311 312
if {$subport ne $name} {
depends_run port:py${python.version}-roman
switch ${python.version} {
27 -
35 -
36 {
version 0.18.1
revision 0
checksums md5 ca5827e2432fd58f4c8d74a6591135de \
rmd160 a58063172b68280b6c13b7f4829bfceb9fd0e777 \
sha256 679987caf361a7539d76e584cbeddc311e3aee937877c87346f31debc63e9d06
depends_build port:py${python.version}-setuptools
}
37 -
38 {
version 0.20.1
revision 0
checksums md5 93bcfe0065cf1d0b6a0bcabeca7a2335 \
rmd160 4e03b8fdc202abdb5bd5811a40bdea8647db25d2 \
sha256 f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b
}
}
if {${python.version} >= 39} {
python.pep517_backend flit
depends_run-append port:docutils_select
post-extract {
copy -force ${filespath}/docutils ${workpath}/${subport}
}
post-patch {
reinplace \
"s,@PYTHON_BRANCH@,${python.branch},g" \
${workpath}/${subport}
}
select.group docutils
select.file ${workpath}/${subport}
notes "
To make the Python ${python.branch} version of docutils the one that is run when\
you execute the commands without a version suffix, e.g. 'rst2man', run:
port select --set ${select.group} [file tail ${select.file}]
"
} else {
# we want e.g. *-2.7.py not *.py-2.7
python.link_binaries no
post-destroot {
foreach f {rst2html rst2latex rst2man rst2odt rst2odt_prepstyles rst2pseudoxml rst2s5 rst2xml rstpep2html rst2xetex} {
ln -s ${python.prefix}/bin/${f}.py ${destroot}${prefix}/bin/${f}-${python.branch}.py
}
}
}
livecheck.type none
}