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 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name reduce-algebra |
---|
7 | svn.revision 1534 |
---|
8 | version 3.8.0-r${svn.revision} |
---|
9 | revision 1 |
---|
10 | categories math |
---|
11 | platforms darwin |
---|
12 | license BSD |
---|
13 | maintainers gmail.com:mark.brethen |
---|
14 | |
---|
15 | description REDUCE algebra system |
---|
16 | |
---|
17 | long_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 | |
---|
22 | homepage http://reduce-algebra.sourceforge.net/ |
---|
23 | |
---|
24 | fetch.type svn |
---|
25 | svn.url https://reduce-algebra.svn.sourceforge.net/svnroot/reduce-algebra/trunk |
---|
26 | svn.method checkout |
---|
27 | worksrcdir trunk |
---|
28 | |
---|
29 | depends_build port:pkgconfig |
---|
30 | |
---|
31 | depends_lib port:ncurses \ |
---|
32 | port:Xft2 \ |
---|
33 | port:xorg-libX11 \ |
---|
34 | port:xorg-libXext |
---|
35 | |
---|
36 | configure.args --with-psl |
---|
37 | |
---|
38 | use_parallel_build no |
---|
39 | universal_variant no |
---|
40 | |
---|
41 | set topdir ${prefix}/libexec/${name} |
---|
42 | set sharedir ${destroot}${prefix}/share/${name} |
---|
43 | set libexecdir ${destroot}${prefix}/libexec/${name} |
---|
44 | set docdir ${destroot}${prefix}/share/doc/${name} |
---|
45 | set bindir ${destroot}${prefix}/bin |
---|
46 | |
---|
47 | destroot { |
---|
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 | |
---|
65 | variant 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 | |
---|
78 | variant 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 | |
---|
91 | post-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 | |
---|
105 | livecheck.type none |
---|