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

Clean up some FreeBSD conditions #98

Merged
merged 16 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from 13 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ You can even run the tests if you'd like:
To build a FreeBSD, HardenedBSD or OPNsense package
use:

(as root) # pkg install meson pkgconf jansson openssl
(as root) # pkg install meson pkgconf jansson asciidoc
$ mkdir build && cd build
$ meson .. --prefix=/usr/local
$ ninja
Expand Down
33 changes: 22 additions & 11 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ project('jose', 'c', license: 'APL2',
)

licensedir = join_paths(get_option('prefix'), 'share', 'licenses', meson.project_name())
if build_machine.system() == 'freebsd'
if host_machine.system() == 'freebsd'
licensedir += '-'+meson.project_version()
endif

Expand Down Expand Up @@ -54,16 +54,27 @@ subdir('tests')
install_data(licenses, install_dir: licensedir)

pkg = import('pkgconfig')
pkg.generate(
description: 'Library for managing JOSE objects',
version: meson.project_version(),
filebase: meson.project_name(),
name: 'José Library',

requires_private: [ 'zlib', 'libcrypto' ],
libraries: libjose_lib,
requires: 'jansson',
)
if host_machine.system() == 'freebsd'
pkg.generate(
description: 'Library for managing JOSE objects',
version: meson.project_version(),
filebase: meson.project_name(),
name: 'José Library',
requires_private: 'zlib',
hdholm marked this conversation as resolved.
Show resolved Hide resolved
libraries: libjose_lib,
requires: 'jansson',
)
else
pkg.generate(
description: 'Library for managing JOSE objects',
version: meson.project_version(),
filebase: meson.project_name(),
name: 'José Library',
requires_private: [ 'zlib', 'libcrypto' ],
libraries: libjose_lib,
requires: 'jansson',
)
endif

if a2x.found()
foreach m : mans
Expand Down
2 changes: 1 addition & 1 deletion tests/issue-75/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
e = environment()

openssl = dependency('openssl', required: false)
openssl = dependency('openssl', version: '>= 1.1.0', required: false)
if openssl.found()
issue75 = executable('issue75', 'issue-75.c',
dependencies: [libjose_dep, openssl])
Expand Down