Alternate build directory for CMake-based port?
Bradley Giesbrecht
pixilla at macports.org
Thu Aug 23 07:51:11 PDT 2012
On Aug 23, 2012, at 7:45 AM, Joshua Root wrote:
> On 2012-8-24 00:39 , Kevin Reid wrote:
>> I am interested in getting the GNU Radio ports (gnuradio-*) updated to the latest version. (Relevant ticket: <https://trac.macports.org/ticket/31475>. The maintainer has acknowledged the problem but no work has been done for 11 months.) I have not seriously attempted to work on portfiles before.
>>
>> GNU Radio 3.6.* has switched exclusively to a CMake-based build system. For the most part, I have been able to simply apply the cmake PortGroup and modify the configuration parameters to CMake style.
>>
>> However, GNU Radio also insists that the build directory be different from the source directory; the CMakeLists.txt file contains:
>>
>> if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
>> message(FATAL_ERROR "Prevented in-tree build. This is bad practice.")
>> endif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
>>
>> I could of course patch out this condition, but that seems unnecessarily fragile if it even works. How can I tell MacPorts to use distinct source and build directories for a CMake-based port?
>>
>> The official build instructions are to do
>> (in gnuradio source)
>> mkdir build
>> cd build
>> cmake ../
>> make
>> but since MacPorts takes care of these commands via its own infrastructure I don't know where to "just" insert a cd command and tweak the pathnames.
>
> Sure, something like this should do it:
>
> worksrcdir ${worksrcdir}/build
> post-extract {
> file mkdir ${worksrcpath}
> }
Wouldn't something like this be need:
configure.args ../
Regards,
Bradley Giesbrecht (pixilla)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2763 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20120823/f30c79a6/attachment.p7s>
More information about the macports-dev
mailing list