Ticket #54376: Portfile-gsl.diff

File Portfile-gsl.diff, 3.1 KB (added by Schamschula (Marius Schamschula), 7 years ago)

Get rid of doc variant

  • Portfile

    old new  
    55
    66name                gsl
    77version             2.4
     8revision            1
    89categories          math science
    910maintainers         dtakahashi openmaintainer
    1011license             GPL-3+
     
    2425
    2526platforms           darwin
    2627
    27 depends_build       port:texinfo
    2828use_parallel_build  yes
    2929
    3030configure.args      --mandir=${prefix}/share/man --infodir=${prefix}/share/info
     
    3838compilers.choose    cc
    3939compilers.setup     -dragonegg
    4040
    41 variant doc description "Install PDF and HTML documentation" {
    42     depends_build   port:ghostscript bin:latex:texlive
     41if {[variant_isset doc_python27]} { set PythonVersion 27 }
     42if {[variant_isset doc_python35]} { set PythonVersion 35 }
     43if {[variant_isset doc_python36]} { set PythonVersion 36 }
     44
     45variant doc_python27 conflicts doc_python35 doc_python36 description {Install PDF and HTML documentation using Python 2.7} {}
     46variant doc_python35 conflicts doc_python27 doc_python36 description {Install PDF and HTML documentation using Python 3.5} {}
     47variant doc_python36 conflicts doc_python27 doc_python35 description {Install PDF and HTML documentation using Python 3.6} {}
     48
     49if {[variant_isset doc_python27] || [variant_isset doc_python35] || [variant_isset doc_python36]} {
     50    depends_build   port:ghostscript \
     51                    bin:latexmk:latexmk \
     52                    bin:latex:texlive \
     53                    port:texlive-latex-extra \
     54                    port:py${PythonVersion}-sphinx \
     55                    port:py${PythonVersion}-sphinx_rtd_theme \
     56                    port:py${PythonVersion}-typing \
     57                    port:py${PythonVersion}-sphinxcontrib-websupport
    4358    post-build      {
    44         system -W ${worksrcpath}     "make dvi"
    45         system -W ${worksrcpath}/doc "dvipdf gsl-ref.dvi gsl-ref.pdf"
    46         system -W ${worksrcpath}/doc "latex fftalgorithms"
    47         system -W ${worksrcpath}/doc "bibtex fftalgorithms"
    48         system -W ${worksrcpath}/doc "latex fftalgorithms"
    49         system -W ${worksrcpath}/doc "latex fftalgorithms"
    50         system -W ${worksrcpath}/doc "dvipdf fftalgorithms.dvi fftalgorithms.pdf"
    51         system -W ${worksrcpath}     "make html"
     59        system -W ${worksrcpath}/doc "make latexpdf"
     60        system -W ${worksrcpath}/doc "make html"
    5261    }
    5362    post-destroot   {
    5463        xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
    55         xinstall -c -m 644 ${worksrcpath}/doc/gsl-ref.pdf ${destroot}${prefix}/share/doc/${name}
    56         xinstall -c -m 644 ${worksrcpath}/doc/fftalgorithms.pdf ${destroot}${prefix}/share/doc/${name}
    57         xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}/html
    58         eval xinstall -c -m 644 [glob ${worksrcpath}/doc/gsl-ref.html/*] ${destroot}${prefix}/share/doc/${name}/html
     64        xinstall -c -m 644 ${worksrcpath}/doc/_build/latex/gsl-ref.pdf ${destroot}${prefix}/share/doc/${name}
     65        xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}/
     66        copy ${worksrcpath}/doc/_build/html ${destroot}${prefix}/share/doc/${name}/
    5967    }
    6068}
    6169