[50222] trunk/dports/graphics

Darren Weber dweber at macports.org
Wed Apr 29 14:08:07 PDT 2009


On Tue, Apr 28, 2009 at 4:30 AM, Ryan Schmidt <ryandesign at macports.org>wrote:

> On Apr 27, 2009, at 19:48, Darren Weber wrote:
>
>  On Mon, Apr 27, 2009 at 5:01 PM, Ryan Schmidt wrote:
>>
>>  Since this port uses cmake, have you considered using the cmake portgroup
>>> to simplify it?
>>>
>>
>> No, I didn't know such a portgroup exists and I have no idea how to use a
>> portgroup.
>>
>
> Portgroups are basically include statements, allowing you include a set of
> definitions that are common to a class of ports. There is a section on
> portgroups in the guide. Unfortunately it does not have any general
> explanation of what a portgroup is. It just describes the options available
> in some of the existing portgroups.
>
> http://guide.macports.org/#reference.portgroup
>
> The cmake portgroup is new and not yet documented in the guide, but you can
> read its source code here to see what it does:
>
> http://trac.macports.org/browser/trunk/dports/_resources/port1.0/
> group/cmake-1.0.tcl
>
> Basically, all ports that use cmake need to do certain similar things, for
> example depend on the cmake port, use cmake in the configure phase, specify
> the prefix using -DCMAKE_INSTALL_PREFIX instead of --prefix, etc.; the cmake
> portgroup exists to simplify such ports.
>


Interesting.  The vtk-devel will use options to cmake that conflict with
those in this portgroup (for a shared library build), ie:

    configure.args-append \
        -DBUILD_SHARED_LIBS:BOOL=ON \
        -DCMAKE_SKIP_BUILD_RPATH:BOOL=OFF \
        -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF \
        -DCMAKE_INSTALL_RPATH:STRING=${prefix}/lib/${distname} \
        -DVTK_USE_RPATH:BOOL=ON

After a lot of reading and some testing, this combination of options appears
to be optimal for vtk-5.4.  There are some issues when building the examples
and testing binaries, but some post-destroot hacks with install_name_tool
will take care of that (a better solution might be a patch to the
CMakeLists.txt file for the examples and testing installation phase, which
should automatically apply the INSTALL_RPATH).

Best, Darren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20090429/fec0be15/attachment.html>


More information about the macports-dev mailing list