Compare commits

...
Sign in to create a new pull request.

17 commits

Author SHA1 Message Date
Benjamin A. Beasley
85f60778c2 Add a SourceLicense field 2024-12-12 14:14:30 -05:00
Benjamin A. Beasley
97e898f3c9 Correct SPDX License expression 2024-12-12 14:14:30 -05:00
Benjamin A. Beasley
3490c86d1d Use modern bcond style 2024-12-12 14:14:30 -05:00
Benjamin A. Beasley
f8de5c547a Respect %_smp_build_ncpus 2024-12-12 14:14:30 -05:00
Benjamin A. Beasley
9394eed1cc Enable HTML documentation 2023-12-20 10:40:31 -05:00
Benjamin A. Beasley
0f743e2408 Allow warnings in the build
Turning all warnings into errors is too strict for downstream packaging.
2023-12-20 10:40:31 -05:00
Benjamin A. Beasley
69a2a53edd Update to version 2077 2023-12-20 10:40:31 -05:00
Benjamin A. Beasley
58c213a6bc Indicate dirs. in files list with trailing slashes 2023-12-20 10:40:31 -05:00
Benjamin A. Beasley
b7813d1e81 Convert License to SPDX 2023-12-20 10:40:31 -05:00
Benjamin A. Beasley
1971a8a311 Add patch upstream status for gn-0153d369-no-O3.patch 2023-12-20 08:49:24 -05:00
Benjamin A. Beasley
699eb0e31a Form the short commit hash with only shell builtins
[skip changelog]
2023-12-20 08:25:40 -05:00
Benjamin A. Beasley
3bd9cb4727 Improve handling of bundled ICU components 2022-05-01 09:05:49 -04:00
Benjamin A. Beasley
42b93dec17 Stop numbering patches 2022-05-01 09:05:47 -04:00
Benjamin A. Beasley
d3316e27c6 BR emacs-common for RPM macros 2022-05-01 09:05:15 -04:00
Benjamin A. Beasley
5b157831d2 Drop even the emacs-nox BR
We are just installing a mode file.
2022-05-01 09:05:12 -04:00
Benjamin A. Beasley
a27a9b3610 BR emacs-nox instead of full emacs 2022-05-01 09:05:08 -04:00
Benjamin A. Beasley
a064ac6cad Disable HTML docs in EPEL9 for now 2021-12-06 14:57:04 -05:00
4 changed files with 47 additions and 24 deletions

2
.gitignore vendored
View file

@ -24,3 +24,5 @@
/gn-4aa9bdfa.tar.gz
/gn-b7903130.tar.gz
/gn-e0afadf7.tar.gz
/gn-5e19d2fb.tar.gz
/gn-5e19d2fb166f.tar.gz

63
gn.spec
View file

@ -1,5 +1,5 @@
# Build HTML docs from markdown using pandoc?
%bcond_without html_docs
%bcond html_docs 1
Name: gn
# Upstream uses the number of commits in the git history as the version number.
@ -24,35 +24,41 @@ Name: gn
# 7. Commit the changes
#
# See https://gn.googlesource.com/gn/+log for the latest changes.
%global commit e0afadf7a743d5b14737bd454df45d5f1caf0d23
%global access 20211205
%global shortcommit %(echo %{commit} | cut -b -8)
Version: 1953
%global commit 5e19d2fb166fbd4f6f32147fbb2f497091a54ad8
%global access 20231220
%global shortcommit %(c='%{commit}'; echo "${c:0:12}")
Version: 2077
Release: %autorelease -s %{access}git%{shortcommit}
Summary: Meta-build system that generates build files for Ninja
# BSD except for src/base/third_party/icu/, which is (Unicode and MIT); note
# that the “ICU License” is MIT,
# https://fedoraproject.org/wiki/Licensing:MIT#Modern_style_.28ICU_Variant.29
# The entire source is BSD-3-Clause, except:
# - src/base/third_party/icu/ is (Unicode-DFS-2016 AND ICU); see
# src/base/third_party/icu/LICENSE and also the header comment in
# src/base/third_party/icu/icu_utf.h.
#
# Note that src/util/test/gn_test.cc, which is licensed ASL 2.0, does not
# contribute to the installed RPM, only to the gn_unittests executable; you may
# verify this with:
# Note that src/util/test/gn_test.cc, which is licensed Apache-2.0, does not
# contribute to the binary RPMs, only to the gn_unittests executable, which is
# not installed; you may verify this with:
# gdb -ex 'set pagination off' -ex 'info sources' gn | grep -F gn_test.cc
License: BSD and Unicode and MIT
License: BSD-3-Clause AND Unicode-DFS-2016 AND ICU
SourceLicense: %{license} AND Apache-2.0
URL: https://gn.googlesource.com/gn
Source0: %{url}/+archive/%{commit}.tar.gz#/gn-%{shortcommit}.tar.gz
# Generated using script update-version:
Source1: last_commit_position.h
Source2: update-version
# Stop overriding optimization flags
Patch0: gn-0153d369-no-O3.patch
# Stop overriding optimization flags; not sent upstream because this is
# intentional on their part
Patch: gn-0153d369-no-O3.patch
BuildRequires: python3-devel
BuildRequires: ninja-build
BuildRequires: gcc-c++
# For RPM macros:
BuildRequires: emacs-common
%if %{with html_docs}
BuildRequires: pandoc
BuildRequires: parallel
@ -63,10 +69,22 @@ Requires: vim-filesystem
Requires: python3
Provides: vim-gn = %{version}-%{release}
BuildRequires: emacs
Requires: emacs-filesystem >= %{_emacs_version}
Provides: emacs-gn = %{version}-%{release}
# src/base/third_party/icu/icu_utf.h:
#
# This file has the relevant components from ICU copied to handle basic
# UTF8/16/32 conversions. Components are copied from umachine.h, utf.h,
# utf8.h, and utf16.h into icu_utf.h.
#
# The forked, bundled ICU components are copied from Chromium. Because of the
# downstream changes (primarily, changing namespaces and symbol prefixes),
# there is no clear path to unbundling.
#
# See src/base/third_party/icu/README.chromium, from which the version number
# is taken.
Provides: bundled(icu) = 60
%description
GN is a meta-build system that generates build files for Ninja.
@ -98,14 +116,17 @@ cp -vp misc/vim/README.md README-vim.md
%build
AR='gcc-ar'; export AR
%set_build_flags
# Treating warnings as errors is too strict for downstream builds.
#
# Both --use-icf and --use-lto add compiler flags that only work with clang++,
# not with g++. We do get LTO on Fedora anyway, since we respect the
# distributions build flags.
%{python3} build/gen.py \
--allow-warnings \
--no-last-commit-position \
--no-strip \
--no-static-libstdc++
ninja -C out -v
ninja -j %{_smp_build_ncpus} -C out -v
%if %{with html_docs}
# There is a script, misc/help_as_html.py, that generates some HTML help, but
@ -168,17 +189,17 @@ grep -E '^#define[[:blank:]]+LAST_COMMIT_POSITION[[:blank:]]+'\
%files doc
%license LICENSE
%license LICENSE src/base/third_party/icu/README.chromium
%doc AUTHORS
%doc OWNERS
%doc README*.md
%if %{with html_docs}
%doc README*.html
%endif
%doc docs
%doc examples
%doc infra
%doc tools
%doc docs/
%doc examples/
%doc infra/
%doc tools/
%changelog

View file

@ -3,7 +3,7 @@
#ifndef OUT_LAST_COMMIT_POSITION_H_
#define OUT_LAST_COMMIT_POSITION_H_
#define LAST_COMMIT_POSITION_NUM 1953
#define LAST_COMMIT_POSITION "1953 (e0afadf7)"
#define LAST_COMMIT_POSITION_NUM 2077
#define LAST_COMMIT_POSITION "2077 (5e19d2fb166f)"
#endif // OUT_LAST_COMMIT_POSITION_H_

View file

@ -1 +1 @@
SHA512 (gn-e0afadf7.tar.gz) = 240c23311efad56c70e0f7e1639f709ca56ae375fea6293a93167029b40759b584fc865a9ad9799f5bb4b04a2e55c6be21d0278a214d5601350df4f280e63c96
SHA512 (gn-5e19d2fb166f.tar.gz) = 618fc914f21721f819a232430862b4a42ef68cf6d8fe5e354aae3d9ebb30f92bd3d74b0079f1b37f987a9687a37c4cad2d57782cd27ca8a1fea3b461a921866e