Phase 9: Add native processors and reproducible Linux release tooling
This commit is contained in:
parent
7db5fb7738
commit
de403b37d7
43 changed files with 1656 additions and 19 deletions
16
tools/pkgconfig.py
Normal file
16
tools/pkgconfig.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Generate pkg-config metadata without shell/sed interpolation of paths."""
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
from dist import version
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('--prefix', required=True)
|
||||
parser.add_argument('--jack', default='')
|
||||
parser.add_argument('--output', type=Path, required=True)
|
||||
args = parser.parse_args()
|
||||
if not args.prefix.startswith('/') or any(c in args.prefix for c in '\n\r\0"$\\'):
|
||||
parser.error('PREFIX must be absolute, without newlines, quotes, $, or backslashes')
|
||||
text = Path('packaging/xtc.pc.in').read_text().replace('@PREFIX@', args.prefix)
|
||||
text = text.replace('@VERSION@', version(Path.cwd())).replace('@JACK@', args.jack)
|
||||
args.output.parent.mkdir(parents=True, exist_ok=True)
|
||||
args.output.write_text(text)
|
||||
Loading…
Add table
Add a link
Reference in a new issue