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

MacPorts noreply at macports.org
Tue Mar 10 16:15:22 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 cal@…):

 Here's a patch:

 {{{
 #!patch
 Index: cmake-1.0.tcl
 ===================================================================
 --- cmake-1.0.tcl       (revision 133760)
 +++ cmake-1.0.tcl       (working copy)
 @@ -134,3 +134,27 @@
  if {[string first "--enable-debug" ${configure.args}] > -1} {
      configure.args-delete     --enable-debug
  }
 +
 +options cmake.out_of_source
 +default cmake.out_of_source yes
 +
 +options cmake.build_dir
 +default cmake.build_dir {${workpath}/build}
 +
 +proc _cmake_get_build_dir {} {
 +    global cmake.out_of_source cmake.build_dir
 +
 +    if {${cmake.out_of_source}} {
 +        return ${cmake.build_dir}
 +    } else {
 +        return ${worksrcpath}
 +    }
 +}
 +
 +pre-configure {
 +    file mkdir ${configure.dir}
 +}
 +
 +default configure.dir       {[_cmake_get_build_dir]}
 +default configure.post_args {../${worksrcdir}}
 +default build.dir           {${configure.dir}}
 }}}

 Tested and works against weechat. I've left the default at yes, that needs
 to be changed if you want to test every port manually.
 Also, the weechat port seems to need network access to build manpages.

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


More information about the macports-tickets mailing list