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 | svn.revision 1556 |
---|
8 | version 3.8.0-r${svn.revision} |
---|
9 | categories math |
---|
10 | platforms darwin |
---|
11 | maintainers gmail.com:mark.brethen |
---|
12 | license BSD |
---|
13 | use_parallel_build no |
---|
14 | homepage http://reduce-algebra.sourceforge.net/ |
---|
15 | fetch.type svn |
---|
16 | svn.method checkout |
---|
17 | |
---|
18 | description REDUCE Computer Algebra System |
---|
19 | |
---|
20 | long_description REDUCE is a system for doing scalar, \ |
---|
21 | vector and matrix algebra by computer, \ |
---|
22 | which also supports arbitrary precision \ |
---|
23 | numerical approximation and interfaces \ |
---|
24 | to gnuplot to provide graphics. It can be \ |
---|
25 | used interactively for simple calculations \ |
---|
26 | but also provides a full programming \ |
---|
27 | language, with a syntax similar to other \ |
---|
28 | modern programming languages. |
---|
29 | |
---|
30 | set sharedir ${destroot}${prefix}/share/${name} |
---|
31 | set libexecdir ${destroot}${prefix}/libexec/${name} |
---|
32 | set docdir ${destroot}${prefix}/share/doc/${name} |
---|
33 | set bindir ${destroot}${prefix}/bin |
---|
34 | |
---|
35 | if {${name} == ${subport}} { |
---|
36 | svn.url https://reduce-algebra.svn.sourceforge.net/svnroot/reduce-algebra/trunk |
---|
37 | worksrcdir trunk |
---|
38 | |
---|
39 | depends_run path:bin/gnuplot:gnuplot |
---|
40 | |
---|
41 | universal_variant no |
---|
42 | |
---|
43 | configure.args --with-psl |
---|
44 | |
---|
45 | # reset the load search path in the final image. |
---|
46 | post-build { |
---|
47 | set builddir [exec ${worksrcpath}/scripts/findhost.sh [exec ${worksrcpath}/config.guess]] |
---|
48 | set pslbuilddir ${worksrcpath}/pslbuild/${builddir} |
---|
49 | |
---|
50 | system "cd ${pslbuilddir}; exec ${worksrcpath}/psl/saveimage.sh ${pslbuilddir} ${pslbuilddir}/red ${prefix}/libexec/${name}/pslbuild" |
---|
51 | } |
---|
52 | |
---|
53 | destroot { |
---|
54 | set builddir [exec ${worksrcpath}/scripts/findhost.sh [exec ${worksrcpath}/config.guess]] |
---|
55 | set pslbuilddir ${worksrcpath}/pslbuild/${builddir} |
---|
56 | |
---|
57 | xinstall -d ${libexecdir}/pslbuild/psl ${libexecdir}/pslbuild/red |
---|
58 | eval copy [glob ${pslbuilddir}/psl/*] ${libexecdir}/pslbuild/psl |
---|
59 | eval copy [glob ${pslbuilddir}/red/*] ${libexecdir}/pslbuild/red |
---|
60 | |
---|
61 | xinstall -d ${sharedir}/packages |
---|
62 | foreach i [glob -tails -directory ${worksrcpath}/packages/ *] { |
---|
63 | if {![string equal $i "regressions"]} { |
---|
64 | file copy ${worksrcpath}/packages/$i ${sharedir}/packages |
---|
65 | } |
---|
66 | } |
---|
67 | |
---|
68 | xinstall ${filespath}/runpsl.in ${bindir}/redpsl |
---|
69 | reinplace "s|@LIBEXECDIR@|${prefix}/libexec/${name}|g" ${bindir}/redpsl |
---|
70 | } |
---|
71 | |
---|
72 | variant doc description {Install PDF and HTML documentation} { |
---|
73 | depends_build-append bin:makeindex:texlive-basic \ |
---|
74 | bin:pdflatex:texlive-basic \ |
---|
75 | bin:mk4ht:texlive-htmlxml |
---|
76 | |
---|
77 | post-build { |
---|
78 | system -W ${worksrcpath}/doc/manual "./mkpdf.sh" |
---|
79 | system -W ${worksrcpath}/doc/manual "./mkhtml.sh" |
---|
80 | } |
---|
81 | |
---|
82 | post-destroot { |
---|
83 | xinstall -d ${docdir}/manual |
---|
84 | xinstall -m 0644 ${worksrcpath}/doc/manual/manual-pdf.pdf ${docdir}/manual |
---|
85 | eval xinstall -m 0644 [glob ${worksrcpath}/doc/manual/*.html] ${docdir}/manual |
---|
86 | eval xinstall -m 0644 [glob ${worksrcpath}/doc/manual/*.css] ${docdir}/manual |
---|
87 | } |
---|
88 | } |
---|
89 | |
---|
90 | # livecheck.type regex |
---|
91 | # livecheck.url http://sourceforge.net/projects/reduce-algebra/files/ |
---|
92 | # livecheck.regex ${name}-(\[0-9.\]+\[a-z\]*)\\.tar |
---|
93 | } else { |
---|
94 | livecheck.type none |
---|
95 | } |
---|
96 | |
---|
97 | subport reduce-ide { |
---|
98 | categories-append editors |
---|
99 | license GPL |
---|
100 | supported_archs noarch |
---|
101 | svn.url https://reduce-algebra.svn.sourceforge.net/svnroot/reduce-algebra/trunk/generic/emacs |
---|
102 | worksrcdir emacs |
---|
103 | |
---|
104 | description Emacs mode for editing and running REDUCE files |
---|
105 | |
---|
106 | long_description ${subport} is an ${description}. |
---|
107 | |
---|
108 | depends_build-append bin:makeinfo:texinfo |
---|
109 | |
---|
110 | depends_lib-append port:emacs-app |
---|
111 | |
---|
112 | # patchfiles-append patch-reduce-mode.el.diff \ |
---|
113 | # patch-reduce-run.el.diff |
---|
114 | |
---|
115 | use_configure no |
---|
116 | |
---|
117 | build { |
---|
118 | system -W ${worksrcpath} "${applications_dir}/Emacs.app/Contents/MacOS/Emacs -q --no-site-file -batch -f batch-byte-compile reduce-mode.el reduce-run.el" |
---|
119 | system -W ${worksrcpath} "makeinfo reduce-ide.texinfo" |
---|
120 | } |
---|
121 | |
---|
122 | destroot { |
---|
123 | set lispdir ${destroot}${prefix}/share/emacs/site-lisp |
---|
124 | xinstall -d ${lispdir} |
---|
125 | xinstall -m 644 -W ${worksrcpath} \ |
---|
126 | reduce-mode.el \ |
---|
127 | reduce-mode.elc \ |
---|
128 | reduce-run.el \ |
---|
129 | reduce-run.elc \ |
---|
130 | ${lispdir} |
---|
131 | |
---|
132 | xinstall -d ${destroot}${prefix}/share/doc/${subport} |
---|
133 | xinstall -m 644 -W ${worksrcpath} reduce-ide.info README ${destroot}${prefix}/share/doc/${subport} |
---|
134 | } |
---|
135 | } |
---|