mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-07 13:08:10 +02:00
Squashed 'src/c-siphash/' changes from eb87a9c4a5b0..1da8a0d46bfd
1da8a0d46bfd build: align with new c-util style git-subtree-dir: src/c-siphash git-subtree-split: 1da8a0d46bfdf07dc263a33ea9f22682db7dbea0
This commit is contained in:
parent
12bb8b9b71
commit
2750002547
8 changed files with 30 additions and 40 deletions
16
.github/workflows/ci.yml
vendored
16
.github/workflows/ci.yml
vendored
|
|
@ -9,13 +9,9 @@ on:
|
|||
jobs:
|
||||
ci:
|
||||
name: CI with Default Configuration
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Fetch Sources
|
||||
uses: actions/checkout@v2
|
||||
- name: Run through C-Util CI
|
||||
uses: c-util/automation/src/ci-c-util@v1
|
||||
with:
|
||||
m32: 1
|
||||
valgrind: 1
|
||||
uses: bus1/cabuild/.github/workflows/ci-c-util.yml@v1
|
||||
with:
|
||||
cabuild_ref: "v1"
|
||||
m32: true
|
||||
matrixmode: true
|
||||
valgrind: true
|
||||
|
|
|
|||
3
.gitmodules
vendored
3
.gitmodules
vendored
|
|
@ -1,3 +0,0 @@
|
|||
[submodule "subprojects/c-stdaux"]
|
||||
path = subprojects/c-stdaux
|
||||
url = https://github.com/c-util/c-stdaux.git
|
||||
2
AUTHORS
2
AUTHORS
|
|
@ -30,7 +30,7 @@ AUTHORS-LGPL:
|
|||
along with this program; If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
COPYRIGHT: (ordered alphabetically)
|
||||
Copyright (C) 2015-2019 Red Hat, Inc.
|
||||
Copyright (C) 2015-2022 Red Hat, Inc.
|
||||
|
||||
AUTHORS: (ordered alphabetically)
|
||||
David Rheinsberg <david.rheinsberg@gmail.com>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ The requirements for this project are:
|
|||
|
||||
At build-time, the following software is required:
|
||||
|
||||
* `meson >= 0.41`
|
||||
* `meson >= 0.60`
|
||||
* `pkg-config >= 0.29`
|
||||
|
||||
### Build
|
||||
|
|
|
|||
14
meson.build
14
meson.build
|
|
@ -1,19 +1,21 @@
|
|||
project(
|
||||
'c-siphash',
|
||||
'c',
|
||||
version: '1',
|
||||
license: 'Apache',
|
||||
default_options: [
|
||||
'c_std=c11'
|
||||
],
|
||||
license: 'Apache',
|
||||
meson_version: '>=0.60.0',
|
||||
version: '1.0.0',
|
||||
)
|
||||
major = meson.project_version().split('.')[0]
|
||||
project_description = 'Streaming-capable SipHash Implementation'
|
||||
|
||||
add_project_arguments('-D_GNU_SOURCE', language: 'c')
|
||||
mod_pkgconfig = import('pkgconfig')
|
||||
|
||||
sub_cstdaux = subproject('c-stdaux')
|
||||
|
||||
dep_cstdaux = sub_cstdaux.get_variable('libcstdaux_dep')
|
||||
dep_cstdaux = dependency('libcstdaux-1')
|
||||
add_project_arguments(dep_cstdaux.get_variable('cflags').split(' '), language: 'c')
|
||||
|
||||
subdir('src')
|
||||
|
||||
meson.override_dependency('libcsiphash-'+major, libcsiphash_dep, static: true)
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ libcsiphash_deps = [
|
|||
dep_cstdaux,
|
||||
]
|
||||
|
||||
libcsiphash_private = static_library(
|
||||
'csiphash-private',
|
||||
libcsiphash_both = both_libraries(
|
||||
'csiphash-'+major,
|
||||
[
|
||||
'c-siphash.c',
|
||||
],
|
||||
|
|
@ -18,26 +18,19 @@ libcsiphash_private = static_library(
|
|||
'-fno-common',
|
||||
],
|
||||
dependencies: libcsiphash_deps,
|
||||
pic: true,
|
||||
)
|
||||
|
||||
libcsiphash_shared = shared_library(
|
||||
'csiphash',
|
||||
objects: libcsiphash_private.extract_all_objects(),
|
||||
dependencies: libcsiphash_deps,
|
||||
install: not meson.is_subproject(),
|
||||
soversion: 0,
|
||||
link_depends: libcsiphash_symfile,
|
||||
link_args: [
|
||||
'-Wl,--no-undefined',
|
||||
'-Wl,--version-script=@0@'.format(libcsiphash_symfile),
|
||||
],
|
||||
link_depends: libcsiphash_symfile,
|
||||
soversion: 0,
|
||||
)
|
||||
|
||||
libcsiphash_dep = declare_dependency(
|
||||
include_directories: include_directories('.'),
|
||||
link_with: libcsiphash_private,
|
||||
dependencies: libcsiphash_deps,
|
||||
include_directories: include_directories('.'),
|
||||
link_with: libcsiphash_both.get_static_lib(),
|
||||
version: meson.project_version(),
|
||||
)
|
||||
|
||||
|
|
@ -45,11 +38,11 @@ if not meson.is_subproject()
|
|||
install_headers('c-siphash.h')
|
||||
|
||||
mod_pkgconfig.generate(
|
||||
libraries: libcsiphash_shared,
|
||||
version: meson.project_version(),
|
||||
name: 'libcsiphash',
|
||||
filebase: 'libcsiphash',
|
||||
description: project_description,
|
||||
filebase: 'libcsiphash-'+major,
|
||||
libraries: libcsiphash_both.get_shared_lib(),
|
||||
name: 'libcsiphash',
|
||||
version: meson.project_version(),
|
||||
)
|
||||
endif
|
||||
|
||||
|
|
@ -57,7 +50,7 @@ endif
|
|||
# target: test-*
|
||||
#
|
||||
|
||||
test_api = executable('test-api', ['test-api.c'], link_with: libcsiphash_shared)
|
||||
test_api = executable('test-api', ['test-api.c'], link_with: libcsiphash_both.get_shared_lib())
|
||||
test('API Symbol Visibility', test_api)
|
||||
|
||||
test_basic = executable('test-basic', ['test-basic.c'], dependencies: libcsiphash_dep)
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit c5f166d02ff68af5cdcbad1bdcea2cb134e34ce4
|
||||
3
subprojects/libcstdaux-1.wrap
Normal file
3
subprojects/libcstdaux-1.wrap
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[wrap-git]
|
||||
url = https://github.com/c-util/c-stdaux.git
|
||||
revision = v1
|
||||
Loading…
Add table
Reference in a new issue