void-packages/srcpkgs/Endeavour/patches/fix-build-race-condition.patch

85 lines
1.8 KiB
Diff

From b492285e2a4fafad887df2c4fd2a5bdb53ce39fb Mon Sep 17 00:00:00 2001
From: Jamie Murphy <hello@itsjamie.dev>
Date: Fri, 5 Aug 2022 18:52:20 -0700
Subject: [PATCH] build: Generate enum headers first
Fixes #380, #398, !120, !110
---
src/meson.build | 38 +++++++++++++++++++-------------------
src/plugins/meson.build | 3 ++-
2 files changed, 21 insertions(+), 20 deletions(-)
diff --git a/src/meson.build b/src/meson.build
index deb410a2..8f621e78 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -16,6 +16,25 @@ vcs_identifier_h = declare_dependency(sources: vcs_tag)
endeavour_deps += vcs_identifier_h
+#########
+# Enums #
+#########
+
+enum_headers = files(
+ join_paths('animation', 'gtd-animation-enums.h'),
+)
+
+enum_types = 'gtd-enum-types'
+
+gtd_enum_types = gnome.mkenums(
+ enum_types,
+ sources: enum_headers,
+ c_template: enum_types + '.c.template',
+ h_template: enum_types + '.h.template'
+)
+
+sources += gtd_enum_types
+
###########
# Plugins #
###########
@@ -42,25 +61,6 @@ gtd_deps = endeavour_deps + [
plugins_dep,
]
-
-#########
-# Enums #
-#########
-
-enum_headers = files(
- join_paths('animation', 'gtd-animation-enums.h'),
-)
-
-enum_types = 'gtd-enum-types'
-
-sources += gnome.mkenums(
- enum_types,
- sources: enum_headers,
- c_template: enum_types + '.c.template',
- h_template: enum_types + '.h.template'
-)
-
-
################
# Header files #
################
diff --git a/src/plugins/meson.build b/src/plugins/meson.build
index 3d7ac4e4..2a13aff5 100644
--- a/src/plugins/meson.build
+++ b/src/plugins/meson.build
@@ -3,7 +3,8 @@ plugins_incs = [
include_directories('..'),
]
-plugins_sources = []
+# Ensure enum types header is generated before building plugins
+plugins_sources = [ gtd_enum_types[1] ]
plugins_deps = [ endeavour_deps ]
plugins_ldflags = []
plugins_libs = []
--
GitLab