Ticket #65527: patch-portfile.diff
File patch-portfile.diff, 10.6 KB (added by mbrethen, 2 years ago) |
---|
-
Portfile
old new 2 2 PortSystem 1.0 3 3 4 4 name reduce 5 version 20 1811236 revision 25 version 20211019 6 revision 0 7 7 set version_dashes [regsub {^(\d{4})(\d{2})(\d{2})$} ${version} {\1-\2-\3}] 8 set svnrev 4829 9 checksums rmd160 cf81887b9bab0d6fd7b4e4ff88e3eb67223d1330 \ 10 sha256 9787f31ef1ec23988f4c551388c6ffffe5b97ca290de6eed1c12dff1737763c8 \ 11 size 261842669 12 13 categories math 14 license BSD LGPL-2.1 8 set svnrev 6110 9 categories math lang 10 license BSD 15 11 platforms darwin 16 12 maintainers {gmail.com:mark.brethen @mbrethen} openmaintainer 17 18 13 description REDUCE Computer Algebra System 19 20 long_description REDUCE is a graphical Computer Algebra System. It \ 21 allows for solving differential equations, integration,\ 22 matrix manipulation and 3D plotting. It also contains a\ 23 large number of additional packages. 24 14 long_description \ 15 REDUCE is an interactive system for general algebraic computations of \ 16 interest to mathematicians, scientists and engineers. 25 17 homepage https://reduce-algebra.sourceforge.io/ 26 18 master_sites sourceforge:project/reduce-algebra/snapshot_${version_dashes} 27 19 distname Reduce-svn${svnrev}-src 28 20 29 universal_variant no 21 checksums sha256 046e3eda8ab006bb184b6bbf911bb87b35f110b300b5f52766445e9c8a22ad1a \ 22 size 240908050 30 23 31 patchfiles-append patch-packages-plot-gnuintfc.red.diff \ 32 patch-generic-breduce-breduce.1.diff \ 33 patch-reduce-deployment-target.diff \ 34 patch-csl-prefix.diff \ 35 patch-csl-create_old_bundle.diff 24 compiler.cxx_standard 2011 36 25 37 post-patch { 38 reinplace -W ${worksrcpath} "s|@PREFIX@|${prefix}|g" \ 39 csl/cslbase/configure \ 40 csl/cslbase/configure.ac \ 41 csl/fox/configure \ 42 csl/fox/configure.ac \ 43 csl/foxtests/configure \ 44 csl/foxtests/configure.ac \ 45 packages/plot/gnuintfc.red \ 46 generic/breduce/breduce.1 47 } 26 patchfiles-append patch-configure.ac.diff \ 27 patch-csl-build.diff \ 28 patch-packages-plot-gnuintfc.red.diff 29 30 depends_build-append port:gnuplot \ 31 port:automake \ 32 port:autoconf \ 33 port:libtool \ 34 port:xorg-xorgproto \ 35 port:xorg-libX11 \ 36 port:xorg-libXcursor \ 37 port:xorg-libXext \ 38 port:Xft2 \ 39 port:xorg-libXrandr \ 40 port:xrender 41 42 depends_lib-append port:fontconfig \ 43 port:freetype \ 44 port:libffi \ 45 port:ncurses \ 46 port:netpbm 48 47 49 co mpiler.cxx_standard 201148 configure.ldflags-append -lintl 50 49 51 50 use_parallel_build no 52 51 53 depends_build-append port:automake \ 54 port:autoconf \ 55 port:libtool \ 56 port:netpbm 52 universal_variant no 57 53 58 if {[variant_isset doc]} { 59 depends_build-append \ 60 port:dvipng \ 61 port:texlive-fonts-extra \ 62 port:texlive-formats-extra \ 63 port:texlive-latex-extra \ 64 port:texlive-plain-generic \ 65 port:texlive-bin-extra \ 66 port:texlive-fonts-recommended 54 post-patch { 55 reinplace -W ${worksrcpath} "s|@PREFIX@|${prefix}|g" \ 56 configure.ac \ 57 csl/cslbase/configure.ac \ 58 csl/fox/configure.ac \ 59 csl/foxtests/configure.ac \ 60 packages/plot/gnuintfc.red 67 61 } 68 62 69 depends_lib-append port:libedit \70 port:xorg-libXcursor \71 port:Xft2 \72 port:xorg-libXrandr \73 port:fontconfig \74 port:freetype \75 port:ncurses76 77 depends_run-append port:gnuplot \78 path:bin/latex:texlive79 80 configure.ldflags-append \81 -lintl82 83 63 configure { 84 64 # we have to run configure twice, once --with-csl 85 65 # and another time --with-psl, prior to building … … 98 78 portconfigure::configure_main 99 79 } 100 80 101 # Documentation is also re-generated in the tree so that regardless of102 # history it should end up clean and organized.103 post-build {104 if {[variant_isset doc]} {105 system -W ${worksrcpath}/doc/misc ${build.cmd}106 system -W ${worksrcpath}/doc/manual ${build.cmd}107 }108 }109 110 81 destroot { 111 82 set builddir [exec ${worksrcpath}/scripts/findhost.sh [exec ${worksrcpath}/config.guess]] 112 113 83 set cslbuilddir ${worksrcpath}/cslbuild/${builddir} 114 84 set pslbuilddir ${worksrcpath}/pslbuild/${builddir} 115 set genericdir ${worksrcpath}/generic 116 117 set sharedir ${prefix}/share/${name} 118 set libexecdir ${prefix}/libexec/${name} 119 set bindir ${prefix}/bin 120 set mandir ${prefix}/share/man/man1 121 set docdir ${prefix}/share/doc/${name} 85 set libexecdir ${destroot}${prefix}/libexec/${name} 86 set bindir ${destroot}${prefix}/bin 87 set appsdir ${destroot}${applications_dir}/${name} 122 88 123 # Create target directories124 89 xinstall -d \ 125 ${destroot}${sharedir} \ 126 ${destroot}${libexecdir}/csl \ 127 ${destroot}${libexecdir}/psl/psl \ 128 ${destroot}${libexecdir}/psl/red 129 130 # Manual files 131 copy \ 132 ${filespath}/redcsl.1 \ 133 ${filespath}/redpsl.1 \ 134 ${genericdir}/newfront/redfront.1 \ 135 ${destroot}${mandir} 136 137 ln -s ${prefix}/share/man/man1/redfront.1 ${destroot}${mandir}/rfcsl.1 138 ln -s ${prefix}/share/man/man1/redfront.1 ${destroot}${mandir}/rfpsl.1 139 140 # CSL files 141 copy {*}[glob ${cslbuilddir}/csl/*.app] ${destroot}${libexecdir}/csl 142 ln -s ${prefix}/libexec/${name}/csl/reduce.app ${destroot}${applications_dir}/reduce.app 143 144 copy ${filespath}/runcsl.sh ${destroot}${bindir}/redcsl 145 copy ${filespath}/runbootstrapreduce.sh ${destroot}${bindir}/bootstrapreduce 146 copy ${filespath}/runcsllisp.sh ${destroot}${bindir}/csl 147 148 foreach f {redcsl bootstrapreduce csl} { 149 file attributes ${destroot}${bindir}/${f} -permissions +x 150 } 151 152 copy ${cslbuilddir}/redfront/rfcsl ${destroot}${bindir} 153 154 # PSL files 155 copy {*}[glob ${pslbuilddir}/psl/*] ${destroot}${libexecdir}/psl/psl 156 copy {*}[glob ${pslbuilddir}/red/*] ${destroot}${libexecdir}/psl/red 157 copy ${filespath}/runpsl.sh ${destroot}${bindir}/redpsl 158 file attributes ${destroot}${bindir}/redpsl -permissions +x 159 160 # Note (ha ha) that rfpsl is built in the cslbuild part of the tree. 161 copy ${cslbuilddir}/redfront/rfpsl ${destroot}${bindir} 162 163 xinstall -d ${destroot}${docdir} 164 xinstall -m 0644 -W ${worksrcpath}/csl/reduce.doc \ 165 BSD-LICENSE.txt \ 166 LGPL-2.1.txt \ 167 ${destroot}${docdir} 168 169 # install breduce 170 copy ${worksrcpath}/generic/breduce/breduce.1 ${destroot}/${mandir} 171 copy ${worksrcpath}/generic/breduce/breduce.pdf ${destroot}${docdir} 172 copy ${worksrcpath}/generic/breduce/breduce \ 173 ${worksrcpath}/packages/breduce/breduce.red \ 174 ${destroot}/${libexecdir} 175 ln -s ${prefix}/libexec/reduce/breduce ${destroot}${prefix}/bin/breduce 176 177 # Install documentation if requested 178 if {[variant_isset doc]} { 179 set docsrcdir ${worksrcpath}/doc/manual 180 set docmiscdir ${worksrcpath}/doc/misc 181 set docbasename manual 182 set extradocimagebasenames {bild cmsy10 gnuplotex turtleeg} 183 184 xinstall -d ${destroot}${docdir}/html ${destroot}${docdir}/pdf 185 186 copy \ 187 {*}[glob ${docmiscdir}/*.pdf] \ 188 ${docsrcdir}/${docbasename}.pdf \ 189 ${destroot}${docdir}/pdf 190 copy \ 191 ${docsrcdir}/redlogo.png \ 192 {*}[glob ${docsrcdir}/${docbasename}*.html] \ 193 {*}[glob ${docsrcdir}/${docbasename}*.png] \ 194 ${docsrcdir}/${docbasename}.css \ 195 ${docsrcdir}/index.html \ 196 ${destroot}${docdir}/html 197 foreach n ${extradocimagebasenames} { 198 copy {*}[glob ${docsrcdir}/${n}*.png] ${destroot}${docdir}/html 199 } 200 } 201 } 90 ${libexecdir} \ 91 ${libexecdir}/psl \ 92 ${libexecdir}/psl/psl \ 93 ${libexecdir}/psl/red \ 94 ${appsdir} 202 95 203 variant doc description {Install HTML and PDF documentation} {} 96 copy ${worksrcpath}/macbuild/README.for.distribution ${libexecdir}/README 97 98 copy ${cslbuilddir}/csl/reduce.app ${appsdir} 99 xinstall -m a+rx ${worksrcpath}/macbuild/runcsl.sh ${appsdir}/redcsl 100 xinstall -m a+rx ${cslbuilddir}/redfront/rfcsl ${appsdir} 101 102 copy {*}[glob ${pslbuilddir}/psl/*] ${libexecdir}/psl/psl 103 copy {*}[glob ${pslbuilddir}/red/*] ${libexecdir}/psl/red 104 xinstall -m a+rx ${worksrcpath}/macbuild/runpsl.sh ${libexecdir}/psl/redpsl 105 xinstall -m a+rx ${cslbuilddir}/redfront/rfpsl ${libexecdir}/psl 106 107 copy ${worksrcpath}/doc/manual/manual.pdf ${libexecdir}/reduce-manual.pdf 108 109 # link scripts to ${prefix}/bin 110 ln -s ${applications_dir}/${name}/redcsl ${bindir}/redcsl 111 ln -s ${prefix}/libexec/${name}/psl/redpsl ${bindir}/redpsl 112 ln -s ${applications_dir}/${name}/rfcsl ${bindir}/rfcsl 113 ln -s ${prefix}/libexec/${name}/psl/rfpsl ${bindir}/rfpsl 114 } 204 115 205 116 livecheck.version ${version_dashes} 206 117 livecheck.url https://sourceforge.net/projects/reduce-algebra/files/