source: trunk/dports/lang/py-htmldocs/Portfile

Last change on this file was 151155, checked in by eborisch@…, 12 months ago

py-htmldocs: update 27, 34, and 35 to latest.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.4 KB
Line 
1# -*- 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
2# $Id: Portfile 151155 2016-08-09 02:30:31Z ryandesign@macports.org $
3
4PortSystem          1.0
5name                py-htmldocs
6PortGroup           python 1.0
7python.versions     26 27 31 32 33 34 35
8python.default_version 27
9version             1.0
10set base_rev        2
11revision            ${base_rev}
12license             {PSF}
13
14if {$subport != $name} {
15    if {${python.version} == 26} { version 2.6.9 }
16    if {${python.version} == 27} { version 2.7.12 }
17    if {${python.version} == 31} { version 3.1.5 }
18    if {${python.version} == 32} { version 3.2.6 }
19    if {${python.version} == 33} { version 3.3.6 }
20    if {${python.version} == 34} { version 3.4.5 }
21    if {${python.version} == 35} { version 3.5.2 }
22}
23
24categories          lang
25platforms           darwin
26maintainers         eborisch \
27                    openmaintainer
28supported_archs     noarch
29installs_libs       no
30
31use_bzip2           yes
32use_configure       no
33
34description         Local HTML documentation for Python.
35long_description    ${description}
36homepage            http://www.python.org/
37master_sites        http://www.python.org/ftp/python/doc/
38
39if {${name} != ${subport}} {
40    description         HTML documentation for Python ${version}
41    long_description    Access Python ${version} HTML docs via \
42        file://${prefix}/share/doc/python${python.version}-doc/index.html
43
44    master_sites        http://www.python.org/ftp/python/doc/${version}
45    distname            python-${version}-docs-html
46    set extractname     ${distname}
47    depends_lib-delete  port:python${python.version}
48    notes               ${long_description}
49
50    if {${python.version} == 26} {
51      checksums \
52        rmd160  a7bd375ac3a62249529da805693c3b15510ff976 \
53        sha256  f3faa71f4b0cc8fa2bb6c5624233ae79983a2d5c11195fb2089668c60ceb7f1f
54    }
55
56    if {${python.version} == 27} {
57      checksums \
58        rmd160  07fa479d9570a4d86f9e355183c91eeea57688d9 \
59        sha256  40891e010cdd9a752a17bd02e30aa853f9a2a7767ee82911cf4507dfa3b13de8
60    }
61   
62    if {${python.version} == 31} {
63      checksums \
64        rmd160  29717979d6a8b4e970a4747e101259da3e3890c1 \
65        sha256  ff327cfaa1219d8d82fcb4f3bae3ec4ce28567982a49784004130521d282faa0
66    }
67   
68    if {${python.version} == 32} {
69      checksums \
70        rmd160  039539fc90454d35525c8b9478156f7135b86622 \
71        sha256  b746ef40a29abe7949e5f183e236a0734c58b841c0600043160a518390704c13
72    }
73
74    if {${python.version} == 33} {
75      checksums \
76        rmd160  84290bfaea54b943025f7088268f256d4a50cf71 \
77        sha256  54da33f8a91be819e7ac22fdc88c5125bdd4c67494f52dd79d6b603572c41fb0
78    }
79
80    if {${python.version} == 34} {
81      # These seem to be re-generated daily. This is a hack to host our own
82      # sable mirror. The files may be deleted once the MP mirror has them.
83      master_sites          https://www.dropbox.com/s/0n0oanfkkmj8wcn/
84      distname              python-3.4.5-docs-html~
85      checksums \
86        rmd160  5ea48760369cf865aed6d518400391d8daab66bd \
87        sha256  21a890f961d8f115d966390dc3a3b7df2511be0cfa03751e85a589a45d3636bf
88    }
89
90    if {${python.version} == 35} {
91      # These seem to be re-generated daily. This is a hack to host our own
92      # sable mirror. The files may be deleted once the MP mirror has them.
93      master_sites          https://www.dropbox.com/s/7si63y9i0425o7f/
94      distname              python-3.5.2-docs-html~
95      checksums \
96        rmd160  16e6dc1ca90841e3f2a114fd34d7fbb931d4d3ca \
97        sha256  05062d543f8a759e85b6409119e95321db25fd607a3bf258aa2f4333575a9dc0
98    }
99
100    if {[string match https://www.dropbox* ${master_sites}]} {
101      depends_fetch-append  port:wget
102      fetch {
103          # Curl doesn't redirect successfully to download; use wget
104          system -W ${distpath} \
105            "wget -nc ${master_sites}${distname}${extract.suffix}"
106      }
107    }
108
109    dist_subdir         ${name}/${revision}
110
111    build {}
112
113    destroot {
114        set  destdocdir \
115            ${destroot}${prefix}/share/doc/python${python.version}-doc
116        file mkdir ${destroot}${prefix}/share/doc
117        file copy ${workpath}/${extractname} ${destdocdir}
118        system "chmod -R a+rX ${destdocdir}" 
119    }
120   
121    livecheck.url       https://docs.python.org/${python.branch}/download.html
122    livecheck.type      regex
123    livecheck.regex     python-(\[0-9\]+(\\.\[0-9abrc\]+){2})-docs
124} else {
125    livecheck.type      none
126}
127
128
Note: See TracBrowser for help on using the repository browser.