[gtk/wip/otte/build] build: Remove sassc option
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/build] build: Remove sassc option
- Date: Thu, 1 Apr 2021 19:31:01 +0000 (UTC)
commit 14404179f93a01ec05f7dd91bb9f8b71aab71020
Author: Benjamin Otte <otte redhat com>
Date: Thu Apr 1 21:29:41 2021 +0200
build: Remove sassc option
Instead, ensure that sassc is made madatory on git builds (because
it is, we don't ship CSS files anymore) and not even looked for in
release builds (because do ship CSS files there).
gtk/meson.build | 34 ++++++++++++++++++----------------
meson.build | 1 +
meson_options.txt | 5 -----
3 files changed, 19 insertions(+), 21 deletions(-)
---
diff --git a/gtk/meson.build b/gtk/meson.build
index fe0ec456d9..420f144bf4 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -838,25 +838,27 @@ gtk_gresources_xml = configure_file(output: 'gtk.gresources.xml',
],
)
-# Build the theme files
-sassc = find_program('sassc', required: false)
-if not sassc.found() and not get_option('sassc').disabled()
- subproject('sassc')
- sassc = find_program('sassc', required: get_option('sassc').enabled())
-endif
+theme_deps = []
+# For git checkouts, but not for tarballs...
+if not fs.exists('theme/Adwaita/Adwaita.css')
+ # ... build the theme files
+ sassc = find_program('sassc', required: false)
+ if not sassc.found() and not get_option('sassc').disabled()
+ subproject('sassc')
+ sassc = find_program('sassc', required: true)
+ endif
-if sassc.found()
- sassc_opts = [ '-a', '-M', '-t', 'compact' ]
+ if sassc.found()
+ sassc_opts = [ '-a', '-M', '-t', 'compact' ]
- subdir('theme/Adwaita')
- subdir('theme/HighContrast')
+ subdir('theme/Adwaita')
+ subdir('theme/HighContrast')
- theme_deps = [
- adwaita_theme_deps,
- hc_theme_deps,
- ]
-else
- theme_deps = []
+ theme_deps += [
+ adwaita_theme_deps,
+ hc_theme_deps,
+ ]
+ endif
endif
gtkresources = gnome.compile_resources('gtkresources',
diff --git a/meson.build b/meson.build
index 38d23ed61c..ef956f94a7 100644
--- a/meson.build
+++ b/meson.build
@@ -24,6 +24,7 @@ cloudproviders_req = '>= 0.3.1'
xkbcommon_req = '>= 0.2.0'
sysprof_req = '>= 3.38.0'
+fs = import('fs')
gnome = import('gnome')
pkg_config = import('pkgconfig')
diff --git a/meson_options.txt b/meson_options.txt
index 744acd33c8..275a912cb8 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -83,11 +83,6 @@ option('colord',
value: 'disabled',
description : 'Build colord support for the CUPS printing backend')
-option('sassc',
- type: 'feature',
- value: 'auto',
- description: 'Rebuild themes using sassc')
-
# Documentation and introspection
option('gtk_doc',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]