Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add libsass 3.6.4 #1153

Merged
merged 10 commits into from
Sep 16, 2023
5 changes: 0 additions & 5 deletions subprojects/packagefiles/libsass/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ add_project_arguments(
'-DLIBSASS_VERSION="@0@"'.format(meson.project_version()),
language: ['cpp'])

cpp = meson.get_compiler('cpp')
add_project_arguments(
cpp.get_supported_arguments('-Wno-non-virtual-dtor'),
language: ['cpp'])

inc = include_directories('include')
winres_path = files(join_paths('res', 'resource.rc'))

Expand Down
34 changes: 16 additions & 18 deletions subprojects/packagefiles/libsass/src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,18 @@ if host_machine.system() == 'windows'
sass_sources += [windows.compile_resources(winres_path)]
endif

if meson.version().version_compare('>= 0.62')
dl_dep = dependency('dl', required : false)
if host_machine.system() != 'windows'
if meson.version().version_compare('>= 0.62')
dl_dep = dependency('dl')
else
dl_dep = cc.find_library('dl', required : false)
endif
else
dl_dep = cc.find_library('dl', required : false)
dl_dep = declare_dependency()
lazka marked this conversation as resolved.
Show resolved Hide resolved
endif

lib_args = []
if get_option('default_library') != 'static'
if host_machine.system() == 'windows' and get_option('default_library') != 'static'
lib_args += ['-DADD_EXPORTS']
endif

Expand All @@ -94,23 +98,17 @@ libsass = library(
c_args: lib_args,
cpp_args: lib_args,
include_directories: inc,
soversion: '1',
install: true)

libsass_dep = declare_dependency(
link_with: libsass,
include_directories: [inc])

conf_data = configuration_data()
conf_data.set('prefix', get_option('prefix'))
conf_data.set('exec_prefix', '${prefix}')
conf_data.set('libdir', join_paths('${exec_prefix}', get_option('libdir')))
conf_data.set('includedir', join_paths('${prefix}', get_option('includedir')))
conf_data.set('VERSION', meson.project_version())

pkg_install_dir = join_paths(get_option('libdir'), 'pkgconfig')

configure_file(
input: 'support/libsass.pc.in',
output: 'libsass.pc',
configuration: conf_data,
install_dir: pkg_install_dir)
pkg = import('pkgconfig')
pkg.generate(
libsass,
name: 'libsass',
description: 'A C implementation of a Sass compiler',
url: 'https://github.com/sass/libsass',
)