SHA256
1
0
forked from pool/gn
Files
gn/gn.spec
Andreas Stieger c51ac0b2ae Accepting request 1191223 from home:oertel:branches:network:chromium
- Update to version 0.20240730:
  * Rust: link_output, depend_output and runtime_outputs for dylibs
  * Add missing reference section to function_toolchain.cc
  * Do not cleanup args.gn imports located in the output directory.
  * Fix expectations in NinjaRustBinaryTargetWriterTest.SwiftModule
  * Do not add native dependencies to the library search path
  * Support linking frameworks and swiftmodules in Rust targets
  * [desc] Silence print() statements when outputing json
  * infra: Move CI/try builds to Ubuntu-22.04
  * [MinGW] Fix mingw building issues
  * [gn] Fix "link" in the //examples/simple_build/build/toolchain/BUILD.gn
  * [template] Fix "rule alink_thin" in the //build/build_linux.ninja.template
  * Allow multiple --ide switches
  * [src] Add "#include <limits>" in the //src/base/files/file_enumerator_win.cc
  * Get updates to infra/recipes.py from upstream
  * Revert "Teach gn to handle systems with > 64 processors"
  * [apple] Rename the code-signing properties of create_bundle
  * Fix a typo in "gn help refs" output
  * Revert "[bundle] Use "phony" builtin tool for create_bundle targets"
  * [bundle] Use "phony" builtin tool for create_bundle targets
  * [ios] Simplify handling of assets catalog
  * [swift] List all outputs as deps of "source_set" stamp file
  * [swift] Update `gn check ...` to consider the generated header
  * [swift] Set `restat = 1` to swift build rules
  * Fix build with gcc12
  * [label_matches] Add new functions label_matches(), filter_labels_include() and filter_labels_exclude()
  * [swift] Remove problematic use of "stamp" tool
  * Implement new --ninja-outputs-file option.
  * Add NinjaOutputsWriter class
  * Move InvokePython() function to its own source file.

OBS-URL: https://build.opensuse.org/request/show/1191223
OBS-URL: https://build.opensuse.org/package/show/network:chromium/gn?expand=0&rev=49
2024-08-02 15:15:41 +00:00

85 lines
2.1 KiB
RPMSpec

#
# spec file for package gn
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: gn
Version: 0.20240730
Release: 0
Summary: A meta-build system that generates build files for Ninja
License: BSD-3-Clause
URL: https://gn.googlesource.com/
Source0: %{name}-%{version}.tar.xz
Patch0: redundant-move.patch
Patch1: subprocess-python36.patch
BuildRequires: ninja
BuildRequires: python3-base
ExcludeArch: ppc
%if %{?suse_version} < 1550
BuildRequires: gcc13-c++
%else
BuildRequires: gcc-c++
%endif
%description
GN is a meta-build system that generates build files for Ninja.
%prep
%setup -q
%if 0%{?suse_version} > 1550
%patch -P 0 -p1
%endif
if test $(readlink /usr/bin/python3) = "python3.6" ; then
%patch -P 1 -p1
fi
%build
ARCH_FLAGS="`echo %{optflags} | sed -e 's/-O2//g'`"
%if 0%{?suse_version} < 1550
export CXX=g++-13
%else
export CXX=g++
%endif
export AR=ar
export CXXFLAGS="${ARCH_FLAGS}"
# bootstrap
python3 build/gen.py \
--no-strip \
--no-last-commit-position \
--no-static-libstdc++
PV=%{version}
cat >out/last_commit_position.h <<-EOF
#ifndef OUT_LAST_COMMIT_POSITION_H_
#define OUT_LAST_COMMIT_POSITION_H_
#define LAST_COMMIT_POSITION_NUM ${PV##0.}
#define LAST_COMMIT_POSITION "${PV}"
#endif // OUT_LAST_COMMIT_POSITION_H_
EOF
%ninja_build -C out gn
%check
%ninja_build -C out gn_unittests
./out/gn_unittests
%install
install -Dm 0755 out/%{name} %{buildroot}%{_bindir}/%{name}
%files
%license LICENSE
%{_bindir}/%{name}
%changelog