summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2022-05-06 09:51:44 +0200
committerThomas Haller <thaller@redhat.com>2022-05-06 09:51:44 +0200
commit2750002547fabd34343a24c518db5837ce888026 (patch)
treeb7ff8f47ee2af6efc84c702ce67c395ab8de1f60
parent12bb8b9b716147717bc667a8ac94dd34b5461331 (diff)
downloadNetworkManager-2750002547fabd34343a24c518db5837ce888026.tar.gz
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
-rw-r--r--.github/workflows/ci.yml16
-rw-r--r--.gitmodules3
-rw-r--r--AUTHORS2
-rw-r--r--README.md2
-rw-r--r--meson.build14
-rw-r--r--src/meson.build29
m---------subprojects/c-stdaux0
-rw-r--r--subprojects/libcstdaux-1.wrap3
8 files changed, 30 insertions, 39 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b40abf690f..d54b120011 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -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
diff --git a/.gitmodules b/.gitmodules
index a86b29fd1c..e69de29bb2 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +0,0 @@
-[submodule "subprojects/c-stdaux"]
- path = subprojects/c-stdaux
- url = https://github.com/c-util/c-stdaux.git
diff --git a/AUTHORS b/AUTHORS
index b59660c5ee..3c6436a932 100644
--- a/AUTHORS
+++ b/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>
diff --git a/README.md b/README.md
index ba09041be4..bd97d06b61 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/meson.build b/meson.build
index 2b07b019b3..ffcb6a76ae 100644
--- a/meson.build
+++ b/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)
diff --git a/src/meson.build b/src/meson.build
index 7ee9c601e7..55c2e4f150 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -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)
diff --git a/subprojects/c-stdaux b/subprojects/c-stdaux
deleted file mode 160000
-Subproject c5f166d02ff68af5cdcbad1bdcea2cb134e34ce
diff --git a/subprojects/libcstdaux-1.wrap b/subprojects/libcstdaux-1.wrap
new file mode 100644
index 0000000000..036020aafe
--- /dev/null
+++ b/subprojects/libcstdaux-1.wrap
@@ -0,0 +1,3 @@
+[wrap-git]
+url = https://github.com/c-util/c-stdaux.git
+revision = v1