From 7cc8224ca73201ec76ada344eee107bb589433d2 Mon Sep 17 00:00:00 2001 From: Nathan Graule Date: Sun, 8 Mar 2020 22:38:30 +0100 Subject: [PATCH 1/3] Add meson.build for sassc (with Meson fork of libsass) --- meson.build | 13 +++++++++++++ subprojects/.gitignore | 1 + subprojects/sass.wrap | 3 +++ 3 files changed, 17 insertions(+) create mode 100644 meson.build create mode 100644 subprojects/.gitignore create mode 100644 subprojects/sass.wrap diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..14ef8a2 --- /dev/null +++ b/meson.build @@ -0,0 +1,13 @@ +project('sassc', 'c', version: '3.6.2', default_options: ['c_std=c11']) + +sassc_version = configure_file(input: 'sassc_version.h.in', output: 'sassc_version.h', + configuration: { + 'PACKAGE_VERSION': meson.version() + } +) + +deps = [ + dependency('libsass', required: true, fallback: ['sass', 'sass_dep']) +] + +sass_exe = executable('sassc', 'sassc.c', dependencies: deps, install: true) diff --git a/subprojects/.gitignore b/subprojects/.gitignore new file mode 100644 index 0000000..818ad03 --- /dev/null +++ b/subprojects/.gitignore @@ -0,0 +1 @@ +/sass diff --git a/subprojects/sass.wrap b/subprojects/sass.wrap new file mode 100644 index 0000000..3874cc8 --- /dev/null +++ b/subprojects/sass.wrap @@ -0,0 +1,3 @@ +[wrap-git] +url = https://github.com/solarliner/libsass +revision = feature/meson From bd81ccb792be3f71c0a16c57e6e12e1321437218 Mon Sep 17 00:00:00 2001 From: Nathan Graule Date: Sun, 8 Mar 2020 22:38:30 +0100 Subject: [PATCH 2/3] Add compiler define _WIN32 when targeting Windows --- meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meson.build b/meson.build index 14ef8a2..567e64a 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,9 @@ project('sassc', 'c', version: '3.6.2', default_options: ['c_std=c11']) +if target_machine.system() == 'windows' + add_project_arguments('-D_WIN32', language: 'c') +endif + sassc_version = configure_file(input: 'sassc_version.h.in', output: 'sassc_version.h', configuration: { 'PACKAGE_VERSION': meson.version() From 115d5cac49dc305f37b980b0b92e0f307497e60d Mon Sep 17 00:00:00 2001 From: Nathan Graule Date: Fri, 20 Nov 2020 22:02:30 +0100 Subject: [PATCH 3/3] fix: remove _WIN32 define on Windows The define is already set on the platform. --- meson.build | 4 ---- 1 file changed, 4 deletions(-) diff --git a/meson.build b/meson.build index 567e64a..14ef8a2 100644 --- a/meson.build +++ b/meson.build @@ -1,9 +1,5 @@ project('sassc', 'c', version: '3.6.2', default_options: ['c_std=c11']) -if target_machine.system() == 'windows' - add_project_arguments('-D_WIN32', language: 'c') -endif - sassc_version = configure_file(input: 'sassc_version.h.in', output: 'sassc_version.h', configuration: { 'PACKAGE_VERSION': meson.version()