Hi,

I need to use cmake and ninja in an update to a portfile. All goes well until 
the destroot phase where I get:

Executing:  cd 
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_swi-prolog/swi-prolog/work/swipl-8.0.1"
 && ninja install 
DESTDIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_swi-prolog/swi-prolog/work/destroot
 
DEBUG: system:  cd 
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_swi-prolog/swi-prolog/work/swipl-8.0.1"
 && ninja install 
DESTDIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_swi-prolog/swi-prolog/work/destroot
 
ninja: error: unknown target 
'DESTDIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_swi-prolog/swi-prolog/work/destroot'
Command failed:  cd 
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_swi-prolog/swi-prolog/work/swipl-8.0.1"
 && ninja install 
DESTDIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_swi-prolog/swi-prolog/work/destroot
 
Exit code: 1

For some reason MacPorts is generating the command with the arguments in the 
wrong order. I.e. is trying:

ninja install DESTDIR=/opt/local/...

instead of:

DESTDIR=/opt/local/... ninja install

Any help is most appreciated. I looked for other cases of using ninja in the 
portfiles but there's only a handful of them and I didn't find any clues in 
them. The relevant part of the portfile that I'm trying to write is:

depends_build   \
        port:cmake     \
        port:ninja     \
        ...

configure.cmd   \
        cmake

configure.pre_args      \
        -DCMAKE_INSTALL_PREFIX=${prefix}            \
        -DCMAKE_BUILD_TYPE=Release                  \
        -DCMAKE_INCLUDE_PATH=${prefix}/include      \
        -DCMAKE_LIBRARY_PATH=/usr/lib:${prefix}/lib

configure.args  \
        "-G Ninja ."

build.cmd       \
        ninja

Thanks,
Paulo

-----------------------------------------------------------------
Paulo Moura
Logtalk developer




Reply via email to