From af0c95c11a5039967cdeb6101ec467ac75f1ccfb Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 1 Apr 2021 21:29:41 +0200 Subject: [PATCH] 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 | 30 ++++++++++++++++-------------- meson.build | 1 + meson_options.txt | 5 ----- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/gtk/meson.build b/gtk/meson.build index b42d793c86..bf108df11a 100644 --- a/gtk/meson.build +++ b/gtk/meson.build @@ -839,23 +839,25 @@ 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() + 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/Default') + subdir('theme/Default') - theme_deps = [ - default_theme_deps, - ] -else - theme_deps = [] + theme_deps += [ + default_theme_deps, + ] + endif endif gtkresources = gnome.compile_resources('gtkresources', diff --git a/meson.build b/meson.build index 1b5740a53c..10665b855d 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 3a471a2025..29d1862031 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -78,11 +78,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') - option('f16c', type: 'feature', value: 'enabled',