Ticket #32648: Portfile

File Portfile, 3.5 KB (added by mbrethen@…, 13 years ago)
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$
3
4PortSystem          1.0
5
6name                reduce-algebra
7svn.revision        1534
8version             3.8.0-r${svn.revision}
9revision            1
10categories          math
11platforms           darwin
12license             BSD
13maintainers         gmail.com:mark.brethen
14
15description         REDUCE algebra system
16
17long_description    REDUCE is an interactive program designed for general algebraic \
18                    computations of interest to mathematicians, scientists and \
19                    engineers. It supports numerical approximation with arbitrary \
20                    precision and also interfaces with gnuplot to provide graphics.
21
22homepage            http://reduce-algebra.sourceforge.net/
23
24fetch.type          svn
25svn.url             https://reduce-algebra.svn.sourceforge.net/svnroot/reduce-algebra/trunk
26svn.method          checkout
27worksrcdir          trunk
28
29depends_build       port:pkgconfig
30
31depends_lib         port:ncurses \
32                    port:Xft2 \
33                    port:xorg-libX11 \
34                    port:xorg-libXext
35
36configure.args      --with-psl
37
38use_parallel_build  no
39universal_variant   no
40
41set topdir     ${prefix}/libexec/${name}
42set sharedir   ${destroot}${prefix}/share/${name}
43set libexecdir ${destroot}${prefix}/libexec/${name}
44set docdir     ${destroot}${prefix}/share/doc/${name}
45set bindir     ${destroot}${prefix}/bin
46
47destroot {
48# 'make install' is outdated, so manually install required files
49    set builddir   [exec ${worksrcpath}/scripts/findhost.sh [exec ${worksrcpath}/config.guess]]
50    set pslbuildir ${worksrcpath}/pslbuild/${builddir}
51
52    xinstall -d ${bindir} ${docdir} ${sharedir} ${libexecdir}/pslbuild
53         
54    eval copy ${worksrcpath}/doc/manual ${docdir}/manual
55    eval copy ${worksrcpath}/packages ${sharedir}/packages
56    eval copy ${worksrcpath}/psl ${libexecdir}/psl
57    foreach d {buildlogs deps psl red} {
58        eval copy ${pslbuildir}/$d ${libexecdir}/pslbuild/$d
59    }
60
61    xinstall ${filespath}/runpsl.in ${bindir}/redpsl
62    reinplace "s|@LIBEXECDIR@|${prefix}/libexec/${name}|g" ${bindir}/redpsl
63}
64
65variant html description {Install documentation in HTML format} {
66    depends_build-append bin:makeindex:texlive-basic
67    depends_build-append bin:mk4ht:texlive-htmlxml
68
69    post-build {
70        system -W ${worksrcpath}/doc/manual "./mkhtml.sh"
71    }
72
73    post-destroot {
74        eval xinstall -m 0644 [glob ${worksrcpath}/doc/manual/*.html] ${docdir}/manual
75    }
76}
77
78variant pdf description {Install documentation in PDF format} {
79    depends_build-append bin:makeindex:texlive-basic
80    depends_build-append bin:pdflatex:texlive-basic
81
82    post-build {
83        system -W ${worksrcpath}/doc/manual "./mkpdf.sh"
84    }
85
86    post-destroot {
87        xinstall -m 0644 ${worksrcpath}/doc/manual/manual-pdf.pdf ${docdir}/manual
88    }
89}
90
91post-activate {
92# create a second image after all modules have been built, with the final value of
93# loaddirectories!*. Otherwise loading a module will always search the build directories
94# in worksrcpath (which don't exist).
95    set pslbuildir ${topdir}/pslbuild
96
97    system "cd ${pslbuildir}; exec sh -xv ${topdir}/psl/saveimage.sh ${pslbuildir}/red \
98        ${pslbuildir}"
99
100    file rename -force ${pslbuildir}/log/reduce.blg \
101                       ${pslbuildir}/buildlogs/reduce.img.blg
102    file delete -force ${pslbuildir}/log
103}
104
105livecheck.type      none