[MacPorts] #33259: cmake portgroup: out of source build option, possibly by default

MacPorts noreply at macports.org
Tue Mar 10 12:23:10 PDT 2015


#33259: cmake portgroup: out of source build option, possibly by default
---------------------------+--------------------------------
  Reporter:  ryandesign@…  |      Owner:  macports-tickets@…
      Type:  enhancement   |     Status:  new
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:
Resolution:                |   Keywords:
      Port:                |
---------------------------+--------------------------------

Comment (by rjvbertin@…):

 The point with that is: how are you going handle all different build
 systems? CMake has a portgroup exactly because it doesn't work the same as
 the legacy `configure` approach, ditto for qmake and the Python group. So
 even if base could support OOT builds for the systems it supports, the
 cmake (etc) portgroup files will still need to redefine the appropriate
 values.

 You wanted a patch? Copying one inline:

 {{{
 diff --git a/trunk/dports/_resources/port1.0/group/cmake-1.0.tcl
 b/trunk/dports/_resources/port1.0/group/cmake-1.0.tcl
 --- a/trunk/dports/_resources/port1.0/group/cmake-1.0.tcl       (revision
 133751)
 +++ b/trunk/dports/_resources/port1.0/group/cmake-1.0.tcl       (working
 copy)
 @@ -134,3 +134,13 @@
  if {[string first "--enable-debug" ${configure.args}] > -1} {
      configure.args-delete     --enable-debug
  }
 +
 +# setup all ports using cmake to build in a separate directory from the
 source;
 +# this setting must be the full directory path
 +post-extract            { file mkdir ${workpath}/build }
 +
 +# standard post-arg, where to find the primary CMakeLists.txt file.
 +default configure.post_args {../${worksrcdir}}
 +default configure.dir       {${workpath}/build}
 +default build.dir           {${workpath}/build}
 +
 }}}

 That's copied over directly from the KDE4 1.1 portgroup, with just a
 slight change in the comment.

-- 
Ticket URL: <https://trac.macports.org/ticket/33259#comment:11>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list