| 26 | | homepage http://reduce-algebra.sourceforge.net/ |
| 27 | | master_sites sourceforge:project/reduce-algebra/Snapshot_${version_dashes} |
| 28 | | distname reduce-src-${version_dashes} |
| 29 | | use_bzip2 yes |
| 30 | | checksums rmd160 b08512ea6bc8900a3a557c85d0576be640489202 \ |
| 31 | | sha256 b15debc944475d4daee1bcbdbaff415693522306785507f2d3110d75df6e7006 |
| 32 | | |
| 33 | | depends_lib-append \ |
| 34 | | port:libedit\ |
| 35 | | port:xorg-libXcursor\ |
| 36 | | port:Xft2\ |
| 37 | | port:xorg-libXrandr\ |
| 38 | | port:freetype\ |
| 39 | | port:ncurses |
| 40 | | |
| 41 | | depends_build-append port:autoconf \ |
| 42 | | port:automake |
| 43 | | |
| 44 | | depends_run port:gnuplot |
| 45 | | |
| 46 | | universal_variant no |
| 47 | | use_parallel_build no |
| 48 | | |
| 49 | | set docsrcdir ${worksrcpath}/doc/manual |
| 50 | | set docprimersdir ${worksrcpath}/doc/primers |
| 51 | | |
| 52 | | set docbasename manual |
| 53 | | |
| 54 | | set genericdir ${worksrcpath}/generic |
| 55 | | set redfrontsrcdir ${genericdir}/redfront/src |
| 56 | | set redfrontbuilddir ${genericdir}/redfront |
| 57 | | |
| 58 | | set libexecdir ${destroot}${prefix}/libexec/${name} |
| 59 | | set sharedir ${destroot}${prefix}/share/${name} |
| 60 | | set redfrontsharedir ${destroot}${prefix}/share/reduce-addons/redfront |
| 61 | | set fontdir ${destroot}${prefix}/share/${name}/fonts |
| 62 | | set resourcesdir ${destroot}${prefix}/share/${name}/resources |
| 63 | | set testlogsdir ${destroot}${prefix}/share/${name}/testlogs |
| 64 | | set docdir ${destroot}${prefix}/share/doc/${name} |
| 65 | | set addondocdir ${destroot}${prefix}/share/doc/reduce-addons |
| 66 | | set mandir ${destroot}${prefix}/share/man/man1 |
| 67 | | set sitelispdir ${destroot}${prefix}/share/emacs/site-lisp/${name} |
| 68 | | set bindir ${destroot}${prefix}/bin |
| | 24 | homepage https://reduce-algebra.sourceforge.io/ |
| | 25 | master_sites sourceforge:project/reduce-algebra/snapshot_${version_dashes} |
| | 26 | distname Reduce-svn${svnrev}-src |
| | 27 | |
| | 28 | checksums rmd160 d547b19362af6e4ca31e52f718bdcdbf0cd0e063 \ |
| | 29 | sha256 58873b4337e3bb31bb561cbea53866dc60bcfa7ea5faed4297597bfb85483a2e \ |
| | 30 | size 261850189 |
| 136 | | destroot { |
| 137 | | # Create target directory |
| 138 | | xinstall -d ${docdir} ${resourcesdir} |
| 139 | | |
| 140 | | # Copy common files |
| 141 | | xinstall -m 644 -W ${docprimersdir}\ |
| 142 | | primer.pdf\ |
| 143 | | sl.pdf\ |
| 144 | | insidereduce.pdf ${docdir} |
| 145 | | xinstall -m 644 -W ${worksrcpath}/csl/reduce.doc\ |
| 146 | | BSD-LICENSE.txt\ |
| 147 | | LGPL-2.1.txt ${docdir} |
| 148 | | xinstall -m 644 {*}[glob ${docsrcdir}/${docbasename}*.tex] ${docdir} |
| 149 | | xinstall -m 644 {*}[glob ${docsrcdir}/${docbasename}*.html] ${docdir} |
| 150 | | xinstall -m 644 {*}[glob ${docsrcdir}/${docbasename}*.png] ${docdir} |
| 151 | | xinstall -m 644 -W ${docsrcdir}\ |
| 152 | | ${docbasename}.pdf\ |
| 153 | | index.html\ |
| 154 | | redlogo.png\ |
| 155 | | ${docbasename}.css ${docdir} |
| 156 | | xinstall -m 644 ${worksrcpath}/README ${docdir} |
| 157 | | xinstall -m 644 ${worksrcpath}/packages/package.map ${resourcesdir} |
| | 77 | # Documentation is also re-generated in the tree so that regardless of |
| | 78 | # history it should end up clean and organized. |
| | 79 | post-build { |
| | 80 | if {[variant_isset doc]} { |
| | 81 | system -W ${worksrcpath}/doc/misc ${build.cmd} |
| | 82 | system -W ${worksrcpath}/doc/manual ${build.cmd} |
| 182 | | ${libexecdir}/cslbuild/csl\ |
| 183 | | ${sharedir}\ |
| 184 | | ${fontdir}\ |
| 185 | | ${resourcesdir}\ |
| 186 | | ${mandir} |
| 187 | | # Copy CSL files |
| 188 | | xinstall -p -W ${cslbuilddir}/csl\ |
| 189 | | reduce\ |
| 190 | | reduce.img\ |
| 191 | | csl\ |
| 192 | | csl.img ${libexecdir}/cslbuild/csl |
| 193 | | ln -s ${prefix}/share/doc/${name} ${libexecdir}/cslbuild/csl/reduce.doc |
| 194 | | ln -s ${prefix}/share/${name}/fonts ${libexecdir}/cslbuild/csl/reduce.fonts |
| 195 | | ln -s ${prefix}/share/${name}/resources ${libexecdir}/cslbuild/csl/reduce.resources |
| 196 | | ln -s ${prefix}/libexec/${name}/cslbuild ${sharedir}/cslbuild |
| 197 | | # Font files |
| 198 | | foreach f [glob -tails -directory ${cslbuilddir}/csl/reduce.fonts/ *] { |
| 199 | | if {![string equal $f "src"]} { |
| 200 | | file copy ${cslbuilddir}/csl/reduce.fonts/$f ${fontdir} |
| 201 | | } |
| 202 | | } |
| 203 | | # Resource files |
| 204 | | xinstall -m 644 -W ${cslbuilddir}/csl/reduce.resources\ |
| 205 | | mma.awk\ |
| 206 | | qepcad.awk ${resourcesdir} |
| 207 | | # Copy man files |
| 208 | | xinstall -m 644 ${worksrcpath}/debianbuild/reduce/debian/redcsl.1 ${mandir} |
| 209 | | # Shell script for running REDUCE |
| 210 | | xinstall ${filespath}/runcsl.in ${bindir}/redcsl |
| 211 | | reinplace "s|@LIBEXECDIR@|${prefix}/libexec/${name}|g" ${bindir}/redcsl |
| 212 | | } |
| | 103 | ${destroot}${sharedir} \ |
| | 104 | ${destroot}${libexecdir}/csl \ |
| | 105 | ${destroot}${libexecdir}/psl/psl \ |
| | 106 | ${destroot}${libexecdir}/psl/red \ |
| | 107 | ${destroot}${applications_dir}/${subport} |
| | 108 | # Manual files |
| | 109 | copy \ |
| | 110 | ${filespath}/redcsl.1 \ |
| | 111 | ${filespath}/redpsl.1 \ |
| | 112 | ${genericdir}/newfront/redfront.1 \ |
| | 113 | ${destroot}${mandir} |
| | 114 | ln -s ${prefix}/share/man/man1/redfront.1 ${destroot}${mandir}/rfcsl.1 |
| | 115 | ln -s ${prefix}/share/man/man1/redfront.1 ${destroot}${mandir}/rfpsl.1 |
| | 116 | # CSL files |
| | 117 | foreach d {reduce bootstrapreduce csl} { |
| | 118 | copy ${cslbuilddir}/csl/${d}.app ${destroot}${libexecdir}/csl |
| | 119 | ln -s ${prefix}/libexec/${subport}/csl/${d}.app \ |
| | 120 | ${destroot}${applications_dir}/${subport}/${d}.app |
| | 121 | } |
| | 122 | copy ${filespath}/runcsl.sh ${destroot}${bindir}/redcsl |
| | 123 | copy ${filespath}/runbootstrapreduce.sh ${destroot}${bindir}/bootstrapreduce |
| | 124 | copy ${filespath}/runcsllisp.sh ${destroot}${bindir}/csl |
| | 125 | foreach f {redcsl bootstrapreduce csl} { |
| | 126 | file attributes ${destroot}${bindir}/${f} -permissions +x |
| | 127 | } |
| | 128 | copy ${cslbuilddir}/redfront/rfcsl ${destroot}${bindir} |
| | 129 | # PSL files |
| | 130 | copy {*}[glob ${pslbuilddir}/psl/*] ${destroot}${libexecdir}/psl/psl |
| | 131 | copy {*}[glob ${pslbuilddir}/red/*] ${destroot}${libexecdir}/psl/red |
| | 132 | copy ${filespath}/runpsl.sh ${destroot}${bindir}/redpsl |
| | 133 | file attributes ${destroot}${bindir}/redpsl -permissions +x |
| | 134 | # Note (ha ha) that rfpsl is built in the cslbuild part of the tree. |
| | 135 | copy ${cslbuilddir}/redfront/rfpsl ${destroot}${bindir} |
| 226 | | configure.args-append --with-psl |
| | 154 | # Install documentation if requested |
| | 155 | if {[variant_isset doc]} { |
| | 156 | copy \ |
| | 157 | {*}[glob ${docmiscdir}/*.pdf] \ |
| | 158 | ${docsrcdir}/${docbasename}.pdf \ |
| | 159 | ${destroot}${docdir}/pdf |
| | 160 | copy \ |
| | 161 | ${docsrcdir}/redlogo.png \ |
| | 162 | {*}[glob ${docsrcdir}/${docbasename}*.html] \ |
| | 163 | {*}[glob ${docsrcdir}/${docbasename}*.png] \ |
| | 164 | ${docsrcdir}/${docbasename}.css \ |
| | 165 | ${docsrcdir}/index.html \ |
| | 166 | ${destroot}${docdir}/html |
| | 167 | foreach n ${extradocimagebasenames} { |
| | 168 | copy {*}[glob ${docsrcdir}/${n}*.png] ${destroot}${docdir}/html |
| | 169 | } |
| | 170 | } |
| | 171 | } |
| 228 | | destroot { |
| 229 | | set builddir [exec ${worksrcpath}/scripts/findhost.sh [exec ${worksrcpath}/config.guess]] |
| 230 | | set pslbuilddir ${worksrcpath}/pslbuild/${builddir} |
| 231 | | # create target directories |
| 232 | | xinstall -d \ |
| 233 | | ${libexecdir}/pslbuild/psl\ |
| 234 | | ${libexecdir}/pslbuild/red\ |
| 235 | | ${sharedir}\ |
| 236 | | ${mandir} |
| 237 | | ### Create a second image after all (psl) modules have been built, with |
| 238 | | ### the final value of loaddirectories!*. |
| 239 | | ui_debug "Saving a new image..." |
| 240 | | system "cd ${pslbuilddir}; exec ${worksrcpath}/psl/saveimage.sh\ |
| 241 | | ${pslbuilddir} \ |
| 242 | | ${pslbuilddir}/red \ |
| 243 | | ${prefix}/libexec/${name}/pslbuild" |
| 244 | | # copy PSL files |
| 245 | | xinstall -p {*}[glob ${pslbuilddir}/psl/*] ${libexecdir}/pslbuild/psl |
| 246 | | xinstall -p {*}[glob ${pslbuilddir}/red/*] ${libexecdir}/pslbuild/red |
| 247 | | ln -s ${prefix}/libexec/${name}/pslbuild ${sharedir}/pslbuild |
| 248 | | # copy man files |
| 249 | | xinstall -m 644 ${worksrcpath}/debianbuild/reduce/debian/redpsl.1 ${mandir} |
| 250 | | # shell script for running REDUCE |
| 251 | | xinstall ${filespath}/runpsl.in ${bindir}/redpsl |
| 252 | | reinplace "s|@LIBEXECDIR@|${prefix}/libexec/${name}|g" ${bindir}/redpsl |
| | 173 | variant doc description {Install HTML and PDF documentation} { |
| | 174 | depends_build-append \ |
| | 175 | port:dvipng \ |
| | 176 | port:texlive-fonts-extra \ |
| | 177 | port:texlive-formats-extra \ |
| | 178 | port:texlive-latex-extra \ |
| | 179 | port:texlive-plain-generic \ |
| | 180 | port:texlive-bin-extra \ |
| | 181 | port:texlive-fonts-recommended |
| 257 | | subport reduce-addons { |
| 258 | | license GPL |
| 259 | | revision 1 |
| 260 | | description Useful addons for the REDUCE Computer Algebra System |
| 261 | | |
| 262 | | long_description "${description} |
| 263 | | These include: |
| 264 | | reduce-mode, an emacs mode |
| 265 | | redfront, a frontend with line editing and color output |
| 266 | | breduce, a REDUCE batch processing utility" |
| 267 | | |
| 268 | | depends_lib-append bin:makeinfo:texinfo |
| 269 | | |
| 270 | | worksrcdir ${redfrontbuilddir} |
| 271 | | |
| 272 | | patchfiles-append patch-src-redline.c.diff |
| 273 | | |
| 274 | | configure.cmd ./src/configure |
| 275 | | configure.args-append\ |
| 276 | | --with-libedit\ |
| 277 | | --with-package-map=${prefix}/share/${name}/resources/package.map\ |
| 278 | | --with-csl-reduce=${prefix}/libexec/${name}/cslbuild/csl/reduce\ |
| 279 | | --with-bpsl=${prefix}/libexec/${name}/pslbuild/psl/bpsl\ |
| 280 | | --with-reduce-img=${prefix}/libexec/${name}/pslbuild/red/reduce.img |
| | 196 | patchfiles-append patch-generic-breduce-breduce.1.diff |
| 297 | | # create target directories |
| 298 | | xinstall -d \ |
| 299 | | ${addondocdir}\ |
| 300 | | ${mandir}\ |
| 301 | | ${sitelispdir} |
| 302 | | # copy addons |
| 303 | | xinstall -m 644 ${redfrontsrcdir}/README ${addondocdir} |
| 304 | | xinstall -m 644 -W ${genericdir}/breduce\ |
| | 210 | set libexecdir ${prefix}/libexec/${subport} |
| | 211 | set mandir ${prefix}/share/man/man1 |
| | 212 | xinstall -d ${destroot}/${libexecdir} |
| | 213 | copy ${worksrcpath}/generic/breduce/breduce ${destroot}/${libexecdir} |
| | 214 | copy ${worksrcpath}/packages/breduce/breduce.red ${destroot}/${libexecdir} |
| | 215 | ln -s ${prefix}/libexec/breduce/breduce ${destroot}${prefix}/bin/breduce |
| | 216 | copy ${worksrcpath}/generic/breduce/breduce.1 ${destroot}/${mandir} |
| | 217 | } |
| | 218 | |
| | 219 | post-destroot { |
| | 220 | set docdir ${prefix}/share/doc/${subport} |
| | 221 | xinstall -d ${destroot}${docdir} |
| | 222 | xinstall -m 0644 -W ${worksrcpath}/generic/breduce \ |
| 307 | | breduce.tex ${addondocdir} |
| 308 | | xinstall -m 644 ${redfrontsrcdir}/redfront.1 ${mandir} |
| 309 | | ln -s ${prefix}/share/man/man1/redfront.1 ${mandir}/rfcsl.1 |
| 310 | | ln -s ${prefix}/share/man/man1/redfront.1 ${mandir}/rfpsl.1 |
| 311 | | xinstall -m 644 ${genericdir}/breduce/breduce.1 ${mandir} |
| 312 | | xinstall ${redfrontbuilddir}/redfront ${bindir} |
| 313 | | ln -s ${prefix}/bin/redfront ${bindir}/rfcsl |
| 314 | | ln -s ${prefix}/bin/redfront ${bindir}/rfpsl |
| 315 | | xinstall ${genericdir}/breduce/breduce ${bindir} |
| 316 | | xinstall -m 644 -W ${genericdir}/emacs\ |
| 317 | | reduce-ide.info\ |
| 318 | | reduce-ide.texinfo ${addondocdir} |
| 319 | | xinstall -m 644 -W ${genericdir}/emacs \ |
| 320 | | reduce-mode.el \ |
| 321 | | reduce-run.el \ |
| 322 | | ${sitelispdir} |
| 323 | | } |
| 324 | | |
| 325 | | notes-append " |
| 326 | | REDUCE edit mode is provided by a file called 'reduce-mode.el'. This file\ |
| 327 | | is installed in ${prefix}/share/emacs/site-lisp/${name}. To automatically\ |
| 328 | | load this file, put the following lines in your '.emacs' file: |
| 329 | | |
| 330 | | \(autoload ’reduce-mode \"reduce-mode\" \"Major mode for REDUCE code editing\" t) |
| 331 | | |
| 332 | | ;; Automatically start .red files in reduce mode. |
| 333 | | \(add-to-list ’auto-mode-alist ’(\"\\\.red\\\’\" . reduce-mode)) |
| 334 | | |
| 335 | | Installation of REDUCE run mode is documented separately. See\ |
| 336 | | '${prefix}/share/doc/reduce-addons/reduce-ide.info'. |
| 337 | | " |
| | 225 | breduce.tex \ |
| | 226 | ${destroot}${docdir} |
| | 227 | } |