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

Switch build system to Meson #304

Merged
merged 10 commits into from
Apr 22, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Drop autotools support
Signed-off-by: Daiki Ueno <[email protected]>
ueno committed Apr 19, 2024
commit 16f83cec9daa710fd3ed3d4395c245be58a253a5
30 changes: 0 additions & 30 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -21,36 +21,6 @@ tests/tcmpkeys
/pkcs11-provider-?.?.tar.?z

# generic ignore patterns (c, autotools, etc)
INSTALL
Makefile
Makefile.in
aclocal.m4
ar-lib
autom4te.cache/
compile
compile_commands.json
config.guess
config.log
config.status
config.sub
configure
depcomp
install-sh
libtool
ltmain.sh
m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4
missing
src/config.h
src/config.h.in
src/stamp-h1
.deps/
.libs/
*.la
*.lo
*.o
*~
test-driver
10 changes: 2 additions & 8 deletions .reuse/dep5
Original file line number Diff line number Diff line change
@@ -6,20 +6,15 @@ Source: https://github.com/latchset/pkcs11-provider/
#
# Build system, data files from tests, and misc cruft
#
Files: **/Makefile.am
.github/*
Files: .github/*
.gitignore
Makefile.am
Makefile
meson.build
meson_options.txt
*.md
configure.ac
src/Makefile.am
src/meson.build
src/provider.exports
src/provider.map
src/*.gen.c
tests/Makefile.am
tests/README
tests/openssl.cnf.in
tests/explicit_ec.*
@@ -30,7 +25,6 @@ Files: **/Makefile.am
docs/*
tests/lsan.supp
tools/openssl*.cnf
m4/ax_valgrind_check.m4
Copyright: (C) 2022 Simo Sorce <[email protected]>
License: Apache-2.0

24 changes: 17 additions & 7 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -3,17 +3,27 @@
This package requires the following:
- OpenSSL 3.0.7+ libraries and development headers
- OpenSSL tools (for testing)
- autoconf-archive packages for some m4 macros
- NSS softoken, tools and development headers (for testing)
- a C compiler that supports at least C11 semantics
- automake
- meson
- pkg-config
- libtool
- p11-kit, p11-kit-server, p11-kit-devel, opensc and softhsm (for testing)

The usual command to build are:
- autoreconf -fi (if needed)
- ./configure (--with-openssl=/path/to/openssl if needed)
- make
- make check
- meson setup builddir
- meson compile -C builddir
- meson test -C builddir

To link with OpenSSL installed in a custom path, set
`PKG_CONFIG_PATH`, or `CFLAGS`/`LDFLAGS` envvars accordingly at the
`meson setup` step. For example, let's assume OpenSSL is installed
under an absolute path `$OPENSSL_DIR`.

If you rely on pkg-config, point `PKG_CONFIG_PATH` to a directory
where `libcrypto.pc` or `openssl.pc` can be found.

- `PKG_CONFIG_PATH="$OPENSSL_DIR/lib64/pkg-config" meson setup builddir`

Otherwise, you can set `CFLAGS`/`LDFLAGS`:

- `CFLAGS="-I$OPENSSL_DIR/include" LDFLAGS="-L$OPENSSL_DIR/lib64" meson setup builddir`
24 changes: 1 addition & 23 deletions Makefile.am → Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
ACLOCAL_AMFLAGS = -Im4

SUBDIRS = src tests docs
dist_doc_DATA = README.md
.PHONY: check-style check-style-show check-style-fix generate-code generate-docs

check-style:
@lines=`git diff -U0 --no-color --relative origin/main -- ':!src/pkcs11.h' | clang-format-diff -p1 |wc -l`; \
@@ -37,22 +34,3 @@ generate-docs:
manfile=`echo $${mdfile} | sed s/\.md//`; \
pandoc --standalone --to man $${mdfile} -o $${manfile}; \
done

DISTCLEANFILES = \
*~

MAINTAINERCLEANFILES = \
Makefile.in \
aclocal.m4 \
ar-lib compile \
config.guess \
config.sub \
configure \
depcomp \
install-sh \
ltmain.sh \
m4/* \
missing \
test-driver

EXTRA_DIST = meson.build
165 changes: 0 additions & 165 deletions configure.ac

This file was deleted.

4 changes: 0 additions & 4 deletions docs/Makefile.am

This file was deleted.

239 changes: 0 additions & 239 deletions m4/ax_valgrind_check.m4

This file was deleted.

76 changes: 0 additions & 76 deletions src/Makefile.am

This file was deleted.

1 change: 0 additions & 1 deletion src/provider.exports

This file was deleted.

142 changes: 0 additions & 142 deletions tests/Makefile.am

This file was deleted.