Skip to content

Commit

Permalink
Add sassc 3.6.2 (mesonbuild#1185)
Browse files Browse the repository at this point in the history
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 mesonbuild#1153. There exists
an upstream PR for adding meson (sass/sassc#269),
but the project is unmaintained, so unlikely to see progress there.
  • Loading branch information
lazka authored and Will Wray committed Apr 22, 2024
1 parent 6f20ddb commit 3de0f24
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
8 changes: 8 additions & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -2494,6 +2494,14 @@
"4.1.0-1"
]
},
"sassc": {
"program_names": [
"sassc"
],
"versions": [
"3.6.2-1"
]
},
"sdl2": {
"dependency_names": [
"sdl2",
Expand Down
47 changes: 47 additions & 0 deletions subprojects/packagefiles/sassc/meson.build
Original file line number Diff line number Diff line change
@@ -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)
9 changes: 9 additions & 0 deletions subprojects/sassc.wrap
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3de0f24

Please sign in to comment.