Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ci_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@
"binutils-dev"
]
},
"base64": {
"build_options": [
"base64:tests=enabled"
]
},
"blueprint-compiler": {
"_comment": "Tests require pygobject and Gtk4 typelib, and also they crash",
"skip_tests": true
Expand Down
8 changes: 8 additions & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,14 @@
"1.6-1"
]
},
"base64": {
"dependency_names": [
"base64"
],
"versions": [
"0.5.2-1"
]
},
"bdwgc": {
"dependency_names": [
"gc"
Expand Down
9 changes: 9 additions & 0 deletions subprojects/base64.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[wrap-file]
directory = base64-0.5.2
source_url = https://github.com/aklomp/base64/archive/refs/tags/v0.5.2.tar.gz
source_filename = base64-0.5.2.tar.gz
source_hash = 723a0f9f4cf44cf79e97bcc315ec8f85e52eb104c8882942c3f2fba95acc080d
patch_directory = base64

[provide]
dependency_names = base64
90 changes: 90 additions & 0 deletions subprojects/packagefiles/base64/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
project(
'base64',
'c',
version: '0.5.2',
license: 'BSD-2-Clause',
meson_version: '>=0.59.0',

Check notice on line 6 in subprojects/packagefiles/base64/meson.build

View workflow job for this annotation

GitHub Actions / Ubuntu (x86_64)

Minimum Meson version is 0.59.0

0.38.0: build_by_default arg in executable 0.47.0: dict 0.54.0: meson.override_dependency 0.59.0: feature_option.allowed(), feature_option.disable_auto_if()
default_options: ['warning_level=3'],
)

cc = meson.get_compiler('c')
tests_opt = get_option('tests').disable_auto_if(meson.is_subproject())

c_args = []
config = configuration_data()

if host_machine.cpu_family() in ['x86', 'x86_64']
features = {
'SSSE3': 'ssse3',
'SSE41': 'sse4.1',
'SSE42': 'sse4.2',
'AVX': 'avx',
'AVX2': 'avx2',
}
foreach feature, flag : features
if cc.has_argument('-m' + flag)
config.set('HAVE_' + feature, 1)
c_args += ['-DHAVE_' + feature, '-m' + flag]
endif
endforeach
elif host_machine.cpu_family() == 'arm'
config.set('HAVE_NEON32', 1)
c_args += ['-DHAVE_NEON32']
elif host_machine.cpu_family() == 'aarch64'
config.set('HAVE_NEON64', 1)
c_args += ['-DHAVE_NEON64']
endif

cfg = configure_file(
output: 'config.h',
configuration: config,
)

src = [
cfg,
'lib/lib.c',
'lib/codec_choose.c',
'lib/tables/tables.c',
'lib/arch/generic/codec.c',
'lib/arch/ssse3/codec.c',
'lib/arch/sse41/codec.c',
'lib/arch/sse42/codec.c',
'lib/arch/avx/codec.c',
'lib/arch/avx2/codec.c',
'lib/arch/avx512/codec.c',
'lib/arch/neon32/codec.c',
'lib/arch/neon64/codec.c',
]

inc = include_directories('include')

libbase64 = library(
'base64',
src,
c_args: c_args,
include_directories: inc,
install: true,
version: meson.project_version(),
override_options: ['c_std=c99'],
)

base64_dep = declare_dependency(
include_directories: inc,
link_with: libbase64,
)

meson.override_dependency('base64', base64_dep)

if tests_opt.allowed()
test_src = ['test/codec_supported.c', 'test/test_base64.c']

test_exe = executable(
'base64-test',
test_src,
include_directories: inc,
link_with: libbase64,
override_options: ['c_std=c99'],
build_by_default: false,
)
test('base64', test_exe)
endif
5 changes: 5 additions & 0 deletions subprojects/packagefiles/base64/meson_options.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
option(
'tests',
type: 'feature',
description: 'Build base64 test cases',
)
Loading