summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/harfbuzz/harfbuzz/version-race.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/harfbuzz/harfbuzz/version-race.patch')
-rw-r--r--meta/recipes-graphics/harfbuzz/harfbuzz/version-race.patch97
1 files changed, 0 insertions, 97 deletions
diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz/version-race.patch b/meta/recipes-graphics/harfbuzz/harfbuzz/version-race.patch
deleted file mode 100644
index a8b8f0353c..0000000000
--- a/meta/recipes-graphics/harfbuzz/harfbuzz/version-race.patch
+++ /dev/null
@@ -1,97 +0,0 @@
1From 6ccadec1fae6a73749b7dfe2311f71d0e610e812 Mon Sep 17 00:00:00 2001
2From: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
3Date: Wed, 30 Sep 2020 10:30:08 +0900
4Subject: [PATCH] No need to pass source directory to gen-hb-version
5
6The input file is by definition in the source directory, so dirname()
7that instead of needing the directory to be passed.
8
9Needed because a follow-up commit will change when this is called, and the
10source directory isn't trivially available at that point.
11
12generate hb-version.h once at configure time with Meson
13
14Currently with Meson hb-version.h is generated during the build without
15any explicit dependencies which can result in build failures due races
16over the file.
17
18Change this to be generated at configure time, so that the file is always
19generated once before the build itself.
20
21Closes #2667
22
23Upstream-Status: Backport [https://github.com/harfbuzz/harfbuzz/commit/5aff83104e03d6d2617987d24a51e490ab7a5cd1]
24Signed-off-by: Ross Burton <ross.burton@arm.com>
25Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
26---
27 src/gen-hb-version.py | 6 +++---
28 src/meson.build | 17 ++++++++---------
29 2 files changed, 11 insertions(+), 12 deletions(-)
30
31diff --git a/src/gen-hb-version.py b/src/gen-hb-version.py
32index 15e56b9..bf16f88 100755
33--- a/src/gen-hb-version.py
34+++ b/src/gen-hb-version.py
35@@ -4,15 +4,15 @@
36
37 import os, sys, shutil
38
39-if len (sys.argv) < 5:
40+if len (sys.argv) < 4:
41 sys.exit(__doc__)
42
43 version = sys.argv[1]
44 major, minor, micro = version.split (".")
45
46 OUTPUT = sys.argv[2]
47-CURRENT_SOURCE_DIR = sys.argv[3]
48-INPUT = sys.argv[4]
49+INPUT = sys.argv[3]
50+CURRENT_SOURCE_DIR = os.path.dirname(INPUT)
51
52 with open (INPUT, "r", encoding='utf-8') as template:
53 with open (OUTPUT, "wb") as output:
54diff --git a/src/meson.build b/src/meson.build
55index 5e1787c..56d8ae2 100644
56--- a/src/meson.build
57+++ b/src/meson.build
58@@ -1,3 +1,10 @@
59+hb_version_h = configure_file(
60+ command: [find_program('gen-hb-version.py'), meson.project_version(), '@OUTPUT@', '@INPUT@'],
61+ input: 'hb-version.h.in',
62+ output: 'hb-version.h',
63+ install: true,
64+ install_dir: join_paths(get_option('includedir'), meson.project_name()))
65+
66 # Base and default-included sources and headers
67 hb_base_sources = files(
68 'hb-aat-layout-ankr-table.hh',
69@@ -214,9 +221,9 @@ hb_base_headers = files(
70 'hb-shape.h',
71 'hb-style.h',
72 'hb-unicode.h',
73- 'hb-version.h',
74 'hb.h',
75 )
76+hb_base_headers += hb_version_h
77
78 # Optional Sources and Headers with external deps
79
80@@ -281,14 +288,6 @@ hb_gobject_headers = files(
81 'hb-gobject-structs.h',
82 )
83
84-custom_target('hb-version.h',
85- build_by_default: true,
86- input: 'hb-version.h.in',
87- output: 'hb-version.h',
88- command: [find_program('gen-hb-version.py'), meson.project_version(),
89- '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'],
90-)
91-
92 ragel = find_program('ragel', required: false)
93 if not ragel.found()
94 warning('You have to install ragel if you are going to develop HarfBuzz itself')
95--
962.25.1
97