[82168] trunk/dports/graphics
Blair Zajac
blair at orcaware.com
Tue Aug 9 17:57:24 PDT 2011
On Aug 9, 2011, at 2:59 PM, Ryan Schmidt wrote:
> On Aug 9, 2011, at 12:16, blair at macports.org wrote:
>
>> Revision: 82168
>> http://trac.macports.org/changeset/82168
>> Author: blair at macports.org
>> Date: 2011-08-09 10:16:30 -0700 (Tue, 09 Aug 2011)
>> Log Message:
>> -----------
>> field3d: new port.
>
>
>> +homepage https://sites.google.com/site/field3d/home
>> +master_sites https://github.com/imageworks/Field3D/tarball/v${version}
>> +extract.mkdir yes
>> +extract.post_args "| tar --strip-components=1 -xf -"
>
> This works... The idea is to fix github's unpredictably-named directories. But I've been doing it this way:
>
> post-extract {
> move [glob ${workpath}/*] ${worksrcpath}
> }
>
> I think this is better because it doesn't introduce knowledge into the portfile about the specifics of how the extract phase works. There are some problems with the way the extract phase is currently implemented (e.g. no notification if the decompression program failed), and we may want to change how it works later, so it would probably be better if ports did not assume the extract phase will always be a compression program piped to tar.
Will that leave some oddly named tarball in $prefix/var/macports/distfiles?
>
>
>> +post-patch {
>> + reinplace "s#@PREFIX@#$prefix#g" ${worksrcpath}/BuildSupport.py
>> + reinplace "s#@CC@#${configure.cc}#" ${worksrcpath}/SConstruct
>> + reinplace "s#@CXX@#${configure.cxx}#" ${worksrcpath}/SConstruct
>> +}
>
> These reinplaces are good for ensuring we're UsingTheRightCompiler... but what about the right build_arch? May need to do something with ${configure.cc_archflags} too (or [get_canonical_archflags], if universal works).
Can you provide a link to universal so I know what this is all about?
I could also tweak the CFLAGS and CXXFLAGS to get additional flags in there.
> +destroot {
>> + set sharedir ${destroot}${prefix}/share
>> + set docdir ${sharedir}/doc/${name}
>> +
>> + set releasedir ${worksrcpath}/install/darwin/m32/release
>> +
>> + foreach f {include/Field3D lib/libField3D.a lib/libField3D.dylib} {
>> + file copy ${releasedir}/${f} ${destroot}${prefix}/${f}
>> + }
>> +
>> + xinstall -m 755 -d ${docdir}
>> + foreach f {CHANGES COPYING README} {
>> + file copy ${worksrcpath}/$f ${docdir}
>> + }
>> +}
>
> You don't need foreach loops to copy these files:
>
> copy ${releasedir}/include/Field3D ${destroot}${prefix}/include
> xinstall -m 644 -W ${releasedir}/lib libField3D.a libField3D.dylib ${destroot}${prefix}/lib
> xinstall -m 644 -W ${worksrcpath} CHANGES COPYING README ${docdir}
Thanks,
Blair
More information about the macports-dev
mailing list