-
Notifications
You must be signed in to change notification settings - Fork 709
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Frank Morgner <[email protected]> Co-authored-by: Jussi Pakkanen <[email protected]>
- Loading branch information
1 parent
48e5007
commit 053bf08
Showing
63 changed files
with
2,629 additions
and
98 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Checks: '-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling' | ||
WarningsAsErrors: '-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling' | ||
HeaderFilterRegex: '.*' | ||
UseColor: 'true' |
Empty file.
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
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 |
---|---|---|
@@ -0,0 +1,76 @@ | ||
if progxsltproc.found() and stylesheets_path != '' | ||
xml1 = configure_file( | ||
configuration: { | ||
'sysconfdir': absolute_sysconfdir, | ||
'docdir': absolute_docdir, | ||
'libdir': absolute_libdir / '', | ||
'DYN_LIB_EXT': '.' + extension_of_libraries, | ||
'DEFAULT_PCSC_PROVIDER': conf.get_unquoted('DEFAULT_PCSC_PROVIDER'), | ||
'PROFILE_DIR_DEFAULT': (host_machine.system() == 'windows' or host_machine.system() == 'cygwin')? | ||
'obtained from windows registers' : absolute_pkgdir, | ||
'DEFAULT_SM_MODULE': conf.get_unquoted('DEFAULT_SM_MODULE') | ||
}, | ||
input: 'opensc.conf.5.xml.in', | ||
output: 'opensc.conf.5.xml' | ||
) | ||
|
||
custom_target( | ||
command: [progxsltproc, | ||
'--nonet', | ||
'--path', meson.project_source_root() / 'doc' + ':' + stylesheets_path / 'manpages', | ||
'--xinclude', | ||
'-o', '@OUTPUT@', | ||
'man.xsl', | ||
'@INPUT@' | ||
], | ||
input: xml1, | ||
output: modfs.stem(xml1), | ||
build_by_default: get_option('man'), | ||
install: get_option('man'), | ||
install_dir: get_option('mandir') / 'man5' | ||
) | ||
|
||
xml2 = configure_file( | ||
configuration: {'pkgdatadir': absolute_pkgdir}, | ||
input: 'pkcs15-profile.5.xml.in', | ||
output: 'pkcs15-profile.5.xml' | ||
) | ||
|
||
custom_target( | ||
command: [progxsltproc, | ||
'--nonet', | ||
'--path', meson.project_source_root() / 'doc' + ':' + stylesheets_path / 'manpages', | ||
'--xinclude', | ||
'-o', '@OUTPUT@', | ||
'man.xsl', | ||
'@INPUT@' | ||
], | ||
input: xml2, | ||
output: modfs.stem(xml2), | ||
build_by_default: get_option('man'), | ||
install: get_option('man'), | ||
install_dir: get_option('mandir') / 'man5' | ||
) | ||
|
||
custom_target( | ||
command: [progxsltproc, | ||
'--nonet', | ||
'--path', meson.project_build_root() / 'doc' / 'files' + ':' + | ||
meson.project_source_root() / 'doc' + ':' + | ||
stylesheets_path / 'html', | ||
'--xinclude', | ||
'-o', '@OUTPUT@', | ||
'html.xsl', | ||
'@INPUT@' | ||
], | ||
input: 'files.xml', | ||
output: 'files.html', | ||
depend_files: [xml1, xml2], | ||
build_by_default: get_option('doc'), | ||
install: get_option('doc'), | ||
install_dir: absolute_docdir | ||
) | ||
|
||
unset_variable('xml1') | ||
unset_variable('xml2') | ||
endif |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
if [ ! $# -eq 3 ]; then | ||
echo "Usage: template description.1.xml generated_completion" | ||
exit 1 | ||
fi | ||
if [ ! -r "$1" ]; then | ||
echo "The file \"$1\" does not exist or is not readable" | ||
exit 2 | ||
fi | ||
if [ ! -r "$2" ]; then | ||
echo "The file \"$2\" does not exist or is not readable" | ||
exit 3 | ||
fi | ||
|
||
ALLOPTS=$(sed -n 's,.*<option>\([^<]*\)</option>.*,\1,pg' "$2" | sort -u | grep '^-' | tr '\n' ' ') | ||
|
||
OPTSWITHARGS=$(sed -n 's,.*<option>\([^<]*\)</option>.*<replaceable>.*,\1,pg' "$2" | sort -u | grep '^-' | tr '\n' '|' | sed 's,|$$,,' | grep ^ || echo "!*") | ||
|
||
FILEOPTS=$(sed -n 's,.*<option>\([^<]*\)</option>.*<replaceable>.*filename.*,\1,pg' "$2" | sort -u | grep '^-' | tr '\n' '|' | sed 's,|$$,,' | grep ^ || echo "!*") | ||
|
||
PINOPTS=$(sed -En 's,.*<option>([^<]*)</option>.*<replaceable>\s*(newpin|pin|puk|sopin|sopuk)\s*<.*,\1,pg' "$2" | sort -u | grep '^-' | tr '\n' '|' | sed 's,|$$,,' | grep ^ || echo "!*") | ||
|
||
MODULEOPTS=$(sed -n 's,.*<option>\([^<]*\)</option>.*<replaceable>.*mod.*,\1,pg' "$2" | sort -u | grep '^-' | tr '\n' '|' | sed 's,|$$,,' | grep ^ || echo "!*") | ||
|
||
FUNCTION_NAME=$(basename "$3" | sed s,-,_,g) | ||
|
||
PROGRAM_NAME=$(basename "$3") | ||
|
||
cat "$1" \ | ||
| sed "s,ALLOPTS,${ALLOPTS}," \ | ||
| sed "s,OPTSWITHARGS,${OPTSWITHARGS}," \ | ||
| sed "s,FILEOPTS,${FILEOPTS}," \ | ||
| sed "s,PINOPTS,${PINOPTS}," \ | ||
| sed "s,MODULEOPTS,${MODULEOPTS}," \ | ||
| sed "s,FUNCTION_NAME,${FUNCTION_NAME}," \ | ||
| sed "s,PROGRAM_NAME,${PROGRAM_NAME}," \ | ||
> "$3" | ||
|
||
exit 0 |
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 |
---|---|---|
@@ -0,0 +1,93 @@ | ||
sources = [ | ||
'cardos-tool.1.xml', | ||
'dnie-tool.1.xml', | ||
'dtrust-tool.1.xml', | ||
'egk-tool.1.xml', | ||
'eidenv.1.xml', | ||
'goid-tool.1.xml', | ||
'iasecc-tool.1.xml', | ||
'openpgp-tool.1.xml', | ||
'opensc-asn1.1.xml', | ||
'opensc-explorer.1.xml', | ||
'opensc-tool.1.xml', | ||
'pkcs11-register.1.xml', | ||
'pkcs11-tool.1.xml', | ||
'pkcs15-crypt.1.xml', | ||
'pkcs15-tool.1.xml' | ||
] | ||
|
||
if conf.get('ENABLE_OPENSSL') | ||
sources += [ | ||
'cryptoflex-tool.1.xml', | ||
'gids-tool.1.xml', | ||
'netkey-tool.1.xml', | ||
'piv-tool.1.xml', | ||
'pkcs15-init.1.xml', | ||
'sc-hsm-tool.1.xml', | ||
'westcos-tool.1.xml' | ||
] | ||
|
||
if conf.get('ENABLE_OPENPACE') | ||
sources += [ | ||
'npa-tool.1.xml' | ||
] | ||
endif | ||
endif | ||
|
||
if conf.get('ENABLE_NOTIFY') | ||
sources += [ | ||
'opensc-notify.1.xml' | ||
] | ||
endif | ||
|
||
if progxsltproc.found() and stylesheets_path != '' | ||
foreach xml : sources | ||
custom_target( | ||
command: [progxsltproc, | ||
'--nonet', | ||
'--path', meson.project_source_root() / 'doc' + ':' + stylesheets_path / 'manpages', | ||
'--xinclude', | ||
'-o', '@OUTPUT@', | ||
'man.xsl', | ||
'@INPUT@' | ||
], | ||
input: xml, | ||
output: modfs.replace_suffix(xml, ''), | ||
build_by_default: get_option('man'), | ||
install: get_option('man'), | ||
install_dir: get_option('mandir') / 'man1' | ||
) | ||
endforeach | ||
|
||
custom_target( | ||
command: [progxsltproc, | ||
'--nonet', | ||
'--path', meson.project_source_root() / 'doc' + ':' + stylesheets_path / 'html', | ||
'--xinclude', | ||
'-o', '@OUTPUT@', | ||
'html.xsl', | ||
'@INPUT@' | ||
], | ||
input: 'tools.xml', | ||
output: 'tools.html', | ||
depend_files: sources, | ||
build_by_default: get_option('doc'), | ||
install: get_option('doc'), | ||
install_dir: absolute_docdir | ||
) | ||
endif | ||
|
||
if bash_completion_path != '' | ||
foreach xml : sources | ||
custom_target( | ||
command: ['generate_completion.sh', '@INPUT0@', '@INPUT1@', '@OUTPUT@'], | ||
input: ['completion-template', xml], | ||
output: modfs.replace_suffix(modfs.replace_suffix(xml, ''), ''), | ||
build_by_default: get_option('bash_completion'), | ||
install: get_option('bash_completion'), | ||
install_dir: bash_completion_path | ||
) | ||
endforeach | ||
endif | ||
|
||
unset_variable('sources') |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
install_data( | ||
'opensc.conf', | ||
install_dir: get_option('sysconfdir') | ||
) | ||
|
||
if conf.get('ENABLE_OPENPACE') | ||
install_data( | ||
'DESRCACC100001', | ||
'DESCHSMCVCA00001', | ||
install_dir: conf.get_unquoted('CVCDIR') | ||
) | ||
endif | ||
|
||
if get_option('doc') | ||
conf_etc = configuration_data() | ||
conf_etc.set('LIBDIR', absolute_libdir / '') | ||
conf_etc.set('DEFAULT_PCSC_PROVIDER', conf.get_unquoted('DEFAULT_PCSC_PROVIDER')) | ||
conf_etc.set('DEFAULT_SM_MODULE', conf.get_unquoted('DEFAULT_SM_MODULE')) | ||
conf_etc.set('DEFAULT_SM_MODULE_PATH', conf.get_unquoted('DEFAULT_SM_MODULE_PATH')) | ||
conf_etc.set('DYN_LIB_EXT', '.' + extension_of_libraries) | ||
conf_etc.set('LIB_PRE', prefix_of_libraries) | ||
|
||
if host_machine.system() == 'windows' or host_machine.system() == 'cygwin' | ||
conf_etc.set('DEBUG_FILE', '%TEMP%\\opensc-debug.log') | ||
conf_etc.set('PROFILE_DIR_DEFAULT', 'obtained from windows registers') | ||
conf_etc.set('PROFILE_DIR', '') | ||
else | ||
conf_etc.set('DEBUG_FILE', '/tmp/opensc-debug.log') | ||
conf_etc.set('PROFILE_DIR_DEFAULT', absolute_pkgdir) | ||
conf_etc.set('PROFILE_DIR', absolute_pkgdir) | ||
endif | ||
|
||
configure_file( | ||
configuration: conf_etc, | ||
input: 'opensc.conf.example.in', | ||
output: 'opensc.conf', | ||
install: true, | ||
install_dir: absolute_docdir | ||
) | ||
endif |
Oops, something went wrong.