[46233] trunk/dports/math
Ryan Schmidt
ryandesign at macports.org
Sun Feb 1 02:36:43 PST 2009
On Feb 1, 2009, at 02:51, Ryan Schmidt wrote:
> On Feb 1, 2009, at 02:36, Juan Manuel Palacios wrote:
>
>>> +destroot {
>>> + copy ${worksrcpath}/m_apm.h ${destroot}${prefix}/include
>>> + copy ${worksrcpath}/libmapm.a ${destroot}${prefix}/lib
>>> + xinstall -d -m 755 ${destroot}${prefix}/share/${name}
>>> + copy ${worksrcpath}/DOCS ${destroot}${prefix}/share/${name}/
>>> + copy ${worksrcpath}/MULTI_THREAD ${destroot}${prefix}/share/$
>>> {name}/
>>> + copy ${worksrcpath}/PI_DEMO ${destroot}${prefix}/share/${name}/
>>> + copy ${worksrcpath}/README ${destroot}${prefix}/share/${name}
>>> + foreach prog {calc primenum validate} {
>>> + copy ${worksrcpath}/$prog ${destroot}${prefix}/bin
>>> + }
>>> +}
>
> Docs should go in ${prefix}/share/doc/${name} (or perhaps ${prefix}/
> share/doc/${name}-${version} -- there was a push for that last year
> (or before?) but I'm not sure the justification was totally sound).
>
> I tend to use "xinstall" in the destroot phase and "copy" in other
> phases. There's not much difference, I think, in the outcome. But
> using xinstall you can simplify the above to:
>
> destroot {
> xinstall -m 755 -W ${worksrcpath} \
> calc primenum validate \
> ${destroot}${prefix}/bin
> xinstall -m 644 -W ${worksrcpath} m_apm.h ${destroot}${prefix}/
> include
> xinstall -m 644 -W ${worksrcpath} libmapm.a ${destroot}${prefix}/lib
> xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}-${version}
> xinstall -m 644 -W ${worksrcpath} \
> DOCS MULTI_THREAD PI_DEMO README \
> ${destroot}${prefix}/share/doc/${name}-${version}
> }
>
> (Not tested; typos possible...)
Ok, I'm wrong here in that I thought those all-caps items were files,
but in fact DOCS MULTI_THREAD and PI_DEMO are directories and README
is a symlink, so xinstall won't work. In that case you will have to
use "copy" after all. But you could do it in a foreach loop to
simplify it from what you had before.
You could symlink DOCS into ${prefix}/share/doc/${name} in case
someone is looking for documentation there.
There's an additional problem I didn't notice before, which is that
it builds using "gcc" but you should fix it so that it builds with
whatever's in ${configure.cc}. Adding this to build.args seems to work.
Consider enabling the parallel build. It works fine for me.
See attached patch. Actually tested this time. :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mapm.diff
Type: application/octet-stream
Size: 1701 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20090201/1de87c86/attachment.obj>
More information about the macports-dev
mailing list