build: Support the meson build system
Meson is on track to replace autotools as the build system of choice, so support it in addition to autotools. If all goes well, we'll eventually be able to drop the latter ... https://bugzilla.gnome.org/show_bug.cgi?id=783229
This commit is contained in:
87
data/meson.build
Normal file
87
data/meson.build
Normal file
@ -0,0 +1,87 @@
|
||||
desktop_files = [
|
||||
'org.gnome.Shell.desktop',
|
||||
'gnome-shell-extension-prefs.desktop'
|
||||
]
|
||||
service_files = []
|
||||
|
||||
if have_networkmanager
|
||||
desktop_files += 'org.gnome.Shell.PortalHelper.desktop'
|
||||
service_files += 'org.gnome.Shell.PortalHelper.service'
|
||||
endif
|
||||
|
||||
desktopconf = configuration_data()
|
||||
# We substitute in bindir so it works as an autostart
|
||||
# file when built in a non-system prefix
|
||||
desktopconf.set('bindir', bindir)
|
||||
desktopconf.set('VERSION', meson.project_version())
|
||||
foreach desktop_file : desktop_files
|
||||
i18n.merge_file('desktop',
|
||||
input: configure_file(
|
||||
input: desktop_file + '.in.in',
|
||||
output: desktop_file + '.in',
|
||||
configuration: desktopconf
|
||||
),
|
||||
output: desktop_file,
|
||||
po_dir: '../po',
|
||||
install: true,
|
||||
install_dir: desktopdir,
|
||||
type: 'desktop'
|
||||
)
|
||||
endforeach
|
||||
|
||||
serviceconf = configuration_data()
|
||||
serviceconf.set('libexecdir', libexecdir)
|
||||
foreach service_file : service_files
|
||||
configure_file(
|
||||
input: service_file + '.in',
|
||||
output: service_file,
|
||||
configuration: serviceconf,
|
||||
install_dir: servicedir
|
||||
)
|
||||
endforeach
|
||||
|
||||
|
||||
dbus_interfaces = [
|
||||
'org.gnome.Shell.PadOsd.xml',
|
||||
'org.gnome.Shell.Screencast.xml',
|
||||
'org.gnome.Shell.Screenshot.xml',
|
||||
'org.gnome.ShellSearchProvider.xml',
|
||||
'org.gnome.ShellSearchProvider2.xml'
|
||||
]
|
||||
install_data(dbus_interfaces, install_dir: ifacedir)
|
||||
|
||||
|
||||
subdir('theme')
|
||||
|
||||
theme_resources = gnome.compile_resources(
|
||||
'gnome-shell-theme', 'gnome-shell-theme.gresource.xml',
|
||||
source_dir: 'theme',
|
||||
dependencies: theme_deps,
|
||||
gresource_bundle: true,
|
||||
install: true,
|
||||
install_dir: pkgdatadir
|
||||
)
|
||||
|
||||
perfconf = configuration_data()
|
||||
perfconf.set('datadir', datadir)
|
||||
configure_file(
|
||||
input: 'perf-background.xml.in',
|
||||
output: 'perf-background.xml',
|
||||
configuration: perfconf,
|
||||
install_dir: pkgdatadir
|
||||
)
|
||||
|
||||
|
||||
install_data('50-gnome-shell-system.xml', install_dir: keysdir)
|
||||
|
||||
|
||||
schemaconf = configuration_data()
|
||||
schemaconf.set('GETTEXT_PACKAGE', meson.project_name())
|
||||
configure_file(
|
||||
input: 'org.gnome.shell.gschema.xml.in',
|
||||
output: 'org.gnome.shell.gschema.xml',
|
||||
configuration: schemaconf,
|
||||
install_dir: schemadir
|
||||
)
|
||||
|
||||
install_data('gnome-shell-overrides.convert', install_dir: convertdir)
|
21
data/theme/meson.build
Normal file
21
data/theme/meson.build
Normal file
@ -0,0 +1,21 @@
|
||||
theme_sources = files([
|
||||
'gnome-shell-high-contrast.scss',
|
||||
'gnome-shell.scss',
|
||||
'gnome-shell-sass/_colors.scss',
|
||||
'gnome-shell-sass/_common.scss',
|
||||
'gnome-shell-sass/_drawing.scss',
|
||||
'gnome-shell-sass/_high-contrast-colors.scss'
|
||||
])
|
||||
|
||||
theme_deps = []
|
||||
|
||||
if sassc.found()
|
||||
parse_sass = files('parse-sass.sh')
|
||||
|
||||
theme_deps += custom_target('update-theme',
|
||||
output: 'theme-update.stamp',
|
||||
depend_files: theme_sources,
|
||||
command: [parse_sass, '@OUTPUT@'],
|
||||
build_by_default: true
|
||||
)
|
||||
endif
|
@ -1,7 +1,10 @@
|
||||
#!/usr/bin/sh
|
||||
|
||||
srcdir=`dirname $0`
|
||||
stamp=${1}
|
||||
for scss in $srcdir/*.scss
|
||||
do
|
||||
sassc -a $scss ${scss%%.scss}.css
|
||||
sassc -a $scss ${scss%%.scss}.css || exit 1
|
||||
done
|
||||
|
||||
[ "$stamp" ] && touch $stamp
|
||||
|
Reference in New Issue
Block a user