fontconfig: Branch 'main' - 5 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Nov 12 07:34:41 UTC 2024
build-aux/meson-dist-autotools.py | 26 ++++++++++++++++++++++++++
build-aux/meson-dist-docs.py | 29 +++++++++++++++++++++++++++++
conf.d/meson.build | 16 ++++++++++------
doc/Makefile.am | 17 +++--------------
doc/meson.build | 33 ++++++++++++++++++++++-----------
fc-cache/meson.build | 5 +++--
fc-cat/meson.build | 2 +-
fc-conflist/meson.build | 2 +-
fc-list/meson.build | 2 +-
fc-match/meson.build | 2 +-
fc-pattern/meson.build | 2 +-
fc-query/meson.build | 2 +-
fc-scan/meson.build | 2 +-
fc-validate/meson.build | 2 +-
its/meson.build | 4 +++-
meson.build | 12 +++++++++---
16 files changed, 113 insertions(+), 45 deletions(-)
New commits:
commit f91873afd3f736efbfd3f602fdc9643b935b92bc
Merge: c0c4308 483b7a3
Author: Akira TAGOH <akira at tagoh.org>
Date: Tue Nov 12 07:34:36 2024 +0000
Merge branch 'fix-dist' into 'main'
meson: Make compatible to make dist
See merge request fontconfig/fontconfig!340
commit 483b7a3a69caf7fd9b29a326265a1c14a8cabc4f
Author: Akira TAGOH <akira at tagoh.org>
Date: Tue Nov 12 16:09:14 2024 +0900
doc: generate fontconfig-devel.html as one big file
diff --git a/doc/Makefile.am b/doc/Makefile.am
index e6ec73a..335f984 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -26,7 +26,6 @@ NULL =
EXTRA_DIST = \
$(BUILT_DOCS) \
$(DOC_FUNCS_FNCS) \
- $(HTML_DIR)/* \
$(SGML_FILES) \
$(check_SCRIPTS) \
confdir.sgml.in \
@@ -130,8 +129,8 @@ TXT_FILES = $(SGML_FILES:.sgml=.txt)
PDF_FILES = $(SGML_FILES:.sgml=.pdf)
HTML_FILES = \
fontconfig-user.html \
+ fontconfig-devel.html \
$(NULL)
-HTML_DIR = fontconfig-devel
#
noinst_PROGRAMS = \
$(NULL)
@@ -158,15 +157,10 @@ doc_DATA = \
$(HTML_FILES) \
$(NULL)
#
-htmldocdir = $(docdir)/$(HTML_DIR)
-htmldoc_DATA = \
- $(NULL)
-
if USEDOCBOOK
BUILT_SOURCES += \
$(LOCAL_SGML_FILES) \
$(NULL)
-htmldoc_DATA += $(HTML_DIR)/*
##
.fncs.sgml:
@@ -202,10 +196,6 @@ $(DOC_FUNCS_SGML): $(DOC_FUNCS_FNCS) $(srcdir)/edit-sgml.py $(srcdir)/func.sgml
$(TXT_FILES): $(DOCS_DEPS)
$(PDF_FILES): $(DOCS_DEPS)
$(HTML_FILES): $(DOCS_DEPS)
-$(HTML_DIR)/*: $(HTML_DIR)
-$(HTML_DIR): local-fontconfig-devel.sgml $(DOCS_DEPS)
- $(AM_V_GEN) $(RM) -r $@; \
- $(DOC2HTML) -V '%use-id-as-filename%' -o $@ local-fontconfig-devel.sgml
local-fontconfig-user.sgml: $(srcdir)/fontconfig-user.sgml
$(AM_V_GEN) $(LN_S) $(srcdir)/fontconfig-user.sgml $@; \
[ ! -f $(builddir)/fontconfig-user.sgml ] && cp -a $(srcdir)/fontconfig-user.sgml $(builddir)/fontconfig-user.sgml || :
@@ -213,14 +203,13 @@ local-fontconfig-devel.sgml: $(srcdir)/fontconfig-devel.sgml
$(AM_V_GEN) $(LN_S) $(srcdir)/fontconfig-devel.sgml $@; \
[ ! -f $(builddir)/fontconfig-devel.sgml ] && cp -a $(srcdir)/fontconfig-devel.sgml $(builddir)/fontconfig-devel.sgml || :
#
-all-local: $(BUILT_DOCS) $(HTML_DIR)/*
+all-local: $(BUILT_DOCS)
clean-local:
- $(RM) -r $(HTML_DIR) devel-man
+ $(RM) -r devel-man
[ "x$(builddir)" != "x$(srcdir)" ] && $(RM) $(builddir)/*.sgml || :
dist-local-check-docs-enabled:
@true
else
-htmldoc_DATA += $(srcdir)/$(HTML_DIR)/*
.fncs.sgml:
$(AM_V_GEN) $(RM) $@; \
touch -r $< $@
commit 84b3e9eb9b0eac8d36b0824f537d6791efd71ce0
Author: Akira TAGOH <akira at tagoh.org>
Date: Tue Nov 12 15:09:47 2024 +0900
meson: Add autotools files into dist
diff --git a/build-aux/meson-dist-autotools.py b/build-aux/meson-dist-autotools.py
new file mode 100755
index 0000000..ec0f4f1
--- /dev/null
+++ b/build-aux/meson-dist-autotools.py
@@ -0,0 +1,26 @@
+#! /usr/bin/env python3
+# Copyright (C) 2024 fontconfig Authors
+# SPDX-License-Identifier: HPND
+
+import os
+import shutil
+import subprocess
+import sys
+from pathlib import Path
+
+sourcedir = os.environ.get('MESON_SOURCE_ROOT')
+builddir = os.environ.get('MESON_BUILD_ROOT')
+distdir = os.environ.get('MESON_DIST_ROOT')
+
+if shutil.which('autoreconf'):
+ print('no autoreconf installed', file=sys.stderr)
+
+subprocess.run(['autoreconf', '-i'], cwd=distdir)
+
+# Copy files for compatibility
+for f in (Path(builddir) / 'doc').glob('*.1'):
+ print(f'Copying {f.name}')
+ shutil.copy2(f, Path(distdir) / f.stem)
+
+# Remove autom4te.cache
+shutil.rmtree(Path(distdir) / 'autom4te.cache')
diff --git a/meson.build b/meson.build
index 098a8ed..0e9e99a 100644
--- a/meson.build
+++ b/meson.build
@@ -536,6 +536,7 @@ install_headers(fc_headers, subdir: meson.project_name())
if not meson.is_subproject()
meson.add_dist_script('build-aux/meson-dist-docs.py')
+ meson.add_dist_script('build-aux/meson-dist-autotools.py')
endif
# Summary
commit bb94f5e8eff2ae6f48f96bd86f90c25339333a6e
Author: Akira TAGOH <akira at tagoh.org>
Date: Tue Oct 29 11:55:32 2024 +0900
meson: Add docs into dist
diff --git a/build-aux/meson-dist-docs.py b/build-aux/meson-dist-docs.py
new file mode 100755
index 0000000..b229d23
--- /dev/null
+++ b/build-aux/meson-dist-docs.py
@@ -0,0 +1,29 @@
+#! /usr/bin/env python3
+# Copyright (C) 2024 fontconfig Authors
+# SPDX-License-Identifier: HPND
+
+import os
+import shutil
+from pathlib import Path
+
+sourcedir = os.environ.get('MESON_SOURCE_ROOT')
+builddir = os.environ.get('MESON_BUILD_ROOT')
+distdir = os.environ.get('MESON_DIST_ROOT')
+
+# Copy manpages
+docdir = Path(distdir) / 'doc'
+for f in (Path(builddir) / 'doc').glob('*.[135]'):
+ print(f'Copying {f.name}')
+ shutil.copy2(f, docdir)
+
+# Copy config file
+confdir = Path(distdir) / 'conf.d'
+shutil.copy2(Path(builddir) / 'conf.d' / '35-lang-normalize.conf', confdir)
+
+# Documentation
+shutil.copy2(Path(builddir) / 'doc' / 'fontconfig-devel.html', docdir)
+shutil.copy2(Path(builddir) / 'doc' / 'fontconfig-devel.pdf', docdir)
+shutil.copy2(Path(builddir) / 'doc' / 'fontconfig-devel.txt', docdir)
+shutil.copy2(Path(builddir) / 'doc' / 'fontconfig-user.html', docdir)
+shutil.copy2(Path(builddir) / 'doc' / 'fontconfig-user.pdf', docdir)
+shutil.copy2(Path(builddir) / 'doc' / 'fontconfig-user.txt', docdir)
diff --git a/meson.build b/meson.build
index ee891d4..098a8ed 100644
--- a/meson.build
+++ b/meson.build
@@ -534,6 +534,10 @@ fc_headers = [
install_headers(fc_headers, subdir: meson.project_name())
+if not meson.is_subproject()
+ meson.add_dist_script('build-aux/meson-dist-docs.py')
+endif
+
# Summary
doc_targets = get_variable('doc_targets', [])
commit f22c3f19ac6e317ed94260b6d7039bfdd65d41a7
Author: Akira TAGOH <akira at tagoh.org>
Date: Tue Oct 29 11:50:46 2024 +0900
meson: Add install_tag for install targets
diff --git a/conf.d/meson.build b/conf.d/meson.build
index b6d07ee..ef9b0cc 100644
--- a/conf.d/meson.build
+++ b/conf.d/meson.build
@@ -70,12 +70,14 @@ conf_links = [
'90-synthetic.conf',
]
-install_data(conf_files, install_dir: fc_templatedir)
+install_data(conf_files,
+ install_dir: fc_templatedir,
+ install_tag: 'runtime')
meson.add_install_script('link_confs.py', fc_templatedir,
- fc_configdir,
- conf_links,
-)
+ fc_configdir,
+ conf_links,
+ install_tag: 'runtime')
# 35-lang-normalize.conf
orths = []
@@ -90,7 +92,8 @@ custom_target('35-lang-normalize.conf',
output: '35-lang-normalize.conf',
command: [find_program('write-35-lang-normalize-conf.py'), ','.join(orths), '@OUTPUT@'],
install_dir: fc_templatedir,
- install: true)
+ install: true,
+ install_tag: 'runtime')
# README
readme_cdata = configuration_data()
@@ -99,4 +102,5 @@ configure_file(output: 'README',
input: 'README.in',
configuration: readme_cdata,
install_dir: fc_configdir,
- install: true)
+ install: true,
+ install_tag: 'runtime')
diff --git a/doc/meson.build b/doc/meson.build
index 290549c..548df12 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -4,10 +4,12 @@ tests = []
if host_machine.system() != 'windows'
tests += [
'check-missing-doc',
- 'check-whitespace-in-args'
+ # 'check-whitespace-in-args'
]
+ meson.add_dist_script(find_program('check-whitespace-in-args.py'), '@SOURCE_ROOT@/doc')
endif
+
docbook2man = find_program('docbook2man', required: get_option('doc-man'))
docbook2txt = find_program('docbook2txt', required: get_option('doc-txt'))
docbook2pdf = find_program('docbook2pdf', required: get_option('doc-pdf'))
@@ -96,7 +98,8 @@ if docbook2man.found()
command: [run_quiet, docbook2man, '@INPUT0@', '--output', '@OUTDIR@'],
build_by_default: true,
install_dir: get_option('mandir') / 'man3',
- install: true)
+ install: true,
+ install_tag: 'docs')
# fonts.conf(5)
custom_target('fonts-conf-5-man-page',
@@ -105,7 +108,8 @@ if docbook2man.found()
command: [run_quiet, docbook2man, '@INPUT0@', '--output', '@OUTDIR@'],
install_dir: get_option('mandir') / 'man5',
build_by_default: true,
- install: true)
+ install: true,
+ install_tag: 'docs')
# Generate man pages for tools
foreach t : tools_man_pages
@@ -115,7 +119,8 @@ if docbook2man.found()
output: '@0 at .1'.format(t),
command: [run_quiet, docbook2man, '@INPUT@', '--output', '@OUTDIR@'],
install_dir: get_option('mandir') / 'man1',
- install: true)
+ install: true,
+ install_tag: 'docs')
endforeach
endif
@@ -128,15 +133,17 @@ if docbook2pdf.found()
command: [run_quiet, docbook2pdf, '@INPUT0@', '--output', '@OUTDIR@'],
build_by_default: true,
install_dir: get_option('datadir') / 'doc' / 'fontconfig',
- install: true)
+ install: true,
+ install_tag: 'docs')
custom_target('user-pdf',
- input: [fontconfig_user_sgml, funcs_sgml],
+ input: [fontconfig_user_sgml, funcs_sgml],
output: 'fontconfig-user.pdf',
command: [run_quiet, docbook2pdf, '@INPUT0@', '--output', '@OUTDIR@'],
build_by_default: true,
install_dir: get_option('datadir') / 'doc' / 'fontconfig',
- install: true)
+ install: true,
+ install_tag: 'docs')
endif
if docbook2txt.found()
@@ -148,7 +155,8 @@ if docbook2txt.found()
command: [run_quiet, docbook2txt, '@INPUT0@', '--output', '@OUTDIR@'],
build_by_default: true,
install_dir: get_option('datadir') / 'doc' / 'fontconfig',
- install: true)
+ install: true,
+ install_tag: 'docs')
custom_target('user-txt',
input: [fontconfig_user_sgml, funcs_sgml],
@@ -156,7 +164,8 @@ if docbook2txt.found()
command: [run_quiet, docbook2txt, '@INPUT0@', '--output', '@OUTDIR@'],
build_by_default: true,
install_dir: get_option('datadir') / 'doc' / 'fontconfig',
- install: true)
+ install: true,
+ install_tag: 'docs')
endif
if docbook2html.found()
@@ -168,7 +177,8 @@ if docbook2html.found()
command: [run_quiet, docbook2html, '--nochunks', '@INPUT0@', '--output', '@OUTDIR@'],
build_by_default: true,
install_dir: get_option('datadir') / 'doc' / 'fontconfig',
- install: true)
+ install: true,
+ install_tag: 'docs')
custom_target('user-html',
input: [fontconfig_user_sgml, funcs_sgml],
@@ -176,7 +186,8 @@ if docbook2html.found()
command: [run_quiet, docbook2html, '--nochunks', '@INPUT0@', '--output', '@OUTDIR@'],
build_by_default: true,
install_dir: get_option('datadir') / 'doc' / 'fontconfig',
- install: true)
+ install: true,
+ install_tag: 'docs')
endif
foreach script : tests
diff --git a/fc-cache/meson.build b/fc-cache/meson.build
index d1ee976..1d66ccf 100644
--- a/fc-cache/meson.build
+++ b/fc-cache/meson.build
@@ -4,12 +4,13 @@ fccache = executable('fc-cache', ['fc-cache.c', fcstdint_h, alias_headers, ft_al
link_with: [libfontconfig],
c_args: c_args,
install: true,
-)
+ install_tag: 'tools')
tools_man_pages += ['fc-cache']
# Do not try to execute target's fc-cache on host when cross compiling
if get_option('cache-build').enabled() and not meson.is_cross_build()
meson.add_install_script(fccache, '-s', '-f', '-v',
- skip_if_destdir: true)
+ skip_if_destdir: true,
+ install_tag: 'tools')
endif
diff --git a/fc-cat/meson.build b/fc-cat/meson.build
index 7e87309..dd7ee29 100644
--- a/fc-cat/meson.build
+++ b/fc-cat/meson.build
@@ -4,6 +4,6 @@ fccat = executable('fc-cat', ['fc-cat.c', fcstdint_h, alias_headers, ft_alias_he
link_with: [libfontconfig],
c_args: c_args,
install: true,
-)
+ install_tag: 'tools')
tools_man_pages += ['fc-cat']
diff --git a/fc-conflist/meson.build b/fc-conflist/meson.build
index 87ff4ac..88208ff 100644
--- a/fc-conflist/meson.build
+++ b/fc-conflist/meson.build
@@ -4,6 +4,6 @@ fcconflist = executable('fc-conflist', ['fc-conflist.c', fcstdint_h, alias_heade
link_with: [libfontconfig],
c_args: c_args,
install: true,
-)
+ install_tag: 'tools')
tools_man_pages += ['fc-conflist']
diff --git a/fc-list/meson.build b/fc-list/meson.build
index e760992..1be9df5 100644
--- a/fc-list/meson.build
+++ b/fc-list/meson.build
@@ -4,6 +4,6 @@ fclist = executable('fc-list', ['fc-list.c', fcstdint_h, alias_headers, ft_alias
link_with: [libfontconfig],
c_args: c_args,
install: true,
-)
+ install_tag: 'tools')
tools_man_pages += ['fc-list']
diff --git a/fc-match/meson.build b/fc-match/meson.build
index 41367c4..1aa1b1b 100644
--- a/fc-match/meson.build
+++ b/fc-match/meson.build
@@ -4,6 +4,6 @@ fcmatch = executable('fc-match', ['fc-match.c', fcstdint_h, alias_headers, ft_al
link_with: [libfontconfig],
c_args: c_args,
install: true,
-)
+ install_tag: 'tools')
tools_man_pages += ['fc-match']
diff --git a/fc-pattern/meson.build b/fc-pattern/meson.build
index a2dac16..d9b048c 100644
--- a/fc-pattern/meson.build
+++ b/fc-pattern/meson.build
@@ -4,6 +4,6 @@ fcpattern = executable('fc-pattern', ['fc-pattern.c', fcstdint_h, alias_headers,
link_with: [libfontconfig],
c_args: c_args,
install: true,
-)
+ install_tag: 'tools')
tools_man_pages += ['fc-pattern']
diff --git a/fc-query/meson.build b/fc-query/meson.build
index 2e6e538..629bc71 100644
--- a/fc-query/meson.build
+++ b/fc-query/meson.build
@@ -4,6 +4,6 @@ fcquery = executable('fc-query', ['fc-query.c', fcstdint_h, alias_headers, ft_al
link_with: [libfontconfig],
c_args: c_args,
install: true,
-)
+ install_tag: 'tools')
tools_man_pages += ['fc-query']
diff --git a/fc-scan/meson.build b/fc-scan/meson.build
index 1f6a9ac..9049578 100644
--- a/fc-scan/meson.build
+++ b/fc-scan/meson.build
@@ -4,6 +4,6 @@ fcscan = executable('fc-scan', ['fc-scan.c', fcstdint_h, alias_headers, ft_alias
link_with: [libfontconfig],
c_args: c_args,
install: true,
-)
+ install_tag: 'tools')
tools_man_pages += ['fc-scan']
diff --git a/fc-validate/meson.build b/fc-validate/meson.build
index bcb8d14..fcabf29 100644
--- a/fc-validate/meson.build
+++ b/fc-validate/meson.build
@@ -4,6 +4,6 @@ fcvalidate = executable('fc-validate', ['fc-validate.c', fcstdint_h, alias_heade
link_with: [libfontconfig],
c_args: c_args,
install: true,
-)
+ install_tag: 'tools')
tools_man_pages += ['fc-validate']
diff --git a/its/meson.build b/its/meson.build
index 4153b1a..cb9f68e 100644
--- a/its/meson.build
+++ b/its/meson.build
@@ -3,4 +3,6 @@ gettext_files = [
'fontconfig.loc',
]
-install_data(gettext_files, install_dir: join_paths(get_option('datadir'), 'gettext/its'))
+install_data(gettext_files,
+ install_dir: join_paths(get_option('datadir'), 'gettext/its'),
+ install_tag: 'devel')
diff --git a/meson.build b/meson.build
index 6a58a93..ee891d4 100644
--- a/meson.build
+++ b/meson.build
@@ -519,11 +519,12 @@ configure_file(output: 'fonts.conf',
input: 'fonts.conf.in',
configuration: fonts_conf,
install_dir: fc_baseconfigdir,
- install: true)
+ install: true,
+ install_tag: 'runtime')
install_data('fonts.dtd',
- install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'xml/fontconfig')
- )
+ install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'xml/fontconfig'),
+ install_tag: 'runtime')
fc_headers = [
'fontconfig/fontconfig.h',
More information about the Fontconfig
mailing list