[71873] trunk/dports/math/petsc/Portfile
Ryan Schmidt
ryandesign at macports.org
Sat Sep 25 16:28:46 PDT 2010
On Sep 25, 2010, at 14:08, mmoll at macports.org wrote:
> Revision: 71873
> http://trac.macports.org/changeset/71873
> Author: mmoll at macports.org
> Date: 2010-09-25 12:08:11 -0700 (Sat, 25 Sep 2010)
> Log Message:
> -----------
> math/petsc: version bump to 3.1-p4
>
> Modified Paths:
> --------------
> trunk/dports/math/petsc/Portfile
> post-destroot {
> - reinplace "s|${destroot}${prefix}|${prefix}|g" ${destroot}${prefix}/lib/petsc/conf/base
> + reinplace "s|${destroot}${prefix}|${prefix}|g" ${destroot}${prefix}/lib/petsc/conf/RDict.db
> + reinplace "s|${destroot}${prefix}|${prefix}|g" ${destroot}${prefix}/lib/petsc/conf/petscrules
> + reinplace "s|${destroot}${prefix}|${prefix}|g" ${destroot}${prefix}/lib/petsc/conf/petscvariables
> + reinplace "s|${destroot}${prefix}|${prefix}|g" ${destroot}${prefix}/lib/petsc/conf/reconfigure-darwin.py
> reinplace "s|${destroot}${prefix}|${prefix}|g" ${destroot}${prefix}/lib/petsc/conf/rules
> - reinplace "s|${destroot}${prefix}|${prefix}|g" ${destroot}${prefix}/lib/petsc/conf/petscvariables
> + reinplace "s|${destroot}${prefix}|${prefix}|g" ${destroot}${prefix}/lib/petsc/conf/test
> reinplace "s|${destroot}${prefix}|${prefix}|g" ${destroot}${prefix}/lib/petsc/conf/variables
> + reinplace "s|${destroot}${prefix}|${prefix}|g" ${destroot}${prefix}/lib/petsc/include/petscconf.h
> + reinplace "s|${worksrcpath}|${prefix}/petsc|g" ${destroot}${prefix}/lib/petsc/include/petscconf.h
> + reinplace "s|${worksrcpath}|${prefix}/petsc|g" ${destroot}${prefix}/lib/petsc/include/petscmachineinfo.h
> + reinplace "s|${worksrcpath}|${prefix}/petsc|g" ${destroot}${prefix}/lib/petsc/conf/petscvariables
> + reinplace "s|${worksrcpath}|${prefix}/petsc|g" ${destroot}${prefix}/lib/petsc/conf/RDict.db
> }
reinplace can affect multiple files in one invocation, so you can simplify this to:
post-destroot {
reinplace "s|${destroot}${prefix}|${prefix}|g" ${destroot}${prefix}/lib/petsc/conf/RDict.db \
${destroot}${prefix}/lib/petsc/conf/petscrules \
${destroot}${prefix}/lib/petsc/conf/petscvariables \
${destroot}${prefix}/lib/petsc/conf/reconfigure-darwin.py \
${destroot}${prefix}/lib/petsc/conf/rules \
${destroot}${prefix}/lib/petsc/conf/test \
${destroot}${prefix}/lib/petsc/conf/variables \
${destroot}${prefix}/lib/petsc/include/petscconf.h
reinplace "s|${worksrcpath}|${prefix}/petsc|g" ${destroot}${prefix}/lib/petsc/include/petscconf.h \
${destroot}${prefix}/lib/petsc/include/petscmachineinfo.h \
${destroot}${prefix}/lib/petsc/conf/petscvariables \
${destroot}${prefix}/lib/petsc/conf/RDict.db
}
More information about the macports-dev
mailing list