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 |
---|
7 | # Keep the CSL version of Reduce and PSL in sync. |
---|
8 | svn.revision 1535 |
---|
9 | version 3.8.0-r${svn.revision} |
---|
10 | categories math |
---|
11 | platforms darwin |
---|
12 | maintainers gmail.com:mark.brethen |
---|
13 | license LGPL-2+ BSD |
---|
14 | use_parallel_build no |
---|
15 | homepage http://reduce-algebra.sourceforge.net/ |
---|
16 | fetch.type svn |
---|
17 | svn.url https://reduce-algebra.svn.sourceforge.net/svnroot/reduce-algebra/trunk |
---|
18 | svn.method checkout |
---|
19 | worksrcdir trunk |
---|
20 | |
---|
21 | description REDUCE Computer Algebra System |
---|
22 | |
---|
23 | long_description REDUCE is a system for doing scalar, vector and matrix algebra \ |
---|
24 | by computer, which also supports arbitrary precision numerical \ |
---|
25 | approximation and interfaces to gnuplot to provide graphics. \ |
---|
26 | It can be used interactively for simple calculations but also \ |
---|
27 | provides a full programming language, with a syntax similar to \ |
---|
28 | other modern programming languages. |
---|
29 | |
---|
30 | depends_build port:pkgconfig \ |
---|
31 | bin:makeindex:texlive-basic \ |
---|
32 | bin:mk4ht:texlive-htmlxml |
---|
33 | |
---|
34 | depends_lib port:ncurses \ |
---|
35 | port:Xft2 \ |
---|
36 | port:xorg-libX11 \ |
---|
37 | port:xorg-libXext \ |
---|
38 | port:tiff \ |
---|
39 | port:libpng \ |
---|
40 | port:jpeg \ |
---|
41 | port:xorg-libXcursor \ |
---|
42 | port:xorg-libXrandr \ |
---|
43 | port:freetype \ |
---|
44 | port:mesa |
---|
45 | |
---|
46 | depends_run port:gnuplot |
---|
47 | |
---|
48 | universal_variant no |
---|
49 | |
---|
50 | configure { |
---|
51 | system -W ${worksrcpath} "./configure --prefix=${prefix} \ |
---|
52 | --with-csl \ |
---|
53 | --with-x \ |
---|
54 | --with-xft \ |
---|
55 | --with-opengl \ |
---|
56 | --enable-threadsafe ; \ |
---|
57 | ./configure --with-psl" |
---|
58 | } |
---|
59 | |
---|
60 | # create a second image after all (psl) modules have been built, with the final value of |
---|
61 | # loaddirectories!*. Otherwise loading a module will always search the build directories |
---|
62 | # in worksrcpath. |
---|
63 | post-build { |
---|
64 | set builddir [exec ${worksrcpath}/scripts/findhost.sh [exec ${worksrcpath}/config.guess]] |
---|
65 | set pslbuilddir ${worksrcpath}/pslbuild/${builddir} |
---|
66 | |
---|
67 | system "cd ${pslbuilddir}; exec ${worksrcpath}/psl/saveimage.sh \ |
---|
68 | ${pslbuilddir} \ |
---|
69 | ${pslbuilddir}/red \ |
---|
70 | ${prefix}/libexec/${name}/pslbuild" |
---|
71 | |
---|
72 | system -W ${worksrcpath}/doc/manual "./mkhtml.sh" |
---|
73 | } |
---|
74 | |
---|
75 | set sharedir ${destroot}${prefix}/share/${name} |
---|
76 | set libexecdir ${destroot}${prefix}/libexec/${name} |
---|
77 | set fontdir ${destroot}${prefix}/share/${name}/fonts |
---|
78 | set docdir ${destroot}${prefix}/share/doc/${name} |
---|
79 | set bindir ${destroot}${prefix}/bin |
---|
80 | set mandir ${destroot}${prefix}/share/man |
---|
81 | |
---|
82 | destroot { |
---|
83 | # 'make install' is outdated, so manually install required files |
---|
84 | set builddir [exec ${worksrcpath}/scripts/findhost.sh [exec ${worksrcpath}/config.guess]] |
---|
85 | |
---|
86 | set cslbuilddir ${worksrcpath}/cslbuild/${builddir} |
---|
87 | set pslbuilddir ${worksrcpath}/pslbuild/${builddir} |
---|
88 | |
---|
89 | xinstall -d ${libexecdir}/pslbuild/psl ${libexecdir}/pslbuild/red ${libexecdir}/cslbuild/csl \ |
---|
90 | ${sharedir}/packages ${bindir} ${docdir}/manual ${fontdir} ${mandir}/man1 |
---|
91 | |
---|
92 | eval copy ${cslbuilddir}/csl/reduce.img ${libexecdir}/cslbuild/csl |
---|
93 | eval copy ${cslbuilddir}/csl/reduce ${libexecdir}/cslbuild/csl |
---|
94 | eval copy [glob ${worksrcpath}/doc/manual/*.tex] ${docdir}/manual |
---|
95 | eval copy [glob ${worksrcpath}/doc/manual/*.sh] ${docdir}/manual |
---|
96 | eval copy [glob ${worksrcpath}/doc/manual/*.cfg] ${docdir}/manual |
---|
97 | eval xinstall -m 0644 [glob ${worksrcpath}/doc/manual/*.html] ${docdir}/manual |
---|
98 | eval xinstall -m 0644 [glob ${worksrcpath}/doc/manual/*.css] ${docdir}/manual |
---|
99 | eval copy ${worksrcpath}/doc/manual/README ${docdir}/manual |
---|
100 | eval copy [glob ${cslbuilddir}/csl/reduce.fonts/*] ${fontdir} |
---|
101 | eval copy [glob ${pslbuilddir}/psl/*] ${libexecdir}/pslbuild/psl |
---|
102 | eval copy [glob ${pslbuilddir}/red/*] ${libexecdir}/pslbuild/red |
---|
103 | eval copy [glob ${worksrcpath}/packages/*] ${sharedir}/packages |
---|
104 | ln -s manual-pdf.html ${docdir}/manual/index.html |
---|
105 | ln -s ${prefix}/share/doc/${name}/manual ${libexecdir}/cslbuild/csl/reduce.doc |
---|
106 | ln -s ${prefix}/share/${name}/fonts ${libexecdir}/cslbuild/csl/reduce.fonts |
---|
107 | eval copy ${worksrcpath}/debianbuild/redcsl.1 ${mandir}/man1 |
---|
108 | eval copy ${worksrcpath}/debianbuild/redpsl.1 ${mandir}/man1 |
---|
109 | xinstall ${filespath}/runcsl.in ${bindir}/redcsl |
---|
110 | reinplace "s|@LIBEXECDIR@|${prefix}/libexec/${name}|g" ${bindir}/redcsl |
---|
111 | xinstall ${filespath}/runpsl.in ${bindir}/redpsl |
---|
112 | reinplace "s|@LIBEXECDIR@|${prefix}/libexec/${name}|g" ${bindir}/redpsl |
---|
113 | } |
---|
114 | |
---|
115 | variant pdf description {Build paper copy of reference manual} { |
---|
116 | depends_build-append bin:pdflatex:texlive-basic |
---|
117 | |
---|
118 | post-build { |
---|
119 | system -W ${worksrcpath}/doc/manual "./mkpdf.sh" |
---|
120 | } |
---|
121 | |
---|
122 | post-destroot { |
---|
123 | xinstall -m 0644 ${worksrcpath}/doc/manual/manual-pdf.pdf ${docdir}/manual |
---|
124 | } |
---|
125 | } |
---|
126 | |
---|
127 | livecheck.type none |
---|