diff options
author | Arsen Arsenović <arsen@aarsen.me> | 2022-06-24 10:19:20 +0200 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-07-12 07:33:20 +0100 |
commit | 063fcaeaa05074a9d90acec2f68b25dfb8ecd279 (patch) | |
tree | 0e8963a74ae52de9b034f1f255f6873868d94f63 /man | |
parent | seccomp: allow madvise() call (glibc 2.35+) (diff) | |
download | pax-utils-063fcaeaa05074a9d90acec2f68b25dfb8ecd279.tar.gz pax-utils-063fcaeaa05074a9d90acec2f68b25dfb8ecd279.tar.bz2 pax-utils-063fcaeaa05074a9d90acec2f68b25dfb8ecd279.zip |
Convert build system to meson
Some notes about the new build systems:
- I don't fully understand the testing system, but I think I understood
it well enough to implement an equivalent one.
- use_seccomp could be replaced by detecting seccomp support at runtime
(without support, Linux returns -EINVAL in include/linux/seccomp.h)
- The fuzzing test is broken and seems to have been for a while (see
commit 67f3ba64c91b5e1ac9fbbd0bc039fb8ca653cae1, it fails to fuzz on
my machine)
- make-tarball.sh has been replaced with meson dist - hopefully this
works. meson dist should also call seccomp-bpf.c to update
seccomp-bpf.h
Signed-off-by: Arsen Arsenović <arsen@aarsen.me>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'man')
-rw-r--r-- | man/Makefile | 13 | ||||
-rw-r--r-- | man/custom.xsl | 3 | ||||
-rw-r--r-- | man/fragment/date | 0 | ||||
-rw-r--r-- | man/fragment/version | 1 | ||||
-rw-r--r-- | man/meson.build | 37 | ||||
-rw-r--r-- | man/pax-utils.docbook.in (renamed from man/pax-utils.docbook) | 15 |
6 files changed, 44 insertions, 25 deletions
diff --git a/man/Makefile b/man/Makefile deleted file mode 100644 index 6f1f185..0000000 --- a/man/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -all: man - -XMLTO_FLAGS_man = -x custom.xsl --skip-validation -man pdf txt xhtml xhtml-nochunks: - @xmlto $@ $(XMLTO_FLAGS_$@) pax-utils.docbook || echo "If this failed, you probably need to emerge ~app-text/docbook-xml-dtd-4.4 app-text/xmlto dev-tex/xmltex" - @# scanelf.1 has funky indented lists ... hack it back - @sed -i.tmp 's:^[.]TP 4:.TP 2:' scanelf.1 - @rm scanelf.1.tmp -clean distclean: - rm -f *.1 *.html - -.PHONY: all clean distclean \ - man pdf txt xhtml xhtml-nochunks diff --git a/man/custom.xsl b/man/custom.xsl index bf01b14..c1ab12d 100644 --- a/man/custom.xsl +++ b/man/custom.xsl @@ -12,8 +12,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:text>.sp -1 </xsl:text> <xsl:text>.TP</xsl:text> <xsl:if test="not($list-indent = '')"> - <xsl:text> </xsl:text> - <xsl:value-of select="$list-indent"/> + <xsl:text> 2</xsl:text> </xsl:if> <xsl:text> </xsl:text> </xsl:if> diff --git a/man/fragment/date b/man/fragment/date deleted file mode 100644 index e69de29..0000000 --- a/man/fragment/date +++ /dev/null diff --git a/man/fragment/version b/man/fragment/version deleted file mode 100644 index 69ba922..0000000 --- a/man/fragment/version +++ /dev/null @@ -1 +0,0 @@ -<releaseinfo>git</releaseinfo> diff --git a/man/meson.build b/man/meson.build new file mode 100644 index 0000000..fc8d183 --- /dev/null +++ b/man/meson.build @@ -0,0 +1,37 @@ +xmlto = find_program('xmlto', required : get_option('build_manpages')) + +if not xmlto.found() + subdir_done() +endif + +docbook_conf = configuration_data() +docbook_conf.set('version', meson.project_version()) +docbook_conf.set('man_dir', meson.current_source_dir()) + +book = configure_file( + input : 'pax-utils.docbook.in', + output : 'pax-utils.docbook', + configuration : docbook_conf +) + +pages = [ + 'dumpelf.docbook', 'pspax.docbook', 'scanelf.docbook', 'scanmacho.docbook' +] + +out_pages = [] +foreach page : pages + out_pages += page.replace('.docbook', '.1') +endforeach + +custom_target('docbook_to_man', + command : [ + xmlto, 'man', '-x', files('custom.xsl'), '--skip-validation', book, + '-o', meson.current_build_dir() + ], + input : [ + 'pax-utils.docbook.in', 'custom.xsl', 'fragment/reftail', + ] + pages, + output : out_pages, + install : true, + install_dir : get_option('mandir') / 'man1' +) diff --git a/man/pax-utils.docbook b/man/pax-utils.docbook.in index 79e6c12..a8fd7df 100644 --- a/man/pax-utils.docbook +++ b/man/pax-utils.docbook.in @@ -2,16 +2,14 @@ <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ - <!ENTITY date SYSTEM "fragment/date"> - <!ENTITY version SYSTEM "fragment/version"> - <!ENTITY reftail SYSTEM "fragment/reftail"> + <!ENTITY reftail SYSTEM "@man_dir@/fragment/reftail"> <!ENTITY project "pax-utils"> - <!ENTITY dumpelf SYSTEM "dumpelf.docbook"> - <!ENTITY pspax SYSTEM "pspax.docbook"> - <!ENTITY scanelf SYSTEM "scanelf.docbook"> - <!ENTITY scanmacho SYSTEM "scanmacho.docbook"> + <!ENTITY dumpelf SYSTEM "@man_dir@/dumpelf.docbook"> + <!ENTITY pspax SYSTEM "@man_dir@/pspax.docbook"> + <!ENTITY scanelf SYSTEM "@man_dir@/scanelf.docbook"> + <!ENTITY scanmacho SYSTEM "@man_dir@/scanmacho.docbook"> ]> <book id="pax-utils" lang="en"> @@ -40,8 +38,7 @@ </author> </authorgroup> - &version; - &date; + <releaseinfo>@version@</releaseinfo> </bookinfo> &dumpelf; |