diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-01-12 08:18:47 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-01-12 08:42:18 -0500 |
commit | 13ef82fc4d9a245e9e925f8c86b598d62cfd1954 (patch) | |
tree | 54d3792ec937b34d1d5316c6fdc13c86e7f7c15b /build-aux | |
parent | b33ca43e146494973e1fe2f10ac8b4d008e8ac1a (diff) | |
download | gtk+-13ef82fc4d9a245e9e925f8c86b598d62cfd1954.tar.gz |
dist: Add a dist script to generate css
When I added the sassc option, I failed to ensure that
the theme css is included in the tarballs. This is required
to make tarball builds with -Dsassc=disabled work.
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/meson/dist-theme.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/build-aux/meson/dist-theme.py b/build-aux/meson/dist-theme.py new file mode 100644 index 0000000000..1582057113 --- /dev/null +++ b/build-aux/meson/dist-theme.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 + +import os +from pathlib import PurePath +import subprocess + +stylesheets = [ 'gtk/theme/Adwaita/Adwaita.css', + 'gtk/theme/Adwaita/Adwaita-dark.css', + 'gtk/theme/HighContrast/HighContrast.css', + 'gtk/theme/HighContrast/HighContrast-inverse.css' ] + +sourceroot = os.environ.get('MESON_SOURCE_ROOT') +distroot = os.environ.get('MESON_DIST_ROOT') + +for stylesheet in stylesheets: + stylesheet_path = PurePath(stylesheet) + src = PurePath(sourceroot, stylesheet_path.with_suffix('.scss')) + dst = PurePath(distroot, stylesheet_path) + subprocess.call(['sassc', '-a', '-M', '-t', 'compact', src, dst]) |