-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install the readme and the license. Override libbsd-overlay and libobsd dependencies in subproject.
- Loading branch information
Showing
3 changed files
with
57 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -180,7 +180,8 @@ jobs: | |
with: | ||
msystem: ${{matrix.sys}} | ||
path-type: strict | ||
pacboy: gcc:p meson:p ninja:p | ||
pacboy: | | ||
gcc:p meson:p ninja:p dos2unix: | ||
- uses: actions/[email protected] | ||
- name: build | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (c) 2022 Guilherme Janczak <[email protected]> | ||
# Copyright (c) 2022, 2024 Guilherme Janczak <[email protected]> | ||
# | ||
# Permission to use, copy, modify, and distribute this software for any | ||
# purpose with or without fee is hereby granted, provided that the above | ||
|
@@ -105,21 +105,53 @@ libobsd = library('obsd', src, | |
dependencies: deps, | ||
gnu_symbol_visibility: 'hidden', | ||
override_options: link) | ||
if subproj | ||
if windows_host | ||
custom_target('license', | ||
command: ['unix2dos'], | ||
input: 'LICENSE.txt', | ||
feed: true, | ||
output: 'LICENSE_libobsd.txt', | ||
capture: true, | ||
build_by_default: true) | ||
else | ||
configure_file(input: 'LICENSE.txt', | ||
output: 'LICENSE_libobsd.txt', | ||
copy: true) | ||
endif | ||
else | ||
|
||
libobsd_dep = declare_dependency(link_with: libobsd, | ||
dependencies: deps, | ||
include_directories: incdir, | ||
sources: gen_inc, | ||
compile_args: user_args) | ||
meson.override_dependency('libbsd-overlay', libobsd_dep) | ||
meson.override_dependency('libobsd', libobsd_dep) | ||
|
||
subdir('test') | ||
|
||
### Installation. Headers and the library are handled elsewhere. | ||
|
||
libobsd_license = 'LICENSE.txt' | ||
libobsd_readme = 'README.md' | ||
docdir = get_option('docdir') | ||
if docdir == '' | ||
docdir = get_option('datadir') / 'doc' \ | ||
/ meson.project_name() + '-' + meson.project_version() | ||
endif | ||
if windows_host | ||
unix2dos = find_program('unix2dos') | ||
custom_target('license', | ||
command: [unix2dos], | ||
input: libobsd_license, | ||
feed: true, | ||
capture: true, | ||
output: subproj ? 'LICENSE_libobsd.txt' : libobsd_license, | ||
build_by_default: true, | ||
install: not subproj, | ||
install_dir: docdir) | ||
custom_target('readme', | ||
command: [unix2dos], | ||
input: libobsd_readme, | ||
feed: true, | ||
capture: true, | ||
output: libobsd_readme, | ||
build_by_default: true, | ||
install: not subproj, | ||
install_dir: docdir) | ||
elif not subproj | ||
install_data(libobsd_license, libobsd_readme, | ||
install_dir: docdir, | ||
install_tag: 'doc') | ||
endif | ||
|
||
if not subproj | ||
install_man(man) | ||
|
||
pkg = import('pkgconfig') | ||
|
@@ -143,10 +175,3 @@ else | |
pointing_to: 'libobsd.pc') | ||
endif | ||
endif | ||
|
||
libobsd_dep = declare_dependency(link_with: libobsd, | ||
dependencies: deps, | ||
include_directories: incdir, | ||
sources: gen_inc, | ||
compile_args: user_args) | ||
subdir('test') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (c) 2022 Guilherme Janczak <[email protected]> | ||
# Copyright (c) 2022,2024 Guilherme Janczak <[email protected]> | ||
# | ||
# Permission to use, copy, modify, and distribute this software for any | ||
# purpose with or without fee is hereby granted, provided that the above | ||
|
@@ -14,8 +14,12 @@ | |
|
||
option('provide_libbsd', type: 'boolean', value: false, | ||
description: 'Provide a libbsd-overlay.pc pkg-config definition.') | ||
option('docdir', type: 'string', | ||
description: 'Where to install the license, readme, and other' | ||
+ ' documentation which isn\'t man pages.') | ||
|
||
# This option is for development, not end users. | ||
option('test_system', type: 'boolean', value: false, | ||
description: 'Creates a Meson test suite named \'system\' which contains' | ||
+ ' tests for functions present in the current system.') | ||
description: 'Creates a Meson test suite named \'system\' which' | ||
+ ' contains tests for functions present in the current' | ||
+ ' system.') |