From a772557a5ad6b3ad1eec8f2c9d4bccbb7318b923 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Wed, 30 Mar 2022 09:57:47 +0200 Subject: [PATCH] gobject-introspectio: updated to meson build --- gobject-introspection/.footprint | 87 ++++ gobject-introspection/.signature | 7 +- gobject-introspection/Pkgfile | 27 +- ...ject-introspection-1.70.0-meson-0.61.patch | 383 ++++++++++++++++++ 4 files changed, 493 insertions(+), 11 deletions(-) create mode 100644 gobject-introspection/gobject-introspection-1.70.0-meson-0.61.patch diff --git a/gobject-introspection/.footprint b/gobject-introspection/.footprint index 3b5fba2..853f68e 100644 --- a/gobject-introspection/.footprint +++ b/gobject-introspection/.footprint @@ -52,6 +52,91 @@ drwxr-xr-x root/root usr/lib/girepository-1.0/ drwxr-xr-x root/root usr/lib/gobject-introspection/ drwxr-xr-x root/root usr/lib/gobject-introspection/giscanner/ -rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__init__.py +drwxr-xr-x root/root usr/lib/gobject-introspection/giscanner/__pycache__/ +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/__init__.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/__init__.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/__init__.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/_version.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/_version.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/_version.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/annotationmain.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/annotationmain.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/annotationmain.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/annotationparser.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/annotationparser.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/annotationparser.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/ast.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/ast.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/ast.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/cachestore.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/cachestore.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/cachestore.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/ccompiler.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/ccompiler.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/ccompiler.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/codegen.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/codegen.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/codegen.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/docmain.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/docmain.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/docmain.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/docwriter.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/docwriter.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/docwriter.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/dumper.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/dumper.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/dumper.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/gdumpparser.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/gdumpparser.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/gdumpparser.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/girparser.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/girparser.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/girparser.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/girwriter.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/girwriter.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/girwriter.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/introspectablepass.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/introspectablepass.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/introspectablepass.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/maintransformer.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/maintransformer.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/maintransformer.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/mdextensions.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/mdextensions.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/mdextensions.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/message.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/message.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/message.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/msvccompiler.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/msvccompiler.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/msvccompiler.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/pkgconfig.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/pkgconfig.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/pkgconfig.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/scannermain.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/scannermain.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/scannermain.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/sectionparser.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/sectionparser.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/sectionparser.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/shlibs.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/shlibs.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/shlibs.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/sourcescanner.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/sourcescanner.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/sourcescanner.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/testcodegen.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/testcodegen.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/testcodegen.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/transformer.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/transformer.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/transformer.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/utils.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/utils.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/utils.cpython-39.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/xmlwriter.cpython-39.opt-1.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/xmlwriter.cpython-39.opt-2.pyc +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/__pycache__/xmlwriter.cpython-39.pyc -rwxr-xr-x root/root usr/lib/gobject-introspection/giscanner/_giscanner.cpython-39-arm-linux-gnueabihf.so -rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/_version.py -rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/annotationmain.py @@ -81,6 +166,7 @@ drwxr-xr-x root/root usr/lib/gobject-introspection/giscanner/doctemplates/devdoc -rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/doctemplates/devdocs/Gjs/interface.tmpl -rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/doctemplates/devdocs/Gjs/method.tmpl -rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/doctemplates/devdocs/Gjs/namespace.tmpl +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/doctemplates/devdocs/meson.build drwxr-xr-x root/root usr/lib/gobject-introspection/giscanner/doctemplates/mallard/ drwxr-xr-x root/root usr/lib/gobject-introspection/giscanner/doctemplates/mallard/C/ -rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/doctemplates/mallard/C/callback.tmpl @@ -129,6 +215,7 @@ drwxr-xr-x root/root usr/lib/gobject-introspection/giscanner/doctemplates/mallar -rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/doctemplates/mallard/Python/vfunc.tmpl -rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/doctemplates/mallard/base.tmpl -rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/doctemplates/mallard/class.tmpl +-rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/doctemplates/mallard/meson.build -rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/doctemplates/mallard/namespace.tmpl -rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/docwriter.py -rw-r--r-- root/root usr/lib/gobject-introspection/giscanner/dumper.py diff --git a/gobject-introspection/.signature b/gobject-introspection/.signature index 875978d..948aae4 100644 --- a/gobject-introspection/.signature +++ b/gobject-introspection/.signature @@ -1,5 +1,6 @@ untrusted comment: verify with /etc/ports/opt-arm.pub -RWQh9Dk2FlLauFH1Z06lj47klZbJBFSEbTrwa21Eu9Y89TnVjfbqkRLABrtvy1UfF9J1W1n/vPJgkDmdVS1N+ksVF/qC584UugA= -SHA256 (Pkgfile) = 5258df3bd3b79623422efbe4448c768144c246387f4ad45e399577fc42b525cc -SHA256 (.footprint) = 4318a7d825f454a92c566e2d4c2fb4532dcdd3fca3d65446e30fbb4a2571956c +RWQh9Dk2FlLauEyrKZcuEVTRmSjjbJEBOjO0DI+F34jpEFUL7BS6iMft9vk5br3ouO6duGI3xMCT7hxNBgtl1aUSUDSnOxwivAw= +SHA256 (Pkgfile) = 2b6175846ee782f07fde4b34a4c4f8f1e661de35cfdb9f565b6864acad528a25 +SHA256 (.footprint) = e59e243108eb62a915f0817e31e1901efd709279a54095bff0673544298e64da SHA256 (gobject-introspection-1.70.0.tar.xz) = 902b4906e3102d17aa2fcb6dad1c19971c70f2a82a159ddc4a94df73a3cafc4a +SHA256 (gobject-introspection-1.70.0-meson-0.61.patch) = fa02cbdf0472025e50ab607762db1558c0ecc82ee6eccbdc4c183bbc670215b1 diff --git a/gobject-introspection/Pkgfile b/gobject-introspection/Pkgfile index 0812f52..e123bc0 100644 --- a/gobject-introspection/Pkgfile +++ b/gobject-introspection/Pkgfile @@ -2,21 +2,32 @@ # URL: https://live.gnome.org/GObjectIntrospection # Maintainer: Danny Rawlins, crux at romster dot me # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu -# Depends on: glib +# Depends on: glib libffi +# Optional: cairo python3-mako python3-markdown name=gobject-introspection version=1.70.0 -release=1 -source=(https://ftp.gnome.org/pub/GNOME/sources/$name/${version::4}/$name-$version.tar.xz) +release=2 +source=(https://ftp.gnome.org/pub/GNOME/sources/$name/${version::4}/$name-$version.tar.xz + gobject-introspection-1.70.0-meson-0.61.patch) build() { - cd $name-$version + prt-get isinst cairo || PKGMK_GOBJECTINTROSPECTION+=' -D cairo=disabled' + prt-get isinst python3-mako python3-markdown || PKGMK_GOBJECTINTROSPECTION+=' -D doctool=disabled' - meson build \ + patch -d $name-$version -p1 -i $SRC/gobject-introspection-1.70.0-meson-0.61.patch + + meson build $name-$version $PKGMK_GOBJECTINTROSPECTION \ --prefix /usr \ - -D cairo=disabled \ - -D doctool=disabled + --buildtype plain \ + --wrap-mode nodownload \ + -D b_lto=true \ + -D b_pie=true ninja -C build -j ${JOBS:-1} - DESTDIR="$PKG" ninja -C build install + DESTDIR=$PKG meson install -C build + + /usr/bin/python3 -m compileall -d /usr/lib/$name $PKG + /usr/bin/python3 -O -m compileall -d /usr/lib/$name $PKG + /usr/bin/python3 -OO -m compileall -d /usr/lib/$name $PKG } diff --git a/gobject-introspection/gobject-introspection-1.70.0-meson-0.61.patch b/gobject-introspection/gobject-introspection-1.70.0-meson-0.61.patch new file mode 100644 index 0000000..75b1bce --- /dev/null +++ b/gobject-introspection/gobject-introspection-1.70.0-meson-0.61.patch @@ -0,0 +1,383 @@ +https://gitlab.gnome.org/GNOME/gobject-introspection/-/commit/827494d6415b696a98fa195cbd883b50cc893bfc.patch +https://gitlab.gnome.org/GNOME/gobject-introspection/-/commit/effb1e09dee263cdac4ec593e8caf316e6f01fe2.patch +https://gitlab.gnome.org/GNOME/gobject-introspection/-/commit/7c1178069f1c58a05ec56a94ca6ba124215a947b.patch + +From 827494d6415b696a98fa195cbd883b50cc893bfc Mon Sep 17 00:00:00 2001 +From: Emmanuele Bassi +Date: Tue, 11 Jan 2022 15:47:50 +0000 +Subject: [PATCH] doctool: Add templates_dir CLI argument + +We can find the templates directory using the module file once +installed, but when running uninstalled we need to have a way to specify +where the templates can be found in the sources directory. +--- + giscanner/docmain.py | 4 +++- + giscanner/docwriter.py | 14 ++++++++------ + 2 files changed, 11 insertions(+), 7 deletions(-) + +diff --git a/giscanner/docmain.py b/giscanner/docmain.py +index dab063ef..88430f05 100644 +--- a/giscanner/docmain.py ++++ b/giscanner/docmain.py +@@ -51,6 +51,8 @@ def doc_main(args): + parser.add_argument("-s", "--write-sections-file", + action="store_const", dest="format", const="sections", + help="Backwards-compatible equivalent to -f sections") ++ parser.add_argument("--templates-dir", ++ action="store") + + args = parser.parse_args(args[1:]) + if not args.output: +@@ -74,7 +76,7 @@ def doc_main(args): + with open(args.output, 'w', encoding='utf-8') as fp: + write_sections_file(fp, sections_file) + else: +- writer = DocWriter(transformer, args.language, args.format) ++ writer = DocWriter(transformer, args.language, args.format, args.templates_dir) + writer.write(args.output) + + return 0 +diff --git a/giscanner/docwriter.py b/giscanner/docwriter.py +index d0cd610f..b72ab2ac 100644 +--- a/giscanner/docwriter.py ++++ b/giscanner/docwriter.py +@@ -1288,7 +1288,7 @@ LANGUAGES = { + + + class DocWriter(object): +- def __init__(self, transformer, language, output_format): ++ def __init__(self, transformer, language, output_format, templates_dir=None): + self._transformer = transformer + + try: +@@ -1300,18 +1300,20 @@ class DocWriter(object): + self._formatter = formatter_class(self._transformer) + self._language = self._formatter.language + self._output_format = output_format ++ self._templates_dir = templates_dir + + self._lookup = self._get_template_lookup() + + def _get_template_lookup(self): +- if 'UNINSTALLED_INTROSPECTION_SRCDIR' in os.environ: ++ if self._templates_dir is not None: ++ srcdir = self._templates_dir ++ elif 'UNINSTALLED_INTROSPECTION_SRCDIR' in os.environ: + top_srcdir = os.environ['UNINSTALLED_INTROSPECTION_SRCDIR'] +- srcdir = os.path.join(top_srcdir, 'giscanner') ++ srcdir = os.path.join(top_srcdir, 'giscanner', 'doctemplates') + else: +- srcdir = os.path.dirname(__file__) ++ srcdir = os.path.join(os.path.dirname(__file__), 'doctemplates') + +- template_dir = os.path.join(srcdir, 'doctemplates', +- self._formatter.output_format) ++ template_dir = os.path.join(srcdir, self._formatter.output_format) + + return TemplateLookup(directories=[template_dir], + module_directory=tempfile.mkdtemp(), +-- +GitLab + +From effb1e09dee263cdac4ec593e8caf316e6f01fe2 Mon Sep 17 00:00:00 2001 +From: Emmanuele Bassi +Date: Tue, 11 Jan 2022 15:51:10 +0000 +Subject: [PATCH] build: Avoid the doctemplates hack +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The hack that copies the doctemplates directory into the build +directory has stopped working with newer versions of Meson; while it's +possible to copy files, custom_target() cannot depend on a directory. +Additionally, the dependency has always been broken. + +Instead, we enumerate the template files—after all, it's not like they +change a lot—and then we list them as dependencies for the test targets. + +Fixes: #414 +--- + giscanner/doctemplates/devdocs/meson.build | 19 +++++++ + giscanner/doctemplates/mallard/meson.build | 63 ++++++++++++++++++++++ + giscanner/meson.build | 14 ++--- + tests/scanner/meson.build | 24 +++++---- + 4 files changed, 98 insertions(+), 22 deletions(-) + create mode 100644 giscanner/doctemplates/devdocs/meson.build + create mode 100644 giscanner/doctemplates/mallard/meson.build + +diff --git a/giscanner/doctemplates/devdocs/meson.build b/giscanner/doctemplates/devdocs/meson.build +new file mode 100644 +index 00000000..2037182a +--- /dev/null ++++ b/giscanner/doctemplates/devdocs/meson.build +@@ -0,0 +1,19 @@ ++doc_templates += files([ ++ 'Gjs/_doc.tmpl', ++ 'Gjs/_index.tmpl', ++ 'Gjs/_method.tmpl', ++ 'Gjs/_methods.tmpl', ++ 'Gjs/_properties.tmpl', ++ 'Gjs/_signals.tmpl', ++ 'Gjs/_staticmethods.tmpl', ++ 'Gjs/_vfuncs.tmpl', ++ 'Gjs/base.tmpl', ++ 'Gjs/callback.tmpl', ++ 'Gjs/class.tmpl', ++ 'Gjs/default.tmpl', ++ 'Gjs/enum.tmpl', ++ 'Gjs/function.tmpl', ++ 'Gjs/interface.tmpl', ++ 'Gjs/method.tmpl', ++ 'Gjs/namespace.tmpl', ++]) +diff --git a/giscanner/doctemplates/mallard/meson.build b/giscanner/doctemplates/mallard/meson.build +new file mode 100644 +index 00000000..5fe4e2af +--- /dev/null ++++ b/giscanner/doctemplates/mallard/meson.build +@@ -0,0 +1,63 @@ ++base_templates = files([ ++ 'base.tmpl', ++ 'class.tmpl', ++ 'namespace.tmpl', ++]) ++ ++c_templates = files([ ++ 'C/callback.tmpl', ++ 'C/class.tmpl', ++ 'C/constructor.tmpl', ++ 'C/default.tmpl', ++ 'C/enum.tmpl', ++ 'C/field.tmpl', ++ 'C/function.tmpl', ++ 'C/interface.tmpl', ++ 'C/method.tmpl', ++ 'C/namespace.tmpl', ++ 'C/property.tmpl', ++ 'C/record.tmpl', ++ 'C/signal.tmpl', ++ 'C/vfunc.tmpl', ++]) ++ ++gjs_templates = files([ ++ 'Gjs/callback.tmpl', ++ 'Gjs/class.tmpl', ++ 'Gjs/constructor.tmpl', ++ 'Gjs/default.tmpl', ++ 'Gjs/enum.tmpl', ++ 'Gjs/field.tmpl', ++ 'Gjs/function.tmpl', ++ 'Gjs/interface.tmpl', ++ 'Gjs/method.tmpl', ++ 'Gjs/namespace.tmpl', ++ 'Gjs/property.tmpl', ++ 'Gjs/record.tmpl', ++ 'Gjs/signal.tmpl', ++ 'Gjs/vfunc.tmpl', ++]) ++ ++py_templates = files([ ++ 'Python/callback.tmpl', ++ 'Python/class.tmpl', ++ 'Python/constructor.tmpl', ++ 'Python/default.tmpl', ++ 'Python/enum.tmpl', ++ 'Python/field.tmpl', ++ 'Python/function.tmpl', ++ 'Python/interface.tmpl', ++ 'Python/method.tmpl', ++ 'Python/namespace.tmpl', ++ 'Python/property.tmpl', ++ 'Python/record.tmpl', ++ 'Python/signal.tmpl', ++ 'Python/vfunc.tmpl', ++]) ++ ++doc_templates += [ ++ base_templates, ++ c_templates, ++ gjs_templates, ++ py_templates, ++] +diff --git a/giscanner/meson.build b/giscanner/meson.build +index 41edcd44..3d7dc678 100644 +--- a/giscanner/meson.build ++++ b/giscanner/meson.build +@@ -53,17 +53,9 @@ configure_file(input : '../girepository/gdump.c', + + install_subdir('doctemplates', install_dir: giscannerdir) + +-# XXX: this doesn't track the input, but there is nothing to copy many files +-# in meson. +-doc_templates = custom_target('copy-templates', +- input : 'doctemplates', +- output : 'doctemplates', +- command : [ +- python, '-c', +- 'import sys, shutil;' + +- 'shutil.rmtree(sys.argv[2], ignore_errors=True);' + +- 'shutil.copytree(sys.argv[1], sys.argv[2])', +- '@INPUT@', '@OUTPUT@']) ++doc_templates = [] ++subdir('doctemplates/devdocs') ++subdir('doctemplates/mallard') + + flex = find_program('flex', 'win_flex') + bison = find_program('bison', 'win_bison') +diff --git a/tests/scanner/meson.build b/tests/scanner/meson.build +index 5176b957..b81b3fd5 100644 +--- a/tests/scanner/meson.build ++++ b/tests/scanner/meson.build +@@ -525,19 +525,26 @@ foreach gir : test_girs + endforeach + + if has_girdoctool and glib_dep.type_name() == 'pkgconfig' ++ doctool_env = environment() ++ doctool_env.set('srcdir', meson.current_source_dir()) ++ doctool_env.set('builddir', meson.current_build_dir()) ++ + foreach language : ['C', 'Python', 'Gjs'] + regress_docs = custom_target( + 'generate-docs-' + language, + input: regress_gir, +- depends: [doc_templates], ++ depend_files: doc_templates, + build_by_default: not cairo_deps_found, ++ env: doctool_env, + output: 'Regress-1.0-' + language, + command: [ + python, girdoctool, + '--add-include-path=' + join_paths(build_root, 'gir'), + '--add-include-path=' + meson.current_build_dir(), + '--language', language, +- '@INPUT@', '-o', '@OUTPUT@'], ++ '--templates-dir=' + join_paths(meson.current_source_dir(), '../../giscanner/doctemplates'), ++ '@INPUT@', '-o', '@OUTPUT@', ++ ], + ) + + if cairo_deps_found +@@ -546,10 +553,7 @@ if has_girdoctool and glib_dep.type_name() == 'pkgconfig' + python, + args: [gi_tester, 'Regress-1.0-' + language], + depends: [regress_docs], +- env: [ +- 'srcdir=' + meson.current_source_dir(), +- 'builddir=' + meson.current_build_dir(), +- ], ++ env: doctool_env, + ) + endif + endforeach +@@ -557,9 +561,10 @@ if has_girdoctool and glib_dep.type_name() == 'pkgconfig' + regress_sections = custom_target( + 'generate-docs-sections', + input: regress_gir, +- depends: [doc_templates], ++ depend_files: [doc_templates], + build_by_default: not cairo_deps_found, + output: 'Regress-1.0-sections.txt', ++ env: doctool_env, + command: [ + python, girdoctool, + '--add-include-path=' + join_paths(build_root, 'gir'), +@@ -574,10 +579,7 @@ if has_girdoctool and glib_dep.type_name() == 'pkgconfig' + python, + args: [gi_tester, 'Regress-1.0-sections.txt'], + depends: [regress_sections], +- env: [ +- 'srcdir=' + meson.current_source_dir(), +- 'builddir=' + meson.current_build_dir(), +- ], ++ env: doctool_env, + ) + endif + endif +-- +GitLab + +From 7c1178069f1c58a05ec56a94ca6ba124215a947b Mon Sep 17 00:00:00 2001 +From: Emmanuele Bassi +Date: Tue, 11 Jan 2022 15:57:37 +0000 +Subject: [PATCH] build: Do not use deprecated API + +--- + gir/meson.build | 18 +++++++++--------- + tests/meson.build | 4 ++-- + 2 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/gir/meson.build b/gir/meson.build +index 5d646335..93b7e77d 100644 +--- a/gir/meson.build ++++ b/gir/meson.build +@@ -98,8 +98,8 @@ glib_command = scanner_command + [ + + if dep_type == 'pkgconfig' + glib_command += ['--external-library', '--pkg=glib-2.0'] +- glib_libdir = get_option('gi_cross_pkgconfig_sysroot_path') + glib_dep.get_pkgconfig_variable('libdir') +- glib_incdir = get_option('gi_cross_pkgconfig_sysroot_path') + join_paths(glib_dep.get_pkgconfig_variable('includedir'), 'glib-2.0') ++ glib_libdir = get_option('gi_cross_pkgconfig_sysroot_path') + glib_dep.get_variable(pkgconfig: 'libdir') ++ glib_incdir = get_option('gi_cross_pkgconfig_sysroot_path') + join_paths(glib_dep.get_variable(pkgconfig: 'includedir'), 'glib-2.0') + glib_libincdir = join_paths(glib_libdir, 'glib-2.0', 'include') + glib_files += join_paths(glib_incdir, 'gobject', 'glib-types.h') + glib_files += join_paths(glib_libincdir, 'glibconfig.h') +@@ -133,8 +133,8 @@ elif dep_type == 'internal' + # We know exactly what headers will be installed, so just fetch that + glib_subproject = subproject('glib') + +- glibproj_sourcedir = join_paths(meson.source_root(), subprojdir, 'glib') +- glibproj_builddir = join_paths(meson.build_root(), subprojdir, 'glib') ++ glibproj_sourcedir = join_paths(meson.project_source_root(), subprojdir, 'glib') ++ glibproj_builddir = join_paths(meson.project_build_root(), subprojdir, 'glib') + + glib_files += join_paths(glibproj_sourcedir, 'gobject', 'glib-types.h') + +@@ -184,13 +184,13 @@ elif dep_type == 'internal' + # XXX: We need include paths to all glib dependencies too. We assume that the + # dependencies are only libffi and proxy-libintl, and that they are used as + # subprojects. In the worst case we add paths to non-existent directories. +- ffi_incdir = join_paths(meson.build_root(), subprojdir, 'libffi', 'include') ++ ffi_incdir = join_paths(meson.project_build_root(), subprojdir, 'libffi', 'include') + glib_includes += ['-I' + ffi_incdir] +- intl_incdir = join_paths(meson.source_root(), subprojdir, 'proxy-libintl') ++ intl_incdir = join_paths(meson.project_source_root(), subprojdir, 'proxy-libintl') + glib_includes += ['-I' + intl_incdir] + +- ffi_libdir = join_paths(meson.build_root(), subprojdir, 'libffi', 'src') +- intl_libdir = join_paths(meson.build_root(), subprojdir, 'proxy-libintl') ++ ffi_libdir = join_paths(meson.project_build_root(), subprojdir, 'libffi', 'src') ++ intl_libdir = join_paths(meson.project_build_root(), subprojdir, 'proxy-libintl') + glib_libpaths = [ + '-L' + ffi_libdir, + '-L' + intl_libdir, +@@ -412,7 +412,7 @@ if giounix_dep.found() + dep_type = giounix_dep.type_name() + if dep_type == 'pkgconfig' + gio_command += ['--pkg=gio-unix-2.0'] +- giounix_includedir = get_option('gi_cross_pkgconfig_sysroot_path') + join_paths(giounix_dep.get_pkgconfig_variable('includedir'), 'gio-unix-2.0') ++ giounix_includedir = get_option('gi_cross_pkgconfig_sysroot_path') + join_paths(giounix_dep.get_variable(pkgconfig: 'includedir'), 'gio-unix-2.0') + # Get the installed gio-unix header list + ret = run_command(python, '-c', globber.format(join_paths(giounix_includedir, 'gio', '*.h'))) + if ret.returncode() != 0 +diff --git a/tests/meson.build b/tests/meson.build +index 48981c60..abb51f58 100644 +--- a/tests/meson.build ++++ b/tests/meson.build +@@ -1,4 +1,4 @@ +-sub_build_root = join_paths(meson.build_root(), 'subprojects') ++sub_build_root = join_paths(meson.project_build_root(), 'subprojects') + test_env_common_path = [] + if glib_dep.type_name() == 'internal' and host_system == 'windows' + test_env_common_path += [ +@@ -13,7 +13,7 @@ endif + if libffi_dep.type_name() == 'internal' and host_system == 'windows' + test_env_common_path += [join_paths(sub_build_root, 'libffi', 'src')] + endif +-test_env_common_pypath = [meson.build_root()] ++test_env_common_pypath = [meson.project_build_root()] + + + test_regress_sources = files('scanner/regress.c') +-- +GitLab + -- 2.26.2