[50222] trunk/dports/graphics

Darren Weber dweber at macports.org
Wed Apr 29 14:21:13 PDT 2009


Oh, also vtk-devel is using a different build type,

-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo

This is consistent with GNU distributions that use -O2 -g to provide some
degree of optimization and the capacity to attach to and debug running
processes, examine core dumps, etc.

Best, Darren

PS, The general cmake variables defined in vtk-devel are currently (among
others):

    -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
    -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
    -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
    -DCMAKE_INCLUDE_PATH:PATH=${prefix}/include \
    -DCMAKE_LIBRARY_PATH:PATH=${prefix}/lib \
    -DCMAKE_INSTALL_NAME_DIR:STRING=${prefix}/lib/${distname} \

Plus the shared dylib variant appends:

        -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

Some of these are in the cmake port group, some are not, for comparison see:
http://trac.macports.org/browser/trunk/dports/_resources/port1.0/group/cmake-1.0.tcl



On Wed, Apr 29, 2009 at 2:08 PM, Darren Weber <dweber at macports.org> wrote:

>
>
> 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/670a0b0c/attachment-0001.html>


More information about the macports-dev mailing list