From 3de0f24888b4033853fa937321446bb70654a707 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Tue, 19 Sep 2023 12:04:56 +0200 Subject: [PATCH] Add sassc 3.6.2 (#1185) This is a direct copy of https://github.com/lazka/sassc/tree/meson which I've created for gtk back in the days. This project is in a similar situation as #1153. There exists an upstream PR for adding meson (https://github.com/sass/sassc/pull/269), but the project is unmaintained, so unlikely to see progress there. --- releases.json | 8 ++++ subprojects/packagefiles/sassc/meson.build | 47 ++++++++++++++++++++++ subprojects/sassc.wrap | 9 +++++ 3 files changed, 64 insertions(+) create mode 100644 subprojects/packagefiles/sassc/meson.build create mode 100644 subprojects/sassc.wrap diff --git a/releases.json b/releases.json index ca1b7604c..a6ee59ba5 100644 --- a/releases.json +++ b/releases.json @@ -2494,6 +2494,14 @@ "4.1.0-1" ] }, + "sassc": { + "program_names": [ + "sassc" + ], + "versions": [ + "3.6.2-1" + ] + }, "sdl2": { "dependency_names": [ "sdl2", diff --git a/subprojects/packagefiles/sassc/meson.build b/subprojects/packagefiles/sassc/meson.build new file mode 100644 index 000000000..29dd6f608 --- /dev/null +++ b/subprojects/packagefiles/sassc/meson.build @@ -0,0 +1,47 @@ +project('sassc', 'c', + version: '3.6.2', + meson_version : '>= 0.48.0', + default_options: [ + 'c_std=c99', + 'buildtype=debugoptimized', + ]) + +version_conf_data = configuration_data() +version_conf_data.set('PACKAGE_VERSION', meson.project_version()) + +add_project_arguments( + '-D_POSIX_C_SOURCE', + '-DSASSC_VERSION="@0@"'.format(meson.project_version()), + language: ['c']) + +configure_file( + input: 'sassc_version.h.in', + output: 'sassc_version.h', + configuration: version_conf_data) + +libsass_dep = dependency( + 'libsass', + fallback: ['libsass', 'libsass_dep']) + +sassc_sources = ['sassc.c'] + +incs = [] +if host_machine.system() == 'windows' + windows = import('windows') + win_res = windows.compile_resources( + 'res/libsass.rc', + depend_files: ['res/libsass.ico']) + sassc_sources += win_res + incs += include_directories('win/posix') + sassc_sources += 'win/posix/getopt.c' +endif + +sassc = executable( + 'sassc', + sassc_sources, + dependencies: [libsass_dep], + include_directories: incs, + install: true, +) + +meson.override_find_program('sassc', sassc) diff --git a/subprojects/sassc.wrap b/subprojects/sassc.wrap new file mode 100644 index 000000000..f874e8eaa --- /dev/null +++ b/subprojects/sassc.wrap @@ -0,0 +1,9 @@ +[wrap-file] +directory = sassc-3.6.2 +source_url = https://github.com/sass/sassc/archive/refs/tags/3.6.2.tar.gz +source_filename = sassc-3.6.2.tar.gz +source_hash = 608dc9002b45a91d11ed59e352469ecc05e4f58fc1259fc9a9f5b8f0f8348a03 +patch_directory = sassc + +[provide] +program_names = sassc