diff mbox series

[PATCH/next,v1,1/2] package/ninja: bump version to 1.10.2

Message ID 20201202194236.1751-1-ps.report@gmx.net
State Accepted
Headers show
Series [PATCH/next,v1,1/2] package/ninja: bump version to 1.10.2 | expand

Commit Message

Peter Seiderer Dec. 2, 2020, 7:42 p.m. UTC
- rebased 0001-set-minimum-cmake-version-to-3.10.patch

- removed 0002-remove-fdiagnostics-color-from-make-command.patch
  (superseeded by upstream commit [1])

- rebased package/ninja/0003-CMake-fix-object-library-usage.patch

[1] https://github.com/ninja-build/ninja/commit/418d59b8a6054ce9ef1a28c07c41d3a0bb386836

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 ...01-set-minimum-cmake-version-to-3.10.patch | 20 +++---
 ...fdiagnostics-color-from-make-command.patch | 29 --------
 .../0003-CMake-fix-object-library-usage.patch | 67 ++++++++++---------
 package/ninja/ninja.hash                      |  4 +-
 package/ninja/ninja.mk                        |  2 +-
 5 files changed, 49 insertions(+), 73 deletions(-)
 delete mode 100644 package/ninja/0002-remove-fdiagnostics-color-from-make-command.patch

Comments

Thomas Petazzoni Dec. 5, 2020, 8:28 p.m. UTC | #1
On Wed,  2 Dec 2020 20:42:35 +0100
Peter Seiderer <ps.report@gmx.net> wrote:

> - rebased 0001-set-minimum-cmake-version-to-3.10.patch
> 
> - removed 0002-remove-fdiagnostics-color-from-make-command.patch
>   (superseeded by upstream commit [1])
> 
> - rebased package/ninja/0003-CMake-fix-object-library-usage.patch
> 
> [1] https://github.com/ninja-build/ninja/commit/418d59b8a6054ce9ef1a28c07c41d3a0bb386836
> 
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
>  ...01-set-minimum-cmake-version-to-3.10.patch | 20 +++---
>  ...fdiagnostics-color-from-make-command.patch | 29 --------
>  .../0003-CMake-fix-object-library-usage.patch | 67 ++++++++++---------
>  package/ninja/ninja.hash                      |  4 +-
>  package/ninja/ninja.mk                        |  2 +-
>  5 files changed, 49 insertions(+), 73 deletions(-)
>  delete mode 100644 package/ninja/0002-remove-fdiagnostics-color-from-make-command.patch

Both applied. Could you keep an eye of meson-based package failures in
the coming days? Updates of Meson have had a tendency to break stuff a
bit in the past. Thanks!

Thomas
Peter Seiderer Dec. 9, 2020, 10:50 p.m. UTC | #2
Hello Thomas,

On Sat, 5 Dec 2020 21:28:30 +0100, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

> On Wed,  2 Dec 2020 20:42:35 +0100
> Peter Seiderer <ps.report@gmx.net> wrote:
>
> > - rebased 0001-set-minimum-cmake-version-to-3.10.patch
> >
> > - removed 0002-remove-fdiagnostics-color-from-make-command.patch
> >   (superseeded by upstream commit [1])
> >
> > - rebased package/ninja/0003-CMake-fix-object-library-usage.patch
> >
> > [1] https://github.com/ninja-build/ninja/commit/418d59b8a6054ce9ef1a28c07c41d3a0bb386836
> >
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > ---
> >  ...01-set-minimum-cmake-version-to-3.10.patch | 20 +++---
> >  ...fdiagnostics-color-from-make-command.patch | 29 --------
> >  .../0003-CMake-fix-object-library-usage.patch | 67 ++++++++++---------
> >  package/ninja/ninja.hash                      |  4 +-
> >  package/ninja/ninja.mk                        |  2 +-
> >  5 files changed, 49 insertions(+), 73 deletions(-)
> >  delete mode 100644 package/ninja/0002-remove-fdiagnostics-color-from-make-command.patch
>
> Both applied. Could you keep an eye of meson-based package failures in
> the coming days? Updates of Meson have had a tendency to break stuff a
> bit in the past. Thanks!

No breakage detected (yet?), the only new feature is the following
deprecation warning:

	DEPRECATION: c_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
	DEPRECATION: c_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
	DEPRECATION: cpp_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
	DEPRECATION: cpp_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.


Which can be fixed by the following patch:

--- a/package/meson/cross-compilation.conf.in
+++ b/package/meson/cross-compilation.conf.in
@@ -14,13 +14,15 @@ g-ir-scanner = '@STAGING_DIR@/usr/bin/g-ir-scanner'

 [properties]
 needs_exe_wrapper = true
+sys_root = '@STAGING_DIR@'
+pkg_config_libdir = '@STAGING_DIR@/usr/lib/pkgconfig:@STAGING_DIR@/usr/share/pkgconfig'
+pkg_config_static = '@STATIC@'
+
+[built-in options]
 c_args = [@TARGET_CFLAGS@]
 c_link_args = [@TARGET_LDFLAGS@]
 cpp_args = [@TARGET_CXXFLAGS@]
 cpp_link_args = [@TARGET_LDFLAGS@]
-sys_root = '@STAGING_DIR@'
-pkg_config_libdir = '@STAGING_DIR@/usr/lib/pkgconfig:@STAGING_DIR@/usr/share/pkgconfig'
-pkg_config_static = '@STATIC@'

 [host_machine]
 system = 'linux'


Regards,
Peter

>
> Thomas
Yegor Yefremov Dec. 10, 2020, 10:36 a.m. UTC | #3
Hi Peter, all,

On Wed, Dec 9, 2020 at 11:50 PM Peter Seiderer <ps.report@gmx.net> wrote:
>
> Hello Thomas,
>
> On Sat, 5 Dec 2020 21:28:30 +0100, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
>
> > On Wed,  2 Dec 2020 20:42:35 +0100
> > Peter Seiderer <ps.report@gmx.net> wrote:
> >
> > > - rebased 0001-set-minimum-cmake-version-to-3.10.patch
> > >
> > > - removed 0002-remove-fdiagnostics-color-from-make-command.patch
> > >   (superseeded by upstream commit [1])
> > >
> > > - rebased package/ninja/0003-CMake-fix-object-library-usage.patch
> > >
> > > [1] https://github.com/ninja-build/ninja/commit/418d59b8a6054ce9ef1a28c07c41d3a0bb386836
> > >
> > > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > > ---
> > >  ...01-set-minimum-cmake-version-to-3.10.patch | 20 +++---
> > >  ...fdiagnostics-color-from-make-command.patch | 29 --------
> > >  .../0003-CMake-fix-object-library-usage.patch | 67 ++++++++++---------
> > >  package/ninja/ninja.hash                      |  4 +-
> > >  package/ninja/ninja.mk                        |  2 +-
> > >  5 files changed, 49 insertions(+), 73 deletions(-)
> > >  delete mode 100644 package/ninja/0002-remove-fdiagnostics-color-from-make-command.patch
> >
> > Both applied. Could you keep an eye of meson-based package failures in
> > the coming days? Updates of Meson have had a tendency to break stuff a
> > bit in the past. Thanks!
>
> No breakage detected (yet?), the only new feature is the following
> deprecation warning:
>
>         DEPRECATION: c_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
>         DEPRECATION: c_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
>         DEPRECATION: cpp_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
>         DEPRECATION: cpp_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
>
>
> Which can be fixed by the following patch:
>
> --- a/package/meson/cross-compilation.conf.in
> +++ b/package/meson/cross-compilation.conf.in
> @@ -14,13 +14,15 @@ g-ir-scanner = '@STAGING_DIR@/usr/bin/g-ir-scanner'
>
>  [properties]
>  needs_exe_wrapper = true
> +sys_root = '@STAGING_DIR@'
> +pkg_config_libdir = '@STAGING_DIR@/usr/lib/pkgconfig:@STAGING_DIR@/usr/share/pkgconfig'
> +pkg_config_static = '@STATIC@'
> +
> +[built-in options]
>  c_args = [@TARGET_CFLAGS@]
>  c_link_args = [@TARGET_LDFLAGS@]
>  cpp_args = [@TARGET_CXXFLAGS@]
>  cpp_link_args = [@TARGET_LDFLAGS@]
> -sys_root = '@STAGING_DIR@'
> -pkg_config_libdir = '@STAGING_DIR@/usr/lib/pkgconfig:@STAGING_DIR@/usr/share/pkgconfig'
> -pkg_config_static = '@STATIC@'
>
>  [host_machine]
>  system = 'linux'

Ninja build breaks on my development host because my host CMake is
3.10.2 and the following source file option like INCLUDE_DIRECTORIES
was introduced in a later version:

        set_source_files_properties(src/browse.cc
                PROPERTIES
                        OBJECT_DEPENDS "${CMAKE_BINARY_DIR}/build/browse_py.h"
                        INCLUDE_DIRECTORIES "${CMAKE_BINARY_DIR}"
                        COMPILE_DEFINITIONS NINJA_PYTHON="python"
        )

The build breaks because build/browse_py.h cannot be found.

Though I can create a patch for it, I wonder whether it is time to
bump the minimal CMake version to something new? To 3.16 for example?

Best regards,
Yegor
Peter Seiderer Dec. 10, 2020, 7:01 p.m. UTC | #4
Hello Yegor,

On Thu, 10 Dec 2020 11:36:40 +0100, Yegor Yefremov <yegorslists@googlemail.com> wrote:

> Hi Peter, all,
>
> On Wed, Dec 9, 2020 at 11:50 PM Peter Seiderer <ps.report@gmx.net> wrote:
> >
> > Hello Thomas,
> >
> > On Sat, 5 Dec 2020 21:28:30 +0100, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> >
> > > On Wed,  2 Dec 2020 20:42:35 +0100
> > > Peter Seiderer <ps.report@gmx.net> wrote:
> > >
> > > > - rebased 0001-set-minimum-cmake-version-to-3.10.patch
> > > >
> > > > - removed 0002-remove-fdiagnostics-color-from-make-command.patch
> > > >   (superseeded by upstream commit [1])
> > > >
> > > > - rebased package/ninja/0003-CMake-fix-object-library-usage.patch
> > > >
> > > > [1] https://github.com/ninja-build/ninja/commit/418d59b8a6054ce9ef1a28c07c41d3a0bb386836
> > > >
> > > > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > > > ---
> > > >  ...01-set-minimum-cmake-version-to-3.10.patch | 20 +++---
> > > >  ...fdiagnostics-color-from-make-command.patch | 29 --------
> > > >  .../0003-CMake-fix-object-library-usage.patch | 67 ++++++++++---------
> > > >  package/ninja/ninja.hash                      |  4 +-
> > > >  package/ninja/ninja.mk                        |  2 +-
> > > >  5 files changed, 49 insertions(+), 73 deletions(-)
> > > >  delete mode 100644 package/ninja/0002-remove-fdiagnostics-color-from-make-command.patch
> > >
> > > Both applied. Could you keep an eye of meson-based package failures in
> > > the coming days? Updates of Meson have had a tendency to break stuff a
> > > bit in the past. Thanks!
> >
> > No breakage detected (yet?), the only new feature is the following
> > deprecation warning:
> >
> >         DEPRECATION: c_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
> >         DEPRECATION: c_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
> >         DEPRECATION: cpp_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
> >         DEPRECATION: cpp_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
> >
> >
> > Which can be fixed by the following patch:
> >
> > --- a/package/meson/cross-compilation.conf.in
> > +++ b/package/meson/cross-compilation.conf.in
> > @@ -14,13 +14,15 @@ g-ir-scanner = '@STAGING_DIR@/usr/bin/g-ir-scanner'
> >
> >  [properties]
> >  needs_exe_wrapper = true
> > +sys_root = '@STAGING_DIR@'
> > +pkg_config_libdir = '@STAGING_DIR@/usr/lib/pkgconfig:@STAGING_DIR@/usr/share/pkgconfig'
> > +pkg_config_static = '@STATIC@'
> > +
> > +[built-in options]
> >  c_args = [@TARGET_CFLAGS@]
> >  c_link_args = [@TARGET_LDFLAGS@]
> >  cpp_args = [@TARGET_CXXFLAGS@]
> >  cpp_link_args = [@TARGET_LDFLAGS@]
> > -sys_root = '@STAGING_DIR@'
> > -pkg_config_libdir = '@STAGING_DIR@/usr/lib/pkgconfig:@STAGING_DIR@/usr/share/pkgconfig'
> > -pkg_config_static = '@STATIC@'
> >
> >  [host_machine]
> >  system = 'linux'
>
> Ninja build breaks on my development host because my host CMake is
> 3.10.2 and the following source file option like INCLUDE_DIRECTORIES
> was introduced in a later version:

Are you sure this is cmake version related? According to [1]
INCLUDE_DIRECTORIES is valid for cmake-3.10.x..., what is the exact
failure message?

>
>         set_source_files_properties(src/browse.cc
>                 PROPERTIES
>                         OBJECT_DEPENDS "${CMAKE_BINARY_DIR}/build/browse_py.h"
>                         INCLUDE_DIRECTORIES "${CMAKE_BINARY_DIR}"
>                         COMPILE_DEFINITIONS NINJA_PYTHON="python"
>         )

The offending code was introduces with commit [2] 'CMake: Add support for
"browse" mode'...

>
> The build breaks because build/browse_py.h cannot be found.

This file should be created by the cmake build system, see [3]...,
so something seems to fail for this build step on your system
(dependency?, missing tool?)...

>
> Though I can create a patch for it, I wonder whether it is time to
> bump the minimal CMake version to something new? To 3.16 for example?

I believe unrelated to the failure...

Regards,
Peter

>
> Best regards,
> Yegor

[1] https://cmake.org/cmake/help/v3.10/prop_tgt/INCLUDE_DIRECTORIES.html
[2] https://github.com/ninja-build/ninja/commit/5b80abbc729e94abb5f5776a3438ad57d480c097
[3] https://github.com/ninja-build/ninja/blob/master/CMakeLists.txt#L151
Peter Seiderer Dec. 10, 2020, 7:19 p.m. UTC | #5
Hello Yegor,

On Thu, 10 Dec 2020 20:01:39 +0100, Peter Seiderer <ps.report@gmx.net> wrote:

> Hello Yegor,
>
> On Thu, 10 Dec 2020 11:36:40 +0100, Yegor Yefremov <yegorslists@googlemail.com> wrote:
>
> > Hi Peter, all,
> >
> > On Wed, Dec 9, 2020 at 11:50 PM Peter Seiderer <ps.report@gmx.net> wrote:
> > >
> > > Hello Thomas,
> > >
> > > On Sat, 5 Dec 2020 21:28:30 +0100, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> > >
> > > > On Wed,  2 Dec 2020 20:42:35 +0100
> > > > Peter Seiderer <ps.report@gmx.net> wrote:
> > > >
> > > > > - rebased 0001-set-minimum-cmake-version-to-3.10.patch
> > > > >
> > > > > - removed 0002-remove-fdiagnostics-color-from-make-command.patch
> > > > >   (superseeded by upstream commit [1])
> > > > >
> > > > > - rebased package/ninja/0003-CMake-fix-object-library-usage.patch
> > > > >
> > > > > [1] https://github.com/ninja-build/ninja/commit/418d59b8a6054ce9ef1a28c07c41d3a0bb386836
> > > > >
> > > > > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > > > > ---
> > > > >  ...01-set-minimum-cmake-version-to-3.10.patch | 20 +++---
> > > > >  ...fdiagnostics-color-from-make-command.patch | 29 --------
> > > > >  .../0003-CMake-fix-object-library-usage.patch | 67 ++++++++++---------
> > > > >  package/ninja/ninja.hash                      |  4 +-
> > > > >  package/ninja/ninja.mk                        |  2 +-
> > > > >  5 files changed, 49 insertions(+), 73 deletions(-)
> > > > >  delete mode 100644 package/ninja/0002-remove-fdiagnostics-color-from-make-command.patch
> > > >
> > > > Both applied. Could you keep an eye of meson-based package failures in
> > > > the coming days? Updates of Meson have had a tendency to break stuff a
> > > > bit in the past. Thanks!
> > >
> > > No breakage detected (yet?), the only new feature is the following
> > > deprecation warning:
> > >
> > >         DEPRECATION: c_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
> > >         DEPRECATION: c_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
> > >         DEPRECATION: cpp_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
> > >         DEPRECATION: cpp_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
> > >
> > >
> > > Which can be fixed by the following patch:
> > >
> > > --- a/package/meson/cross-compilation.conf.in
> > > +++ b/package/meson/cross-compilation.conf.in
> > > @@ -14,13 +14,15 @@ g-ir-scanner = '@STAGING_DIR@/usr/bin/g-ir-scanner'
> > >
> > >  [properties]
> > >  needs_exe_wrapper = true
> > > +sys_root = '@STAGING_DIR@'
> > > +pkg_config_libdir = '@STAGING_DIR@/usr/lib/pkgconfig:@STAGING_DIR@/usr/share/pkgconfig'
> > > +pkg_config_static = '@STATIC@'
> > > +
> > > +[built-in options]
> > >  c_args = [@TARGET_CFLAGS@]
> > >  c_link_args = [@TARGET_LDFLAGS@]
> > >  cpp_args = [@TARGET_CXXFLAGS@]
> > >  cpp_link_args = [@TARGET_LDFLAGS@]
> > > -sys_root = '@STAGING_DIR@'
> > > -pkg_config_libdir = '@STAGING_DIR@/usr/lib/pkgconfig:@STAGING_DIR@/usr/share/pkgconfig'
> > > -pkg_config_static = '@STATIC@'
> > >
> > >  [host_machine]
> > >  system = 'linux'
> >
> > Ninja build breaks on my development host because my host CMake is
> > 3.10.2 and the following source file option like INCLUDE_DIRECTORIES
> > was introduced in a later version:
>
> Are you sure this is cmake version related? According to [1]
> INCLUDE_DIRECTORIES is valid for cmake-3.10.x..., what is the exact
> failure message?
>
> >
> >         set_source_files_properties(src/browse.cc
> >                 PROPERTIES
> >                         OBJECT_DEPENDS "${CMAKE_BINARY_DIR}/build/browse_py.h"
> >                         INCLUDE_DIRECTORIES "${CMAKE_BINARY_DIR}"
> >                         COMPILE_DEFINITIONS NINJA_PYTHON="python"
> >         )
>
> The offending code was introduces with commit [2] 'CMake: Add support for
> "browse" mode'...
>
> >
> > The build breaks because build/browse_py.h cannot be found.
>
> This file should be created by the cmake build system, see [3]...,
> so something seems to fail for this build step on your system
> (dependency?, missing tool?)...
>
> >
> > Though I can create a patch for it, I wonder whether it is time to
> > bump the minimal CMake version to something new? To 3.16 for example?
>
> I believe unrelated to the failure...

Update: according to [4] INCLUDE_DIRECTORIES is mentioned for
'Properties on Source Files' (cmake-latest) but not for
cmake-3.10.x [5]...

Maybe the failure can be avoided by changing from using
INCLUDE_DIRECTORIES to COMPILE_FLAGS?

Regards,
Peter

[4] https://cmake.org/cmake/help/latest/manual/cmake-properties.7.html#source-file-properties
[5] https://cmake.org/cmake/help/v3.10/manual/cmake-properties.7.html#source-file-properties

>
> Regards,
> Peter
>
> >
> > Best regards,
> > Yegor
>
> [1] https://cmake.org/cmake/help/v3.10/prop_tgt/INCLUDE_DIRECTORIES.html
> [2] https://github.com/ninja-build/ninja/commit/5b80abbc729e94abb5f5776a3438ad57d480c097
> [3] https://github.com/ninja-build/ninja/blob/master/CMakeLists.txt#L151
Peter Seiderer Dec. 10, 2020, 7:40 p.m. UTC | #6
Hello Yegor,

On Thu, 10 Dec 2020 20:19:47 +0100, Peter Seiderer <ps.report@gmx.net> wrote:

> Hello Yegor,
>
> On Thu, 10 Dec 2020 20:01:39 +0100, Peter Seiderer <ps.report@gmx.net> wrote:
>
> > Hello Yegor,
> >
> > On Thu, 10 Dec 2020 11:36:40 +0100, Yegor Yefremov <yegorslists@googlemail.com> wrote:
> >
> > > Hi Peter, all,
> > >
> > > On Wed, Dec 9, 2020 at 11:50 PM Peter Seiderer <ps.report@gmx.net> wrote:
> > > >
> > > > Hello Thomas,
> > > >
> > > > On Sat, 5 Dec 2020 21:28:30 +0100, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> > > >
> > > > > On Wed,  2 Dec 2020 20:42:35 +0100
> > > > > Peter Seiderer <ps.report@gmx.net> wrote:
> > > > >
> > > > > > - rebased 0001-set-minimum-cmake-version-to-3.10.patch
> > > > > >
> > > > > > - removed 0002-remove-fdiagnostics-color-from-make-command.patch
> > > > > >   (superseeded by upstream commit [1])
> > > > > >
> > > > > > - rebased package/ninja/0003-CMake-fix-object-library-usage.patch
> > > > > >
> > > > > > [1] https://github.com/ninja-build/ninja/commit/418d59b8a6054ce9ef1a28c07c41d3a0bb386836
> > > > > >
> > > > > > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > > > > > ---
> > > > > >  ...01-set-minimum-cmake-version-to-3.10.patch | 20 +++---
> > > > > >  ...fdiagnostics-color-from-make-command.patch | 29 --------
> > > > > >  .../0003-CMake-fix-object-library-usage.patch | 67 ++++++++++---------
> > > > > >  package/ninja/ninja.hash                      |  4 +-
> > > > > >  package/ninja/ninja.mk                        |  2 +-
> > > > > >  5 files changed, 49 insertions(+), 73 deletions(-)
> > > > > >  delete mode 100644 package/ninja/0002-remove-fdiagnostics-color-from-make-command.patch
> > > > >
> > > > > Both applied. Could you keep an eye of meson-based package failures in
> > > > > the coming days? Updates of Meson have had a tendency to break stuff a
> > > > > bit in the past. Thanks!
> > > >
> > > > No breakage detected (yet?), the only new feature is the following
> > > > deprecation warning:
> > > >
> > > >         DEPRECATION: c_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
> > > >         DEPRECATION: c_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
> > > >         DEPRECATION: cpp_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
> > > >         DEPRECATION: cpp_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
> > > >
> > > >
> > > > Which can be fixed by the following patch:
> > > >
> > > > --- a/package/meson/cross-compilation.conf.in
> > > > +++ b/package/meson/cross-compilation.conf.in
> > > > @@ -14,13 +14,15 @@ g-ir-scanner = '@STAGING_DIR@/usr/bin/g-ir-scanner'
> > > >
> > > >  [properties]
> > > >  needs_exe_wrapper = true
> > > > +sys_root = '@STAGING_DIR@'
> > > > +pkg_config_libdir = '@STAGING_DIR@/usr/lib/pkgconfig:@STAGING_DIR@/usr/share/pkgconfig'
> > > > +pkg_config_static = '@STATIC@'
> > > > +
> > > > +[built-in options]
> > > >  c_args = [@TARGET_CFLAGS@]
> > > >  c_link_args = [@TARGET_LDFLAGS@]
> > > >  cpp_args = [@TARGET_CXXFLAGS@]
> > > >  cpp_link_args = [@TARGET_LDFLAGS@]
> > > > -sys_root = '@STAGING_DIR@'
> > > > -pkg_config_libdir = '@STAGING_DIR@/usr/lib/pkgconfig:@STAGING_DIR@/usr/share/pkgconfig'
> > > > -pkg_config_static = '@STATIC@'
> > > >
> > > >  [host_machine]
> > > >  system = 'linux'
> > >
> > > Ninja build breaks on my development host because my host CMake is
> > > 3.10.2 and the following source file option like INCLUDE_DIRECTORIES
> > > was introduced in a later version:
> >
> > Are you sure this is cmake version related? According to [1]
> > INCLUDE_DIRECTORIES is valid for cmake-3.10.x..., what is the exact
> > failure message?
> >
> > >
> > >         set_source_files_properties(src/browse.cc
> > >                 PROPERTIES
> > >                         OBJECT_DEPENDS "${CMAKE_BINARY_DIR}/build/browse_py.h"
> > >                         INCLUDE_DIRECTORIES "${CMAKE_BINARY_DIR}"
> > >                         COMPILE_DEFINITIONS NINJA_PYTHON="python"
> > >         )
> >
> > The offending code was introduces with commit [2] 'CMake: Add support for
> > "browse" mode'...
> >
> > >
> > > The build breaks because build/browse_py.h cannot be found.
> >
> > This file should be created by the cmake build system, see [3]...,
> > so something seems to fail for this build step on your system
> > (dependency?, missing tool?)...
> >
> > >
> > > Though I can create a patch for it, I wonder whether it is time to
> > > bump the minimal CMake version to something new? To 3.16 for example?
> >
> > I believe unrelated to the failure...
>
> Update: according to [4] INCLUDE_DIRECTORIES is mentioned for
> 'Properties on Source Files' (cmake-latest) but not for
> cmake-3.10.x [5]...
>
> Maybe the failure can be avoided by changing from using
> INCLUDE_DIRECTORIES to COMPILE_FLAGS?

Care to try rfc patch [6]?

Regards,
Peter

[6] https://patchwork.ozlabs.org/project/buildroot/patch/20201210193807.19225-1-ps.report@gmx.net/

>
> Regards,
> Peter
>
> [4] https://cmake.org/cmake/help/latest/manual/cmake-properties.7.html#source-file-properties
> [5] https://cmake.org/cmake/help/v3.10/manual/cmake-properties.7.html#source-file-properties
>
> >
> > Regards,
> > Peter
> >
> > >
> > > Best regards,
> > > Yegor
> >
> > [1] https://cmake.org/cmake/help/v3.10/prop_tgt/INCLUDE_DIRECTORIES.html
> > [2] https://github.com/ninja-build/ninja/commit/5b80abbc729e94abb5f5776a3438ad57d480c097
> > [3] https://github.com/ninja-build/ninja/blob/master/CMakeLists.txt#L151
>
diff mbox series

Patch

diff --git a/package/ninja/0001-set-minimum-cmake-version-to-3.10.patch b/package/ninja/0001-set-minimum-cmake-version-to-3.10.patch
index d75b78fde9..e53a136a94 100644
--- a/package/ninja/0001-set-minimum-cmake-version-to-3.10.patch
+++ b/package/ninja/0001-set-minimum-cmake-version-to-3.10.patch
@@ -1,4 +1,4 @@ 
-From 4645f74eb668cc1cf876d1e9bef933591da7575c Mon Sep 17 00:00:00 2001
+From 386fa849157dabde42ab39de7acb31750956490c Mon Sep 17 00:00:00 2001
 From: Adam Duskett <aduskett@gmail.com>
 Date: Mon, 3 Feb 2020 06:21:57 -0800
 Subject: [PATCH] set minimum cmake version to 3.10
@@ -10,21 +10,23 @@  Because we are not building ninja for Microsoft, it is safe to remove this
 macro and set the minimum version to 3.10.
 
 Signed-off-by: Adam Duskett <aduskett@gmail.com>
+[Rebased for ninja-1.10.2 - CMP0091 usage was removed upstream by
+https://github.com/ninja-build/ninja/commit/e6f5bcffb3c561d228d88ff26edab26575b7d520]
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
 ---
- CMakeLists.txt | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 60fd8a1..a040e0b 100644
+index 7f03c35..4b61479 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -1,5 +1,4 @@
+@@ -1,4 +1,4 @@
 -cmake_minimum_required(VERSION 3.15)
--cmake_policy(SET CMP0091 NEW)
 +cmake_minimum_required(VERSION 3.10)
- project(ninja)
  
- if(CMAKE_BUILD_TYPE MATCHES "Release")
+ include(CheckIncludeFileCXX)
+ include(CheckIPOSupported)
 -- 
-2.24.1
+2.29.2
 
diff --git a/package/ninja/0002-remove-fdiagnostics-color-from-make-command.patch b/package/ninja/0002-remove-fdiagnostics-color-from-make-command.patch
deleted file mode 100644
index d419ab48dc..0000000000
--- a/package/ninja/0002-remove-fdiagnostics-color-from-make-command.patch
+++ /dev/null
@@ -1,29 +0,0 @@ 
-From 87caa8c4bc536f745aceed757ce8a492fbdba84f Mon Sep 17 00:00:00 2001
-From: Adam Duskett <aduskett@gmail.com>
-Date: Mon, 3 Feb 2020 07:36:58 -0800
-Subject: [PATCH] remove fdiagnostics-color from make command
-
--fdiagnostics-color was introduced in gcc 4.9 and the minimum supported version
-that Buildroot supports is 4.8.
-
-Signed-off-by: Adam Duskett <aduskett@gmail.com>
----
- CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index a040e0b..af8010f 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -18,7 +18,7 @@ if(MSVC)
- 	set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
- 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /GR- /Zc:__cplusplus")
- else()
--	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -fdiagnostics-color")
-+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
- endif()
- 
- find_program(RE2C re2c)
--- 
-2.24.1
-
diff --git a/package/ninja/0003-CMake-fix-object-library-usage.patch b/package/ninja/0003-CMake-fix-object-library-usage.patch
index 8f8fac994e..9b9fe506a4 100644
--- a/package/ninja/0003-CMake-fix-object-library-usage.patch
+++ b/package/ninja/0003-CMake-fix-object-library-usage.patch
@@ -1,4 +1,4 @@ 
-From 7982ecebe1c1c41e82779a65fa2d93f19ffd755f Mon Sep 17 00:00:00 2001
+From 17539ae9d09ded695167911f9e3ec0cf4bc9fed9 Mon Sep 17 00:00:00 2001
 From: Yegor Yefremov <yegorslists@googlemail.com>
 Date: Wed, 5 Feb 2020 12:28:44 +0100
 Subject: [PATCH] CMake: fix object library usage
@@ -10,47 +10,50 @@  of object files.
 See add_library() definition for details.
 
 Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
+[Rebased for for ninja-1.10.2]
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
 ---
  CMakeLists.txt | 9 ++++-----
  1 file changed, 4 insertions(+), 5 deletions(-)
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index af8010f..028a7bb 100644
+index 4b61479..3701f3a 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -83,8 +83,7 @@ target_compile_definitions(libninja PRIVATE _WIN32_WINNT=0x0601 __USE_MINGW_ANSI
+@@ -132,8 +132,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "OS400" OR CMAKE_SYSTEM_NAME STREQUAL "AIX")
  endif()
-
+ 
  # Main executable is library plus main() function.
 -add_executable(ninja src/ninja.cc)
 -target_link_libraries(ninja PRIVATE libninja libninja-re2c)
 +add_executable(ninja src/ninja.cc $<TARGET_OBJECTS:libninja> $<TARGET_OBJECTS:libninja-re2c>)
+ 
+ # Adds browse mode into the ninja binary if it's supported by the host platform.
+ if(platform_supports_ninja_browse)
+@@ -183,11 +182,12 @@ if(BUILD_TESTING)
+     src/subprocess_test.cc
+     src/test.cc
+     src/util_test.cc
++    $<TARGET_OBJECTS:libninja>
++    $<TARGET_OBJECTS:libninja-re2c>
+   )
+   if(WIN32)
+     target_sources(ninja_test PRIVATE src/includes_normalize_test.cc src/msvc_helper_test.cc)
+   endif()
+-  target_link_libraries(ninja_test PRIVATE libninja libninja-re2c)
+ 
+   foreach(perftest
+     build_log_perftest
+@@ -197,8 +197,7 @@ if(BUILD_TESTING)
+     hash_collision_bench
+     manifest_parser_perftest
+   )
+-    add_executable(${perftest} src/${perftest}.cc)
+-    target_link_libraries(${perftest} PRIVATE libninja libninja-re2c)
++    add_executable(${perftest} src/${perftest}.cc $<TARGET_OBJECTS:libninja> $<TARGET_OBJECTS:libninja-re2c>)
+   endforeach()
+ 
+   if(CMAKE_SYSTEM_NAME STREQUAL "AIX" AND CMAKE_SIZEOF_VOID_P EQUAL 4)
+-- 
+2.29.2
 
- # Tests all build into ninja_test executable.
- add_executable(ninja_test
-@@ -106,11 +105,12 @@ add_executable(ninja_test
-	src/subprocess_test.cc
-	src/test.cc
-	src/util_test.cc
-+	$<TARGET_OBJECTS:libninja>
-+	$<TARGET_OBJECTS:libninja-re2c>
- )
- if(WIN32)
-	target_sources(ninja_test PRIVATE src/includes_normalize_test.cc src/msvc_helper_test.cc)
- endif()
--target_link_libraries(ninja_test PRIVATE libninja libninja-re2c)
-
- foreach(perftest
-   build_log_perftest
-@@ -120,8 +120,7 @@ foreach(perftest
-   hash_collision_bench
-   manifest_parser_perftest
- )
--  add_executable(${perftest} src/${perftest}.cc)
--  target_link_libraries(${perftest} PRIVATE libninja libninja-re2c)
-+  add_executable(${perftest} src/${perftest}.cc $<TARGET_OBJECTS:libninja> $<TARGET_OBJECTS:libninja-re2c>)
- endforeach()
-
- enable_testing()
---
-2.17.0
diff --git a/package/ninja/ninja.hash b/package/ninja/ninja.hash
index cd9bb08832..fd2c594a77 100644
--- a/package/ninja/ninja.hash
+++ b/package/ninja/ninja.hash
@@ -1,3 +1,3 @@ 
 # Locally generated
-sha256 3810318b08489435f8efc19c05525e80a993af5a55baa0dfeae0465a9d45f99f ninja-1.10.0.tar.gz
-sha256 eb7e9ab9690124c5c9f42bdc81383d886a3dede26345b6ed15bbad7caf81f7ea COPYING
+sha256  ce35865411f0490368a8fc383f29071de6690cbadc27704734978221f25e2bed  ninja-1.10.2.tar.gz
+sha256  eb7e9ab9690124c5c9f42bdc81383d886a3dede26345b6ed15bbad7caf81f7ea  COPYING
diff --git a/package/ninja/ninja.mk b/package/ninja/ninja.mk
index 060893d85f..ab1941023e 100644
--- a/package/ninja/ninja.mk
+++ b/package/ninja/ninja.mk
@@ -4,7 +4,7 @@ 
 #
 ################################################################################
 
-NINJA_VERSION = 1.10.0
+NINJA_VERSION = 1.10.2
 NINJA_SITE = $(call github,ninja-build,ninja,v$(NINJA_VERSION))
 NINJA_LICENSE = Apache-2.0
 NINJA_LICENSE_FILES = COPYING