[macports-ports] 12/13: xcbuild: add new tool for xcode

Sean Farley sean at macports.org
Tue Jan 24 18:28:02 UTC 2017


Ryan Schmidt <ryandesign at macports.org> writes:

>> On Jan 23, 2017, at 18:08, Sean Farley <sean at macports.org> wrote:
>> 
>> Sean Farley (seanfarley) pushed a commit to branch master
>> in repository macports-ports.
>> 
>> 
>> https://github.com/macports/macports-ports/commit/ea02c6a2415087a43634f83653532c4aaf346a21
>> 
>> commit ea02c6a2415087a43634f83653532c4aaf346a21
>> 
>> Author: Sean Farley <sean at macports.org>
>> AuthorDate: Mon Jan 23 16:04:28 2017 -0800
>> 
>> 
>>     xcbuild: add new tool for xcode
>> 
>> ---
>>  devel/xcbuild/Portfile | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 61 insertions(+)
>> 
>> 
>> diff --git a/devel/xcbuild/Portfile b/devel/xcbuild/Portfile
>> 
>> new file mode 100644
>> 
>> index 0000000..958b72a
>> 
>> --- /dev/null
>> 
>> +++ b/devel/xcbuild/Portfile
>> 
>> @@ -0,0 +1,61 @@
>> 
>> +# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=portfile:et:sw=4:ts=4:sts=4
>> 
>> +
>> 
>> +PortSystem          1.0
>> 
>> +PortGroup           cmake 1.0
>> 
>> +PortGroup           github 1.0
>> 
>> +
>> 
>> +github.setup        facebook xcbuild 0.1.1
>> 
>> +categories          devel
>> 
>> +platforms           darwin
>> 
>> +
>> 
>> +universal_variant   no
>> 
>> +license             BSD
>> 
>> +maintainers         sean openmaintainer
>> 
>> +
>> 
>> +description         xcbuild is an Xcode-compatible build tool with the goal of \
>> 
>> +                    providing faster builds, better documentation of the build \
>> 
>> +                    process and running on multiple platforms
>> 
>> +long_description    ${description}
>> 
>> +
>> 
>> +# Fetch from git instead of distfile because it needs submodules
>> 
>> +fetch.type          git
>> 
>> +
>> 
>> +depends_lib-append  port:libpng \
>> 
>> +                    port:pkgconfig \
>> 
>> +                    port:zlib \
>> 
>> +                    port:libxml2 \
>> 
>> +                    port:cmake \
>> 
>> +                    port:ninja
>> 
>
> Does xcbuild really use pkgconfig, cmake and ninja at runtime as well? Usually they're only build-time dependencies. The cmake portgroup already adds cmake as a build-time dependency.

Yep. xcbuild is a wrapper around xcodebuild that can output both cmake
and ninja build files (along with llbuild, I believe).

>> +post-fetch {
>> 
>> +    system -W "${worksrcpath}" "git submodule update --init"
>> 
>> +}
>> 
>> +
>> 
>> +# use_configure no
>> 
>> +
>> 
>> +configure {
>> 
>> +    system -W "${worksrcpath}" "${configure.cmd} -G Ninja ${configure.args} ${worksrcpath}"
>> 
>> +}
>> 
>> +
>> 
>> +build {
>> 
>> +    system -W "${worksrcpath}" "ninja"
>> 
>> +}
>> 
>> +
>> 
>> +destroot {
>> 
>> +    system -W "${worksrcpath}" "DESTDIR=${destroot} ninja install"
>> 
>> +}
>
> It might be better to get support for ninja into the cmake portgroup, if ninja does really provide such great benefits, rather than override the standard phases. See https://trac.macports.org/ticket/47127 for that request.

Ah, nice, I hadn't seen that.


More information about the macports-dev mailing list