From 9e7d5f8eecd226a97f4cb6f6d4886b765a68a472 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 07:10:21 +0200 Subject: [PATCH 001/129] Update sqlalchemy from 2.0.19 to 2.0.20 (#1014) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/sqlalchemy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml index f80661a6a..9ea75ef6e 100644 --- a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml +++ b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.0.19 + version: 2.0.20 package: name: sqlalchemy @@ -7,7 +7,7 @@ package: source: url: https://pypi.io/packages/source/S/SQLAlchemy/SQLAlchemy-${{ version }}.tar.gz - sha256: 77a14fa20264af73ddcdb1e2b9c5a829b8cc6b8304d0f093271980e36c200a3f + sha256: ca8a5ff2aa7f3ade6c498aaafce25b1eaeabe4e42b73e25519183e4566a16fc6 build: number: 0 From dca8fa2effd399916467d1d825d2244ed8b4267c Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 09:15:29 +0200 Subject: [PATCH 002/129] Update fmt from 10.1.1 to 10.2.0 (#953) * Update fmt from 10.1.1 to 10.2.0 * drop license suffix --------- Co-authored-by: emscripten-forge-bot Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/fmt/recipe.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/recipes_emscripten/fmt/recipe.yaml b/recipes/recipes_emscripten/fmt/recipe.yaml index ec229b9c5..5035c342f 100644 --- a/recipes/recipes_emscripten/fmt/recipe.yaml +++ b/recipes/recipes_emscripten/fmt/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 10.1.1 + version: 10.2.0 package: name: fmt @@ -7,7 +7,7 @@ package: source: url: https://github.com/fmtlib/fmt/archive/${{ version }}.tar.gz - sha256: 78b8c0a72b1c35e4443a7e308df52498252d1cefc2b08c9a97bc9ee6cfe61f8b + sha256: 3ca91733a7313a8ad41c0885929415f8ec0a2a31d4dc7e27e9331412f4ca26ac build: number: 0 @@ -22,7 +22,7 @@ requirements: about: license: MIT license_family: MIT - license_file: LICENSE.rst + license_file: LICENSE summary: '{fmt} is an open-source formatting library for C++' description: | {fmt} is an open-source formatting library for C++. From 6a0aa3cb19acfd5bbb371fd55eb5dd636e3941d1 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 09:15:41 +0200 Subject: [PATCH 003/129] Update libxml2 from 2.10.0 to 2.11.0 (#957) * Update libxml2 from 2.10.0 to 2.11.0 * drop patch --------- Co-authored-by: emscripten-forge-bot Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/libxml2/recipe.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/recipes/recipes_emscripten/libxml2/recipe.yaml b/recipes/recipes_emscripten/libxml2/recipe.yaml index e3b1af704..373af06c4 100644 --- a/recipes/recipes_emscripten/libxml2/recipe.yaml +++ b/recipes/recipes_emscripten/libxml2/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.10.0 + version: 2.11.0 package: @@ -9,9 +9,8 @@ package: source: url: https://gitlab.gnome.org/GNOME/libxml2/-/archive/v${{ version }}/libxml2-v${{ version }}.tar.gz - sha256: 03365d9d4a6e086c213ed52a917f057838d70d54d080c12390084603c40dbb3d - patches: - - 0004-CVE-2017-8872.patch + sha256: 9e16fb3736865a2f9d227dbc625e65c8dcd69409ccc1ffadd0b30e2b5e7795d2 + build: number: 0 From 0ce601773c269105df1ffb3bbd0275ce3df110ee Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 09:15:55 +0200 Subject: [PATCH 004/129] Update msgpack from 1.0.6 to 1.0.7 (#959) * Update msgpack from 1.0.6 to 1.0.7 * added cython to build deps --------- Co-authored-by: emscripten-forge-bot Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/msgpack/recipe.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/recipes_emscripten/msgpack/recipe.yaml b/recipes/recipes_emscripten/msgpack/recipe.yaml index c1a538f2d..4a6049305 100644 --- a/recipes/recipes_emscripten/msgpack/recipe.yaml +++ b/recipes/recipes_emscripten/msgpack/recipe.yaml @@ -1,12 +1,12 @@ context: - version: 1.0.6 + version: 1.0.7 package: name: msgpack version: ${{ version }} source: -- sha256: 0dc84bbf0a97fb1f9f277de8a97ade38b5323ece5728dcee4ed4410c9df976b1 +- sha256: b78ea07be26c54f9827195f345d92b6df45b3214dea14ed53f3bc2f662006a3b url: https://github.com/msgpack/msgpack-python/archive/refs/tags/v${{ version }}.tar.gz build: @@ -18,6 +18,7 @@ requirements: - cross-python_emscripten-wasm32 - python - pip + - cython host: - python @@ -30,4 +31,4 @@ tests: build: - pytester run: - - pytester-run \ No newline at end of file + - pytester-run From b77980e146b947aceb126e87fa65c52c192b18e8 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 09:19:46 +0200 Subject: [PATCH 005/129] Update scikit-learn from 1.1.1 to 1.1.2 (#975) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/scikit-learn/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/scikit-learn/recipe.yaml b/recipes/recipes_emscripten/scikit-learn/recipe.yaml index 03228bcae..c664aff13 100644 --- a/recipes/recipes_emscripten/scikit-learn/recipe.yaml +++ b/recipes/recipes_emscripten/scikit-learn/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 1.1.1 + version: 1.1.2 package: name: scikit-learn @@ -7,7 +7,7 @@ package: source: url: https://github.com/scikit-learn/scikit-learn/archive/${{ version }}.tar.gz - sha256: 568e621b9e1479b9ab952a9241db5af2ba3ab4f69d44b8aba3dd7648825e8e5a + sha256: 92f3ad28149996caa9fd6ff5f849e7312d9fdedabe73760309a0e8b35b161735 patches: - patches/patch_away_urllib.patch From bdf263ab66ed354ea1fdcafc4c55539ac30ab0f8 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 09:22:14 +0200 Subject: [PATCH 006/129] Update libtiff from 4.4.0 to 4.5.0 (#960) * Update libtiff from 4.4.0 to 4.5.0 * Update recipe.yaml --------- Co-authored-by: emscripten-forge-bot Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/libtiff/recipe.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/recipes_emscripten/libtiff/recipe.yaml b/recipes/recipes_emscripten/libtiff/recipe.yaml index 3788202f9..dcc22fc28 100644 --- a/recipes/recipes_emscripten/libtiff/recipe.yaml +++ b/recipes/recipes_emscripten/libtiff/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 4.4.0 + version: 4.5.0 package: name: libtiff @@ -7,7 +7,7 @@ package: source: url: https://download.osgeo.org/libtiff/tiff-${{ version }}.tar.gz - sha256: 917223b37538959aca3b790d2d73aa6e626b688e02dcda272aec24c2f498abed + sha256: c7a1d9296649233979fa3eacffef3fa024d73d05d589cb622727b5b08c423464 build: number: 0 @@ -53,7 +53,7 @@ requirements: about: license: HPND - license_file: COPYRIGHT + license_file: LICENSE.md summary: Support for the Tag Image File Format (TIFF). description: | This software provides support for the Tag Image File Format (TIFF), a From e77e6c0934322c397a37e8a5cb4fec7362520384 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 09:24:33 +0200 Subject: [PATCH 007/129] Update zarr from 2.11.3 to 2.12.0 (#982) Co-authored-by: emscripten-forge-bot Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/zarr/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/zarr/recipe.yaml b/recipes/recipes_emscripten/zarr/recipe.yaml index 9d97f0948..692cd2802 100644 --- a/recipes/recipes_emscripten/zarr/recipe.yaml +++ b/recipes/recipes_emscripten/zarr/recipe.yaml @@ -1,6 +1,6 @@ context: name: zarr - version: 2.11.3 + version: 2.12.0 package: name: zarr @@ -9,7 +9,7 @@ package: source: - url: https://pypi.io/packages/source/${{ name[0] }}/${{ name }}/${{ name }}-${{ version }}.tar.gz - sha256: 6ee84547aec60fd06fc9356e9194302ebbdb2fd912fd365a0a652ad5c69636f5 + sha256: 515a31ee4bad6bb48ae05178c588ae49a02a35defa01dd9a3293306903368165 patches: - patches/fix-zarrsync.patch From ad6157a12557f0be94d48d77f3c8db2936232f64 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 09:52:35 +0200 Subject: [PATCH 008/129] Update pandas from 2.0.3 to 2.1.0 (#966) * Update pandas from 2.0.3 to 2.1.0 * meson-python * Create emscripten.meson.cross * with meson cross file * use proper build cmd * bigint --------- Co-authored-by: emscripten-forge-bot Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/pandas/build.sh | 10 +++++++++- .../pandas/emscripten.meson.cross | 16 ++++++++++++++++ recipes/recipes_emscripten/pandas/recipe.yaml | 5 +++-- 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 recipes/recipes_emscripten/pandas/emscripten.meson.cross diff --git a/recipes/recipes_emscripten/pandas/build.sh b/recipes/recipes_emscripten/pandas/build.sh index ac9095e12..1424b236e 100644 --- a/recipes/recipes_emscripten/pandas/build.sh +++ b/recipes/recipes_emscripten/pandas/build.sh @@ -1,2 +1,10 @@ #!/bin/bash -${PYTHON} -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv + +export LDFLAGS="$LDFLAGS -sWASM_BIGINT" + + +cp $RECIPE_DIR/emscripten.meson.cross $SRC_DIR +echo "python = '${PYTHON}'" >> $SRC_DIR/emscripten.meson.cross + +${PYTHON} -m pip install . -vvv --no-deps --no-build-isolation \ + -Csetup-args="--cross-file=$SRC_DIR/emscripten.meson.cross" diff --git a/recipes/recipes_emscripten/pandas/emscripten.meson.cross b/recipes/recipes_emscripten/pandas/emscripten.meson.cross new file mode 100644 index 000000000..28bd46155 --- /dev/null +++ b/recipes/recipes_emscripten/pandas/emscripten.meson.cross @@ -0,0 +1,16 @@ +# binaries section is at the end as may want to append python binary. + +[properties] +needs_exe_wrapper = true +skip_sanity_check = true +longdouble_format = 'IEEE_QUAD_LE' # for numpy + +[host_machine] +system = 'emscripten' +cpu_family = 'wasm32' +cpu = 'wasm' +endian = 'little' + +[binaries] +exe_wrapper = 'node' +pkgconfig = 'pkg-config' diff --git a/recipes/recipes_emscripten/pandas/recipe.yaml b/recipes/recipes_emscripten/pandas/recipe.yaml index 5baa980c6..4c18e5421 100644 --- a/recipes/recipes_emscripten/pandas/recipe.yaml +++ b/recipes/recipes_emscripten/pandas/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.0.3 + version: 2.1.0 package: name: pandas @@ -8,7 +8,7 @@ package: source: - url: https://github.com/pandas-dev/pandas/releases/download/v${{ version }}/pandas-${{ version }}.tar.gz - sha256: c02f372a88e0d17f36d3093a644c73cfc1788e876a7c4bcb4020a77512e2043c + sha256: 62c24c7fc59e42b775ce0679cfa7b14a5f9bfb7643cfbe708c960699e05fb918 #patches: # - patches/fix_json_signature.patch @@ -23,6 +23,7 @@ requirements: - pip - versioneer - tomli + - meson-python host: - python From 0345b5761249709ae65b6be93edb3c1ca19d9db7 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 09:52:52 +0200 Subject: [PATCH 009/129] Update sqlalchemy from 2.0.20 to 2.0.21 (#1018) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/sqlalchemy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml index 9ea75ef6e..ff0eeb3e1 100644 --- a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml +++ b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.0.20 + version: 2.0.21 package: name: sqlalchemy @@ -7,7 +7,7 @@ package: source: url: https://pypi.io/packages/source/S/SQLAlchemy/SQLAlchemy-${{ version }}.tar.gz - sha256: ca8a5ff2aa7f3ade6c498aaafce25b1eaeabe4e42b73e25519183e4566a16fc6 + sha256: 05b971ab1ac2994a14c56b35eaaa91f86ba080e9ad481b20d99d77f381bb6258 build: number: 0 From 855ce6a2403a30efcf5fc2dd08a62d76d622cdb8 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 09:53:07 +0200 Subject: [PATCH 010/129] Update msgpack from 1.0.7 to 1.0.8 (#1021) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/msgpack/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/msgpack/recipe.yaml b/recipes/recipes_emscripten/msgpack/recipe.yaml index 4a6049305..304e7f09d 100644 --- a/recipes/recipes_emscripten/msgpack/recipe.yaml +++ b/recipes/recipes_emscripten/msgpack/recipe.yaml @@ -1,12 +1,12 @@ context: - version: 1.0.7 + version: 1.0.8 package: name: msgpack version: ${{ version }} source: -- sha256: b78ea07be26c54f9827195f345d92b6df45b3214dea14ed53f3bc2f662006a3b +- sha256: 481996e14606bc215a8aed396c773bd4c3ae8b5afeac6622a3e02a4b33981b02 url: https://github.com/msgpack/msgpack-python/archive/refs/tags/v${{ version }}.tar.gz build: From 2cca5b5d8af7e054804130c4e6216d660791c3cd Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 09:53:20 +0200 Subject: [PATCH 011/129] Update fmt from 10.2.0 to 10.2.1 (#1020) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/fmt/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/fmt/recipe.yaml b/recipes/recipes_emscripten/fmt/recipe.yaml index 5035c342f..f26988502 100644 --- a/recipes/recipes_emscripten/fmt/recipe.yaml +++ b/recipes/recipes_emscripten/fmt/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 10.2.0 + version: 10.2.1 package: name: fmt @@ -7,7 +7,7 @@ package: source: url: https://github.com/fmtlib/fmt/archive/${{ version }}.tar.gz - sha256: 3ca91733a7313a8ad41c0885929415f8ec0a2a31d4dc7e27e9331412f4ca26ac + sha256: 1250e4cc58bf06ee631567523f48848dc4596133e163f02615c97f78bab6c811 build: number: 0 From f5d863ee3927a5896ff8abca9501cc7ef27f1934 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 09:53:38 +0200 Subject: [PATCH 012/129] Update libxml2 from 2.11.0 to 2.11.1 (#1019) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/libxml2/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/libxml2/recipe.yaml b/recipes/recipes_emscripten/libxml2/recipe.yaml index 373af06c4..20b8a07ac 100644 --- a/recipes/recipes_emscripten/libxml2/recipe.yaml +++ b/recipes/recipes_emscripten/libxml2/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.11.0 + version: 2.11.1 package: @@ -9,7 +9,7 @@ package: source: url: https://gitlab.gnome.org/GNOME/libxml2/-/archive/v${{ version }}/libxml2-v${{ version }}.tar.gz - sha256: 9e16fb3736865a2f9d227dbc625e65c8dcd69409ccc1ffadd0b30e2b5e7795d2 + sha256: 276498fba03e973e6c261979b0024acfcd5c8deeaf3a23032daa3c7c870f341a build: From c3e1448da5a8440ed20ef467856d0d6e603063ea Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 09:55:38 +0200 Subject: [PATCH 013/129] Update scikit-learn from 1.1.2 to 1.1.3 (#1015) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/scikit-learn/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/scikit-learn/recipe.yaml b/recipes/recipes_emscripten/scikit-learn/recipe.yaml index c664aff13..3fbe33424 100644 --- a/recipes/recipes_emscripten/scikit-learn/recipe.yaml +++ b/recipes/recipes_emscripten/scikit-learn/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 1.1.2 + version: 1.1.3 package: name: scikit-learn @@ -7,7 +7,7 @@ package: source: url: https://github.com/scikit-learn/scikit-learn/archive/${{ version }}.tar.gz - sha256: 92f3ad28149996caa9fd6ff5f849e7312d9fdedabe73760309a0e8b35b161735 + sha256: b7c0a9fb8dfcefcfc7ef8fe02a064d194980251d57efaea972cb76005afb3c63 patches: - patches/patch_away_urllib.patch From 97258726f967b557226297afbcac41403ed04b47 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 10:07:39 +0200 Subject: [PATCH 014/129] Update pandas from 2.1.0 to 2.1.1 (#1025) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/pandas/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/pandas/recipe.yaml b/recipes/recipes_emscripten/pandas/recipe.yaml index 4c18e5421..ce25f456d 100644 --- a/recipes/recipes_emscripten/pandas/recipe.yaml +++ b/recipes/recipes_emscripten/pandas/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.1.0 + version: 2.1.1 package: name: pandas @@ -8,7 +8,7 @@ package: source: - url: https://github.com/pandas-dev/pandas/releases/download/v${{ version }}/pandas-${{ version }}.tar.gz - sha256: 62c24c7fc59e42b775ce0679cfa7b14a5f9bfb7643cfbe708c960699e05fb918 + sha256: fecb198dc389429be557cde50a2d46da8434a17fe37d7d41ff102e3987fd947b #patches: # - patches/fix_json_signature.patch From 6f781bb0f4d81018c2ba6f346deb6e045b8a9ef7 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 10:07:52 +0200 Subject: [PATCH 015/129] Update libxml2 from 2.11.1 to 2.11.2 (#1024) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/libxml2/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/libxml2/recipe.yaml b/recipes/recipes_emscripten/libxml2/recipe.yaml index 20b8a07ac..e90f1ef23 100644 --- a/recipes/recipes_emscripten/libxml2/recipe.yaml +++ b/recipes/recipes_emscripten/libxml2/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.11.1 + version: 2.11.2 package: @@ -9,7 +9,7 @@ package: source: url: https://gitlab.gnome.org/GNOME/libxml2/-/archive/v${{ version }}/libxml2-v${{ version }}.tar.gz - sha256: 276498fba03e973e6c261979b0024acfcd5c8deeaf3a23032daa3c7c870f341a + sha256: 927cb7e8a20d07002af1dc636bf66726e7223eacb8e77e53f26b31cd87c79a81 build: From 80f690099347b76e04557037f92ea62c004424bd Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 10:08:07 +0200 Subject: [PATCH 016/129] Update sqlalchemy from 2.0.21 to 2.0.22 (#1023) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/sqlalchemy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml index ff0eeb3e1..d2e87ec8a 100644 --- a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml +++ b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.0.21 + version: 2.0.22 package: name: sqlalchemy @@ -7,7 +7,7 @@ package: source: url: https://pypi.io/packages/source/S/SQLAlchemy/SQLAlchemy-${{ version }}.tar.gz - sha256: 05b971ab1ac2994a14c56b35eaaa91f86ba080e9ad481b20d99d77f381bb6258 + sha256: 5434cc601aa17570d79e5377f5fd45ff92f9379e2abed0be5e8c2fba8d353d2b build: number: 0 From 872b2928cc08039a6196e68a5efdd8f1f89fc124 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 10:26:57 +0200 Subject: [PATCH 017/129] Update astropy from 6.0.1 to 6.1.0 (#986) * Update astropy from 6.0.1 to 6.1.0 * do not use patch * Update skip_ep.patch * Create test_astropy.py * Update recipe.yaml * Update recipe.yaml skip patches * hotpatch * Update build.sh * Update build.sh * no citation for the moment --------- Co-authored-by: emscripten-forge-bot Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/astropy/build.sh | 8 ++++++- .../astropy/patches/skip_ep.patch | 12 ++++++----- .../recipes_emscripten/astropy/recipe.yaml | 21 ++++++++++++++----- .../astropy/test_astropy.py | 2 ++ 4 files changed, 32 insertions(+), 11 deletions(-) create mode 100644 recipes/recipes_emscripten/astropy/test_astropy.py diff --git a/recipes/recipes_emscripten/astropy/build.sh b/recipes/recipes_emscripten/astropy/build.sh index 6c48351b7..1d65faad9 100644 --- a/recipes/recipes_emscripten/astropy/build.sh +++ b/recipes/recipes_emscripten/astropy/build.sh @@ -3,7 +3,13 @@ DISABLED=-Wno-incompatible-function-pointer-types +sed -i 's\from .tests.runner import TestRunner\# from .tests.runner import TestRunner\g' astropy/__init__.py +sed -i 's\test = TestRunner\# test = TestRunner\g' astropy/__init__.py + +sed -i 's\__citation__ =\# __citation__ =\g' astropy/__init__.py + + export CFLAGS="$CFLAGS $DISABLED" export CXXFLAGS="$CXXFLAGS $DISABLED" -${PYTHON} -m pip install . --no-deps -vvv \ No newline at end of file +${PYTHON} -m pip install . --no-deps -vvv diff --git a/recipes/recipes_emscripten/astropy/patches/skip_ep.patch b/recipes/recipes_emscripten/astropy/patches/skip_ep.patch index c54d6aa5a..042d5c250 100644 --- a/recipes/recipes_emscripten/astropy/patches/skip_ep.patch +++ b/recipes/recipes_emscripten/astropy/patches/skip_ep.patch @@ -1,8 +1,10 @@ ---- astropy/modeling/fitting.py 2022-04-14 12:50:08.075598086 +0200 -+++ astropy/modeling/fitting.py 2022-04-14 12:50:27.051580915 +0200 -@@ -1780,4 +1780,4 @@ - populate_entry_points(ep.get('astropy.modeling', [])) +diff --git a/astropy/modeling/fitting.py b/astropy/modeling/fitting.py +index c46bfaf8de..c40669c460 100644 +--- a/astropy/modeling/fitting.py ++++ b/astropy/modeling/fitting.py +@@ -2196,4 +2196,4 @@ def _populate_ep(): + populate_entry_points(ep.get("astropy.modeling", [])) -_populate_ep() -+#_populate_ep() ++# _populate_ep() diff --git a/recipes/recipes_emscripten/astropy/recipe.yaml b/recipes/recipes_emscripten/astropy/recipe.yaml index 5ea1294b8..b21cf9cfa 100644 --- a/recipes/recipes_emscripten/astropy/recipe.yaml +++ b/recipes/recipes_emscripten/astropy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 6.0.1 + version: 6.1.0 package: name: astropy @@ -7,9 +7,9 @@ package: source: - url: https://pypi.io/packages/source/a/astropy/astropy-${{ version }}.tar.gz - sha256: 89a975de356d0608e74f1f493442fb3acbbb7a85b739e074460bb0340014b39c - patches: - - patches/skip_ep.patch + sha256: 6c3b915f10b1576190730ddce45f6245f9927dda3de6e3f692db45779708950f + # patches: + # - patches/skip_ep.patch build: number: 0 @@ -31,4 +31,15 @@ requirements: - numpy - pyerfa - pyyaml - - packaging \ No newline at end of file + - packaging + +tests: + - script: pytester + requirements: + build: + - pytester >= 0.9.0 + run: + - pytester-run >= 0.9.0 + files: + recipe: + - test_astropy.py diff --git a/recipes/recipes_emscripten/astropy/test_astropy.py b/recipes/recipes_emscripten/astropy/test_astropy.py new file mode 100644 index 000000000..c9a51f87f --- /dev/null +++ b/recipes/recipes_emscripten/astropy/test_astropy.py @@ -0,0 +1,2 @@ +def test_import_astropy(): + import astropy.units as u From d501e03ef1914998a61e6ca3bd1aa652172a6356 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 10:38:35 +0200 Subject: [PATCH 018/129] Update libxml2 from 2.11.2 to 2.12.0 (#1027) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/libxml2/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/libxml2/recipe.yaml b/recipes/recipes_emscripten/libxml2/recipe.yaml index e90f1ef23..4a81fd338 100644 --- a/recipes/recipes_emscripten/libxml2/recipe.yaml +++ b/recipes/recipes_emscripten/libxml2/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.11.2 + version: 2.12.0 package: @@ -9,7 +9,7 @@ package: source: url: https://gitlab.gnome.org/GNOME/libxml2/-/archive/v${{ version }}/libxml2-v${{ version }}.tar.gz - sha256: 927cb7e8a20d07002af1dc636bf66726e7223eacb8e77e53f26b31cd87c79a81 + sha256: 1b1f4cd45767ef54e3fa5a3e1767f50282d63dc39a02c635cd7a5967d6a19387 build: From 109b2a25ddd4ea80926b2502a1e27d46f0a20694 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 10:38:46 +0200 Subject: [PATCH 019/129] Update sqlalchemy from 2.0.22 to 2.0.23 (#1026) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/sqlalchemy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml index d2e87ec8a..e23f1e3f3 100644 --- a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml +++ b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.0.22 + version: 2.0.23 package: name: sqlalchemy @@ -7,7 +7,7 @@ package: source: url: https://pypi.io/packages/source/S/SQLAlchemy/SQLAlchemy-${{ version }}.tar.gz - sha256: 5434cc601aa17570d79e5377f5fd45ff92f9379e2abed0be5e8c2fba8d353d2b + sha256: c1bda93cbbe4aa2aa0aa8655c5aeda505cd219ff3e8da91d1d329e143e4aff69 build: number: 0 From adb31ef18ad619f19bac77c2eb3ffc81fcb40710 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 10:51:06 +0200 Subject: [PATCH 020/129] Update pandas from 2.1.1 to 2.1.2 (#1028) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/pandas/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/pandas/recipe.yaml b/recipes/recipes_emscripten/pandas/recipe.yaml index ce25f456d..7cafc2dc4 100644 --- a/recipes/recipes_emscripten/pandas/recipe.yaml +++ b/recipes/recipes_emscripten/pandas/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.1.1 + version: 2.1.2 package: name: pandas @@ -8,7 +8,7 @@ package: source: - url: https://github.com/pandas-dev/pandas/releases/download/v${{ version }}/pandas-${{ version }}.tar.gz - sha256: fecb198dc389429be557cde50a2d46da8434a17fe37d7d41ff102e3987fd947b + sha256: 52897edc2774d2779fbeb6880d2cfb305daa0b1a29c16b91f531a18918a6e0f3 #patches: # - patches/fix_json_signature.patch From 482624c22ffa8865c53a3588224f21e6eeba8087 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 10:58:59 +0200 Subject: [PATCH 021/129] Update sqlalchemy from 2.0.23 to 2.0.24 (#1029) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/sqlalchemy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml index e23f1e3f3..1e39042c4 100644 --- a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml +++ b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.0.23 + version: 2.0.24 package: name: sqlalchemy @@ -7,7 +7,7 @@ package: source: url: https://pypi.io/packages/source/S/SQLAlchemy/SQLAlchemy-${{ version }}.tar.gz - sha256: c1bda93cbbe4aa2aa0aa8655c5aeda505cd219ff3e8da91d1d329e143e4aff69 + sha256: 6db97656fd3fe3f7e5b077f12fa6adb5feb6e0b567a3e99f47ecf5f7ea0a09e3 build: number: 0 From db82de4a4e9732856c2f6692347920b56c87fdf4 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 11:19:12 +0200 Subject: [PATCH 022/129] Update pandas from 2.1.2 to 2.1.3 (#1030) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/pandas/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/pandas/recipe.yaml b/recipes/recipes_emscripten/pandas/recipe.yaml index 7cafc2dc4..dd515ad5f 100644 --- a/recipes/recipes_emscripten/pandas/recipe.yaml +++ b/recipes/recipes_emscripten/pandas/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.1.2 + version: 2.1.3 package: name: pandas @@ -8,7 +8,7 @@ package: source: - url: https://github.com/pandas-dev/pandas/releases/download/v${{ version }}/pandas-${{ version }}.tar.gz - sha256: 52897edc2774d2779fbeb6880d2cfb305daa0b1a29c16b91f531a18918a6e0f3 + sha256: 22929f84bca106921917eb73c1521317ddd0a4c71b395bcf767a106e3494209f #patches: # - patches/fix_json_signature.patch From 3c9ba66d2a65d78a7b9f61994bb3d95fba4256cc Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 11:33:30 +0200 Subject: [PATCH 023/129] Update pandas from 2.1.3 to 2.1.4 (#1032) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/pandas/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/pandas/recipe.yaml b/recipes/recipes_emscripten/pandas/recipe.yaml index dd515ad5f..f693ce9e2 100644 --- a/recipes/recipes_emscripten/pandas/recipe.yaml +++ b/recipes/recipes_emscripten/pandas/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.1.3 + version: 2.1.4 package: name: pandas @@ -8,7 +8,7 @@ package: source: - url: https://github.com/pandas-dev/pandas/releases/download/v${{ version }}/pandas-${{ version }}.tar.gz - sha256: 22929f84bca106921917eb73c1521317ddd0a4c71b395bcf767a106e3494209f + sha256: fcb68203c833cc735321512e13861358079a96c174a61f5116a1de89c58c0ef7 #patches: # - patches/fix_json_signature.patch From de5f062706f701818b1376267ee21cf544fcfa51 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 11:33:42 +0200 Subject: [PATCH 024/129] Update sqlalchemy from 2.0.24 to 2.0.25 (#1031) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/sqlalchemy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml index 1e39042c4..8337bf15b 100644 --- a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml +++ b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.0.24 + version: 2.0.25 package: name: sqlalchemy @@ -7,7 +7,7 @@ package: source: url: https://pypi.io/packages/source/S/SQLAlchemy/SQLAlchemy-${{ version }}.tar.gz - sha256: 6db97656fd3fe3f7e5b077f12fa6adb5feb6e0b567a3e99f47ecf5f7ea0a09e3 + sha256: a2c69a7664fb2d54b8682dd774c3b54f67f84fa123cf84dda2a5f40dcaa04e08 build: number: 0 From c72f487e61293cb5e118b45c76ef57998ebb7cac Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 11:42:37 +0200 Subject: [PATCH 025/129] Update sqlalchemy from 2.0.25 to 2.0.26 (#1033) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/sqlalchemy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml index 8337bf15b..216154cc5 100644 --- a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml +++ b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.0.25 + version: 2.0.26 package: name: sqlalchemy @@ -7,7 +7,7 @@ package: source: url: https://pypi.io/packages/source/S/SQLAlchemy/SQLAlchemy-${{ version }}.tar.gz - sha256: a2c69a7664fb2d54b8682dd774c3b54f67f84fa123cf84dda2a5f40dcaa04e08 + sha256: e1bcd8fcb30305e27355d553608c2c229d3e589fb7ff406da7d7e5d50fa14d0d build: number: 0 From 4b132e2107bdd3e78941a6460a40a309e7e17ce3 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 13:06:50 +0200 Subject: [PATCH 026/129] Update sqlalchemy from 2.0.26 to 2.0.27 (#1035) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/sqlalchemy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml index 216154cc5..d88edf393 100644 --- a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml +++ b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.0.26 + version: 2.0.27 package: name: sqlalchemy @@ -7,7 +7,7 @@ package: source: url: https://pypi.io/packages/source/S/SQLAlchemy/SQLAlchemy-${{ version }}.tar.gz - sha256: e1bcd8fcb30305e27355d553608c2c229d3e589fb7ff406da7d7e5d50fa14d0d + sha256: 86a6ed69a71fe6b88bf9331594fa390a2adda4a49b5c06f98e47bf0d392534f8 build: number: 0 From 86ecd0241f60c435a8526e968fc42439db40812c Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 14:22:01 +0200 Subject: [PATCH 027/129] Update sqlalchemy from 2.0.27 to 2.0.28 (#1036) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/sqlalchemy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml index d88edf393..33d41ac1c 100644 --- a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml +++ b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.0.27 + version: 2.0.28 package: name: sqlalchemy @@ -7,7 +7,7 @@ package: source: url: https://pypi.io/packages/source/S/SQLAlchemy/SQLAlchemy-${{ version }}.tar.gz - sha256: 86a6ed69a71fe6b88bf9331594fa390a2adda4a49b5c06f98e47bf0d392534f8 + sha256: dd53b6c4e6d960600fd6532b79ee28e2da489322fcf6648738134587faf767b6 build: number: 0 From f349c34154abe71f618c8773f5cd40a54d86d1bb Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 14:22:12 +0200 Subject: [PATCH 028/129] Update libxml2 from 2.12.0 to 2.12.1 (#1037) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/libxml2/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/libxml2/recipe.yaml b/recipes/recipes_emscripten/libxml2/recipe.yaml index 4a81fd338..3c135e7e2 100644 --- a/recipes/recipes_emscripten/libxml2/recipe.yaml +++ b/recipes/recipes_emscripten/libxml2/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.12.0 + version: 2.12.1 package: @@ -9,7 +9,7 @@ package: source: url: https://gitlab.gnome.org/GNOME/libxml2/-/archive/v${{ version }}/libxml2-v${{ version }}.tar.gz - sha256: 1b1f4cd45767ef54e3fa5a3e1767f50282d63dc39a02c635cd7a5967d6a19387 + sha256: 1090e62c5a1900429f63e4681263b96e7829876ccbc66cf2d9266cd589f67286 build: From b00366fdce3e5a6ef8972fdfd01f445566b37bd3 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 16:36:13 +0200 Subject: [PATCH 029/129] Update sqlalchemy from 2.0.28 to 2.0.29 (#1038) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/sqlalchemy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml index 33d41ac1c..09a7c29af 100644 --- a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml +++ b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.0.28 + version: 2.0.29 package: name: sqlalchemy @@ -7,7 +7,7 @@ package: source: url: https://pypi.io/packages/source/S/SQLAlchemy/SQLAlchemy-${{ version }}.tar.gz - sha256: dd53b6c4e6d960600fd6532b79ee28e2da489322fcf6648738134587faf767b6 + sha256: bd9566b8e58cabd700bc367b60e90d9349cd16f0984973f98a9a09f9c64e86f0 build: number: 0 From 16d1b3de99e9783fe2c1a23c3e1cb8494f94dc15 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 16:58:03 +0200 Subject: [PATCH 030/129] Update sqlalchemy from 2.0.29 to 2.0.30 (#1039) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/sqlalchemy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml index 09a7c29af..114347da5 100644 --- a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml +++ b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.0.29 + version: 2.0.30 package: name: sqlalchemy @@ -7,7 +7,7 @@ package: source: url: https://pypi.io/packages/source/S/SQLAlchemy/SQLAlchemy-${{ version }}.tar.gz - sha256: bd9566b8e58cabd700bc367b60e90d9349cd16f0984973f98a9a09f9c64e86f0 + sha256: 2b1708916730f4830bc69d6f49d37f7698b5bd7530aca7f04f785f8849e95255 build: number: 0 From c51eb8a160cda8918e6d55d4462c7d7a938ca212 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 16 May 2024 16:58:21 +0200 Subject: [PATCH 031/129] Update libxml2 from 2.12.1 to 2.12.2 (#1040) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/libxml2/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/libxml2/recipe.yaml b/recipes/recipes_emscripten/libxml2/recipe.yaml index 3c135e7e2..888b99afc 100644 --- a/recipes/recipes_emscripten/libxml2/recipe.yaml +++ b/recipes/recipes_emscripten/libxml2/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.12.1 + version: 2.12.2 package: @@ -9,7 +9,7 @@ package: source: url: https://gitlab.gnome.org/GNOME/libxml2/-/archive/v${{ version }}/libxml2-v${{ version }}.tar.gz - sha256: 1090e62c5a1900429f63e4681263b96e7829876ccbc66cf2d9266cd589f67286 + sha256: 1cd3a24aa65acc7e2ca90b984667fc19b7c9a1dd1ec1934e9b33932fbfd827c1 build: From 660cfd288f526ddf5b1ef9f646bdfc06f0463e60 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Fri, 17 May 2024 09:32:51 +0200 Subject: [PATCH 032/129] Add pcre2 (#1041) --- recipes/recipes_emscripten/pcre2/build.sh | 15 ++++++ recipes/recipes_emscripten/pcre2/recipe.yaml | 52 ++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 recipes/recipes_emscripten/pcre2/build.sh create mode 100644 recipes/recipes_emscripten/pcre2/recipe.yaml diff --git a/recipes/recipes_emscripten/pcre2/build.sh b/recipes/recipes_emscripten/pcre2/build.sh new file mode 100644 index 000000000..bcca7d454 --- /dev/null +++ b/recipes/recipes_emscripten/pcre2/build.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +./autogen.sh +emconfigure ./configure \ + --prefix=$PREFIX \ + --host=$HOST \ + --disable-shared \ + --enable-pcre2-16 \ + --enable-pcre2-32 + +make -j${CPU_COUNT} +make install + +# Install wasm files as well +cp ./pcre2*.wasm $PREFIX/bin diff --git a/recipes/recipes_emscripten/pcre2/recipe.yaml b/recipes/recipes_emscripten/pcre2/recipe.yaml new file mode 100644 index 000000000..0b52128a4 --- /dev/null +++ b/recipes/recipes_emscripten/pcre2/recipe.yaml @@ -0,0 +1,52 @@ +context: + name: "pcre2" + version: 10.43 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://github.com/PCRE2Project/pcre2/archive/refs/tags/${{ name }}-${{ version }}.tar.gz + sha256: f0048e26b02bdfaf43b8cec75030a9c2fe28552bf5caa693d3ccbf4d886fa930 + +build: + number: 0 + +requirements: + build: + - ${{ compiler('c') }} + - cmake + - ninja + host: + - bzip2 + - zlib + +tests: +- script: + - test -f $PREFIX/lib/libpcre2-8.a + - test -f $PREFIX/lib/libpcre2-16.a + - test -f $PREFIX/lib/libpcre2-32.a + - test -f $PREFIX/lib/libpcre2-posix.a + - node ${PREFIX}/bin/pcre2grep --version + - node ${PREFIX}/bin/pcre2test --version + requirements: + build: + - nodejs + +about: + homepage: http://www.pcre.org/ + license: BSD-3-Clause + license_family: BSD + license_file: LICENCE + summary: Regular expression pattern matching using Perl 5 syntax and semantics. + description: | + The PCRE library is a set of functions that implement regular expression pattern matching + using the same syntax and semantics as Perl 5. PCRE has its own native API, as well as a set of + wrapper functions that correspond to the POSIX regular expression API. The PCRE library is + free, even for building proprietary software. + documentation: http://www.pcre.org/current/doc/html/ + +extra: + recipe-maintainers: + - IsabelParedes From ae86bd15bb31723385d59de1296653c6c7d6ba64 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Sat, 18 May 2024 07:31:06 +0200 Subject: [PATCH 033/129] Minor edits in documentation (#1044) * Fix typos * Update link --- README.md | 2 +- docs/development/adding_packages.md | 36 +++++++++---------- docs/development/conda_build_config.md | 19 +++++----- docs/development/local_builds.md | 13 +++---- docs/development/recipe_format.md | 8 ++--- docs/development/troubleshooting.md | 7 ++-- docs/index.md | 17 +++++---- docs/project/faq.md | 2 +- docs/project/related_projects.md | 10 +++--- docs/usage/installing_packages.md | 4 +-- docs/usage/jupyterlite.md | 20 ++++++----- .../{pacakge_server.md => package_server.md} | 5 ++- 12 files changed, 72 insertions(+), 71 deletions(-) rename docs/usage/{pacakge_server.md => package_server.md} (65%) diff --git a/README.md b/README.md index 17275418f..cbd7a3e96 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Emscripten forge [![CI](https://img.shields.io/badge/emscripten_forge-docs-yellow)](https://emscripten-forge.org) -[![CI](https://img.shields.io/badge/emscripten_forge-blog-pink)](https://emscripten-forge.org) +[![CI](https://img.shields.io/badge/emscripten_forge-blog-pink)](https://emscripten-forge.org/blog/) Visit [emscripten-forge.org](https://emscripten-forge.org) for more information and the documentation. diff --git a/docs/development/adding_packages.md b/docs/development/adding_packages.md index 3af67309b..0e77e821a 100644 --- a/docs/development/adding_packages.md +++ b/docs/development/adding_packages.md @@ -1,6 +1,6 @@ # Adding packages -To add a new package to emscripten-forge, just create a Pull Request in this repository. +To add a new package to emscripten-forge, just create a Pull Request in [this repository](https://github.com/emscripten-forge/recipes/pulls). The recipe format is described in the [rattler-build recipe format](https://github.com/prefix-dev/rattler-build?tab=readme-ov-file#the-recipe-format) @@ -8,9 +8,7 @@ The recipe format is described in the [rattler-build recipe format](https://gith ### CMake Adding cmake based packages is easy. Usually it is enough to replace the `cmake` command with the `emcmake` command and -`make` with `emmake` (see the [emscripten documentation](https://emscripten.org/docs/compiling/Building-Projects.html#integrating-with-a-build-system) for more details) - - +`make` with `emmake` (see the [emscripten documentation](https://emscripten.org/docs/compiling/Building-Projects.html#integrating-with-a-build-system) for more details). **Example recipes**: @@ -20,19 +18,20 @@ Adding cmake based packages is easy. Usually it is enough to replace the `cmake` ### Configure / Make -Usually it is enough to replace the `./configure` command with the `emconfigure ./configure` (see the [emscripten documentation](https://emscripten.org/docs/compiling/Building-Projects.html#integrating-with-a-build-system) for more details) +Usually it is enough to replace the `./configure` command with the `emconfigure ./configure` (see the [emscripten documentation](https://emscripten.org/docs/compiling/Building-Projects.html#integrating-with-a-build-system) for more details). ## Python Packages ### pip / setuptools -For simple package only these requirements are usually necessary: -```yaml +For a simple package, only these requirements are usually necessary: + +```yaml requirements: build: - python - - cross-python_${{target_platform}} + - cross-python_${{ target_platform }} - ${{ compiler("c") }} - pip host: @@ -46,9 +45,10 @@ requirements: * [regex](https://github.com/emscripten-forge/recipes/tree/main/recipes/recipes_emscripten/regex) -### menson +### meson For a meson package, the following requirements are usually needed. + ```yaml requirements: build: @@ -59,10 +59,10 @@ requirements: host: - python ``` -Furthermore a `emscripten.meson.cross` file is necessary to set the correct compiler and flags for the cross compilation. +Furthermore, an `emscripten.meson.cross` file is necessary to set the correct compiler and flags for cross compilation. ```toml -# binaries section is at the end as may want to append python binary. +# binaries section is at the end to be able to append the python binary. [properties] needs_exe_wrapper = true @@ -81,8 +81,7 @@ pkgconfig = 'pkg-config' ``` -in the build script we append the python binary to the cross file and -pass the cross file to the pip command. +In the build script, we append the python binary to the *.cross* file and pass this *.cross* file to the pip command. ```bash #!/bin/bash @@ -94,20 +93,21 @@ ${PYTHON} -m pip install . -vvv --no-deps --no-build-isolation \ -Csetup-args="--cross-file=$SRC_DIR/emscripten.meson.cross" ``` - **Example recipes**: * [contourpy](https://github.com/emscripten-forge/recipes/tree/main/recipes/recipes_emscripten/contourpy) * [numpy](https://github.com/emscripten-forge/recipes/tree/main/recipes/recipes_emscripten/numpy) -### rust -Building rust package with PyO3 / maturin works usually out of the box. +### rust + +Building rust packages with PyO3 / maturin typically works out of the box. For a maturin / cffi / pyo3 package, the following requirements are usually necessary: + ```yaml requirements: build: - - cross-python_${{target_platform}} + - cross-python_${{ target_platform }} - cffi == 1.15.1 (# at the time of writing pinning cffi == 1.15.1 is necessary, may change in the future) - setuptools-rust - rust @@ -116,7 +116,7 @@ requirements: host: - python # at the time of writing pinning cffi == 1.15.1 is necessary, may change in the future) - - cffi == 1.15.1 + - cffi == 1.15.1 run: # at the time of writing pinning cffi == 1.15.1 is necessary, may change in the future) - cffi == 1.15.1 diff --git a/docs/development/conda_build_config.md b/docs/development/conda_build_config.md index 263a20415..61534366f 100644 --- a/docs/development/conda_build_config.md +++ b/docs/development/conda_build_config.md @@ -1,8 +1,9 @@ # Conda build config -Simmilar to conda-forge we globally pin packages. -This is essentialy a list of packages and versions like +Similar to conda-forge, we globally pin packages. +This is essentially a list of packages and versions such as + ```yaml # ... numpy: @@ -28,7 +29,7 @@ orc: This list is used to pin the versions of the dependencies in the `recipe.yaml` of recipes. -Therefore instead of writing +Therefore, instead of writing ```yaml requirements: @@ -48,14 +49,14 @@ requirements: - numpy ``` -Furthermore this build-config contains the information which compiler to use for which platform. -While conda forge can be found [here](https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/main/recipe/conda_build_config.yaml), -we **need** to maintain our on [conda-build-config](https://github.com/emscripten-forge/recipes/blob/main/conda_build_config.yaml). In particular we need to setup the emscripten compiler. +Furthermore, this build-config specifies which compiler to use for each platform. +While conda-forge build configuration can be found [here](https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/main/recipe/conda_build_config.yaml), +we **need** to maintain our own [conda-build-config](https://github.com/emscripten-forge/recipes/blob/main/conda_build_config.yaml). In particular, we need to set up the emscripten compiler. !!! note - The conda-build-config of emscripten-forge uses the [rattler-recipies format](https://github.com/prefix-dev/rattler-build?tab=readme-ov-file#the-recipe-format) - - + The conda-build-config of emscripten-forge uses the [rattler-recipes format](https://github.com/prefix-dev/rattler-build?tab=readme-ov-file#the-recipe-format) + + ```yaml cxx_compiler: - if: emscripten diff --git a/docs/development/local_builds.md b/docs/development/local_builds.md index 92f4ee655..9c46738e4 100644 --- a/docs/development/local_builds.md +++ b/docs/development/local_builds.md @@ -4,11 +4,12 @@ ## Local with `pixi` To build a package locally, the easiest way is to use `pixi` (see [/pixi.sh/latest/#installation](https://pixi.sh/latest/#installation) for installation instructions). -Pixi will under the hood use `rattler-build` to build the package. +Under the hood, `pixi` uses `rattler-build` to build the package. ```bash # this only needs to be done once -pixi run setup +pixi run setup + # this builds the package pixi run build-emscripten-wasm32-pkg recipes/recipes_emscripten/regex ``` @@ -17,24 +18,24 @@ pixi run build-emscripten-wasm32-pkg recipes/recipes_emscripten/regex We recommend using the `pixi` command to build packages locally. However, if you want to use `rattler-build` directly, you can do so with the following steps: -### create the environment +### Create the environment Create a new conda environment from `ci_env.yml` and install playwright in this environment: On a Linux / MacOS this can be done with: ```bash micromamba create -n emscripten-forge -f ci_env.yml --yes micromamba activate emscripten-forge -``` +``` **All further steps should be executed in this environment.** -Ie if you open a new terminal, you have to activate the environment again with `micromamba activate emscripten-forge`. +I.e. if you open a new terminal, you have to activate the environment again with `micromamba activate emscripten-forge`. ### Setup emsdk We currently need a patched version of emsdk. This is because emscripten had some regressions in the `3.1.45` release wrt. dynamic loading of shared libraries. We use the `./emsdk/setup_emsdk.sh` which takes two arguments: the emsdk version and the path where emsdk should be installed. In this example we choose `~/emsdk` as the installation path. You have to use version `3.1.45`. - + ```bash ./emsdk/setup_emsdk.sh 3.1.45 ~/emsdk ``` diff --git a/docs/development/recipe_format.md b/docs/development/recipe_format.md index 54778123c..8e369ccc9 100644 --- a/docs/development/recipe_format.md +++ b/docs/development/recipe_format.md @@ -1,8 +1,6 @@ # Recipe format - -Typically, a recipe is directory with a `recipe.yaml` file that contains the information needed to build a package -and optionally an additonal `build.sh` script that is executed during the build process. +Typically, a recipe is a directory with a `recipe.yaml` file that contains the information needed to build a package and optionally an additional `build.sh` script that is executed during the build process. ## recipe.yaml @@ -18,7 +16,7 @@ package: source: # the url is formed from a "template" with the context variables - url: https://pypi.io/packages/source/r/${{name}}/${{name}}-${{ version }}.tar.gz + url: https://pypi.io/packages/source/r/${{ name }}/${{ name }}-${{ version }}.tar.gz sha256: 97f32dc03a8054a4c4a5ab5d761ed4861e828b2c200febd4e46857069a483916 build: @@ -27,7 +25,7 @@ build: requirements: build: - python - - cross-python_${{target_platform}} + - cross-python_${{ target_platform }} - ${{ compiler("c") }} - pip host: diff --git a/docs/development/troubleshooting.md b/docs/development/troubleshooting.md index 234da3ac6..7166b1546 100644 --- a/docs/development/troubleshooting.md +++ b/docs/development/troubleshooting.md @@ -11,12 +11,11 @@ This section is still empty, feel free to contribute by opening a pull request. ### `PyLong_FromLongLong`: imported function does not match the expected type -When facing an error at runtime while importing a shared-library/ python-package like the following: +When facing an error at runtime while importing a shared-library / python-package like the following: ``` - LinkError: WebAssembly.instantiate(): + LinkError: WebAssembly.instantiate(): function="PyLong_FromLongLong": imported function does not match the expected type ``` -or similar error message containing the woring `*LongLong` or similar, it is likely +or an error message containing `*LongLong` or similar wording, it is likely that the linker flag `-s WASM_BIGINT` is missing. - diff --git a/docs/index.md b/docs/index.md index bdc8dbeec..7e2be41a8 100644 --- a/docs/index.md +++ b/docs/index.md @@ -3,28 +3,27 @@ Emscripten-forge is a GitHub [organization](https://github.com/emscripten-forge)/[repository](https://github.com/emscripten-forge/recipes) containing [conda recipes](https://github.com/emscripten-forge/recipes) for the `emscripten-wasm32` platform. Conda-forge does not (yet) support the `emscripten-wasm32` platform. `emscripten-forge` fills this gap by providing a channel with conda packages for the `emscripten-wasm32` platform. -The recipe repository not only stores the recipe, but also builds and upload the recipe -with github actions to the `emscripten-forge` channel on [quetz](https://beta.mamba.pm/channels/emscripten-forge) +The recipes repository not only stores the recipe files for multiple packages, but it also builds and uploads these packages to the `emscripten-forge` channel on [Quetz](https://beta.mamba.pm/channels/emscripten-forge) -## +## ### Development - * [Adding_packages](development/adding_packages) + * [Adding packages](development/adding_packages) * [Recipe format](development/recipe_format) - * [Local Builds](development/local_builds) + * [Local builds](development/local_builds) * [Conda build config](development/conda_build_config) * [Troubleshooting](development/troubleshooting) - + ### Usage * [Installing packages](usage/installing_packages) - * [Jupyterlite](usage/jupyterlite) + * [JupyterLite](usage/jupyterlite) * [Package server](usage/package_server) -### Project +### Project * [Blog](blog) - * [Related Projects](project/related_projects) + * [Related projects](project/related_projects) * [FAQ](project/faq) * [Credits](project/credits) diff --git a/docs/project/faq.md b/docs/project/faq.md index 4245910b1..da15805f4 100644 --- a/docs/project/faq.md +++ b/docs/project/faq.md @@ -8,4 +8,4 @@ Pyodide is a full python distribution for `emscripten-wasm32` running in the bro Therefore all packages are either python packages or shared libraries needed by python packages. Emscripten-forge on the other hand is a conda channel providing packages for the `emscripten-wasm32` platform. This means there is a great overlap in the provided python packages, but emscripten-forge also provided non-python packages for the `emscripten-wasm32` platform. -Furthermore pyodide lives in the `pip` ecosystem, while emscripten-forge lives in the `conda/mamamba/rattler` ecosystem. \ No newline at end of file +Furthermore pyodide lives in the `pip` ecosystem, while emscripten-forge lives in the `conda/mamba/rattler` ecosystem. diff --git a/docs/project/related_projects.md b/docs/project/related_projects.md index 8517c49c9..1d910bfa7 100644 --- a/docs/project/related_projects.md +++ b/docs/project/related_projects.md @@ -3,19 +3,19 @@ ## Pyodide [Pyodide](https://pyodide.org/en/stable/index.html) is a Python distribution for the browser and Node.js based on WebAssembly. -Emscripten-forge would not have been possible without the pioneering work of the pyodide team. +Emscripten-forge would not have been possible without the pioneering work of the pyodide team. Many aspects of this project are heavily inspired by the pyodide project. This includes the build scripts and many of the patches which have been taken from the pyodide packages. ## pyjs [pyjs](https://emscripten-forge.github.io/pyjs/) is modern pybind11 + emscripten Embind based Python <-> JavaScript foreign function interface (FFI) for wasm/emscripten compiled Python. -The API is loosly based on the FFI of pyodide. +The API is loosely based on the FFI of pyodide. ## pyjs-code-runner [pyjs-code-runner](https://github.com/emscripten-forge/pyjs-code-runner) is a "driver" to run python code in a wasm environment, almost like running vanilla python code. This is used to run the tests of the emscripten-forge packages. ## JupyterLite -[JupyterLite](https://jupyterlite.readthedocs.io/en/stable/) is a JupyterLab distribution that runs entirely in the browser built from the ground-up using JupyterLab components and extensions. +[JupyterLite](https://jupyterlite.readthedocs.io/en/stable/) is a JupyterLab distribution that runs entirely in the browser built from the ground-up using JupyterLab components and extensions. ## JupyterLite Xeus @@ -30,8 +30,8 @@ and packages from emscripten-forge in a jupyterlite environment. ## pixi -[pixi](https://pixi.sh/latest/) is a package management tool for developers. It allows the developer to install libraries and applications in a reproducible way. +[pixi](https://pixi.sh/latest/) is a package management tool for developers. It allows the developer to install libraries and applications in a reproducible way. Emscripten-forge uses pixi to setup the environment for building the packages. ## Quetz -Quetz is a [open source ](https://beta.mamba.pm/channels/emscripten-forge)conda package server. It is used to host the[ emscripten-forge](https://beta.mamba.pm/channels/emscripten-forge) packages. +Quetz is an [open source](https://beta.mamba.pm/channels/emscripten-forge) conda package server. It is used to host the [emscripten-forge](https://beta.mamba.pm/channels/emscripten-forge) packages. diff --git a/docs/usage/installing_packages.md b/docs/usage/installing_packages.md index 8e75d5cab..d5d1f3481 100644 --- a/docs/usage/installing_packages.md +++ b/docs/usage/installing_packages.md @@ -1,4 +1,4 @@ -#Installing packages +# Installing packages ## Install packages with micromamba We recommend using micromamba to install packages from this channel. @@ -15,4 +15,4 @@ micromamba create -n my-channel-name \ python numpy scipy matplotlib ``` -All noarch packages are installed from the `conda-forge` channel, all packages compiled for the `emscripten-wasm32` platform are provided via the `emscripten-forge` channel. \ No newline at end of file +All noarch packages are installed from the `conda-forge` channel, all packages compiled for the `emscripten-wasm32` platform are provided via the `emscripten-forge` channel. diff --git a/docs/usage/jupyterlite.md b/docs/usage/jupyterlite.md index 408985af5..d6544cbd0 100644 --- a/docs/usage/jupyterlite.md +++ b/docs/usage/jupyterlite.md @@ -3,16 +3,16 @@ ## Installation -To consume emscripten-forge packages in JupyterLite environment, the `jupyterlite_xeus` package needs -to be installed. This can be done with `pip` +To consume emscripten-forge packages in a JupyterLite environment, the `jupyterlite_xeus` package needs +to be installed. This can be done with `pip` -```bash -pip install jupyterlite_xeus +```bash +pip install jupyterlite_xeus ``` -or `conda`/`mamba`/`micromamba` +or `conda`/`mamba`/`micromamba` ``` -mamba install jupyterlite_xeus +mamba install jupyterlite-xeus ``` ## Usage @@ -21,7 +21,7 @@ mamba install jupyterlite_xeus Emscripten-forge provides xeus kernels for multiple languages, this document focuses on the Python kernel, namely `xeus-python`. While the other kernels can also be installed as described below, adding custom packages is only supported for the `xeus-python` kernel - at the moment. + at the moment. ### From environment file @@ -46,7 +46,7 @@ jupyter lite build --XeusAddon.environment_file=some_path/to/environment.yaml Create a environment with the desired packages. Here is an example with numpy as a additional dependency ```bash -micromamba create +micromamba create -n myenv \ --platform=emscripten-wasm32 \ -c https://repo.mamba.pm/emscripten-forge \ @@ -55,4 +55,8 @@ micromamba create "python>=3.11" numpy pandas xeus-python ``` +Use the following command to build JupyterLite. + +```sh jupyter lite build --XeusAddon.prefix=$MAMBA_ROOT_PREFIX/envs/myenv +``` diff --git a/docs/usage/pacakge_server.md b/docs/usage/package_server.md similarity index 65% rename from docs/usage/pacakge_server.md rename to docs/usage/package_server.md index 03cfec619..e1dc32174 100644 --- a/docs/usage/pacakge_server.md +++ b/docs/usage/package_server.md @@ -1,10 +1,9 @@ # Packagve Server -Emscripten forge packages are hosted as -as a the [emscripten-forge](https://beta.mamba.pm/channels/emscripten-forge) channel on a [Quetz](https://quetz.io/) server. -on a [Quetz](https://quetz.io/) server. +Emscripten-forge packages are hosted on the [emscripten-forge](https://beta.mamba.pm/channels/emscripten-forge) channel of a [Quetz](https://quetz.io/) server. !!! note + To use emscripten-forge conda packages, you need to add the `emscripten-forge` channel to your conda configuration or use the `--channel` flag when installing packages, ie: ```bash From 1f2725d1be4ba0b0050ec8e6b47e6b504dd7ec5f Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Sat, 18 May 2024 08:04:56 +0200 Subject: [PATCH 034/129] Update qutip from 5.0.1 to 5.0.2 (#1045) * Update qutip from 5.0.1 to 5.0.2 * Update recipe.yaml --------- Co-authored-by: emscripten-forge-bot Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/qutip/recipe.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/recipes_emscripten/qutip/recipe.yaml b/recipes/recipes_emscripten/qutip/recipe.yaml index e1d0c9206..886c53889 100644 --- a/recipes/recipes_emscripten/qutip/recipe.yaml +++ b/recipes/recipes_emscripten/qutip/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 5.0.1 + version: 5.0.2 package: name: qutip @@ -7,11 +7,11 @@ package: source: url: https://github.com/qutip/qutip/archive/v${{ version }}.tar.gz - sha256: 59517336571223266b7771db049769ac3a286fda5ae02d469885ec8c237a23b6 + sha256: 39759af6b82d92b9952a651371d2b8b9b4626fecd919e0c1d6474871db23cbcf build: number: 0 - script: ${{ PYTHON }} -m pip install . --no-deps -vv # [not win] + script: "$PYTHON -m pip install . --no-deps -vv" requirements: build: @@ -56,4 +56,4 @@ about: homepage: http://qutip.org extra: recipe-maintainers: - - hodgestar \ No newline at end of file + - hodgestar From 21970b4fd27a6ba93bee3584bfe778a456eb9cb6 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Sat, 18 May 2024 08:11:00 +0200 Subject: [PATCH 035/129] Update credits.md --- docs/project/credits.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/project/credits.md b/docs/project/credits.md index 1e5146fb1..aa7ed29dc 100644 --- a/docs/project/credits.md +++ b/docs/project/credits.md @@ -1,4 +1,4 @@ -# Credids +# Credits ## Pyodide This project is heavily inspired by the [pyodide](https://pyodide.org/en/stable/) project. From 538cca98c9ff7d45e439c00bbb78f65e5487585e Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 20 May 2024 05:48:38 +0200 Subject: [PATCH 036/129] Update pytest from 8.2.0 to 8.2.1 (#1046) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/pytest/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/pytest/recipe.yaml b/recipes/recipes_emscripten/pytest/recipe.yaml index 966a19868..70909291b 100644 --- a/recipes/recipes_emscripten/pytest/recipe.yaml +++ b/recipes/recipes_emscripten/pytest/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 8.2.0 + version: 8.2.1 package: name: pytest @@ -7,7 +7,7 @@ package: source: url: https://pypi.io/packages/source/p/pytest/pytest-${{ version }}.tar.gz - sha256: d507d4482197eac0ba2bae2e9babf0672eb333017bcedaa5fb1a3d42c1174b3f + sha256: 5046e5b46d8e4cac199c373041f26be56fdb81eb4e67dc11d4e10811fc3408fd build: number: 0 From cc5bb96aacd13db85479e039022a1d9ea60146cd Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Tue, 21 May 2024 07:20:02 +0200 Subject: [PATCH 037/129] Update pythran from 0.15.0 to 0.16.0 (#1048) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/pythran/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/pythran/recipe.yaml b/recipes/recipes_emscripten/pythran/recipe.yaml index 335c1fb29..877d5b36a 100644 --- a/recipes/recipes_emscripten/pythran/recipe.yaml +++ b/recipes/recipes_emscripten/pythran/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 0.15.0 + version: 0.16.0 package: name: pythran @@ -7,7 +7,7 @@ package: source: url: https://github.com/serge-sans-paille/pythran/archive/refs/tags/${{ version}}.tar.gz - sha256: 082b80649a014e75dbdcde2220be47f5446d649362cc8cf9b14f611117a01550 + sha256: 56c42c745c4f253fb5053b3706345c6e111288f2f2df75e9dc265fff24e230de patches: # this is necessary to fix a problem with mutable global # [wasm-validator error in module] unexpected true: Imported global cannot be mutable From 75a76a2337abd0ff980f431af8e8788b5c708f41 Mon Sep 17 00:00:00 2001 From: Michael Weinold <23102087+michaelweinold@users.noreply.github.com> Date: Tue, 21 May 2024 05:20:37 -0400 Subject: [PATCH 038/129] initial commit (#1047) --- empack_config.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/empack_config.yaml b/empack_config.yaml index 9be7cf989..feac0afa4 100644 --- a/empack_config.yaml +++ b/empack_config.yaml @@ -145,6 +145,14 @@ packages: - pattern: 'html/**' - pattern: 'external/**' - pattern: '**/*.dist-info/METADATA' + pint: + include_patterns: + - pattern: '*.so' + - pattern: '*.py' + - pattern: '*.txt' + exclude_patterns: + - pattern: '**/tests/**/*.py' + - pattern: '**/tests/**/*.so' default: include_patterns: - pattern: '*.so' From 515d5f7d4b1ff851c9e341605be27f754b460b8a Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Tue, 21 May 2024 17:09:26 +0200 Subject: [PATCH 039/129] Add jpeg (alternative to libjpeg-turbo) (#1052) * add jpeg * clean recipe --- recipes/recipes_emscripten/jpeg/LICENSE.txt | 62 +++++++++++++++++++++ recipes/recipes_emscripten/jpeg/build.sh | 6 ++ recipes/recipes_emscripten/jpeg/recipe.yaml | 27 +++++++++ 3 files changed, 95 insertions(+) create mode 100644 recipes/recipes_emscripten/jpeg/LICENSE.txt create mode 100644 recipes/recipes_emscripten/jpeg/build.sh create mode 100644 recipes/recipes_emscripten/jpeg/recipe.yaml diff --git a/recipes/recipes_emscripten/jpeg/LICENSE.txt b/recipes/recipes_emscripten/jpeg/LICENSE.txt new file mode 100644 index 000000000..6e002fdff --- /dev/null +++ b/recipes/recipes_emscripten/jpeg/LICENSE.txt @@ -0,0 +1,62 @@ +LEGAL ISSUES +============ + +In plain English: + +1. We don't promise that this software works. (But if you find any bugs, + please let us know!) +2. You can use this software for whatever you want. You don't have to pay us. +3. You may not pretend that you wrote this software. If you use it in a + program, you must acknowledge somewhere in your documentation that + you've used the IJG code. + +In legalese: + +The authors make NO WARRANTY or representation, either express or implied, +with respect to this software, its quality, accuracy, merchantability, or +fitness for a particular purpose. This software is provided "AS IS", and you, +its user, assume the entire risk as to its quality and accuracy. + +This software is copyright (C) 1991-2016, Thomas G. Lane, Guido Vollbeding. +All Rights Reserved except as specified below. + +Permission is hereby granted to use, copy, modify, and distribute this +software (or portions thereof) for any purpose, without fee, subject to these +conditions: +(1) If any part of the source code for this software is distributed, then this +README file must be included, with this copyright and no-warranty notice +unaltered; and any additions, deletions, or changes to the original files +must be clearly indicated in accompanying documentation. +(2) If only executable code is distributed, then the accompanying +documentation must state that "this software is based in part on the work of +the Independent JPEG Group". +(3) Permission for use of this software is granted only if the user accepts +full responsibility for any undesirable consequences; the authors accept +NO LIABILITY for damages of any kind. + +These conditions apply to any software derived from or based on the IJG code, +not just to the unmodified library. If you use our work, you ought to +acknowledge us. + +Permission is NOT granted for the use of any IJG author's name or company name +in advertising or publicity relating to this software or products derived from +it. This software may be referred to only as "the Independent JPEG Group's +software". + +We specifically permit and encourage the use of this software as the basis of +commercial products, provided that all warranty or liability claims are +assumed by the product vendor. + + +The Unix configuration script "configure" was produced with GNU Autoconf. +It is copyright by the Free Software Foundation but is freely distributable. +The same holds for its supporting scripts (config.guess, config.sub, +ltmain.sh). Another support script, install-sh, is copyright by X Consortium +but is also freely distributable. + +The IJG distribution formerly included code to read and write GIF files. +To avoid entanglement with the Unisys LZW patent (now expired), GIF reading +support has been removed altogether, and the GIF writer has been simplified +to produce "uncompressed GIFs". This technique does not use the LZW +algorithm; the resulting GIF files are larger than usual, but are readable +by all standard GIF decoders. \ No newline at end of file diff --git a/recipes/recipes_emscripten/jpeg/build.sh b/recipes/recipes_emscripten/jpeg/build.sh new file mode 100644 index 000000000..d5f00f548 --- /dev/null +++ b/recipes/recipes_emscripten/jpeg/build.sh @@ -0,0 +1,6 @@ +emconfigure ./configure \ + --enable-shared=no \ + --enable-static=yes \ + --prefix=$PREFIX + +emmake make install \ No newline at end of file diff --git a/recipes/recipes_emscripten/jpeg/recipe.yaml b/recipes/recipes_emscripten/jpeg/recipe.yaml new file mode 100644 index 000000000..d54f5ccff --- /dev/null +++ b/recipes/recipes_emscripten/jpeg/recipe.yaml @@ -0,0 +1,27 @@ +context: + version: 9e + +package: + name: jpeg + version: ${{ version }} + +source: + url: http://www.ijg.org/files/jpegsrc.v${{ version }}.tar.gz + sha256: 4077d6a6a75aeb01884f708919d25934c93305e49f7e3f36db9129320e6f4f3d + +build: + number: 0 + +requirements: + build: + - libtool + - ${{ compiler('c') }} + - make + run_constraints: + - libjpeg-turbo <0.0.0a + +about: + homepage: http://www.ijg.org/ + license: IJG + license_file: LICENSE.txt + summary: read/write jpeg COM, EXIF, IPTC medata \ No newline at end of file From 64446e655bcf28ee15a29b99c022ab490d4d068e Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Tue, 21 May 2024 17:57:41 +0200 Subject: [PATCH 040/129] add fribidi (#1053) * add fribidi * clean recipe * install gettext and do not build ccache --- emsdk/setup_emsdk.sh | 6 ++-- recipes/recipes_emscripten/fribidi/build.sh | 6 ++++ .../recipes_emscripten/fribidi/recipe.yaml | 32 +++++++++++++++++++ 3 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 recipes/recipes_emscripten/fribidi/build.sh create mode 100644 recipes/recipes_emscripten/fribidi/recipe.yaml diff --git a/emsdk/setup_emsdk.sh b/emsdk/setup_emsdk.sh index 6d40c294f..ea35fbc48 100755 --- a/emsdk/setup_emsdk.sh +++ b/emsdk/setup_emsdk.sh @@ -50,9 +50,9 @@ cat $PATCH_DIR/*.patch | patch -p1 --verbose popd echo "...done" -echo "emsdk building ..." -./emsdk install --build=Release $EMSCRIPTEN_VERSION ccache-git-emscripten-64bit -echo "...done" +# echo "emsdk building ..." +# ./emsdk install --build=Release $EMSCRIPTEN_VERSION ccache-git-emscripten-64bit +# echo "...done" echo "emsdk activating ..." ./emsdk activate --embedded --build=Release $EMSCRIPTEN_VERSION diff --git a/recipes/recipes_emscripten/fribidi/build.sh b/recipes/recipes_emscripten/fribidi/build.sh new file mode 100644 index 000000000..d5f00f548 --- /dev/null +++ b/recipes/recipes_emscripten/fribidi/build.sh @@ -0,0 +1,6 @@ +emconfigure ./configure \ + --enable-shared=no \ + --enable-static=yes \ + --prefix=$PREFIX + +emmake make install \ No newline at end of file diff --git a/recipes/recipes_emscripten/fribidi/recipe.yaml b/recipes/recipes_emscripten/fribidi/recipe.yaml new file mode 100644 index 000000000..c23d37513 --- /dev/null +++ b/recipes/recipes_emscripten/fribidi/recipe.yaml @@ -0,0 +1,32 @@ +context: + version: "1.0.14" + +package: + name: fribidi + version: ${{ version }} + +source: + url: https://github.com/fribidi/fribidi/releases/download/v${{ version }}/fribidi-${{ version }}.tar.xz + sha256: 76ae204a7027652ac3981b9fa5817c083ba23114340284c58e756b259cd2259a + +build: + number: 0 + +requirements: + build: + - ${{ compiler('c') }} + - pkg-config + - gettext + +about: + homepage: https://github.com/fribidi/fribidi + license: LGPL-2.1 + license_file: COPYING + summary: The Free Implementation of the Unicode Bidirectional Algorithm. + description: | + One of the missing links stopping the penetration of free software in Middle + East is the lack of support for the Arabic and Hebrew alphabets. In order to + have proper Arabic and Hebrew support, the bidi algorithm needs to be + implemented. It is our hope that this library will stimulate more free + software in the Middle Eastern countries. + repository: https://github.com/fribidi/fribidi \ No newline at end of file From 82759cce47b21e8239590136cd2b9becacf737fb Mon Sep 17 00:00:00 2001 From: martinRenou Date: Tue, 21 May 2024 17:57:55 +0200 Subject: [PATCH 041/129] Remove leftover empack config (#1049) --- emci/constants.py | 1 - empack_config.yaml | 170 --------------------------------------------- 2 files changed, 171 deletions(-) delete mode 100644 empack_config.yaml diff --git a/emci/constants.py b/emci/constants.py index b9de1d90c..ee3c77578 100644 --- a/emci/constants.py +++ b/emci/constants.py @@ -12,7 +12,6 @@ REPO_ROOT = Path(THIS_DIR).parents[0].resolve() RECIPES_ROOT = REPO_ROOT / "recipes" RECIPES_EMSCRIPTEN_DIR = RECIPES_ROOT / "recipes_emscripten" -CONFIG_PATH = os.path.join(REPO_ROOT, "empack_config.yaml") # rattler build related diff --git a/empack_config.yaml b/empack_config.yaml deleted file mode 100644 index feac0afa4..000000000 --- a/empack_config.yaml +++ /dev/null @@ -1,170 +0,0 @@ -packages: - setuptools: - include_patterns: - - pattern: '**/pkg_resources/*.so' - - pattern: '**/pkg_resources/**/*.so' - - pattern: '**/pkg_resources/*.py' - - pattern: '**/pkg_resources/**/*.py' - - pattern: '**/*.dist-info/METADATA' - bokeh: - include_patterns: - - pattern: '*.so' - - pattern: '*.py' - - pattern: '**/bokeh/**/*.html' - - pattern: '**/bokeh/**/*.js' - - pattern: '**/bokeh/*.json' - - pattern: '**/*.dist-info/METADATA' - exclude_patterns: - - pattern: '**/tests/**/*.py' - - pattern: '**/tests/**/*.so' - plotly: - include_patterns: - - pattern: '*.so' - - pattern: '*.py' - - pattern: '**/plotly/package_data/**' - - pattern: '**/*.dist-info/METADATA' - exclude_patterns: - - pattern: '**/tests/**/*.py' - - pattern: '**/tests/**/*.so' - folium: - include_patterns: - - pattern: '*.so' - - pattern: '*.py' - - pattern: '*.json' - - pattern: '**/folium/templates/**' - - pattern: '**/*.dist-info/METADATA' - exclude_patterns: - - pattern: '**/tests/**/*.py' - - pattern: '**/tests/**/*.so' - branca: - include_patterns: - - pattern: '*.so' - - pattern: '*.py' - - pattern: '*.json' - - pattern: '**/branca/templates/**' - - pattern: '**/*.dist-info/METADATA' - exclude_patterns: - - pattern: '**/tests/**/*.py' - - pattern: '**/tests/**/*.so' - python-dateutil: - include_patterns: - - pattern: '*.so' - - pattern: '*.py' - - pattern: '*.json' - - pattern: '*dateutil-zoneinfo.tar.gz' - - pattern: '**/*.dist-info/METADATA' - exclude_patterns: - - pattern: '**/tests/**/*.py' - - pattern: '**/tests/**/*.so' - # For matplotlib <3.5.2 which didn't have matplotlib-base published - matplotlib: - include_patterns: - - pattern: '*.so' - - pattern: '*.py' - - pattern: '*.json' - - pattern: '**/matplotlib/mpl-data/**' - - pattern: '**/*.dist-info/METADATA' - exclude_patterns: - - pattern: '**/tests/**/*.py' - - pattern: '**/tests/**/*.so' - matplotlib-base: - include_patterns: - - pattern: '*.so' - - pattern: '*.py' - - pattern: '*.json' - - pattern: '**/matplotlib/mpl-data/**' - - pattern: '**/*.dist-info/METADATA' - exclude_patterns: - - pattern: '**/tests/**/*.py' - - pattern: '**/tests/**/*.so' - scikit-learn: - include_patterns: - - pattern: '*.so' - - pattern: '*.py' - - pattern: '*.json' - - pattern: '**/sklearn/datasets/**' - - pattern: '**/*.dist-info/METADATA' - exclude_patterns: - - pattern: '**/tests/**/*.py' - - pattern: '**/tests/**/*.so' - scikit-image: - include_patterns: - - pattern: '*.txt' - - pattern: '*.so' - - pattern: '*.py' - - pattern: '*.json' - - pattern: '**/skimage/data/**' - - pattern: '**/skimage/io/_plugins/*.ini' - - pattern: '**/*.dist-info/METADATA' - exclude_patterns: - - pattern: '**/tests/**/*.py' - - pattern: '**/tests/**/*.so' - xarray: - include_patterns: - - pattern: '**/*.py' - - pattern: '**/static/css/*.css' - - pattern: '**/static/html/*.html' - - pattern: '**/*.dist-info/METADATA' - exclude_patterns: - - pattern: '**/tests/**/*.py' - widgetsnbextension: - exclude_patterns: - - pattern: '**' - python: - include_patterns: - - pattern: '*.so' - - pattern: '*.py' - - pattern: '*.json' - - pattern: 'share/zoneinfo/**' - - pattern: '**/*.dist-info/METADATA' - exclude_patterns: - - pattern: '**/tests/**/*.py' - - pattern: '**/tests/**/*.so' - - pattern: '**/tests/*.py' - - pattern: '**/tests/*.so' - python-tzdata: - include_patterns: - - pattern: '*.so' - - pattern: '*.py' - - pattern: '*.json' - - pattern: 'share/zoneinfo/**' - - pattern: '**/tzdata/zoneinfo/**' - - pattern: '**/*.dist-info/METADATA' - exclude_patterns: - - pattern: '**/tests/**/*.py' - - pattern: '**/tests/**/*.so' - - pattern: '**/tests/*.py' - - pattern: '**/tests/*.so' - - pattern: '**/tzdata/zoneinfo/**/*.pyc' - zlib: - exclude_patterns: - - pattern: '**/so' - itables: - include_patterns: - - pattern: '*.py' - - pattern: 'html/**' - - pattern: 'external/**' - - pattern: '**/*.dist-info/METADATA' - pint: - include_patterns: - - pattern: '*.so' - - pattern: '*.py' - - pattern: '*.txt' - exclude_patterns: - - pattern: '**/tests/**/*.py' - - pattern: '**/tests/**/*.so' -default: - include_patterns: - - pattern: '*.so' - - pattern: '*.py' - - pattern: '*.json' - - pattern: 'share/zoneinfo/**' - - pattern: '**/*.dist-info/METADATA' - exclude_patterns: - - pattern: '**/tests/**/*.py' - - pattern: '**/tests/**/*.so' - - pattern: '**/tests/*.py' - - pattern: '**/tests/*.so' - - pattern: 'share/jupyter/nbextensions/**/*' - - pattern: 'share/jupyter/labextensions/**/*' - - pattern: 'etc/jupyter/nbconfig/**/*' From adb39a1431a49ba9134e1d231a6e6040315f11e2 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Wed, 22 May 2024 07:37:55 +0200 Subject: [PATCH 042/129] add glib (#1051) * add glib * add gettext and make * .. --------- Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/glib/build.sh | 9 + .../glib/patches/emscripten-configure.diff | 1132 +++++ .../glib/patches/emscripten-disable-pcre.diff | 3926 +++++++++++++++++ .../glib/patches/emscripten-function-ptr.diff | 2383 ++++++++++ .../glib/patches/emscripten-wasm.diff | 2588 +++++++++++ .../glib/patches/fix-python12.diff | 42 + recipes/recipes_emscripten/glib/recipe.yaml | 38 + 7 files changed, 10118 insertions(+) create mode 100644 recipes/recipes_emscripten/glib/build.sh create mode 100644 recipes/recipes_emscripten/glib/patches/emscripten-configure.diff create mode 100644 recipes/recipes_emscripten/glib/patches/emscripten-disable-pcre.diff create mode 100644 recipes/recipes_emscripten/glib/patches/emscripten-function-ptr.diff create mode 100644 recipes/recipes_emscripten/glib/patches/emscripten-wasm.diff create mode 100644 recipes/recipes_emscripten/glib/patches/fix-python12.diff create mode 100644 recipes/recipes_emscripten/glib/recipe.yaml diff --git a/recipes/recipes_emscripten/glib/build.sh b/recipes/recipes_emscripten/glib/build.sh new file mode 100644 index 000000000..eb0bdf01d --- /dev/null +++ b/recipes/recipes_emscripten/glib/build.sh @@ -0,0 +1,9 @@ +emconfigure ./configure \ + --enable-shared=no \ + --enable-static=yes \ + --with-threads=no \ + --with-pcre=internal \ + --disable-libmount \ + --prefix=${PREFIX} + +emmake make install \ No newline at end of file diff --git a/recipes/recipes_emscripten/glib/patches/emscripten-configure.diff b/recipes/recipes_emscripten/glib/patches/emscripten-configure.diff new file mode 100644 index 000000000..7c605e588 --- /dev/null +++ b/recipes/recipes_emscripten/glib/patches/emscripten-configure.diff @@ -0,0 +1,1132 @@ +Disables configure checks for threads, networking, and pcre, hard-coding the +results for Wasm. Also disables the building of unrequired output binaries. + +Index: glib-2.56.4/configure +=================================================================== +--- glib-2.56.4.orig/configure ++++ glib-2.56.4/configure +@@ -24230,132 +24230,17 @@ fi + + # We can't just use AC_CHECK_FUNC/AC_CHECK_LIB here. Bug 586150 + NETWORK_LIBS="" +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query" >&5 +-$as_echo_n "checking for res_query... " >&6; } +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +- #include +- #include +- #include + +-int +-main () +-{ ++ $as_echo "#define THREADS_POSIX 1" >>confdefs.h ++ $as_echo "#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1" >>confdefs.h ++ $as_echo "#define CLOCK_MONOTONIC 1" >>confdefs.h ++ THREADS_POSIX_TRUE= ++ THREADS_POSIX_FALSE='#' ++ THREADS_WIN32_TRUE='#' ++ THREADS_WIN32_FALSE= ++ THREADS_NONE_TRUE='#' ++ THREADS_NONE_FALSE= + +- res_query("test", 0, 0, (void *)0, 0); +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +-else +- save_libs="$LIBS" +- LIBS="-lresolv $LIBS" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +- #include +- #include +- #include +- +-int +-main () +-{ +- +- res_query("test", 0, 0, (void *)0, 0); +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: in -lresolv" >&5 +-$as_echo "in -lresolv" >&6; } +- NETWORK_LIBS="-lresolv $NETWORK_LIBS" +-else +- LIBS="-lbind $save_libs" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-int +-main () +-{ +-res_query("test", 0, 0, (void *)0, 0); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: in -lbind" >&5 +-$as_echo "in -lbind" >&6; } +- NETWORK_LIBS="-lbind $NETWORK_LIBS" +-else +- as_fn_error $? "not found" "$LINENO" 5 +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- LIBS="$save_libs" +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" +-if test "x$ac_cv_func_socket" = xyes; then : +- : +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 +-$as_echo_n "checking for socket in -lsocket... " >&6; } +-if ${ac_cv_lib_socket_socket+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lsocket $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char socket (); +-int +-main () +-{ +-return socket (); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_socket_socket=yes +-else +- ac_cv_lib_socket_socket=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 +-$as_echo "$ac_cv_lib_socket_socket" >&6; } +-if test "x$ac_cv_lib_socket_socket" = xyes; then : +- NETWORK_LIBS="-lsocket $NETWORK_LIBS" +-else +- as_fn_error $? "Could not find socket()" "$LINENO" 5 +-fi +- +-fi +- +- save_libs="$LIBS" +- LIBS="$LIBS $NETWORK_LIBS" +- + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init" >&5 + $as_echo_n "checking for res_init... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -26946,714 +26829,6 @@ fi + PLATFORM_WIN32_FALSE= + fi + +- +- +- +-# Check whether --with-threads was given. +-if test "${with_threads+set}" = set; then : +- withval=$with_threads; +-else +- with_threads=yes +-fi +- +- +- +-THREAD_NO_IMPLEMENTATION="No thread implementation found." +- +-FLAG_DOES_NOT_WORK="I can't find the MACRO to enable thread safety on your +- platform (normally it's "_REENTRANT"). I'll not use any flag on +- compilation now, but then your programs might not work. +- Please provide information on how it is done on your system." +- +-LIBS_NOT_FOUND_1="I can't find the libraries for the thread implementation +- " +- +-LIBS_NOT_FOUND_2=". Please choose another thread implementation or +- provide information on your thread implementation." +- +-FUNC_NO_GETPWUID_R="the 'g_get_(user_name|real_name|home_dir|tmp_dir)' +- functions will not be MT-safe during their first call because +- there is no working 'getpwuid_r' on your system." +- +-FUNC_NO_LOCALTIME_R="the 'g_date_set_time' function will not be MT-safe +- because there is no 'localtime_r' on your system." +- +-AIX_COMPILE_INFO="AIX's C compiler needs to be called by a different name, when +- linking threaded applications. As GLib cannot do that +- automatically, you will get an linkg error everytime you are +- not using the right compiler. In that case you have to relink +- with the right compiler. Ususally just '_r' is appended +- to the compiler name." +- +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread implementation" >&5 +-$as_echo_n "checking for thread implementation... " >&6; } +- +-have_threads=no +-if test "x$with_threads" = xyes || test "x$with_threads" = xposix; then : +- +- if test "x$have_threads" = xno; then : +- +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-int +-main () +-{ +-pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- have_threads=posix +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- +-fi +- # Tru64Unix requires -pthread to find pthread.h. See #103020 +- if test "x$have_threads" = xno; then +- glib_save_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS -pthread" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-int +-main () +-{ +-pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- have_threads=posix +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- CPPFLAGS="$glib_save_CPPFLAGS" +- fi +- +-fi +-if test "x$with_threads" = xyes || test "x$with_threads" = xwin32; then +- case $host in +- *-*-mingw*) +- have_threads=win32 +- ;; +- esac +-fi +- +-if test "x$have_threads" = xno; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none available" >&5 +-$as_echo "none available" >&6; } +- as_fn_error $? "$THREAD_NO_IMPLEMENTATION" "$LINENO" 5 +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_threads" >&5 +-$as_echo "$have_threads" >&6; } +-fi +- +- +- +-G_THREAD_LIBS= +-G_THREAD_LIBS_EXTRA= +-G_THREAD_CFLAGS= +- +- +- +-if test x"$have_threads" = xposix; then : +- +- # First we test for posix, whether -pthread or -pthreads do the trick as +- # both CPPFLAG and LIBS. +- # One of them does for most gcc versions and some other platforms/compilers +- # too and could be considered as the canonical way to go. +- case $host in +- *-*-cygwin*|*-*-darwin*) +- # skip cygwin and darwin -pthread or -pthreads test +- ;; +- *-solaris*) +- # These compiler/linker flags work with both Sun Studio and gcc +- # Sun Studio expands -mt to -D_REENTRANT and -lthread +- # gcc expands -pthreads to -D_REENTRANT -D_PTHREADS -lpthread +- G_THREAD_CFLAGS="-D_REENTRANT -D_PTHREADS" +- G_THREAD_LIBS="-lpthread -lthread" +- ;; +- *) +- for flag in pthread pthreads mt; do +- glib_save_CFLAGS="$CFLAGS" +- CFLAGS="$CFLAGS -$flag" +- if test "$cross_compiling" = yes; then : +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-#include +-int check_me = 0; +-void* func(void* data) {check_me = 42; return &check_me;} +-int main() +- { pthread_t t; +- void *ret; +- pthread_create (&t, 0, func, 0); +- pthread_join (t, &ret); +- return (check_me != 42 || ret != &check_me); +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- glib_flag_works=yes +-else +- glib_flag_works=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-#include +-int check_me = 0; +-void* func(void* data) {check_me = 42; return &check_me;} +-int main() +- { pthread_t t; +- void *ret; +- pthread_create (&t, 0, func, 0); +- pthread_join (t, &ret); +- return (check_me != 42 || ret != &check_me); +-} +-_ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- glib_flag_works=yes +-else +- glib_flag_works=no +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi +- +- CFLAGS="$glib_save_CFLAGS" +- if test $glib_flag_works = yes ; then +- G_THREAD_CFLAGS=-$flag +- G_THREAD_LIBS=-$flag +- break; +- fi +- done +- ;; +- esac +- +-fi +- +-if test x"$G_THREAD_CFLAGS" = x; then : +- +- +- # The canonical -pthread[s] does not work. Try something different. +- +- case $host in +- *-aix*) +- if test x"$GCC" = xyes; then +- # GCC 3.0 and above needs -pthread. +- # Should be coverd by the case above. +- # GCC 2.x and below needs -mthreads +- G_THREAD_CFLAGS="-mthreads" +- G_THREAD_LIBS=$G_THREAD_CFLAGS +- else +- # We are probably using the aix compiler. Normaly a +- # program would have to be compiled with the _r variant +- # of the corresponding compiler, but we as GLib cannot +- # do that: but the good news is that for compiling the +- # only difference is the added -D_THREAD_SAFE compile +- # option. This is according to the "C for AIX User's +- # Guide". +- G_THREAD_CFLAGS="-D_THREAD_SAFE" +- fi +- ;; +- *-sysv5uw7*) # UnixWare 7 +- # We are not using gcc with -pthread. Catched above. +- G_THREAD_CFLAGS="-Kthread" +- G_THREAD_LIBS=$G_THREAD_CFLAGS +- ;; +- *-mingw*) +- # No flag needed when using MSVCRT.DLL +- G_THREAD_CFLAGS="" +- ;; +- *) +- G_THREAD_CFLAGS="-D_REENTRANT" # good default guess otherwise +- ;; +- esac +- +-fi +- +-# if we are not finding the localtime_r function, then we probably are +-# not using the proper multithread flag +- +-glib_save_CPPFLAGS="$CPPFLAGS" +-CPPFLAGS="$CPPFLAGS $G_THREAD_CFLAGS" +- +-# First we test, whether localtime_r is declared in time.h +-# directly. Then we test whether a macro localtime_r exists, in +-# which case localtime_r in the test program is replaced and thus +-# if we still find localtime_r in the output, it is not defined as +-# a macro. +- +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "[^a-zA-Z1-9_]localtime_r[^a-zA-Z1-9_]" >/dev/null 2>&1; then : +- +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +- localtime_r(a,b) +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "[^a-zA-Z1-9_]localtime_r[^a-zA-Z1-9_]" >/dev/null 2>&1; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $FLAG_DOES_NOT_WORK" >&5 +-$as_echo "$as_me: WARNING: $FLAG_DOES_NOT_WORK" >&2;} +-fi +-rm -f conftest* +- +-fi +-rm -f conftest* +- +- +-CPPFLAGS="$glib_save_CPPFLAGS" +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking thread related cflags" >&5 +-$as_echo_n "checking thread related cflags... " >&6; } +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $G_THREAD_CFLAGS" >&5 +-$as_echo "$G_THREAD_CFLAGS" >&6; } +-CPPFLAGS="$CPPFLAGS $G_THREAD_CFLAGS" +- +- +-if test x$have_threads = xposix; then : +- +- glib_save_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS $GTHREAD_COMPILE_IMPL_DEFINES" +- if test x"$G_THREAD_LIBS" = x ; then : +- +- case $host in +- *-aix*) +- # We are not using gcc (would have set G_THREAD_LIBS) and thus +- # probably using the aix compiler. +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $AIX_COMPILE_INFO" >&5 +-$as_echo "$as_me: WARNING: $AIX_COMPILE_INFO" >&2;} +- ;; +- *) +- G_THREAD_LIBS=error +- glib_save_LIBS="$LIBS" +- for thread_lib in "" pthread pthread32 pthreads thread; do +- if test x"$thread_lib" = x; then +- add_thread_lib="" +- IN="" +- else +- add_thread_lib="-l$thread_lib" +- IN=" in -l$thread_lib" +- fi +- if test x"$have_threads" = xposix; then +- defattr=0 +- else +- defattr=pthread_attr_default +- fi +- +- LIBS="$add_thread_lib $glib_save_LIBS" +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create/pthread_join$IN" >&5 +-$as_echo_n "checking for pthread_create/pthread_join$IN... " >&6; } +- if test "$cross_compiling" = yes; then : +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-#include +-int check_me = 0; +-void* func(void* data) {check_me = 42; return &check_me;} +-int main() +- { pthread_t t; +- void *ret; +- pthread_create (&t, $defattr, func, 0); +- pthread_join (t, &ret); +- return (check_me != 42 || ret != &check_me); +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- glib_result=yes +-else +- glib_result=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-#include +-int check_me = 0; +-void* func(void* data) {check_me = 42; return &check_me;} +-int main() +- { pthread_t t; +- void *ret; +- pthread_create (&t, $defattr, func, 0); +- pthread_join (t, &ret); +- return (check_me != 42 || ret != &check_me); +-} +-_ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- glib_result=yes +-else +- glib_result=no +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glib_result" >&5 +-$as_echo "$glib_result" >&6; } +- +- if test "$glib_result" = "yes" ; then +- G_THREAD_LIBS="$add_thread_lib" +- break +- fi +- done +- if test "x$G_THREAD_LIBS" = xerror; then +- as_fn_error $? "$LIBS_NOT_FOUND_1$have_threads$LIBS_NOT_FOUND_2" "$LINENO" 5 +- fi +- LIBS="$glib_save_LIBS" +- ;; +- esac +- +-fi +- +- g_threads_impl="POSIX" +- +-$as_echo "#define THREADS_POSIX 1" >>confdefs.h +- +- +- CPPFLAGS="$glib_save_CPPFLAGS" +- +-elif test x$have_threads = xwin32; then : +- +- +-$as_echo "#define THREADS_WIN32 1" >>confdefs.h +- +- g_threads_impl="WIN32" +- +-else +- +- +-$as_echo "#define THREADS_NONE 1" >>confdefs.h +- +- g_threads_impl="NONE" +- G_THREAD_LIBS=error +- +-fi +- if test "$g_threads_impl" = "POSIX"; then +- THREADS_POSIX_TRUE= +- THREADS_POSIX_FALSE='#' +-else +- THREADS_POSIX_TRUE='#' +- THREADS_POSIX_FALSE= +-fi +- +- if test "$g_threads_impl" = "WIN32"; then +- THREADS_WIN32_TRUE= +- THREADS_WIN32_FALSE='#' +-else +- THREADS_WIN32_TRUE='#' +- THREADS_WIN32_FALSE= +-fi +- +- if test "$g_threads_impl" = "NONE"; then +- THREADS_NONE_TRUE= +- THREADS_NONE_FALSE='#' +-else +- THREADS_NONE_TRUE='#' +- THREADS_NONE_FALSE= +-fi +- +- +-if test "x$G_THREAD_LIBS" = xerror; then +- as_fn_error $? "$LIBS_NOT_FOUND_1$have_threads$LIBS_NOT_FOUND_2" "$LINENO" 5 +-fi +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking thread related libraries" >&5 +-$as_echo_n "checking thread related libraries... " >&6; } +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $G_THREAD_LIBS" >&5 +-$as_echo "$G_THREAD_LIBS" >&6; } +- +- +-glib_save_LIBS="$LIBS" +-# we are not doing the following for now, as this might require glib +-# to always be linked with the thread libs on some platforms. +-# LIBS="$LIBS $G_THREAD_LIBS" +-for ac_func in localtime_r gmtime_r getpwuid_r getgrgid_r +-do : +- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +-if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF +- +-fi +-done +- +- +-LIBS="$G_THREAD_LIBS $LIBS" +-if test x"$have_threads" = xposix; then : +- +- glib_save_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS $GTHREAD_COMPILE_IMPL_DEFINES" +- # This is not AC_CHECK_FUNC to also work with function +- # name mangling in header files. +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_attr_setstacksize" >&5 +-$as_echo_n "checking for pthread_attr_setstacksize... " >&6; } +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-int +-main () +-{ +-pthread_attr_t t; pthread_attr_setstacksize(&t,0) +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- +-$as_echo "#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1" >>confdefs.h +- +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_condattr_setclock" >&5 +-$as_echo_n "checking for pthread_condattr_setclock... " >&6; } +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-int +-main () +-{ +-pthread_condattr_t a; pthread_condattr_setclock(&a,0) +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- +-$as_echo "#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1" >>confdefs.h +- +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_cond_timedwait_relative_np" >&5 +-$as_echo_n "checking for pthread_cond_timedwait_relative_np... " >&6; } +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-int +-main () +-{ +-pthread_cond_timedwait_relative_np(NULL, NULL, NULL) +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- +-$as_echo "#define HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP 1" >>confdefs.h +- +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_setname_np(const char*)" >&5 +-$as_echo_n "checking for pthread_setname_np(const char*)... " >&6; } +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-int +-main () +-{ +-pthread_setname_np("example") +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- +-$as_echo "#define HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID 1" >>confdefs.h +- +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_setname_np(pthread_t, const char*)" >&5 +-$as_echo_n "checking for pthread_setname_np(pthread_t, const char*)... " >&6; } +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-int +-main () +-{ +-pthread_setname_np(pthread_self(), "example") +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- +-$as_echo "#define HAVE_PTHREAD_SETNAME_NP_WITH_TID 1" >>confdefs.h +- +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_getname_np(pthread_t, name, len)" >&5 +-$as_echo_n "checking for pthread_getname_np(pthread_t, name, len)... " >&6; } +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-int +-main () +-{ +-char name[16]; pthread_getname_np(pthread_self(), name, 16); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- +-$as_echo "#define HAVE_PTHREAD_GETNAME_NP 1" >>confdefs.h +- +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- CPPFLAGS="$glib_save_CPPFLAGS" +- +-fi +- +-LIBS="$glib_save_LIBS" +- +-# now spit out all the warnings. +-if test "$ac_cv_func_getpwuid_r" != "yes"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $FUNC_NO_GETPWUID_R" >&5 +-$as_echo "$as_me: WARNING: $FUNC_NO_GETPWUID_R" >&2;} +-fi +-if test "$ac_cv_func_localtime_r" != "yes"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $FUNC_NO_LOCALTIME_R" >&5 +-$as_echo "$as_me: WARNING: $FUNC_NO_LOCALTIME_R" >&2;} +-fi +- +-# +-# Hack to deal with: +-# +-# a) GCC < 3.3 for Linux doesn't include -lpthread when +-# building shared libraries with linux. +-# b) FreeBSD doesn't do this either. +-# +-case $host in +- *android*) +- G_THREAD_LIBS_FOR_GTHREAD="$G_THREAD_LIBS" +- ;; +- *-*-freebsd*|*-*-linux*) +- G_THREAD_LIBS_FOR_GTHREAD="`echo $G_THREAD_LIBS | sed s/-pthread/-lpthread/`" +- ;; +- *) +- G_THREAD_LIBS_FOR_GTHREAD="$G_THREAD_LIBS" +- ;; +-esac +- +- +- +- +- +- +-for ac_func in clock_gettime +-do : +- ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" +-if test "x$ac_cv_func_clock_gettime" = xyes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_CLOCK_GETTIME 1 +-_ACEOF +- +-else +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 +-$as_echo_n "checking for clock_gettime in -lrt... " >&6; } +-if ${ac_cv_lib_rt_clock_gettime+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lrt $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char clock_gettime (); +-int +-main () +-{ +-return clock_gettime (); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_rt_clock_gettime=yes +-else +- ac_cv_lib_rt_clock_gettime=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 +-$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } +-if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : +- +- G_THREAD_LIBS="$G_THREAD_LIBS -lrt" +- G_THREAD_LIBS_FOR_GTHREAD="$G_THREAD_LIBS_FOR_GTHREAD -lrt" +- +-fi +- +- +-fi +-done +- +- +- +- +- +- + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lock-free atomic intrinsics" >&5 + $as_echo_n "checking for lock-free atomic intrinsics... " >&6; } + if ${glib_cv_g_atomic_lock_free+:} false; then : +@@ -27998,208 +27173,13 @@ $as_echo "$broken_poll" >&6; } + $as_echo "$broken_poll" >&6; } + + +-PCRE_REQUIRED_VERSION=8.13 +- +-# Check if we should use the internal or the system-supplied pcre +- +-# Check whether --with-pcre was given. +-if test "${with_pcre+set}" = set; then : +- withval=$with_pcre; +-else +- with_pcre=system +-fi +- +- +- if test "x$with_pcre" = xsystem; then +- USE_SYSTEM_PCRE_TRUE= +- USE_SYSTEM_PCRE_FALSE='#' +-else +- USE_SYSTEM_PCRE_TRUE='#' +- USE_SYSTEM_PCRE_FALSE= +-fi +- +- +-if test "x$with_pcre" = xsystem; then : +- +- +-pkg_failed=no +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PCRE" >&5 +-$as_echo_n "checking for PCRE... " >&6; } +- +-if test -n "$PCRE_CFLAGS"; then +- pkg_cv_PCRE_CFLAGS="$PCRE_CFLAGS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre >= \$PCRE_REQUIRED_VERSION\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "libpcre >= $PCRE_REQUIRED_VERSION") 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; then +- pkg_cv_PCRE_CFLAGS=`$PKG_CONFIG --cflags "libpcre >= $PCRE_REQUIRED_VERSION" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes +-else +- pkg_failed=yes +-fi +- else +- pkg_failed=untried +-fi +-if test -n "$PCRE_LIBS"; then +- pkg_cv_PCRE_LIBS="$PCRE_LIBS" +- elif test -n "$PKG_CONFIG"; then +- if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre >= \$PCRE_REQUIRED_VERSION\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "libpcre >= $PCRE_REQUIRED_VERSION") 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; then +- pkg_cv_PCRE_LIBS=`$PKG_CONFIG --libs "libpcre >= $PCRE_REQUIRED_VERSION" 2>/dev/null` +- test "x$?" != "x0" && pkg_failed=yes +-else +- pkg_failed=yes +-fi +- else +- pkg_failed=untried +-fi +- +- +- +-if test $pkg_failed = yes; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- +-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then +- _pkg_short_errors_supported=yes +-else +- _pkg_short_errors_supported=no +-fi +- if test $_pkg_short_errors_supported = yes; then +- PCRE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpcre >= $PCRE_REQUIRED_VERSION" 2>&1` +- else +- PCRE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpcre >= $PCRE_REQUIRED_VERSION" 2>&1` +- fi +- # Put the nasty error message in config.log where it belongs +- echo "$PCRE_PKG_ERRORS" >&5 +- +- as_fn_error $? "Package requirements (libpcre >= $PCRE_REQUIRED_VERSION) were not met: +- +-$PCRE_PKG_ERRORS +- +-Consider adjusting the PKG_CONFIG_PATH environment variable if you +-installed software in a non-standard prefix. +- +-Alternatively, you may set the environment variables PCRE_CFLAGS +-and PCRE_LIBS to avoid the need to call pkg-config. +-See the pkg-config man page for more details." "$LINENO" 5 +-elif test $pkg_failed = untried; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +-is in your PATH or set the PKG_CONFIG environment variable to the full +-path to pkg-config. +- +-Alternatively, you may set the environment variables PCRE_CFLAGS +-and PCRE_LIBS to avoid the need to call pkg-config. +-See the pkg-config man page for more details. +- +-To get pkg-config, see . +-See \`config.log' for more details" "$LINENO" 5; } +-else +- PCRE_CFLAGS=$pkg_cv_PCRE_CFLAGS +- PCRE_LIBS=$pkg_cv_PCRE_LIBS +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- +-fi +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Unicode support in PCRE" >&5 +-$as_echo_n "checking for Unicode support in PCRE... " >&6; } +-if ${glib_cv_pcre_has_unicode+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- +- glib_save_CFLAGS="$CFLAGS" +- glib_save_LIBS="$LIBS" +- CFLAGS="$CFLAGS $PCRE_CFLAGS" LIBS="$PCRE_LIBS" +- if test "$cross_compiling" = yes; then : +- glib_cv_pcre_has_unicode=yes +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +- int main () { +- int support; +- pcre_config (PCRE_CONFIG_UTF8, &support); +- if (!support) +- return 1; +- pcre_config (PCRE_CONFIG_UNICODE_PROPERTIES, &support); +- if (!support) +- return 1; +- return 0; +- } +-_ACEOF +-if ac_fn_c_try_run "$LINENO"; then : +- glib_cv_pcre_has_unicode=yes +-else +- glib_cv_pcre_has_unicode=no +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi +- +- CFLAGS="$glib_save_CFLAGS" +- LIBS="$glib_save_LIBS" +- +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glib_cv_pcre_has_unicode" >&5 +-$as_echo "$glib_cv_pcre_has_unicode" >&6; } +- if test "$glib_cv_pcre_has_unicode" = "no"; then +- as_fn_error $? "*** The system-supplied PCRE does not support Unicode properties or UTF-8." "$LINENO" 5 +- fi +- +- +- + $as_echo "#define USE_SYSTEM_PCRE /**/" >>confdefs.h ++USE_SYSTEM_PCRE_TRUE= ++USE_SYSTEM_PCRE_FALSE='#' + +- PCRE_REQUIRES=libpcre +- +- +-else +- +- # If using gcc 4 pass -Wno-pointer-sign when compiling the internal PCRE +- if test x"$GCC" = xyes; then : +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler understands -Wno-pointer-sign" >&5 +-$as_echo_n "checking whether compiler understands -Wno-pointer-sign... " >&6; } +- save_CFLAGS="$CFLAGS" +- CFLAGS="$CFLAGS -Wno-pointer-sign" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- PCRE_WARN_CFLAGS="$PCRE_WARN_CFLAGS -Wno-pointer-sign" +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- CFLAGS="$save_CFLAGS" +- +-fi +- +-fi +- +- ++G_THREAD_LIBS=' ' ++G_THREAD_LIBS_EXTRA=' ' ++G_THREAD_CFLAGS=' ' + + case $host in + *-*-cygwin*) +Index: glib-2.56.4/gio/Makefile.in +=================================================================== +--- glib-2.56.4.orig/gio/Makefile.in ++++ glib-2.56.4/gio/Makefile.in +@@ -195,9 +195,7 @@ TESTS = $(am__EXEEXT_2) + @OS_COCOA_TRUE@am__append_39 = libgio-objc-2.0.la + @HAVE_LIBMOUNT_TRUE@am__append_40 = $(LIBMOUNT_CFLAGS) + @HAVE_LIBMOUNT_TRUE@am__append_41 = $(LIBMOUNT_LIBS) +-bin_PROGRAMS = gio-querymodules$(EXEEXT) glib-compile-schemas$(EXEEXT) \ +- glib-compile-resources$(EXEEXT) gsettings$(EXEEXT) \ +- gdbus$(EXEEXT) $(am__EXEEXT_1) gresource$(EXEEXT) gio$(EXEEXT) ++bin_PROGRAMS = + @ENABLE_DTRACE_TRUE@am__append_42 = gio_probes.h gio_probes.lo + @ENABLE_DTRACE_TRUE@am__append_43 = gio_probes.h gio_probes.h.tmp + @ENABLE_DTRACE_TRUE@am__append_44 = gio_probes.lo +Index: glib-2.56.4/glib/Makefile.in +=================================================================== +--- glib-2.56.4.orig/glib/Makefile.in ++++ glib-2.56.4/glib/Makefile.in +@@ -170,7 +170,7 @@ TESTS = $(am__EXEEXT_5) + @ENABLE_SYSTEMTAP_TRUE@am__append_22 = $(tapset_DATA) + @OS_WIN32_TRUE@@OS_WIN32_X64_TRUE@am__append_23 = gspawn-win64-helper gspawn-win64-helper-console + @OS_WIN32_TRUE@@OS_WIN32_X64_FALSE@am__append_24 = gspawn-win32-helper gspawn-win32-helper-console +-bin_PROGRAMS = $(am__EXEEXT_4) ++bin_PROGRAMS = + @OS_UNIX_TRUE@am__append_25 = gtester + @OS_UNIX_TRUE@am__append_26 = ${auto_config_binscripts} + subdir = glib +Index: glib-2.56.4/gobject/Makefile.in +=================================================================== +--- glib-2.56.4.orig/gobject/Makefile.in ++++ glib-2.56.4/gobject/Makefile.in +@@ -165,7 +165,7 @@ TESTS = $(am__EXEEXT_1) + @ENABLE_DTRACE_TRUE@am__append_17 = gobject_probes.h + @ENABLE_DTRACE_TRUE@am__append_18 = gobject_probes.lo + @ENABLE_SYSTEMTAP_TRUE@am__append_19 = $(tapset_DATA) +-bin_PROGRAMS = gobject-query$(EXEEXT) ++bin_PROGRAMS = + subdir = gobject + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/m4macros/attributes.m4 \ +Index: glib-2.56.4/Makefile.in +=================================================================== +--- glib-2.56.4.orig/Makefile.in ++++ glib-2.56.4/Makefile.in +@@ -834,7 +834,7 @@ ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS} + + @ENABLE_INSTALLED_TESTS_TRUE@installed_test_meta_DATA = $(installed_testcases:=.test) + ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS} +-SUBDIRS = . m4macros glib gmodule gthread gobject gio po docs tests ++SUBDIRS = . m4macros glib gmodule gthread gobject gio po docs + DIST_SUBDIRS = $(SUBDIRS) build win32 + bin_SCRIPTS = glib-gettextize + AM_CPPFLAGS = \ diff --git a/recipes/recipes_emscripten/glib/patches/emscripten-disable-pcre.diff b/recipes/recipes_emscripten/glib/patches/emscripten-disable-pcre.diff new file mode 100644 index 000000000..19285bc65 --- /dev/null +++ b/recipes/recipes_emscripten/glib/patches/emscripten-disable-pcre.diff @@ -0,0 +1,3926 @@ +Disables use of PCRE in the glib code base. + +Index: glib-2.56.4/gio/gsettingsschema.c +=================================================================== +--- glib-2.56.4.orig/gio/gsettingsschema.c ++++ glib-2.56.4/gio/gsettingsschema.c +@@ -534,58 +534,7 @@ normalise_whitespace (const gchar *orig) + static gchar * + normalise_whitespace (const gchar *orig) + { +- /* We normalise by the same rules as in intltool: +- * +- * sub cleanup { +- * s/^\s+//; +- * s/\s+$//; +- * s/\s+/ /g; +- * return $_; +- * } +- * +- * $message = join "\n\n", map &cleanup, split/\n\s*\n+/, $message; +- * +- * Where \s is an ascii space character. +- * +- * We aim for ease of implementation over efficiency -- this code is +- * not run in normal applications. +- */ +- static GRegex *cleanup[3]; +- static GRegex *splitter; +- gchar **lines; +- gchar *result; +- gint i; +- +- if (g_once_init_enter (&splitter)) +- { +- GRegex *s; +- +- cleanup[0] = g_regex_new ("^\\s+", 0, 0, 0); +- cleanup[1] = g_regex_new ("\\s+$", 0, 0, 0); +- cleanup[2] = g_regex_new ("\\s+", 0, 0, 0); +- s = g_regex_new ("\\n\\s*\\n+", 0, 0, 0); +- +- g_once_init_leave (&splitter, s); +- } +- +- lines = g_regex_split (splitter, orig, 0); +- for (i = 0; lines[i]; i++) +- { +- gchar *a, *b, *c; +- +- a = g_regex_replace_literal (cleanup[0], lines[i], -1, 0, "", 0, 0); +- b = g_regex_replace_literal (cleanup[1], a, -1, 0, "", 0, 0); +- c = g_regex_replace_literal (cleanup[2], b, -1, 0, " ", 0, 0); +- g_free (lines[i]); +- g_free (a); +- g_free (b); +- lines[i] = c; +- } +- +- result = g_strjoinv ("\n\n", lines); +- g_strfreev (lines); +- +- return result; ++ return orig; + } + + static void +Index: glib-2.56.4/glib/glib.h +=================================================================== +--- glib-2.56.4.orig/glib/glib.h ++++ glib-2.56.4/glib/glib.h +@@ -69,7 +69,6 @@ + #include + #include + #include +-#include + #include + #include + #include +Index: glib-2.56.4/glib/gregex.c +=================================================================== +--- glib-2.56.4.orig/glib/gregex.c ++++ glib-2.56.4/glib/gregex.c +@@ -1,3182 +0,0 @@ +-/* GRegex -- regular expression API wrapper around PCRE. +- * +- * Copyright (C) 1999, 2000 Scott Wimer +- * Copyright (C) 2004, Matthias Clasen +- * Copyright (C) 2005 - 2007, Marco Barisione +- * +- * This library is free software; you can redistribute it and/or +- * modify it under the terms of the GNU Lesser General Public +- * License as published by the Free Software Foundation; either +- * version 2.1 of the License, or (at your option) any later version. +- * +- * This library is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * Lesser General Public License for more details. +- * +- * You should have received a copy of the GNU Lesser General Public License +- * along with this library; if not, see . +- */ +- +-#include "config.h" +- +-#include +- +-#ifdef USE_SYSTEM_PCRE +-#include +-#else +-#include "pcre/pcre.h" +-#endif +- +-#include "gtypes.h" +-#include "gregex.h" +-#include "glibintl.h" +-#include "glist.h" +-#include "gmessages.h" +-#include "gstrfuncs.h" +-#include "gatomic.h" +-#include "gthread.h" +- +-/** +- * SECTION:gregex +- * @title: Perl-compatible regular expressions +- * @short_description: matches strings against regular expressions +- * @see_also: [Regular expression syntax][glib-regex-syntax] +- * +- * The g_regex_*() functions implement regular +- * expression pattern matching using syntax and semantics similar to +- * Perl regular expression. +- * +- * Some functions accept a @start_position argument, setting it differs +- * from just passing over a shortened string and setting #G_REGEX_MATCH_NOTBOL +- * in the case of a pattern that begins with any kind of lookbehind assertion. +- * For example, consider the pattern "\Biss\B" which finds occurrences of "iss" +- * in the middle of words. ("\B" matches only if the current position in the +- * subject is not a word boundary.) When applied to the string "Mississipi" +- * from the fourth byte, namely "issipi", it does not match, because "\B" is +- * always false at the start of the subject, which is deemed to be a word +- * boundary. However, if the entire string is passed , but with +- * @start_position set to 4, it finds the second occurrence of "iss" because +- * it is able to look behind the starting point to discover that it is +- * preceded by a letter. +- * +- * Note that, unless you set the #G_REGEX_RAW flag, all the strings passed +- * to these functions must be encoded in UTF-8. The lengths and the positions +- * inside the strings are in bytes and not in characters, so, for instance, +- * "\xc3\xa0" (i.e. "à") is two bytes long but it is treated as a +- * single character. If you set #G_REGEX_RAW the strings can be non-valid +- * UTF-8 strings and a byte is treated as a character, so "\xc3\xa0" is two +- * bytes and two characters long. +- * +- * When matching a pattern, "\n" matches only against a "\n" character in +- * the string, and "\r" matches only a "\r" character. To match any newline +- * sequence use "\R". This particular group matches either the two-character +- * sequence CR + LF ("\r\n"), or one of the single characters LF (linefeed, +- * U+000A, "\n"), VT vertical tab, U+000B, "\v"), FF (formfeed, U+000C, "\f"), +- * CR (carriage return, U+000D, "\r"), NEL (next line, U+0085), LS (line +- * separator, U+2028), or PS (paragraph separator, U+2029). +- * +- * The behaviour of the dot, circumflex, and dollar metacharacters are +- * affected by newline characters, the default is to recognize any newline +- * character (the same characters recognized by "\R"). This can be changed +- * with #G_REGEX_NEWLINE_CR, #G_REGEX_NEWLINE_LF and #G_REGEX_NEWLINE_CRLF +- * compile options, and with #G_REGEX_MATCH_NEWLINE_ANY, +- * #G_REGEX_MATCH_NEWLINE_CR, #G_REGEX_MATCH_NEWLINE_LF and +- * #G_REGEX_MATCH_NEWLINE_CRLF match options. These settings are also +- * relevant when compiling a pattern if #G_REGEX_EXTENDED is set, and an +- * unescaped "#" outside a character class is encountered. This indicates +- * a comment that lasts until after the next newline. +- * +- * When setting the %G_REGEX_JAVASCRIPT_COMPAT flag, pattern syntax and pattern +- * matching is changed to be compatible with the way that regular expressions +- * work in JavaScript. More precisely, a lonely ']' character in the pattern +- * is a syntax error; the '\x' escape only allows 0 to 2 hexadecimal digits, and +- * you must use the '\u' escape sequence with 4 hex digits to specify a unicode +- * codepoint instead of '\x' or 'x{....}'. If '\x' or '\u' are not followed by +- * the specified number of hex digits, they match 'x' and 'u' literally; also +- * '\U' always matches 'U' instead of being an error in the pattern. Finally, +- * pattern matching is modified so that back references to an unset subpattern +- * group produces a match with the empty string instead of an error. See +- * pcreapi(3) for more information. +- * +- * Creating and manipulating the same #GRegex structure from different +- * threads is not a problem as #GRegex does not modify its internal +- * state between creation and destruction, on the other hand #GMatchInfo +- * is not threadsafe. +- * +- * The regular expressions low-level functionalities are obtained through +- * the excellent +- * [PCRE](http://www.pcre.org/) +- * library written by Philip Hazel. +- */ +- +-/* Mask of all the possible values for GRegexCompileFlags. */ +-#define G_REGEX_COMPILE_MASK (G_REGEX_CASELESS | \ +- G_REGEX_MULTILINE | \ +- G_REGEX_DOTALL | \ +- G_REGEX_EXTENDED | \ +- G_REGEX_ANCHORED | \ +- G_REGEX_DOLLAR_ENDONLY | \ +- G_REGEX_UNGREEDY | \ +- G_REGEX_RAW | \ +- G_REGEX_NO_AUTO_CAPTURE | \ +- G_REGEX_OPTIMIZE | \ +- G_REGEX_FIRSTLINE | \ +- G_REGEX_DUPNAMES | \ +- G_REGEX_NEWLINE_CR | \ +- G_REGEX_NEWLINE_LF | \ +- G_REGEX_NEWLINE_CRLF | \ +- G_REGEX_NEWLINE_ANYCRLF | \ +- G_REGEX_BSR_ANYCRLF | \ +- G_REGEX_JAVASCRIPT_COMPAT) +- +-/* Mask of all GRegexCompileFlags values that are (not) passed trough to PCRE */ +-#define G_REGEX_COMPILE_PCRE_MASK (G_REGEX_COMPILE_MASK & ~G_REGEX_COMPILE_NONPCRE_MASK) +-#define G_REGEX_COMPILE_NONPCRE_MASK (G_REGEX_RAW | \ +- G_REGEX_OPTIMIZE) +- +-/* Mask of all the possible values for GRegexMatchFlags. */ +-#define G_REGEX_MATCH_MASK (G_REGEX_MATCH_ANCHORED | \ +- G_REGEX_MATCH_NOTBOL | \ +- G_REGEX_MATCH_NOTEOL | \ +- G_REGEX_MATCH_NOTEMPTY | \ +- G_REGEX_MATCH_PARTIAL | \ +- G_REGEX_MATCH_NEWLINE_CR | \ +- G_REGEX_MATCH_NEWLINE_LF | \ +- G_REGEX_MATCH_NEWLINE_CRLF | \ +- G_REGEX_MATCH_NEWLINE_ANY | \ +- G_REGEX_MATCH_NEWLINE_ANYCRLF | \ +- G_REGEX_MATCH_BSR_ANYCRLF | \ +- G_REGEX_MATCH_BSR_ANY | \ +- G_REGEX_MATCH_PARTIAL_SOFT | \ +- G_REGEX_MATCH_PARTIAL_HARD | \ +- G_REGEX_MATCH_NOTEMPTY_ATSTART) +- +-/* we rely on these flags having the same values */ +-G_STATIC_ASSERT (G_REGEX_CASELESS == PCRE_CASELESS); +-G_STATIC_ASSERT (G_REGEX_MULTILINE == PCRE_MULTILINE); +-G_STATIC_ASSERT (G_REGEX_DOTALL == PCRE_DOTALL); +-G_STATIC_ASSERT (G_REGEX_EXTENDED == PCRE_EXTENDED); +-G_STATIC_ASSERT (G_REGEX_ANCHORED == PCRE_ANCHORED); +-G_STATIC_ASSERT (G_REGEX_DOLLAR_ENDONLY == PCRE_DOLLAR_ENDONLY); +-G_STATIC_ASSERT (G_REGEX_UNGREEDY == PCRE_UNGREEDY); +-G_STATIC_ASSERT (G_REGEX_NO_AUTO_CAPTURE == PCRE_NO_AUTO_CAPTURE); +-G_STATIC_ASSERT (G_REGEX_FIRSTLINE == PCRE_FIRSTLINE); +-G_STATIC_ASSERT (G_REGEX_DUPNAMES == PCRE_DUPNAMES); +-G_STATIC_ASSERT (G_REGEX_NEWLINE_CR == PCRE_NEWLINE_CR); +-G_STATIC_ASSERT (G_REGEX_NEWLINE_LF == PCRE_NEWLINE_LF); +-G_STATIC_ASSERT (G_REGEX_NEWLINE_CRLF == PCRE_NEWLINE_CRLF); +-G_STATIC_ASSERT (G_REGEX_NEWLINE_ANYCRLF == PCRE_NEWLINE_ANYCRLF); +-G_STATIC_ASSERT (G_REGEX_BSR_ANYCRLF == PCRE_BSR_ANYCRLF); +-G_STATIC_ASSERT (G_REGEX_JAVASCRIPT_COMPAT == PCRE_JAVASCRIPT_COMPAT); +- +-G_STATIC_ASSERT (G_REGEX_MATCH_ANCHORED == PCRE_ANCHORED); +-G_STATIC_ASSERT (G_REGEX_MATCH_NOTBOL == PCRE_NOTBOL); +-G_STATIC_ASSERT (G_REGEX_MATCH_NOTEOL == PCRE_NOTEOL); +-G_STATIC_ASSERT (G_REGEX_MATCH_NOTEMPTY == PCRE_NOTEMPTY); +-G_STATIC_ASSERT (G_REGEX_MATCH_PARTIAL == PCRE_PARTIAL); +-G_STATIC_ASSERT (G_REGEX_MATCH_NEWLINE_CR == PCRE_NEWLINE_CR); +-G_STATIC_ASSERT (G_REGEX_MATCH_NEWLINE_LF == PCRE_NEWLINE_LF); +-G_STATIC_ASSERT (G_REGEX_MATCH_NEWLINE_CRLF == PCRE_NEWLINE_CRLF); +-G_STATIC_ASSERT (G_REGEX_MATCH_NEWLINE_ANY == PCRE_NEWLINE_ANY); +-G_STATIC_ASSERT (G_REGEX_MATCH_NEWLINE_ANYCRLF == PCRE_NEWLINE_ANYCRLF); +-G_STATIC_ASSERT (G_REGEX_MATCH_BSR_ANYCRLF == PCRE_BSR_ANYCRLF); +-G_STATIC_ASSERT (G_REGEX_MATCH_BSR_ANY == PCRE_BSR_UNICODE); +-G_STATIC_ASSERT (G_REGEX_MATCH_PARTIAL_SOFT == PCRE_PARTIAL_SOFT); +-G_STATIC_ASSERT (G_REGEX_MATCH_PARTIAL_HARD == PCRE_PARTIAL_HARD); +-G_STATIC_ASSERT (G_REGEX_MATCH_NOTEMPTY_ATSTART == PCRE_NOTEMPTY_ATSTART); +- +-/* These PCRE flags are unused or not exposed publically in GRegexFlags, so +- * it should be ok to reuse them for different things. +- */ +-G_STATIC_ASSERT (G_REGEX_OPTIMIZE == PCRE_NO_UTF8_CHECK); +-G_STATIC_ASSERT (G_REGEX_RAW == PCRE_UTF8); +- +-/* if the string is in UTF-8 use g_utf8_ functions, else use +- * use just +/- 1. */ +-#define NEXT_CHAR(re, s) (((re)->compile_opts & G_REGEX_RAW) ? \ +- ((s) + 1) : \ +- g_utf8_next_char (s)) +-#define PREV_CHAR(re, s) (((re)->compile_opts & G_REGEX_RAW) ? \ +- ((s) - 1) : \ +- g_utf8_prev_char (s)) +- +-struct _GMatchInfo +-{ +- volatile gint ref_count; /* the ref count */ +- GRegex *regex; /* the regex */ +- GRegexMatchFlags match_opts; /* options used at match time on the regex */ +- gint matches; /* number of matching sub patterns */ +- gint pos; /* position in the string where last match left off */ +- gint n_offsets; /* number of offsets */ +- gint *offsets; /* array of offsets paired 0,1 ; 2,3 ; 3,4 etc */ +- gint *workspace; /* workspace for pcre_dfa_exec() */ +- gint n_workspace; /* number of workspace elements */ +- const gchar *string; /* string passed to the match function */ +- gssize string_len; /* length of string */ +-}; +- +-struct _GRegex +-{ +- volatile gint ref_count; /* the ref count for the immutable part */ +- gchar *pattern; /* the pattern */ +- pcre *pcre_re; /* compiled form of the pattern */ +- GRegexCompileFlags compile_opts; /* options used at compile time on the pattern */ +- GRegexMatchFlags match_opts; /* options used at match time on the regex */ +- pcre_extra *extra; /* data stored when G_REGEX_OPTIMIZE is used */ +-}; +- +-/* TRUE if ret is an error code, FALSE otherwise. */ +-#define IS_PCRE_ERROR(ret) ((ret) < PCRE_ERROR_NOMATCH && (ret) != PCRE_ERROR_PARTIAL) +- +-typedef struct _InterpolationData InterpolationData; +-static gboolean interpolation_list_needs_match (GList *list); +-static gboolean interpolate_replacement (const GMatchInfo *match_info, +- GString *result, +- gpointer data); +-static GList *split_replacement (const gchar *replacement, +- GError **error); +-static void free_interpolation_data (InterpolationData *data); +- +- +-static const gchar * +-match_error (gint errcode) +-{ +- switch (errcode) +- { +- case PCRE_ERROR_NOMATCH: +- /* not an error */ +- break; +- case PCRE_ERROR_NULL: +- /* NULL argument, this should not happen in GRegex */ +- g_warning ("A NULL argument was passed to PCRE"); +- break; +- case PCRE_ERROR_BADOPTION: +- return "bad options"; +- case PCRE_ERROR_BADMAGIC: +- return _("corrupted object"); +- case PCRE_ERROR_UNKNOWN_OPCODE: +- return N_("internal error or corrupted object"); +- case PCRE_ERROR_NOMEMORY: +- return _("out of memory"); +- case PCRE_ERROR_NOSUBSTRING: +- /* not used by pcre_exec() */ +- break; +- case PCRE_ERROR_MATCHLIMIT: +- return _("backtracking limit reached"); +- case PCRE_ERROR_CALLOUT: +- /* callouts are not implemented */ +- break; +- case PCRE_ERROR_BADUTF8: +- case PCRE_ERROR_BADUTF8_OFFSET: +- /* we do not check if strings are valid */ +- break; +- case PCRE_ERROR_PARTIAL: +- /* not an error */ +- break; +- case PCRE_ERROR_BADPARTIAL: +- return _("the pattern contains items not supported for partial matching"); +- case PCRE_ERROR_INTERNAL: +- return _("internal error"); +- case PCRE_ERROR_BADCOUNT: +- /* negative ovecsize, this should not happen in GRegex */ +- g_warning ("A negative ovecsize was passed to PCRE"); +- break; +- case PCRE_ERROR_DFA_UITEM: +- return _("the pattern contains items not supported for partial matching"); +- case PCRE_ERROR_DFA_UCOND: +- return _("back references as conditions are not supported for partial matching"); +- case PCRE_ERROR_DFA_UMLIMIT: +- /* the match_field field is not used in GRegex */ +- break; +- case PCRE_ERROR_DFA_WSSIZE: +- /* handled expanding the workspace */ +- break; +- case PCRE_ERROR_DFA_RECURSE: +- case PCRE_ERROR_RECURSIONLIMIT: +- return _("recursion limit reached"); +- case PCRE_ERROR_BADNEWLINE: +- return _("invalid combination of newline flags"); +- case PCRE_ERROR_BADOFFSET: +- return _("bad offset"); +- case PCRE_ERROR_SHORTUTF8: +- return _("short utf8"); +- case PCRE_ERROR_RECURSELOOP: +- return _("recursion loop"); +- default: +- break; +- } +- return _("unknown error"); +-} +- +-static void +-translate_compile_error (gint *errcode, const gchar **errmsg) +-{ +- /* Compile errors are created adding 100 to the error code returned +- * by PCRE. +- * If errcode is known we put the translatable error message in +- * erromsg. If errcode is unknown we put the generic +- * G_REGEX_ERROR_COMPILE error code in errcode and keep the +- * untranslated error message returned by PCRE. +- * Note that there can be more PCRE errors with the same GRegexError +- * and that some PCRE errors are useless for us. +- */ +- *errcode += 100; +- +- switch (*errcode) +- { +- case G_REGEX_ERROR_STRAY_BACKSLASH: +- *errmsg = _("\\ at end of pattern"); +- break; +- case G_REGEX_ERROR_MISSING_CONTROL_CHAR: +- *errmsg = _("\\c at end of pattern"); +- break; +- case G_REGEX_ERROR_UNRECOGNIZED_ESCAPE: +- *errmsg = _("unrecognized character following \\"); +- break; +- case G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER: +- *errmsg = _("numbers out of order in {} quantifier"); +- break; +- case G_REGEX_ERROR_QUANTIFIER_TOO_BIG: +- *errmsg = _("number too big in {} quantifier"); +- break; +- case G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS: +- *errmsg = _("missing terminating ] for character class"); +- break; +- case G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS: +- *errmsg = _("invalid escape sequence in character class"); +- break; +- case G_REGEX_ERROR_RANGE_OUT_OF_ORDER: +- *errmsg = _("range out of order in character class"); +- break; +- case G_REGEX_ERROR_NOTHING_TO_REPEAT: +- *errmsg = _("nothing to repeat"); +- break; +- case 111: /* internal error: unexpected repeat */ +- *errcode = G_REGEX_ERROR_INTERNAL; +- *errmsg = _("unexpected repeat"); +- break; +- case G_REGEX_ERROR_UNRECOGNIZED_CHARACTER: +- *errmsg = _("unrecognized character after (? or (?-"); +- break; +- case G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS: +- *errmsg = _("POSIX named classes are supported only within a class"); +- break; +- case G_REGEX_ERROR_UNMATCHED_PARENTHESIS: +- *errmsg = _("missing terminating )"); +- break; +- case G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE: +- *errmsg = _("reference to non-existent subpattern"); +- break; +- case G_REGEX_ERROR_UNTERMINATED_COMMENT: +- *errmsg = _("missing ) after comment"); +- break; +- case G_REGEX_ERROR_EXPRESSION_TOO_LARGE: +- *errmsg = _("regular expression is too large"); +- break; +- case G_REGEX_ERROR_MEMORY_ERROR: +- *errmsg = _("failed to get memory"); +- break; +- case 122: /* unmatched parentheses */ +- *errcode = G_REGEX_ERROR_UNMATCHED_PARENTHESIS; +- *errmsg = _(") without opening ("); +- break; +- case 123: /* internal error: code overflow */ +- *errcode = G_REGEX_ERROR_INTERNAL; +- *errmsg = _("code overflow"); +- break; +- case 124: /* "unrecognized character after (?<\0 */ +- *errcode = G_REGEX_ERROR_UNRECOGNIZED_CHARACTER; +- *errmsg = _("unrecognized character after (?<"); +- break; +- case G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND: +- *errmsg = _("lookbehind assertion is not fixed length"); +- break; +- case G_REGEX_ERROR_MALFORMED_CONDITION: +- *errmsg = _("malformed number or name after (?("); +- break; +- case G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES: +- *errmsg = _("conditional group contains more than two branches"); +- break; +- case G_REGEX_ERROR_ASSERTION_EXPECTED: +- *errmsg = _("assertion expected after (?("); +- break; +- case 129: +- *errcode = G_REGEX_ERROR_UNMATCHED_PARENTHESIS; +- /* translators: '(?R' and '(?[+-]digits' are both meant as (groups of) +- * sequences here, '(?-54' would be an example for the second group. +- */ +- *errmsg = _("(?R or (?[+-]digits must be followed by )"); +- break; +- case G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME: +- *errmsg = _("unknown POSIX class name"); +- break; +- case G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED: +- *errmsg = _("POSIX collating elements are not supported"); +- break; +- case G_REGEX_ERROR_HEX_CODE_TOO_LARGE: +- *errmsg = _("character value in \\x{...} sequence is too large"); +- break; +- case G_REGEX_ERROR_INVALID_CONDITION: +- *errmsg = _("invalid condition (?(0)"); +- break; +- case G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND: +- *errmsg = _("\\C not allowed in lookbehind assertion"); +- break; +- case 137: /* PCRE does not support \\L, \\l, \\N{name}, \\U, or \\u\0 */ +- /* A number of Perl escapes are not handled by PCRE. +- * Therefore it explicitly raises ERR37. +- */ +- *errcode = G_REGEX_ERROR_UNRECOGNIZED_ESCAPE; +- *errmsg = _("escapes \\L, \\l, \\N{name}, \\U, and \\u are not supported"); +- break; +- case G_REGEX_ERROR_INFINITE_LOOP: +- *errmsg = _("recursive call could loop indefinitely"); +- break; +- case 141: /* unrecognized character after (?P\0 */ +- *errcode = G_REGEX_ERROR_UNRECOGNIZED_CHARACTER; +- *errmsg = _("unrecognized character after (?P"); +- break; +- case G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR: +- *errmsg = _("missing terminator in subpattern name"); +- break; +- case G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME: +- *errmsg = _("two named subpatterns have the same name"); +- break; +- case G_REGEX_ERROR_MALFORMED_PROPERTY: +- *errmsg = _("malformed \\P or \\p sequence"); +- break; +- case G_REGEX_ERROR_UNKNOWN_PROPERTY: +- *errmsg = _("unknown property name after \\P or \\p"); +- break; +- case G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG: +- *errmsg = _("subpattern name is too long (maximum 32 characters)"); +- break; +- case G_REGEX_ERROR_TOO_MANY_SUBPATTERNS: +- *errmsg = _("too many named subpatterns (maximum 10,000)"); +- break; +- case G_REGEX_ERROR_INVALID_OCTAL_VALUE: +- *errmsg = _("octal value is greater than \\377"); +- break; +- case 152: /* internal error: overran compiling workspace */ +- *errcode = G_REGEX_ERROR_INTERNAL; +- *errmsg = _("overran compiling workspace"); +- break; +- case 153: /* internal error: previously-checked referenced subpattern not found */ +- *errcode = G_REGEX_ERROR_INTERNAL; +- *errmsg = _("previously-checked referenced subpattern not found"); +- break; +- case G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE: +- *errmsg = _("DEFINE group contains more than one branch"); +- break; +- case G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS: +- *errmsg = _("inconsistent NEWLINE options"); +- break; +- case G_REGEX_ERROR_MISSING_BACK_REFERENCE: +- *errmsg = _("\\g is not followed by a braced, angle-bracketed, or quoted name or " +- "number, or by a plain number"); +- break; +- case G_REGEX_ERROR_INVALID_RELATIVE_REFERENCE: +- *errmsg = _("a numbered reference must not be zero"); +- break; +- case G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN: +- *errmsg = _("an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT)"); +- break; +- case G_REGEX_ERROR_UNKNOWN_BACKTRACKING_CONTROL_VERB: +- *errmsg = _("(*VERB) not recognized"); +- break; +- case G_REGEX_ERROR_NUMBER_TOO_BIG: +- *errmsg = _("number is too big"); +- break; +- case G_REGEX_ERROR_MISSING_SUBPATTERN_NAME: +- *errmsg = _("missing subpattern name after (?&"); +- break; +- case G_REGEX_ERROR_MISSING_DIGIT: +- *errmsg = _("digit expected after (?+"); +- break; +- case G_REGEX_ERROR_INVALID_DATA_CHARACTER: +- *errmsg = _("] is an invalid data character in JavaScript compatibility mode"); +- break; +- case G_REGEX_ERROR_EXTRA_SUBPATTERN_NAME: +- *errmsg = _("different names for subpatterns of the same number are not allowed"); +- break; +- case G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED: +- *errmsg = _("(*MARK) must have an argument"); +- break; +- case G_REGEX_ERROR_INVALID_CONTROL_CHAR: +- *errmsg = _( "\\c must be followed by an ASCII character"); +- break; +- case G_REGEX_ERROR_MISSING_NAME: +- *errmsg = _("\\k is not followed by a braced, angle-bracketed, or quoted name"); +- break; +- case G_REGEX_ERROR_NOT_SUPPORTED_IN_CLASS: +- *errmsg = _("\\N is not supported in a class"); +- break; +- case G_REGEX_ERROR_TOO_MANY_FORWARD_REFERENCES: +- *errmsg = _("too many forward references"); +- break; +- case G_REGEX_ERROR_NAME_TOO_LONG: +- *errmsg = _("name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN)"); +- break; +- case G_REGEX_ERROR_CHARACTER_VALUE_TOO_LARGE: +- *errmsg = _("character value in \\u.... sequence is too large"); +- break; +- +- case 116: /* erroffset passed as NULL */ +- /* This should not happen as we never pass a NULL erroffset */ +- g_warning ("erroffset passed as NULL"); +- *errcode = G_REGEX_ERROR_COMPILE; +- break; +- case 117: /* unknown option bit(s) set */ +- /* This should not happen as we check options before passing them +- * to pcre_compile2() */ +- g_warning ("unknown option bit(s) set"); +- *errcode = G_REGEX_ERROR_COMPILE; +- break; +- case 132: /* this version of PCRE is compiled without UTF support */ +- case 144: /* invalid UTF-8 string */ +- case 145: /* support for \\P, \\p, and \\X has not been compiled */ +- case 167: /* this version of PCRE is not compiled with Unicode property support */ +- case 173: /* disallowed Unicode code point (>= 0xd800 && <= 0xdfff) */ +- case 174: /* invalid UTF-16 string */ +- /* These errors should not happen as we are using an UTF-8 and UCP-enabled PCRE +- * and we do not check if strings are valid */ +- case 170: /* internal error: unknown opcode in find_fixedlength() */ +- *errcode = G_REGEX_ERROR_INTERNAL; +- break; +- +- default: +- *errcode = G_REGEX_ERROR_COMPILE; +- } +-} +- +-/* GMatchInfo */ +- +-static GMatchInfo * +-match_info_new (const GRegex *regex, +- const gchar *string, +- gint string_len, +- gint start_position, +- gint match_options, +- gboolean is_dfa) +-{ +- GMatchInfo *match_info; +- +- if (string_len < 0) +- string_len = strlen (string); +- +- match_info = g_new0 (GMatchInfo, 1); +- match_info->ref_count = 1; +- match_info->regex = g_regex_ref ((GRegex *)regex); +- match_info->string = string; +- match_info->string_len = string_len; +- match_info->matches = PCRE_ERROR_NOMATCH; +- match_info->pos = start_position; +- match_info->match_opts = match_options; +- +- if (is_dfa) +- { +- /* These values should be enough for most cases, if they are not +- * enough g_regex_match_all_full() will expand them. */ +- match_info->n_offsets = 24; +- match_info->n_workspace = 100; +- match_info->workspace = g_new (gint, match_info->n_workspace); +- } +- else +- { +- gint capture_count; +- pcre_fullinfo (regex->pcre_re, regex->extra, +- PCRE_INFO_CAPTURECOUNT, &capture_count); +- match_info->n_offsets = (capture_count + 1) * 3; +- } +- +- match_info->offsets = g_new0 (gint, match_info->n_offsets); +- /* Set an invalid position for the previous match. */ +- match_info->offsets[0] = -1; +- match_info->offsets[1] = -1; +- +- return match_info; +-} +- +-/** +- * g_match_info_get_regex: +- * @match_info: a #GMatchInfo +- * +- * Returns #GRegex object used in @match_info. It belongs to Glib +- * and must not be freed. Use g_regex_ref() if you need to keep it +- * after you free @match_info object. +- * +- * Returns: #GRegex object used in @match_info +- * +- * Since: 2.14 +- */ +-GRegex * +-g_match_info_get_regex (const GMatchInfo *match_info) +-{ +- g_return_val_if_fail (match_info != NULL, NULL); +- return match_info->regex; +-} +- +-/** +- * g_match_info_get_string: +- * @match_info: a #GMatchInfo +- * +- * Returns the string searched with @match_info. This is the +- * string passed to g_regex_match() or g_regex_replace() so +- * you may not free it before calling this function. +- * +- * Returns: the string searched with @match_info +- * +- * Since: 2.14 +- */ +-const gchar * +-g_match_info_get_string (const GMatchInfo *match_info) +-{ +- g_return_val_if_fail (match_info != NULL, NULL); +- return match_info->string; +-} +- +-/** +- * g_match_info_ref: +- * @match_info: a #GMatchInfo +- * +- * Increases reference count of @match_info by 1. +- * +- * Returns: @match_info +- * +- * Since: 2.30 +- */ +-GMatchInfo * +-g_match_info_ref (GMatchInfo *match_info) +-{ +- g_return_val_if_fail (match_info != NULL, NULL); +- g_atomic_int_inc (&match_info->ref_count); +- return match_info; +-} +- +-/** +- * g_match_info_unref: +- * @match_info: a #GMatchInfo +- * +- * Decreases reference count of @match_info by 1. When reference count drops +- * to zero, it frees all the memory associated with the match_info structure. +- * +- * Since: 2.30 +- */ +-void +-g_match_info_unref (GMatchInfo *match_info) +-{ +- if (g_atomic_int_dec_and_test (&match_info->ref_count)) +- { +- g_regex_unref (match_info->regex); +- g_free (match_info->offsets); +- g_free (match_info->workspace); +- g_free (match_info); +- } +-} +- +-/** +- * g_match_info_free: +- * @match_info: (nullable): a #GMatchInfo, or %NULL +- * +- * If @match_info is not %NULL, calls g_match_info_unref(); otherwise does +- * nothing. +- * +- * Since: 2.14 +- */ +-void +-g_match_info_free (GMatchInfo *match_info) +-{ +- if (match_info == NULL) +- return; +- +- g_match_info_unref (match_info); +-} +- +-/** +- * g_match_info_next: +- * @match_info: a #GMatchInfo structure +- * @error: location to store the error occurring, or %NULL to ignore errors +- * +- * Scans for the next match using the same parameters of the previous +- * call to g_regex_match_full() or g_regex_match() that returned +- * @match_info. +- * +- * The match is done on the string passed to the match function, so you +- * cannot free it before calling this function. +- * +- * Returns: %TRUE is the string matched, %FALSE otherwise +- * +- * Since: 2.14 +- */ +-gboolean +-g_match_info_next (GMatchInfo *match_info, +- GError **error) +-{ +- gint prev_match_start; +- gint prev_match_end; +- +- g_return_val_if_fail (match_info != NULL, FALSE); +- g_return_val_if_fail (error == NULL || *error == NULL, FALSE); +- g_return_val_if_fail (match_info->pos >= 0, FALSE); +- +- prev_match_start = match_info->offsets[0]; +- prev_match_end = match_info->offsets[1]; +- +- if (match_info->pos > match_info->string_len) +- { +- /* we have reached the end of the string */ +- match_info->pos = -1; +- match_info->matches = PCRE_ERROR_NOMATCH; +- return FALSE; +- } +- +- match_info->matches = pcre_exec (match_info->regex->pcre_re, +- match_info->regex->extra, +- match_info->string, +- match_info->string_len, +- match_info->pos, +- match_info->regex->match_opts | match_info->match_opts, +- match_info->offsets, +- match_info->n_offsets); +- if (IS_PCRE_ERROR (match_info->matches)) +- { +- g_set_error (error, G_REGEX_ERROR, G_REGEX_ERROR_MATCH, +- _("Error while matching regular expression %s: %s"), +- match_info->regex->pattern, match_error (match_info->matches)); +- return FALSE; +- } +- +- /* avoid infinite loops if the pattern is an empty string or something +- * equivalent */ +- if (match_info->pos == match_info->offsets[1]) +- { +- if (match_info->pos > match_info->string_len) +- { +- /* we have reached the end of the string */ +- match_info->pos = -1; +- match_info->matches = PCRE_ERROR_NOMATCH; +- return FALSE; +- } +- +- match_info->pos = NEXT_CHAR (match_info->regex, +- &match_info->string[match_info->pos]) - +- match_info->string; +- } +- else +- { +- match_info->pos = match_info->offsets[1]; +- } +- +- /* it's possible to get two identical matches when we are matching +- * empty strings, for instance if the pattern is "(?=[A-Z0-9])" and +- * the string is "RegExTest" we have: +- * - search at position 0: match from 0 to 0 +- * - search at position 1: match from 3 to 3 +- * - search at position 3: match from 3 to 3 (duplicate) +- * - search at position 4: match from 5 to 5 +- * - search at position 5: match from 5 to 5 (duplicate) +- * - search at position 6: no match -> stop +- * so we have to ignore the duplicates. +- * see bug #515944: http://bugzilla.gnome.org/show_bug.cgi?id=515944 */ +- if (match_info->matches >= 0 && +- prev_match_start == match_info->offsets[0] && +- prev_match_end == match_info->offsets[1]) +- { +- /* ignore this match and search the next one */ +- return g_match_info_next (match_info, error); +- } +- +- return match_info->matches >= 0; +-} +- +-/** +- * g_match_info_matches: +- * @match_info: a #GMatchInfo structure +- * +- * Returns whether the previous match operation succeeded. +- * +- * Returns: %TRUE if the previous match operation succeeded, +- * %FALSE otherwise +- * +- * Since: 2.14 +- */ +-gboolean +-g_match_info_matches (const GMatchInfo *match_info) +-{ +- g_return_val_if_fail (match_info != NULL, FALSE); +- +- return match_info->matches >= 0; +-} +- +-/** +- * g_match_info_get_match_count: +- * @match_info: a #GMatchInfo structure +- * +- * Retrieves the number of matched substrings (including substring 0, +- * that is the whole matched text), so 1 is returned if the pattern +- * has no substrings in it and 0 is returned if the match failed. +- * +- * If the last match was obtained using the DFA algorithm, that is +- * using g_regex_match_all() or g_regex_match_all_full(), the retrieved +- * count is not that of the number of capturing parentheses but that of +- * the number of matched substrings. +- * +- * Returns: Number of matched substrings, or -1 if an error occurred +- * +- * Since: 2.14 +- */ +-gint +-g_match_info_get_match_count (const GMatchInfo *match_info) +-{ +- g_return_val_if_fail (match_info, -1); +- +- if (match_info->matches == PCRE_ERROR_NOMATCH) +- /* no match */ +- return 0; +- else if (match_info->matches < PCRE_ERROR_NOMATCH) +- /* error */ +- return -1; +- else +- /* match */ +- return match_info->matches; +-} +- +-/** +- * g_match_info_is_partial_match: +- * @match_info: a #GMatchInfo structure +- * +- * Usually if the string passed to g_regex_match*() matches as far as +- * it goes, but is too short to match the entire pattern, %FALSE is +- * returned. There are circumstances where it might be helpful to +- * distinguish this case from other cases in which there is no match. +- * +- * Consider, for example, an application where a human is required to +- * type in data for a field with specific formatting requirements. An +- * example might be a date in the form ddmmmyy, defined by the pattern +- * "^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$". +- * If the application sees the user’s keystrokes one by one, and can +- * check that what has been typed so far is potentially valid, it is +- * able to raise an error as soon as a mistake is made. +- * +- * GRegex supports the concept of partial matching by means of the +- * #G_REGEX_MATCH_PARTIAL_SOFT and #G_REGEX_MATCH_PARTIAL_HARD flags. +- * When they are used, the return code for +- * g_regex_match() or g_regex_match_full() is, as usual, %TRUE +- * for a complete match, %FALSE otherwise. But, when these functions +- * return %FALSE, you can check if the match was partial calling +- * g_match_info_is_partial_match(). +- * +- * The difference between #G_REGEX_MATCH_PARTIAL_SOFT and +- * #G_REGEX_MATCH_PARTIAL_HARD is that when a partial match is encountered +- * with #G_REGEX_MATCH_PARTIAL_SOFT, matching continues to search for a +- * possible complete match, while with #G_REGEX_MATCH_PARTIAL_HARD matching +- * stops at the partial match. +- * When both #G_REGEX_MATCH_PARTIAL_SOFT and #G_REGEX_MATCH_PARTIAL_HARD +- * are set, the latter takes precedence. +- * +- * There were formerly some restrictions on the pattern for partial matching. +- * The restrictions no longer apply. +- * +- * See pcrepartial(3) for more information on partial matching. +- * +- * Returns: %TRUE if the match was partial, %FALSE otherwise +- * +- * Since: 2.14 +- */ +-gboolean +-g_match_info_is_partial_match (const GMatchInfo *match_info) +-{ +- g_return_val_if_fail (match_info != NULL, FALSE); +- +- return match_info->matches == PCRE_ERROR_PARTIAL; +-} +- +-/** +- * g_match_info_expand_references: +- * @match_info: (nullable): a #GMatchInfo or %NULL +- * @string_to_expand: the string to expand +- * @error: location to store the error occurring, or %NULL to ignore errors +- * +- * Returns a new string containing the text in @string_to_expand with +- * references and escape sequences expanded. References refer to the last +- * match done with @string against @regex and have the same syntax used by +- * g_regex_replace(). +- * +- * The @string_to_expand must be UTF-8 encoded even if #G_REGEX_RAW was +- * passed to g_regex_new(). +- * +- * The backreferences are extracted from the string passed to the match +- * function, so you cannot call this function after freeing the string. +- * +- * @match_info may be %NULL in which case @string_to_expand must not +- * contain references. For instance "foo\n" does not refer to an actual +- * pattern and '\n' merely will be replaced with \n character, +- * while to expand "\0" (whole match) one needs the result of a match. +- * Use g_regex_check_replacement() to find out whether @string_to_expand +- * contains references. +- * +- * Returns: (nullable): the expanded string, or %NULL if an error occurred +- * +- * Since: 2.14 +- */ +-gchar * +-g_match_info_expand_references (const GMatchInfo *match_info, +- const gchar *string_to_expand, +- GError **error) +-{ +- GString *result; +- GList *list; +- GError *tmp_error = NULL; +- +- g_return_val_if_fail (string_to_expand != NULL, NULL); +- g_return_val_if_fail (error == NULL || *error == NULL, NULL); +- +- list = split_replacement (string_to_expand, &tmp_error); +- if (tmp_error != NULL) +- { +- g_propagate_error (error, tmp_error); +- return NULL; +- } +- +- if (!match_info && interpolation_list_needs_match (list)) +- { +- g_critical ("String '%s' contains references to the match, can't " +- "expand references without GMatchInfo object", +- string_to_expand); +- return NULL; +- } +- +- result = g_string_sized_new (strlen (string_to_expand)); +- interpolate_replacement (match_info, result, list); +- +- g_list_free_full (list, (GDestroyNotify) free_interpolation_data); +- +- return g_string_free (result, FALSE); +-} +- +-/** +- * g_match_info_fetch: +- * @match_info: #GMatchInfo structure +- * @match_num: number of the sub expression +- * +- * Retrieves the text matching the @match_num'th capturing +- * parentheses. 0 is the full text of the match, 1 is the first paren +- * set, 2 the second, and so on. +- * +- * If @match_num is a valid sub pattern but it didn't match anything +- * (e.g. sub pattern 1, matching "b" against "(a)?b") then an empty +- * string is returned. +- * +- * If the match was obtained using the DFA algorithm, that is using +- * g_regex_match_all() or g_regex_match_all_full(), the retrieved +- * string is not that of a set of parentheses but that of a matched +- * substring. Substrings are matched in reverse order of length, so +- * 0 is the longest match. +- * +- * The string is fetched from the string passed to the match function, +- * so you cannot call this function after freeing the string. +- * +- * Returns: (nullable): The matched substring, or %NULL if an error +- * occurred. You have to free the string yourself +- * +- * Since: 2.14 +- */ +-gchar * +-g_match_info_fetch (const GMatchInfo *match_info, +- gint match_num) +-{ +- /* we cannot use pcre_get_substring() because it allocates the +- * string using pcre_malloc(). */ +- gchar *match = NULL; +- gint start, end; +- +- g_return_val_if_fail (match_info != NULL, NULL); +- g_return_val_if_fail (match_num >= 0, NULL); +- +- /* match_num does not exist or it didn't matched, i.e. matching "b" +- * against "(a)?b" then group 0 is empty. */ +- if (!g_match_info_fetch_pos (match_info, match_num, &start, &end)) +- match = NULL; +- else if (start == -1) +- match = g_strdup (""); +- else +- match = g_strndup (&match_info->string[start], end - start); +- +- return match; +-} +- +-/** +- * g_match_info_fetch_pos: +- * @match_info: #GMatchInfo structure +- * @match_num: number of the sub expression +- * @start_pos: (out) (optional): pointer to location where to store +- * the start position, or %NULL +- * @end_pos: (out) (optional): pointer to location where to store +- * the end position, or %NULL +- * +- * Retrieves the position in bytes of the @match_num'th capturing +- * parentheses. 0 is the full text of the match, 1 is the first +- * paren set, 2 the second, and so on. +- * +- * If @match_num is a valid sub pattern but it didn't match anything +- * (e.g. sub pattern 1, matching "b" against "(a)?b") then @start_pos +- * and @end_pos are set to -1 and %TRUE is returned. +- * +- * If the match was obtained using the DFA algorithm, that is using +- * g_regex_match_all() or g_regex_match_all_full(), the retrieved +- * position is not that of a set of parentheses but that of a matched +- * substring. Substrings are matched in reverse order of length, so +- * 0 is the longest match. +- * +- * Returns: %TRUE if the position was fetched, %FALSE otherwise. If +- * the position cannot be fetched, @start_pos and @end_pos are left +- * unchanged +- * +- * Since: 2.14 +- */ +-gboolean +-g_match_info_fetch_pos (const GMatchInfo *match_info, +- gint match_num, +- gint *start_pos, +- gint *end_pos) +-{ +- g_return_val_if_fail (match_info != NULL, FALSE); +- g_return_val_if_fail (match_num >= 0, FALSE); +- +- /* make sure the sub expression number they're requesting is less than +- * the total number of sub expressions that were matched. */ +- if (match_num >= match_info->matches) +- return FALSE; +- +- if (start_pos != NULL) +- *start_pos = match_info->offsets[2 * match_num]; +- +- if (end_pos != NULL) +- *end_pos = match_info->offsets[2 * match_num + 1]; +- +- return TRUE; +-} +- +-/* +- * Returns number of first matched subpattern with name @name. +- * There may be more than one in case when DUPNAMES is used, +- * and not all subpatterns with that name match; +- * pcre_get_stringnumber() does not work in that case. +- */ +-static gint +-get_matched_substring_number (const GMatchInfo *match_info, +- const gchar *name) +-{ +- gint entrysize; +- gchar *first, *last; +- guchar *entry; +- +- if (!(match_info->regex->compile_opts & G_REGEX_DUPNAMES)) +- return pcre_get_stringnumber (match_info->regex->pcre_re, name); +- +- /* This code is copied from pcre_get.c: get_first_set() */ +- entrysize = pcre_get_stringtable_entries (match_info->regex->pcre_re, +- name, +- &first, +- &last); +- +- if (entrysize <= 0) +- return entrysize; +- +- for (entry = (guchar*) first; entry <= (guchar*) last; entry += entrysize) +- { +- gint n = (entry[0] << 8) + entry[1]; +- if (match_info->offsets[n*2] >= 0) +- return n; +- } +- +- return (first[0] << 8) + first[1]; +-} +- +-/** +- * g_match_info_fetch_named: +- * @match_info: #GMatchInfo structure +- * @name: name of the subexpression +- * +- * Retrieves the text matching the capturing parentheses named @name. +- * +- * If @name is a valid sub pattern name but it didn't match anything +- * (e.g. sub pattern "X", matching "b" against "(?Pa)?b") +- * then an empty string is returned. +- * +- * The string is fetched from the string passed to the match function, +- * so you cannot call this function after freeing the string. +- * +- * Returns: (nullable): The matched substring, or %NULL if an error +- * occurred. You have to free the string yourself +- * +- * Since: 2.14 +- */ +-gchar * +-g_match_info_fetch_named (const GMatchInfo *match_info, +- const gchar *name) +-{ +- /* we cannot use pcre_get_named_substring() because it allocates the +- * string using pcre_malloc(). */ +- gint num; +- +- g_return_val_if_fail (match_info != NULL, NULL); +- g_return_val_if_fail (name != NULL, NULL); +- +- num = get_matched_substring_number (match_info, name); +- if (num < 0) +- return NULL; +- else +- return g_match_info_fetch (match_info, num); +-} +- +-/** +- * g_match_info_fetch_named_pos: +- * @match_info: #GMatchInfo structure +- * @name: name of the subexpression +- * @start_pos: (out) (optional): pointer to location where to store +- * the start position, or %NULL +- * @end_pos: (out) (optional): pointer to location where to store +- * the end position, or %NULL +- * +- * Retrieves the position in bytes of the capturing parentheses named @name. +- * +- * If @name is a valid sub pattern name but it didn't match anything +- * (e.g. sub pattern "X", matching "b" against "(?Pa)?b") +- * then @start_pos and @end_pos are set to -1 and %TRUE is returned. +- * +- * Returns: %TRUE if the position was fetched, %FALSE otherwise. +- * If the position cannot be fetched, @start_pos and @end_pos +- * are left unchanged. +- * +- * Since: 2.14 +- */ +-gboolean +-g_match_info_fetch_named_pos (const GMatchInfo *match_info, +- const gchar *name, +- gint *start_pos, +- gint *end_pos) +-{ +- gint num; +- +- g_return_val_if_fail (match_info != NULL, FALSE); +- g_return_val_if_fail (name != NULL, FALSE); +- +- num = get_matched_substring_number (match_info, name); +- if (num < 0) +- return FALSE; +- +- return g_match_info_fetch_pos (match_info, num, start_pos, end_pos); +-} +- +-/** +- * g_match_info_fetch_all: +- * @match_info: a #GMatchInfo structure +- * +- * Bundles up pointers to each of the matching substrings from a match +- * and stores them in an array of gchar pointers. The first element in +- * the returned array is the match number 0, i.e. the entire matched +- * text. +- * +- * If a sub pattern didn't match anything (e.g. sub pattern 1, matching +- * "b" against "(a)?b") then an empty string is inserted. +- * +- * If the last match was obtained using the DFA algorithm, that is using +- * g_regex_match_all() or g_regex_match_all_full(), the retrieved +- * strings are not that matched by sets of parentheses but that of the +- * matched substring. Substrings are matched in reverse order of length, +- * so the first one is the longest match. +- * +- * The strings are fetched from the string passed to the match function, +- * so you cannot call this function after freeing the string. +- * +- * Returns: (transfer full): a %NULL-terminated array of gchar * +- * pointers. It must be freed using g_strfreev(). If the previous +- * match failed %NULL is returned +- * +- * Since: 2.14 +- */ +-gchar ** +-g_match_info_fetch_all (const GMatchInfo *match_info) +-{ +- /* we cannot use pcre_get_substring_list() because the returned value +- * isn't suitable for g_strfreev(). */ +- gchar **result; +- gint i; +- +- g_return_val_if_fail (match_info != NULL, NULL); +- +- if (match_info->matches < 0) +- return NULL; +- +- result = g_new (gchar *, match_info->matches + 1); +- for (i = 0; i < match_info->matches; i++) +- result[i] = g_match_info_fetch (match_info, i); +- result[i] = NULL; +- +- return result; +-} +- +- +-/* GRegex */ +- +-G_DEFINE_QUARK (g-regex-error-quark, g_regex_error) +- +-/** +- * g_regex_ref: +- * @regex: a #GRegex +- * +- * Increases reference count of @regex by 1. +- * +- * Returns: @regex +- * +- * Since: 2.14 +- */ +-GRegex * +-g_regex_ref (GRegex *regex) +-{ +- g_return_val_if_fail (regex != NULL, NULL); +- g_atomic_int_inc (®ex->ref_count); +- return regex; +-} +- +-/** +- * g_regex_unref: +- * @regex: a #GRegex +- * +- * Decreases reference count of @regex by 1. When reference count drops +- * to zero, it frees all the memory associated with the regex structure. +- * +- * Since: 2.14 +- */ +-void +-g_regex_unref (GRegex *regex) +-{ +- g_return_if_fail (regex != NULL); +- +- if (g_atomic_int_dec_and_test (®ex->ref_count)) +- { +- g_free (regex->pattern); +- if (regex->pcre_re != NULL) +- pcre_free (regex->pcre_re); +- if (regex->extra != NULL) +- pcre_free (regex->extra); +- g_free (regex); +- } +-} +- +-/* +- * @match_options: (inout) (optional): +- */ +-static pcre *regex_compile (const gchar *pattern, +- GRegexCompileFlags compile_options, +- GRegexCompileFlags *compile_options_out, +- GRegexMatchFlags *match_options, +- GError **error); +- +-/** +- * g_regex_new: +- * @pattern: the regular expression +- * @compile_options: compile options for the regular expression, or 0 +- * @match_options: match options for the regular expression, or 0 +- * @error: return location for a #GError +- * +- * Compiles the regular expression to an internal form, and does +- * the initial setup of the #GRegex structure. +- * +- * Returns: (nullable): a #GRegex structure or %NULL if an error occured. Call +- * g_regex_unref() when you are done with it +- * +- * Since: 2.14 +- */ +-GRegex * +-g_regex_new (const gchar *pattern, +- GRegexCompileFlags compile_options, +- GRegexMatchFlags match_options, +- GError **error) +-{ +- GRegex *regex; +- pcre *re; +- const gchar *errmsg; +- gboolean optimize = FALSE; +- static volatile gsize initialised = 0; +- +- g_return_val_if_fail (pattern != NULL, NULL); +- g_return_val_if_fail (error == NULL || *error == NULL, NULL); +- g_return_val_if_fail ((compile_options & ~G_REGEX_COMPILE_MASK) == 0, NULL); +- g_return_val_if_fail ((match_options & ~G_REGEX_MATCH_MASK) == 0, NULL); +- +- if (g_once_init_enter (&initialised)) +- { +- int supports_utf8, supports_ucp; +- +- pcre_config (PCRE_CONFIG_UTF8, &supports_utf8); +- if (!supports_utf8) +- g_critical (_("PCRE library is compiled without UTF8 support")); +- +- pcre_config (PCRE_CONFIG_UNICODE_PROPERTIES, &supports_ucp); +- if (!supports_ucp) +- g_critical (_("PCRE library is compiled without UTF8 properties support")); +- +- g_once_init_leave (&initialised, supports_utf8 && supports_ucp ? 1 : 2); +- } +- +- if (G_UNLIKELY (initialised != 1)) +- { +- g_set_error_literal (error, G_REGEX_ERROR, G_REGEX_ERROR_COMPILE, +- _("PCRE library is compiled with incompatible options")); +- return NULL; +- } +- +- /* G_REGEX_OPTIMIZE has the same numeric value of PCRE_NO_UTF8_CHECK, +- * as we do not need to wrap PCRE_NO_UTF8_CHECK. */ +- if (compile_options & G_REGEX_OPTIMIZE) +- optimize = TRUE; +- +- re = regex_compile (pattern, compile_options, &compile_options, +- &match_options, error); +- +- if (re == NULL) +- return NULL; +- +- regex = g_new0 (GRegex, 1); +- regex->ref_count = 1; +- regex->pattern = g_strdup (pattern); +- regex->pcre_re = re; +- regex->compile_opts = compile_options; +- regex->match_opts = match_options; +- +- if (optimize) +- { +- regex->extra = pcre_study (regex->pcre_re, 0, &errmsg); +- if (errmsg != NULL) +- { +- GError *tmp_error = g_error_new (G_REGEX_ERROR, +- G_REGEX_ERROR_OPTIMIZE, +- _("Error while optimizing " +- "regular expression %s: %s"), +- regex->pattern, +- errmsg); +- g_propagate_error (error, tmp_error); +- +- g_regex_unref (regex); +- return NULL; +- } +- } +- +- return regex; +-} +- +-static pcre * +-regex_compile (const gchar *pattern, +- GRegexCompileFlags compile_options, +- GRegexCompileFlags *compile_options_out, +- GRegexMatchFlags *match_options, +- GError **error) +-{ +- pcre *re; +- const gchar *errmsg; +- gint erroffset; +- gint errcode; +- GRegexCompileFlags nonpcre_compile_options; +- unsigned long int pcre_compile_options; +- +- nonpcre_compile_options = compile_options & G_REGEX_COMPILE_NONPCRE_MASK; +- +- /* In GRegex the string are, by default, UTF-8 encoded. PCRE +- * instead uses UTF-8 only if required with PCRE_UTF8. */ +- if (compile_options & G_REGEX_RAW) +- { +- /* disable utf-8 */ +- compile_options &= ~G_REGEX_RAW; +- } +- else +- { +- /* enable utf-8 */ +- compile_options |= PCRE_UTF8 | PCRE_NO_UTF8_CHECK; +- +- if (match_options != NULL) +- *match_options |= PCRE_NO_UTF8_CHECK; +- } +- +- /* PCRE_NEWLINE_ANY is the default for the internal PCRE but +- * not for the system one. */ +- if (!(compile_options & G_REGEX_NEWLINE_CR) && +- !(compile_options & G_REGEX_NEWLINE_LF)) +- { +- compile_options |= PCRE_NEWLINE_ANY; +- } +- +- compile_options |= PCRE_UCP; +- +- /* PCRE_BSR_UNICODE is the default for the internal PCRE but +- * possibly not for the system one. +- */ +- if (~compile_options & G_REGEX_BSR_ANYCRLF) +- compile_options |= PCRE_BSR_UNICODE; +- +- /* compile the pattern */ +- re = pcre_compile2 (pattern, compile_options, &errcode, +- &errmsg, &erroffset, NULL); +- +- /* if the compilation failed, set the error member and return +- * immediately */ +- if (re == NULL) +- { +- GError *tmp_error; +- +- /* Translate the PCRE error code to GRegexError and use a translated +- * error message if possible */ +- translate_compile_error (&errcode, &errmsg); +- +- /* PCRE uses byte offsets but we want to show character offsets */ +- erroffset = g_utf8_pointer_to_offset (pattern, &pattern[erroffset]); +- +- tmp_error = g_error_new (G_REGEX_ERROR, errcode, +- _("Error while compiling regular " +- "expression %s at char %d: %s"), +- pattern, erroffset, errmsg); +- g_propagate_error (error, tmp_error); +- +- return NULL; +- } +- +- /* For options set at the beginning of the pattern, pcre puts them into +- * compile options, e.g. "(?i)foo" will make the pcre structure store +- * PCRE_CASELESS even though it wasn't explicitly given for compilation. */ +- pcre_fullinfo (re, NULL, PCRE_INFO_OPTIONS, &pcre_compile_options); +- compile_options = pcre_compile_options & G_REGEX_COMPILE_PCRE_MASK; +- +- /* Don't leak PCRE_NEWLINE_ANY, which is part of PCRE_NEWLINE_ANYCRLF */ +- if ((pcre_compile_options & PCRE_NEWLINE_ANYCRLF) != PCRE_NEWLINE_ANYCRLF) +- compile_options &= ~PCRE_NEWLINE_ANY; +- +- compile_options |= nonpcre_compile_options; +- +- if (!(compile_options & G_REGEX_DUPNAMES)) +- { +- gboolean jchanged = FALSE; +- pcre_fullinfo (re, NULL, PCRE_INFO_JCHANGED, &jchanged); +- if (jchanged) +- compile_options |= G_REGEX_DUPNAMES; +- } +- +- if (compile_options_out != 0) +- *compile_options_out = compile_options; +- +- return re; +-} +- +-/** +- * g_regex_get_pattern: +- * @regex: a #GRegex structure +- * +- * Gets the pattern string associated with @regex, i.e. a copy of +- * the string passed to g_regex_new(). +- * +- * Returns: the pattern of @regex +- * +- * Since: 2.14 +- */ +-const gchar * +-g_regex_get_pattern (const GRegex *regex) +-{ +- g_return_val_if_fail (regex != NULL, NULL); +- +- return regex->pattern; +-} +- +-/** +- * g_regex_get_max_backref: +- * @regex: a #GRegex +- * +- * Returns the number of the highest back reference +- * in the pattern, or 0 if the pattern does not contain +- * back references. +- * +- * Returns: the number of the highest back reference +- * +- * Since: 2.14 +- */ +-gint +-g_regex_get_max_backref (const GRegex *regex) +-{ +- gint value; +- +- pcre_fullinfo (regex->pcre_re, regex->extra, +- PCRE_INFO_BACKREFMAX, &value); +- +- return value; +-} +- +-/** +- * g_regex_get_capture_count: +- * @regex: a #GRegex +- * +- * Returns the number of capturing subpatterns in the pattern. +- * +- * Returns: the number of capturing subpatterns +- * +- * Since: 2.14 +- */ +-gint +-g_regex_get_capture_count (const GRegex *regex) +-{ +- gint value; +- +- pcre_fullinfo (regex->pcre_re, regex->extra, +- PCRE_INFO_CAPTURECOUNT, &value); +- +- return value; +-} +- +-/** +- * g_regex_get_has_cr_or_lf: +- * @regex: a #GRegex structure +- * +- * Checks whether the pattern contains explicit CR or LF references. +- * +- * Returns: %TRUE if the pattern contains explicit CR or LF references +- * +- * Since: 2.34 +- */ +-gboolean +-g_regex_get_has_cr_or_lf (const GRegex *regex) +-{ +- gint value; +- +- pcre_fullinfo (regex->pcre_re, regex->extra, +- PCRE_INFO_HASCRORLF, &value); +- +- return !!value; +-} +- +-/** +- * g_regex_get_max_lookbehind: +- * @regex: a #GRegex structure +- * +- * Gets the number of characters in the longest lookbehind assertion in the +- * pattern. This information is useful when doing multi-segment matching using +- * the partial matching facilities. +- * +- * Returns: the number of characters in the longest lookbehind assertion. +- * +- * Since: 2.38 +- */ +-gint +-g_regex_get_max_lookbehind (const GRegex *regex) +-{ +- gint max_lookbehind; +- +- pcre_fullinfo (regex->pcre_re, regex->extra, +- PCRE_INFO_MAXLOOKBEHIND, &max_lookbehind); +- +- return max_lookbehind; +-} +- +-/** +- * g_regex_get_compile_flags: +- * @regex: a #GRegex +- * +- * Returns the compile options that @regex was created with. +- * +- * Depending on the version of PCRE that is used, this may or may not +- * include flags set by option expressions such as `(?i)` found at the +- * top-level within the compiled pattern. +- * +- * Returns: flags from #GRegexCompileFlags +- * +- * Since: 2.26 +- */ +-GRegexCompileFlags +-g_regex_get_compile_flags (const GRegex *regex) +-{ +- g_return_val_if_fail (regex != NULL, 0); +- +- return regex->compile_opts; +-} +- +-/** +- * g_regex_get_match_flags: +- * @regex: a #GRegex +- * +- * Returns the match options that @regex was created with. +- * +- * Returns: flags from #GRegexMatchFlags +- * +- * Since: 2.26 +- */ +-GRegexMatchFlags +-g_regex_get_match_flags (const GRegex *regex) +-{ +- g_return_val_if_fail (regex != NULL, 0); +- +- return regex->match_opts & G_REGEX_MATCH_MASK; +-} +- +-/** +- * g_regex_match_simple: +- * @pattern: the regular expression +- * @string: the string to scan for matches +- * @compile_options: compile options for the regular expression, or 0 +- * @match_options: match options, or 0 +- * +- * Scans for a match in @string for @pattern. +- * +- * This function is equivalent to g_regex_match() but it does not +- * require to compile the pattern with g_regex_new(), avoiding some +- * lines of code when you need just to do a match without extracting +- * substrings, capture counts, and so on. +- * +- * If this function is to be called on the same @pattern more than +- * once, it's more efficient to compile the pattern once with +- * g_regex_new() and then use g_regex_match(). +- * +- * Returns: %TRUE if the string matched, %FALSE otherwise +- * +- * Since: 2.14 +- */ +-gboolean +-g_regex_match_simple (const gchar *pattern, +- const gchar *string, +- GRegexCompileFlags compile_options, +- GRegexMatchFlags match_options) +-{ +- GRegex *regex; +- gboolean result; +- +- regex = g_regex_new (pattern, compile_options, 0, NULL); +- if (!regex) +- return FALSE; +- result = g_regex_match_full (regex, string, -1, 0, match_options, NULL, NULL); +- g_regex_unref (regex); +- return result; +-} +- +-/** +- * g_regex_match: +- * @regex: a #GRegex structure from g_regex_new() +- * @string: the string to scan for matches +- * @match_options: match options +- * @match_info: (out) (optional): pointer to location where to store +- * the #GMatchInfo, or %NULL if you do not need it +- * +- * Scans for a match in string for the pattern in @regex. +- * The @match_options are combined with the match options specified +- * when the @regex structure was created, letting you have more +- * flexibility in reusing #GRegex structures. +- * +- * A #GMatchInfo structure, used to get information on the match, +- * is stored in @match_info if not %NULL. Note that if @match_info +- * is not %NULL then it is created even if the function returns %FALSE, +- * i.e. you must free it regardless if regular expression actually matched. +- * +- * To retrieve all the non-overlapping matches of the pattern in +- * string you can use g_match_info_next(). +- * +- * |[ +- * static void +- * print_uppercase_words (const gchar *string) +- * { +- * // Print all uppercase-only words. +- * GRegex *regex; +- * GMatchInfo *match_info; +- * +- * regex = g_regex_new ("[A-Z]+", 0, 0, NULL); +- * g_regex_match (regex, string, 0, &match_info); +- * while (g_match_info_matches (match_info)) +- * { +- * gchar *word = g_match_info_fetch (match_info, 0); +- * g_print ("Found: %s\n", word); +- * g_free (word); +- * g_match_info_next (match_info, NULL); +- * } +- * g_match_info_free (match_info); +- * g_regex_unref (regex); +- * } +- * ]| +- * +- * @string is not copied and is used in #GMatchInfo internally. If +- * you use any #GMatchInfo method (except g_match_info_free()) after +- * freeing or modifying @string then the behaviour is undefined. +- * +- * Returns: %TRUE is the string matched, %FALSE otherwise +- * +- * Since: 2.14 +- */ +-gboolean +-g_regex_match (const GRegex *regex, +- const gchar *string, +- GRegexMatchFlags match_options, +- GMatchInfo **match_info) +-{ +- return g_regex_match_full (regex, string, -1, 0, match_options, +- match_info, NULL); +-} +- +-/** +- * g_regex_match_full: +- * @regex: a #GRegex structure from g_regex_new() +- * @string: (array length=string_len): the string to scan for matches +- * @string_len: the length of @string, or -1 if @string is nul-terminated +- * @start_position: starting index of the string to match, in bytes +- * @match_options: match options +- * @match_info: (out) (optional): pointer to location where to store +- * the #GMatchInfo, or %NULL if you do not need it +- * @error: location to store the error occurring, or %NULL to ignore errors +- * +- * Scans for a match in string for the pattern in @regex. +- * The @match_options are combined with the match options specified +- * when the @regex structure was created, letting you have more +- * flexibility in reusing #GRegex structures. +- * +- * Setting @start_position differs from just passing over a shortened +- * string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern +- * that begins with any kind of lookbehind assertion, such as "\b". +- * +- * A #GMatchInfo structure, used to get information on the match, is +- * stored in @match_info if not %NULL. Note that if @match_info is +- * not %NULL then it is created even if the function returns %FALSE, +- * i.e. you must free it regardless if regular expression actually +- * matched. +- * +- * @string is not copied and is used in #GMatchInfo internally. If +- * you use any #GMatchInfo method (except g_match_info_free()) after +- * freeing or modifying @string then the behaviour is undefined. +- * +- * To retrieve all the non-overlapping matches of the pattern in +- * string you can use g_match_info_next(). +- * +- * |[ +- * static void +- * print_uppercase_words (const gchar *string) +- * { +- * // Print all uppercase-only words. +- * GRegex *regex; +- * GMatchInfo *match_info; +- * GError *error = NULL; +- * +- * regex = g_regex_new ("[A-Z]+", 0, 0, NULL); +- * g_regex_match_full (regex, string, -1, 0, 0, &match_info, &error); +- * while (g_match_info_matches (match_info)) +- * { +- * gchar *word = g_match_info_fetch (match_info, 0); +- * g_print ("Found: %s\n", word); +- * g_free (word); +- * g_match_info_next (match_info, &error); +- * } +- * g_match_info_free (match_info); +- * g_regex_unref (regex); +- * if (error != NULL) +- * { +- * g_printerr ("Error while matching: %s\n", error->message); +- * g_error_free (error); +- * } +- * } +- * ]| +- * +- * Returns: %TRUE is the string matched, %FALSE otherwise +- * +- * Since: 2.14 +- */ +-gboolean +-g_regex_match_full (const GRegex *regex, +- const gchar *string, +- gssize string_len, +- gint start_position, +- GRegexMatchFlags match_options, +- GMatchInfo **match_info, +- GError **error) +-{ +- GMatchInfo *info; +- gboolean match_ok; +- +- g_return_val_if_fail (regex != NULL, FALSE); +- g_return_val_if_fail (string != NULL, FALSE); +- g_return_val_if_fail (start_position >= 0, FALSE); +- g_return_val_if_fail (error == NULL || *error == NULL, FALSE); +- g_return_val_if_fail ((match_options & ~G_REGEX_MATCH_MASK) == 0, FALSE); +- +- info = match_info_new (regex, string, string_len, start_position, +- match_options, FALSE); +- match_ok = g_match_info_next (info, error); +- if (match_info != NULL) +- *match_info = info; +- else +- g_match_info_free (info); +- +- return match_ok; +-} +- +-/** +- * g_regex_match_all: +- * @regex: a #GRegex structure from g_regex_new() +- * @string: the string to scan for matches +- * @match_options: match options +- * @match_info: (out) (optional): pointer to location where to store +- * the #GMatchInfo, or %NULL if you do not need it +- * +- * Using the standard algorithm for regular expression matching only +- * the longest match in the string is retrieved. This function uses +- * a different algorithm so it can retrieve all the possible matches. +- * For more documentation see g_regex_match_all_full(). +- * +- * A #GMatchInfo structure, used to get information on the match, is +- * stored in @match_info if not %NULL. Note that if @match_info is +- * not %NULL then it is created even if the function returns %FALSE, +- * i.e. you must free it regardless if regular expression actually +- * matched. +- * +- * @string is not copied and is used in #GMatchInfo internally. If +- * you use any #GMatchInfo method (except g_match_info_free()) after +- * freeing or modifying @string then the behaviour is undefined. +- * +- * Returns: %TRUE is the string matched, %FALSE otherwise +- * +- * Since: 2.14 +- */ +-gboolean +-g_regex_match_all (const GRegex *regex, +- const gchar *string, +- GRegexMatchFlags match_options, +- GMatchInfo **match_info) +-{ +- return g_regex_match_all_full (regex, string, -1, 0, match_options, +- match_info, NULL); +-} +- +-/** +- * g_regex_match_all_full: +- * @regex: a #GRegex structure from g_regex_new() +- * @string: (array length=string_len): the string to scan for matches +- * @string_len: the length of @string, or -1 if @string is nul-terminated +- * @start_position: starting index of the string to match, in bytes +- * @match_options: match options +- * @match_info: (out) (optional): pointer to location where to store +- * the #GMatchInfo, or %NULL if you do not need it +- * @error: location to store the error occurring, or %NULL to ignore errors +- * +- * Using the standard algorithm for regular expression matching only +- * the longest match in the string is retrieved, it is not possible +- * to obtain all the available matches. For instance matching +- * " " against the pattern "<.*>" +- * you get " ". +- * +- * This function uses a different algorithm (called DFA, i.e. deterministic +- * finite automaton), so it can retrieve all the possible matches, all +- * starting at the same point in the string. For instance matching +- * " " against the pattern "<.*>;" +- * you would obtain three matches: " ", +- * " " and "". +- * +- * The number of matched strings is retrieved using +- * g_match_info_get_match_count(). To obtain the matched strings and +- * their position you can use, respectively, g_match_info_fetch() and +- * g_match_info_fetch_pos(). Note that the strings are returned in +- * reverse order of length; that is, the longest matching string is +- * given first. +- * +- * Note that the DFA algorithm is slower than the standard one and it +- * is not able to capture substrings, so backreferences do not work. +- * +- * Setting @start_position differs from just passing over a shortened +- * string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern +- * that begins with any kind of lookbehind assertion, such as "\b". +- * +- * A #GMatchInfo structure, used to get information on the match, is +- * stored in @match_info if not %NULL. Note that if @match_info is +- * not %NULL then it is created even if the function returns %FALSE, +- * i.e. you must free it regardless if regular expression actually +- * matched. +- * +- * @string is not copied and is used in #GMatchInfo internally. If +- * you use any #GMatchInfo method (except g_match_info_free()) after +- * freeing or modifying @string then the behaviour is undefined. +- * +- * Returns: %TRUE is the string matched, %FALSE otherwise +- * +- * Since: 2.14 +- */ +-gboolean +-g_regex_match_all_full (const GRegex *regex, +- const gchar *string, +- gssize string_len, +- gint start_position, +- GRegexMatchFlags match_options, +- GMatchInfo **match_info, +- GError **error) +-{ +- GMatchInfo *info; +- gboolean done; +- pcre *pcre_re; +- pcre_extra *extra; +- gboolean retval; +- +- g_return_val_if_fail (regex != NULL, FALSE); +- g_return_val_if_fail (string != NULL, FALSE); +- g_return_val_if_fail (start_position >= 0, FALSE); +- g_return_val_if_fail (error == NULL || *error == NULL, FALSE); +- g_return_val_if_fail ((match_options & ~G_REGEX_MATCH_MASK) == 0, FALSE); +- +-#ifdef PCRE_NO_AUTO_POSSESS +- /* For PCRE >= 8.34 we need to turn off PCRE_NO_AUTO_POSSESS, which +- * is an optimization for normal regex matching, but results in omitting +- * some shorter matches here, and an observable behaviour change. +- * +- * DFA matching is rather niche, and very rarely used according to +- * codesearch.debian.net, so don't bother caching the recompiled RE. */ +- pcre_re = regex_compile (regex->pattern, +- regex->compile_opts | PCRE_NO_AUTO_POSSESS, +- NULL, NULL, error); +- +- if (pcre_re == NULL) +- return FALSE; +- +- /* Not bothering to cache the optimization data either, with similar +- * reasoning */ +- extra = NULL; +-#else +- /* For PCRE < 8.33 the precompiled regex is fine. */ +- pcre_re = regex->pcre_re; +- extra = regex->extra; +-#endif +- +- info = match_info_new (regex, string, string_len, start_position, +- match_options, TRUE); +- +- done = FALSE; +- while (!done) +- { +- done = TRUE; +- info->matches = pcre_dfa_exec (pcre_re, extra, +- info->string, info->string_len, +- info->pos, +- regex->match_opts | match_options, +- info->offsets, info->n_offsets, +- info->workspace, info->n_workspace); +- if (info->matches == PCRE_ERROR_DFA_WSSIZE) +- { +- /* info->workspace is too small. */ +- info->n_workspace *= 2; +- info->workspace = g_realloc (info->workspace, +- info->n_workspace * sizeof (gint)); +- done = FALSE; +- } +- else if (info->matches == 0) +- { +- /* info->offsets is too small. */ +- info->n_offsets *= 2; +- info->offsets = g_realloc (info->offsets, +- info->n_offsets * sizeof (gint)); +- done = FALSE; +- } +- else if (IS_PCRE_ERROR (info->matches)) +- { +- g_set_error (error, G_REGEX_ERROR, G_REGEX_ERROR_MATCH, +- _("Error while matching regular expression %s: %s"), +- regex->pattern, match_error (info->matches)); +- } +- } +- +-#ifdef PCRE_NO_AUTO_POSSESS +- pcre_free (pcre_re); +-#endif +- +- /* set info->pos to -1 so that a call to g_match_info_next() fails. */ +- info->pos = -1; +- retval = info->matches >= 0; +- +- if (match_info != NULL) +- *match_info = info; +- else +- g_match_info_free (info); +- +- return retval; +-} +- +-/** +- * g_regex_get_string_number: +- * @regex: #GRegex structure +- * @name: name of the subexpression +- * +- * Retrieves the number of the subexpression named @name. +- * +- * Returns: The number of the subexpression or -1 if @name +- * does not exists +- * +- * Since: 2.14 +- */ +-gint +-g_regex_get_string_number (const GRegex *regex, +- const gchar *name) +-{ +- gint num; +- +- g_return_val_if_fail (regex != NULL, -1); +- g_return_val_if_fail (name != NULL, -1); +- +- num = pcre_get_stringnumber (regex->pcre_re, name); +- if (num == PCRE_ERROR_NOSUBSTRING) +- num = -1; +- +- return num; +-} +- +-/** +- * g_regex_split_simple: +- * @pattern: the regular expression +- * @string: the string to scan for matches +- * @compile_options: compile options for the regular expression, or 0 +- * @match_options: match options, or 0 +- * +- * Breaks the string on the pattern, and returns an array of +- * the tokens. If the pattern contains capturing parentheses, +- * then the text for each of the substrings will also be returned. +- * If the pattern does not match anywhere in the string, then the +- * whole string is returned as the first token. +- * +- * This function is equivalent to g_regex_split() but it does +- * not require to compile the pattern with g_regex_new(), avoiding +- * some lines of code when you need just to do a split without +- * extracting substrings, capture counts, and so on. +- * +- * If this function is to be called on the same @pattern more than +- * once, it's more efficient to compile the pattern once with +- * g_regex_new() and then use g_regex_split(). +- * +- * As a special case, the result of splitting the empty string "" +- * is an empty vector, not a vector containing a single string. +- * The reason for this special case is that being able to represent +- * a empty vector is typically more useful than consistent handling +- * of empty elements. If you do need to represent empty elements, +- * you'll need to check for the empty string before calling this +- * function. +- * +- * A pattern that can match empty strings splits @string into +- * separate characters wherever it matches the empty string between +- * characters. For example splitting "ab c" using as a separator +- * "\s*", you will get "a", "b" and "c". +- * +- * Returns: (transfer full): a %NULL-terminated array of strings. Free +- * it using g_strfreev() +- * +- * Since: 2.14 +- **/ +-gchar ** +-g_regex_split_simple (const gchar *pattern, +- const gchar *string, +- GRegexCompileFlags compile_options, +- GRegexMatchFlags match_options) +-{ +- GRegex *regex; +- gchar **result; +- +- regex = g_regex_new (pattern, compile_options, 0, NULL); +- if (!regex) +- return NULL; +- +- result = g_regex_split_full (regex, string, -1, 0, match_options, 0, NULL); +- g_regex_unref (regex); +- return result; +-} +- +-/** +- * g_regex_split: +- * @regex: a #GRegex structure +- * @string: the string to split with the pattern +- * @match_options: match time option flags +- * +- * Breaks the string on the pattern, and returns an array of the tokens. +- * If the pattern contains capturing parentheses, then the text for each +- * of the substrings will also be returned. If the pattern does not match +- * anywhere in the string, then the whole string is returned as the first +- * token. +- * +- * As a special case, the result of splitting the empty string "" is an +- * empty vector, not a vector containing a single string. The reason for +- * this special case is that being able to represent a empty vector is +- * typically more useful than consistent handling of empty elements. If +- * you do need to represent empty elements, you'll need to check for the +- * empty string before calling this function. +- * +- * A pattern that can match empty strings splits @string into separate +- * characters wherever it matches the empty string between characters. +- * For example splitting "ab c" using as a separator "\s*", you will get +- * "a", "b" and "c". +- * +- * Returns: (transfer full): a %NULL-terminated gchar ** array. Free +- * it using g_strfreev() +- * +- * Since: 2.14 +- **/ +-gchar ** +-g_regex_split (const GRegex *regex, +- const gchar *string, +- GRegexMatchFlags match_options) +-{ +- return g_regex_split_full (regex, string, -1, 0, +- match_options, 0, NULL); +-} +- +-/** +- * g_regex_split_full: +- * @regex: a #GRegex structure +- * @string: (array length=string_len): the string to split with the pattern +- * @string_len: the length of @string, or -1 if @string is nul-terminated +- * @start_position: starting index of the string to match, in bytes +- * @match_options: match time option flags +- * @max_tokens: the maximum number of tokens to split @string into. +- * If this is less than 1, the string is split completely +- * @error: return location for a #GError +- * +- * Breaks the string on the pattern, and returns an array of the tokens. +- * If the pattern contains capturing parentheses, then the text for each +- * of the substrings will also be returned. If the pattern does not match +- * anywhere in the string, then the whole string is returned as the first +- * token. +- * +- * As a special case, the result of splitting the empty string "" is an +- * empty vector, not a vector containing a single string. The reason for +- * this special case is that being able to represent a empty vector is +- * typically more useful than consistent handling of empty elements. If +- * you do need to represent empty elements, you'll need to check for the +- * empty string before calling this function. +- * +- * A pattern that can match empty strings splits @string into separate +- * characters wherever it matches the empty string between characters. +- * For example splitting "ab c" using as a separator "\s*", you will get +- * "a", "b" and "c". +- * +- * Setting @start_position differs from just passing over a shortened +- * string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern +- * that begins with any kind of lookbehind assertion, such as "\b". +- * +- * Returns: (transfer full): a %NULL-terminated gchar ** array. Free +- * it using g_strfreev() +- * +- * Since: 2.14 +- **/ +-gchar ** +-g_regex_split_full (const GRegex *regex, +- const gchar *string, +- gssize string_len, +- gint start_position, +- GRegexMatchFlags match_options, +- gint max_tokens, +- GError **error) +-{ +- GError *tmp_error = NULL; +- GMatchInfo *match_info; +- GList *list, *last; +- gint i; +- gint token_count; +- gboolean match_ok; +- /* position of the last separator. */ +- gint last_separator_end; +- /* was the last match 0 bytes long? */ +- gboolean last_match_is_empty; +- /* the returned array of char **s */ +- gchar **string_list; +- +- g_return_val_if_fail (regex != NULL, NULL); +- g_return_val_if_fail (string != NULL, NULL); +- g_return_val_if_fail (start_position >= 0, NULL); +- g_return_val_if_fail (error == NULL || *error == NULL, NULL); +- g_return_val_if_fail ((match_options & ~G_REGEX_MATCH_MASK) == 0, NULL); +- +- if (max_tokens <= 0) +- max_tokens = G_MAXINT; +- +- if (string_len < 0) +- string_len = strlen (string); +- +- /* zero-length string */ +- if (string_len - start_position == 0) +- return g_new0 (gchar *, 1); +- +- if (max_tokens == 1) +- { +- string_list = g_new0 (gchar *, 2); +- string_list[0] = g_strndup (&string[start_position], +- string_len - start_position); +- return string_list; +- } +- +- list = NULL; +- token_count = 0; +- last_separator_end = start_position; +- last_match_is_empty = FALSE; +- +- match_ok = g_regex_match_full (regex, string, string_len, start_position, +- match_options, &match_info, &tmp_error); +- +- while (tmp_error == NULL) +- { +- if (match_ok) +- { +- last_match_is_empty = +- (match_info->offsets[0] == match_info->offsets[1]); +- +- /* we need to skip empty separators at the same position of the end +- * of another separator. e.g. the string is "a b" and the separator +- * is " *", so from 1 to 2 we have a match and at position 2 we have +- * an empty match. */ +- if (last_separator_end != match_info->offsets[1]) +- { +- gchar *token; +- gint match_count; +- +- token = g_strndup (string + last_separator_end, +- match_info->offsets[0] - last_separator_end); +- list = g_list_prepend (list, token); +- token_count++; +- +- /* if there were substrings, these need to be added to +- * the list. */ +- match_count = g_match_info_get_match_count (match_info); +- if (match_count > 1) +- { +- for (i = 1; i < match_count; i++) +- list = g_list_prepend (list, g_match_info_fetch (match_info, i)); +- } +- } +- } +- else +- { +- /* if there was no match, copy to end of string. */ +- if (!last_match_is_empty) +- { +- gchar *token = g_strndup (string + last_separator_end, +- match_info->string_len - last_separator_end); +- list = g_list_prepend (list, token); +- } +- /* no more tokens, end the loop. */ +- break; +- } +- +- /* -1 to leave room for the last part. */ +- if (token_count >= max_tokens - 1) +- { +- /* we have reached the maximum number of tokens, so we copy +- * the remaining part of the string. */ +- if (last_match_is_empty) +- { +- /* the last match was empty, so we have moved one char +- * after the real position to avoid empty matches at the +- * same position. */ +- match_info->pos = PREV_CHAR (regex, &string[match_info->pos]) - string; +- } +- /* the if is needed in the case we have terminated the available +- * tokens, but we are at the end of the string, so there are no +- * characters left to copy. */ +- if (string_len > match_info->pos) +- { +- gchar *token = g_strndup (string + match_info->pos, +- string_len - match_info->pos); +- list = g_list_prepend (list, token); +- } +- /* end the loop. */ +- break; +- } +- +- last_separator_end = match_info->pos; +- if (last_match_is_empty) +- /* if the last match was empty, g_match_info_next() has moved +- * forward to avoid infinite loops, but we still need to copy that +- * character. */ +- last_separator_end = PREV_CHAR (regex, &string[last_separator_end]) - string; +- +- match_ok = g_match_info_next (match_info, &tmp_error); +- } +- g_match_info_free (match_info); +- if (tmp_error != NULL) +- { +- g_propagate_error (error, tmp_error); +- g_list_free_full (list, g_free); +- return NULL; +- } +- +- string_list = g_new (gchar *, g_list_length (list) + 1); +- i = 0; +- for (last = g_list_last (list); last; last = g_list_previous (last)) +- string_list[i++] = last->data; +- string_list[i] = NULL; +- g_list_free (list); +- +- return string_list; +-} +- +-enum +-{ +- REPL_TYPE_STRING, +- REPL_TYPE_CHARACTER, +- REPL_TYPE_SYMBOLIC_REFERENCE, +- REPL_TYPE_NUMERIC_REFERENCE, +- REPL_TYPE_CHANGE_CASE +-}; +- +-typedef enum +-{ +- CHANGE_CASE_NONE = 1 << 0, +- CHANGE_CASE_UPPER = 1 << 1, +- CHANGE_CASE_LOWER = 1 << 2, +- CHANGE_CASE_UPPER_SINGLE = 1 << 3, +- CHANGE_CASE_LOWER_SINGLE = 1 << 4, +- CHANGE_CASE_SINGLE_MASK = CHANGE_CASE_UPPER_SINGLE | CHANGE_CASE_LOWER_SINGLE, +- CHANGE_CASE_LOWER_MASK = CHANGE_CASE_LOWER | CHANGE_CASE_LOWER_SINGLE, +- CHANGE_CASE_UPPER_MASK = CHANGE_CASE_UPPER | CHANGE_CASE_UPPER_SINGLE +-} ChangeCase; +- +-struct _InterpolationData +-{ +- gchar *text; +- gint type; +- gint num; +- gchar c; +- ChangeCase change_case; +-}; +- +-static void +-free_interpolation_data (InterpolationData *data) +-{ +- g_free (data->text); +- g_free (data); +-} +- +-static const gchar * +-expand_escape (const gchar *replacement, +- const gchar *p, +- InterpolationData *data, +- GError **error) +-{ +- const gchar *q, *r; +- gint x, d, h, i; +- const gchar *error_detail; +- gint base = 0; +- GError *tmp_error = NULL; +- +- p++; +- switch (*p) +- { +- case 't': +- p++; +- data->c = '\t'; +- data->type = REPL_TYPE_CHARACTER; +- break; +- case 'n': +- p++; +- data->c = '\n'; +- data->type = REPL_TYPE_CHARACTER; +- break; +- case 'v': +- p++; +- data->c = '\v'; +- data->type = REPL_TYPE_CHARACTER; +- break; +- case 'r': +- p++; +- data->c = '\r'; +- data->type = REPL_TYPE_CHARACTER; +- break; +- case 'f': +- p++; +- data->c = '\f'; +- data->type = REPL_TYPE_CHARACTER; +- break; +- case 'a': +- p++; +- data->c = '\a'; +- data->type = REPL_TYPE_CHARACTER; +- break; +- case 'b': +- p++; +- data->c = '\b'; +- data->type = REPL_TYPE_CHARACTER; +- break; +- case '\\': +- p++; +- data->c = '\\'; +- data->type = REPL_TYPE_CHARACTER; +- break; +- case 'x': +- p++; +- x = 0; +- if (*p == '{') +- { +- p++; +- do +- { +- h = g_ascii_xdigit_value (*p); +- if (h < 0) +- { +- error_detail = _("hexadecimal digit or “}” expected"); +- goto error; +- } +- x = x * 16 + h; +- p++; +- } +- while (*p != '}'); +- p++; +- } +- else +- { +- for (i = 0; i < 2; i++) +- { +- h = g_ascii_xdigit_value (*p); +- if (h < 0) +- { +- error_detail = _("hexadecimal digit expected"); +- goto error; +- } +- x = x * 16 + h; +- p++; +- } +- } +- data->type = REPL_TYPE_STRING; +- data->text = g_new0 (gchar, 8); +- g_unichar_to_utf8 (x, data->text); +- break; +- case 'l': +- p++; +- data->type = REPL_TYPE_CHANGE_CASE; +- data->change_case = CHANGE_CASE_LOWER_SINGLE; +- break; +- case 'u': +- p++; +- data->type = REPL_TYPE_CHANGE_CASE; +- data->change_case = CHANGE_CASE_UPPER_SINGLE; +- break; +- case 'L': +- p++; +- data->type = REPL_TYPE_CHANGE_CASE; +- data->change_case = CHANGE_CASE_LOWER; +- break; +- case 'U': +- p++; +- data->type = REPL_TYPE_CHANGE_CASE; +- data->change_case = CHANGE_CASE_UPPER; +- break; +- case 'E': +- p++; +- data->type = REPL_TYPE_CHANGE_CASE; +- data->change_case = CHANGE_CASE_NONE; +- break; +- case 'g': +- p++; +- if (*p != '<') +- { +- error_detail = _("missing “<” in symbolic reference"); +- goto error; +- } +- q = p + 1; +- do +- { +- p++; +- if (!*p) +- { +- error_detail = _("unfinished symbolic reference"); +- goto error; +- } +- } +- while (*p != '>'); +- if (p - q == 0) +- { +- error_detail = _("zero-length symbolic reference"); +- goto error; +- } +- if (g_ascii_isdigit (*q)) +- { +- x = 0; +- do +- { +- h = g_ascii_digit_value (*q); +- if (h < 0) +- { +- error_detail = _("digit expected"); +- p = q; +- goto error; +- } +- x = x * 10 + h; +- q++; +- } +- while (q != p); +- data->num = x; +- data->type = REPL_TYPE_NUMERIC_REFERENCE; +- } +- else +- { +- r = q; +- do +- { +- if (!g_ascii_isalnum (*r)) +- { +- error_detail = _("illegal symbolic reference"); +- p = r; +- goto error; +- } +- r++; +- } +- while (r != p); +- data->text = g_strndup (q, p - q); +- data->type = REPL_TYPE_SYMBOLIC_REFERENCE; +- } +- p++; +- break; +- case '0': +- /* if \0 is followed by a number is an octal number representing a +- * character, else it is a numeric reference. */ +- if (g_ascii_digit_value (*g_utf8_next_char (p)) >= 0) +- { +- base = 8; +- p = g_utf8_next_char (p); +- } +- case '1': +- case '2': +- case '3': +- case '4': +- case '5': +- case '6': +- case '7': +- case '8': +- case '9': +- x = 0; +- d = 0; +- for (i = 0; i < 3; i++) +- { +- h = g_ascii_digit_value (*p); +- if (h < 0) +- break; +- if (h > 7) +- { +- if (base == 8) +- break; +- else +- base = 10; +- } +- if (i == 2 && base == 10) +- break; +- x = x * 8 + h; +- d = d * 10 + h; +- p++; +- } +- if (base == 8 || i == 3) +- { +- data->type = REPL_TYPE_STRING; +- data->text = g_new0 (gchar, 8); +- g_unichar_to_utf8 (x, data->text); +- } +- else +- { +- data->type = REPL_TYPE_NUMERIC_REFERENCE; +- data->num = d; +- } +- break; +- case 0: +- error_detail = _("stray final “\\”"); +- goto error; +- break; +- default: +- error_detail = _("unknown escape sequence"); +- goto error; +- } +- +- return p; +- +- error: +- /* G_GSSIZE_FORMAT doesn't work with gettext, so we use %lu */ +- tmp_error = g_error_new (G_REGEX_ERROR, +- G_REGEX_ERROR_REPLACE, +- _("Error while parsing replacement " +- "text “%s” at char %lu: %s"), +- replacement, +- (gulong)(p - replacement), +- error_detail); +- g_propagate_error (error, tmp_error); +- +- return NULL; +-} +- +-static GList * +-split_replacement (const gchar *replacement, +- GError **error) +-{ +- GList *list = NULL; +- InterpolationData *data; +- const gchar *p, *start; +- +- start = p = replacement; +- while (*p) +- { +- if (*p == '\\') +- { +- data = g_new0 (InterpolationData, 1); +- start = p = expand_escape (replacement, p, data, error); +- if (p == NULL) +- { +- g_list_free_full (list, (GDestroyNotify) free_interpolation_data); +- free_interpolation_data (data); +- +- return NULL; +- } +- list = g_list_prepend (list, data); +- } +- else +- { +- p++; +- if (*p == '\\' || *p == '\0') +- { +- if (p - start > 0) +- { +- data = g_new0 (InterpolationData, 1); +- data->text = g_strndup (start, p - start); +- data->type = REPL_TYPE_STRING; +- list = g_list_prepend (list, data); +- } +- } +- } +- } +- +- return g_list_reverse (list); +-} +- +-/* Change the case of c based on change_case. */ +-#define CHANGE_CASE(c, change_case) \ +- (((change_case) & CHANGE_CASE_LOWER_MASK) ? \ +- g_unichar_tolower (c) : \ +- g_unichar_toupper (c)) +- +-static void +-string_append (GString *string, +- const gchar *text, +- ChangeCase *change_case) +-{ +- gunichar c; +- +- if (text[0] == '\0') +- return; +- +- if (*change_case == CHANGE_CASE_NONE) +- { +- g_string_append (string, text); +- } +- else if (*change_case & CHANGE_CASE_SINGLE_MASK) +- { +- c = g_utf8_get_char (text); +- g_string_append_unichar (string, CHANGE_CASE (c, *change_case)); +- g_string_append (string, g_utf8_next_char (text)); +- *change_case = CHANGE_CASE_NONE; +- } +- else +- { +- while (*text != '\0') +- { +- c = g_utf8_get_char (text); +- g_string_append_unichar (string, CHANGE_CASE (c, *change_case)); +- text = g_utf8_next_char (text); +- } +- } +-} +- +-static gboolean +-interpolate_replacement (const GMatchInfo *match_info, +- GString *result, +- gpointer data) +-{ +- GList *list; +- InterpolationData *idata; +- gchar *match; +- ChangeCase change_case = CHANGE_CASE_NONE; +- +- for (list = data; list; list = list->next) +- { +- idata = list->data; +- switch (idata->type) +- { +- case REPL_TYPE_STRING: +- string_append (result, idata->text, &change_case); +- break; +- case REPL_TYPE_CHARACTER: +- g_string_append_c (result, CHANGE_CASE (idata->c, change_case)); +- if (change_case & CHANGE_CASE_SINGLE_MASK) +- change_case = CHANGE_CASE_NONE; +- break; +- case REPL_TYPE_NUMERIC_REFERENCE: +- match = g_match_info_fetch (match_info, idata->num); +- if (match) +- { +- string_append (result, match, &change_case); +- g_free (match); +- } +- break; +- case REPL_TYPE_SYMBOLIC_REFERENCE: +- match = g_match_info_fetch_named (match_info, idata->text); +- if (match) +- { +- string_append (result, match, &change_case); +- g_free (match); +- } +- break; +- case REPL_TYPE_CHANGE_CASE: +- change_case = idata->change_case; +- break; +- } +- } +- +- return FALSE; +-} +- +-/* whether actual match_info is needed for replacement, i.e. +- * whether there are references +- */ +-static gboolean +-interpolation_list_needs_match (GList *list) +-{ +- while (list != NULL) +- { +- InterpolationData *data = list->data; +- +- if (data->type == REPL_TYPE_SYMBOLIC_REFERENCE || +- data->type == REPL_TYPE_NUMERIC_REFERENCE) +- { +- return TRUE; +- } +- +- list = list->next; +- } +- +- return FALSE; +-} +- +-/** +- * g_regex_replace: +- * @regex: a #GRegex structure +- * @string: (array length=string_len): the string to perform matches against +- * @string_len: the length of @string, or -1 if @string is nul-terminated +- * @start_position: starting index of the string to match, in bytes +- * @replacement: text to replace each match with +- * @match_options: options for the match +- * @error: location to store the error occurring, or %NULL to ignore errors +- * +- * Replaces all occurrences of the pattern in @regex with the +- * replacement text. Backreferences of the form '\number' or +- * '\g' in the replacement text are interpolated by the +- * number-th captured subexpression of the match, '\g' refers +- * to the captured subexpression with the given name. '\0' refers +- * to the complete match, but '\0' followed by a number is the octal +- * representation of a character. To include a literal '\' in the +- * replacement, write '\\\\'. +- * +- * There are also escapes that changes the case of the following text: +- * +- * - \l: Convert to lower case the next character +- * - \u: Convert to upper case the next character +- * - \L: Convert to lower case till \E +- * - \U: Convert to upper case till \E +- * - \E: End case modification +- * +- * If you do not need to use backreferences use g_regex_replace_literal(). +- * +- * The @replacement string must be UTF-8 encoded even if #G_REGEX_RAW was +- * passed to g_regex_new(). If you want to use not UTF-8 encoded stings +- * you can use g_regex_replace_literal(). +- * +- * Setting @start_position differs from just passing over a shortened +- * string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern that +- * begins with any kind of lookbehind assertion, such as "\b". +- * +- * Returns: a newly allocated string containing the replacements +- * +- * Since: 2.14 +- */ +-gchar * +-g_regex_replace (const GRegex *regex, +- const gchar *string, +- gssize string_len, +- gint start_position, +- const gchar *replacement, +- GRegexMatchFlags match_options, +- GError **error) +-{ +- gchar *result; +- GList *list; +- GError *tmp_error = NULL; +- +- g_return_val_if_fail (regex != NULL, NULL); +- g_return_val_if_fail (string != NULL, NULL); +- g_return_val_if_fail (start_position >= 0, NULL); +- g_return_val_if_fail (replacement != NULL, NULL); +- g_return_val_if_fail (error == NULL || *error == NULL, NULL); +- g_return_val_if_fail ((match_options & ~G_REGEX_MATCH_MASK) == 0, NULL); +- +- list = split_replacement (replacement, &tmp_error); +- if (tmp_error != NULL) +- { +- g_propagate_error (error, tmp_error); +- return NULL; +- } +- +- result = g_regex_replace_eval (regex, +- string, string_len, start_position, +- match_options, +- interpolate_replacement, +- (gpointer)list, +- &tmp_error); +- if (tmp_error != NULL) +- g_propagate_error (error, tmp_error); +- +- g_list_free_full (list, (GDestroyNotify) free_interpolation_data); +- +- return result; +-} +- +-static gboolean +-literal_replacement (const GMatchInfo *match_info, +- GString *result, +- gpointer data) +-{ +- g_string_append (result, data); +- return FALSE; +-} +- +-/** +- * g_regex_replace_literal: +- * @regex: a #GRegex structure +- * @string: (array length=string_len): the string to perform matches against +- * @string_len: the length of @string, or -1 if @string is nul-terminated +- * @start_position: starting index of the string to match, in bytes +- * @replacement: text to replace each match with +- * @match_options: options for the match +- * @error: location to store the error occurring, or %NULL to ignore errors +- * +- * Replaces all occurrences of the pattern in @regex with the +- * replacement text. @replacement is replaced literally, to +- * include backreferences use g_regex_replace(). +- * +- * Setting @start_position differs from just passing over a +- * shortened string and setting #G_REGEX_MATCH_NOTBOL in the +- * case of a pattern that begins with any kind of lookbehind +- * assertion, such as "\b". +- * +- * Returns: a newly allocated string containing the replacements +- * +- * Since: 2.14 +- */ +-gchar * +-g_regex_replace_literal (const GRegex *regex, +- const gchar *string, +- gssize string_len, +- gint start_position, +- const gchar *replacement, +- GRegexMatchFlags match_options, +- GError **error) +-{ +- g_return_val_if_fail (replacement != NULL, NULL); +- g_return_val_if_fail ((match_options & ~G_REGEX_MATCH_MASK) == 0, NULL); +- +- return g_regex_replace_eval (regex, +- string, string_len, start_position, +- match_options, +- literal_replacement, +- (gpointer)replacement, +- error); +-} +- +-/** +- * g_regex_replace_eval: +- * @regex: a #GRegex structure from g_regex_new() +- * @string: (array length=string_len): string to perform matches against +- * @string_len: the length of @string, or -1 if @string is nul-terminated +- * @start_position: starting index of the string to match, in bytes +- * @match_options: options for the match +- * @eval: a function to call for each match +- * @user_data: user data to pass to the function +- * @error: location to store the error occurring, or %NULL to ignore errors +- * +- * Replaces occurrences of the pattern in regex with the output of +- * @eval for that occurrence. +- * +- * Setting @start_position differs from just passing over a shortened +- * string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern +- * that begins with any kind of lookbehind assertion, such as "\b". +- * +- * The following example uses g_regex_replace_eval() to replace multiple +- * strings at once: +- * |[ +- * static gboolean +- * eval_cb (const GMatchInfo *info, +- * GString *res, +- * gpointer data) +- * { +- * gchar *match; +- * gchar *r; +- * +- * match = g_match_info_fetch (info, 0); +- * r = g_hash_table_lookup ((GHashTable *)data, match); +- * g_string_append (res, r); +- * g_free (match); +- * +- * return FALSE; +- * } +- * +- * ... +- * +- * GRegex *reg; +- * GHashTable *h; +- * gchar *res; +- * +- * h = g_hash_table_new (g_str_hash, g_str_equal); +- * +- * g_hash_table_insert (h, "1", "ONE"); +- * g_hash_table_insert (h, "2", "TWO"); +- * g_hash_table_insert (h, "3", "THREE"); +- * g_hash_table_insert (h, "4", "FOUR"); +- * +- * reg = g_regex_new ("1|2|3|4", 0, 0, NULL); +- * res = g_regex_replace_eval (reg, text, -1, 0, 0, eval_cb, h, NULL); +- * g_hash_table_destroy (h); +- * +- * ... +- * ]| +- * +- * Returns: a newly allocated string containing the replacements +- * +- * Since: 2.14 +- */ +-gchar * +-g_regex_replace_eval (const GRegex *regex, +- const gchar *string, +- gssize string_len, +- gint start_position, +- GRegexMatchFlags match_options, +- GRegexEvalCallback eval, +- gpointer user_data, +- GError **error) +-{ +- GMatchInfo *match_info; +- GString *result; +- gint str_pos = 0; +- gboolean done = FALSE; +- GError *tmp_error = NULL; +- +- g_return_val_if_fail (regex != NULL, NULL); +- g_return_val_if_fail (string != NULL, NULL); +- g_return_val_if_fail (start_position >= 0, NULL); +- g_return_val_if_fail (eval != NULL, NULL); +- g_return_val_if_fail ((match_options & ~G_REGEX_MATCH_MASK) == 0, NULL); +- +- if (string_len < 0) +- string_len = strlen (string); +- +- result = g_string_sized_new (string_len); +- +- /* run down the string making matches. */ +- g_regex_match_full (regex, string, string_len, start_position, +- match_options, &match_info, &tmp_error); +- while (!done && g_match_info_matches (match_info)) +- { +- g_string_append_len (result, +- string + str_pos, +- match_info->offsets[0] - str_pos); +- done = (*eval) (match_info, result, user_data); +- str_pos = match_info->offsets[1]; +- g_match_info_next (match_info, &tmp_error); +- } +- g_match_info_free (match_info); +- if (tmp_error != NULL) +- { +- g_propagate_error (error, tmp_error); +- g_string_free (result, TRUE); +- return NULL; +- } +- +- g_string_append_len (result, string + str_pos, string_len - str_pos); +- return g_string_free (result, FALSE); +-} +- +-/** +- * g_regex_check_replacement: +- * @replacement: the replacement string +- * @has_references: (out) (optional): location to store information about +- * references in @replacement or %NULL +- * @error: location to store error +- * +- * Checks whether @replacement is a valid replacement string +- * (see g_regex_replace()), i.e. that all escape sequences in +- * it are valid. +- * +- * If @has_references is not %NULL then @replacement is checked +- * for pattern references. For instance, replacement text 'foo\n' +- * does not contain references and may be evaluated without information +- * about actual match, but '\0\1' (whole match followed by first +- * subpattern) requires valid #GMatchInfo object. +- * +- * Returns: whether @replacement is a valid replacement string +- * +- * Since: 2.14 +- */ +-gboolean +-g_regex_check_replacement (const gchar *replacement, +- gboolean *has_references, +- GError **error) +-{ +- GList *list; +- GError *tmp = NULL; +- +- list = split_replacement (replacement, &tmp); +- +- if (tmp) +- { +- g_propagate_error (error, tmp); +- return FALSE; +- } +- +- if (has_references) +- *has_references = interpolation_list_needs_match (list); +- +- g_list_free_full (list, (GDestroyNotify) free_interpolation_data); +- +- return TRUE; +-} +- +-/** +- * g_regex_escape_nul: +- * @string: the string to escape +- * @length: the length of @string +- * +- * Escapes the nul characters in @string to "\x00". It can be used +- * to compile a regex with embedded nul characters. +- * +- * For completeness, @length can be -1 for a nul-terminated string. +- * In this case the output string will be of course equal to @string. +- * +- * Returns: a newly-allocated escaped string +- * +- * Since: 2.30 +- */ +-gchar * +-g_regex_escape_nul (const gchar *string, +- gint length) +-{ +- GString *escaped; +- const gchar *p, *piece_start, *end; +- gint backslashes; +- +- g_return_val_if_fail (string != NULL, NULL); +- +- if (length < 0) +- return g_strdup (string); +- +- end = string + length; +- p = piece_start = string; +- escaped = g_string_sized_new (length + 1); +- +- backslashes = 0; +- while (p < end) +- { +- switch (*p) +- { +- case '\0': +- if (p != piece_start) +- { +- /* copy the previous piece. */ +- g_string_append_len (escaped, piece_start, p - piece_start); +- } +- if ((backslashes & 1) == 0) +- g_string_append_c (escaped, '\\'); +- g_string_append_c (escaped, 'x'); +- g_string_append_c (escaped, '0'); +- g_string_append_c (escaped, '0'); +- piece_start = ++p; +- backslashes = 0; +- break; +- case '\\': +- backslashes++; +- ++p; +- break; +- default: +- backslashes = 0; +- p = g_utf8_next_char (p); +- break; +- } +- } +- +- if (piece_start < end) +- g_string_append_len (escaped, piece_start, end - piece_start); +- +- return g_string_free (escaped, FALSE); +-} +- +-/** +- * g_regex_escape_string: +- * @string: (array length=length): the string to escape +- * @length: the length of @string, or -1 if @string is nul-terminated +- * +- * Escapes the special characters used for regular expressions +- * in @string, for instance "a.b*c" becomes "a\.b\*c". This +- * function is useful to dynamically generate regular expressions. +- * +- * @string can contain nul characters that are replaced with "\0", +- * in this case remember to specify the correct length of @string +- * in @length. +- * +- * Returns: a newly-allocated escaped string +- * +- * Since: 2.14 +- */ +-gchar * +-g_regex_escape_string (const gchar *string, +- gint length) +-{ +- GString *escaped; +- const char *p, *piece_start, *end; +- +- g_return_val_if_fail (string != NULL, NULL); +- +- if (length < 0) +- length = strlen (string); +- +- end = string + length; +- p = piece_start = string; +- escaped = g_string_sized_new (length + 1); +- +- while (p < end) +- { +- switch (*p) +- { +- case '\0': +- case '\\': +- case '|': +- case '(': +- case ')': +- case '[': +- case ']': +- case '{': +- case '}': +- case '^': +- case '$': +- case '*': +- case '+': +- case '?': +- case '.': +- if (p != piece_start) +- /* copy the previous piece. */ +- g_string_append_len (escaped, piece_start, p - piece_start); +- g_string_append_c (escaped, '\\'); +- if (*p == '\0') +- g_string_append_c (escaped, '0'); +- else +- g_string_append_c (escaped, *p); +- piece_start = ++p; +- break; +- default: +- p = g_utf8_next_char (p); +- break; +- } +- } +- +- if (piece_start < end) +- g_string_append_len (escaped, piece_start, end - piece_start); +- +- return g_string_free (escaped, FALSE); +-} +Index: glib-2.56.4/glib/gregex.h +=================================================================== +--- glib-2.56.4.orig/glib/gregex.h ++++ glib-2.56.4/glib/gregex.h +@@ -1,609 +0,0 @@ +-/* GRegex -- regular expression API wrapper around PCRE. +- * +- * Copyright (C) 1999, 2000 Scott Wimer +- * Copyright (C) 2004, Matthias Clasen +- * Copyright (C) 2005 - 2007, Marco Barisione +- * +- * This library is free software; you can redistribute it and/or +- * modify it under the terms of the GNU Lesser General Public +- * License as published by the Free Software Foundation; either +- * version 2.1 of the License, or (at your option) any later version. +- * +- * This library is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- * Lesser General Public License for more details. +- * +- * You should have received a copy of the GNU Lesser General Public License +- * along with this library; if not, see . +- */ +- +-#ifndef __G_REGEX_H__ +-#define __G_REGEX_H__ +- +-#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +-#error "Only can be included directly." +-#endif +- +-#include +-#include +- +-G_BEGIN_DECLS +- +-/** +- * GRegexError: +- * @G_REGEX_ERROR_COMPILE: Compilation of the regular expression failed. +- * @G_REGEX_ERROR_OPTIMIZE: Optimization of the regular expression failed. +- * @G_REGEX_ERROR_REPLACE: Replacement failed due to an ill-formed replacement +- * string. +- * @G_REGEX_ERROR_MATCH: The match process failed. +- * @G_REGEX_ERROR_INTERNAL: Internal error of the regular expression engine. +- * Since 2.16 +- * @G_REGEX_ERROR_STRAY_BACKSLASH: "\\" at end of pattern. Since 2.16 +- * @G_REGEX_ERROR_MISSING_CONTROL_CHAR: "\\c" at end of pattern. Since 2.16 +- * @G_REGEX_ERROR_UNRECOGNIZED_ESCAPE: Unrecognized character follows "\\". +- * Since 2.16 +- * @G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER: Numbers out of order in "{}" +- * quantifier. Since 2.16 +- * @G_REGEX_ERROR_QUANTIFIER_TOO_BIG: Number too big in "{}" quantifier. +- * Since 2.16 +- * @G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS: Missing terminating "]" for +- * character class. Since 2.16 +- * @G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS: Invalid escape sequence +- * in character class. Since 2.16 +- * @G_REGEX_ERROR_RANGE_OUT_OF_ORDER: Range out of order in character class. +- * Since 2.16 +- * @G_REGEX_ERROR_NOTHING_TO_REPEAT: Nothing to repeat. Since 2.16 +- * @G_REGEX_ERROR_UNRECOGNIZED_CHARACTER: Unrecognized character after "(?", +- * "(?<" or "(?P". Since 2.16 +- * @G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS: POSIX named classes are +- * supported only within a class. Since 2.16 +- * @G_REGEX_ERROR_UNMATCHED_PARENTHESIS: Missing terminating ")" or ")" +- * without opening "(". Since 2.16 +- * @G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE: Reference to non-existent +- * subpattern. Since 2.16 +- * @G_REGEX_ERROR_UNTERMINATED_COMMENT: Missing terminating ")" after comment. +- * Since 2.16 +- * @G_REGEX_ERROR_EXPRESSION_TOO_LARGE: Regular expression too large. +- * Since 2.16 +- * @G_REGEX_ERROR_MEMORY_ERROR: Failed to get memory. Since 2.16 +- * @G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND: Lookbehind assertion is not +- * fixed length. Since 2.16 +- * @G_REGEX_ERROR_MALFORMED_CONDITION: Malformed number or name after "(?(". +- * Since 2.16 +- * @G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES: Conditional group contains +- * more than two branches. Since 2.16 +- * @G_REGEX_ERROR_ASSERTION_EXPECTED: Assertion expected after "(?(". +- * Since 2.16 +- * @G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME: Unknown POSIX class name. +- * Since 2.16 +- * @G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED: POSIX collating +- * elements are not supported. Since 2.16 +- * @G_REGEX_ERROR_HEX_CODE_TOO_LARGE: Character value in "\\x{...}" sequence +- * is too large. Since 2.16 +- * @G_REGEX_ERROR_INVALID_CONDITION: Invalid condition "(?(0)". Since 2.16 +- * @G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND: \\C not allowed in +- * lookbehind assertion. Since 2.16 +- * @G_REGEX_ERROR_INFINITE_LOOP: Recursive call could loop indefinitely. +- * Since 2.16 +- * @G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR: Missing terminator +- * in subpattern name. Since 2.16 +- * @G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME: Two named subpatterns have +- * the same name. Since 2.16 +- * @G_REGEX_ERROR_MALFORMED_PROPERTY: Malformed "\\P" or "\\p" sequence. +- * Since 2.16 +- * @G_REGEX_ERROR_UNKNOWN_PROPERTY: Unknown property name after "\\P" or +- * "\\p". Since 2.16 +- * @G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG: Subpattern name is too long +- * (maximum 32 characters). Since 2.16 +- * @G_REGEX_ERROR_TOO_MANY_SUBPATTERNS: Too many named subpatterns (maximum +- * 10,000). Since 2.16 +- * @G_REGEX_ERROR_INVALID_OCTAL_VALUE: Octal value is greater than "\\377". +- * Since 2.16 +- * @G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE: "DEFINE" group contains more +- * than one branch. Since 2.16 +- * @G_REGEX_ERROR_DEFINE_REPETION: Repeating a "DEFINE" group is not allowed. +- * This error is never raised. Since: 2.16 Deprecated: 2.34 +- * @G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS: Inconsistent newline options. +- * Since 2.16 +- * @G_REGEX_ERROR_MISSING_BACK_REFERENCE: "\\g" is not followed by a braced, +- * angle-bracketed, or quoted name or number, or by a plain number. Since: 2.16 +- * @G_REGEX_ERROR_INVALID_RELATIVE_REFERENCE: relative reference must not be zero. Since: 2.34 +- * @G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN: the backtracing +- * control verb used does not allow an argument. Since: 2.34 +- * @G_REGEX_ERROR_UNKNOWN_BACKTRACKING_CONTROL_VERB: unknown backtracing +- * control verb. Since: 2.34 +- * @G_REGEX_ERROR_NUMBER_TOO_BIG: number is too big in escape sequence. Since: 2.34 +- * @G_REGEX_ERROR_MISSING_SUBPATTERN_NAME: Missing subpattern name. Since: 2.34 +- * @G_REGEX_ERROR_MISSING_DIGIT: Missing digit. Since 2.34 +- * @G_REGEX_ERROR_INVALID_DATA_CHARACTER: In JavaScript compatibility mode, +- * "[" is an invalid data character. Since: 2.34 +- * @G_REGEX_ERROR_EXTRA_SUBPATTERN_NAME: different names for subpatterns of the +- * same number are not allowed. Since: 2.34 +- * @G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED: the backtracing control +- * verb requires an argument. Since: 2.34 +- * @G_REGEX_ERROR_INVALID_CONTROL_CHAR: "\\c" must be followed by an ASCII +- * character. Since: 2.34 +- * @G_REGEX_ERROR_MISSING_NAME: "\\k" is not followed by a braced, angle-bracketed, or +- * quoted name. Since: 2.34 +- * @G_REGEX_ERROR_NOT_SUPPORTED_IN_CLASS: "\\N" is not supported in a class. Since: 2.34 +- * @G_REGEX_ERROR_TOO_MANY_FORWARD_REFERENCES: too many forward references. Since: 2.34 +- * @G_REGEX_ERROR_NAME_TOO_LONG: the name is too long in "(*MARK)", "(*PRUNE)", +- * "(*SKIP)", or "(*THEN)". Since: 2.34 +- * @G_REGEX_ERROR_CHARACTER_VALUE_TOO_LARGE: the character value in the \\u sequence is +- * too large. Since: 2.34 +- * +- * Error codes returned by regular expressions functions. +- * +- * Since: 2.14 +- */ +-typedef enum +-{ +- G_REGEX_ERROR_COMPILE, +- G_REGEX_ERROR_OPTIMIZE, +- G_REGEX_ERROR_REPLACE, +- G_REGEX_ERROR_MATCH, +- G_REGEX_ERROR_INTERNAL, +- +- /* These are the error codes from PCRE + 100 */ +- G_REGEX_ERROR_STRAY_BACKSLASH = 101, +- G_REGEX_ERROR_MISSING_CONTROL_CHAR = 102, +- G_REGEX_ERROR_UNRECOGNIZED_ESCAPE = 103, +- G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER = 104, +- G_REGEX_ERROR_QUANTIFIER_TOO_BIG = 105, +- G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS = 106, +- G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS = 107, +- G_REGEX_ERROR_RANGE_OUT_OF_ORDER = 108, +- G_REGEX_ERROR_NOTHING_TO_REPEAT = 109, +- G_REGEX_ERROR_UNRECOGNIZED_CHARACTER = 112, +- G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS = 113, +- G_REGEX_ERROR_UNMATCHED_PARENTHESIS = 114, +- G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE = 115, +- G_REGEX_ERROR_UNTERMINATED_COMMENT = 118, +- G_REGEX_ERROR_EXPRESSION_TOO_LARGE = 120, +- G_REGEX_ERROR_MEMORY_ERROR = 121, +- G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND = 125, +- G_REGEX_ERROR_MALFORMED_CONDITION = 126, +- G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES = 127, +- G_REGEX_ERROR_ASSERTION_EXPECTED = 128, +- G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME = 130, +- G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED = 131, +- G_REGEX_ERROR_HEX_CODE_TOO_LARGE = 134, +- G_REGEX_ERROR_INVALID_CONDITION = 135, +- G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND = 136, +- G_REGEX_ERROR_INFINITE_LOOP = 140, +- G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR = 142, +- G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME = 143, +- G_REGEX_ERROR_MALFORMED_PROPERTY = 146, +- G_REGEX_ERROR_UNKNOWN_PROPERTY = 147, +- G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG = 148, +- G_REGEX_ERROR_TOO_MANY_SUBPATTERNS = 149, +- G_REGEX_ERROR_INVALID_OCTAL_VALUE = 151, +- G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE = 154, +- G_REGEX_ERROR_DEFINE_REPETION = 155, +- G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS = 156, +- G_REGEX_ERROR_MISSING_BACK_REFERENCE = 157, +- G_REGEX_ERROR_INVALID_RELATIVE_REFERENCE = 158, +- G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN = 159, +- G_REGEX_ERROR_UNKNOWN_BACKTRACKING_CONTROL_VERB = 160, +- G_REGEX_ERROR_NUMBER_TOO_BIG = 161, +- G_REGEX_ERROR_MISSING_SUBPATTERN_NAME = 162, +- G_REGEX_ERROR_MISSING_DIGIT = 163, +- G_REGEX_ERROR_INVALID_DATA_CHARACTER = 164, +- G_REGEX_ERROR_EXTRA_SUBPATTERN_NAME = 165, +- G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED = 166, +- G_REGEX_ERROR_INVALID_CONTROL_CHAR = 168, +- G_REGEX_ERROR_MISSING_NAME = 169, +- G_REGEX_ERROR_NOT_SUPPORTED_IN_CLASS = 171, +- G_REGEX_ERROR_TOO_MANY_FORWARD_REFERENCES = 172, +- G_REGEX_ERROR_NAME_TOO_LONG = 175, +- G_REGEX_ERROR_CHARACTER_VALUE_TOO_LARGE = 176 +-} GRegexError; +- +-/** +- * G_REGEX_ERROR: +- * +- * Error domain for regular expressions. Errors in this domain will be +- * from the #GRegexError enumeration. See #GError for information on +- * error domains. +- * +- * Since: 2.14 +- */ +-#define G_REGEX_ERROR g_regex_error_quark () +- +-GLIB_AVAILABLE_IN_ALL +-GQuark g_regex_error_quark (void); +- +-/** +- * GRegexCompileFlags: +- * @G_REGEX_CASELESS: Letters in the pattern match both upper- and +- * lowercase letters. This option can be changed within a pattern +- * by a "(?i)" option setting. +- * @G_REGEX_MULTILINE: By default, GRegex treats the strings as consisting +- * of a single line of characters (even if it actually contains +- * newlines). The "start of line" metacharacter ("^") matches only +- * at the start of the string, while the "end of line" metacharacter +- * ("$") matches only at the end of the string, or before a terminating +- * newline (unless #G_REGEX_DOLLAR_ENDONLY is set). When +- * #G_REGEX_MULTILINE is set, the "start of line" and "end of line" +- * constructs match immediately following or immediately before any +- * newline in the string, respectively, as well as at the very start +- * and end. This can be changed within a pattern by a "(?m)" option +- * setting. +- * @G_REGEX_DOTALL: A dot metacharacter (".") in the pattern matches all +- * characters, including newlines. Without it, newlines are excluded. +- * This option can be changed within a pattern by a ("?s") option setting. +- * @G_REGEX_EXTENDED: Whitespace data characters in the pattern are +- * totally ignored except when escaped or inside a character class. +- * Whitespace does not include the VT character (code 11). In addition, +- * characters between an unescaped "#" outside a character class and +- * the next newline character, inclusive, are also ignored. This can +- * be changed within a pattern by a "(?x)" option setting. +- * @G_REGEX_ANCHORED: The pattern is forced to be "anchored", that is, +- * it is constrained to match only at the first matching point in the +- * string that is being searched. This effect can also be achieved by +- * appropriate constructs in the pattern itself such as the "^" +- * metacharacter. +- * @G_REGEX_DOLLAR_ENDONLY: A dollar metacharacter ("$") in the pattern +- * matches only at the end of the string. Without this option, a +- * dollar also matches immediately before the final character if +- * it is a newline (but not before any other newlines). This option +- * is ignored if #G_REGEX_MULTILINE is set. +- * @G_REGEX_UNGREEDY: Inverts the "greediness" of the quantifiers so that +- * they are not greedy by default, but become greedy if followed by "?". +- * It can also be set by a "(?U)" option setting within the pattern. +- * @G_REGEX_RAW: Usually strings must be valid UTF-8 strings, using this +- * flag they are considered as a raw sequence of bytes. +- * @G_REGEX_NO_AUTO_CAPTURE: Disables the use of numbered capturing +- * parentheses in the pattern. Any opening parenthesis that is not +- * followed by "?" behaves as if it were followed by "?:" but named +- * parentheses can still be used for capturing (and they acquire numbers +- * in the usual way). +- * @G_REGEX_OPTIMIZE: Optimize the regular expression. If the pattern will +- * be used many times, then it may be worth the effort to optimize it +- * to improve the speed of matches. +- * @G_REGEX_FIRSTLINE: Limits an unanchored pattern to match before (or at) the +- * first newline. Since: 2.34 +- * @G_REGEX_DUPNAMES: Names used to identify capturing subpatterns need not +- * be unique. This can be helpful for certain types of pattern when it +- * is known that only one instance of the named subpattern can ever be +- * matched. +- * @G_REGEX_NEWLINE_CR: Usually any newline character or character sequence is +- * recognized. If this option is set, the only recognized newline character +- * is '\r'. +- * @G_REGEX_NEWLINE_LF: Usually any newline character or character sequence is +- * recognized. If this option is set, the only recognized newline character +- * is '\n'. +- * @G_REGEX_NEWLINE_CRLF: Usually any newline character or character sequence is +- * recognized. If this option is set, the only recognized newline character +- * sequence is '\r\n'. +- * @G_REGEX_NEWLINE_ANYCRLF: Usually any newline character or character sequence +- * is recognized. If this option is set, the only recognized newline character +- * sequences are '\r', '\n', and '\r\n'. Since: 2.34 +- * @G_REGEX_BSR_ANYCRLF: Usually any newline character or character sequence +- * is recognised. If this option is set, then "\R" only recognizes the newline +- * characters '\r', '\n' and '\r\n'. Since: 2.34 +- * @G_REGEX_JAVASCRIPT_COMPAT: Changes behaviour so that it is compatible with +- * JavaScript rather than PCRE. Since: 2.34 +- * +- * Flags specifying compile-time options. +- * +- * Since: 2.14 +- */ +-/* Remember to update G_REGEX_COMPILE_MASK in gregex.c after +- * adding a new flag. +- */ +-typedef enum +-{ +- G_REGEX_CASELESS = 1 << 0, +- G_REGEX_MULTILINE = 1 << 1, +- G_REGEX_DOTALL = 1 << 2, +- G_REGEX_EXTENDED = 1 << 3, +- G_REGEX_ANCHORED = 1 << 4, +- G_REGEX_DOLLAR_ENDONLY = 1 << 5, +- G_REGEX_UNGREEDY = 1 << 9, +- G_REGEX_RAW = 1 << 11, +- G_REGEX_NO_AUTO_CAPTURE = 1 << 12, +- G_REGEX_OPTIMIZE = 1 << 13, +- G_REGEX_FIRSTLINE = 1 << 18, +- G_REGEX_DUPNAMES = 1 << 19, +- G_REGEX_NEWLINE_CR = 1 << 20, +- G_REGEX_NEWLINE_LF = 1 << 21, +- G_REGEX_NEWLINE_CRLF = G_REGEX_NEWLINE_CR | G_REGEX_NEWLINE_LF, +- G_REGEX_NEWLINE_ANYCRLF = G_REGEX_NEWLINE_CR | 1 << 22, +- G_REGEX_BSR_ANYCRLF = 1 << 23, +- G_REGEX_JAVASCRIPT_COMPAT = 1 << 25 +-} GRegexCompileFlags; +- +-/** +- * GRegexMatchFlags: +- * @G_REGEX_MATCH_ANCHORED: The pattern is forced to be "anchored", that is, +- * it is constrained to match only at the first matching point in the +- * string that is being searched. This effect can also be achieved by +- * appropriate constructs in the pattern itself such as the "^" +- * metacharacter. +- * @G_REGEX_MATCH_NOTBOL: Specifies that first character of the string is +- * not the beginning of a line, so the circumflex metacharacter should +- * not match before it. Setting this without #G_REGEX_MULTILINE (at +- * compile time) causes circumflex never to match. This option affects +- * only the behaviour of the circumflex metacharacter, it does not +- * affect "\A". +- * @G_REGEX_MATCH_NOTEOL: Specifies that the end of the subject string is +- * not the end of a line, so the dollar metacharacter should not match +- * it nor (except in multiline mode) a newline immediately before it. +- * Setting this without #G_REGEX_MULTILINE (at compile time) causes +- * dollar never to match. This option affects only the behaviour of +- * the dollar metacharacter, it does not affect "\Z" or "\z". +- * @G_REGEX_MATCH_NOTEMPTY: An empty string is not considered to be a valid +- * match if this option is set. If there are alternatives in the pattern, +- * they are tried. If all the alternatives match the empty string, the +- * entire match fails. For example, if the pattern "a?b?" is applied to +- * a string not beginning with "a" or "b", it matches the empty string +- * at the start of the string. With this flag set, this match is not +- * valid, so GRegex searches further into the string for occurrences +- * of "a" or "b". +- * @G_REGEX_MATCH_PARTIAL: Turns on the partial matching feature, for more +- * documentation on partial matching see g_match_info_is_partial_match(). +- * @G_REGEX_MATCH_NEWLINE_CR: Overrides the newline definition set when +- * creating a new #GRegex, setting the '\r' character as line terminator. +- * @G_REGEX_MATCH_NEWLINE_LF: Overrides the newline definition set when +- * creating a new #GRegex, setting the '\n' character as line terminator. +- * @G_REGEX_MATCH_NEWLINE_CRLF: Overrides the newline definition set when +- * creating a new #GRegex, setting the '\r\n' characters sequence as line terminator. +- * @G_REGEX_MATCH_NEWLINE_ANY: Overrides the newline definition set when +- * creating a new #GRegex, any Unicode newline sequence +- * is recognised as a newline. These are '\r', '\n' and '\rn', and the +- * single characters U+000B LINE TABULATION, U+000C FORM FEED (FF), +- * U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and +- * U+2029 PARAGRAPH SEPARATOR. +- * @G_REGEX_MATCH_NEWLINE_ANYCRLF: Overrides the newline definition set when +- * creating a new #GRegex; any '\r', '\n', or '\r\n' character sequence +- * is recognized as a newline. Since: 2.34 +- * @G_REGEX_MATCH_BSR_ANYCRLF: Overrides the newline definition for "\R" set when +- * creating a new #GRegex; only '\r', '\n', or '\r\n' character sequences +- * are recognized as a newline by "\R". Since: 2.34 +- * @G_REGEX_MATCH_BSR_ANY: Overrides the newline definition for "\R" set when +- * creating a new #GRegex; any Unicode newline character or character sequence +- * are recognized as a newline by "\R". These are '\r', '\n' and '\rn', and the +- * single characters U+000B LINE TABULATION, U+000C FORM FEED (FF), +- * U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and +- * U+2029 PARAGRAPH SEPARATOR. Since: 2.34 +- * @G_REGEX_MATCH_PARTIAL_SOFT: An alias for #G_REGEX_MATCH_PARTIAL. Since: 2.34 +- * @G_REGEX_MATCH_PARTIAL_HARD: Turns on the partial matching feature. In contrast to +- * to #G_REGEX_MATCH_PARTIAL_SOFT, this stops matching as soon as a partial match +- * is found, without continuing to search for a possible complete match. See +- * g_match_info_is_partial_match() for more information. Since: 2.34 +- * @G_REGEX_MATCH_NOTEMPTY_ATSTART: Like #G_REGEX_MATCH_NOTEMPTY, but only applied to +- * the start of the matched string. For anchored +- * patterns this can only happen for pattern containing "\K". Since: 2.34 +- * +- * Flags specifying match-time options. +- * +- * Since: 2.14 +- */ +-/* Remember to update G_REGEX_MATCH_MASK in gregex.c after +- * adding a new flag. */ +-typedef enum +-{ +- G_REGEX_MATCH_ANCHORED = 1 << 4, +- G_REGEX_MATCH_NOTBOL = 1 << 7, +- G_REGEX_MATCH_NOTEOL = 1 << 8, +- G_REGEX_MATCH_NOTEMPTY = 1 << 10, +- G_REGEX_MATCH_PARTIAL = 1 << 15, +- G_REGEX_MATCH_NEWLINE_CR = 1 << 20, +- G_REGEX_MATCH_NEWLINE_LF = 1 << 21, +- G_REGEX_MATCH_NEWLINE_CRLF = G_REGEX_MATCH_NEWLINE_CR | G_REGEX_MATCH_NEWLINE_LF, +- G_REGEX_MATCH_NEWLINE_ANY = 1 << 22, +- G_REGEX_MATCH_NEWLINE_ANYCRLF = G_REGEX_MATCH_NEWLINE_CR | G_REGEX_MATCH_NEWLINE_ANY, +- G_REGEX_MATCH_BSR_ANYCRLF = 1 << 23, +- G_REGEX_MATCH_BSR_ANY = 1 << 24, +- G_REGEX_MATCH_PARTIAL_SOFT = G_REGEX_MATCH_PARTIAL, +- G_REGEX_MATCH_PARTIAL_HARD = 1 << 27, +- G_REGEX_MATCH_NOTEMPTY_ATSTART = 1 << 28 +-} GRegexMatchFlags; +- +-/** +- * GRegex: +- * +- * A GRegex is the "compiled" form of a regular expression pattern. +- * This structure is opaque and its fields cannot be accessed directly. +- * +- * Since: 2.14 +- */ +-typedef struct _GRegex GRegex; +- +- +-/** +- * GMatchInfo: +- * +- * A GMatchInfo is an opaque struct used to return information about +- * matches. +- */ +-typedef struct _GMatchInfo GMatchInfo; +- +-/** +- * GRegexEvalCallback: +- * @match_info: the #GMatchInfo generated by the match. +- * Use g_match_info_get_regex() and g_match_info_get_string() if you +- * need the #GRegex or the matched string. +- * @result: a #GString containing the new string +- * @user_data: user data passed to g_regex_replace_eval() +- * +- * Specifies the type of the function passed to g_regex_replace_eval(). +- * It is called for each occurrence of the pattern in the string passed +- * to g_regex_replace_eval(), and it should append the replacement to +- * @result. +- * +- * Returns: %FALSE to continue the replacement process, %TRUE to stop it +- * +- * Since: 2.14 +- */ +-typedef gboolean (*GRegexEvalCallback) (const GMatchInfo *match_info, +- GString *result, +- gpointer user_data); +- +- +-GLIB_AVAILABLE_IN_ALL +-GRegex *g_regex_new (const gchar *pattern, +- GRegexCompileFlags compile_options, +- GRegexMatchFlags match_options, +- GError **error); +-GLIB_AVAILABLE_IN_ALL +-GRegex *g_regex_ref (GRegex *regex); +-GLIB_AVAILABLE_IN_ALL +-void g_regex_unref (GRegex *regex); +-GLIB_AVAILABLE_IN_ALL +-const gchar *g_regex_get_pattern (const GRegex *regex); +-GLIB_AVAILABLE_IN_ALL +-gint g_regex_get_max_backref (const GRegex *regex); +-GLIB_AVAILABLE_IN_ALL +-gint g_regex_get_capture_count (const GRegex *regex); +-GLIB_AVAILABLE_IN_ALL +-gboolean g_regex_get_has_cr_or_lf (const GRegex *regex); +-GLIB_AVAILABLE_IN_2_38 +-gint g_regex_get_max_lookbehind (const GRegex *regex); +-GLIB_AVAILABLE_IN_ALL +-gint g_regex_get_string_number (const GRegex *regex, +- const gchar *name); +-GLIB_AVAILABLE_IN_ALL +-gchar *g_regex_escape_string (const gchar *string, +- gint length); +-GLIB_AVAILABLE_IN_ALL +-gchar *g_regex_escape_nul (const gchar *string, +- gint length); +- +-GLIB_AVAILABLE_IN_ALL +-GRegexCompileFlags g_regex_get_compile_flags (const GRegex *regex); +-GLIB_AVAILABLE_IN_ALL +-GRegexMatchFlags g_regex_get_match_flags (const GRegex *regex); +- +-/* Matching. */ +-GLIB_AVAILABLE_IN_ALL +-gboolean g_regex_match_simple (const gchar *pattern, +- const gchar *string, +- GRegexCompileFlags compile_options, +- GRegexMatchFlags match_options); +-GLIB_AVAILABLE_IN_ALL +-gboolean g_regex_match (const GRegex *regex, +- const gchar *string, +- GRegexMatchFlags match_options, +- GMatchInfo **match_info); +-GLIB_AVAILABLE_IN_ALL +-gboolean g_regex_match_full (const GRegex *regex, +- const gchar *string, +- gssize string_len, +- gint start_position, +- GRegexMatchFlags match_options, +- GMatchInfo **match_info, +- GError **error); +-GLIB_AVAILABLE_IN_ALL +-gboolean g_regex_match_all (const GRegex *regex, +- const gchar *string, +- GRegexMatchFlags match_options, +- GMatchInfo **match_info); +-GLIB_AVAILABLE_IN_ALL +-gboolean g_regex_match_all_full (const GRegex *regex, +- const gchar *string, +- gssize string_len, +- gint start_position, +- GRegexMatchFlags match_options, +- GMatchInfo **match_info, +- GError **error); +- +-/* String splitting. */ +-GLIB_AVAILABLE_IN_ALL +-gchar **g_regex_split_simple (const gchar *pattern, +- const gchar *string, +- GRegexCompileFlags compile_options, +- GRegexMatchFlags match_options); +-GLIB_AVAILABLE_IN_ALL +-gchar **g_regex_split (const GRegex *regex, +- const gchar *string, +- GRegexMatchFlags match_options); +-GLIB_AVAILABLE_IN_ALL +-gchar **g_regex_split_full (const GRegex *regex, +- const gchar *string, +- gssize string_len, +- gint start_position, +- GRegexMatchFlags match_options, +- gint max_tokens, +- GError **error); +- +-/* String replacement. */ +-GLIB_AVAILABLE_IN_ALL +-gchar *g_regex_replace (const GRegex *regex, +- const gchar *string, +- gssize string_len, +- gint start_position, +- const gchar *replacement, +- GRegexMatchFlags match_options, +- GError **error); +-GLIB_AVAILABLE_IN_ALL +-gchar *g_regex_replace_literal (const GRegex *regex, +- const gchar *string, +- gssize string_len, +- gint start_position, +- const gchar *replacement, +- GRegexMatchFlags match_options, +- GError **error); +-GLIB_AVAILABLE_IN_ALL +-gchar *g_regex_replace_eval (const GRegex *regex, +- const gchar *string, +- gssize string_len, +- gint start_position, +- GRegexMatchFlags match_options, +- GRegexEvalCallback eval, +- gpointer user_data, +- GError **error); +-GLIB_AVAILABLE_IN_ALL +-gboolean g_regex_check_replacement (const gchar *replacement, +- gboolean *has_references, +- GError **error); +- +-/* Match info */ +-GLIB_AVAILABLE_IN_ALL +-GRegex *g_match_info_get_regex (const GMatchInfo *match_info); +-GLIB_AVAILABLE_IN_ALL +-const gchar *g_match_info_get_string (const GMatchInfo *match_info); +- +-GLIB_AVAILABLE_IN_ALL +-GMatchInfo *g_match_info_ref (GMatchInfo *match_info); +-GLIB_AVAILABLE_IN_ALL +-void g_match_info_unref (GMatchInfo *match_info); +-GLIB_AVAILABLE_IN_ALL +-void g_match_info_free (GMatchInfo *match_info); +-GLIB_AVAILABLE_IN_ALL +-gboolean g_match_info_next (GMatchInfo *match_info, +- GError **error); +-GLIB_AVAILABLE_IN_ALL +-gboolean g_match_info_matches (const GMatchInfo *match_info); +-GLIB_AVAILABLE_IN_ALL +-gint g_match_info_get_match_count (const GMatchInfo *match_info); +-GLIB_AVAILABLE_IN_ALL +-gboolean g_match_info_is_partial_match (const GMatchInfo *match_info); +-GLIB_AVAILABLE_IN_ALL +-gchar *g_match_info_expand_references(const GMatchInfo *match_info, +- const gchar *string_to_expand, +- GError **error); +-GLIB_AVAILABLE_IN_ALL +-gchar *g_match_info_fetch (const GMatchInfo *match_info, +- gint match_num); +-GLIB_AVAILABLE_IN_ALL +-gboolean g_match_info_fetch_pos (const GMatchInfo *match_info, +- gint match_num, +- gint *start_pos, +- gint *end_pos); +-GLIB_AVAILABLE_IN_ALL +-gchar *g_match_info_fetch_named (const GMatchInfo *match_info, +- const gchar *name); +-GLIB_AVAILABLE_IN_ALL +-gboolean g_match_info_fetch_named_pos (const GMatchInfo *match_info, +- const gchar *name, +- gint *start_pos, +- gint *end_pos); +-GLIB_AVAILABLE_IN_ALL +-gchar **g_match_info_fetch_all (const GMatchInfo *match_info); +- +-G_END_DECLS +- +-#endif /* __G_REGEX_H__ */ +Index: glib-2.56.4/glib/glib-autocleanups.h +=================================================================== +--- glib-2.56.4.orig/glib/glib-autocleanups.h ++++ glib-2.56.4/glib/glib-autocleanups.h +@@ -65,8 +65,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GRand, g_rand_free) + G_DEFINE_AUTOPTR_CLEANUP_FUNC(GQueue, g_queue_free) + G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GQueue, g_queue_clear) + G_DEFINE_AUTOPTR_CLEANUP_FUNC(GRand, g_rand_free) +-G_DEFINE_AUTOPTR_CLEANUP_FUNC(GRegex, g_regex_unref) +-G_DEFINE_AUTOPTR_CLEANUP_FUNC(GMatchInfo, g_match_info_unref) + G_DEFINE_AUTOPTR_CLEANUP_FUNC(GScanner, g_scanner_destroy) + G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSequence, g_sequence_free) + G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSList, g_slist_free) +Index: glib-2.56.4/gobject/glib-types.h +=================================================================== +--- glib-2.56.4.orig/gobject/glib-types.h ++++ glib-2.56.4/gobject/glib-types.h +@@ -86,15 +86,6 @@ typedef gsize GType; + #define G_TYPE_HASH_TABLE (g_hash_table_get_type ()) + + /** +- * G_TYPE_REGEX: +- * +- * The #GType for a boxed type holding a #GRegex reference. +- * +- * Since: 2.14 +- */ +-#define G_TYPE_REGEX (g_regex_get_type ()) +- +-/** + * G_TYPE_MATCH_INFO: + * + * The #GType for a boxed type holding a #GMatchInfo reference. +Index: glib-2.56.4/gobject/gboxed.c +=================================================================== +--- glib-2.56.4.orig/gobject/gboxed.c ++++ glib-2.56.4/gobject/gboxed.c +@@ -133,9 +133,6 @@ G_DEFINE_BOXED_TYPE (GBytes, g_bytes, g_bytes_ref, g_b + G_DEFINE_BOXED_TYPE (GByteArray, g_byte_array, g_byte_array_ref, g_byte_array_unref) + G_DEFINE_BOXED_TYPE (GBytes, g_bytes, g_bytes_ref, g_bytes_unref) + +-G_DEFINE_BOXED_TYPE (GRegex, g_regex, g_regex_ref, g_regex_unref) +-G_DEFINE_BOXED_TYPE (GMatchInfo, g_match_info, g_match_info_ref, g_match_info_unref) +- + #define g_variant_type_get_type g_variant_type_get_gtype + G_DEFINE_BOXED_TYPE (GVariantType, g_variant_type, g_variant_type_copy, g_variant_type_free) + #undef g_variant_type_get_type diff --git a/recipes/recipes_emscripten/glib/patches/emscripten-function-ptr.diff b/recipes/recipes_emscripten/glib/patches/emscripten-function-ptr.diff new file mode 100644 index 000000000..7bec7e917 --- /dev/null +++ b/recipes/recipes_emscripten/glib/patches/emscripten-function-ptr.diff @@ -0,0 +1,2383 @@ +This patch file is a modified version of kleisauke's patches for glib, +backported to version 2.56.4. Originally available at, +https://github.com/GNOME/glib/compare/2.76.2...kleisauke:wasm-vips-2.76.2.patch + +Index: glib-2.56.4/gio/gapplication.c +=================================================================== +--- glib-2.56.4.orig/gio/gapplication.c ++++ glib-2.56.4/gio/gapplication.c +@@ -282,8 +282,10 @@ static guint g_application_signals[NR_SIGNALS]; + + static guint g_application_signals[NR_SIGNALS]; + +-static void g_application_action_group_iface_init (GActionGroupInterface *); +-static void g_application_action_map_iface_init (GActionMapInterface *); ++static void g_application_action_group_iface_init (GActionGroupInterface *iface, ++ gpointer iface_data); ++static void g_application_action_map_iface_init (GActionMapInterface *iface, ++ gpointer iface_data); + G_DEFINE_TYPE_WITH_CODE (GApplication, g_application, G_TYPE_OBJECT, + G_ADD_PRIVATE (GApplication) + G_IMPLEMENT_INTERFACE (G_TYPE_ACTION_GROUP, g_application_action_group_iface_init) +@@ -309,7 +311,8 @@ static GType g_application_exported_actions_get_type + } GApplicationExportedActions; + + static GType g_application_exported_actions_get_type (void); +-static void g_application_exported_actions_iface_init (GRemoteActionGroupInterface *iface); ++static void g_application_exported_actions_iface_init (GRemoteActionGroupInterface *iface, ++ gpointer iface_data); + G_DEFINE_TYPE_WITH_CODE (GApplicationExportedActions, g_application_exported_actions, G_TYPE_SIMPLE_ACTION_GROUP, + G_IMPLEMENT_INTERFACE (G_TYPE_REMOTE_ACTION_GROUP, g_application_exported_actions_iface_init)) + +@@ -353,7 +356,8 @@ static void + } + + static void +-g_application_exported_actions_iface_init (GRemoteActionGroupInterface *iface) ++g_application_exported_actions_iface_init (GRemoteActionGroupInterface *iface, ++ gpointer iface_data) + { + iface->activate_action_full = g_application_exported_actions_activate_action_full; + iface->change_action_state_full = g_application_exported_actions_change_action_state_full; +@@ -2623,7 +2627,8 @@ static void + } + + static void +-g_application_action_group_iface_init (GActionGroupInterface *iface) ++g_application_action_group_iface_init (GActionGroupInterface *iface, ++ gpointer iface_data) + { + iface->list_actions = g_application_list_actions; + iface->query_action = g_application_query_action; +@@ -2632,7 +2637,8 @@ static void + } + + static void +-g_application_action_map_iface_init (GActionMapInterface *iface) ++g_application_action_map_iface_init (GActionMapInterface *iface, ++ gpointer iface_data) + { + iface->lookup_action = g_application_lookup_action; + iface->add_action = g_application_add_action; +Index: glib-2.56.4/gio/gbufferedinputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gbufferedinputstream.c ++++ glib-2.56.4/gio/gbufferedinputstream.c +@@ -113,7 +113,8 @@ static gssize g_buffered_input_stream_real_fill_finish + GAsyncResult *result, + GError **error); + +-static void g_buffered_input_stream_seekable_iface_init (GSeekableIface *iface); ++static void g_buffered_input_stream_seekable_iface_init (GSeekableIface *iface, ++ gpointer iface_data); + static goffset g_buffered_input_stream_tell (GSeekable *seekable); + static gboolean g_buffered_input_stream_can_seek (GSeekable *seekable); + static gboolean g_buffered_input_stream_seek (GSeekable *seekable, +@@ -300,7 +301,8 @@ static void + } + + static void +-g_buffered_input_stream_seekable_iface_init (GSeekableIface *iface) ++g_buffered_input_stream_seekable_iface_init (GSeekableIface *iface, ++ gpointer iface_data) + { + iface->tell = g_buffered_input_stream_tell; + iface->can_seek = g_buffered_input_stream_can_seek; +Index: glib-2.56.4/gio/gbufferedoutputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gbufferedoutputstream.c ++++ glib-2.56.4/gio/gbufferedoutputstream.c +@@ -105,7 +105,8 @@ static gboolean g_buffered_output_stream_close_finish + GAsyncResult *result, + GError **error); + +-static void g_buffered_output_stream_seekable_iface_init (GSeekableIface *iface); ++static void g_buffered_output_stream_seekable_iface_init (GSeekableIface *iface, ++ gpointer iface_data); + static goffset g_buffered_output_stream_tell (GSeekable *seekable); + static gboolean g_buffered_output_stream_can_seek (GSeekable *seekable); + static gboolean g_buffered_output_stream_seek (GSeekable *seekable, +@@ -346,7 +347,8 @@ static void + } + + static void +-g_buffered_output_stream_seekable_iface_init (GSeekableIface *iface) ++g_buffered_output_stream_seekable_iface_init (GSeekableIface *iface, ++ gpointer iface_data) + { + iface->tell = g_buffered_output_stream_tell; + iface->can_seek = g_buffered_output_stream_can_seek; +Index: glib-2.56.4/gio/gbytesicon.c +=================================================================== +--- glib-2.56.4.orig/gio/gbytesicon.c ++++ glib-2.56.4/gio/gbytesicon.c +@@ -57,8 +57,10 @@ enum + PROP_BYTES + }; + +-static void g_bytes_icon_icon_iface_init (GIconIface *iface); +-static void g_bytes_icon_loadable_icon_iface_init (GLoadableIconIface *iface); ++static void g_bytes_icon_icon_iface_init (GIconIface *iface, ++ gpointer iface_data); ++static void g_bytes_icon_loadable_icon_iface_init (GLoadableIconIface *iface, ++ gpointer iface_data); + G_DEFINE_TYPE_WITH_CODE (GBytesIcon, g_bytes_icon, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (G_TYPE_ICON, g_bytes_icon_icon_iface_init) + G_IMPLEMENT_INTERFACE (G_TYPE_LOADABLE_ICON, g_bytes_icon_loadable_icon_iface_init)) +@@ -205,7 +207,8 @@ static void + } + + static void +-g_bytes_icon_icon_iface_init (GIconIface *iface) ++g_bytes_icon_icon_iface_init (GIconIface *iface, ++ gpointer iface_data) + { + iface->hash = g_bytes_icon_hash; + iface->equal = g_bytes_icon_equal; +@@ -258,7 +261,8 @@ static void + } + + static void +-g_bytes_icon_loadable_icon_iface_init (GLoadableIconIface *iface) ++g_bytes_icon_loadable_icon_iface_init (GLoadableIconIface *iface, ++ gpointer iface_data) + { + iface->load = g_bytes_icon_load; + iface->load_async = g_bytes_icon_load_async; +Index: glib-2.56.4/gio/gcharsetconverter.c +=================================================================== +--- glib-2.56.4.orig/gio/gcharsetconverter.c ++++ glib-2.56.4/gio/gcharsetconverter.c +@@ -45,8 +45,10 @@ enum { + * GIConv. + */ + +-static void g_charset_converter_iface_init (GConverterIface *iface); +-static void g_charset_converter_initable_iface_init (GInitableIface *iface); ++static void g_charset_converter_iface_init (GConverterIface *iface, ++ gpointer iface_data); ++static void g_charset_converter_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data); + + /** + * GCharsetConverter: +@@ -421,7 +423,8 @@ static void + } + + static void +-g_charset_converter_iface_init (GConverterIface *iface) ++g_charset_converter_iface_init (GConverterIface *iface, ++ gpointer iface_data) + { + iface->convert = g_charset_converter_convert; + iface->reset = g_charset_converter_reset; +@@ -466,7 +469,8 @@ static void + } + + static void +-g_charset_converter_initable_iface_init (GInitableIface *iface) ++g_charset_converter_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data) + { + iface->init = g_charset_converter_initable_init; + } +Index: glib-2.56.4/gio/gconverterinputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gconverterinputstream.c ++++ glib-2.56.4/gio/gconverterinputstream.c +@@ -91,8 +91,8 @@ static GSource *g_converter_input_stream_create_source + static GSource *g_converter_input_stream_create_source (GPollableInputStream *stream, + GCancellable *cancellable); + +-static void g_converter_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface); +- ++static void g_converter_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface, ++ gpointer iface_data); + G_DEFINE_TYPE_WITH_CODE (GConverterInputStream, + g_converter_input_stream, + G_TYPE_FILTER_INPUT_STREAM, +@@ -127,7 +127,8 @@ static void + } + + static void +-g_converter_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface) ++g_converter_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface, ++ gpointer iface_data) + { + iface->can_poll = g_converter_input_stream_can_poll; + iface->is_readable = g_converter_input_stream_is_readable; +Index: glib-2.56.4/gio/gconverteroutputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gconverteroutputstream.c ++++ glib-2.56.4/gio/gconverteroutputstream.c +@@ -106,7 +106,8 @@ static GSource *g_converter_output_stream_create_sourc + static GSource *g_converter_output_stream_create_source (GPollableOutputStream *stream, + GCancellable *cancellable); + +-static void g_converter_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface); ++static void g_converter_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface, ++ gpointer iface_data); + + G_DEFINE_TYPE_WITH_CODE (GConverterOutputStream, + g_converter_output_stream, +@@ -143,7 +144,8 @@ static void + } + + static void +-g_converter_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface) ++g_converter_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface, ++ gpointer iface_data) + { + iface->can_poll = g_converter_output_stream_can_poll; + iface->is_writable = g_converter_output_stream_is_writable; +Index: glib-2.56.4/gio/gdataoutputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gdataoutputstream.c ++++ glib-2.56.4/gio/gdataoutputstream.c +@@ -58,7 +58,8 @@ static void g_data_output_stream_get_property (GObject + GValue *value, + GParamSpec *pspec); + +-static void g_data_output_stream_seekable_iface_init (GSeekableIface *iface); ++static void g_data_output_stream_seekable_iface_init (GSeekableIface *iface, ++ gpointer iface_data); + static goffset g_data_output_stream_tell (GSeekable *seekable); + static gboolean g_data_output_stream_can_seek (GSeekable *seekable); + static gboolean g_data_output_stream_seek (GSeekable *seekable, +@@ -160,7 +161,8 @@ static void + } + + static void +-g_data_output_stream_seekable_iface_init (GSeekableIface *iface) ++g_data_output_stream_seekable_iface_init (GSeekableIface *iface, ++ gpointer iface_data) + { + iface->tell = g_data_output_stream_tell; + iface->can_seek = g_data_output_stream_can_seek; +Index: glib-2.56.4/gio/gdbusactiongroup.c +=================================================================== +--- glib-2.56.4.orig/gio/gdbusactiongroup.c ++++ glib-2.56.4/gio/gdbusactiongroup.c +@@ -129,8 +129,10 @@ action_info_new_from_iter (GVariantIter *iter) + return info; + } + +-static void g_dbus_action_group_remote_iface_init (GRemoteActionGroupInterface *iface); +-static void g_dbus_action_group_iface_init (GActionGroupInterface *iface); ++static void g_dbus_action_group_remote_iface_init (GRemoteActionGroupInterface *iface, ++ gpointer iface_data); ++static void g_dbus_action_group_iface_init (GActionGroupInterface *iface, ++ gpointer iface_data); + G_DEFINE_TYPE_WITH_CODE (GDBusActionGroup, g_dbus_action_group, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (G_TYPE_ACTION_GROUP, g_dbus_action_group_iface_init) + G_IMPLEMENT_INTERFACE (G_TYPE_REMOTE_ACTION_GROUP, g_dbus_action_group_remote_iface_init)) +@@ -457,14 +459,16 @@ static void + } + + static void +-g_dbus_action_group_remote_iface_init (GRemoteActionGroupInterface *iface) ++g_dbus_action_group_remote_iface_init (GRemoteActionGroupInterface *iface, ++ gpointer iface_data) + { + iface->activate_action_full = g_dbus_action_group_activate_action_full; + iface->change_action_state_full = g_dbus_action_group_change_action_state_full; + } + + static void +-g_dbus_action_group_iface_init (GActionGroupInterface *iface) ++g_dbus_action_group_iface_init (GActionGroupInterface *iface, ++ gpointer iface_data) + { + iface->list_actions = g_dbus_action_group_list_actions; + iface->query_action = g_dbus_action_group_query_action; +Index: glib-2.56.4/gio/gdbusconnection.c +=================================================================== +--- glib-2.56.4.orig/gio/gdbusconnection.c ++++ glib-2.56.4/gio/gdbusconnection.c +@@ -532,8 +532,10 @@ static guint signals[LAST_SIGNAL] = { 0 }; + + static guint signals[LAST_SIGNAL] = { 0 }; + +-static void initable_iface_init (GInitableIface *initable_iface); +-static void async_initable_iface_init (GAsyncInitableIface *async_initable_iface); ++static void initable_iface_init (GInitableIface *initable_iface, ++ gpointer iface_data); ++static void async_initable_iface_init (GAsyncInitableIface *async_initable_iface, ++ gpointer iface_data); + + G_DEFINE_TYPE_WITH_CODE (GDBusConnection, g_dbus_connection, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, initable_iface_init) +@@ -2632,7 +2634,8 @@ static void + } + + static void +-initable_iface_init (GInitableIface *initable_iface) ++initable_iface_init (GInitableIface *initable_iface, ++ gpointer iface_data) + { + initable_iface->init = initable_init; + } +@@ -2640,7 +2643,8 @@ static void + /* ---------------------------------------------------------------------------------------------------- */ + + static void +-async_initable_iface_init (GAsyncInitableIface *async_initable_iface) ++async_initable_iface_init (GAsyncInitableIface *async_initable_iface, ++ gpointer iface_data) + { + /* Use default */ + } +Index: glib-2.56.4/gio/gdbusdaemon.c +=================================================================== +--- glib-2.56.4.orig/gio/gdbusdaemon.c ++++ glib-2.56.4/gio/gdbusdaemon.c +@@ -69,8 +69,10 @@ static guint g_dbus_daemon_signals[NR_SIGNALS]; + static guint g_dbus_daemon_signals[NR_SIGNALS]; + + +-static void initable_iface_init (GInitableIface *initable_iface); +-static void g_dbus_daemon_iface_init (_GFreedesktopDBusIface *iface); ++static void initable_iface_init (GInitableIface *initable_iface, ++ gpointer iface_data); ++static void g_dbus_daemon_iface_init (_GFreedesktopDBusIface *iface, ++ gpointer iface_data); + + #define g_dbus_daemon_get_type _g_dbus_daemon_get_type + G_DEFINE_TYPE_WITH_CODE (GDBusDaemon, g_dbus_daemon, _G_TYPE_FREEDESKTOP_DBUS_SKELETON, +@@ -1716,7 +1718,8 @@ static void + } + + static void +-g_dbus_daemon_iface_init (_GFreedesktopDBusIface *iface) ++g_dbus_daemon_iface_init (_GFreedesktopDBusIface *iface, ++ gpointer iface_data) + { + iface->handle_add_match = handle_add_match; + iface->handle_get_connection_selinux_security_context = handle_get_connection_selinux_security_context; +@@ -1738,7 +1741,8 @@ static void + } + + static void +-initable_iface_init (GInitableIface *initable_iface) ++initable_iface_init (GInitableIface *initable_iface, ++ gpointer iface_data) + { + initable_iface->init = initable_init; + } +Index: glib-2.56.4/gio/gdbusobjectmanagerclient.c +=================================================================== +--- glib-2.56.4.orig/gio/gdbusobjectmanagerclient.c ++++ glib-2.56.4/gio/gdbusobjectmanagerclient.c +@@ -165,9 +165,12 @@ static guint signals[LAST_SIGNAL] = { 0 }; + + static guint signals[LAST_SIGNAL] = { 0 }; + +-static void initable_iface_init (GInitableIface *initable_iface); +-static void async_initable_iface_init (GAsyncInitableIface *async_initable_iface); +-static void dbus_object_manager_interface_init (GDBusObjectManagerIface *iface); ++static void initable_iface_init (GInitableIface *initable_iface, ++ gpointer iface_data); ++static void async_initable_iface_init (GAsyncInitableIface *async_initable_iface, ++ gpointer iface_data); ++static void dbus_object_manager_interface_init (GDBusObjectManagerIface *iface, ++ gpointer iface_data); + + G_DEFINE_TYPE_WITH_CODE (GDBusObjectManagerClient, g_dbus_object_manager_client, G_TYPE_OBJECT, + G_ADD_PRIVATE (GDBusObjectManagerClient) +@@ -1409,13 +1412,15 @@ static void + } + + static void +-initable_iface_init (GInitableIface *initable_iface) ++initable_iface_init (GInitableIface *initable_iface, ++ gpointer iface_data) + { + initable_iface->init = initable_init; + } + + static void +-async_initable_iface_init (GAsyncInitableIface *async_initable_iface) ++async_initable_iface_init (GAsyncInitableIface *async_initable_iface, ++ gpointer iface_data) + { + /* for now, just use default: run GInitable code in thread */ + } +@@ -1751,7 +1756,8 @@ static void + + + static void +-dbus_object_manager_interface_init (GDBusObjectManagerIface *iface) ++dbus_object_manager_interface_init (GDBusObjectManagerIface *iface, ++ gpointer iface_data) + { + iface->get_object_path = g_dbus_object_manager_client_get_object_path; + iface->get_objects = g_dbus_object_manager_client_get_objects; +Index: glib-2.56.4/gio/gdbusproxy.c +=================================================================== +--- glib-2.56.4.orig/gio/gdbusproxy.c ++++ glib-2.56.4/gio/gdbusproxy.c +@@ -179,9 +179,12 @@ static guint signals[LAST_SIGNAL] = {0}; + + static guint signals[LAST_SIGNAL] = {0}; + +-static void dbus_interface_iface_init (GDBusInterfaceIface *dbus_interface_iface); +-static void initable_iface_init (GInitableIface *initable_iface); +-static void async_initable_iface_init (GAsyncInitableIface *async_initable_iface); ++static void dbus_interface_iface_init (GDBusInterfaceIface *dbus_interface_iface, ++ gpointer iface_data); ++static void initable_iface_init (GInitableIface *initable_iface, ++ gpointer iface_data); ++static void async_initable_iface_init (GAsyncInitableIface *async_initable_iface, ++ gpointer iface_data); + + G_DEFINE_TYPE_WITH_CODE (GDBusProxy, g_dbus_proxy, G_TYPE_OBJECT, + G_ADD_PRIVATE (GDBusProxy) +@@ -1879,7 +1882,8 @@ static void + } + + static void +-async_initable_iface_init (GAsyncInitableIface *async_initable_iface) ++async_initable_iface_init (GAsyncInitableIface *async_initable_iface, ++ gpointer iface_data) + { + async_initable_iface->init_async = async_initable_init_async; + async_initable_iface->init_finish = async_initable_init_finish; +@@ -1966,7 +1970,8 @@ static void + } + + static void +-initable_iface_init (GInitableIface *initable_iface) ++initable_iface_init (GInitableIface *initable_iface, ++ gpointer iface_data) + { + initable_iface->init = initable_init; + } +@@ -3206,7 +3211,8 @@ static void + } + + static void +-dbus_interface_iface_init (GDBusInterfaceIface *dbus_interface_iface) ++dbus_interface_iface_init (GDBusInterfaceIface *dbus_interface_iface, ++ gpointer iface_data) + { + dbus_interface_iface->get_info = _g_dbus_proxy_get_info; + dbus_interface_iface->get_object = _g_dbus_proxy_get_object; +Index: glib-2.56.4/gio/gdbusserver.c +=================================================================== +--- glib-2.56.4.orig/gio/gdbusserver.c ++++ glib-2.56.4/gio/gdbusserver.c +@@ -151,7 +151,8 @@ static guint _signals[LAST_SIGNAL] = {0}; + + static guint _signals[LAST_SIGNAL] = {0}; + +-static void initable_iface_init (GInitableIface *initable_iface); ++static void initable_iface_init (GInitableIface *initable_iface, ++ gpointer iface_data); + + G_DEFINE_TYPE_WITH_CODE (GDBusServer, g_dbus_server, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, initable_iface_init)) +@@ -1132,7 +1133,8 @@ static void + + + static void +-initable_iface_init (GInitableIface *initable_iface) ++initable_iface_init (GInitableIface *initable_iface, ++ gpointer iface_data) + { + initable_iface->init = initable_init; + } +Index: glib-2.56.4/gio/gdesktopappinfo.c +=================================================================== +--- glib-2.56.4.orig/gio/gdesktopappinfo.c ++++ glib-2.56.4/gio/gdesktopappinfo.c +@@ -80,7 +80,8 @@ enum { + PROP_FILENAME + }; + +-static void g_desktop_app_info_iface_init (GAppInfoIface *iface); ++static void g_desktop_app_info_iface_init (GAppInfoIface *iface, ++ gpointer iface_data); + static gboolean g_desktop_app_info_ensure_saved (GDesktopAppInfo *info, + GError **error); + +@@ -3776,7 +3777,8 @@ static void + /* GAppInfo interface init */ + + static void +-g_desktop_app_info_iface_init (GAppInfoIface *iface) ++g_desktop_app_info_iface_init (GAppInfoIface *iface, ++ gpointer iface_data) + { + iface->dup = g_desktop_app_info_dup; + iface->equal = g_desktop_app_info_equal; +Index: glib-2.56.4/gio/gdummyfile.c +=================================================================== +--- glib-2.56.4.orig/gio/gdummyfile.c ++++ glib-2.56.4/gio/gdummyfile.c +@@ -31,7 +31,8 @@ + #include "gfile.h" + + +-static void g_dummy_file_file_iface_init (GFileIface *iface); ++static void g_dummy_file_file_iface_init (GFileIface *iface, ++ gpointer iface_data); + + typedef struct { + char *scheme; +@@ -396,7 +397,8 @@ static void + + + static void +-g_dummy_file_file_iface_init (GFileIface *iface) ++g_dummy_file_file_iface_init (GFileIface *iface, ++ gpointer iface_data) + { + iface->dup = g_dummy_file_dup; + iface->hash = g_dummy_file_hash; +Index: glib-2.56.4/gio/gdummyproxyresolver.c +=================================================================== +--- glib-2.56.4.orig/gio/gdummyproxyresolver.c ++++ glib-2.56.4/gio/gdummyproxyresolver.c +@@ -36,7 +36,8 @@ struct _GDummyProxyResolver { + GObject parent_instance; + }; + +-static void g_dummy_proxy_resolver_iface_init (GProxyResolverInterface *iface); ++static void g_dummy_proxy_resolver_iface_init (GProxyResolverInterface *iface, ++ gpointer iface_data); + + #define g_dummy_proxy_resolver_get_type _g_dummy_proxy_resolver_get_type + G_DEFINE_TYPE_WITH_CODE (GDummyProxyResolver, g_dummy_proxy_resolver, G_TYPE_OBJECT, +@@ -125,7 +126,8 @@ static void + } + + static void +-g_dummy_proxy_resolver_iface_init (GProxyResolverInterface *iface) ++g_dummy_proxy_resolver_iface_init (GProxyResolverInterface *iface, ++ gpointer iface_data) + { + iface->is_supported = g_dummy_proxy_resolver_is_supported; + iface->lookup = g_dummy_proxy_resolver_lookup; +Index: glib-2.56.4/gio/gdummytlsbackend.c +=================================================================== +--- glib-2.56.4.orig/gio/gdummytlsbackend.c ++++ glib-2.56.4/gio/gdummytlsbackend.c +@@ -51,7 +51,8 @@ struct _GDummyTlsBackend { + GTlsDatabase *database; + }; + +-static void g_dummy_tls_backend_iface_init (GTlsBackendInterface *iface); ++static void g_dummy_tls_backend_iface_init (GTlsBackendInterface *iface, ++ gpointer iface_data); + + #define g_dummy_tls_backend_get_type _g_dummy_tls_backend_get_type + G_DEFINE_TYPE_WITH_CODE (GDummyTlsBackend, g_dummy_tls_backend, G_TYPE_OBJECT, +@@ -103,7 +104,8 @@ static void + } + + static void +-g_dummy_tls_backend_iface_init (GTlsBackendInterface *iface) ++g_dummy_tls_backend_iface_init (GTlsBackendInterface *iface, ++ gpointer iface_data) + { + iface->get_certificate_type = _g_dummy_tls_certificate_get_type; + iface->get_client_connection_type = _g_dummy_tls_connection_get_type; +@@ -138,7 +140,8 @@ enum + PROP_CERT_ISSUER + }; + +-static void g_dummy_tls_certificate_initable_iface_init (GInitableIface *iface); ++static void g_dummy_tls_certificate_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data); + + #define g_dummy_tls_certificate_get_type _g_dummy_tls_certificate_get_type + G_DEFINE_TYPE_WITH_CODE (GDummyTlsCertificate, g_dummy_tls_certificate, G_TYPE_TLS_CERTIFICATE, +@@ -197,7 +200,8 @@ static void + } + + static void +-g_dummy_tls_certificate_initable_iface_init (GInitableIface *iface) ++g_dummy_tls_certificate_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data) + { + iface->init = g_dummy_tls_certificate_initable_init; + } +@@ -238,7 +242,8 @@ enum + PROP_CONN_AUTHENTICATION_MODE + }; + +-static void g_dummy_tls_connection_initable_iface_init (GInitableIface *iface); ++static void g_dummy_tls_connection_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data); + + #define g_dummy_tls_connection_get_type _g_dummy_tls_connection_get_type + G_DEFINE_TYPE_WITH_CODE (GDummyTlsConnection, g_dummy_tls_connection, G_TYPE_TLS_CONNECTION, +@@ -319,7 +324,8 @@ static void + } + + static void +-g_dummy_tls_connection_initable_iface_init (GInitableIface *iface) ++g_dummy_tls_connection_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data) + { + iface->init = g_dummy_tls_connection_initable_init; + } +@@ -357,7 +363,8 @@ enum + PROP_DTLS_CONN_AUTHENTICATION_MODE, + }; + +-static void g_dummy_dtls_connection_initable_iface_init (GInitableIface *iface); ++static void g_dummy_dtls_connection_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data); + + #define g_dummy_dtls_connection_get_type _g_dummy_dtls_connection_get_type + G_DEFINE_TYPE_WITH_CODE (GDummyDtlsConnection, g_dummy_dtls_connection, G_TYPE_OBJECT, +@@ -421,7 +428,8 @@ static void + } + + static void +-g_dummy_dtls_connection_initable_iface_init (GInitableIface *iface) ++g_dummy_dtls_connection_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data) + { + iface->init = g_dummy_dtls_connection_initable_init; + } +@@ -447,8 +455,10 @@ enum + PROP_ANCHORS, + }; + +-static void g_dummy_tls_database_file_database_iface_init (GTlsFileDatabaseInterface *iface); +-static void g_dummy_tls_database_initable_iface_init (GInitableIface *iface); ++static void g_dummy_tls_database_file_database_iface_init (GTlsFileDatabaseInterface *iface, ++ gpointer iface_data); ++static void g_dummy_tls_database_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data); + + #define g_dummy_tls_database_get_type _g_dummy_tls_database_get_type + G_DEFINE_TYPE_WITH_CODE (GDummyTlsDatabase, g_dummy_tls_database, G_TYPE_TLS_DATABASE, +@@ -496,7 +506,8 @@ static void + } + + static void +-g_dummy_tls_database_file_database_iface_init (GTlsFileDatabaseInterface *iface) ++g_dummy_tls_database_file_database_iface_init (GTlsFileDatabaseInterface *iface, ++ gpointer iface_data) + { + } + +@@ -511,7 +522,8 @@ static void + } + + static void +-g_dummy_tls_database_initable_iface_init (GInitableIface *iface) ++g_dummy_tls_database_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data) + { + iface->init = g_dummy_tls_database_initable_init; + } +Index: glib-2.56.4/gio/gemblem.c +=================================================================== +--- glib-2.56.4.orig/gio/gemblem.c ++++ glib-2.56.4/gio/gemblem.c +@@ -42,7 +42,8 @@ + * supported. More may be added in the future. + */ + +-static void g_emblem_iface_init (GIconIface *iface); ++static void g_emblem_iface_init (GIconIface *iface, ++ gpointer iface_data); + + struct _GEmblem + { +@@ -369,7 +370,8 @@ static void + } + + static void +-g_emblem_iface_init (GIconIface *iface) ++g_emblem_iface_init (GIconIface *iface, ++ gpointer iface_data) + { + iface->hash = g_emblem_hash; + iface->equal = g_emblem_equal; +Index: glib-2.56.4/gio/gemblemedicon.c +=================================================================== +--- glib-2.56.4.orig/gio/gemblemedicon.c ++++ glib-2.56.4/gio/gemblemedicon.c +@@ -56,7 +56,8 @@ static GParamSpec *properties[NUM_PROPERTIES] = { NULL + + static GParamSpec *properties[NUM_PROPERTIES] = { NULL, }; + +-static void g_emblemed_icon_icon_iface_init (GIconIface *iface); ++static void g_emblemed_icon_icon_iface_init (GIconIface *iface, ++ gpointer iface_data); + + G_DEFINE_TYPE_WITH_CODE (GEmblemedIcon, g_emblemed_icon, G_TYPE_OBJECT, + G_ADD_PRIVATE (GEmblemedIcon) +@@ -457,7 +458,8 @@ static void + } + + static void +-g_emblemed_icon_icon_iface_init (GIconIface *iface) ++g_emblemed_icon_icon_iface_init (GIconIface *iface, ++ gpointer iface_data) + { + iface->hash = g_emblemed_icon_hash; + iface->equal = g_emblemed_icon_equal; +Index: glib-2.56.4/gio/gfileicon.c +=================================================================== +--- glib-2.56.4.orig/gio/gfileicon.c ++++ glib-2.56.4/gio/gfileicon.c +@@ -41,8 +41,10 @@ + * + **/ + +-static void g_file_icon_icon_iface_init (GIconIface *iface); +-static void g_file_icon_loadable_icon_iface_init (GLoadableIconIface *iface); ++static void g_file_icon_icon_iface_init (GIconIface *iface, ++ gpointer iface_data); ++static void g_file_icon_loadable_icon_iface_init (GLoadableIconIface *iface, ++ gpointer iface_data); + static void g_file_icon_load_async (GLoadableIcon *icon, + int size, + GCancellable *cancellable, +@@ -264,7 +266,8 @@ static void + } + + static void +-g_file_icon_icon_iface_init (GIconIface *iface) ++g_file_icon_icon_iface_init (GIconIface *iface, ++ gpointer iface_data) + { + iface->hash = g_file_icon_hash; + iface->equal = g_file_icon_equal; +@@ -344,7 +347,8 @@ static void + } + + static void +-g_file_icon_loadable_icon_iface_init (GLoadableIconIface *iface) ++g_file_icon_loadable_icon_iface_init (GLoadableIconIface *iface, ++ gpointer iface_data) + { + iface->load = g_file_icon_load; + iface->load_async = g_file_icon_load_async; +Index: glib-2.56.4/gio/gfileinputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gfileinputstream.c ++++ glib-2.56.4/gio/gfileinputstream.c +@@ -47,7 +47,8 @@ + * To position a file input stream, use g_seekable_seek(). + **/ + +-static void g_file_input_stream_seekable_iface_init (GSeekableIface *iface); ++static void g_file_input_stream_seekable_iface_init (GSeekableIface *iface, ++ gpointer iface_data); + static goffset g_file_input_stream_seekable_tell (GSeekable *seekable); + static gboolean g_file_input_stream_seekable_can_seek (GSeekable *seekable); + static gboolean g_file_input_stream_seekable_seek (GSeekable *seekable, +@@ -88,7 +89,8 @@ static void + } + + static void +-g_file_input_stream_seekable_iface_init (GSeekableIface *iface) ++g_file_input_stream_seekable_iface_init (GSeekableIface *iface, ++ gpointer iface_data) + { + iface->tell = g_file_input_stream_seekable_tell; + iface->can_seek = g_file_input_stream_seekable_can_seek; +Index: glib-2.56.4/gio/gfileiostream.c +=================================================================== +--- glib-2.56.4.orig/gio/gfileiostream.c ++++ glib-2.56.4/gio/gfileiostream.c +@@ -60,7 +60,8 @@ + * Since: 2.22 + **/ + +-static void g_file_io_stream_seekable_iface_init (GSeekableIface *iface); ++static void g_file_io_stream_seekable_iface_init (GSeekableIface *iface, ++ gpointer iface_data); + static goffset g_file_io_stream_seekable_tell (GSeekable *seekable); + static gboolean g_file_io_stream_seekable_can_seek (GSeekable *seekable); + static gboolean g_file_io_stream_seekable_seek (GSeekable *seekable, +@@ -93,7 +94,8 @@ static void + g_file_io_stream_seekable_iface_init)) + + static void +-g_file_io_stream_seekable_iface_init (GSeekableIface *iface) ++g_file_io_stream_seekable_iface_init (GSeekableIface *iface, ++ gpointer iface_data) + { + iface->tell = g_file_io_stream_seekable_tell; + iface->can_seek = g_file_io_stream_seekable_can_seek; +Index: glib-2.56.4/gio/gfileoutputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gfileoutputstream.c ++++ glib-2.56.4/gio/gfileoutputstream.c +@@ -52,7 +52,8 @@ + * stream, use g_seekable_truncate(). + **/ + +-static void g_file_output_stream_seekable_iface_init (GSeekableIface *iface); ++static void g_file_output_stream_seekable_iface_init (GSeekableIface *iface, ++ gpointer iface_data); + static goffset g_file_output_stream_seekable_tell (GSeekable *seekable); + static gboolean g_file_output_stream_seekable_can_seek (GSeekable *seekable); + static gboolean g_file_output_stream_seekable_seek (GSeekable *seekable, +@@ -92,7 +93,8 @@ static void + } + + static void +-g_file_output_stream_seekable_iface_init (GSeekableIface *iface) ++g_file_output_stream_seekable_iface_init (GSeekableIface *iface, ++ gpointer iface_data) + { + iface->tell = g_file_output_stream_seekable_tell; + iface->can_seek = g_file_output_stream_seekable_can_seek; +Index: glib-2.56.4/gio/ghttpproxy.c +=================================================================== +--- glib-2.56.4.orig/gio/ghttpproxy.c ++++ glib-2.56.4/gio/ghttpproxy.c +@@ -51,7 +51,8 @@ struct _GHttpProxyClass + GObjectClass parent_class; + }; + +-static void g_http_proxy_iface_init (GProxyInterface *proxy_iface); ++static void g_http_proxy_iface_init (GProxyInterface *proxy_iface, ++ gpointer iface_data); + + #define g_http_proxy_get_type _g_http_proxy_get_type + G_DEFINE_TYPE_WITH_CODE (GHttpProxy, g_http_proxy, G_TYPE_OBJECT, +@@ -363,7 +364,8 @@ static void + } + + static void +-g_http_proxy_iface_init (GProxyInterface *proxy_iface) ++g_http_proxy_iface_init (GProxyInterface *proxy_iface, ++ gpointer iface_data) + { + proxy_iface->connect = g_http_proxy_connect; + proxy_iface->connect_async = g_http_proxy_connect_async; +Index: glib-2.56.4/gio/ginetaddressmask.c +=================================================================== +--- glib-2.56.4.orig/gio/ginetaddressmask.c ++++ glib-2.56.4/gio/ginetaddressmask.c +@@ -54,7 +54,8 @@ struct _GInetAddressMaskPrivate + guint length; + }; + +-static void g_inet_address_mask_initable_iface_init (GInitableIface *iface); ++static void g_inet_address_mask_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data); + + G_DEFINE_TYPE_WITH_CODE (GInetAddressMask, g_inet_address_mask, G_TYPE_OBJECT, + G_ADD_PRIVATE (GInetAddressMask) +@@ -228,7 +229,8 @@ static void + } + + static void +-g_inet_address_mask_initable_iface_init (GInitableIface *iface) ++g_inet_address_mask_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data) + { + iface->init = g_inet_address_mask_initable_init; + } +Index: glib-2.56.4/gio/ginetsocketaddress.c +=================================================================== +--- glib-2.56.4.orig/gio/ginetsocketaddress.c ++++ glib-2.56.4/gio/ginetsocketaddress.c +@@ -55,7 +55,8 @@ struct _GInetSocketAddressPrivate + guint32 scope_id; + }; + +-static void g_inet_socket_address_connectable_iface_init (GSocketConnectableIface *iface); ++static void g_inet_socket_address_connectable_iface_init (GSocketConnectableIface *iface, ++ gpointer iface_data); + static gchar *g_inet_socket_address_connectable_to_string (GSocketConnectable *connectable); + + G_DEFINE_TYPE_WITH_CODE (GInetSocketAddress, g_inet_socket_address, G_TYPE_SOCKET_ADDRESS, +@@ -309,7 +310,8 @@ static void + } + + static void +-g_inet_socket_address_connectable_iface_init (GSocketConnectableIface *iface) ++g_inet_socket_address_connectable_iface_init (GSocketConnectableIface *iface, ++ gpointer iface_data) + { + GSocketConnectableIface *parent_iface = g_type_interface_peek_parent (iface); + +Index: glib-2.56.4/gio/gliststore.c +=================================================================== +--- glib-2.56.4.orig/gio/gliststore.c ++++ glib-2.56.4/gio/gliststore.c +@@ -64,7 +64,8 @@ enum + N_PROPERTIES + }; + +-static void g_list_store_iface_init (GListModelInterface *iface); ++static void g_list_store_iface_init (GListModelInterface *iface, ++ gpointer iface_data); + + G_DEFINE_TYPE_WITH_CODE (GListStore, g_list_store, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, g_list_store_iface_init)); +@@ -204,7 +205,8 @@ static void + } + + static void +-g_list_store_iface_init (GListModelInterface *iface) ++g_list_store_iface_init (GListModelInterface *iface, ++ gpointer iface_data) + { + iface->get_item_type = g_list_store_get_item_type; + iface->get_n_items = g_list_store_get_n_items; +Index: glib-2.56.4/gio/glocalfile.c +=================================================================== +--- glib-2.56.4.orig/gio/glocalfile.c ++++ glib-2.56.4/gio/glocalfile.c +@@ -92,7 +92,8 @@ + #endif + + +-static void g_local_file_file_iface_init (GFileIface *iface); ++static void g_local_file_file_iface_init (GFileIface *iface, ++ gpointer iface_data); + + static GFileAttributeInfoList *local_writable_attributes = NULL; + static /* GFileAttributeInfoList * */ gsize local_writable_namespaces = 0; +@@ -2941,7 +2942,8 @@ static void + } + + static void +-g_local_file_file_iface_init (GFileIface *iface) ++g_local_file_file_iface_init (GFileIface *iface, ++ gpointer iface_data) + { + iface->dup = g_local_file_dup; + iface->hash = g_local_file_hash; +Index: glib-2.56.4/gio/glocalfileinputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/glocalfileinputstream.c ++++ glib-2.56.4/gio/glocalfileinputstream.c +@@ -49,7 +49,8 @@ struct _GLocalFileInputStreamPrivate { + }; + + #ifdef G_OS_UNIX +-static void g_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface); ++static void g_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, ++ gpointer iface_data); + #endif + + #define g_local_file_input_stream_get_type _g_local_file_input_stream_get_type +@@ -114,7 +115,8 @@ static void + + #ifdef G_OS_UNIX + static void +-g_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface) ++g_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, ++ gpointer iface_data) + { + iface->get_fd = g_local_file_input_stream_get_fd; + } +Index: glib-2.56.4/gio/glocalfileoutputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/glocalfileoutputstream.c ++++ glib-2.56.4/gio/glocalfileoutputstream.c +@@ -67,7 +67,8 @@ struct _GLocalFileOutputStreamPrivate { + }; + + #ifdef G_OS_UNIX +-static void g_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface); ++static void g_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, ++ gpointer iface_data); + #endif + + #define g_local_file_output_stream_get_type _g_local_file_output_stream_get_type +@@ -154,7 +155,8 @@ static void + + #ifdef G_OS_UNIX + static void +-g_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface) ++g_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, ++ gpointer iface_data) + { + iface->get_fd = g_local_file_output_stream_get_fd; + } +Index: glib-2.56.4/gio/gmemoryinputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gmemoryinputstream.c ++++ glib-2.56.4/gio/gmemoryinputstream.c +@@ -78,7 +78,8 @@ static gboolean g_memory_input_stream_close_finish (GI + GAsyncResult *result, + GError **error); + +-static void g_memory_input_stream_seekable_iface_init (GSeekableIface *iface); ++static void g_memory_input_stream_seekable_iface_init (GSeekableIface *iface, ++ gpointer iface_data); + static goffset g_memory_input_stream_tell (GSeekable *seekable); + static gboolean g_memory_input_stream_can_seek (GSeekable *seekable); + static gboolean g_memory_input_stream_seek (GSeekable *seekable, +@@ -92,7 +93,8 @@ static gboolean g_memory_input_stream_truncate + GCancellable *cancellable, + GError **error); + +-static void g_memory_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface); ++static void g_memory_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface, ++ gpointer iface_data); + static gboolean g_memory_input_stream_is_readable (GPollableInputStream *stream); + static GSource *g_memory_input_stream_create_source (GPollableInputStream *stream, + GCancellable *cancellable); +@@ -143,7 +145,8 @@ static void + } + + static void +-g_memory_input_stream_seekable_iface_init (GSeekableIface *iface) ++g_memory_input_stream_seekable_iface_init (GSeekableIface *iface, ++ gpointer iface_data) + { + iface->tell = g_memory_input_stream_tell; + iface->can_seek = g_memory_input_stream_can_seek; +@@ -153,7 +156,8 @@ static void + } + + static void +-g_memory_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface) ++g_memory_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface, ++ gpointer iface_data) + { + iface->is_readable = g_memory_input_stream_is_readable; + iface->create_source = g_memory_input_stream_create_source; +Index: glib-2.56.4/gio/gmemoryoutputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gmemoryoutputstream.c ++++ glib-2.56.4/gio/gmemoryoutputstream.c +@@ -96,7 +96,8 @@ static gboolean g_memory_output_stream_close_finish (G + GAsyncResult *result, + GError **error); + +-static void g_memory_output_stream_seekable_iface_init (GSeekableIface *iface); ++static void g_memory_output_stream_seekable_iface_init (GSeekableIface *iface, ++ gpointer iface_data); + static goffset g_memory_output_stream_tell (GSeekable *seekable); + static gboolean g_memory_output_stream_can_seek (GSeekable *seekable); + static gboolean g_memory_output_stream_seek (GSeekable *seekable, +@@ -114,7 +115,8 @@ static GSource *g_memory_output_stream_create_source + static GSource *g_memory_output_stream_create_source (GPollableOutputStream *stream, + GCancellable *cancellable); + +-static void g_memory_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface); ++static void g_memory_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface, ++ gpointer iface_data); + + G_DEFINE_TYPE_WITH_CODE (GMemoryOutputStream, g_memory_output_stream, G_TYPE_OUTPUT_STREAM, + G_ADD_PRIVATE (GMemoryOutputStream) +@@ -221,7 +223,8 @@ static void + } + + static void +-g_memory_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface) ++g_memory_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface, ++ gpointer iface_data) + { + iface->is_writable = g_memory_output_stream_is_writable; + iface->create_source = g_memory_output_stream_create_source; +@@ -310,7 +313,8 @@ static void + } + + static void +-g_memory_output_stream_seekable_iface_init (GSeekableIface *iface) ++g_memory_output_stream_seekable_iface_init (GSeekableIface *iface, ++ gpointer iface_data) + { + iface->tell = g_memory_output_stream_tell; + iface->can_seek = g_memory_output_stream_can_seek; +Index: glib-2.56.4/gio/gnetworkaddress.c +=================================================================== +--- glib-2.56.4.orig/gio/gnetworkaddress.c ++++ glib-2.56.4/gio/gnetworkaddress.c +@@ -83,7 +83,8 @@ static void g_network_address_get_property (GObject + GValue *value, + GParamSpec *pspec); + +-static void g_network_address_connectable_iface_init (GSocketConnectableIface *iface); ++static void g_network_address_connectable_iface_init (GSocketConnectableIface *iface, ++ gpointer iface_data); + static GSocketAddressEnumerator *g_network_address_connectable_enumerate (GSocketConnectable *connectable); + static GSocketAddressEnumerator *g_network_address_connectable_proxy_enumerate (GSocketConnectable *connectable); + static gchar *g_network_address_connectable_to_string (GSocketConnectable *connectable); +@@ -142,7 +143,8 @@ static void + } + + static void +-g_network_address_connectable_iface_init (GSocketConnectableIface *connectable_iface) ++g_network_address_connectable_iface_init (GSocketConnectableIface *connectable_iface, ++ gpointer iface_data) + { + connectable_iface->enumerate = g_network_address_connectable_enumerate; + connectable_iface->proxy_enumerate = g_network_address_connectable_proxy_enumerate; +Index: glib-2.56.4/gio/gnetworkmonitorbase.c +=================================================================== +--- glib-2.56.4.orig/gio/gnetworkmonitorbase.c ++++ glib-2.56.4/gio/gnetworkmonitorbase.c +@@ -31,8 +31,10 @@ + #include "gtask.h" + #include "glibintl.h" + +-static void g_network_monitor_base_iface_init (GNetworkMonitorInterface *iface); +-static void g_network_monitor_base_initable_iface_init (GInitableIface *iface); ++static void g_network_monitor_base_iface_init (GNetworkMonitorInterface *iface, ++ gpointer iface_data); ++static void g_network_monitor_base_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data); + + enum + { +@@ -334,7 +336,8 @@ static void + } + + static void +-g_network_monitor_base_iface_init (GNetworkMonitorInterface *monitor_iface) ++g_network_monitor_base_iface_init (GNetworkMonitorInterface *monitor_iface, ++ gpointer iface_data) + { + monitor_iface->can_reach = g_network_monitor_base_can_reach; + monitor_iface->can_reach_async = g_network_monitor_base_can_reach_async; +@@ -356,7 +359,8 @@ static void + } + + static void +-g_network_monitor_base_initable_iface_init (GInitableIface *iface) ++g_network_monitor_base_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data) + { + iface->init = g_network_monitor_base_initable_init; + } +Index: glib-2.56.4/gio/gnetworkmonitornetlink.c +=================================================================== +--- glib-2.56.4.orig/gio/gnetworkmonitornetlink.c ++++ glib-2.56.4/gio/gnetworkmonitornetlink.c +@@ -40,8 +40,10 @@ static GInitableIface *initable_parent_iface; + #include + + static GInitableIface *initable_parent_iface; +-static void g_network_monitor_netlink_iface_init (GNetworkMonitorInterface *iface); +-static void g_network_monitor_netlink_initable_iface_init (GInitableIface *iface); ++static void g_network_monitor_netlink_iface_init (GNetworkMonitorInterface *iface, ++ gpointer iface_data); ++static void g_network_monitor_netlink_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data); + + struct _GNetworkMonitorNetlinkPrivate + { +@@ -468,12 +470,14 @@ static void + } + + static void +-g_network_monitor_netlink_iface_init (GNetworkMonitorInterface *monitor_iface) ++g_network_monitor_netlink_iface_init (GNetworkMonitorInterface *monitor_iface, ++ gpointer iface_data) + { + } + + static void +-g_network_monitor_netlink_initable_iface_init (GInitableIface *iface) ++g_network_monitor_netlink_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data) + { + initable_parent_iface = g_type_interface_peek_parent (iface); + +Index: glib-2.56.4/gio/gnetworkmonitornm.c +=================================================================== +--- glib-2.56.4.orig/gio/gnetworkmonitornm.c ++++ glib-2.56.4/gio/gnetworkmonitornm.c +@@ -32,8 +32,10 @@ + #include "gnetworkmonitor.h" + #include "gdbusproxy.h" + +-static void g_network_monitor_nm_iface_init (GNetworkMonitorInterface *iface); +-static void g_network_monitor_nm_initable_iface_init (GInitableIface *iface); ++static void g_network_monitor_nm_iface_init (GNetworkMonitorInterface *iface, ++ gpointer iface_data); ++static void g_network_monitor_nm_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data); + + enum + { +@@ -356,12 +358,14 @@ static void + } + + static void +-g_network_monitor_nm_iface_init (GNetworkMonitorInterface *monitor_iface) ++g_network_monitor_nm_iface_init (GNetworkMonitorInterface *monitor_iface, ++ gpointer iface_data) + { + } + + static void +-g_network_monitor_nm_initable_iface_init (GInitableIface *iface) ++g_network_monitor_nm_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data) + { + iface->init = g_network_monitor_nm_initable_init; + } +Index: glib-2.56.4/gio/gnetworkmonitorportal.c +=================================================================== +--- glib-2.56.4.orig/gio/gnetworkmonitorportal.c ++++ glib-2.56.4/gio/gnetworkmonitorportal.c +@@ -25,8 +25,10 @@ static GInitableIface *initable_parent_iface; + #include "gportalsupport.h" + + static GInitableIface *initable_parent_iface; +-static void g_network_monitor_portal_iface_init (GNetworkMonitorInterface *iface); +-static void g_network_monitor_portal_initable_iface_init (GInitableIface *iface); ++static void g_network_monitor_portal_iface_init (GNetworkMonitorInterface *iface, ++ gpointer iface_data); ++static void g_network_monitor_portal_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data); + + enum + { +@@ -366,12 +368,14 @@ static void + } + + static void +-g_network_monitor_portal_iface_init (GNetworkMonitorInterface *monitor_iface) ++g_network_monitor_portal_iface_init (GNetworkMonitorInterface *monitor_iface, ++ gpointer iface_data) + { + } + + static void +-g_network_monitor_portal_initable_iface_init (GInitableIface *iface) ++g_network_monitor_portal_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data) + { + initable_parent_iface = g_type_interface_peek_parent (iface); + +Index: glib-2.56.4/gio/gnetworkservice.c +=================================================================== +--- glib-2.56.4.orig/gio/gnetworkservice.c ++++ glib-2.56.4/gio/gnetworkservice.c +@@ -86,7 +86,8 @@ static void g_network_service_get_property (GObject + GValue *value, + GParamSpec *pspec); + +-static void g_network_service_connectable_iface_init (GSocketConnectableIface *iface); ++static void g_network_service_connectable_iface_init (GSocketConnectableIface *iface, ++ gpointer iface_data); + static GSocketAddressEnumerator *g_network_service_connectable_enumerate (GSocketConnectable *connectable); + static GSocketAddressEnumerator *g_network_service_connectable_proxy_enumerate (GSocketConnectable *connectable); + static gchar *g_network_service_connectable_to_string (GSocketConnectable *connectable); +@@ -156,7 +157,8 @@ static void + } + + static void +-g_network_service_connectable_iface_init (GSocketConnectableIface *connectable_iface) ++g_network_service_connectable_iface_init (GSocketConnectableIface *connectable_iface, ++ gpointer iface_data) + { + connectable_iface->enumerate = g_network_service_connectable_enumerate; + connectable_iface->proxy_enumerate = g_network_service_connectable_proxy_enumerate; +Index: glib-2.56.4/gio/gpropertyaction.c +=================================================================== +--- glib-2.56.4.orig/gio/gpropertyaction.c ++++ glib-2.56.4/gio/gpropertyaction.c +@@ -106,7 +106,8 @@ typedef GObjectClass GPropertyActionClass; + + typedef GObjectClass GPropertyActionClass; + +-static void g_property_action_iface_init (GActionInterface *iface); ++static void g_property_action_iface_init (GActionInterface *iface, ++ gpointer iface_data); + G_DEFINE_TYPE_WITH_CODE (GPropertyAction, g_property_action, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (G_TYPE_ACTION, g_property_action_iface_init)) + +@@ -401,7 +402,8 @@ void + } + + void +-g_property_action_iface_init (GActionInterface *iface) ++g_property_action_iface_init (GActionInterface *iface, ++ gpointer iface_data) + { + iface->get_name = g_property_action_get_name; + iface->get_parameter_type = g_property_action_get_parameter_type; +Index: glib-2.56.4/gio/gproxyresolverportal.c +=================================================================== +--- glib-2.56.4.orig/gio/gproxyresolverportal.c ++++ glib-2.56.4/gio/gproxyresolverportal.c +@@ -31,7 +31,8 @@ struct _GProxyResolverPortal { + gboolean network_available; + }; + +-static void g_proxy_resolver_portal_iface_init (GProxyResolverInterface *iface); ++static void g_proxy_resolver_portal_iface_init (GProxyResolverInterface *iface, ++ gpointer iface_data); + + G_DEFINE_TYPE_WITH_CODE (GProxyResolverPortal, g_proxy_resolver_portal, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (G_TYPE_PROXY_RESOLVER, +@@ -199,7 +200,8 @@ static void + } + + static void +-g_proxy_resolver_portal_iface_init (GProxyResolverInterface *iface) ++g_proxy_resolver_portal_iface_init (GProxyResolverInterface *iface, ++ gpointer iface_data) + { + iface->is_supported = g_proxy_resolver_portal_is_supported; + iface->lookup = g_proxy_resolver_portal_lookup; +Index: glib-2.56.4/gio/gresourcefile.c +=================================================================== +--- glib-2.56.4.orig/gio/gresourcefile.c ++++ glib-2.56.4/gio/gresourcefile.c +@@ -66,7 +66,8 @@ typedef struct _GResourceFileEnumeratorClass GResour + typedef struct _GResourceFileEnumerator GResourceFileEnumerator; + typedef struct _GResourceFileEnumeratorClass GResourceFileEnumeratorClass; + +-static void g_resource_file_file_iface_init (GFileIface *iface); ++static void g_resource_file_file_iface_init (GFileIface *iface, ++ gpointer iface_data); + + static GFileAttributeInfoList *resource_writable_attributes = NULL; + static GFileAttributeInfoList *resource_writable_namespaces = NULL; +@@ -645,7 +646,8 @@ static void + } + + static void +-g_resource_file_file_iface_init (GFileIface *iface) ++g_resource_file_file_iface_init (GFileIface *iface, ++ gpointer iface_data) + { + iface->dup = g_resource_file_dup; + iface->hash = g_resource_file_hash; +Index: glib-2.56.4/gio/gsettings.c +=================================================================== +--- glib-2.56.4.orig/gio/gsettings.c ++++ glib-2.56.4/gio/gsettings.c +@@ -3124,7 +3124,8 @@ static GType g_settings_action_get_type (void); + typedef GObjectClass GSettingsActionClass; + + static GType g_settings_action_get_type (void); +-static void g_settings_action_iface_init (GActionInterface *iface); ++static void g_settings_action_iface_init (GActionInterface *iface, ++ gpointer iface_data); + G_DEFINE_TYPE_WITH_CODE (GSettingsAction, g_settings_action, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (G_TYPE_ACTION, g_settings_action_iface_init)) + +@@ -3284,7 +3285,8 @@ static void + } + + static void +-g_settings_action_iface_init (GActionInterface *iface) ++g_settings_action_iface_init (GActionInterface *iface, ++ gpointer iface_data) + { + iface->get_name = g_settings_action_get_name; + iface->get_parameter_type = g_settings_action_get_parameter_type; +Index: glib-2.56.4/gio/gsimpleaction.c +=================================================================== +--- glib-2.56.4.orig/gio/gsimpleaction.c ++++ glib-2.56.4/gio/gsimpleaction.c +@@ -58,7 +58,8 @@ typedef GObjectClass GSimpleActionClass; + + typedef GObjectClass GSimpleActionClass; + +-static void g_simple_action_iface_init (GActionInterface *iface); ++static void g_simple_action_iface_init (GActionInterface *iface, ++ gpointer iface_data); + G_DEFINE_TYPE_WITH_CODE (GSimpleAction, g_simple_action, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (G_TYPE_ACTION, g_simple_action_iface_init)) + +@@ -347,7 +348,8 @@ void + } + + void +-g_simple_action_iface_init (GActionInterface *iface) ++g_simple_action_iface_init (GActionInterface *iface, ++ gpointer iface_data) + { + iface->get_name = g_simple_action_get_name; + iface->get_parameter_type = g_simple_action_get_parameter_type; +Index: glib-2.56.4/gio/gsimpleactiongroup.c +=================================================================== +--- glib-2.56.4.orig/gio/gsimpleactiongroup.c ++++ glib-2.56.4/gio/gsimpleactiongroup.c +@@ -40,8 +40,10 @@ struct _GSimpleActionGroupPrivate + GHashTable *table; /* string -> GAction */ + }; + +-static void g_simple_action_group_iface_init (GActionGroupInterface *); +-static void g_simple_action_group_map_iface_init (GActionMapInterface *); ++static void g_simple_action_group_iface_init (GActionGroupInterface *iface, ++ gpointer iface_data); ++static void g_simple_action_group_map_iface_init (GActionMapInterface *iface, ++ gpointer iface_data); + G_DEFINE_TYPE_WITH_CODE (GSimpleActionGroup, + g_simple_action_group, G_TYPE_OBJECT, + G_ADD_PRIVATE (GSimpleActionGroup) +@@ -272,7 +274,8 @@ static void + } + + static void +-g_simple_action_group_iface_init (GActionGroupInterface *iface) ++g_simple_action_group_iface_init (GActionGroupInterface *iface, ++ gpointer iface_data) + { + iface->list_actions = g_simple_action_group_list_actions; + iface->query_action = g_simple_action_group_query_action; +@@ -281,7 +284,8 @@ static void + } + + static void +-g_simple_action_group_map_iface_init (GActionMapInterface *iface) ++g_simple_action_group_map_iface_init (GActionMapInterface *iface, ++ gpointer iface_data) + { + iface->add_action = g_simple_action_group_add_action; + iface->remove_action = g_simple_action_group_remove_action; +Index: glib-2.56.4/gio/gsimpleasyncresult.c +=================================================================== +--- glib-2.56.4.orig/gio/gsimpleasyncresult.c ++++ glib-2.56.4/gio/gsimpleasyncresult.c +@@ -205,7 +205,8 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS + + G_GNUC_BEGIN_IGNORE_DEPRECATIONS + +-static void g_simple_async_result_async_result_iface_init (GAsyncResultIface *iface); ++static void g_simple_async_result_async_result_iface_init (GAsyncResultIface *iface, ++ gpointer iface_data); + + struct _GSimpleAsyncResult + { +@@ -464,7 +465,8 @@ static void + } + + static void +-g_simple_async_result_async_result_iface_init (GAsyncResultIface *iface) ++g_simple_async_result_async_result_iface_init (GAsyncResultIface *iface, ++ gpointer iface_data) + { + iface->get_user_data = g_simple_async_result_get_user_data; + iface->get_source_object = g_simple_async_result_get_source_object; +Index: glib-2.56.4/gio/gsimpleproxyresolver.c +=================================================================== +--- glib-2.56.4.orig/gio/gsimpleproxyresolver.c ++++ glib-2.56.4/gio/gsimpleproxyresolver.c +@@ -62,7 +62,8 @@ struct _GSimpleProxyResolverPrivate { + GSimpleProxyResolverDomain *ignore_domains; + }; + +-static void g_simple_proxy_resolver_iface_init (GProxyResolverInterface *iface); ++static void g_simple_proxy_resolver_iface_init (GProxyResolverInterface *iface, ++ gpointer iface_data); + + G_DEFINE_TYPE_WITH_CODE (GSimpleProxyResolver, g_simple_proxy_resolver, G_TYPE_OBJECT, + G_ADD_PRIVATE (GSimpleProxyResolver) +@@ -477,7 +478,8 @@ static void + } + + static void +-g_simple_proxy_resolver_iface_init (GProxyResolverInterface *iface) ++g_simple_proxy_resolver_iface_init (GProxyResolverInterface *iface, ++ gpointer iface_data) + { + iface->lookup = g_simple_proxy_resolver_lookup; + iface->lookup_async = g_simple_proxy_resolver_lookup_async; +Index: glib-2.56.4/gio/gsocket.c +=================================================================== +--- glib-2.56.4.orig/gio/gsocket.c ++++ glib-2.56.4/gio/gsocket.c +@@ -141,12 +141,14 @@ + * Since: 2.22 + */ + +-static void g_socket_initable_iface_init (GInitableIface *iface); ++static void g_socket_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data); + static gboolean g_socket_initable_init (GInitable *initable, + GCancellable *cancellable, + GError **error); + +-static void g_socket_datagram_based_iface_init (GDatagramBasedInterface *iface); ++static void g_socket_datagram_based_iface_init (GDatagramBasedInterface *iface, ++ gpointer iface_data); + static gint g_socket_datagram_based_receive_messages (GDatagramBased *self, + GInputMessage *messages, + guint num_messages, +@@ -1056,13 +1058,15 @@ static void + } + + static void +-g_socket_initable_iface_init (GInitableIface *iface) ++g_socket_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data) + { + iface->init = g_socket_initable_init; + } + + static void +-g_socket_datagram_based_iface_init (GDatagramBasedInterface *iface) ++g_socket_datagram_based_iface_init (GDatagramBasedInterface *iface, ++ gpointer iface_data) + { + iface->receive_messages = g_socket_datagram_based_receive_messages; + iface->send_messages = g_socket_datagram_based_send_messages; +Index: glib-2.56.4/gio/gsocketaddress.c +=================================================================== +--- glib-2.56.4.orig/gio/gsocketaddress.c ++++ glib-2.56.4/gio/gsocketaddress.c +@@ -64,7 +64,8 @@ enum + PROP_FAMILY + }; + +-static void g_socket_address_connectable_iface_init (GSocketConnectableIface *iface); ++static void g_socket_address_connectable_iface_init (GSocketConnectableIface *iface, ++ gpointer iface_data); + static GSocketAddressEnumerator *g_socket_address_connectable_enumerate (GSocketConnectable *connectable); + static GSocketAddressEnumerator *g_socket_address_connectable_proxy_enumerate (GSocketConnectable *connectable); + +@@ -125,7 +126,8 @@ static void + } + + static void +-g_socket_address_connectable_iface_init (GSocketConnectableIface *connectable_iface) ++g_socket_address_connectable_iface_init (GSocketConnectableIface *connectable_iface, ++ gpointer iface_data) + { + connectable_iface->enumerate = g_socket_address_connectable_enumerate; + connectable_iface->proxy_enumerate = g_socket_address_connectable_proxy_enumerate; +Index: glib-2.56.4/gio/gsocketinputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gsocketinputstream.c ++++ glib-2.56.4/gio/gsocketinputstream.c +@@ -39,9 +39,11 @@ struct _GSocketInputStreamPrivate + gsize count; + }; + +-static void g_socket_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface); ++static void g_socket_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface, ++ gpointer iface_data); + #ifdef G_OS_UNIX +-static void g_socket_input_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface); ++static void g_socket_input_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, ++ gpointer iface_data); + #endif + + #define g_socket_input_stream_get_type _g_socket_input_stream_get_type +@@ -198,14 +200,16 @@ static void + + #ifdef G_OS_UNIX + static void +-g_socket_input_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface) ++g_socket_input_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, ++ gpointer iface_data) + { + iface->get_fd = g_socket_input_stream_get_fd; + } + #endif + + static void +-g_socket_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface) ++g_socket_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface, ++ gpointer iface_data) + { + iface->is_readable = g_socket_input_stream_pollable_is_readable; + iface->create_source = g_socket_input_stream_pollable_create_source; +Index: glib-2.56.4/gio/gsocketoutputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gsocketoutputstream.c ++++ glib-2.56.4/gio/gsocketoutputstream.c +@@ -43,9 +43,11 @@ struct _GSocketOutputStreamPrivate + gsize count; + }; + +-static void g_socket_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface); ++static void g_socket_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface, ++ gpointer iface_data); + #ifdef G_OS_UNIX +-static void g_socket_output_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface); ++static void g_socket_output_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, ++ gpointer iface_data); + #endif + + #define g_socket_output_stream_get_type _g_socket_output_stream_get_type +@@ -202,14 +204,16 @@ static void + + #ifdef G_OS_UNIX + static void +-g_socket_output_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface) ++g_socket_output_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, ++ gpointer iface_data) + { + iface->get_fd = g_socket_output_stream_get_fd; + } + #endif + + static void +-g_socket_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface) ++g_socket_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface, ++ gpointer iface_data) + { + iface->is_writable = g_socket_output_stream_pollable_is_writable; + iface->create_source = g_socket_output_stream_pollable_create_source; +Index: glib-2.56.4/gio/gsocks4aproxy.c +=================================================================== +--- glib-2.56.4.orig/gio/gsocks4aproxy.c ++++ glib-2.56.4/gio/gsocks4aproxy.c +@@ -48,7 +48,8 @@ + #define SOCKS4_REP_NO_IDENT 92 + #define SOCKS4_REP_BAD_IDENT 93 + +-static void g_socks4a_proxy_iface_init (GProxyInterface *proxy_iface); ++static void g_socks4a_proxy_iface_init (GProxyInterface *proxy_iface, ++ gpointer iface_data); + + #define g_socks4a_proxy_get_type _g_socks4a_proxy_get_type + G_DEFINE_TYPE_WITH_CODE (GSocks4aProxy, g_socks4a_proxy, G_TYPE_OBJECT, +@@ -449,7 +450,8 @@ static void + } + + static void +-g_socks4a_proxy_iface_init (GProxyInterface *proxy_iface) ++g_socks4a_proxy_iface_init (GProxyInterface *proxy_iface, ++ gpointer iface_data) + { + proxy_iface->connect = g_socks4a_proxy_connect; + proxy_iface->connect_async = g_socks4a_proxy_connect_async; +Index: glib-2.56.4/gio/gsocks5proxy.c +=================================================================== +--- glib-2.56.4.orig/gio/gsocks5proxy.c ++++ glib-2.56.4/gio/gsocks5proxy.c +@@ -80,7 +80,8 @@ struct _GSocks5ProxyClass + GObjectClass parent_class; + }; + +-static void g_socks5_proxy_iface_init (GProxyInterface *proxy_iface); ++static void g_socks5_proxy_iface_init (GProxyInterface *proxy_iface, ++ gpointer iface_data); + + #define g_socks5_proxy_get_type _g_socks5_proxy_get_type + G_DEFINE_TYPE_WITH_CODE (GSocks5Proxy, g_socks5_proxy, G_TYPE_OBJECT, +@@ -1033,7 +1034,8 @@ static void + } + + static void +-g_socks5_proxy_iface_init (GProxyInterface *proxy_iface) ++g_socks5_proxy_iface_init (GProxyInterface *proxy_iface, ++ gpointer iface_data) + { + proxy_iface->connect = g_socks5_proxy_connect; + proxy_iface->connect_async = g_socks5_proxy_connect_async; +Index: glib-2.56.4/gio/gsubprocess.c +=================================================================== +--- glib-2.56.4.orig/gio/gsubprocess.c ++++ glib-2.56.4/gio/gsubprocess.c +@@ -140,7 +140,8 @@ + * via the worker thread so that we don't race with waitpid() and + * accidentally send a signal to an already-reaped child. + */ +-static void initable_iface_init (GInitableIface *initable_iface); ++static void initable_iface_init (GInitableIface *initable_iface, ++ gpointer iface_data); + + typedef GObjectClass GSubprocessClass; + +@@ -642,7 +643,8 @@ static void + } + + static void +-initable_iface_init (GInitableIface *initable_iface) ++initable_iface_init (GInitableIface *initable_iface, ++ gpointer iface_data) + { + initable_iface->init = initable_init; + } +Index: glib-2.56.4/gio/gtask.c +=================================================================== +--- glib-2.56.4.orig/gio/gtask.c ++++ glib-2.56.4/gio/gtask.c +@@ -589,7 +589,8 @@ typedef enum + PROP_COMPLETED = 1, + } GTaskProperty; + +-static void g_task_async_result_iface_init (GAsyncResultIface *iface); ++static void g_task_async_result_iface_init (GAsyncResultIface *iface, ++ gpointer iface_data); + static void g_task_thread_pool_init (void); + + G_DEFINE_TYPE_WITH_CODE (GTask, g_task, G_TYPE_OBJECT, +@@ -2042,7 +2043,8 @@ static void + } + + static void +-g_task_async_result_iface_init (GAsyncResultIface *iface) ++g_task_async_result_iface_init (GAsyncResultIface *iface, ++ gpointer iface_data) + { + iface->get_user_data = g_task_get_user_data; + iface->get_source_object = g_task_ref_source_object; +Index: glib-2.56.4/gio/gthemedicon.c +=================================================================== +--- glib-2.56.4.orig/gio/gthemedicon.c ++++ glib-2.56.4/gio/gthemedicon.c +@@ -43,7 +43,8 @@ + * themes that inherit other themes. + **/ + +-static void g_themed_icon_icon_iface_init (GIconIface *iface); ++static void g_themed_icon_icon_iface_init (GIconIface *iface, ++ gpointer iface_data); + + struct _GThemedIcon + { +@@ -541,7 +542,8 @@ static void + } + + static void +-g_themed_icon_icon_iface_init (GIconIface *iface) ++g_themed_icon_icon_iface_init (GIconIface *iface, ++ gpointer iface_data) + { + iface->hash = g_themed_icon_hash; + iface->equal = g_themed_icon_equal; +Index: glib-2.56.4/gio/gunixinputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gunixinputstream.c ++++ glib-2.56.4/gio/gunixinputstream.c +@@ -67,8 +67,10 @@ struct _GUnixInputStreamPrivate { + guint is_pipe_or_socket : 1; + }; + +-static void g_unix_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface); +-static void g_unix_input_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface); ++static void g_unix_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface, ++ gpointer iface_data); ++static void g_unix_input_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, ++ gpointer iface_data); + + G_DEFINE_TYPE_WITH_CODE (GUnixInputStream, g_unix_input_stream, G_TYPE_INPUT_STREAM, + G_ADD_PRIVATE (GUnixInputStream) +@@ -169,7 +171,8 @@ static void + } + + static void +-g_unix_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface) ++g_unix_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface, ++ gpointer iface_data) + { + iface->can_poll = g_unix_input_stream_pollable_can_poll; + iface->is_readable = g_unix_input_stream_pollable_is_readable; +@@ -177,7 +180,8 @@ static void + } + + static void +-g_unix_input_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface) ++g_unix_input_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, ++ gpointer iface_data) + { + iface->get_fd = (int (*) (GFileDescriptorBased *))g_unix_input_stream_get_fd; + } +Index: glib-2.56.4/gio/gunixmount.c +=================================================================== +--- glib-2.56.4.orig/gio/gunixmount.c ++++ glib-2.56.4/gio/gunixmount.c +@@ -61,7 +61,8 @@ struct _GUnixMount { + gboolean can_eject; + }; + +-static void g_unix_mount_mount_iface_init (GMountIface *iface); ++static void g_unix_mount_mount_iface_init (GMountIface *iface, ++ gpointer iface_data); + + #define g_unix_mount_get_type _g_unix_mount_get_type + G_DEFINE_TYPE_WITH_CODE (GUnixMount, g_unix_mount, G_TYPE_OBJECT, +@@ -375,7 +376,8 @@ static void + } + + static void +-g_unix_mount_mount_iface_init (GMountIface *iface) ++g_unix_mount_mount_iface_init (GMountIface *iface, ++ gpointer iface_data) + { + iface->get_root = g_unix_mount_get_root; + iface->get_name = g_unix_mount_get_name; +Index: glib-2.56.4/gio/gunixoutputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gunixoutputstream.c ++++ glib-2.56.4/gio/gunixoutputstream.c +@@ -67,8 +67,10 @@ struct _GUnixOutputStreamPrivate { + guint is_pipe_or_socket : 1; + }; + +-static void g_unix_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface); +-static void g_unix_output_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface); ++static void g_unix_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface, ++ gpointer iface_data); ++static void g_unix_output_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, ++ gpointer iface_data); + + G_DEFINE_TYPE_WITH_CODE (GUnixOutputStream, g_unix_output_stream, G_TYPE_OUTPUT_STREAM, + G_ADD_PRIVATE (GUnixOutputStream) +@@ -154,7 +156,8 @@ static void + } + + static void +-g_unix_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface) ++g_unix_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface, ++ gpointer iface_data) + { + iface->can_poll = g_unix_output_stream_pollable_can_poll; + iface->is_writable = g_unix_output_stream_pollable_is_writable; +@@ -162,7 +165,8 @@ static void + } + + static void +-g_unix_output_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface) ++g_unix_output_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, ++ gpointer iface_data) + { + iface->get_fd = (int (*) (GFileDescriptorBased *))g_unix_output_stream_get_fd; + } +Index: glib-2.56.4/gio/gunixsocketaddress.c +=================================================================== +--- glib-2.56.4.orig/gio/gunixsocketaddress.c ++++ glib-2.56.4/gio/gunixsocketaddress.c +@@ -77,7 +77,8 @@ struct _GUnixSocketAddressPrivate + GUnixSocketAddressType address_type; + }; + +-static void g_unix_socket_address_connectable_iface_init (GSocketConnectableIface *iface); ++static void g_unix_socket_address_connectable_iface_init (GSocketConnectableIface *iface, ++ gpointer iface_data); + static gchar *g_unix_socket_address_connectable_to_string (GSocketConnectable *connectable); + + G_DEFINE_TYPE_WITH_CODE (GUnixSocketAddress, g_unix_socket_address, G_TYPE_SOCKET_ADDRESS, +@@ -309,7 +310,8 @@ static void + } + + static void +-g_unix_socket_address_connectable_iface_init (GSocketConnectableIface *iface) ++g_unix_socket_address_connectable_iface_init (GSocketConnectableIface *iface, ++ gpointer iface_data) + { + GSocketConnectableIface *parent_iface = g_type_interface_peek_parent (iface); + +Index: glib-2.56.4/gio/gunixvolume.c +=================================================================== +--- glib-2.56.4.orig/gio/gunixvolume.c ++++ glib-2.56.4/gio/gunixvolume.c +@@ -59,7 +59,8 @@ struct _GUnixVolume { + GIcon *symbolic_icon; + }; + +-static void g_unix_volume_volume_iface_init (GVolumeIface *iface); ++static void g_unix_volume_volume_iface_init (GVolumeIface *iface, ++ gpointer iface_data); + + #define g_unix_volume_get_type _g_unix_volume_get_type + G_DEFINE_TYPE_WITH_CODE (GUnixVolume, g_unix_volume, G_TYPE_OBJECT, +@@ -417,7 +418,8 @@ static void + } + + static void +-g_unix_volume_volume_iface_init (GVolumeIface *iface) ++g_unix_volume_volume_iface_init (GVolumeIface *iface, ++ gpointer iface_data) + { + iface->get_name = g_unix_volume_get_name; + iface->get_icon = g_unix_volume_get_icon; +Index: glib-2.56.4/gio/gwin32appinfo.c +=================================================================== +--- glib-2.56.4.orig/gio/gwin32appinfo.c ++++ glib-2.56.4/gio/gwin32appinfo.c +@@ -3435,7 +3435,8 @@ g_win32_appinfo_init (void) + } + + +-static void g_win32_app_info_iface_init (GAppInfoIface *iface); ++static void g_win32_app_info_iface_init (GAppInfoIface *iface, ++ gpointer iface_data); + + struct _GWin32AppInfo + { +@@ -4419,7 +4420,8 @@ static void + /* GAppInfo interface init */ + + static void +-g_win32_app_info_iface_init (GAppInfoIface *iface) ++g_win32_app_info_iface_init (GAppInfoIface *iface, ++ gpointer iface_data) + { + iface->dup = g_win32_app_info_dup; + iface->equal = g_win32_app_info_equal; +Index: glib-2.56.4/gio/gwin32mount.c +=================================================================== +--- glib-2.56.4.orig/gio/gwin32mount.c ++++ glib-2.56.4/gio/gwin32mount.c +@@ -55,7 +55,8 @@ struct _GWin32Mount { + gboolean can_eject; + }; + +-static void g_win32_mount_mount_iface_init (GMountIface *iface); ++static void g_win32_mount_mount_iface_init (GMountIface *iface, ++ gpointer iface_data) + + #define g_win32_mount_get_type _g_win32_mount_get_type + G_DEFINE_TYPE_WITH_CODE (GWin32Mount, g_win32_mount, G_TYPE_OBJECT, +@@ -346,7 +347,8 @@ static void + } + + static void +-g_win32_mount_mount_iface_init (GMountIface *iface) ++g_win32_mount_mount_iface_init (GMountIface *iface, ++ gpointer iface_data) + { + iface->get_root = g_win32_mount_get_root; + iface->get_name = g_win32_mount_get_name; +Index: glib-2.56.4/gio/gwin32networkmonitor.c +=================================================================== +--- glib-2.56.4.orig/gio/gwin32networkmonitor.c ++++ glib-2.56.4/gio/gwin32networkmonitor.c +@@ -44,8 +44,10 @@ static GInitableIface *initable_parent_iface; + #include "gioerror.h" + + static GInitableIface *initable_parent_iface; +-static void g_win32_network_monitor_iface_init (GNetworkMonitorInterface *iface); +-static void g_win32_network_monitor_initable_iface_init (GInitableIface *iface); ++static void g_win32_network_monitor_iface_init (GNetworkMonitorInterface *iface, ++ gpointer iface_data); ++static void g_win32_network_monitor_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data); + + struct _GWin32NetworkMonitorPrivate + { +@@ -326,12 +328,14 @@ static void + } + + static void +-g_win32_network_monitor_iface_init (GNetworkMonitorInterface *monitor_iface) ++g_win32_network_monitor_iface_init (GNetworkMonitorInterface *monitor_iface, ++ gpointer iface_data) + { + } + + static void +-g_win32_network_monitor_initable_iface_init (GInitableIface *iface) ++g_win32_network_monitor_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data) + { + initable_parent_iface = g_type_interface_peek_parent (iface); + +Index: glib-2.56.4/gio/gwin32registrykey.c +=================================================================== +--- glib-2.56.4.orig/gio/gwin32registrykey.c ++++ glib-2.56.4/gio/gwin32registrykey.c +@@ -414,7 +414,8 @@ struct _GWin32RegistryKeyPrivate { + gpointer user_data; + }; + +-static void g_win32_registry_key_initable_iface_init (GInitableIface *iface); ++static void g_win32_registry_key_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data); + static gboolean g_win32_registry_key_initable_init (GInitable *initable, + GCancellable *cancellable, + GError **error); +@@ -521,7 +522,8 @@ static void + } + + static void +-g_win32_registry_key_initable_iface_init (GInitableIface *iface) ++g_win32_registry_key_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data) + { + iface->init = g_win32_registry_key_initable_init; + } +Index: glib-2.56.4/gio/gzlibcompressor.c +=================================================================== +--- glib-2.56.4.orig/gio/gzlibcompressor.c ++++ glib-2.56.4/gio/gzlibcompressor.c +@@ -49,7 +49,8 @@ enum { + * compresses data using zlib. + */ + +-static void g_zlib_compressor_iface_init (GConverterIface *iface); ++static void g_zlib_compressor_iface_init (GConverterIface *iface, ++ gpointer iface_data); + + /** + * GZlibCompressor: +@@ -429,7 +430,8 @@ static void + } + + static void +-g_zlib_compressor_iface_init (GConverterIface *iface) ++g_zlib_compressor_iface_init (GConverterIface *iface, ++ gpointer iface_data) + { + iface->convert = g_zlib_compressor_convert; + iface->reset = g_zlib_compressor_reset; +Index: glib-2.56.4/gio/gzlibdecompressor.c +=================================================================== +--- glib-2.56.4.orig/gio/gzlibdecompressor.c ++++ glib-2.56.4/gio/gzlibdecompressor.c +@@ -48,7 +48,8 @@ enum { + * decompresses data compressed with zlib. + */ + +-static void g_zlib_decompressor_iface_init (GConverterIface *iface); ++static void g_zlib_decompressor_iface_init (GConverterIface *iface, ++ gpointer iface_data); + + typedef struct { + gz_header gzheader; +@@ -406,7 +407,8 @@ static void + } + + static void +-g_zlib_decompressor_iface_init (GConverterIface *iface) ++g_zlib_decompressor_iface_init (GConverterIface *iface, ++ gpointer iface_data) + { + iface->convert = g_zlib_decompressor_convert; + iface->reset = g_zlib_decompressor_reset; +Index: glib-2.56.4/gobject/gobject.c +=================================================================== +--- glib-2.56.4.orig/gobject/gobject.c ++++ glib-2.56.4/gobject/gobject.c +@@ -143,7 +143,8 @@ static void g_object_base_class_finalize (GObjectClas + /* --- prototypes --- */ + static void g_object_base_class_init (GObjectClass *class); + static void g_object_base_class_finalize (GObjectClass *class); +-static void g_object_do_class_init (GObjectClass *class); ++static void g_object_do_class_init (GObjectClass *class, ++ gpointer class_data); + static void g_object_init (GObject *object, + GObjectClass *class); + static GObject* g_object_constructor (GType type, +@@ -451,7 +452,8 @@ static void + } + + static void +-g_object_do_class_init (GObjectClass *class) ++g_object_do_class_init (GObjectClass *class, ++ gpointer class_data) + { + /* read the comment about typedef struct CArray; on why not to change this quark */ + quark_closure_array = g_quark_from_static_string ("GObject-closure-array"); +Index: glib-2.56.4/gobject/gparam.h +=================================================================== +--- glib-2.56.4.orig/gobject/gparam.h ++++ glib-2.56.4/gobject/gparam.h +@@ -380,7 +380,8 @@ struct _GParamSpecTypeInfo + /* type system portion */ + guint16 instance_size; /* obligatory */ + guint16 n_preallocs; /* optional */ +- void (*instance_init) (GParamSpec *pspec); /* optional */ ++ void (*instance_init) (GParamSpec *pspec, /* optional */ ++ gpointer class_data); + + /* class portion */ + GType value_type; /* obligatory */ +Index: glib-2.56.4/gobject/gparamspecs.c +=================================================================== +--- glib-2.56.4.orig/gobject/gparamspecs.c ++++ glib-2.56.4/gobject/gparamspecs.c +@@ -59,7 +59,8 @@ static void + + /* --- param spec functions --- */ + static void +-param_char_init (GParamSpec *pspec) ++param_char_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecChar *cspec = G_PARAM_SPEC_CHAR (pspec); + +@@ -88,7 +89,8 @@ static void + } + + static void +-param_uchar_init (GParamSpec *pspec) ++param_uchar_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecUChar *uspec = G_PARAM_SPEC_UCHAR (pspec); + +@@ -135,7 +137,8 @@ static void + } + + static void +-param_int_init (GParamSpec *pspec) ++param_int_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecInt *ispec = G_PARAM_SPEC_INT (pspec); + +@@ -175,7 +178,8 @@ static void + } + + static void +-param_uint_init (GParamSpec *pspec) ++param_uint_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecUInt *uspec = G_PARAM_SPEC_UINT (pspec); + +@@ -215,7 +219,8 @@ static void + } + + static void +-param_long_init (GParamSpec *pspec) ++param_long_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecLong *lspec = G_PARAM_SPEC_LONG (pspec); + +@@ -260,7 +265,8 @@ static void + } + + static void +-param_ulong_init (GParamSpec *pspec) ++param_ulong_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecULong *uspec = G_PARAM_SPEC_ULONG (pspec); + +@@ -304,7 +310,8 @@ static void + } + + static void +-param_int64_init (GParamSpec *pspec) ++param_int64_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecInt64 *lspec = G_PARAM_SPEC_INT64 (pspec); + +@@ -344,7 +351,8 @@ static void + } + + static void +-param_uint64_init (GParamSpec *pspec) ++param_uint64_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecUInt64 *uspec = G_PARAM_SPEC_UINT64 (pspec); + +@@ -384,7 +392,8 @@ static void + } + + static void +-param_unichar_init (GParamSpec *pspec) ++param_unichar_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecUnichar *uspec = G_PARAM_SPEC_UNICHAR (pspec); + +@@ -426,7 +435,8 @@ static void + } + + static void +-param_enum_init (GParamSpec *pspec) ++param_enum_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecEnum *espec = G_PARAM_SPEC_ENUM (pspec); + +@@ -471,7 +481,8 @@ static void + } + + static void +-param_flags_init (GParamSpec *pspec) ++param_flags_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecFlags *fspec = G_PARAM_SPEC_FLAGS (pspec); + +@@ -517,7 +528,8 @@ static void + } + + static void +-param_float_init (GParamSpec *pspec) ++param_float_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecFloat *fspec = G_PARAM_SPEC_FLOAT (pspec); + +@@ -560,7 +572,8 @@ static void + } + + static void +-param_double_init (GParamSpec *pspec) ++param_double_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecDouble *dspec = G_PARAM_SPEC_DOUBLE (pspec); + +@@ -603,7 +616,8 @@ static void + } + + static void +-param_string_init (GParamSpec *pspec) ++param_string_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecString *sspec = G_PARAM_SPEC_STRING (pspec); + +@@ -711,7 +725,8 @@ static void + } + + static void +-param_param_init (GParamSpec *pspec) ++param_param_init (GParamSpec *pspec, ++ gpointer class_data) + { + /* GParamSpecParam *spec = G_PARAM_SPEC_PARAM (pspec); */ + } +@@ -742,7 +757,8 @@ static void + } + + static void +-param_boxed_init (GParamSpec *pspec) ++param_boxed_init (GParamSpec *pspec, ++ gpointer class_data) + { + /* GParamSpecBoxed *bspec = G_PARAM_SPEC_BOXED (pspec); */ + } +@@ -780,7 +796,8 @@ static void + } + + static void +-param_pointer_init (GParamSpec *pspec) ++param_pointer_init (GParamSpec *pspec, ++ gpointer class_data) + { + /* GParamSpecPointer *spec = G_PARAM_SPEC_POINTER (pspec); */ + } +@@ -816,7 +833,8 @@ static void + } + + static void +-param_value_array_init (GParamSpec *pspec) ++param_value_array_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecValueArray *aspec = G_PARAM_SPEC_VALUE_ARRAY (pspec); + +@@ -964,7 +982,8 @@ static void + } + + static void +-param_object_init (GParamSpec *pspec) ++param_object_init (GParamSpec *pspec, ++ gpointer class_data) + { + /* GParamSpecObject *ospec = G_PARAM_SPEC_OBJECT (pspec); */ + } +@@ -1008,7 +1027,8 @@ static void + } + + static void +-param_override_init (GParamSpec *pspec) ++param_override_init (GParamSpec *pspec, ++ gpointer class_data) + { + /* GParamSpecOverride *ospec = G_PARAM_SPEC_OVERRIDE (pspec); */ + } +@@ -1057,7 +1077,8 @@ static void + } + + static void +-param_gtype_init (GParamSpec *pspec) ++param_gtype_init (GParamSpec *pspec, ++ gpointer class_data) + { + } + +@@ -1101,7 +1122,8 @@ static void + } + + static void +-param_variant_init (GParamSpec *pspec) ++param_variant_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecVariant *vspec = G_PARAM_SPEC_VARIANT (pspec); + +Index: glib-2.56.4/gobject/gtype.h +=================================================================== +--- glib-2.56.4.orig/gobject/gtype.h ++++ glib-2.56.4/gobject/gtype.h +@@ -1790,7 +1790,7 @@ guint g_type_get_type_registration_serial (void); + */ + #define G_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init) { \ + const GInterfaceInfo g_implement_interface_info = { \ +- (GInterfaceInitFunc)(void (*)(void)) iface_init, NULL, NULL \ ++ (GInterfaceInitFunc) iface_init, NULL, NULL \ + }; \ + g_type_add_interface_static (g_define_type_id, TYPE_IFACE, &g_implement_interface_info); \ + } +@@ -1926,7 +1926,8 @@ guint g_type_get_type_registration_serial (void); + */ + #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 + #define _G_DEFINE_TYPE_EXTENDED_CLASS_INIT(TypeName, type_name) \ +-static void type_name##_class_intern_init (gpointer klass) \ ++static void type_name##_class_intern_init (gpointer klass, \ ++ gpointer class_data) \ + { \ + type_name##_parent_class = g_type_class_peek_parent (klass); \ + if (TypeName##_private_offset != 0) \ +@@ -1936,7 +1937,8 @@ static void type_name##_class_intern_init (gpointe + + #else + #define _G_DEFINE_TYPE_EXTENDED_CLASS_INIT(TypeName, type_name) \ +-static void type_name##_class_intern_init (gpointer klass) \ ++static void type_name##_class_intern_init (gpointer klass, \ ++ gpointer class_data) \ + { \ + type_name##_parent_class = g_type_class_peek_parent (klass); \ + type_name##_class_init ((TypeName##Class*) klass); \ +@@ -1974,9 +1976,9 @@ type_name##_get_type (void) \ + g_type_register_static_simple (TYPE_PARENT, \ + g_intern_static_string (#TypeName), \ + sizeof (TypeName##Class), \ +- (GClassInitFunc)(void (*)(void)) type_name##_class_intern_init, \ ++ (GClassInitFunc) type_name##_class_intern_init, \ + sizeof (TypeName), \ +- (GInstanceInitFunc)(void (*)(void)) type_name##_init, \ ++ (GInstanceInitFunc) type_name##_init_adapter, \ + (GTypeFlags) flags); \ + { /* custom code follows */ + #define _G_DEFINE_TYPE_EXTENDED_END() \ +@@ -1996,7 +1998,12 @@ type_name##_get_type (void) \ + + #define _G_DEFINE_INTERFACE_EXTENDED_BEGIN(TypeName, type_name, TYPE_PREREQ) \ + \ +-static void type_name##_default_init (TypeName##Interface *klass); \ ++static void type_name##_default_init (TypeName##Interface *klass); \ ++static void type_name##_default_init_adapter (TypeName##Interface *klass, \ ++ gpointer class_data) \ ++{ \ ++ type_name##_default_init (klass); \ ++} \ + \ + GType \ + type_name##_get_type (void) \ +@@ -2008,7 +2015,7 @@ type_name##_get_type (void) \ + g_type_register_static_simple (G_TYPE_INTERFACE, \ + g_intern_static_string (#TypeName), \ + sizeof (TypeName##Interface), \ +- (GClassInitFunc)(void (*)(void)) type_name##_default_init, \ ++ (GClassInitFunc) type_name##_default_init_adapter, \ + 0, \ + (GInstanceInitFunc)NULL, \ + (GTypeFlags) 0); \ +Index: glib-2.56.4/gobject/gtypemodule.c +=================================================================== +--- glib-2.56.4.orig/gobject/gtypemodule.c ++++ glib-2.56.4/gobject/gtypemodule.c +@@ -126,7 +126,8 @@ static void + } + + static void +-g_type_module_iface_init (GTypePluginClass *iface) ++g_type_module_iface_init (GTypePluginClass *iface, ++ gpointer iface_data) + { + iface->use_plugin = g_type_module_use_plugin; + iface->unuse_plugin = (void (*) (GTypePlugin *))g_type_module_unuse; diff --git a/recipes/recipes_emscripten/glib/patches/emscripten-wasm.diff b/recipes/recipes_emscripten/glib/patches/emscripten-wasm.diff new file mode 100644 index 000000000..7d8b46f16 --- /dev/null +++ b/recipes/recipes_emscripten/glib/patches/emscripten-wasm.diff @@ -0,0 +1,2588 @@ +This patch file is a modified version of kleisauke's patches for glib, +backported to version 2.56.4. Originally available at, +https://github.com/GNOME/glib/compare/2.76.2...kleisauke:wasm-vips-2.76.2.patch + +Also includes disabling some glib functions that require the libffi library. + +Index: glib-2.56.4/gio/gapplication.c +=================================================================== +--- glib-2.56.4.orig/gio/gapplication.c ++++ glib-2.56.4/gio/gapplication.c +@@ -282,10 +282,8 @@ static guint g_application_signals[NR_SIGNALS]; + + static guint g_application_signals[NR_SIGNALS]; + +-static void g_application_action_group_iface_init (GActionGroupInterface *iface, +- gpointer iface_data); +-static void g_application_action_map_iface_init (GActionMapInterface *iface, +- gpointer iface_data); ++static void g_application_action_group_iface_init (GActionGroupInterface *); ++static void g_application_action_map_iface_init (GActionMapInterface *); + G_DEFINE_TYPE_WITH_CODE (GApplication, g_application, G_TYPE_OBJECT, + G_ADD_PRIVATE (GApplication) + G_IMPLEMENT_INTERFACE (G_TYPE_ACTION_GROUP, g_application_action_group_iface_init) +@@ -311,8 +309,7 @@ static GType g_application_exported_actions_get_type + } GApplicationExportedActions; + + static GType g_application_exported_actions_get_type (void); +-static void g_application_exported_actions_iface_init (GRemoteActionGroupInterface *iface, +- gpointer iface_data); ++static void g_application_exported_actions_iface_init (GRemoteActionGroupInterface *iface); + G_DEFINE_TYPE_WITH_CODE (GApplicationExportedActions, g_application_exported_actions, G_TYPE_SIMPLE_ACTION_GROUP, + G_IMPLEMENT_INTERFACE (G_TYPE_REMOTE_ACTION_GROUP, g_application_exported_actions_iface_init)) + +@@ -356,8 +353,7 @@ static void + } + + static void +-g_application_exported_actions_iface_init (GRemoteActionGroupInterface *iface, +- gpointer iface_data) ++g_application_exported_actions_iface_init (GRemoteActionGroupInterface *iface) + { + iface->activate_action_full = g_application_exported_actions_activate_action_full; + iface->change_action_state_full = g_application_exported_actions_change_action_state_full; +@@ -2627,8 +2623,7 @@ static void + } + + static void +-g_application_action_group_iface_init (GActionGroupInterface *iface, +- gpointer iface_data) ++g_application_action_group_iface_init (GActionGroupInterface *iface) + { + iface->list_actions = g_application_list_actions; + iface->query_action = g_application_query_action; +@@ -2637,8 +2632,7 @@ static void + } + + static void +-g_application_action_map_iface_init (GActionMapInterface *iface, +- gpointer iface_data) ++g_application_action_map_iface_init (GActionMapInterface *iface) + { + iface->lookup_action = g_application_lookup_action; + iface->add_action = g_application_add_action; +Index: glib-2.56.4/gio/gbufferedinputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gbufferedinputstream.c ++++ glib-2.56.4/gio/gbufferedinputstream.c +@@ -113,8 +113,7 @@ static gssize g_buffered_input_stream_real_fill_finish + GAsyncResult *result, + GError **error); + +-static void g_buffered_input_stream_seekable_iface_init (GSeekableIface *iface, +- gpointer iface_data); ++static void g_buffered_input_stream_seekable_iface_init (GSeekableIface *iface); + static goffset g_buffered_input_stream_tell (GSeekable *seekable); + static gboolean g_buffered_input_stream_can_seek (GSeekable *seekable); + static gboolean g_buffered_input_stream_seek (GSeekable *seekable, +@@ -301,8 +300,7 @@ static void + } + + static void +-g_buffered_input_stream_seekable_iface_init (GSeekableIface *iface, +- gpointer iface_data) ++g_buffered_input_stream_seekable_iface_init (GSeekableIface *iface) + { + iface->tell = g_buffered_input_stream_tell; + iface->can_seek = g_buffered_input_stream_can_seek; +Index: glib-2.56.4/gio/gbufferedoutputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gbufferedoutputstream.c ++++ glib-2.56.4/gio/gbufferedoutputstream.c +@@ -105,8 +105,7 @@ static gboolean g_buffered_output_stream_close_finish + GAsyncResult *result, + GError **error); + +-static void g_buffered_output_stream_seekable_iface_init (GSeekableIface *iface, +- gpointer iface_data); ++static void g_buffered_output_stream_seekable_iface_init (GSeekableIface *iface); + static goffset g_buffered_output_stream_tell (GSeekable *seekable); + static gboolean g_buffered_output_stream_can_seek (GSeekable *seekable); + static gboolean g_buffered_output_stream_seek (GSeekable *seekable, +@@ -347,8 +346,7 @@ static void + } + + static void +-g_buffered_output_stream_seekable_iface_init (GSeekableIface *iface, +- gpointer iface_data) ++g_buffered_output_stream_seekable_iface_init (GSeekableIface *iface) + { + iface->tell = g_buffered_output_stream_tell; + iface->can_seek = g_buffered_output_stream_can_seek; +Index: glib-2.56.4/gio/gbytesicon.c +=================================================================== +--- glib-2.56.4.orig/gio/gbytesicon.c ++++ glib-2.56.4/gio/gbytesicon.c +@@ -57,10 +57,8 @@ enum + PROP_BYTES + }; + +-static void g_bytes_icon_icon_iface_init (GIconIface *iface, +- gpointer iface_data); +-static void g_bytes_icon_loadable_icon_iface_init (GLoadableIconIface *iface, +- gpointer iface_data); ++static void g_bytes_icon_icon_iface_init (GIconIface *iface); ++static void g_bytes_icon_loadable_icon_iface_init (GLoadableIconIface *iface); + G_DEFINE_TYPE_WITH_CODE (GBytesIcon, g_bytes_icon, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (G_TYPE_ICON, g_bytes_icon_icon_iface_init) + G_IMPLEMENT_INTERFACE (G_TYPE_LOADABLE_ICON, g_bytes_icon_loadable_icon_iface_init)) +@@ -207,8 +205,7 @@ static void + } + + static void +-g_bytes_icon_icon_iface_init (GIconIface *iface, +- gpointer iface_data) ++g_bytes_icon_icon_iface_init (GIconIface *iface) + { + iface->hash = g_bytes_icon_hash; + iface->equal = g_bytes_icon_equal; +@@ -261,8 +258,7 @@ static void + } + + static void +-g_bytes_icon_loadable_icon_iface_init (GLoadableIconIface *iface, +- gpointer iface_data) ++g_bytes_icon_loadable_icon_iface_init (GLoadableIconIface *iface) + { + iface->load = g_bytes_icon_load; + iface->load_async = g_bytes_icon_load_async; +Index: glib-2.56.4/gio/gcharsetconverter.c +=================================================================== +--- glib-2.56.4.orig/gio/gcharsetconverter.c ++++ glib-2.56.4/gio/gcharsetconverter.c +@@ -45,10 +45,8 @@ enum { + * GIConv. + */ + +-static void g_charset_converter_iface_init (GConverterIface *iface, +- gpointer iface_data); +-static void g_charset_converter_initable_iface_init (GInitableIface *iface, +- gpointer iface_data); ++static void g_charset_converter_iface_init (GConverterIface *iface); ++static void g_charset_converter_initable_iface_init (GInitableIface *iface); + + /** + * GCharsetConverter: +@@ -423,8 +421,7 @@ static void + } + + static void +-g_charset_converter_iface_init (GConverterIface *iface, +- gpointer iface_data) ++g_charset_converter_iface_init (GConverterIface *iface) + { + iface->convert = g_charset_converter_convert; + iface->reset = g_charset_converter_reset; +@@ -469,8 +466,7 @@ static void + } + + static void +-g_charset_converter_initable_iface_init (GInitableIface *iface, +- gpointer iface_data) ++g_charset_converter_initable_iface_init (GInitableIface *iface) + { + iface->init = g_charset_converter_initable_init; + } +Index: glib-2.56.4/gio/gconverterinputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gconverterinputstream.c ++++ glib-2.56.4/gio/gconverterinputstream.c +@@ -91,8 +91,8 @@ static GSource *g_converter_input_stream_create_source + static GSource *g_converter_input_stream_create_source (GPollableInputStream *stream, + GCancellable *cancellable); + +-static void g_converter_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface, +- gpointer iface_data); ++static void g_converter_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface); ++ + G_DEFINE_TYPE_WITH_CODE (GConverterInputStream, + g_converter_input_stream, + G_TYPE_FILTER_INPUT_STREAM, +@@ -127,8 +127,7 @@ static void + } + + static void +-g_converter_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface, +- gpointer iface_data) ++g_converter_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface) + { + iface->can_poll = g_converter_input_stream_can_poll; + iface->is_readable = g_converter_input_stream_is_readable; +Index: glib-2.56.4/gio/gconverteroutputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gconverteroutputstream.c ++++ glib-2.56.4/gio/gconverteroutputstream.c +@@ -106,8 +106,7 @@ static GSource *g_converter_output_stream_create_sourc + static GSource *g_converter_output_stream_create_source (GPollableOutputStream *stream, + GCancellable *cancellable); + +-static void g_converter_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface, +- gpointer iface_data); ++static void g_converter_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface); + + G_DEFINE_TYPE_WITH_CODE (GConverterOutputStream, + g_converter_output_stream, +@@ -144,8 +143,7 @@ static void + } + + static void +-g_converter_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface, +- gpointer iface_data) ++g_converter_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface) + { + iface->can_poll = g_converter_output_stream_can_poll; + iface->is_writable = g_converter_output_stream_is_writable; +Index: glib-2.56.4/gio/gdataoutputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gdataoutputstream.c ++++ glib-2.56.4/gio/gdataoutputstream.c +@@ -58,8 +58,7 @@ static void g_data_output_stream_get_property (GObject + GValue *value, + GParamSpec *pspec); + +-static void g_data_output_stream_seekable_iface_init (GSeekableIface *iface, +- gpointer iface_data); ++static void g_data_output_stream_seekable_iface_init (GSeekableIface *iface); + static goffset g_data_output_stream_tell (GSeekable *seekable); + static gboolean g_data_output_stream_can_seek (GSeekable *seekable); + static gboolean g_data_output_stream_seek (GSeekable *seekable, +@@ -161,8 +160,7 @@ static void + } + + static void +-g_data_output_stream_seekable_iface_init (GSeekableIface *iface, +- gpointer iface_data) ++g_data_output_stream_seekable_iface_init (GSeekableIface *iface) + { + iface->tell = g_data_output_stream_tell; + iface->can_seek = g_data_output_stream_can_seek; +Index: glib-2.56.4/gio/gdbusactiongroup.c +=================================================================== +--- glib-2.56.4.orig/gio/gdbusactiongroup.c ++++ glib-2.56.4/gio/gdbusactiongroup.c +@@ -129,10 +129,8 @@ action_info_new_from_iter (GVariantIter *iter) + return info; + } + +-static void g_dbus_action_group_remote_iface_init (GRemoteActionGroupInterface *iface, +- gpointer iface_data); +-static void g_dbus_action_group_iface_init (GActionGroupInterface *iface, +- gpointer iface_data); ++static void g_dbus_action_group_remote_iface_init (GRemoteActionGroupInterface *iface); ++static void g_dbus_action_group_iface_init (GActionGroupInterface *iface); + G_DEFINE_TYPE_WITH_CODE (GDBusActionGroup, g_dbus_action_group, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (G_TYPE_ACTION_GROUP, g_dbus_action_group_iface_init) + G_IMPLEMENT_INTERFACE (G_TYPE_REMOTE_ACTION_GROUP, g_dbus_action_group_remote_iface_init)) +@@ -459,16 +457,14 @@ static void + } + + static void +-g_dbus_action_group_remote_iface_init (GRemoteActionGroupInterface *iface, +- gpointer iface_data) ++g_dbus_action_group_remote_iface_init (GRemoteActionGroupInterface *iface) + { + iface->activate_action_full = g_dbus_action_group_activate_action_full; + iface->change_action_state_full = g_dbus_action_group_change_action_state_full; + } + + static void +-g_dbus_action_group_iface_init (GActionGroupInterface *iface, +- gpointer iface_data) ++g_dbus_action_group_iface_init (GActionGroupInterface *iface) + { + iface->list_actions = g_dbus_action_group_list_actions; + iface->query_action = g_dbus_action_group_query_action; +Index: glib-2.56.4/gio/gdbusconnection.c +=================================================================== +--- glib-2.56.4.orig/gio/gdbusconnection.c ++++ glib-2.56.4/gio/gdbusconnection.c +@@ -532,10 +532,8 @@ static guint signals[LAST_SIGNAL] = { 0 }; + + static guint signals[LAST_SIGNAL] = { 0 }; + +-static void initable_iface_init (GInitableIface *initable_iface, +- gpointer iface_data); +-static void async_initable_iface_init (GAsyncInitableIface *async_initable_iface, +- gpointer iface_data); ++static void initable_iface_init (GInitableIface *initable_iface); ++static void async_initable_iface_init (GAsyncInitableIface *async_initable_iface); + + G_DEFINE_TYPE_WITH_CODE (GDBusConnection, g_dbus_connection, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, initable_iface_init) +@@ -2634,8 +2632,7 @@ static void + } + + static void +-initable_iface_init (GInitableIface *initable_iface, +- gpointer iface_data) ++initable_iface_init (GInitableIface *initable_iface) + { + initable_iface->init = initable_init; + } +@@ -2643,8 +2640,7 @@ static void + /* ---------------------------------------------------------------------------------------------------- */ + + static void +-async_initable_iface_init (GAsyncInitableIface *async_initable_iface, +- gpointer iface_data) ++async_initable_iface_init (GAsyncInitableIface *async_initable_iface) + { + /* Use default */ + } +Index: glib-2.56.4/gio/gdbusdaemon.c +=================================================================== +--- glib-2.56.4.orig/gio/gdbusdaemon.c ++++ glib-2.56.4/gio/gdbusdaemon.c +@@ -69,10 +69,8 @@ static guint g_dbus_daemon_signals[NR_SIGNALS]; + static guint g_dbus_daemon_signals[NR_SIGNALS]; + + +-static void initable_iface_init (GInitableIface *initable_iface, +- gpointer iface_data); +-static void g_dbus_daemon_iface_init (_GFreedesktopDBusIface *iface, +- gpointer iface_data); ++static void initable_iface_init (GInitableIface *initable_iface); ++static void g_dbus_daemon_iface_init (_GFreedesktopDBusIface *iface); + + #define g_dbus_daemon_get_type _g_dbus_daemon_get_type + G_DEFINE_TYPE_WITH_CODE (GDBusDaemon, g_dbus_daemon, _G_TYPE_FREEDESKTOP_DBUS_SKELETON, +@@ -1718,8 +1716,7 @@ static void + } + + static void +-g_dbus_daemon_iface_init (_GFreedesktopDBusIface *iface, +- gpointer iface_data) ++g_dbus_daemon_iface_init (_GFreedesktopDBusIface *iface) + { + iface->handle_add_match = handle_add_match; + iface->handle_get_connection_selinux_security_context = handle_get_connection_selinux_security_context; +@@ -1741,8 +1738,7 @@ static void + } + + static void +-initable_iface_init (GInitableIface *initable_iface, +- gpointer iface_data) ++initable_iface_init (GInitableIface *initable_iface) + { + initable_iface->init = initable_init; + } +Index: glib-2.56.4/gio/gdbusobjectmanagerclient.c +=================================================================== +--- glib-2.56.4.orig/gio/gdbusobjectmanagerclient.c ++++ glib-2.56.4/gio/gdbusobjectmanagerclient.c +@@ -165,12 +165,9 @@ static guint signals[LAST_SIGNAL] = { 0 }; + + static guint signals[LAST_SIGNAL] = { 0 }; + +-static void initable_iface_init (GInitableIface *initable_iface, +- gpointer iface_data); +-static void async_initable_iface_init (GAsyncInitableIface *async_initable_iface, +- gpointer iface_data); +-static void dbus_object_manager_interface_init (GDBusObjectManagerIface *iface, +- gpointer iface_data); ++static void initable_iface_init (GInitableIface *initable_iface); ++static void async_initable_iface_init (GAsyncInitableIface *async_initable_iface); ++static void dbus_object_manager_interface_init (GDBusObjectManagerIface *iface); + + G_DEFINE_TYPE_WITH_CODE (GDBusObjectManagerClient, g_dbus_object_manager_client, G_TYPE_OBJECT, + G_ADD_PRIVATE (GDBusObjectManagerClient) +@@ -1412,15 +1409,13 @@ static void + } + + static void +-initable_iface_init (GInitableIface *initable_iface, +- gpointer iface_data) ++initable_iface_init (GInitableIface *initable_iface) + { + initable_iface->init = initable_init; + } + + static void +-async_initable_iface_init (GAsyncInitableIface *async_initable_iface, +- gpointer iface_data) ++async_initable_iface_init (GAsyncInitableIface *async_initable_iface) + { + /* for now, just use default: run GInitable code in thread */ + } +@@ -1756,8 +1751,7 @@ static void + + + static void +-dbus_object_manager_interface_init (GDBusObjectManagerIface *iface, +- gpointer iface_data) ++dbus_object_manager_interface_init (GDBusObjectManagerIface *iface) + { + iface->get_object_path = g_dbus_object_manager_client_get_object_path; + iface->get_objects = g_dbus_object_manager_client_get_objects; +Index: glib-2.56.4/gio/gdbusproxy.c +=================================================================== +--- glib-2.56.4.orig/gio/gdbusproxy.c ++++ glib-2.56.4/gio/gdbusproxy.c +@@ -179,12 +179,9 @@ static guint signals[LAST_SIGNAL] = {0}; + + static guint signals[LAST_SIGNAL] = {0}; + +-static void dbus_interface_iface_init (GDBusInterfaceIface *dbus_interface_iface, +- gpointer iface_data); +-static void initable_iface_init (GInitableIface *initable_iface, +- gpointer iface_data); +-static void async_initable_iface_init (GAsyncInitableIface *async_initable_iface, +- gpointer iface_data); ++static void dbus_interface_iface_init (GDBusInterfaceIface *dbus_interface_iface); ++static void initable_iface_init (GInitableIface *initable_iface); ++static void async_initable_iface_init (GAsyncInitableIface *async_initable_iface); + + G_DEFINE_TYPE_WITH_CODE (GDBusProxy, g_dbus_proxy, G_TYPE_OBJECT, + G_ADD_PRIVATE (GDBusProxy) +@@ -1882,8 +1879,7 @@ static void + } + + static void +-async_initable_iface_init (GAsyncInitableIface *async_initable_iface, +- gpointer iface_data) ++async_initable_iface_init (GAsyncInitableIface *async_initable_iface) + { + async_initable_iface->init_async = async_initable_init_async; + async_initable_iface->init_finish = async_initable_init_finish; +@@ -1970,8 +1966,7 @@ static void + } + + static void +-initable_iface_init (GInitableIface *initable_iface, +- gpointer iface_data) ++initable_iface_init (GInitableIface *initable_iface) + { + initable_iface->init = initable_init; + } +@@ -3211,8 +3206,7 @@ static void + } + + static void +-dbus_interface_iface_init (GDBusInterfaceIface *dbus_interface_iface, +- gpointer iface_data) ++dbus_interface_iface_init (GDBusInterfaceIface *dbus_interface_iface) + { + dbus_interface_iface->get_info = _g_dbus_proxy_get_info; + dbus_interface_iface->get_object = _g_dbus_proxy_get_object; +Index: glib-2.56.4/gio/gdbusserver.c +=================================================================== +--- glib-2.56.4.orig/gio/gdbusserver.c ++++ glib-2.56.4/gio/gdbusserver.c +@@ -151,8 +151,7 @@ static guint _signals[LAST_SIGNAL] = {0}; + + static guint _signals[LAST_SIGNAL] = {0}; + +-static void initable_iface_init (GInitableIface *initable_iface, +- gpointer iface_data); ++static void initable_iface_init (GInitableIface *initable_iface); + + G_DEFINE_TYPE_WITH_CODE (GDBusServer, g_dbus_server, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, initable_iface_init)) +@@ -1133,8 +1132,7 @@ static void + + + static void +-initable_iface_init (GInitableIface *initable_iface, +- gpointer iface_data) ++initable_iface_init (GInitableIface *initable_iface) + { + initable_iface->init = initable_init; + } +Index: glib-2.56.4/gio/gdesktopappinfo.c +=================================================================== +--- glib-2.56.4.orig/gio/gdesktopappinfo.c ++++ glib-2.56.4/gio/gdesktopappinfo.c +@@ -80,8 +80,7 @@ enum { + PROP_FILENAME + }; + +-static void g_desktop_app_info_iface_init (GAppInfoIface *iface, +- gpointer iface_data); ++static void g_desktop_app_info_iface_init (GAppInfoIface *iface); + static gboolean g_desktop_app_info_ensure_saved (GDesktopAppInfo *info, + GError **error); + +@@ -3777,8 +3776,7 @@ static void + /* GAppInfo interface init */ + + static void +-g_desktop_app_info_iface_init (GAppInfoIface *iface, +- gpointer iface_data) ++g_desktop_app_info_iface_init (GAppInfoIface *iface) + { + iface->dup = g_desktop_app_info_dup; + iface->equal = g_desktop_app_info_equal; +Index: glib-2.56.4/gio/gdummyfile.c +=================================================================== +--- glib-2.56.4.orig/gio/gdummyfile.c ++++ glib-2.56.4/gio/gdummyfile.c +@@ -31,8 +31,7 @@ + #include "gfile.h" + + +-static void g_dummy_file_file_iface_init (GFileIface *iface, +- gpointer iface_data); ++static void g_dummy_file_file_iface_init (GFileIface *iface); + + typedef struct { + char *scheme; +@@ -397,8 +396,7 @@ static void + + + static void +-g_dummy_file_file_iface_init (GFileIface *iface, +- gpointer iface_data) ++g_dummy_file_file_iface_init (GFileIface *iface) + { + iface->dup = g_dummy_file_dup; + iface->hash = g_dummy_file_hash; +Index: glib-2.56.4/gio/gdummyproxyresolver.c +=================================================================== +--- glib-2.56.4.orig/gio/gdummyproxyresolver.c ++++ glib-2.56.4/gio/gdummyproxyresolver.c +@@ -36,8 +36,7 @@ struct _GDummyProxyResolver { + GObject parent_instance; + }; + +-static void g_dummy_proxy_resolver_iface_init (GProxyResolverInterface *iface, +- gpointer iface_data); ++static void g_dummy_proxy_resolver_iface_init (GProxyResolverInterface *iface); + + #define g_dummy_proxy_resolver_get_type _g_dummy_proxy_resolver_get_type + G_DEFINE_TYPE_WITH_CODE (GDummyProxyResolver, g_dummy_proxy_resolver, G_TYPE_OBJECT, +@@ -126,8 +125,7 @@ static void + } + + static void +-g_dummy_proxy_resolver_iface_init (GProxyResolverInterface *iface, +- gpointer iface_data) ++g_dummy_proxy_resolver_iface_init (GProxyResolverInterface *iface) + { + iface->is_supported = g_dummy_proxy_resolver_is_supported; + iface->lookup = g_dummy_proxy_resolver_lookup; +Index: glib-2.56.4/gio/gdummytlsbackend.c +=================================================================== +--- glib-2.56.4.orig/gio/gdummytlsbackend.c ++++ glib-2.56.4/gio/gdummytlsbackend.c +@@ -51,8 +51,7 @@ struct _GDummyTlsBackend { + GTlsDatabase *database; + }; + +-static void g_dummy_tls_backend_iface_init (GTlsBackendInterface *iface, +- gpointer iface_data); ++static void g_dummy_tls_backend_iface_init (GTlsBackendInterface *iface); + + #define g_dummy_tls_backend_get_type _g_dummy_tls_backend_get_type + G_DEFINE_TYPE_WITH_CODE (GDummyTlsBackend, g_dummy_tls_backend, G_TYPE_OBJECT, +@@ -104,8 +103,7 @@ static void + } + + static void +-g_dummy_tls_backend_iface_init (GTlsBackendInterface *iface, +- gpointer iface_data) ++g_dummy_tls_backend_iface_init (GTlsBackendInterface *iface) + { + iface->get_certificate_type = _g_dummy_tls_certificate_get_type; + iface->get_client_connection_type = _g_dummy_tls_connection_get_type; +@@ -140,8 +138,7 @@ enum + PROP_CERT_ISSUER + }; + +-static void g_dummy_tls_certificate_initable_iface_init (GInitableIface *iface, +- gpointer iface_data); ++static void g_dummy_tls_certificate_initable_iface_init (GInitableIface *iface); + + #define g_dummy_tls_certificate_get_type _g_dummy_tls_certificate_get_type + G_DEFINE_TYPE_WITH_CODE (GDummyTlsCertificate, g_dummy_tls_certificate, G_TYPE_TLS_CERTIFICATE, +@@ -200,8 +197,7 @@ static void + } + + static void +-g_dummy_tls_certificate_initable_iface_init (GInitableIface *iface, +- gpointer iface_data) ++g_dummy_tls_certificate_initable_iface_init (GInitableIface *iface) + { + iface->init = g_dummy_tls_certificate_initable_init; + } +@@ -242,8 +238,7 @@ enum + PROP_CONN_AUTHENTICATION_MODE + }; + +-static void g_dummy_tls_connection_initable_iface_init (GInitableIface *iface, +- gpointer iface_data); ++static void g_dummy_tls_connection_initable_iface_init (GInitableIface *iface); + + #define g_dummy_tls_connection_get_type _g_dummy_tls_connection_get_type + G_DEFINE_TYPE_WITH_CODE (GDummyTlsConnection, g_dummy_tls_connection, G_TYPE_TLS_CONNECTION, +@@ -324,8 +319,7 @@ static void + } + + static void +-g_dummy_tls_connection_initable_iface_init (GInitableIface *iface, +- gpointer iface_data) ++g_dummy_tls_connection_initable_iface_init (GInitableIface *iface) + { + iface->init = g_dummy_tls_connection_initable_init; + } +@@ -363,8 +357,7 @@ enum + PROP_DTLS_CONN_AUTHENTICATION_MODE, + }; + +-static void g_dummy_dtls_connection_initable_iface_init (GInitableIface *iface, +- gpointer iface_data); ++static void g_dummy_dtls_connection_initable_iface_init (GInitableIface *iface); + + #define g_dummy_dtls_connection_get_type _g_dummy_dtls_connection_get_type + G_DEFINE_TYPE_WITH_CODE (GDummyDtlsConnection, g_dummy_dtls_connection, G_TYPE_OBJECT, +@@ -428,8 +421,7 @@ static void + } + + static void +-g_dummy_dtls_connection_initable_iface_init (GInitableIface *iface, +- gpointer iface_data) ++g_dummy_dtls_connection_initable_iface_init (GInitableIface *iface) + { + iface->init = g_dummy_dtls_connection_initable_init; + } +@@ -455,10 +447,8 @@ enum + PROP_ANCHORS, + }; + +-static void g_dummy_tls_database_file_database_iface_init (GTlsFileDatabaseInterface *iface, +- gpointer iface_data); +-static void g_dummy_tls_database_initable_iface_init (GInitableIface *iface, +- gpointer iface_data); ++static void g_dummy_tls_database_file_database_iface_init (GTlsFileDatabaseInterface *iface); ++static void g_dummy_tls_database_initable_iface_init (GInitableIface *iface); + + #define g_dummy_tls_database_get_type _g_dummy_tls_database_get_type + G_DEFINE_TYPE_WITH_CODE (GDummyTlsDatabase, g_dummy_tls_database, G_TYPE_TLS_DATABASE, +@@ -506,8 +496,7 @@ static void + } + + static void +-g_dummy_tls_database_file_database_iface_init (GTlsFileDatabaseInterface *iface, +- gpointer iface_data) ++g_dummy_tls_database_file_database_iface_init (GTlsFileDatabaseInterface *iface) + { + } + +@@ -522,8 +511,7 @@ static void + } + + static void +-g_dummy_tls_database_initable_iface_init (GInitableIface *iface, +- gpointer iface_data) ++g_dummy_tls_database_initable_iface_init (GInitableIface *iface) + { + iface->init = g_dummy_tls_database_initable_init; + } +Index: glib-2.56.4/gio/gemblem.c +=================================================================== +--- glib-2.56.4.orig/gio/gemblem.c ++++ glib-2.56.4/gio/gemblem.c +@@ -42,8 +42,7 @@ + * supported. More may be added in the future. + */ + +-static void g_emblem_iface_init (GIconIface *iface, +- gpointer iface_data); ++static void g_emblem_iface_init (GIconIface *iface); + + struct _GEmblem + { +@@ -370,8 +369,7 @@ static void + } + + static void +-g_emblem_iface_init (GIconIface *iface, +- gpointer iface_data) ++g_emblem_iface_init (GIconIface *iface) + { + iface->hash = g_emblem_hash; + iface->equal = g_emblem_equal; +Index: glib-2.56.4/gio/gemblemedicon.c +=================================================================== +--- glib-2.56.4.orig/gio/gemblemedicon.c ++++ glib-2.56.4/gio/gemblemedicon.c +@@ -56,8 +56,7 @@ static GParamSpec *properties[NUM_PROPERTIES] = { NULL + + static GParamSpec *properties[NUM_PROPERTIES] = { NULL, }; + +-static void g_emblemed_icon_icon_iface_init (GIconIface *iface, +- gpointer iface_data); ++static void g_emblemed_icon_icon_iface_init (GIconIface *iface); + + G_DEFINE_TYPE_WITH_CODE (GEmblemedIcon, g_emblemed_icon, G_TYPE_OBJECT, + G_ADD_PRIVATE (GEmblemedIcon) +@@ -458,8 +457,7 @@ static void + } + + static void +-g_emblemed_icon_icon_iface_init (GIconIface *iface, +- gpointer iface_data) ++g_emblemed_icon_icon_iface_init (GIconIface *iface) + { + iface->hash = g_emblemed_icon_hash; + iface->equal = g_emblemed_icon_equal; +Index: glib-2.56.4/gio/gfileicon.c +=================================================================== +--- glib-2.56.4.orig/gio/gfileicon.c ++++ glib-2.56.4/gio/gfileicon.c +@@ -41,10 +41,8 @@ + * + **/ + +-static void g_file_icon_icon_iface_init (GIconIface *iface, +- gpointer iface_data); +-static void g_file_icon_loadable_icon_iface_init (GLoadableIconIface *iface, +- gpointer iface_data); ++static void g_file_icon_icon_iface_init (GIconIface *iface); ++static void g_file_icon_loadable_icon_iface_init (GLoadableIconIface *iface); + static void g_file_icon_load_async (GLoadableIcon *icon, + int size, + GCancellable *cancellable, +@@ -266,8 +264,7 @@ static void + } + + static void +-g_file_icon_icon_iface_init (GIconIface *iface, +- gpointer iface_data) ++g_file_icon_icon_iface_init (GIconIface *iface) + { + iface->hash = g_file_icon_hash; + iface->equal = g_file_icon_equal; +@@ -347,8 +344,7 @@ static void + } + + static void +-g_file_icon_loadable_icon_iface_init (GLoadableIconIface *iface, +- gpointer iface_data) ++g_file_icon_loadable_icon_iface_init (GLoadableIconIface *iface) + { + iface->load = g_file_icon_load; + iface->load_async = g_file_icon_load_async; +Index: glib-2.56.4/gio/gfileinputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gfileinputstream.c ++++ glib-2.56.4/gio/gfileinputstream.c +@@ -47,8 +47,7 @@ + * To position a file input stream, use g_seekable_seek(). + **/ + +-static void g_file_input_stream_seekable_iface_init (GSeekableIface *iface, +- gpointer iface_data); ++static void g_file_input_stream_seekable_iface_init (GSeekableIface *iface); + static goffset g_file_input_stream_seekable_tell (GSeekable *seekable); + static gboolean g_file_input_stream_seekable_can_seek (GSeekable *seekable); + static gboolean g_file_input_stream_seekable_seek (GSeekable *seekable, +@@ -89,8 +88,7 @@ static void + } + + static void +-g_file_input_stream_seekable_iface_init (GSeekableIface *iface, +- gpointer iface_data) ++g_file_input_stream_seekable_iface_init (GSeekableIface *iface) + { + iface->tell = g_file_input_stream_seekable_tell; + iface->can_seek = g_file_input_stream_seekable_can_seek; +Index: glib-2.56.4/gio/gfileiostream.c +=================================================================== +--- glib-2.56.4.orig/gio/gfileiostream.c ++++ glib-2.56.4/gio/gfileiostream.c +@@ -60,8 +60,7 @@ + * Since: 2.22 + **/ + +-static void g_file_io_stream_seekable_iface_init (GSeekableIface *iface, +- gpointer iface_data); ++static void g_file_io_stream_seekable_iface_init (GSeekableIface *iface); + static goffset g_file_io_stream_seekable_tell (GSeekable *seekable); + static gboolean g_file_io_stream_seekable_can_seek (GSeekable *seekable); + static gboolean g_file_io_stream_seekable_seek (GSeekable *seekable, +@@ -94,8 +93,7 @@ static void + g_file_io_stream_seekable_iface_init)) + + static void +-g_file_io_stream_seekable_iface_init (GSeekableIface *iface, +- gpointer iface_data) ++g_file_io_stream_seekable_iface_init (GSeekableIface *iface) + { + iface->tell = g_file_io_stream_seekable_tell; + iface->can_seek = g_file_io_stream_seekable_can_seek; +Index: glib-2.56.4/gio/gfileoutputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gfileoutputstream.c ++++ glib-2.56.4/gio/gfileoutputstream.c +@@ -52,8 +52,7 @@ + * stream, use g_seekable_truncate(). + **/ + +-static void g_file_output_stream_seekable_iface_init (GSeekableIface *iface, +- gpointer iface_data); ++static void g_file_output_stream_seekable_iface_init (GSeekableIface *iface); + static goffset g_file_output_stream_seekable_tell (GSeekable *seekable); + static gboolean g_file_output_stream_seekable_can_seek (GSeekable *seekable); + static gboolean g_file_output_stream_seekable_seek (GSeekable *seekable, +@@ -93,8 +92,7 @@ static void + } + + static void +-g_file_output_stream_seekable_iface_init (GSeekableIface *iface, +- gpointer iface_data) ++g_file_output_stream_seekable_iface_init (GSeekableIface *iface) + { + iface->tell = g_file_output_stream_seekable_tell; + iface->can_seek = g_file_output_stream_seekable_can_seek; +Index: glib-2.56.4/gio/ghttpproxy.c +=================================================================== +--- glib-2.56.4.orig/gio/ghttpproxy.c ++++ glib-2.56.4/gio/ghttpproxy.c +@@ -51,8 +51,7 @@ struct _GHttpProxyClass + GObjectClass parent_class; + }; + +-static void g_http_proxy_iface_init (GProxyInterface *proxy_iface, +- gpointer iface_data); ++static void g_http_proxy_iface_init (GProxyInterface *proxy_iface); + + #define g_http_proxy_get_type _g_http_proxy_get_type + G_DEFINE_TYPE_WITH_CODE (GHttpProxy, g_http_proxy, G_TYPE_OBJECT, +@@ -364,8 +363,7 @@ static void + } + + static void +-g_http_proxy_iface_init (GProxyInterface *proxy_iface, +- gpointer iface_data) ++g_http_proxy_iface_init (GProxyInterface *proxy_iface) + { + proxy_iface->connect = g_http_proxy_connect; + proxy_iface->connect_async = g_http_proxy_connect_async; +Index: glib-2.56.4/gio/ginetaddressmask.c +=================================================================== +--- glib-2.56.4.orig/gio/ginetaddressmask.c ++++ glib-2.56.4/gio/ginetaddressmask.c +@@ -54,8 +54,7 @@ struct _GInetAddressMaskPrivate + guint length; + }; + +-static void g_inet_address_mask_initable_iface_init (GInitableIface *iface, +- gpointer iface_data); ++static void g_inet_address_mask_initable_iface_init (GInitableIface *iface); + + G_DEFINE_TYPE_WITH_CODE (GInetAddressMask, g_inet_address_mask, G_TYPE_OBJECT, + G_ADD_PRIVATE (GInetAddressMask) +@@ -229,8 +228,7 @@ static void + } + + static void +-g_inet_address_mask_initable_iface_init (GInitableIface *iface, +- gpointer iface_data) ++g_inet_address_mask_initable_iface_init (GInitableIface *iface) + { + iface->init = g_inet_address_mask_initable_init; + } +Index: glib-2.56.4/gio/ginetsocketaddress.c +=================================================================== +--- glib-2.56.4.orig/gio/ginetsocketaddress.c ++++ glib-2.56.4/gio/ginetsocketaddress.c +@@ -55,8 +55,7 @@ struct _GInetSocketAddressPrivate + guint32 scope_id; + }; + +-static void g_inet_socket_address_connectable_iface_init (GSocketConnectableIface *iface, +- gpointer iface_data); ++static void g_inet_socket_address_connectable_iface_init (GSocketConnectableIface *iface); + static gchar *g_inet_socket_address_connectable_to_string (GSocketConnectable *connectable); + + G_DEFINE_TYPE_WITH_CODE (GInetSocketAddress, g_inet_socket_address, G_TYPE_SOCKET_ADDRESS, +@@ -310,8 +309,7 @@ static void + } + + static void +-g_inet_socket_address_connectable_iface_init (GSocketConnectableIface *iface, +- gpointer iface_data) ++g_inet_socket_address_connectable_iface_init (GSocketConnectableIface *iface) + { + GSocketConnectableIface *parent_iface = g_type_interface_peek_parent (iface); + +Index: glib-2.56.4/gio/gliststore.c +=================================================================== +--- glib-2.56.4.orig/gio/gliststore.c ++++ glib-2.56.4/gio/gliststore.c +@@ -64,8 +64,7 @@ enum + N_PROPERTIES + }; + +-static void g_list_store_iface_init (GListModelInterface *iface, +- gpointer iface_data); ++static void g_list_store_iface_init (GListModelInterface *iface); + + G_DEFINE_TYPE_WITH_CODE (GListStore, g_list_store, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, g_list_store_iface_init)); +@@ -205,8 +204,7 @@ static void + } + + static void +-g_list_store_iface_init (GListModelInterface *iface, +- gpointer iface_data) ++g_list_store_iface_init (GListModelInterface *iface) + { + iface->get_item_type = g_list_store_get_item_type; + iface->get_n_items = g_list_store_get_n_items; +Index: glib-2.56.4/gio/glocalfile.c +=================================================================== +--- glib-2.56.4.orig/gio/glocalfile.c ++++ glib-2.56.4/gio/glocalfile.c +@@ -92,8 +92,7 @@ + #endif + + +-static void g_local_file_file_iface_init (GFileIface *iface, +- gpointer iface_data); ++static void g_local_file_file_iface_init (GFileIface *iface); + + static GFileAttributeInfoList *local_writable_attributes = NULL; + static /* GFileAttributeInfoList * */ gsize local_writable_namespaces = 0; +@@ -2942,8 +2941,7 @@ static void + } + + static void +-g_local_file_file_iface_init (GFileIface *iface, +- gpointer iface_data) ++g_local_file_file_iface_init (GFileIface *iface) + { + iface->dup = g_local_file_dup; + iface->hash = g_local_file_hash; +Index: glib-2.56.4/gio/glocalfileinputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/glocalfileinputstream.c ++++ glib-2.56.4/gio/glocalfileinputstream.c +@@ -49,8 +49,7 @@ struct _GLocalFileInputStreamPrivate { + }; + + #ifdef G_OS_UNIX +-static void g_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, +- gpointer iface_data); ++static void g_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface); + #endif + + #define g_local_file_input_stream_get_type _g_local_file_input_stream_get_type +@@ -115,8 +114,7 @@ static void + + #ifdef G_OS_UNIX + static void +-g_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, +- gpointer iface_data) ++g_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface) + { + iface->get_fd = g_local_file_input_stream_get_fd; + } +Index: glib-2.56.4/gio/glocalfileoutputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/glocalfileoutputstream.c ++++ glib-2.56.4/gio/glocalfileoutputstream.c +@@ -67,8 +67,7 @@ struct _GLocalFileOutputStreamPrivate { + }; + + #ifdef G_OS_UNIX +-static void g_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, +- gpointer iface_data); ++static void g_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface); + #endif + + #define g_local_file_output_stream_get_type _g_local_file_output_stream_get_type +@@ -155,8 +154,7 @@ static void + + #ifdef G_OS_UNIX + static void +-g_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, +- gpointer iface_data) ++g_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface) + { + iface->get_fd = g_local_file_output_stream_get_fd; + } +Index: glib-2.56.4/gio/gmemoryinputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gmemoryinputstream.c ++++ glib-2.56.4/gio/gmemoryinputstream.c +@@ -78,8 +78,7 @@ static gboolean g_memory_input_stream_close_finish (GI + GAsyncResult *result, + GError **error); + +-static void g_memory_input_stream_seekable_iface_init (GSeekableIface *iface, +- gpointer iface_data); ++static void g_memory_input_stream_seekable_iface_init (GSeekableIface *iface); + static goffset g_memory_input_stream_tell (GSeekable *seekable); + static gboolean g_memory_input_stream_can_seek (GSeekable *seekable); + static gboolean g_memory_input_stream_seek (GSeekable *seekable, +@@ -93,8 +92,7 @@ static gboolean g_memory_input_stream_truncate + GCancellable *cancellable, + GError **error); + +-static void g_memory_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface, +- gpointer iface_data); ++static void g_memory_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface); + static gboolean g_memory_input_stream_is_readable (GPollableInputStream *stream); + static GSource *g_memory_input_stream_create_source (GPollableInputStream *stream, + GCancellable *cancellable); +@@ -145,8 +143,7 @@ static void + } + + static void +-g_memory_input_stream_seekable_iface_init (GSeekableIface *iface, +- gpointer iface_data) ++g_memory_input_stream_seekable_iface_init (GSeekableIface *iface) + { + iface->tell = g_memory_input_stream_tell; + iface->can_seek = g_memory_input_stream_can_seek; +@@ -156,8 +153,7 @@ static void + } + + static void +-g_memory_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface, +- gpointer iface_data) ++g_memory_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface) + { + iface->is_readable = g_memory_input_stream_is_readable; + iface->create_source = g_memory_input_stream_create_source; +Index: glib-2.56.4/gio/gmemoryoutputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gmemoryoutputstream.c ++++ glib-2.56.4/gio/gmemoryoutputstream.c +@@ -96,8 +96,7 @@ static gboolean g_memory_output_stream_close_finish (G + GAsyncResult *result, + GError **error); + +-static void g_memory_output_stream_seekable_iface_init (GSeekableIface *iface, +- gpointer iface_data); ++static void g_memory_output_stream_seekable_iface_init (GSeekableIface *iface); + static goffset g_memory_output_stream_tell (GSeekable *seekable); + static gboolean g_memory_output_stream_can_seek (GSeekable *seekable); + static gboolean g_memory_output_stream_seek (GSeekable *seekable, +@@ -115,8 +114,7 @@ static GSource *g_memory_output_stream_create_source + static GSource *g_memory_output_stream_create_source (GPollableOutputStream *stream, + GCancellable *cancellable); + +-static void g_memory_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface, +- gpointer iface_data); ++static void g_memory_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface); + + G_DEFINE_TYPE_WITH_CODE (GMemoryOutputStream, g_memory_output_stream, G_TYPE_OUTPUT_STREAM, + G_ADD_PRIVATE (GMemoryOutputStream) +@@ -223,8 +221,7 @@ static void + } + + static void +-g_memory_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface, +- gpointer iface_data) ++g_memory_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface) + { + iface->is_writable = g_memory_output_stream_is_writable; + iface->create_source = g_memory_output_stream_create_source; +@@ -313,8 +310,7 @@ static void + } + + static void +-g_memory_output_stream_seekable_iface_init (GSeekableIface *iface, +- gpointer iface_data) ++g_memory_output_stream_seekable_iface_init (GSeekableIface *iface) + { + iface->tell = g_memory_output_stream_tell; + iface->can_seek = g_memory_output_stream_can_seek; +Index: glib-2.56.4/gio/gnetworkaddress.c +=================================================================== +--- glib-2.56.4.orig/gio/gnetworkaddress.c ++++ glib-2.56.4/gio/gnetworkaddress.c +@@ -83,8 +83,7 @@ static void g_network_address_get_property (GObject + GValue *value, + GParamSpec *pspec); + +-static void g_network_address_connectable_iface_init (GSocketConnectableIface *iface, +- gpointer iface_data); ++static void g_network_address_connectable_iface_init (GSocketConnectableIface *iface); + static GSocketAddressEnumerator *g_network_address_connectable_enumerate (GSocketConnectable *connectable); + static GSocketAddressEnumerator *g_network_address_connectable_proxy_enumerate (GSocketConnectable *connectable); + static gchar *g_network_address_connectable_to_string (GSocketConnectable *connectable); +@@ -143,8 +142,7 @@ static void + } + + static void +-g_network_address_connectable_iface_init (GSocketConnectableIface *connectable_iface, +- gpointer iface_data) ++g_network_address_connectable_iface_init (GSocketConnectableIface *connectable_iface) + { + connectable_iface->enumerate = g_network_address_connectable_enumerate; + connectable_iface->proxy_enumerate = g_network_address_connectable_proxy_enumerate; +Index: glib-2.56.4/gio/gnetworkmonitorbase.c +=================================================================== +--- glib-2.56.4.orig/gio/gnetworkmonitorbase.c ++++ glib-2.56.4/gio/gnetworkmonitorbase.c +@@ -31,10 +31,8 @@ + #include "gtask.h" + #include "glibintl.h" + +-static void g_network_monitor_base_iface_init (GNetworkMonitorInterface *iface, +- gpointer iface_data); +-static void g_network_monitor_base_initable_iface_init (GInitableIface *iface, +- gpointer iface_data); ++static void g_network_monitor_base_iface_init (GNetworkMonitorInterface *iface); ++static void g_network_monitor_base_initable_iface_init (GInitableIface *iface); + + enum + { +@@ -336,8 +334,7 @@ static void + } + + static void +-g_network_monitor_base_iface_init (GNetworkMonitorInterface *monitor_iface, +- gpointer iface_data) ++g_network_monitor_base_iface_init (GNetworkMonitorInterface *monitor_iface) + { + monitor_iface->can_reach = g_network_monitor_base_can_reach; + monitor_iface->can_reach_async = g_network_monitor_base_can_reach_async; +@@ -359,8 +356,7 @@ static void + } + + static void +-g_network_monitor_base_initable_iface_init (GInitableIface *iface, +- gpointer iface_data) ++g_network_monitor_base_initable_iface_init (GInitableIface *iface) + { + iface->init = g_network_monitor_base_initable_init; + } +Index: glib-2.56.4/gio/gnetworkmonitornetlink.c +=================================================================== +--- glib-2.56.4.orig/gio/gnetworkmonitornetlink.c ++++ glib-2.56.4/gio/gnetworkmonitornetlink.c +@@ -40,10 +40,8 @@ static GInitableIface *initable_parent_iface; + #include + + static GInitableIface *initable_parent_iface; +-static void g_network_monitor_netlink_iface_init (GNetworkMonitorInterface *iface, +- gpointer iface_data); +-static void g_network_monitor_netlink_initable_iface_init (GInitableIface *iface, +- gpointer iface_data); ++static void g_network_monitor_netlink_iface_init (GNetworkMonitorInterface *iface); ++static void g_network_monitor_netlink_initable_iface_init (GInitableIface *iface); + + struct _GNetworkMonitorNetlinkPrivate + { +@@ -470,14 +468,12 @@ static void + } + + static void +-g_network_monitor_netlink_iface_init (GNetworkMonitorInterface *monitor_iface, +- gpointer iface_data) ++g_network_monitor_netlink_iface_init (GNetworkMonitorInterface *monitor_iface) + { + } + + static void +-g_network_monitor_netlink_initable_iface_init (GInitableIface *iface, +- gpointer iface_data) ++g_network_monitor_netlink_initable_iface_init (GInitableIface *iface) + { + initable_parent_iface = g_type_interface_peek_parent (iface); + +Index: glib-2.56.4/gio/gnetworkmonitornm.c +=================================================================== +--- glib-2.56.4.orig/gio/gnetworkmonitornm.c ++++ glib-2.56.4/gio/gnetworkmonitornm.c +@@ -32,10 +32,8 @@ + #include "gnetworkmonitor.h" + #include "gdbusproxy.h" + +-static void g_network_monitor_nm_iface_init (GNetworkMonitorInterface *iface, +- gpointer iface_data); +-static void g_network_monitor_nm_initable_iface_init (GInitableIface *iface, +- gpointer iface_data); ++static void g_network_monitor_nm_iface_init (GNetworkMonitorInterface *iface); ++static void g_network_monitor_nm_initable_iface_init (GInitableIface *iface); + + enum + { +@@ -358,14 +356,12 @@ static void + } + + static void +-g_network_monitor_nm_iface_init (GNetworkMonitorInterface *monitor_iface, +- gpointer iface_data) ++g_network_monitor_nm_iface_init (GNetworkMonitorInterface *monitor_iface) + { + } + + static void +-g_network_monitor_nm_initable_iface_init (GInitableIface *iface, +- gpointer iface_data) ++g_network_monitor_nm_initable_iface_init (GInitableIface *iface) + { + iface->init = g_network_monitor_nm_initable_init; + } +Index: glib-2.56.4/gio/gnetworkmonitorportal.c +=================================================================== +--- glib-2.56.4.orig/gio/gnetworkmonitorportal.c ++++ glib-2.56.4/gio/gnetworkmonitorportal.c +@@ -25,10 +25,8 @@ static GInitableIface *initable_parent_iface; + #include "gportalsupport.h" + + static GInitableIface *initable_parent_iface; +-static void g_network_monitor_portal_iface_init (GNetworkMonitorInterface *iface, +- gpointer iface_data); +-static void g_network_monitor_portal_initable_iface_init (GInitableIface *iface, +- gpointer iface_data); ++static void g_network_monitor_portal_iface_init (GNetworkMonitorInterface *iface); ++static void g_network_monitor_portal_initable_iface_init (GInitableIface *iface); + + enum + { +@@ -368,14 +366,12 @@ static void + } + + static void +-g_network_monitor_portal_iface_init (GNetworkMonitorInterface *monitor_iface, +- gpointer iface_data) ++g_network_monitor_portal_iface_init (GNetworkMonitorInterface *monitor_iface) + { + } + + static void +-g_network_monitor_portal_initable_iface_init (GInitableIface *iface, +- gpointer iface_data) ++g_network_monitor_portal_initable_iface_init (GInitableIface *iface) + { + initable_parent_iface = g_type_interface_peek_parent (iface); + +Index: glib-2.56.4/gio/gnetworkservice.c +=================================================================== +--- glib-2.56.4.orig/gio/gnetworkservice.c ++++ glib-2.56.4/gio/gnetworkservice.c +@@ -86,8 +86,7 @@ static void g_network_service_get_property (GObject + GValue *value, + GParamSpec *pspec); + +-static void g_network_service_connectable_iface_init (GSocketConnectableIface *iface, +- gpointer iface_data); ++static void g_network_service_connectable_iface_init (GSocketConnectableIface *iface); + static GSocketAddressEnumerator *g_network_service_connectable_enumerate (GSocketConnectable *connectable); + static GSocketAddressEnumerator *g_network_service_connectable_proxy_enumerate (GSocketConnectable *connectable); + static gchar *g_network_service_connectable_to_string (GSocketConnectable *connectable); +@@ -157,8 +156,7 @@ static void + } + + static void +-g_network_service_connectable_iface_init (GSocketConnectableIface *connectable_iface, +- gpointer iface_data) ++g_network_service_connectable_iface_init (GSocketConnectableIface *connectable_iface) + { + connectable_iface->enumerate = g_network_service_connectable_enumerate; + connectable_iface->proxy_enumerate = g_network_service_connectable_proxy_enumerate; +Index: glib-2.56.4/gio/gpropertyaction.c +=================================================================== +--- glib-2.56.4.orig/gio/gpropertyaction.c ++++ glib-2.56.4/gio/gpropertyaction.c +@@ -106,8 +106,7 @@ typedef GObjectClass GPropertyActionClass; + + typedef GObjectClass GPropertyActionClass; + +-static void g_property_action_iface_init (GActionInterface *iface, +- gpointer iface_data); ++static void g_property_action_iface_init (GActionInterface *iface); + G_DEFINE_TYPE_WITH_CODE (GPropertyAction, g_property_action, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (G_TYPE_ACTION, g_property_action_iface_init)) + +@@ -402,8 +401,7 @@ void + } + + void +-g_property_action_iface_init (GActionInterface *iface, +- gpointer iface_data) ++g_property_action_iface_init (GActionInterface *iface) + { + iface->get_name = g_property_action_get_name; + iface->get_parameter_type = g_property_action_get_parameter_type; +Index: glib-2.56.4/gio/gproxyresolverportal.c +=================================================================== +--- glib-2.56.4.orig/gio/gproxyresolverportal.c ++++ glib-2.56.4/gio/gproxyresolverportal.c +@@ -31,8 +31,7 @@ struct _GProxyResolverPortal { + gboolean network_available; + }; + +-static void g_proxy_resolver_portal_iface_init (GProxyResolverInterface *iface, +- gpointer iface_data); ++static void g_proxy_resolver_portal_iface_init (GProxyResolverInterface *iface); + + G_DEFINE_TYPE_WITH_CODE (GProxyResolverPortal, g_proxy_resolver_portal, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (G_TYPE_PROXY_RESOLVER, +@@ -200,8 +199,7 @@ static void + } + + static void +-g_proxy_resolver_portal_iface_init (GProxyResolverInterface *iface, +- gpointer iface_data) ++g_proxy_resolver_portal_iface_init (GProxyResolverInterface *iface) + { + iface->is_supported = g_proxy_resolver_portal_is_supported; + iface->lookup = g_proxy_resolver_portal_lookup; +Index: glib-2.56.4/gio/gresourcefile.c +=================================================================== +--- glib-2.56.4.orig/gio/gresourcefile.c ++++ glib-2.56.4/gio/gresourcefile.c +@@ -66,8 +66,7 @@ typedef struct _GResourceFileEnumeratorClass GResour + typedef struct _GResourceFileEnumerator GResourceFileEnumerator; + typedef struct _GResourceFileEnumeratorClass GResourceFileEnumeratorClass; + +-static void g_resource_file_file_iface_init (GFileIface *iface, +- gpointer iface_data); ++static void g_resource_file_file_iface_init (GFileIface *iface); + + static GFileAttributeInfoList *resource_writable_attributes = NULL; + static GFileAttributeInfoList *resource_writable_namespaces = NULL; +@@ -646,8 +645,7 @@ static void + } + + static void +-g_resource_file_file_iface_init (GFileIface *iface, +- gpointer iface_data) ++g_resource_file_file_iface_init (GFileIface *iface) + { + iface->dup = g_resource_file_dup; + iface->hash = g_resource_file_hash; +Index: glib-2.56.4/gio/gsettings.c +=================================================================== +--- glib-2.56.4.orig/gio/gsettings.c ++++ glib-2.56.4/gio/gsettings.c +@@ -3124,8 +3124,7 @@ static GType g_settings_action_get_type (void); + typedef GObjectClass GSettingsActionClass; + + static GType g_settings_action_get_type (void); +-static void g_settings_action_iface_init (GActionInterface *iface, +- gpointer iface_data); ++static void g_settings_action_iface_init (GActionInterface *iface); + G_DEFINE_TYPE_WITH_CODE (GSettingsAction, g_settings_action, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (G_TYPE_ACTION, g_settings_action_iface_init)) + +@@ -3285,8 +3284,7 @@ static void + } + + static void +-g_settings_action_iface_init (GActionInterface *iface, +- gpointer iface_data) ++g_settings_action_iface_init (GActionInterface *iface) + { + iface->get_name = g_settings_action_get_name; + iface->get_parameter_type = g_settings_action_get_parameter_type; +Index: glib-2.56.4/gio/gsimpleaction.c +=================================================================== +--- glib-2.56.4.orig/gio/gsimpleaction.c ++++ glib-2.56.4/gio/gsimpleaction.c +@@ -58,8 +58,7 @@ typedef GObjectClass GSimpleActionClass; + + typedef GObjectClass GSimpleActionClass; + +-static void g_simple_action_iface_init (GActionInterface *iface, +- gpointer iface_data); ++static void g_simple_action_iface_init (GActionInterface *iface); + G_DEFINE_TYPE_WITH_CODE (GSimpleAction, g_simple_action, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (G_TYPE_ACTION, g_simple_action_iface_init)) + +@@ -348,8 +347,7 @@ void + } + + void +-g_simple_action_iface_init (GActionInterface *iface, +- gpointer iface_data) ++g_simple_action_iface_init (GActionInterface *iface) + { + iface->get_name = g_simple_action_get_name; + iface->get_parameter_type = g_simple_action_get_parameter_type; +Index: glib-2.56.4/gio/gsimpleactiongroup.c +=================================================================== +--- glib-2.56.4.orig/gio/gsimpleactiongroup.c ++++ glib-2.56.4/gio/gsimpleactiongroup.c +@@ -40,10 +40,8 @@ struct _GSimpleActionGroupPrivate + GHashTable *table; /* string -> GAction */ + }; + +-static void g_simple_action_group_iface_init (GActionGroupInterface *iface, +- gpointer iface_data); +-static void g_simple_action_group_map_iface_init (GActionMapInterface *iface, +- gpointer iface_data); ++static void g_simple_action_group_iface_init (GActionGroupInterface *); ++static void g_simple_action_group_map_iface_init (GActionMapInterface *); + G_DEFINE_TYPE_WITH_CODE (GSimpleActionGroup, + g_simple_action_group, G_TYPE_OBJECT, + G_ADD_PRIVATE (GSimpleActionGroup) +@@ -274,8 +272,7 @@ static void + } + + static void +-g_simple_action_group_iface_init (GActionGroupInterface *iface, +- gpointer iface_data) ++g_simple_action_group_iface_init (GActionGroupInterface *iface) + { + iface->list_actions = g_simple_action_group_list_actions; + iface->query_action = g_simple_action_group_query_action; +@@ -284,8 +281,7 @@ static void + } + + static void +-g_simple_action_group_map_iface_init (GActionMapInterface *iface, +- gpointer iface_data) ++g_simple_action_group_map_iface_init (GActionMapInterface *iface) + { + iface->add_action = g_simple_action_group_add_action; + iface->remove_action = g_simple_action_group_remove_action; +Index: glib-2.56.4/gio/gsimpleasyncresult.c +=================================================================== +--- glib-2.56.4.orig/gio/gsimpleasyncresult.c ++++ glib-2.56.4/gio/gsimpleasyncresult.c +@@ -205,8 +205,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS + + G_GNUC_BEGIN_IGNORE_DEPRECATIONS + +-static void g_simple_async_result_async_result_iface_init (GAsyncResultIface *iface, +- gpointer iface_data); ++static void g_simple_async_result_async_result_iface_init (GAsyncResultIface *iface); + + struct _GSimpleAsyncResult + { +@@ -465,8 +464,7 @@ static void + } + + static void +-g_simple_async_result_async_result_iface_init (GAsyncResultIface *iface, +- gpointer iface_data) ++g_simple_async_result_async_result_iface_init (GAsyncResultIface *iface) + { + iface->get_user_data = g_simple_async_result_get_user_data; + iface->get_source_object = g_simple_async_result_get_source_object; +Index: glib-2.56.4/gio/gsimpleproxyresolver.c +=================================================================== +--- glib-2.56.4.orig/gio/gsimpleproxyresolver.c ++++ glib-2.56.4/gio/gsimpleproxyresolver.c +@@ -62,8 +62,7 @@ struct _GSimpleProxyResolverPrivate { + GSimpleProxyResolverDomain *ignore_domains; + }; + +-static void g_simple_proxy_resolver_iface_init (GProxyResolverInterface *iface, +- gpointer iface_data); ++static void g_simple_proxy_resolver_iface_init (GProxyResolverInterface *iface); + + G_DEFINE_TYPE_WITH_CODE (GSimpleProxyResolver, g_simple_proxy_resolver, G_TYPE_OBJECT, + G_ADD_PRIVATE (GSimpleProxyResolver) +@@ -478,8 +477,7 @@ static void + } + + static void +-g_simple_proxy_resolver_iface_init (GProxyResolverInterface *iface, +- gpointer iface_data) ++g_simple_proxy_resolver_iface_init (GProxyResolverInterface *iface) + { + iface->lookup = g_simple_proxy_resolver_lookup; + iface->lookup_async = g_simple_proxy_resolver_lookup_async; +Index: glib-2.56.4/gio/gsocket.c +=================================================================== +--- glib-2.56.4.orig/gio/gsocket.c ++++ glib-2.56.4/gio/gsocket.c +@@ -141,14 +141,12 @@ + * Since: 2.22 + */ + +-static void g_socket_initable_iface_init (GInitableIface *iface, +- gpointer iface_data); ++static void g_socket_initable_iface_init (GInitableIface *iface); + static gboolean g_socket_initable_init (GInitable *initable, + GCancellable *cancellable, + GError **error); + +-static void g_socket_datagram_based_iface_init (GDatagramBasedInterface *iface, +- gpointer iface_data); ++static void g_socket_datagram_based_iface_init (GDatagramBasedInterface *iface); + static gint g_socket_datagram_based_receive_messages (GDatagramBased *self, + GInputMessage *messages, + guint num_messages, +@@ -1058,15 +1056,13 @@ static void + } + + static void +-g_socket_initable_iface_init (GInitableIface *iface, +- gpointer iface_data) ++g_socket_initable_iface_init (GInitableIface *iface) + { + iface->init = g_socket_initable_init; + } + + static void +-g_socket_datagram_based_iface_init (GDatagramBasedInterface *iface, +- gpointer iface_data) ++g_socket_datagram_based_iface_init (GDatagramBasedInterface *iface) + { + iface->receive_messages = g_socket_datagram_based_receive_messages; + iface->send_messages = g_socket_datagram_based_send_messages; +Index: glib-2.56.4/gio/gsocketaddress.c +=================================================================== +--- glib-2.56.4.orig/gio/gsocketaddress.c ++++ glib-2.56.4/gio/gsocketaddress.c +@@ -64,8 +64,7 @@ enum + PROP_FAMILY + }; + +-static void g_socket_address_connectable_iface_init (GSocketConnectableIface *iface, +- gpointer iface_data); ++static void g_socket_address_connectable_iface_init (GSocketConnectableIface *iface); + static GSocketAddressEnumerator *g_socket_address_connectable_enumerate (GSocketConnectable *connectable); + static GSocketAddressEnumerator *g_socket_address_connectable_proxy_enumerate (GSocketConnectable *connectable); + +@@ -126,8 +125,7 @@ static void + } + + static void +-g_socket_address_connectable_iface_init (GSocketConnectableIface *connectable_iface, +- gpointer iface_data) ++g_socket_address_connectable_iface_init (GSocketConnectableIface *connectable_iface) + { + connectable_iface->enumerate = g_socket_address_connectable_enumerate; + connectable_iface->proxy_enumerate = g_socket_address_connectable_proxy_enumerate; +Index: glib-2.56.4/gio/gsocketinputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gsocketinputstream.c ++++ glib-2.56.4/gio/gsocketinputstream.c +@@ -39,11 +39,9 @@ struct _GSocketInputStreamPrivate + gsize count; + }; + +-static void g_socket_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface, +- gpointer iface_data); ++static void g_socket_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface); + #ifdef G_OS_UNIX +-static void g_socket_input_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, +- gpointer iface_data); ++static void g_socket_input_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface); + #endif + + #define g_socket_input_stream_get_type _g_socket_input_stream_get_type +@@ -200,16 +198,14 @@ static void + + #ifdef G_OS_UNIX + static void +-g_socket_input_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, +- gpointer iface_data) ++g_socket_input_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface) + { + iface->get_fd = g_socket_input_stream_get_fd; + } + #endif + + static void +-g_socket_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface, +- gpointer iface_data) ++g_socket_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface) + { + iface->is_readable = g_socket_input_stream_pollable_is_readable; + iface->create_source = g_socket_input_stream_pollable_create_source; +Index: glib-2.56.4/gio/gsocketoutputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gsocketoutputstream.c ++++ glib-2.56.4/gio/gsocketoutputstream.c +@@ -43,11 +43,9 @@ struct _GSocketOutputStreamPrivate + gsize count; + }; + +-static void g_socket_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface, +- gpointer iface_data); ++static void g_socket_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface); + #ifdef G_OS_UNIX +-static void g_socket_output_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, +- gpointer iface_data); ++static void g_socket_output_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface); + #endif + + #define g_socket_output_stream_get_type _g_socket_output_stream_get_type +@@ -204,16 +202,14 @@ static void + + #ifdef G_OS_UNIX + static void +-g_socket_output_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, +- gpointer iface_data) ++g_socket_output_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface) + { + iface->get_fd = g_socket_output_stream_get_fd; + } + #endif + + static void +-g_socket_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface, +- gpointer iface_data) ++g_socket_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface) + { + iface->is_writable = g_socket_output_stream_pollable_is_writable; + iface->create_source = g_socket_output_stream_pollable_create_source; +Index: glib-2.56.4/gio/gsocks4aproxy.c +=================================================================== +--- glib-2.56.4.orig/gio/gsocks4aproxy.c ++++ glib-2.56.4/gio/gsocks4aproxy.c +@@ -48,8 +48,7 @@ + #define SOCKS4_REP_NO_IDENT 92 + #define SOCKS4_REP_BAD_IDENT 93 + +-static void g_socks4a_proxy_iface_init (GProxyInterface *proxy_iface, +- gpointer iface_data); ++static void g_socks4a_proxy_iface_init (GProxyInterface *proxy_iface); + + #define g_socks4a_proxy_get_type _g_socks4a_proxy_get_type + G_DEFINE_TYPE_WITH_CODE (GSocks4aProxy, g_socks4a_proxy, G_TYPE_OBJECT, +@@ -450,8 +449,7 @@ static void + } + + static void +-g_socks4a_proxy_iface_init (GProxyInterface *proxy_iface, +- gpointer iface_data) ++g_socks4a_proxy_iface_init (GProxyInterface *proxy_iface) + { + proxy_iface->connect = g_socks4a_proxy_connect; + proxy_iface->connect_async = g_socks4a_proxy_connect_async; +Index: glib-2.56.4/gio/gsocks5proxy.c +=================================================================== +--- glib-2.56.4.orig/gio/gsocks5proxy.c ++++ glib-2.56.4/gio/gsocks5proxy.c +@@ -80,8 +80,7 @@ struct _GSocks5ProxyClass + GObjectClass parent_class; + }; + +-static void g_socks5_proxy_iface_init (GProxyInterface *proxy_iface, +- gpointer iface_data); ++static void g_socks5_proxy_iface_init (GProxyInterface *proxy_iface); + + #define g_socks5_proxy_get_type _g_socks5_proxy_get_type + G_DEFINE_TYPE_WITH_CODE (GSocks5Proxy, g_socks5_proxy, G_TYPE_OBJECT, +@@ -1034,8 +1033,7 @@ static void + } + + static void +-g_socks5_proxy_iface_init (GProxyInterface *proxy_iface, +- gpointer iface_data) ++g_socks5_proxy_iface_init (GProxyInterface *proxy_iface) + { + proxy_iface->connect = g_socks5_proxy_connect; + proxy_iface->connect_async = g_socks5_proxy_connect_async; +Index: glib-2.56.4/gio/gsubprocess.c +=================================================================== +--- glib-2.56.4.orig/gio/gsubprocess.c ++++ glib-2.56.4/gio/gsubprocess.c +@@ -140,8 +140,7 @@ + * via the worker thread so that we don't race with waitpid() and + * accidentally send a signal to an already-reaped child. + */ +-static void initable_iface_init (GInitableIface *initable_iface, +- gpointer iface_data); ++static void initable_iface_init (GInitableIface *initable_iface); + + typedef GObjectClass GSubprocessClass; + +@@ -643,8 +642,7 @@ static void + } + + static void +-initable_iface_init (GInitableIface *initable_iface, +- gpointer iface_data) ++initable_iface_init (GInitableIface *initable_iface) + { + initable_iface->init = initable_init; + } +Index: glib-2.56.4/gio/gtask.c +=================================================================== +--- glib-2.56.4.orig/gio/gtask.c ++++ glib-2.56.4/gio/gtask.c +@@ -589,8 +589,7 @@ typedef enum + PROP_COMPLETED = 1, + } GTaskProperty; + +-static void g_task_async_result_iface_init (GAsyncResultIface *iface, +- gpointer iface_data); ++static void g_task_async_result_iface_init (GAsyncResultIface *iface); + static void g_task_thread_pool_init (void); + + G_DEFINE_TYPE_WITH_CODE (GTask, g_task, G_TYPE_OBJECT, +@@ -2043,8 +2042,7 @@ static void + } + + static void +-g_task_async_result_iface_init (GAsyncResultIface *iface, +- gpointer iface_data) ++g_task_async_result_iface_init (GAsyncResultIface *iface) + { + iface->get_user_data = g_task_get_user_data; + iface->get_source_object = g_task_ref_source_object; +Index: glib-2.56.4/gio/gthemedicon.c +=================================================================== +--- glib-2.56.4.orig/gio/gthemedicon.c ++++ glib-2.56.4/gio/gthemedicon.c +@@ -43,8 +43,7 @@ + * themes that inherit other themes. + **/ + +-static void g_themed_icon_icon_iface_init (GIconIface *iface, +- gpointer iface_data); ++static void g_themed_icon_icon_iface_init (GIconIface *iface); + + struct _GThemedIcon + { +@@ -542,8 +541,7 @@ static void + } + + static void +-g_themed_icon_icon_iface_init (GIconIface *iface, +- gpointer iface_data) ++g_themed_icon_icon_iface_init (GIconIface *iface) + { + iface->hash = g_themed_icon_hash; + iface->equal = g_themed_icon_equal; +Index: glib-2.56.4/gio/gunixinputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gunixinputstream.c ++++ glib-2.56.4/gio/gunixinputstream.c +@@ -67,10 +67,8 @@ struct _GUnixInputStreamPrivate { + guint is_pipe_or_socket : 1; + }; + +-static void g_unix_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface, +- gpointer iface_data); +-static void g_unix_input_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, +- gpointer iface_data); ++static void g_unix_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface); ++static void g_unix_input_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface); + + G_DEFINE_TYPE_WITH_CODE (GUnixInputStream, g_unix_input_stream, G_TYPE_INPUT_STREAM, + G_ADD_PRIVATE (GUnixInputStream) +@@ -171,8 +169,7 @@ static void + } + + static void +-g_unix_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface, +- gpointer iface_data) ++g_unix_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface) + { + iface->can_poll = g_unix_input_stream_pollable_can_poll; + iface->is_readable = g_unix_input_stream_pollable_is_readable; +@@ -180,8 +177,7 @@ static void + } + + static void +-g_unix_input_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, +- gpointer iface_data) ++g_unix_input_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface) + { + iface->get_fd = (int (*) (GFileDescriptorBased *))g_unix_input_stream_get_fd; + } +Index: glib-2.56.4/gio/gunixmount.c +=================================================================== +--- glib-2.56.4.orig/gio/gunixmount.c ++++ glib-2.56.4/gio/gunixmount.c +@@ -61,8 +61,7 @@ struct _GUnixMount { + gboolean can_eject; + }; + +-static void g_unix_mount_mount_iface_init (GMountIface *iface, +- gpointer iface_data); ++static void g_unix_mount_mount_iface_init (GMountIface *iface); + + #define g_unix_mount_get_type _g_unix_mount_get_type + G_DEFINE_TYPE_WITH_CODE (GUnixMount, g_unix_mount, G_TYPE_OBJECT, +@@ -376,8 +375,7 @@ static void + } + + static void +-g_unix_mount_mount_iface_init (GMountIface *iface, +- gpointer iface_data) ++g_unix_mount_mount_iface_init (GMountIface *iface) + { + iface->get_root = g_unix_mount_get_root; + iface->get_name = g_unix_mount_get_name; +Index: glib-2.56.4/gio/gunixoutputstream.c +=================================================================== +--- glib-2.56.4.orig/gio/gunixoutputstream.c ++++ glib-2.56.4/gio/gunixoutputstream.c +@@ -67,10 +67,8 @@ struct _GUnixOutputStreamPrivate { + guint is_pipe_or_socket : 1; + }; + +-static void g_unix_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface, +- gpointer iface_data); +-static void g_unix_output_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, +- gpointer iface_data); ++static void g_unix_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface); ++static void g_unix_output_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface); + + G_DEFINE_TYPE_WITH_CODE (GUnixOutputStream, g_unix_output_stream, G_TYPE_OUTPUT_STREAM, + G_ADD_PRIVATE (GUnixOutputStream) +@@ -156,8 +154,7 @@ static void + } + + static void +-g_unix_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface, +- gpointer iface_data) ++g_unix_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface) + { + iface->can_poll = g_unix_output_stream_pollable_can_poll; + iface->is_writable = g_unix_output_stream_pollable_is_writable; +@@ -165,8 +162,7 @@ static void + } + + static void +-g_unix_output_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface, +- gpointer iface_data) ++g_unix_output_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface) + { + iface->get_fd = (int (*) (GFileDescriptorBased *))g_unix_output_stream_get_fd; + } +Index: glib-2.56.4/gio/gunixsocketaddress.c +=================================================================== +--- glib-2.56.4.orig/gio/gunixsocketaddress.c ++++ glib-2.56.4/gio/gunixsocketaddress.c +@@ -77,8 +77,7 @@ struct _GUnixSocketAddressPrivate + GUnixSocketAddressType address_type; + }; + +-static void g_unix_socket_address_connectable_iface_init (GSocketConnectableIface *iface, +- gpointer iface_data); ++static void g_unix_socket_address_connectable_iface_init (GSocketConnectableIface *iface); + static gchar *g_unix_socket_address_connectable_to_string (GSocketConnectable *connectable); + + G_DEFINE_TYPE_WITH_CODE (GUnixSocketAddress, g_unix_socket_address, G_TYPE_SOCKET_ADDRESS, +@@ -310,8 +309,7 @@ static void + } + + static void +-g_unix_socket_address_connectable_iface_init (GSocketConnectableIface *iface, +- gpointer iface_data) ++g_unix_socket_address_connectable_iface_init (GSocketConnectableIface *iface) + { + GSocketConnectableIface *parent_iface = g_type_interface_peek_parent (iface); + +Index: glib-2.56.4/gio/gunixvolume.c +=================================================================== +--- glib-2.56.4.orig/gio/gunixvolume.c ++++ glib-2.56.4/gio/gunixvolume.c +@@ -59,8 +59,7 @@ struct _GUnixVolume { + GIcon *symbolic_icon; + }; + +-static void g_unix_volume_volume_iface_init (GVolumeIface *iface, +- gpointer iface_data); ++static void g_unix_volume_volume_iface_init (GVolumeIface *iface); + + #define g_unix_volume_get_type _g_unix_volume_get_type + G_DEFINE_TYPE_WITH_CODE (GUnixVolume, g_unix_volume, G_TYPE_OBJECT, +@@ -418,8 +417,7 @@ static void + } + + static void +-g_unix_volume_volume_iface_init (GVolumeIface *iface, +- gpointer iface_data) ++g_unix_volume_volume_iface_init (GVolumeIface *iface) + { + iface->get_name = g_unix_volume_get_name; + iface->get_icon = g_unix_volume_get_icon; +Index: glib-2.56.4/gio/gwin32appinfo.c +=================================================================== +--- glib-2.56.4.orig/gio/gwin32appinfo.c ++++ glib-2.56.4/gio/gwin32appinfo.c +@@ -3435,8 +3435,7 @@ g_win32_appinfo_init (void) + } + + +-static void g_win32_app_info_iface_init (GAppInfoIface *iface, +- gpointer iface_data); ++static void g_win32_app_info_iface_init (GAppInfoIface *iface); + + struct _GWin32AppInfo + { +@@ -4420,8 +4419,7 @@ static void + /* GAppInfo interface init */ + + static void +-g_win32_app_info_iface_init (GAppInfoIface *iface, +- gpointer iface_data) ++g_win32_app_info_iface_init (GAppInfoIface *iface) + { + iface->dup = g_win32_app_info_dup; + iface->equal = g_win32_app_info_equal; +Index: glib-2.56.4/gio/gwin32mount.c +=================================================================== +--- glib-2.56.4.orig/gio/gwin32mount.c ++++ glib-2.56.4/gio/gwin32mount.c +@@ -55,8 +55,7 @@ struct _GWin32Mount { + gboolean can_eject; + }; + +-static void g_win32_mount_mount_iface_init (GMountIface *iface, +- gpointer iface_data) ++static void g_win32_mount_mount_iface_init (GMountIface *iface); + + #define g_win32_mount_get_type _g_win32_mount_get_type + G_DEFINE_TYPE_WITH_CODE (GWin32Mount, g_win32_mount, G_TYPE_OBJECT, +@@ -347,8 +346,7 @@ static void + } + + static void +-g_win32_mount_mount_iface_init (GMountIface *iface, +- gpointer iface_data) ++g_win32_mount_mount_iface_init (GMountIface *iface) + { + iface->get_root = g_win32_mount_get_root; + iface->get_name = g_win32_mount_get_name; +Index: glib-2.56.4/gio/gwin32networkmonitor.c +=================================================================== +--- glib-2.56.4.orig/gio/gwin32networkmonitor.c ++++ glib-2.56.4/gio/gwin32networkmonitor.c +@@ -44,10 +44,8 @@ static GInitableIface *initable_parent_iface; + #include "gioerror.h" + + static GInitableIface *initable_parent_iface; +-static void g_win32_network_monitor_iface_init (GNetworkMonitorInterface *iface, +- gpointer iface_data); +-static void g_win32_network_monitor_initable_iface_init (GInitableIface *iface, +- gpointer iface_data); ++static void g_win32_network_monitor_iface_init (GNetworkMonitorInterface *iface); ++static void g_win32_network_monitor_initable_iface_init (GInitableIface *iface); + + struct _GWin32NetworkMonitorPrivate + { +@@ -328,14 +326,12 @@ static void + } + + static void +-g_win32_network_monitor_iface_init (GNetworkMonitorInterface *monitor_iface, +- gpointer iface_data) ++g_win32_network_monitor_iface_init (GNetworkMonitorInterface *monitor_iface) + { + } + + static void +-g_win32_network_monitor_initable_iface_init (GInitableIface *iface, +- gpointer iface_data) ++g_win32_network_monitor_initable_iface_init (GInitableIface *iface) + { + initable_parent_iface = g_type_interface_peek_parent (iface); + +Index: glib-2.56.4/gio/gwin32registrykey.c +=================================================================== +--- glib-2.56.4.orig/gio/gwin32registrykey.c ++++ glib-2.56.4/gio/gwin32registrykey.c +@@ -414,8 +414,7 @@ struct _GWin32RegistryKeyPrivate { + gpointer user_data; + }; + +-static void g_win32_registry_key_initable_iface_init (GInitableIface *iface, +- gpointer iface_data); ++static void g_win32_registry_key_initable_iface_init (GInitableIface *iface); + static gboolean g_win32_registry_key_initable_init (GInitable *initable, + GCancellable *cancellable, + GError **error); +@@ -522,8 +521,7 @@ static void + } + + static void +-g_win32_registry_key_initable_iface_init (GInitableIface *iface, +- gpointer iface_data) ++g_win32_registry_key_initable_iface_init (GInitableIface *iface) + { + iface->init = g_win32_registry_key_initable_init; + } +Index: glib-2.56.4/gio/gzlibcompressor.c +=================================================================== +--- glib-2.56.4.orig/gio/gzlibcompressor.c ++++ glib-2.56.4/gio/gzlibcompressor.c +@@ -49,8 +49,7 @@ enum { + * compresses data using zlib. + */ + +-static void g_zlib_compressor_iface_init (GConverterIface *iface, +- gpointer iface_data); ++static void g_zlib_compressor_iface_init (GConverterIface *iface); + + /** + * GZlibCompressor: +@@ -430,8 +429,7 @@ static void + } + + static void +-g_zlib_compressor_iface_init (GConverterIface *iface, +- gpointer iface_data) ++g_zlib_compressor_iface_init (GConverterIface *iface) + { + iface->convert = g_zlib_compressor_convert; + iface->reset = g_zlib_compressor_reset; +Index: glib-2.56.4/gio/gzlibdecompressor.c +=================================================================== +--- glib-2.56.4.orig/gio/gzlibdecompressor.c ++++ glib-2.56.4/gio/gzlibdecompressor.c +@@ -48,8 +48,7 @@ enum { + * decompresses data compressed with zlib. + */ + +-static void g_zlib_decompressor_iface_init (GConverterIface *iface, +- gpointer iface_data); ++static void g_zlib_decompressor_iface_init (GConverterIface *iface); + + typedef struct { + gz_header gzheader; +@@ -407,8 +406,7 @@ static void + } + + static void +-g_zlib_decompressor_iface_init (GConverterIface *iface, +- gpointer iface_data) ++g_zlib_decompressor_iface_init (GConverterIface *iface) + { + iface->convert = g_zlib_decompressor_convert; + iface->reset = g_zlib_decompressor_reset; +Index: glib-2.56.4/glib/gatomic.c +=================================================================== +--- glib-2.56.4.orig/glib/gatomic.c ++++ glib-2.56.4/glib/gatomic.c +@@ -396,7 +396,7 @@ gssize + (g_atomic_pointer_add) (volatile void *atomic, + gssize val) + { +- return g_atomic_pointer_add ((volatile gpointer *) atomic, val); ++ return g_atomic_pointer_add ((volatile gssize *) atomic, val); + } + + /** +@@ -420,7 +420,7 @@ gsize + (g_atomic_pointer_and) (volatile void *atomic, + gsize val) + { +- return g_atomic_pointer_and ((volatile gpointer *) atomic, val); ++ return g_atomic_pointer_and ((volatile gssize *) atomic, val); + } + + /** +@@ -444,7 +444,7 @@ gsize + (g_atomic_pointer_or) (volatile void *atomic, + gsize val) + { +- return g_atomic_pointer_or ((volatile gpointer *) atomic, val); ++ return g_atomic_pointer_or ((volatile gssize *) atomic, val); + } + + /** +@@ -468,7 +468,7 @@ gsize + (g_atomic_pointer_xor) (volatile void *atomic, + gsize val) + { +- return g_atomic_pointer_xor ((volatile gpointer *) atomic, val); ++ return g_atomic_pointer_xor ((volatile gssize *) atomic, val); + } + + #elif defined (G_PLATFORM_WIN32) +Index: glib-2.56.4/glib/gdataset.c +=================================================================== +--- glib-2.56.4.orig/glib/gdataset.c ++++ glib-2.56.4/glib/gdataset.c +@@ -1195,7 +1195,7 @@ g_datalist_set_flags (GData **datalist, + g_return_if_fail (datalist != NULL); + g_return_if_fail ((flags & ~G_DATALIST_FLAGS_MASK) == 0); + +- g_atomic_pointer_or (datalist, (gsize)flags); ++ g_atomic_pointer_or ((volatile gssize *) datalist, (gsize)flags); + } + + /** +@@ -1218,7 +1218,7 @@ g_datalist_unset_flags (GData **datalist, + g_return_if_fail (datalist != NULL); + g_return_if_fail ((flags & ~G_DATALIST_FLAGS_MASK) == 0); + +- g_atomic_pointer_and (datalist, ~(gsize)flags); ++ g_atomic_pointer_and ((volatile gssize *) datalist, ~(gsize)flags); + } + + /** +Index: glib-2.56.4/gobject/gtype.h +=================================================================== +--- glib-2.56.4.orig/gobject/gtype.h ++++ glib-2.56.4/gobject/gtype.h +@@ -1950,6 +1950,11 @@ static void type_name##_class_init (TypeNam + \ + static void type_name##_init (TypeName *self); \ + static void type_name##_class_init (TypeName##Class *klass); \ ++static void type_name##_init_adapter (TypeName *self, \ ++ gpointer class_data) \ ++{ \ ++ type_name##_init (self); \ ++} \ + static gpointer type_name##_parent_class = NULL; \ + static gint TypeName##_private_offset; \ + \ +Index: glib-2.56.4/gobject/gparam.c +=================================================================== +--- glib-2.56.4.orig/gobject/gparam.c ++++ glib-2.56.4/gobject/gparam.c +@@ -255,7 +255,7 @@ g_param_spec_sink (GParamSpec *pspec) + gsize oldvalue; + g_return_if_fail (G_IS_PARAM_SPEC (pspec)); + +- oldvalue = g_atomic_pointer_and (&pspec->qdata, ~(gsize)PARAM_FLOATING_FLAG); ++ oldvalue = g_atomic_pointer_and ((volatile gssize *)(&pspec->qdata), ~(gsize)PARAM_FLOATING_FLAG); + if (oldvalue & PARAM_FLOATING_FLAG) + g_param_spec_unref (pspec); + } +@@ -275,7 +275,7 @@ g_param_spec_ref_sink (GParamSpec *pspec) + gsize oldvalue; + g_return_val_if_fail (G_IS_PARAM_SPEC (pspec), NULL); + +- oldvalue = g_atomic_pointer_and (&pspec->qdata, ~(gsize)PARAM_FLOATING_FLAG); ++ oldvalue = g_atomic_pointer_and ((volatile gssize *)(&pspec->qdata), ~(gsize)PARAM_FLOATING_FLAG); + if (!(oldvalue & PARAM_FLOATING_FLAG)) + g_param_spec_ref (pspec); + +Index: glib-2.56.4/gobject/gclosure.c +=================================================================== +--- glib-2.56.4.orig/gobject/gclosure.c ++++ glib-2.56.4/gobject/gclosure.c +@@ -25,8 +25,6 @@ + #include "../glib/valgrind.h" + #include + +-#include +- + #include "gclosure.h" + #include "gboxed.h" + #include "gobject.h" +@@ -1151,169 +1149,8 @@ g_signal_type_cclosure_new (GType itype, + return closure; + } + +-#include +-static ffi_type * +-value_to_ffi_type (const GValue *gvalue, +- gpointer *value, +- gint *enum_tmpval, +- gboolean *tmpval_used) +-{ +- ffi_type *rettype = NULL; +- GType type = g_type_fundamental (G_VALUE_TYPE (gvalue)); +- g_assert (type != G_TYPE_INVALID); ++#include + +- if (enum_tmpval) +- { +- g_assert (tmpval_used != NULL); +- *tmpval_used = FALSE; +- } +- +- switch (type) +- { +- case G_TYPE_BOOLEAN: +- case G_TYPE_CHAR: +- case G_TYPE_INT: +- rettype = &ffi_type_sint; +- *value = (gpointer)&(gvalue->data[0].v_int); +- break; +- case G_TYPE_ENUM: +- /* enums are stored in v_long even though they are integers, which makes +- * marshalling through libffi somewhat complicated. They need to be +- * marshalled as signed ints, but we need to use a temporary int sized +- * value to pass to libffi otherwise it'll pull the wrong value on +- * BE machines with 32-bit integers when treating v_long as 32-bit int. +- */ +- g_assert (enum_tmpval != NULL); +- rettype = &ffi_type_sint; +- *enum_tmpval = g_value_get_enum (gvalue); +- *value = enum_tmpval; +- *tmpval_used = TRUE; +- break; +- case G_TYPE_FLAGS: +- g_assert (enum_tmpval != NULL); +- rettype = &ffi_type_uint; +- *enum_tmpval = g_value_get_flags (gvalue); +- *value = enum_tmpval; +- *tmpval_used = TRUE; +- break; +- case G_TYPE_UCHAR: +- case G_TYPE_UINT: +- rettype = &ffi_type_uint; +- *value = (gpointer)&(gvalue->data[0].v_uint); +- break; +- case G_TYPE_STRING: +- case G_TYPE_OBJECT: +- case G_TYPE_BOXED: +- case G_TYPE_PARAM: +- case G_TYPE_POINTER: +- case G_TYPE_INTERFACE: +- case G_TYPE_VARIANT: +- rettype = &ffi_type_pointer; +- *value = (gpointer)&(gvalue->data[0].v_pointer); +- break; +- case G_TYPE_FLOAT: +- rettype = &ffi_type_float; +- *value = (gpointer)&(gvalue->data[0].v_float); +- break; +- case G_TYPE_DOUBLE: +- rettype = &ffi_type_double; +- *value = (gpointer)&(gvalue->data[0].v_double); +- break; +- case G_TYPE_LONG: +- rettype = &ffi_type_slong; +- *value = (gpointer)&(gvalue->data[0].v_long); +- break; +- case G_TYPE_ULONG: +- rettype = &ffi_type_ulong; +- *value = (gpointer)&(gvalue->data[0].v_ulong); +- break; +- case G_TYPE_INT64: +- rettype = &ffi_type_sint64; +- *value = (gpointer)&(gvalue->data[0].v_int64); +- break; +- case G_TYPE_UINT64: +- rettype = &ffi_type_uint64; +- *value = (gpointer)&(gvalue->data[0].v_uint64); +- break; +- default: +- rettype = &ffi_type_pointer; +- *value = NULL; +- g_warning ("value_to_ffi_type: Unsupported fundamental type: %s", g_type_name (type)); +- break; +- } +- return rettype; +-} +- +-static void +-value_from_ffi_type (GValue *gvalue, gpointer *value) +-{ +- ffi_arg *int_val = (ffi_arg*) value; +- +- switch (g_type_fundamental (G_VALUE_TYPE (gvalue))) +- { +- case G_TYPE_INT: +- g_value_set_int (gvalue, (gint) *int_val); +- break; +- case G_TYPE_FLOAT: +- g_value_set_float (gvalue, *(gfloat*)value); +- break; +- case G_TYPE_DOUBLE: +- g_value_set_double (gvalue, *(gdouble*)value); +- break; +- case G_TYPE_BOOLEAN: +- g_value_set_boolean (gvalue, (gboolean) *int_val); +- break; +- case G_TYPE_STRING: +- g_value_take_string (gvalue, *(gchar**)value); +- break; +- case G_TYPE_CHAR: +- g_value_set_schar (gvalue, (gint8) *int_val); +- break; +- case G_TYPE_UCHAR: +- g_value_set_uchar (gvalue, (guchar) *int_val); +- break; +- case G_TYPE_UINT: +- g_value_set_uint (gvalue, (guint) *int_val); +- break; +- case G_TYPE_POINTER: +- g_value_set_pointer (gvalue, *(gpointer*)value); +- break; +- case G_TYPE_LONG: +- g_value_set_long (gvalue, (glong) *int_val); +- break; +- case G_TYPE_ULONG: +- g_value_set_ulong (gvalue, (gulong) *int_val); +- break; +- case G_TYPE_INT64: +- g_value_set_int64 (gvalue, (gint64) *int_val); +- break; +- case G_TYPE_UINT64: +- g_value_set_uint64 (gvalue, (guint64) *int_val); +- break; +- case G_TYPE_BOXED: +- g_value_take_boxed (gvalue, *(gpointer*)value); +- break; +- case G_TYPE_ENUM: +- g_value_set_enum (gvalue, (gint) *int_val); +- break; +- case G_TYPE_FLAGS: +- g_value_set_flags (gvalue, (guint) *int_val); +- break; +- case G_TYPE_PARAM: +- g_value_take_param (gvalue, *(gpointer*)value); +- break; +- case G_TYPE_OBJECT: +- g_value_take_object (gvalue, *(gpointer*)value); +- break; +- case G_TYPE_VARIANT: +- g_value_take_variant (gvalue, *(gpointer*)value); +- break; +- default: +- g_warning ("value_from_ffi_type: Unsupported fundamental type: %s", +- g_type_name (g_type_fundamental (G_VALUE_TYPE (gvalue)))); +- } +-} +- + typedef union { + gpointer _gpointer; + float _float; +@@ -1326,74 +1163,6 @@ typedef union { + guint64 _guint64; + } va_arg_storage; + +-static ffi_type * +-va_to_ffi_type (GType gtype, +- va_list *va, +- va_arg_storage *storage) +-{ +- ffi_type *rettype = NULL; +- GType type = g_type_fundamental (gtype); +- g_assert (type != G_TYPE_INVALID); +- +- switch (type) +- { +- case G_TYPE_BOOLEAN: +- case G_TYPE_CHAR: +- case G_TYPE_INT: +- case G_TYPE_ENUM: +- rettype = &ffi_type_sint; +- storage->_gint = va_arg (*va, gint); +- break; +- case G_TYPE_UCHAR: +- case G_TYPE_UINT: +- case G_TYPE_FLAGS: +- rettype = &ffi_type_uint; +- storage->_guint = va_arg (*va, guint); +- break; +- case G_TYPE_STRING: +- case G_TYPE_OBJECT: +- case G_TYPE_BOXED: +- case G_TYPE_PARAM: +- case G_TYPE_POINTER: +- case G_TYPE_INTERFACE: +- case G_TYPE_VARIANT: +- rettype = &ffi_type_pointer; +- storage->_gpointer = va_arg (*va, gpointer); +- break; +- case G_TYPE_FLOAT: +- /* Float args are passed as doubles in varargs */ +- rettype = &ffi_type_float; +- storage->_float = (float)va_arg (*va, double); +- break; +- case G_TYPE_DOUBLE: +- rettype = &ffi_type_double; +- storage->_double = va_arg (*va, double); +- break; +- case G_TYPE_LONG: +- rettype = &ffi_type_slong; +- storage->_glong = va_arg (*va, glong); +- break; +- case G_TYPE_ULONG: +- rettype = &ffi_type_ulong; +- storage->_gulong = va_arg (*va, gulong); +- break; +- case G_TYPE_INT64: +- rettype = &ffi_type_sint64; +- storage->_gint64 = va_arg (*va, gint64); +- break; +- case G_TYPE_UINT64: +- rettype = &ffi_type_uint64; +- storage->_guint64 = va_arg (*va, guint64); +- break; +- default: +- rettype = &ffi_type_pointer; +- storage->_guint64 = 0; +- g_warning ("va_to_ffi_type: Unsupported fundamental type: %s", g_type_name (type)); +- break; +- } +- return rettype; +-} +- + /** + * g_cclosure_marshal_generic: + * @closure: A #GClosure. +@@ -1424,73 +1193,8 @@ g_cclosure_marshal_generic (GClosure *closure, + gpointer invocation_hint, + gpointer marshal_data) + { +- ffi_type *rtype; +- void *rvalue; +- int n_args; +- ffi_type **atypes; +- void **args; +- int i; +- ffi_cif cif; +- GCClosure *cc = (GCClosure*) closure; +- gint *enum_tmpval; +- gboolean tmpval_used = FALSE; +- +- enum_tmpval = g_alloca (sizeof (gint)); +- if (return_gvalue && G_VALUE_TYPE (return_gvalue)) +- { +- rtype = value_to_ffi_type (return_gvalue, &rvalue, enum_tmpval, &tmpval_used); +- } +- else +- { +- rtype = &ffi_type_void; +- } +- +- rvalue = g_alloca (MAX (rtype->size, sizeof (ffi_arg))); +- +- n_args = n_param_values + 1; +- atypes = g_alloca (sizeof (ffi_type *) * n_args); +- args = g_alloca (sizeof (gpointer) * n_args); +- +- if (tmpval_used) +- enum_tmpval = g_alloca (sizeof (gint)); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- atypes[n_args-1] = value_to_ffi_type (param_values + 0, +- &args[n_args-1], +- enum_tmpval, +- &tmpval_used); +- atypes[0] = &ffi_type_pointer; +- args[0] = &closure->data; +- } +- else +- { +- atypes[0] = value_to_ffi_type (param_values + 0, +- &args[0], +- enum_tmpval, +- &tmpval_used); +- atypes[n_args-1] = &ffi_type_pointer; +- args[n_args-1] = &closure->data; +- } +- +- for (i = 1; i < n_args - 1; i++) +- { +- if (tmpval_used) +- enum_tmpval = g_alloca (sizeof (gint)); +- +- atypes[i] = value_to_ffi_type (param_values + i, +- &args[i], +- enum_tmpval, +- &tmpval_used); +- } +- +- if (ffi_prep_cif (&cif, FFI_DEFAULT_ABI, n_args, rtype, atypes) != FFI_OK) +- return; +- +- ffi_call (&cif, marshal_data ? marshal_data : cc->callback, rvalue, args); +- +- if (return_gvalue && G_VALUE_TYPE (return_gvalue)) +- value_from_ffi_type (return_gvalue, rvalue); ++ fprintf(stderr, "g_cclosure_marshal_generic is disabled in this build of glib\n"); ++ exit(1); + } + + /** +@@ -1523,109 +1227,8 @@ g_cclosure_marshal_generic_va (GClosure *closure, + int n_params, + GType *param_types) + { +- ffi_type *rtype; +- void *rvalue; +- int n_args; +- ffi_type **atypes; +- void **args; +- va_arg_storage *storage; +- int i; +- ffi_cif cif; +- GCClosure *cc = (GCClosure*) closure; +- gint *enum_tmpval; +- gboolean tmpval_used = FALSE; +- va_list args_copy; +- +- enum_tmpval = g_alloca (sizeof (gint)); +- if (return_value && G_VALUE_TYPE (return_value)) +- { +- rtype = value_to_ffi_type (return_value, &rvalue, enum_tmpval, &tmpval_used); +- } +- else +- { +- rtype = &ffi_type_void; +- } +- +- rvalue = g_alloca (MAX (rtype->size, sizeof (ffi_arg))); +- +- n_args = n_params + 2; +- atypes = g_alloca (sizeof (ffi_type *) * n_args); +- args = g_alloca (sizeof (gpointer) * n_args); +- storage = g_alloca (sizeof (va_arg_storage) * n_params); +- +- if (G_CCLOSURE_SWAP_DATA (closure)) +- { +- atypes[n_args-1] = &ffi_type_pointer; +- args[n_args-1] = &instance; +- atypes[0] = &ffi_type_pointer; +- args[0] = &closure->data; +- } +- else +- { +- atypes[0] = &ffi_type_pointer; +- args[0] = &instance; +- atypes[n_args-1] = &ffi_type_pointer; +- args[n_args-1] = &closure->data; +- } +- +- G_VA_COPY (args_copy, args_list); +- +- /* Box non-primitive arguments */ +- for (i = 0; i < n_params; i++) +- { +- GType type = param_types[i] & ~G_SIGNAL_TYPE_STATIC_SCOPE; +- GType fundamental = G_TYPE_FUNDAMENTAL (type); +- +- atypes[i+1] = va_to_ffi_type (type, +- &args_copy, +- &storage[i]); +- args[i+1] = &storage[i]; +- +- if ((param_types[i] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0) +- { +- if (fundamental == G_TYPE_STRING && storage[i]._gpointer != NULL) +- storage[i]._gpointer = g_strdup (storage[i]._gpointer); +- else if (fundamental == G_TYPE_PARAM && storage[i]._gpointer != NULL) +- storage[i]._gpointer = g_param_spec_ref (storage[i]._gpointer); +- else if (fundamental == G_TYPE_BOXED && storage[i]._gpointer != NULL) +- storage[i]._gpointer = g_boxed_copy (type, storage[i]._gpointer); +- else if (fundamental == G_TYPE_VARIANT && storage[i]._gpointer != NULL) +- storage[i]._gpointer = g_variant_ref_sink (storage[i]._gpointer); +- } +- if (fundamental == G_TYPE_OBJECT && storage[i]._gpointer != NULL) +- storage[i]._gpointer = g_object_ref (storage[i]._gpointer); +- } +- +- va_end (args_copy); +- +- if (ffi_prep_cif (&cif, FFI_DEFAULT_ABI, n_args, rtype, atypes) != FFI_OK) +- return; +- +- ffi_call (&cif, marshal_data ? marshal_data : cc->callback, rvalue, args); +- +- /* Unbox non-primitive arguments */ +- for (i = 0; i < n_params; i++) +- { +- GType type = param_types[i] & ~G_SIGNAL_TYPE_STATIC_SCOPE; +- GType fundamental = G_TYPE_FUNDAMENTAL (type); +- +- if ((param_types[i] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0) +- { +- if (fundamental == G_TYPE_STRING && storage[i]._gpointer != NULL) +- g_free (storage[i]._gpointer); +- else if (fundamental == G_TYPE_PARAM && storage[i]._gpointer != NULL) +- g_param_spec_unref (storage[i]._gpointer); +- else if (fundamental == G_TYPE_BOXED && storage[i]._gpointer != NULL) +- g_boxed_free (type, storage[i]._gpointer); +- else if (fundamental == G_TYPE_VARIANT && storage[i]._gpointer != NULL) +- g_variant_unref (storage[i]._gpointer); +- } +- if (fundamental == G_TYPE_OBJECT && storage[i]._gpointer != NULL) +- g_object_unref (storage[i]._gpointer); +- } +- +- if (return_value && G_VALUE_TYPE (return_value)) +- value_from_ffi_type (return_value, rvalue); ++ fprintf(stderr, "g_cclosure_marshal_generic_va is disabled in this build of glib\n"); ++ exit(1); + } + + /** diff --git a/recipes/recipes_emscripten/glib/patches/fix-python12.diff b/recipes/recipes_emscripten/glib/patches/fix-python12.diff new file mode 100644 index 000000000..ee4559b67 --- /dev/null +++ b/recipes/recipes_emscripten/glib/patches/fix-python12.diff @@ -0,0 +1,42 @@ +diff -aurp glib-2.56.4.orig/py-compile glib-2.56.4/py-compile +--- glib-2.56.4.orig/py-compile 2024-04-28 22:15:25 ++++ glib-2.56.4/py-compile 2024-04-28 22:16:15 +@@ -116,7 +116,7 @@ $PYTHON -c " + fi + + $PYTHON -c " +-import sys, os, py_compile, imp ++import sys, os, py_compile + + files = '''$files''' + +@@ -129,15 +129,12 @@ for file in files.split(): + continue + sys.stdout.write(file) + sys.stdout.flush() +- if hasattr(imp, 'get_tag'): +- py_compile.compile(filepath, imp.cache_from_source(filepath), path) +- else: +- py_compile.compile(filepath, filepath + 'c', path) ++ py_compile.compile(filepath, filepath + 'c', path) + sys.stdout.write('\n')" || exit $? + + # this will fail for python < 1.5, but that doesn't matter ... + $PYTHON -O -c " +-import sys, os, py_compile, imp ++import sys, os, py_compile + + # pypy does not use .pyo optimization + if hasattr(sys, 'pypy_translation_info'): +@@ -153,10 +150,7 @@ for file in files.split(): + continue + sys.stdout.write(file) + sys.stdout.flush() +- if hasattr(imp, 'get_tag'): +- py_compile.compile(filepath, imp.cache_from_source(filepath, False), path) +- else: +- py_compile.compile(filepath, filepath + 'o', path) ++ py_compile.compile(filepath, filepath + 'o', path) + sys.stdout.write('\n')" 2>/dev/null || : + + # Local Variables: diff --git a/recipes/recipes_emscripten/glib/recipe.yaml b/recipes/recipes_emscripten/glib/recipe.yaml new file mode 100644 index 000000000..6f31b01d0 --- /dev/null +++ b/recipes/recipes_emscripten/glib/recipe.yaml @@ -0,0 +1,38 @@ +context: + version: "2.56.4" + major_minor: "2.56" + +package: + name: glib + version: ${{ version }} + +source: + url: https://download.gnome.org/sources/glib/${{ major_minor }}/glib-${{ version }}.tar.xz + sha256: 27f703d125efb07f8a743666b580df0b4095c59fc8750e8890132c91d437504c + patches: + # patches taken from webR + # License: MIT + - patches/emscripten-configure.diff + - patches/emscripten-function-ptr.diff + - patches/emscripten-wasm.diff + - patches/emscripten-disable-pcre.diff + - patches/fix-python12.diff + +build: + number: 0 + +requirements: + build: + - pkg-config + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + - gettext + - make + host: + - zlib + - libffi + +about: + homepage: https://developer.gnome.org/glib/ + license: LGPL-2.1-or-later + summary: Provides core application building blocks for libraries and applications written in C. From 7bfd759c429c5cc1484e6b053117cc77f124e5b6 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Wed, 22 May 2024 09:34:50 +0200 Subject: [PATCH 043/129] add freetype and fontconfig (#1054) * add freetype * add fontconfig too * add gperf --- .../recipes_emscripten/fontconfig/build.sh | 17 ++++++++ .../patches/fix-double-sysroot.diff | 14 +++++++ .../patches/syscache-always-valid.diff | 13 ++++++ .../recipes_emscripten/fontconfig/recipe.yaml | 41 +++++++++++++++++++ recipes/recipes_emscripten/freetype/build.sh | 5 +++ .../recipes_emscripten/freetype/recipe.yaml | 33 +++++++++++++++ 6 files changed, 123 insertions(+) create mode 100644 recipes/recipes_emscripten/fontconfig/build.sh create mode 100644 recipes/recipes_emscripten/fontconfig/patches/fix-double-sysroot.diff create mode 100644 recipes/recipes_emscripten/fontconfig/patches/syscache-always-valid.diff create mode 100644 recipes/recipes_emscripten/fontconfig/recipe.yaml create mode 100644 recipes/recipes_emscripten/freetype/build.sh create mode 100644 recipes/recipes_emscripten/freetype/recipe.yaml diff --git a/recipes/recipes_emscripten/fontconfig/build.sh b/recipes/recipes_emscripten/fontconfig/build.sh new file mode 100644 index 000000000..f36920f4b --- /dev/null +++ b/recipes/recipes_emscripten/fontconfig/build.sh @@ -0,0 +1,17 @@ +export LDFLAGS="${LDFLAGS} -sUSE_FREETYPE=1 -sUSE_PTHREADS=0" +export PTHREAD_CFLAGS=" " + +# delete this file (is excluded in webr) +rm ./src/fcobjshash.h + +mkdir build && cd build + +emconfigure ../configure \ + ac_cv_func_fstatfs=no \ + ac_cv_func_link=no \ + --enable-shared=no \ + --enable-static=yes \ + --enable-expat \ + --prefix=$PREFIX + +emmake make RUN_FC_CACHE_TEST=false install diff --git a/recipes/recipes_emscripten/fontconfig/patches/fix-double-sysroot.diff b/recipes/recipes_emscripten/fontconfig/patches/fix-double-sysroot.diff new file mode 100644 index 000000000..20ed6a5fb --- /dev/null +++ b/recipes/recipes_emscripten/fontconfig/patches/fix-double-sysroot.diff @@ -0,0 +1,14 @@ +Index: fontconfig-2.12.5/src/fcxml.c +=================================================================== +--- fontconfig-2.12.5.orig/src/fcxml.c ++++ fontconfig-2.12.5/src/fcxml.c +@@ -3372,9 +3372,6 @@ FcConfigParseAndLoad (FcConfig *config, + ret = FcTrue; + goto bail0; + } +- if (sysroot) +- filename = FcStrBuildFilename (sysroot, f, NULL); +- else + filename = FcStrdup (f); + FcStrFree (f); + diff --git a/recipes/recipes_emscripten/fontconfig/patches/syscache-always-valid.diff b/recipes/recipes_emscripten/fontconfig/patches/syscache-always-valid.diff new file mode 100644 index 000000000..15645e41b --- /dev/null +++ b/recipes/recipes_emscripten/fontconfig/patches/syscache-always-valid.diff @@ -0,0 +1,13 @@ +Index: fontconfig-2.12.5/src/fccache.c +=================================================================== +--- fontconfig-2.12.5.orig/src/fccache.c ++++ fontconfig-2.12.5/src/fccache.c +@@ -584,7 +584,7 @@ FcCacheTimeValid (FcConfig *config, FcCache *cache, st + printf ("FcCacheTimeValid dir \"%s\" cache checksum %d dir checksum %d\n", + FcCacheDir (cache), cache->checksum, (int) dir_stat->st_mtime); + #endif +- ++ if (strcmp(FcCacheDir(cache), "/usr/share/fonts") == 0) return FcTrue; + return cache->checksum == (int) dir_stat->st_mtime && fnano; + } + diff --git a/recipes/recipes_emscripten/fontconfig/recipe.yaml b/recipes/recipes_emscripten/fontconfig/recipe.yaml new file mode 100644 index 000000000..d3eae0b14 --- /dev/null +++ b/recipes/recipes_emscripten/fontconfig/recipe.yaml @@ -0,0 +1,41 @@ +context: + version: "2.12.5" + +package: + name: fontconfig + version: ${{ version }} + +source: + url: http://www.freedesktop.org/software/fontconfig/release/fontconfig-${{ version }}.tar.gz + sha256: 1160dc4da64ef06c42ad7634343d0866f4ec25ccc70f1c805f9deffa805cef04 + patches: + - patches/syscache-always-valid.diff + - patches/fix-double-sysroot.diff + +build: + number: 0 + +requirements: + build: + - ${{ compiler('c') }} + - pkg-config + - gperf + host: + - freetype + - expat + # - xml2 (TODO - or just use expat) + # - freetype + # - libiconv # [win] + # - libuuid # [linux] + # - zlib + +about: + homepage: http://www.freedesktop.org/wiki/Software/fontconfig/ + license: MIT + license_file: COPYING + summary: A library for configuring and customizing font access + description: | + Fontconfig is a library designed to provide system-wide font configuration, + customization and application access. + documentation: https://www.freedesktop.org/software/fontconfig/fontconfig-user.html + repository: https://cgit.freedesktop.org/fontconfig/ diff --git a/recipes/recipes_emscripten/freetype/build.sh b/recipes/recipes_emscripten/freetype/build.sh new file mode 100644 index 000000000..31f4dc51f --- /dev/null +++ b/recipes/recipes_emscripten/freetype/build.sh @@ -0,0 +1,5 @@ +mkdir build && cd build + +emcmake cmake .. $CMAKE_ARGS + +make install -j${CPU_COUNT} \ No newline at end of file diff --git a/recipes/recipes_emscripten/freetype/recipe.yaml b/recipes/recipes_emscripten/freetype/recipe.yaml new file mode 100644 index 000000000..26e27a56f --- /dev/null +++ b/recipes/recipes_emscripten/freetype/recipe.yaml @@ -0,0 +1,33 @@ +context: + version: "2.12.1" + +package: + name: freetype + version: ${{ version }} + +source: + url: https://download.savannah.gnu.org/releases/freetype/freetype-${{ version }}.tar.gz + sha256: efe71fd4b8246f1b0b1b9bfca13cfff1c9ad85930340c27df469733bbb620938 + +build: + number: 0 + +requirements: + build: + - ${{ compiler('c') }} + - cmake + - make + host: + # - libpng + # - zlib + +about: + homepage: https://www.freetype.org/ + license: GPL-2.0-only OR FTL + summary: A Free, High-Quality, and Portable Font Engine + description: | + FreeType is designed to be small, efficient, highly customizable + and portable while capable of producing high-quality output (glyph images) + of most vector and bitmap font formats. + documentation: http://freetype.sourceforge.net/freetype2/documentation.html + repository: http://git.savannah.gnu.org/cgit/freetype/ From 2c935ffdea6dad15147e8a5aba4ac52805ea8682 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Wed, 22 May 2024 11:40:51 +0200 Subject: [PATCH 044/129] add xz recipe (#1055) --- recipes/recipes_emscripten/xz/build.sh | 9 +++++++ recipes/recipes_emscripten/xz/recipe.yaml | 32 +++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 recipes/recipes_emscripten/xz/build.sh create mode 100644 recipes/recipes_emscripten/xz/recipe.yaml diff --git a/recipes/recipes_emscripten/xz/build.sh b/recipes/recipes_emscripten/xz/build.sh new file mode 100644 index 000000000..02fc2644f --- /dev/null +++ b/recipes/recipes_emscripten/xz/build.sh @@ -0,0 +1,9 @@ +mkdir build && cd build + +emconfigure ../configure \ + --enable-shared=no \ + --enable-static=yes \ + --enable-threads=no \ + --prefix=$PREFIX + +emmake make install \ No newline at end of file diff --git a/recipes/recipes_emscripten/xz/recipe.yaml b/recipes/recipes_emscripten/xz/recipe.yaml new file mode 100644 index 000000000..66f6ce101 --- /dev/null +++ b/recipes/recipes_emscripten/xz/recipe.yaml @@ -0,0 +1,32 @@ +context: + version: "5.2.9" + +package: + name: xz + version: ${{ version }} + +source: + url: http://downloads.sourceforge.net/project/lzmautils/xz-${{ version }}.tar.bz2 + sha256: b194507fba3a462a753c553149ccdaa168337bcb7deefddd067ba987c83dfce6 + +build: + number: 0 + +requirements: + build: + - ${{ compiler('c') }} + - make + - automake + - libtool + +about: + homepage: http://tukaani.org/xz/ + license: LGPL-2.1 AND GPL-2.0 + license_file: COPYING + summary: Data compression software with high compression ratio + description: | + XZ Utils is free general-purpose data compression software with a high + compression ratio. XZ Utils were written for POSIX-like systems, but also + work on some not-so-POSIX systems. + documentation: http://tukaani.org/xz/ + repository: http://git.tukaani.org/ \ No newline at end of file From e40f5df12800412d18b6b7111d689bc8b3dfb7e5 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Wed, 22 May 2024 12:03:52 +0200 Subject: [PATCH 045/129] rename libwebp-base to libwebp (#1056) --- recipes/recipes_emscripten/{libwebp-base => libwebp}/build.sh | 0 recipes/recipes_emscripten/{libwebp-base => libwebp}/recipe.yaml | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename recipes/recipes_emscripten/{libwebp-base => libwebp}/build.sh (100%) rename recipes/recipes_emscripten/{libwebp-base => libwebp}/recipe.yaml (100%) diff --git a/recipes/recipes_emscripten/libwebp-base/build.sh b/recipes/recipes_emscripten/libwebp/build.sh similarity index 100% rename from recipes/recipes_emscripten/libwebp-base/build.sh rename to recipes/recipes_emscripten/libwebp/build.sh diff --git a/recipes/recipes_emscripten/libwebp-base/recipe.yaml b/recipes/recipes_emscripten/libwebp/recipe.yaml similarity index 100% rename from recipes/recipes_emscripten/libwebp-base/recipe.yaml rename to recipes/recipes_emscripten/libwebp/recipe.yaml From e37e63df3ff74824fc6bedb3902bb312ea41d729 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Wed, 22 May 2024 12:04:35 +0200 Subject: [PATCH 046/129] Add graphite2 (#1057) * Add graphite2 * Clean up --- recipes/recipes_emscripten/graphite2/build.sh | 18 +++++++++ .../recipes_emscripten/graphite2/recipe.yaml | 38 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 recipes/recipes_emscripten/graphite2/build.sh create mode 100644 recipes/recipes_emscripten/graphite2/recipe.yaml diff --git a/recipes/recipes_emscripten/graphite2/build.sh b/recipes/recipes_emscripten/graphite2/build.sh new file mode 100644 index 000000000..afe24e389 --- /dev/null +++ b/recipes/recipes_emscripten/graphite2/build.sh @@ -0,0 +1,18 @@ +#! /bin/bash + +set -ex + +mkdir -p build +cd build + +emcmake cmake ${CMAKE_ARGS} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_COLOR_MAKEFILE=OFF \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DBUILD_SHARED_LIBS=OFF \ + .. +make -j$CPU_COUNT +make install + +# Copy the .wasm file also +cp gr2fonttest/gr2fonttest.wasm $PREFIX/bin diff --git a/recipes/recipes_emscripten/graphite2/recipe.yaml b/recipes/recipes_emscripten/graphite2/recipe.yaml new file mode 100644 index 000000000..633533240 --- /dev/null +++ b/recipes/recipes_emscripten/graphite2/recipe.yaml @@ -0,0 +1,38 @@ +context: + name: "graphite2" + version: 1.3.13 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://github.com/silnrsi/graphite/releases/download/${{ version }}/${{ name }}-${{ version }}.tgz + sha256: dd63e169b0d3cf954b397c122551ab9343e0696fb2045e1b326db0202d875f06 + +build: + number: 0 + +requirements: + build: + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + - cmake + - make + +tests: +- script: + - test -f $PREFIX/lib/pkgconfig/graphite2.pc + - test -f $PREFIX/lib/libgraphite2.a + - test -f $PREFIX/share/graphite2/graphite2.cmake + - test -f $PREFIX/include/graphite2/Font.h + +about: + homepage: http://graphite.sil.org/ + license: LGPL-2.0-or-later + license_file: COPYING + summary: 'A "smart font" system that handles the complexities of lesser-known languages of the world.' + +extra: + recipe-maintainers: + - IsabelParedes From 790179eb5b08c9bfbcea09b75603d3f47b27f010 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Wed, 22 May 2024 13:07:27 +0200 Subject: [PATCH 047/129] add pixman (#1058) --- recipes/recipes_emscripten/pixman/build.sh | 12 +++++++ .../pixman/emscripten.meson.cross | 14 +++++++++ recipes/recipes_emscripten/pixman/recipe.yaml | 31 +++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 recipes/recipes_emscripten/pixman/build.sh create mode 100644 recipes/recipes_emscripten/pixman/emscripten.meson.cross create mode 100644 recipes/recipes_emscripten/pixman/recipe.yaml diff --git a/recipes/recipes_emscripten/pixman/build.sh b/recipes/recipes_emscripten/pixman/build.sh new file mode 100644 index 000000000..49a579977 --- /dev/null +++ b/recipes/recipes_emscripten/pixman/build.sh @@ -0,0 +1,12 @@ +meson setup builddir \ + ${MESON_ARGS} \ + "${meson_config_args[@]}" \ + --buildtype=release \ + --default-library=static \ + --prefix=$PREFIX \ + -Dlibdir=lib \ + --wrap-mode=nofallback \ + --cross-file=$RECIPE_DIR/emscripten.meson.cross + +ninja -v -C builddir -j ${CPU_COUNT} +ninja -C builddir install -j ${CPU_COUNT} \ No newline at end of file diff --git a/recipes/recipes_emscripten/pixman/emscripten.meson.cross b/recipes/recipes_emscripten/pixman/emscripten.meson.cross new file mode 100644 index 000000000..134d4d223 --- /dev/null +++ b/recipes/recipes_emscripten/pixman/emscripten.meson.cross @@ -0,0 +1,14 @@ +[binaries] +exe_wrapper = 'node' +pkgconfig = 'pkg-config' + +[properties] +needs_exe_wrapper = true +skip_sanity_check = true +longdouble_format = 'IEEE_QUAD_LE' # for numpy + +[host_machine] +system = 'emscripten' +cpu_family = 'wasm32' +cpu = 'wasm' +endian = 'little' diff --git a/recipes/recipes_emscripten/pixman/recipe.yaml b/recipes/recipes_emscripten/pixman/recipe.yaml new file mode 100644 index 000000000..119f85c97 --- /dev/null +++ b/recipes/recipes_emscripten/pixman/recipe.yaml @@ -0,0 +1,31 @@ +context: + version: "0.43.4" + +package: + name: pixman + version: ${{ version }} + +source: + url: http://cairographics.org/releases/pixman-${{ version }}.tar.gz + sha256: a0624db90180c7ddb79fc7a9151093dc37c646d8c38d3f232f767cf64b85a226 + +build: + number: 0 + +requirements: + build: + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + - meson + - ninja + - pkg-config + +about: + homepage: http://www.pixman.org/ + license: MIT + license_file: COPYING + summary: A low-level software library for pixel manipulation. + description: | + Pixman is a low-level software library for pixel manipulation, providing + features such as image compositing and trapezoid rasterization. + repository: https://cgit.freedesktop.org/pixman/ From 27c69feb332a83fc19cc724d2278e8d15ed337ec Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Wed, 22 May 2024 14:08:20 +0200 Subject: [PATCH 048/129] Add icu (#1043) * Add icu * Fix typo * Modify data packaging * Add tests --- recipes/recipes_emscripten/icu/build.sh | 51 ++++++++++++++++++++++ recipes/recipes_emscripten/icu/recipe.yaml | 51 ++++++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 recipes/recipes_emscripten/icu/build.sh create mode 100644 recipes/recipes_emscripten/icu/recipe.yaml diff --git a/recipes/recipes_emscripten/icu/build.sh b/recipes/recipes_emscripten/icu/build.sh new file mode 100644 index 000000000..0776c3ad6 --- /dev/null +++ b/recipes/recipes_emscripten/icu/build.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +# Get an updated config.sub and config.guess +cp $BUILD_PREFIX/share/libtool/build-aux/config.* ./source + +set -e + +cd source + +chmod +x configure install-sh + +# Must build twice because some of the files are used in the build process (e.g. icupkg) +# 1. Regular build +# 2. Cross-compilation + +EXTRA_OPTS="" + +mkdir cross_build +pushd cross_build +CC=$(which gcc) CXX=$(which g++) AR= AS= LD= CFLAGS= CXXFLAGS= LDFLAGS= CPPFLAGS= ../configure \ + --build=${BUILD} \ + --host=${BUILD} \ + --disable-samples \ + --disable-extras \ + --disable-layout \ + --disable-tests + +make -j${CPU_COUNT} +EXTRA_OPTS="$EXTRA_OPTS --with-cross-build=$PWD" +popd + +# --with-data-packaging="static" fails, "files" and "archive" ok +emconfigure ./configure \ + --prefix=${PREFIX} \ + --build=${BUILD} \ + --host=${HOST} \ + --disable-samples \ + --disable-extras \ + --disable-layout \ + --disable-tests \ + --disable-shared \ + --enable-static \ + --with-data-packaging="archive" \ + ${EXTRA_OPTS} + +make -j${CPU_COUNT} +make install + +# Copy .wasm files as well +cp ./bin/*.wasm $PREFIX/bin/ +cp ./tools/icuinfo/icuinfo.wasm $PREFIX/bin diff --git a/recipes/recipes_emscripten/icu/recipe.yaml b/recipes/recipes_emscripten/icu/recipe.yaml new file mode 100644 index 000000000..c75e134a1 --- /dev/null +++ b/recipes/recipes_emscripten/icu/recipe.yaml @@ -0,0 +1,51 @@ +context: + name: "icu" + version: 73.2 + version_under: "73_2" + version_hyphen: "73-2" + +package: + name: ${{ name }} + version: ${{ version }} + +source: + - url: https://github.com/unicode-org/icu/releases/download/release-${{ version_hyphen }}/icu4c-${{ version_under }}-src.tgz + sha256: 818a80712ed3caacd9b652305e01afc7fa167e6f2e94996da44b90c2ab604ce1 + +build: + number: 0 + +requirements: + build: + - libtool + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + - make + +tests: +- script: + - test -f $PREFIX/lib/libicudata.a + - test -f $PREFIX/lib/libicui18n.a + - test -f $PREFIX/lib/libicuio.a + - test -f $PREFIX/lib/libicutest.a + - test -f $PREFIX/lib/libicutu.a + - test -f $PREFIX/lib/libicuuc.a + - node $PREFIX/bin/genbrk --help + - node $PREFIX/bin/gencfu --help + - node $PREFIX/bin/gencnval --help + - node $PREFIX/bin/gendict --help + - node $PREFIX/bin/icuinfo + requirements: + build: + - nodejs + +about: + homepage: https://icu.unicode.org + license: MIT + license_file: LICENSE + summary: International Components for Unicode. + documentation: https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/ + +extra: + recipe-maintainers: + - IsabelParedes From 672a4270c7c384f220c8184202afe2bb5c57eee0 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 23 May 2024 07:45:17 +0200 Subject: [PATCH 049/129] Update freetype from 2.12.1 to 2.13.0 (#1059) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/freetype/recipe.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes/recipes_emscripten/freetype/recipe.yaml b/recipes/recipes_emscripten/freetype/recipe.yaml index 26e27a56f..eb684bf7b 100644 --- a/recipes/recipes_emscripten/freetype/recipe.yaml +++ b/recipes/recipes_emscripten/freetype/recipe.yaml @@ -1,5 +1,5 @@ context: - version: "2.12.1" + version: 2.13.0 package: name: freetype @@ -7,16 +7,16 @@ package: source: url: https://download.savannah.gnu.org/releases/freetype/freetype-${{ version }}.tar.gz - sha256: efe71fd4b8246f1b0b1b9bfca13cfff1c9ad85930340c27df469733bbb620938 + sha256: a7aca0e532a276ea8d85bd31149f0a74c33d19c8d287116ef8f5f8357b4f1f80 build: number: 0 requirements: build: - - ${{ compiler('c') }} - - cmake - - make + - ${{ compiler('c') }} + - cmake + - make host: # - libpng # - zlib From dfb54ae6ecd9a85dbb89e752cc04f20a3ed22a71 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 23 May 2024 07:45:25 +0200 Subject: [PATCH 050/129] Update graphite2 from 1.3.13 to 1.3.14 (#1060) Co-authored-by: emscripten-forge-bot --- .../recipes_emscripten/graphite2/recipe.yaml | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/recipes/recipes_emscripten/graphite2/recipe.yaml b/recipes/recipes_emscripten/graphite2/recipe.yaml index 633533240..b2a66f7d6 100644 --- a/recipes/recipes_emscripten/graphite2/recipe.yaml +++ b/recipes/recipes_emscripten/graphite2/recipe.yaml @@ -1,38 +1,40 @@ context: - name: "graphite2" - version: 1.3.13 + name: graphite2 + version: 1.3.14 package: name: ${{ name }} version: ${{ version }} source: - url: https://github.com/silnrsi/graphite/releases/download/${{ version }}/${{ name }}-${{ version }}.tgz - sha256: dd63e169b0d3cf954b397c122551ab9343e0696fb2045e1b326db0202d875f06 + url: https://github.com/silnrsi/graphite/releases/download/${{ version }}/${{ name + }}-${{ version }}.tgz + sha256: f99d1c13aa5fa296898a181dff9b82fb25f6cc0933dbaa7a475d8109bd54209d build: number: 0 requirements: build: - - ${{ compiler('c') }} - - ${{ compiler('cxx') }} - - cmake - - make + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + - cmake + - make tests: - script: - - test -f $PREFIX/lib/pkgconfig/graphite2.pc - - test -f $PREFIX/lib/libgraphite2.a - - test -f $PREFIX/share/graphite2/graphite2.cmake - - test -f $PREFIX/include/graphite2/Font.h + - test -f $PREFIX/lib/pkgconfig/graphite2.pc + - test -f $PREFIX/lib/libgraphite2.a + - test -f $PREFIX/share/graphite2/graphite2.cmake + - test -f $PREFIX/include/graphite2/Font.h about: homepage: http://graphite.sil.org/ license: LGPL-2.0-or-later license_file: COPYING - summary: 'A "smart font" system that handles the complexities of lesser-known languages of the world.' + summary: A "smart font" system that handles the complexities of lesser-known languages + of the world. extra: recipe-maintainers: - - IsabelParedes + - IsabelParedes From 79a76559fe19e7d1b375a59980e9398a61639857 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 23 May 2024 07:45:32 +0200 Subject: [PATCH 051/129] Update libxml2 from 2.12.2 to 2.12.3 (#1061) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/libxml2/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/libxml2/recipe.yaml b/recipes/recipes_emscripten/libxml2/recipe.yaml index 888b99afc..8a3f881d3 100644 --- a/recipes/recipes_emscripten/libxml2/recipe.yaml +++ b/recipes/recipes_emscripten/libxml2/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.12.2 + version: 2.12.3 package: @@ -9,7 +9,7 @@ package: source: url: https://gitlab.gnome.org/GNOME/libxml2/-/archive/v${{ version }}/libxml2-v${{ version }}.tar.gz - sha256: 1cd3a24aa65acc7e2ca90b984667fc19b7c9a1dd1ec1934e9b33932fbfd827c1 + sha256: 342de599cb988a514bd45d2d8f6c064f636a57cfa0174d894041ac22383cff63 build: From 5d1b09750d99197eb5d55dbe9772d3bdf2034a67 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 23 May 2024 07:45:40 +0200 Subject: [PATCH 052/129] Update xz from 5.2.9 to 5.2.10 (#1062) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/xz/recipe.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/recipes/recipes_emscripten/xz/recipe.yaml b/recipes/recipes_emscripten/xz/recipe.yaml index 66f6ce101..0f361eb7d 100644 --- a/recipes/recipes_emscripten/xz/recipe.yaml +++ b/recipes/recipes_emscripten/xz/recipe.yaml @@ -1,5 +1,5 @@ context: - version: "5.2.9" + version: 5.2.10 package: name: xz @@ -7,17 +7,17 @@ package: source: url: http://downloads.sourceforge.net/project/lzmautils/xz-${{ version }}.tar.bz2 - sha256: b194507fba3a462a753c553149ccdaa168337bcb7deefddd067ba987c83dfce6 + sha256: 01b71df61521d9da698ce3c33148bff06a131628ff037398c09482f3a26e5408 build: number: 0 requirements: build: - - ${{ compiler('c') }} - - make - - automake - - libtool + - ${{ compiler('c') }} + - make + - automake + - libtool about: homepage: http://tukaani.org/xz/ @@ -29,4 +29,4 @@ about: compression ratio. XZ Utils were written for POSIX-like systems, but also work on some not-so-POSIX systems. documentation: http://tukaani.org/xz/ - repository: http://git.tukaani.org/ \ No newline at end of file + repository: http://git.tukaani.org/ From 87988c9656d27cc4a2d73803c166f248f8c7e4b7 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Thu, 23 May 2024 12:31:41 +0200 Subject: [PATCH 053/129] Add lzo (#1065) --- recipes/recipes_emscripten/lzo/build.sh | 22 ++++++++++++ recipes/recipes_emscripten/lzo/recipe.yaml | 39 ++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 recipes/recipes_emscripten/lzo/build.sh create mode 100644 recipes/recipes_emscripten/lzo/recipe.yaml diff --git a/recipes/recipes_emscripten/lzo/build.sh b/recipes/recipes_emscripten/lzo/build.sh new file mode 100644 index 000000000..5a09c7696 --- /dev/null +++ b/recipes/recipes_emscripten/lzo/build.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -ex + +mkdir -p build +cd build + +emcmake cmake -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_PREFIX_PATH=${PREFIX} \ + -DCMAKE_INSTALL_PREFIX=${PREFIX} \ + -DCMAKE_INSTALL_LIBDIR=${PREFIX}/lib \ + -DCMAKE_INSTALL_RPATH=${PREFIX}/lib \ + -DENABLE_SHARED=OFF \ + -DENABLE_STATIC=ON \ + ${CMAKE_ARGS} ${SRC_DIR} + +make -j${CPU_COUNT} ${VERBOSE_CM} + +make -j${CPU_COUNT} install + +# Remove examples +rm -r $PREFIX/libexec/lzo diff --git a/recipes/recipes_emscripten/lzo/recipe.yaml b/recipes/recipes_emscripten/lzo/recipe.yaml new file mode 100644 index 000000000..17662ae18 --- /dev/null +++ b/recipes/recipes_emscripten/lzo/recipe.yaml @@ -0,0 +1,39 @@ +context: + name: "lzo" + version: 2.10 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: http://www.oberhumer.com/opensource/${{ name }}/download/${{ name }}-${{ version }}.tar.gz + sha256: c0f892943208266f9b6543b3ae308fab6284c5c90e627931446fb49b4221a072 + +build: + number: 0 + +requirements: + build: + - ${{ compiler('c') }} + - cmake + - make + +tests: +- script: + - test -f ${PREFIX}/include/lzo/lzoconf.h + - test -f ${PREFIX}/lib/liblzo2.a + +about: + homepage: http://www.oberhumer.com/opensource/lzo/ + license: GPL-2.0-or-later + license_family: GPL2 + license_file: COPYING + summary: LZO is a portable lossless data compression library written in ANSI C. + description: | + LZO offers pretty fast compression and extremely fast decompression. + MiniLZO is a very lightweight subset of the LZO library. + +extra: + recipe-maintainers: + - IsabelParedes From cc9d5b24124a65d55ada5e54fe2daa667fe54063 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 23 May 2024 13:17:47 +0200 Subject: [PATCH 054/129] Update fontconfig from 2.12.5 to 2.12.6 (#1063) * Update fontconfig from 2.12.5 to 2.12.6 * Update patch * Add tests --------- Co-authored-by: emscripten-forge-bot Co-authored-by: Isabel Paredes --- .../recipes_emscripten/fontconfig/build.sh | 10 +++++ .../patches/fix-double-sysroot.diff | 14 +++---- .../recipes_emscripten/fontconfig/recipe.yaml | 39 +++++++++++++------ 3 files changed, 45 insertions(+), 18 deletions(-) diff --git a/recipes/recipes_emscripten/fontconfig/build.sh b/recipes/recipes_emscripten/fontconfig/build.sh index f36920f4b..7dc3b4246 100644 --- a/recipes/recipes_emscripten/fontconfig/build.sh +++ b/recipes/recipes_emscripten/fontconfig/build.sh @@ -15,3 +15,13 @@ emconfigure ../configure \ --prefix=$PREFIX emmake make RUN_FC_CACHE_TEST=false install + +# Copy .wasm $PREFIX/bin/ files also +cp fc-cache/fc-cache.wasm $PREFIX/bin/ +cp fc-cat/fc-cat.wasm $PREFIX/bin/ +cp fc-list/fc-list.wasm $PREFIX/bin/ +cp fc-match/fc-match.wasm $PREFIX/bin/ +cp fc-pattern/fc-pattern.wasm $PREFIX/bin/ +cp fc-query/fc-query.wasm $PREFIX/bin/ +cp fc-scan/fc-scan.wasm $PREFIX/bin/ +cp fc-validate/fc-validate.wasm $PREFIX/bin/ diff --git a/recipes/recipes_emscripten/fontconfig/patches/fix-double-sysroot.diff b/recipes/recipes_emscripten/fontconfig/patches/fix-double-sysroot.diff index 20ed6a5fb..348ae30c2 100644 --- a/recipes/recipes_emscripten/fontconfig/patches/fix-double-sysroot.diff +++ b/recipes/recipes_emscripten/fontconfig/patches/fix-double-sysroot.diff @@ -1,11 +1,11 @@ -Index: fontconfig-2.12.5/src/fcxml.c -=================================================================== ---- fontconfig-2.12.5.orig/src/fcxml.c -+++ fontconfig-2.12.5/src/fcxml.c -@@ -3372,9 +3372,6 @@ FcConfigParseAndLoad (FcConfig *config, - ret = FcTrue; +diff --git a/src/fcxml.c b/src/fcxml.c +index 19ce96a..f1ee684 100644 +--- a/src/fcxml.c ++++ b/src/fcxml.c +@@ -3369,9 +3369,6 @@ FcConfigParseAndLoad (FcConfig *config, + f = FcConfigFilename (name); + if (!f) goto bail0; - } - if (sysroot) - filename = FcStrBuildFilename (sysroot, f, NULL); - else diff --git a/recipes/recipes_emscripten/fontconfig/recipe.yaml b/recipes/recipes_emscripten/fontconfig/recipe.yaml index d3eae0b14..8678f06d9 100644 --- a/recipes/recipes_emscripten/fontconfig/recipe.yaml +++ b/recipes/recipes_emscripten/fontconfig/recipe.yaml @@ -1,34 +1,51 @@ context: - version: "2.12.5" + name: "fontconfig" + version: 2.12.6 package: - name: fontconfig + name: ${{ name }} version: ${{ version }} source: - url: http://www.freedesktop.org/software/fontconfig/release/fontconfig-${{ version }}.tar.gz - sha256: 1160dc4da64ef06c42ad7634343d0866f4ec25ccc70f1c805f9deffa805cef04 + url: http://www.freedesktop.org/software/${{ name }}/release/${{ name }}-${{ version }}.tar.gz + sha256: 064b9ebf060c9e77011733ac9dc0e2ce92870b574cca2405e11f5353a683c334 patches: - - patches/syscache-always-valid.diff - - patches/fix-double-sysroot.diff + - patches/syscache-always-valid.diff + - patches/fix-double-sysroot.diff build: number: 0 requirements: build: - - ${{ compiler('c') }} - - pkg-config - - gperf + - ${{ compiler('c') }} + - pkg-config + - gperf host: - - freetype - - expat + - freetype + - expat # - xml2 (TODO - or just use expat) # - freetype # - libiconv # [win] # - libuuid # [linux] # - zlib +tests: +- script: + - test -f $PREFIX/lib/libfontconfig.a + - test -f $PREFIX/include/fontconfig/fontconfig.h + - node $PREFIX/bin/fc-cache --version + - node $PREFIX/bin/fc-cat --version + - node $PREFIX/bin/fc-list --version + - node $PREFIX/bin/fc-match --version + - node $PREFIX/bin/fc-pattern --version + - node $PREFIX/bin/fc-query --version + - node $PREFIX/bin/fc-scan --version + - node $PREFIX/bin/fc-validate --version + requirements: + build: + - nodejs + about: homepage: http://www.freedesktop.org/wiki/Software/fontconfig/ license: MIT From 4304a29cc1261b9f504368dcf4414f4e403f560f Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Thu, 23 May 2024 18:10:25 +0200 Subject: [PATCH 055/129] Add harfbuzz (#1067) * Add harfbuzz * Clean up * Update icu version in conda_build_config v73 is the lowest version of icu available on emscripten-forge --- conda_build_config.yaml | 2 +- recipes/recipes_emscripten/harfbuzz/build.sh | 28 ++++++++++ .../harfbuzz/emscripten.meson.cross | 14 +++++ .../recipes_emscripten/harfbuzz/recipe.yaml | 52 +++++++++++++++++++ 4 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 recipes/recipes_emscripten/harfbuzz/build.sh create mode 100644 recipes/recipes_emscripten/harfbuzz/emscripten.meson.cross create mode 100644 recipes/recipes_emscripten/harfbuzz/recipe.yaml diff --git a/conda_build_config.yaml b/conda_build_config.yaml index 2befcb337..7cec803e4 100644 --- a/conda_build_config.yaml +++ b/conda_build_config.yaml @@ -367,7 +367,7 @@ hdf4: hdf5: - 1.12.2 icu: - - '69' + - '73' ipopt: - 3.14 isl: diff --git a/recipes/recipes_emscripten/harfbuzz/build.sh b/recipes/recipes_emscripten/harfbuzz/build.sh new file mode 100644 index 000000000..2b693831b --- /dev/null +++ b/recipes/recipes_emscripten/harfbuzz/build.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +set -ex + +meson_config_args=( + -Dglib=enabled + -Dicu=enabled + -Dfreetype=enabled + -Dcairo=disabled + -Dchafa=disabled + -Dgraphite=enabled + -Dintrospection=disabled # requires gobject-introspection as run-time dep + -Dtests=disabled + -Dutilities=disabled + -Dlibdir=lib +) + +# Default library needs to be shared or both to enable introspection +meson setup builddir \ + ${MESON_ARGS} \ + "${meson_config_args[@]}" \ + --buildtype=release \ + --default-library=static \ + --prefix=$PREFIX \ + --wrap-mode=nofallback \ + --cross-file=$RECIPE_DIR/emscripten.meson.cross +ninja -v -C builddir -j ${CPU_COUNT} +ninja -C builddir install -j ${CPU_COUNT} diff --git a/recipes/recipes_emscripten/harfbuzz/emscripten.meson.cross b/recipes/recipes_emscripten/harfbuzz/emscripten.meson.cross new file mode 100644 index 000000000..48763013f --- /dev/null +++ b/recipes/recipes_emscripten/harfbuzz/emscripten.meson.cross @@ -0,0 +1,14 @@ +[properties] +needs_exe_wrapper = true +skip_sanity_check = true +longdouble_format = 'IEEE_QUAD_LE' # for numpy + +[host_machine] +system = 'emscripten' +cpu_family = 'wasm32' +cpu = 'wasm' +endian = 'little' + +[binaries] +exe_wrapper = 'node' +pkg-config = 'pkg-config' diff --git a/recipes/recipes_emscripten/harfbuzz/recipe.yaml b/recipes/recipes_emscripten/harfbuzz/recipe.yaml new file mode 100644 index 000000000..67c56a1d4 --- /dev/null +++ b/recipes/recipes_emscripten/harfbuzz/recipe.yaml @@ -0,0 +1,52 @@ +context: + name: "harfbuzz" + version: 8.5.0 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://github.com/${{ name }}/${{ name }}/archive/${{ version }}.tar.gz + sha256: 7ad8e4e23ce776efb6a322f653978b3eb763128fd56a90252775edb9fd327956 + +build: + number: 0 + +requirements: + build: + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + - meson + - ninja + - pkg-config + - glib + host: + # - cairo TODO: add once available + - glib + - freetype + - icu + - graphite2 + +tests: +- script: + - test -f $PREFIX/lib/libharfbuzz-gobject.a + - test -f $PREFIX/lib/libharfbuzz-icu.a + - test -f $PREFIX/lib/libharfbuzz-subset.a + - test -f $PREFIX/lib/libharfbuzz.a + - test -f $PREFIX/include/harfbuzz/hb.h +# TODO: test hb-view, hb-shape, and hb-subset with cairo or chafa enabled + +about: + homepage: https://harfbuzz.github.io/ + license: MIT + license_file: COPYING + summary: An OpenType text shaping engine. + description: | + HarfBuzz is a text shaping library. New Harbuzz targets various font + technologies while Old HarfBuzz targets only OpenType fonts. + documentation: https://harfbuzz.github.io/ + +extra: + recipe-maintainers: + - IsabelParedes From adeae6bacdaf45f5989c7ee0307d773bb5928699 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Thu, 23 May 2024 18:10:36 +0200 Subject: [PATCH 056/129] Add zstd (#1066) --- recipes/recipes_emscripten/zstd/build.sh | 29 +++++++++++ .../zstd/emscripten.meson.cross | 14 ++++++ recipes/recipes_emscripten/zstd/recipe.yaml | 49 +++++++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 recipes/recipes_emscripten/zstd/build.sh create mode 100644 recipes/recipes_emscripten/zstd/emscripten.meson.cross create mode 100644 recipes/recipes_emscripten/zstd/recipe.yaml diff --git a/recipes/recipes_emscripten/zstd/build.sh b/recipes/recipes_emscripten/zstd/build.sh new file mode 100644 index 000000000..1b18ba889 --- /dev/null +++ b/recipes/recipes_emscripten/zstd/build.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +set -ex + +cd build/meson + +meson setup \ + -Dbin_programs=true \ + -Dbin_contrib=true \ + -Dmulti_thread=disabled \ + -Dzlib=disabled \ + -Dlzma=disabled \ + -Dlz4=disabled \ + -Ddefault_library=static \ + --prefix=$PREFIX \ + --wrap-mode=nofallback \ + --cross-file=$RECIPE_DIR/emscripten.meson.cross \ + builddir + +cd builddir +ninja +ninja install + +# Fix symbolic links +cd $PREFIX/bin +rm unzstd zstdcat +ln -s ./zstd.js unzstd +ln -s ./zstd.js zstdcat +ln -s ./zstd.js zstd diff --git a/recipes/recipes_emscripten/zstd/emscripten.meson.cross b/recipes/recipes_emscripten/zstd/emscripten.meson.cross new file mode 100644 index 000000000..c05192830 --- /dev/null +++ b/recipes/recipes_emscripten/zstd/emscripten.meson.cross @@ -0,0 +1,14 @@ +[properties] +needs_exe_wrapper = true +skip_sanity_check = true +longdouble_format = 'IEEE_QUAD_LE' # for numpy + +[host_machine] +system = 'emscripten' +cpu_family = 'wasm32' +cpu = 'wasm' +endian = 'little' + +[binaries] +exe_wrapper = 'node' +pkgconfig = 'pkg-config' diff --git a/recipes/recipes_emscripten/zstd/recipe.yaml b/recipes/recipes_emscripten/zstd/recipe.yaml new file mode 100644 index 000000000..d8b0398b0 --- /dev/null +++ b/recipes/recipes_emscripten/zstd/recipe.yaml @@ -0,0 +1,49 @@ +context: + name: "zstd" + version: 1.5.6 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://github.com/facebook/${{ name }}/archive/v${{ version }}.tar.gz + sha256: 30f35f71c1203369dc979ecde0400ffea93c27391bfd2ac5a9715d2173d92ff7 + +build: + number: 0 + +requirements: + build: + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + - ninja + - meson + +tests: +- script: + - test -f $PREFIX/lib/libzstd.a + - test -f $PREFIX/include/zstd.h + - node $PREFIX/bin/zstd.js --version + requirements: + build: + - nodejs + +about: + homepage: http://www.zstd.net + license: BSD-3-Clause + license_file: LICENSE + summary: Zstandard - Fast real-time compression algorithm + description: | + Zstandard is a real-time compression algorithm, providing high compression + ratios. It offers a very wide range of compression / speed trade-off, while + being backed by a very fast decoder. It also offers a special mode for + small data, called dictionary compression, and can create dictionaries from + any sample set. Zstandard library is provided as open source software using + a BSD license. + documentation: https://facebook.github.io/zstd/zstd_manual.html + repository: https://github.com/facebook/zstd + +extra: + recipe-maintainers: + - IsabelParedes From 74e94ec4ea9962c8bfe4b3b8f1a03ff6b09eb6aa Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Mon, 27 May 2024 12:57:13 +0200 Subject: [PATCH 057/129] repack emscripten (#1064) * repack emscripten * move dynamic_linking field to build * wip * unconstrain run python * use CODNA_PREFIX instead of PREFIX in activation script * symlink node * symlink node and pretend version * symlink node and pretend version -- corrected name * symlink node and pretend version -- corrected name * symlink whole prefix * try with symlink * try with symlink -- vII * try with symlink -- vIIO * i think this might work * link more bins * blog --------- Co-authored-by: Wolf Vollprecht --- .github/workflows/build_recipes.yaml | 8 --- docs/blog/.authors.yml | 7 +++ docs/blog/posts/repack_emscripten.md | 15 ++++++ pixi.toml | 14 ----- .../{LICENSE => LICENSE.txt} | 0 .../emscripten_emscripten-wasm32/activate.sh | 28 +--------- .../build_compiler_package.sh | 29 ++++++++++- .../emscripten_emscripten-wasm32/recipe.yaml | 17 ++++-- .../recipe_legacy.yaml | 52 ------------------- 9 files changed, 65 insertions(+), 105 deletions(-) create mode 100644 docs/blog/posts/repack_emscripten.md rename recipes/recipes/emscripten_emscripten-wasm32/{LICENSE => LICENSE.txt} (100%) delete mode 100644 recipes/recipes/emscripten_emscripten-wasm32/recipe_legacy.yaml diff --git a/.github/workflows/build_recipes.yaml b/.github/workflows/build_recipes.yaml index 753496670..1f072fb54 100644 --- a/.github/workflows/build_recipes.yaml +++ b/.github/workflows/build_recipes.yaml @@ -59,14 +59,6 @@ jobs: cache-environment: true post-cleanup: 'all' - ################################################################ - # EMSDK - ################################################################ - - name: Setup emsdk - shell: bash -el {0} - run: | - ./emsdk/setup_emsdk.sh ${{ matrix.emsdk_ver }} $(pwd)/emsdk_install - ################################################################ # POST ENV INSTALL CONFIG ################################################################ diff --git a/docs/blog/.authors.yml b/docs/blog/.authors.yml index eebd7268c..e7aa3a399 100644 --- a/docs/blog/.authors.yml +++ b/docs/blog/.authors.yml @@ -5,3 +5,10 @@ authors: avatar: https://avatars.githubusercontent.com/u/904752?v=4 # Author avatar slug: DerThorsten # Author profile slug url: https://github.com/DerThorsten # Author website URL + + wolfv: + name: Wolf Vollprecht + description: main author of emscripten-forge + avatar: https://avatars.githubusercontent.com/u/885054?v=4 + slug: wolfv # Author profile slug + url: https://prefix.dev # Author website URL \ No newline at end of file diff --git a/docs/blog/posts/repack_emscripten.md b/docs/blog/posts/repack_emscripten.md new file mode 100644 index 000000000..48312e68c --- /dev/null +++ b/docs/blog/posts/repack_emscripten.md @@ -0,0 +1,15 @@ +--- +date: 2024-05-24 +category: + - rust + +authors: + - derthorsten + - wolfv +--- + +# Emscripten is now a proper package + +So far, the emscripten package was a bit of a hack. It relied on a text file `~.emsdkdir` in the home directory which contained the directory of the emscripten installation. This was not very nice, because it was hard to build packags for serveral emscripten versions. + +Now, emscripten is a repacked package which installs emscripten into the conda environment. This allows in principle to to compile packages for multiple emscripten versions. \ No newline at end of file diff --git a/pixi.toml b/pixi.toml index 7b8b049d2..e5c4c1c11 100644 --- a/pixi.toml +++ b/pixi.toml @@ -6,16 +6,6 @@ authors = ["DerThorsten "] channels = ["conda-forge"] platforms = ["osx-arm64", "linux-64"] -############################################ -# setup-emsdk feature / tasks -############################################ -[feature.feature_setup_emsdk] -[feature.feature_setup_emsdk.dependencies] -cxx-compiler = "1.5.2.*" -[feature.feature_setup_emsdk.tasks.setup-emsdk] -cmd = ["./emsdk/setup_emsdk.sh", "3.1.45", "$(pwd)/emscripten_forge_emsdk_install"] -outputs = ["emscripten_forge_emsdk_install/emsdk_env.sh"] - ############################################ # rattler-build feature / tasks @@ -40,7 +30,6 @@ cmd = [ "--recipe", "recipes/recipes/emscripten_emscripten-wasm32" ] -depends_on = ["setup-emsdk"] [feature.feature_rattler_build.tasks.build-cross-python-pkg] cmd = [ @@ -56,7 +45,6 @@ cmd = [ "--recipe", "recipes/recipes/cross-python_emscripten-wasm32" ] -depends_on = ["setup-emsdk"] [feature.feature_rattler_build.tasks.build-pytester-pkg] cmd = [ @@ -72,7 +60,6 @@ cmd = [ "--recipe", "recipes/recipes/pytester" ] -depends_on = ["setup-emsdk"] [feature.feature_rattler_build.tasks.setup] @@ -118,6 +105,5 @@ cmd = ["mkdocs", "build"] ############################################ [environments] -setup-emsdk-env = ["feature_setup_emsdk"] rattler-build-env = ["feature_rattler_build"] documentation-env = ["feature_documentation"] \ No newline at end of file diff --git a/recipes/recipes/emscripten_emscripten-wasm32/LICENSE b/recipes/recipes/emscripten_emscripten-wasm32/LICENSE.txt similarity index 100% rename from recipes/recipes/emscripten_emscripten-wasm32/LICENSE rename to recipes/recipes/emscripten_emscripten-wasm32/LICENSE.txt diff --git a/recipes/recipes/emscripten_emscripten-wasm32/activate.sh b/recipes/recipes/emscripten_emscripten-wasm32/activate.sh index 8857c1794..ad0a7ed9f 100644 --- a/recipes/recipes/emscripten_emscripten-wasm32/activate.sh +++ b/recipes/recipes/emscripten_emscripten-wasm32/activate.sh @@ -1,4 +1,3 @@ - if [ -z ${CONDA_FORGE_EMSCRIPTEN_ACTIVATED+x} ]; then export CONDA_FORGE_EMSCRIPTEN_ACTIVATED=1 @@ -6,30 +5,10 @@ if [ -z ${CONDA_FORGE_EMSCRIPTEN_ACTIVATED+x} ]; then export EMSDK_PYTHON=${BUILD_PREFIX}/bin/python3 export PYTHON=${BUILD_PREFIX}/bin/python3 - - - - CONDA_EMSDK_DIR_CONFIG_FILE=$HOME/.emsdkdir - if test -f "$CONDA_EMSDK_DIR_CONFIG_FILE"; then - echo "Found config file $CONDA_EMSDK_DIR_CONFIG_FILE" - else - # return an error - echo "Config file $CONDA_EMSDK_DIR_CONFIG_FILE not found" - return 1 - fi - - + CONDA_EMSDK_DIR=$CONDA_PREFIX/opt/emsdk + export EMSCRIPTEN_VERSION=$PKG_VERSION - - export CONDA_EMSDK_DIR=$(<$CONDA_EMSDK_DIR_CONFIG_FILE) export EMSCRIPTEN_FORGE_EMSDK_DIR=$CONDA_EMSDK_DIR - echo "Using EMSCRIPTEN_FORGE_EMSDK_DIR $CONDA_EMSDK_DIR_CONFIG_FILE: " $EMSCRIPTEN_FORGE_EMSDK_DIR - - $CONDA_EMSDK_DIR/emsdk activate --embedded --build=Release $EMSCRIPTEN_VERSION - - source $CONDA_EMSDK_DIR/emsdk_env.sh - - export PATH="$CONDA_EMSDK_DIR/upstream/emscripten/":$PATH # clear all prexisting cmake args / CC / CXX / AR / RANLIB export CC="emcc" @@ -39,8 +18,6 @@ if [ -z ${CONDA_FORGE_EMSCRIPTEN_ACTIVATED+x} ]; then export CMAKE_ARGS="" - - # set the emscripten toolchain export CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=$CONDA_EMSDK_DIR/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake" @@ -82,5 +59,4 @@ if [ -z ${CONDA_FORGE_EMSCRIPTEN_ACTIVATED+x} ]; then # wasm bigint export LDFLAGS="$LDFLAGS -sWASM_BIGINT" - fi diff --git a/recipes/recipes/emscripten_emscripten-wasm32/build_compiler_package.sh b/recipes/recipes/emscripten_emscripten-wasm32/build_compiler_package.sh index 26fdde830..5365935bc 100644 --- a/recipes/recipes/emscripten_emscripten-wasm32/build_compiler_package.sh +++ b/recipes/recipes/emscripten_emscripten-wasm32/build_compiler_package.sh @@ -9,4 +9,31 @@ do done mkdir -p ${PREFIX}/bin -cp "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" ${PREFIX}/bin/activate_emscripten.sh \ No newline at end of file +cp "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" ${PREFIX}/bin/activate_emscripten.sh + +export EMSDK_PYTHON=${BUILD_PREFIX}/bin/python + +./emsdk install $PKG_VERSION + +# export EMSDK=/Users/wolfv/Programs/emscripten-forge/emscripten_forge_emsdk_install +export EMSDK=. + +mkdir -p $PREFIX/opt/emsdk/ +cp -r $EMSDK/upstream $PREFIX/opt/emsdk/upstream +rm -rf $PREFIX/opt/emsdk/upstream/emscripten/test/ + +mkdir -p $PREFIX/bin + +for file in $PREFIX/opt/emsdk/upstream/bin/*; do + echo "Linking $file" + ln -sf $file $PREFIX/bin/ +done + +for file in $PREFIX/opt/emsdk/upstream/emscripten/*; do + # Check if the file is executable + if [ -x "$file" ] && [ ! -d "$file" ]; then + # Create a symbolic link in the $PREFIX/bin directory + echo "Linking $file" + ln -sf $file $PREFIX/bin/ + fi +done diff --git a/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml b/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml index b666c2448..b3fd3626b 100644 --- a/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml +++ b/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml @@ -3,23 +3,31 @@ context: version: 3.1.45 build: - number: 25 + number: 26 outputs: - package: name: ${{ name|lower }} version: ${{ version }} + + source: + git: https://github.com/emscripten-core/emsdk.git build: script: build_compiler_package.sh + + dynamic_linking: + binary_relocation: false requirements: build: - - gettext + - curl + - python run: - python + - nodejs 16.* run_exports: - - ${{ pin_subpackage('emscripten-abi', min_pin='x.x.x', max_pin='x.x.x') }} + - ${{ pin_subpackage('emscripten-abi', min_pin='x.x.x', max_pin='x.x.x') }} - package: name: emscripten-abi @@ -33,7 +41,7 @@ outputs: about: homepage: https://emscripten.org license: MIT - license_file: LICENSE + license_file: LICENSE.txt summary: emscripten description: Emscripten is a complete compiler toolchain to WebAssembly, using LLVM, with a special focus on speed, size, and the Web platform. documentation: https://emscripten.org/ @@ -41,3 +49,4 @@ about: extra: recipe-maintainers: - DerThorsten + - wolfv diff --git a/recipes/recipes/emscripten_emscripten-wasm32/recipe_legacy.yaml b/recipes/recipes/emscripten_emscripten-wasm32/recipe_legacy.yaml deleted file mode 100644 index abc302619..000000000 --- a/recipes/recipes/emscripten_emscripten-wasm32/recipe_legacy.yaml +++ /dev/null @@ -1,52 +0,0 @@ -context: - name: emscripten_emscripten-wasm32 - version: 3.1.45 - -package: - name: '{{ name|lower }}' - version: '{{ version }}' - - -build: - number: 25 - - -outputs: - # TODO make run_exports work with boa - - package: - name: '{{ name | lower }}' - version: '{{ version }}' - - build: - script: build_compiler_package.sh - run_exports: - strong: - - "{{ pin_compatible('emscripten-abi', min_pin='x.x.x', max_pin='x.x.x') }}" - - requirements: - build: - - gettext - run: - - python - - - - package: - name: emscripten-abi - version: '{{ version }}' - build: - noarch: generic - script: - - echo "emscripten abi is built." - - -about: - home: https://emscripten.org/ - license: MIT - license_file: LICENSE - summary: emscripten - description: Emscripten is a complete compiler toolchain to WebAssembly, using LLVM, with a special focus on speed, size, and the Web platform. - doc_url: https://emscripten.org/ - -extra: - recipe-maintainers: - - DerThorsten From 67769248d37525f14df23eaa5c2bedbdd19cc59b Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Mon, 27 May 2024 13:55:11 +0200 Subject: [PATCH 058/129] continue on fail (#1071) --- .github/workflows/build_recipes.yaml | 2 +- recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_recipes.yaml b/.github/workflows/build_recipes.yaml index 1f072fb54..498ef30f8 100644 --- a/.github/workflows/build_recipes.yaml +++ b/.github/workflows/build_recipes.yaml @@ -98,6 +98,6 @@ jobs: mkdir -p ${GITHUB_WORKSPACE}/output/${platform} for package in $(ls ${GITHUB_WORKSPACE}/output/${platform}/*.tar.bz2); do echo "Uploading ${package} for ${platform} (build with rattler)" - QUETZ_API_KEY=${{ secrets.QUETZ_API_KEY}} quetz-client -u https://beta.mamba.pm post_file_to_channel emscripten-forge ${package} + QUETZ_API_KEY=${{ secrets.QUETZ_API_KEY}} quetz-client -u https://beta.mamba.pm post_file_to_channel emscripten-forge ${package} || true done done \ No newline at end of file diff --git a/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml b/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml index b3fd3626b..775f8be4e 100644 --- a/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml +++ b/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml @@ -3,7 +3,7 @@ context: version: 3.1.45 build: - number: 26 + number: 27 outputs: - package: From c2dec694fe7da9cbf9a377338537e3616a398bac Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Tue, 28 May 2024 08:27:53 +0200 Subject: [PATCH 059/129] Update xeus from 4.0.3 to 5.0.0 (#1072) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/xeus/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/xeus/recipe.yaml b/recipes/recipes_emscripten/xeus/recipe.yaml index 3f6cd929c..2b79ce757 100644 --- a/recipes/recipes_emscripten/xeus/recipe.yaml +++ b/recipes/recipes_emscripten/xeus/recipe.yaml @@ -1,6 +1,6 @@ context: - version: 4.0.3 + version: 5.0.0 package: @@ -9,7 +9,7 @@ package: source: url: https://github.com/jupyter-xeus/xeus/archive/refs/tags/${{ version }}.tar.gz - sha256: 67ca4c714f4157cd2b5ff99750b234f7c7b72b6baec0b878d8724b5ce14ba663 + sha256: eabe5dc274ad31a972e1249b070af609e6ad1adfa4c954fb120bcdc556dd6fc4 build: number: 0 From fe063945dbcbe63870a737140d574560f3053722 Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Tue, 28 May 2024 10:29:32 +0200 Subject: [PATCH 060/129] Removed xtl from the dependencies (#1073) --- recipes/recipes_emscripten/xeus/recipe.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/xeus/recipe.yaml b/recipes/recipes_emscripten/xeus/recipe.yaml index 2b79ce757..9bcf3620f 100644 --- a/recipes/recipes_emscripten/xeus/recipe.yaml +++ b/recipes/recipes_emscripten/xeus/recipe.yaml @@ -12,7 +12,7 @@ source: sha256: eabe5dc274ad31a972e1249b070af609e6ad1adfa4c954fb120bcdc556dd6fc4 build: - number: 0 + number: 1 requirements: build: @@ -21,7 +21,6 @@ requirements: - ninja host: - nlohmann_json - - xtl tests: - script: From 08df215c53632a91d73a333d8bbc5ad3b1ca71c0 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Tue, 28 May 2024 10:31:18 +0200 Subject: [PATCH 061/129] Update repack_emscripten.md --- docs/blog/posts/repack_emscripten.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/blog/posts/repack_emscripten.md b/docs/blog/posts/repack_emscripten.md index 48312e68c..3332facf3 100644 --- a/docs/blog/posts/repack_emscripten.md +++ b/docs/blog/posts/repack_emscripten.md @@ -10,6 +10,6 @@ authors: # Emscripten is now a proper package -So far, the emscripten package was a bit of a hack. It relied on a text file `~.emsdkdir` in the home directory which contained the directory of the emscripten installation. This was not very nice, because it was hard to build packags for serveral emscripten versions. +So far, the emscripten package was a bit of a hack. It relied on a text file `~.emsdkdir` in the home directory which contained the directory of the emscripten installation. This was not very nice, because it was hard to build packages for several emscripten versions. -Now, emscripten is a repacked package which installs emscripten into the conda environment. This allows in principle to to compile packages for multiple emscripten versions. \ No newline at end of file +But now, emscripten is a repacked package that installs emscripten into the conda environment. This allows in principle to compile packages for multiple emscripten versions. From 9076982a6ea90ab7f2f4f9c7437132b10e2bc0f9 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Wed, 29 May 2024 08:48:36 +0200 Subject: [PATCH 062/129] Update xeus-lite from 2.0.0 to 3.0.0 (#1075) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/xeus-lite/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/xeus-lite/recipe.yaml b/recipes/recipes_emscripten/xeus-lite/recipe.yaml index 69e72fc52..64934e98c 100644 --- a/recipes/recipes_emscripten/xeus-lite/recipe.yaml +++ b/recipes/recipes_emscripten/xeus-lite/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.0.0 + version: 3.0.0 package: name: xeus-lite @@ -7,7 +7,7 @@ package: source: url: https://github.com/jupyter-xeus/xeus-lite/archive/refs/tags/${{ version }}.tar.gz - sha256: 852acd70d80b3b92f934f0a089bfd73766311c34527b90c6ec04583b8ad1ff29 + sha256: e4ee23a6db767066b4be7dcea071585b1b43fae2fd33f626f7f25345b5ec3dca build: number: 0 From 8fcc157efc391ec0e0bde76117769e7bbe381a7c Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Wed, 29 May 2024 08:49:54 +0200 Subject: [PATCH 063/129] Update pythran from 0.16.0 to 0.16.1 (#1074) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/pythran/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/pythran/recipe.yaml b/recipes/recipes_emscripten/pythran/recipe.yaml index 877d5b36a..eac7a6fa8 100644 --- a/recipes/recipes_emscripten/pythran/recipe.yaml +++ b/recipes/recipes_emscripten/pythran/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 0.16.0 + version: 0.16.1 package: name: pythran @@ -7,7 +7,7 @@ package: source: url: https://github.com/serge-sans-paille/pythran/archive/refs/tags/${{ version}}.tar.gz - sha256: 56c42c745c4f253fb5053b3706345c6e111288f2f2df75e9dc265fff24e230de + sha256: a2510f370a7d62761844daa112a455785e5a6a216cf9ae704c3926fe68eb65ce patches: # this is necessary to fix a problem with mutable global # [wasm-validator error in module] unexpected true: Imported global cannot be mutable From afece4d460e82d64dec0b520c4dd9b7cad18afd2 Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Wed, 29 May 2024 10:00:20 +0200 Subject: [PATCH 064/129] Updated xeus-lite dependencies (#1076) --- recipes/recipes_emscripten/xeus-lite/recipe.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes/recipes_emscripten/xeus-lite/recipe.yaml b/recipes/recipes_emscripten/xeus-lite/recipe.yaml index 64934e98c..1efe83685 100644 --- a/recipes/recipes_emscripten/xeus-lite/recipe.yaml +++ b/recipes/recipes_emscripten/xeus-lite/recipe.yaml @@ -10,7 +10,7 @@ source: sha256: e4ee23a6db767066b4be7dcea071585b1b43fae2fd33f626f7f25345b5ec3dca build: - number: 0 + number: 1 requirements: build: @@ -19,8 +19,7 @@ requirements: - ninja host: - nlohmann_json - - xtl - - xeus >=4.0.1 + - xeus >=5.0.0 about: license: BSD-3-Clause From d00549c4571a2717628ad5407c8659de4e5dfcb9 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Wed, 29 May 2024 10:39:27 +0200 Subject: [PATCH 065/129] Update xeus-javascript from 0.3.4 to 0.4.0 (#1077) * Update xeus-javascript from 0.3.4 to 0.4.0 * bump deps --------- Co-authored-by: emscripten-forge-bot Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/xeus-javascript/recipe.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes/recipes_emscripten/xeus-javascript/recipe.yaml b/recipes/recipes_emscripten/xeus-javascript/recipe.yaml index 0a4455552..ddfa22e25 100644 --- a/recipes/recipes_emscripten/xeus-javascript/recipe.yaml +++ b/recipes/recipes_emscripten/xeus-javascript/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 0.3.4 + version: 0.4.0 package: name: xeus-javascript @@ -8,7 +8,7 @@ package: source: url: https://github.com/jupyter-xeus/xeus-javascript/archive/refs/tags/${{ version }}.tar.gz - sha256: 36d126af36dce3d3912776cb979e50cd66a819f370a930c075e0c6e743caae3e + sha256: d65edb4ce21aa066b08e091efed77c33b7911929075251afe195adef296afb79 build: number: 0 @@ -20,9 +20,9 @@ requirements: - ninja host: - nlohmann_json - - xeus-lite >=2.0.0 - - xeus >=4.0.2,<5.0 - - xtl >=0.7 + - xeus-lite >=3.0.0,<4.0 + - xeus >=5.0.0,<6.0 + tests: - script: From 1a686c85ef07da547a205bd8f505dc54fbc64ad7 Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Thu, 30 May 2024 11:26:24 +0530 Subject: [PATCH 066/129] update xeus to 5.1.0 --- recipes/recipes_emscripten/xeus/recipe.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/recipes_emscripten/xeus/recipe.yaml b/recipes/recipes_emscripten/xeus/recipe.yaml index 9bcf3620f..40498f0fe 100644 --- a/recipes/recipes_emscripten/xeus/recipe.yaml +++ b/recipes/recipes_emscripten/xeus/recipe.yaml @@ -1,6 +1,6 @@ context: - version: 5.0.0 + version: 5.1.0 package: @@ -9,10 +9,10 @@ package: source: url: https://github.com/jupyter-xeus/xeus/archive/refs/tags/${{ version }}.tar.gz - sha256: eabe5dc274ad31a972e1249b070af609e6ad1adfa4c954fb120bcdc556dd6fc4 + sha256: ff8f854ac5771bc43bd1f5fce45056c0881bfc1e489b59001655d338ecef8ec9 build: - number: 1 + number: 0 requirements: build: From 1d48549afeaf910fc555d35b290e64f7c04dabda Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Fri, 31 May 2024 16:14:55 +0530 Subject: [PATCH 067/129] Update xproperty to 0.12.0 (#1084) * Update xproperty to 0.12.0 * Added tests --- recipes/recipes_emscripten/xproperty/recipe.yaml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/recipes/recipes_emscripten/xproperty/recipe.yaml b/recipes/recipes_emscripten/xproperty/recipe.yaml index c4ef26d09..86a0dbc2f 100644 --- a/recipes/recipes_emscripten/xproperty/recipe.yaml +++ b/recipes/recipes_emscripten/xproperty/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 0.11.0 + version: 0.12.0 package: name: xproperty @@ -7,10 +7,10 @@ package: source: url: https://github.com/jupyter-xeus/xproperty/archive/refs/tags/${{ version }}.tar.gz - sha256: bf86a11c6758308aa0aa0f64d8dd24cd3e9d78378467b74002f552bfb75fc0eb + sha256: 27cbc8e441dcc515a1ebbf11bad5ef240748d32f5e1adf84deed87a1dc57a440 build: - number: 2 + number: 0 requirements: build: @@ -18,15 +18,19 @@ requirements: - cmake - ninja host: - - xtl >=0.7,<0.8 + - nlohmann_json >=3.11.2 run: - - xtl >=0.7,<0.8 + - nlohmann_json >=3.11.2 + +tests: +- script: + - test -f $PREFIX/include/xproperty/xproperty.hpp about: license: BSD-3-Clause license_family: BSD-3 license_file: LICENSE - summary: xtl + summary: Traitlets-like C++ properties and implementation of the observer pattern homepage: https://github.com/jupyter-xeus/xproperty extra: recipe-maintainers: From ce35a788aa9802aecb21767c2983770877eacd91 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Fri, 31 May 2024 18:51:03 +0530 Subject: [PATCH 068/129] Update xwidgets to 0.29.0 (#1083) * Update xwidgets to 0.29.0 * Added tests * Update xwidgets to 0.29.0 * Added more tests * Add test based on libxwidgets.a --- .../recipes_emscripten/xwidgets/recipe.yaml | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/recipes/recipes_emscripten/xwidgets/recipe.yaml b/recipes/recipes_emscripten/xwidgets/recipe.yaml index 9a78f328a..c7c4edac6 100644 --- a/recipes/recipes_emscripten/xwidgets/recipe.yaml +++ b/recipes/recipes_emscripten/xwidgets/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 0.28.1 + version: 0.29.0 package: name: xwidgets @@ -7,7 +7,7 @@ package: source: url: https://github.com/jupyter-xeus/xwidgets/archive/refs/tags/${{ version }}.tar.gz - sha256: ef399a813543e83180b3c4eeaac6d7c6baef94f9911bb74a0ebf2cfc98568ca0 + sha256: 07c789b7936b19a123f37ac1edfd0598a89f23e02d4eeffc9976817be68bee42 build: number: 0 @@ -18,21 +18,25 @@ requirements: - cmake - ninja host: - - xtl >=0.7,<0.8 - - nlohmann_json - - xeus >=3.0,<4.0 - - xproperty >=0.11.0,<0.12 + - nlohmann_json >=3.11 + - xeus >=5,<6 + - xproperty >=0.12.0,<0.13 run: - - xtl >=0.7,<0.8 - - nlohmann_json - - xeus >=3.0,<4.0 - - xproperty >=0.11.0,<0.12 + - nlohmann_json >=3.11 + - xeus >=5,<6 + - xproperty >=0.12.0,<0.13 + +tests: +- script: + - test -d $PREFIX/include/xwidgets + - test -f $PREFIX/include/xwidgets/xtransport.hpp + - test -f $PREFIX/lib/libxwidgets.a about: license: BSD-3-Clause license_family: BSD-3 license_file: LICENSE - summary: xtl + summary: C++ backend for Jupyter interactive widgets homepage: https://github.com/jupyter-xeus/xwidgets extra: recipe-maintainers: From 3916b29b7eee0808f7a86e5317de54b9e7c80413 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Sat, 1 Jun 2024 01:01:19 +0000 Subject: [PATCH 069/129] Update ipython from 8.24.0 to 8.25.0 --- recipes/recipes_emscripten/ipython/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/ipython/recipe.yaml b/recipes/recipes_emscripten/ipython/recipe.yaml index b16ffd7ec..7d320cf3d 100644 --- a/recipes/recipes_emscripten/ipython/recipe.yaml +++ b/recipes/recipes_emscripten/ipython/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 8.24.0 + version: 8.25.0 package: name: ipython @@ -7,7 +7,7 @@ package: source: - url: https://pypi.io/packages/source/i/ipython/ipython-${{ version }}.tar.gz - sha256: 010db3f8a728a578bb641fdd06c063b9fb8e96a9464c63aec6310fbcb5e80501 + sha256: c6ed726a140b6e725b911528f80439c534fac915246af3efc39440a6b0f9d716 patches: - patches/0001-Patch-asyncio-tornado.patch From a099bc7366aa232399b3f437d265bc43c3f1ff17 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Mon, 3 Jun 2024 12:03:05 +0530 Subject: [PATCH 070/129] Update xcanvas to 0.5.0 (#1087) --- recipes/recipes_emscripten/xcanvas/recipe.yaml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/recipes/recipes_emscripten/xcanvas/recipe.yaml b/recipes/recipes_emscripten/xcanvas/recipe.yaml index 8a653d560..94be115fe 100644 --- a/recipes/recipes_emscripten/xcanvas/recipe.yaml +++ b/recipes/recipes_emscripten/xcanvas/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 0.4.2 + version: 0.5.0 package: name: xcanvas @@ -7,7 +7,7 @@ package: source: url: https://github.com/jupyter-xeus/xcanvas/archive/refs/tags/${{ version }}.tar.gz - sha256: 697c83f1d34577c2c121fd83a72eabba12a73c14bef72b49a30289a8db0f0a55 + sha256: 6154f72dca8542ca738ad71e57ffe441f49cdd7f157dcb0a877170971a0fbd43 build: number: 0 @@ -18,14 +18,19 @@ requirements: - cmake - ninja host: - - xtl >=0.7,<0.8 - - xproperty >=0.11.0,<0.12 - - xwidgets >=0.28 + - xproperty >=0.12.0,<0.13 + - nlohmann_json >=3.11 + - xwidgets >=0.29.0,<0.30 + +tests: +- script: + - test -f $PREFIX/include/xcanvas/xcanvas.hpp + about: license: BSD-3-Clause license_family: BSD-3 license_file: LICENSE - summary: xtl + summary: C++ back-end for ipycanvas homepage: https://github.com/jupyter-xeus/xcanvas extra: recipe-maintainers: From ca22124c3dcaca4dfda1e42dceb44195bc272d3d Mon Sep 17 00:00:00 2001 From: Ian Thomas Date: Tue, 4 Jun 2024 17:24:48 +0100 Subject: [PATCH 071/129] Update numpy to 1.26.2 (#1091) --- recipes/recipes_emscripten/numpy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/numpy/recipe.yaml b/recipes/recipes_emscripten/numpy/recipe.yaml index 76a1d6d95..945399187 100644 --- a/recipes/recipes_emscripten/numpy/recipe.yaml +++ b/recipes/recipes_emscripten/numpy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 1.26.0 + version: 1.26.2 cross_target_plattform: emscripten-wasm32 target_plattform: emscripten-wasm32 @@ -9,7 +9,7 @@ package: source: url: https://github.com/numpy/numpy/releases/download/v${{ version }}/numpy-${{ version }}.tar.gz - sha256: f93fc78fe8bf15afe2b8d6b6499f1c73953169fad1e9a8dd086cdff3190e7fdf + sha256: f65738447676ab5777f11e6bbbdb8ce11b785e105f690bc45966574816b6d3ea build: number: 0 From 6c2ea3c2c4f7b36aeca355373d10d66e8a83d1d1 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Tue, 4 Jun 2024 22:02:35 +0530 Subject: [PATCH 072/129] Updated lfortran to 0.36.0 (#1088) --- recipes/recipes_emscripten/lfortran/build.sh | 5 ++++- recipes/recipes_emscripten/lfortran/recipe.yaml | 14 +++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/recipes/recipes_emscripten/lfortran/build.sh b/recipes/recipes_emscripten/lfortran/build.sh index 4b28e7e48..fe0b7b218 100644 --- a/recipes/recipes_emscripten/lfortran/build.sh +++ b/recipes/recipes_emscripten/lfortran/build.sh @@ -20,4 +20,7 @@ emcmake cmake \ emmake make -j8 # Install step -emmake make install \ No newline at end of file +emmake make install + +cp src/lfortran/tests/test_lfortran.js $PREFIX/bin/test_lfortran.js +cp src/lfortran/tests/test_lfortran.wasm $PREFIX/bin/test_lfortran.wasm \ No newline at end of file diff --git a/recipes/recipes_emscripten/lfortran/recipe.yaml b/recipes/recipes_emscripten/lfortran/recipe.yaml index 2fe7a169d..93a673a62 100644 --- a/recipes/recipes_emscripten/lfortran/recipe.yaml +++ b/recipes/recipes_emscripten/lfortran/recipe.yaml @@ -1,6 +1,6 @@ context: name: lfortran - version: 0.35.0 + version: 0.36.0 package: name: ${{ name }} @@ -9,10 +9,10 @@ package: source: url: https://github.com/lfortran/lfortran/releases/download/v${{ version }}/${{ name }}-${{ version }}.tar.gz - sha256: 5ecc1ae03067b985943c45f6ec05e9f6e72efd6ad004b052e7a98ba552ff79b0 + sha256: 6b3b7cb1380e96a98a9fd3166a3e7e43c3339f736f76029c246436784ffc868f build: - number: 2 + number: 0 requirements: build: @@ -33,6 +33,14 @@ requirements: host: - zlib +tests: +- script: + - test -f ${PREFIX}/lib/liblfortran_runtime.a + - node ${PREFIX}/bin/test_lfortran.js + requirements: + build: + - nodejs + about: license: BSD-3-Clause license_family: BSD From a2c92025bdb76a845cf455f8b76f4cd136cd1861 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Wed, 5 Jun 2024 16:33:47 +0200 Subject: [PATCH 073/129] Update pytest from 8.2.1 to 8.2.2 (#1093) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/pytest/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/pytest/recipe.yaml b/recipes/recipes_emscripten/pytest/recipe.yaml index 70909291b..be5fe78ae 100644 --- a/recipes/recipes_emscripten/pytest/recipe.yaml +++ b/recipes/recipes_emscripten/pytest/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 8.2.1 + version: 8.2.2 package: name: pytest @@ -7,7 +7,7 @@ package: source: url: https://pypi.io/packages/source/p/pytest/pytest-${{ version }}.tar.gz - sha256: 5046e5b46d8e4cac199c373041f26be56fdb81eb4e67dc11d4e10811fc3408fd + sha256: de4bb8104e201939ccdc688b27a89a7be2079b22e2bd2b07f806b6ba71117977 build: number: 0 From 190cc36cbfbff71ef0c76551e748093291b3d92c Mon Sep 17 00:00:00 2001 From: Ian Thomas Date: Wed, 5 Jun 2024 15:34:01 +0100 Subject: [PATCH 074/129] Update numpy to 1.26.3 (#1096) --- recipes/recipes_emscripten/numpy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/numpy/recipe.yaml b/recipes/recipes_emscripten/numpy/recipe.yaml index 945399187..4ce21a291 100644 --- a/recipes/recipes_emscripten/numpy/recipe.yaml +++ b/recipes/recipes_emscripten/numpy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 1.26.2 + version: 1.26.3 cross_target_plattform: emscripten-wasm32 target_plattform: emscripten-wasm32 @@ -9,7 +9,7 @@ package: source: url: https://github.com/numpy/numpy/releases/download/v${{ version }}/numpy-${{ version }}.tar.gz - sha256: f65738447676ab5777f11e6bbbdb8ce11b785e105f690bc45966574816b6d3ea + sha256: 697df43e2b6310ecc9d95f05d5ef20eacc09c7c4ecc9da3f235d39e71b7da1e4 build: number: 0 From 4607db836228bd957ea71ba2c41c6a036a572ee8 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Wed, 5 Jun 2024 16:34:12 +0200 Subject: [PATCH 075/129] Update xcanvas from 0.5.0 to 0.5.1 (#1095) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/xcanvas/recipe.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/recipes_emscripten/xcanvas/recipe.yaml b/recipes/recipes_emscripten/xcanvas/recipe.yaml index 94be115fe..6a7c0a0a0 100644 --- a/recipes/recipes_emscripten/xcanvas/recipe.yaml +++ b/recipes/recipes_emscripten/xcanvas/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 0.5.0 + version: 0.5.1 package: name: xcanvas @@ -7,7 +7,7 @@ package: source: url: https://github.com/jupyter-xeus/xcanvas/archive/refs/tags/${{ version }}.tar.gz - sha256: 6154f72dca8542ca738ad71e57ffe441f49cdd7f157dcb0a877170971a0fbd43 + sha256: 08ca0adc86cfd4e326c0541eea293392f256d715e6ad8b143dbaf64773338f8a build: number: 0 @@ -24,7 +24,7 @@ requirements: tests: - script: - - test -f $PREFIX/include/xcanvas/xcanvas.hpp + - test -f $PREFIX/include/xcanvas/xcanvas.hpp about: license: BSD-3-Clause From bdd4773bf7d0a96984df9cb6dc04b142ae70b8dc Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Wed, 5 Jun 2024 20:04:31 +0530 Subject: [PATCH 076/129] Updated xeus-cpp to 0.5.0 (#1092) * Updated xeus-cpp to 0.5.0 * empty commit --- .../recipes_emscripten/xeus-cpp/recipe.yaml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/recipes/recipes_emscripten/xeus-cpp/recipe.yaml b/recipes/recipes_emscripten/xeus-cpp/recipe.yaml index c8e887fb7..9c8eaca21 100644 --- a/recipes/recipes_emscripten/xeus-cpp/recipe.yaml +++ b/recipes/recipes_emscripten/xeus-cpp/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 0.4.0 + version: 0.5.0 package: name: xeus-cpp @@ -7,10 +7,10 @@ package: source: url: https://github.com/compiler-research/xeus-cpp/archive/refs/tags/${{ version }}.tar.gz - sha256: 28b07534ff322ebe17fab1997cdf60d0fb811ee1d7fd518742a5d0d157e70e25 + sha256: 352400083227e3ef8f747ddaffe37ca19af6cd760254cb033114ea6027929aec build: - number: 1 + number: 0 requirements: build: @@ -19,21 +19,19 @@ requirements: - make # [unix] host: - nlohmann_json - - xeus-lite <2.0 - - xeus >=3.0.5,<4.0 - - xtl >=0.7,<0.8 + - xeus-lite >=3.0.0,<4.0 + - xeus >=5.0.0,<6.0 - cpp-argparse - pugixml - CppInterOp - tests: - script: - test -f $PREFIX/bin/xcpp.wasm - test -f $PREFIX/bin/xcpp.js - - test -f $PREFIX/share/jupyter/kernels/xcpp/kernel.json - - test -f $PREFIX/share/jupyter/kernels/xcpp/logo-32x32.png - - test -f $PREFIX/share/jupyter/kernels/xcpp/logo-64x64.png + - test -f $PREFIX/share/jupyter/kernels/xcpp17/kernel.json + - test -f $PREFIX/share/jupyter/kernels/xcpp17/logo-32x32.png + - test -f $PREFIX/share/jupyter/kernels/xcpp17/logo-64x64.png about: license: BSD-3-Clause From 0c215869c3c4861ae27502a6db9c1a0b74ac3b02 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Thu, 6 Jun 2024 15:34:37 +0200 Subject: [PATCH 077/129] Update docs and platforms (#1098) * Update recipe name * Add osx-64 platform --- docs/development/local_builds.md | 8 ++++---- pixi.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/development/local_builds.md b/docs/development/local_builds.md index 9c46738e4..5fba6257a 100644 --- a/docs/development/local_builds.md +++ b/docs/development/local_builds.md @@ -45,13 +45,13 @@ I.e. if you open a new terminal, you have to activate the environment again with This is only needed for MacOS. On Linux, the compiler packages are already built and available in the `emscripten-forge` channel. ```bash -rattler-build build --recipe recipes/recipes/emscripten_emscripten-wasm32/rattler_recipe.yaml -c https://repo.mamba.pm/emscripten-forge -c conda-forge -c microsoft -m conda_build_config.yaml -rattler-build build --recipe recipes/recipes/cross-python_emscripten-wasm32/rattler_recipe.yaml -c https://repo.mamba.pm/emscripten-forge -c conda-forge -c microsoft -m conda_build_config.yaml -rattler-build build --recipe recipes/recipes/pytester/rattler_recipe.yaml -c https://repo.mamba.pm/emscripten-forge -c conda-forge -c microsoft -m conda_build_config.yaml +rattler-build build --recipe recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml -c https://repo.mamba.pm/emscripten-forge -c conda-forge -c microsoft -m conda_build_config.yaml +rattler-build build --recipe recipes/recipes/cross-python_emscripten-wasm32/recipe.yaml -c https://repo.mamba.pm/emscripten-forge -c conda-forge -c microsoft -m conda_build_config.yaml +rattler-build build --recipe recipes/recipes/pytester/recipe.yaml -c https://repo.mamba.pm/emscripten-forge -c conda-forge -c microsoft -m conda_build_config.yaml ``` ### Build packages with `rattler-build`: ```bash -rattler-build build --recipe recipes/recipes_emscripten/regex/rattler_recipe.yaml --target-platform=emscripten-wasm32 -c https://repo.mamba.pm/emscripten-forge -c conda-forge -c microsoft -m conda_build_config.yaml +rattler-build build --recipe recipes/recipes_emscripten/regex/recipe.yaml --target-platform=emscripten-wasm32 -c https://repo.mamba.pm/emscripten-forge -c conda-forge -c microsoft -m conda_build_config.yaml ``` \ No newline at end of file diff --git a/pixi.toml b/pixi.toml index e5c4c1c11..554dd4455 100644 --- a/pixi.toml +++ b/pixi.toml @@ -4,7 +4,7 @@ version = "0.1.0" description = "The emscripten-forge for emscripten-wasm32- builds." authors = ["DerThorsten "] channels = ["conda-forge"] -platforms = ["osx-arm64", "linux-64"] +platforms = ["osx-arm64", "osx-64", "linux-64"] ############################################ From a1cfee9e6f7ff66923fa77c8b4c56981ebb38f27 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Thu, 6 Jun 2024 00:58:34 +0000 Subject: [PATCH 078/129] Update numpy from 1.26.3 to 1.26.4 --- recipes/recipes_emscripten/numpy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/numpy/recipe.yaml b/recipes/recipes_emscripten/numpy/recipe.yaml index 4ce21a291..d3e8e751d 100644 --- a/recipes/recipes_emscripten/numpy/recipe.yaml +++ b/recipes/recipes_emscripten/numpy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 1.26.3 + version: 1.26.4 cross_target_plattform: emscripten-wasm32 target_plattform: emscripten-wasm32 @@ -9,7 +9,7 @@ package: source: url: https://github.com/numpy/numpy/releases/download/v${{ version }}/numpy-${{ version }}.tar.gz - sha256: 697df43e2b6310ecc9d95f05d5ef20eacc09c7c4ecc9da3f235d39e71b7da1e4 + sha256: 2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010 build: number: 0 From 78443823ff89f0e5c09a10b040fbfcab038781ea Mon Sep 17 00:00:00 2001 From: KGB99 <80490551+KGB99@users.noreply.github.com> Date: Fri, 7 Jun 2024 10:29:26 +0200 Subject: [PATCH 079/129] build and recipe for xxhash (#1099) * build and recipe for xxhash * restore pixi.lock * remove CFLAGS variable * add existence tests * remove selectors --- pixi.toml | 2 +- recipes/recipes_emscripten/xxhash/build.sh | 7 ++++ recipes/recipes_emscripten/xxhash/recipe.yaml | 42 +++++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 recipes/recipes_emscripten/xxhash/build.sh create mode 100644 recipes/recipes_emscripten/xxhash/recipe.yaml diff --git a/pixi.toml b/pixi.toml index 554dd4455..2ceccdc42 100644 --- a/pixi.toml +++ b/pixi.toml @@ -106,4 +106,4 @@ cmd = ["mkdocs", "build"] [environments] rattler-build-env = ["feature_rattler_build"] -documentation-env = ["feature_documentation"] \ No newline at end of file +documentation-env = ["feature_documentation"] diff --git a/recipes/recipes_emscripten/xxhash/build.sh b/recipes/recipes_emscripten/xxhash/build.sh new file mode 100644 index 000000000..1a72bae7e --- /dev/null +++ b/recipes/recipes_emscripten/xxhash/build.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -euxo pipefail + +# Build step +emmake make install -j8 + diff --git a/recipes/recipes_emscripten/xxhash/recipe.yaml b/recipes/recipes_emscripten/xxhash/recipe.yaml new file mode 100644 index 000000000..1e25ce4c2 --- /dev/null +++ b/recipes/recipes_emscripten/xxhash/recipe.yaml @@ -0,0 +1,42 @@ +context: + name: xxhash + version: 0.8.2 + +package: + name: ${{ name|lower }} + version: ${{ version }} + +source: + url: https://github.com/Cyan4973/${{ name }}/archive/v${{ version }}.tar.gz + sha256: baee0c6afd4f03165de7a4e67988d16f0f2b257b51d0e3cb91909302a26a79c4 + +build: + number: 0 + +requirements: + build: + - ${{ compiler('c') }} + - make + - cmake + +tests: +- script: + - test -f ${PREFIX}/lib/libxxhash.a + - test -f ${PREFIX}/include/xxhash.h + +about: + homepage: http://www.xxhash.com/ + license: BSD-2-Clause + license_file: LICENSE + summary: Extremely fast hash algorithm + description: | + xxHash is an Extremely fast Hash algorithm, running at RAM speed limits. It + successfully completes the SMHasher test suite which evaluates collision, + dispersion and randomness qualities of hash functions. Code is highly + portable, and hashes are identical on all platforms (little / big endian). + repository: https://github.com/Cyan4973/xxHash + documentation: https://github.com/Cyan4973/xxHash + +extra: + recipe-maintainers: + - KGB99 From 22468a029bc8ff2d83f9228e15092cb8b531fd8e Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Fri, 7 Jun 2024 14:22:15 +0200 Subject: [PATCH 080/129] Update xz from 5.2.10 to 5.2.11 (#1068) * Update xz from 5.2.10 to 5.2.11 * Add tests --------- Co-authored-by: emscripten-forge-bot Co-authored-by: Isabel Paredes --- recipes/recipes_emscripten/xz/build.sh | 5 ++++- recipes/recipes_emscripten/xz/recipe.yaml | 13 +++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/recipes/recipes_emscripten/xz/build.sh b/recipes/recipes_emscripten/xz/build.sh index 02fc2644f..214211113 100644 --- a/recipes/recipes_emscripten/xz/build.sh +++ b/recipes/recipes_emscripten/xz/build.sh @@ -6,4 +6,7 @@ emconfigure ../configure \ --enable-threads=no \ --prefix=$PREFIX -emmake make install \ No newline at end of file +emmake make install + +# Copy .wasm file also +cp src/xz/xz.wasm $PREFIX/bin/ diff --git a/recipes/recipes_emscripten/xz/recipe.yaml b/recipes/recipes_emscripten/xz/recipe.yaml index 0f361eb7d..597bf8243 100644 --- a/recipes/recipes_emscripten/xz/recipe.yaml +++ b/recipes/recipes_emscripten/xz/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 5.2.10 + version: 5.2.11 package: name: xz @@ -7,7 +7,7 @@ package: source: url: http://downloads.sourceforge.net/project/lzmautils/xz-${{ version }}.tar.bz2 - sha256: 01b71df61521d9da698ce3c33148bff06a131628ff037398c09482f3a26e5408 + sha256: 7859c47a5e909299e77d0e87e2bafc52fb1d09e35abac48b6426c1be213c5b37 build: number: 0 @@ -19,6 +19,15 @@ requirements: - automake - libtool +tests: +- script: + - test -f $PREFIX/lib/liblzma.a + - test -f $PREFIX/include/lzma.h + - node $PREFIX/bin/xz --version + requirements: + build: + - nodejs + about: homepage: http://tukaani.org/xz/ license: LGPL-2.1 AND GPL-2.0 From 6e7366d2ec30f2d6f50a2e1f875239f469632192 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 10 Jun 2024 11:32:41 +0200 Subject: [PATCH 081/129] Update pyjs from 2.0.0 to 2.0.1 (#1105) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/pyjs/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/pyjs/recipe.yaml b/recipes/recipes_emscripten/pyjs/recipe.yaml index 3f5695019..50b7c3248 100644 --- a/recipes/recipes_emscripten/pyjs/recipe.yaml +++ b/recipes/recipes_emscripten/pyjs/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.0.0 + version: 2.0.1 name: pyjs package: name: ${{name}} @@ -8,7 +8,7 @@ package: source: - url: https://github.com/emscripten-forge/${{name}}/archive/refs/tags/${{version}}.tar.gz - sha256: 668f36da03ab81d35850205c47e96e1c08afc20559d72dc3c734bba2c678b826 + sha256: 54146c30594dc1d4fccf93f4d9313bc389a488196498f99fa2eb74fa5c872dfa build: number: 1 From e7e713fdf823334e64c81137f12b524bc4e1573e Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Wed, 12 Jun 2024 18:05:40 +0200 Subject: [PATCH 082/129] Update xz from 5.2.11 to 5.2.12 (#1104) Co-authored-by: emscripten-forge-bot Co-authored-by: Isabel Paredes --- recipes/recipes_emscripten/xz/recipe.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/recipes/recipes_emscripten/xz/recipe.yaml b/recipes/recipes_emscripten/xz/recipe.yaml index 597bf8243..098d09903 100644 --- a/recipes/recipes_emscripten/xz/recipe.yaml +++ b/recipes/recipes_emscripten/xz/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 5.2.11 + version: 5.2.12 package: name: xz @@ -7,7 +7,7 @@ package: source: url: http://downloads.sourceforge.net/project/lzmautils/xz-${{ version }}.tar.bz2 - sha256: 7859c47a5e909299e77d0e87e2bafc52fb1d09e35abac48b6426c1be213c5b37 + sha256: fbedff8eb67e229f2e95eb1ff920b255e405c86c9e1a53d4a6861d9823acff18 build: number: 0 @@ -21,12 +21,12 @@ requirements: tests: - script: - - test -f $PREFIX/lib/liblzma.a - - test -f $PREFIX/include/lzma.h - - node $PREFIX/bin/xz --version + - test -f $PREFIX/lib/liblzma.a + - test -f $PREFIX/include/lzma.h + - node $PREFIX/bin/xz --version requirements: build: - - nodejs + - nodejs about: homepage: http://tukaani.org/xz/ From 95d26bd5b94c00786ca27129e9a0b42cde9a1bbd Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Wed, 12 Jun 2024 18:31:06 +0200 Subject: [PATCH 083/129] Update fribidi from 1.0.14 to 1.0.15 (#1103) * Update fribidi from 1.0.14 to 1.0.15 * Add tests --------- Co-authored-by: emscripten-forge-bot Co-authored-by: Isabel Paredes --- .../recipes_emscripten/fribidi/recipe.yaml | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/recipes/recipes_emscripten/fribidi/recipe.yaml b/recipes/recipes_emscripten/fribidi/recipe.yaml index c23d37513..ada40db87 100644 --- a/recipes/recipes_emscripten/fribidi/recipe.yaml +++ b/recipes/recipes_emscripten/fribidi/recipe.yaml @@ -1,22 +1,28 @@ context: - version: "1.0.14" + version: 1.0.15 package: name: fribidi version: ${{ version }} source: - url: https://github.com/fribidi/fribidi/releases/download/v${{ version }}/fribidi-${{ version }}.tar.xz - sha256: 76ae204a7027652ac3981b9fa5817c083ba23114340284c58e756b259cd2259a + url: https://github.com/fribidi/fribidi/releases/download/v${{ version }}/fribidi-${{ + version }}.tar.xz + sha256: 0bbc7ff633bfa208ae32d7e369cf5a7d20d5d2557a0b067c9aa98bcbf9967587 build: number: 0 requirements: build: - - ${{ compiler('c') }} - - pkg-config - - gettext + - ${{ compiler('c') }} + - pkg-config + - gettext + +tests: +- script: + - test -f ${PREFIX}/lib/libfribidi.a + - test -f ${PREFIX}/include/fribidi/fribidi.h about: homepage: https://github.com/fribidi/fribidi @@ -29,4 +35,4 @@ about: have proper Arabic and Hebrew support, the bidi algorithm needs to be implemented. It is our hope that this library will stimulate more free software in the Middle Eastern countries. - repository: https://github.com/fribidi/fribidi \ No newline at end of file + repository: https://github.com/fribidi/fribidi From 7b9c7b843dac1285c3d0452bedba495e5c943ebe Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Wed, 12 Jun 2024 19:03:45 +0200 Subject: [PATCH 084/129] Update highs from 1.7.0 to 1.7.1 (#1110) * Update highs from 1.7.0 to 1.7.1 * Remove legacy recipe * Fix formatting * Update build flags --------- Co-authored-by: emscripten-forge-bot Co-authored-by: Isabel Paredes --- recipes/recipes_emscripten/highs/build.sh | 5 ++- recipes/recipes_emscripten/highs/recipe.yaml | 16 ++++---- .../highs/recipe_legacy.yaml | 41 ------------------- 3 files changed, 13 insertions(+), 49 deletions(-) delete mode 100644 recipes/recipes_emscripten/highs/recipe_legacy.yaml diff --git a/recipes/recipes_emscripten/highs/build.sh b/recipes/recipes_emscripten/highs/build.sh index 6d08e0b80..5dadd7498 100644 --- a/recipes/recipes_emscripten/highs/build.sh +++ b/recipes/recipes_emscripten/highs/build.sh @@ -2,5 +2,8 @@ mkdir build cd build -emcmake cmake ${CMAKE_ARGS} -DBUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=$PREFIX $SRC_DIR -DCMAKE_INSTALL_LIBDIR=lib .. +emcmake cmake ${CMAKE_ARGS} \ + -DBUILD_TESTING=OFF \ + -DCMAKE_INSTALL_PREFIX=$PREFIX $SRC_DIR \ + -DCMAKE_INSTALL_LIBDIR=lib .. emmake make install \ No newline at end of file diff --git a/recipes/recipes_emscripten/highs/recipe.yaml b/recipes/recipes_emscripten/highs/recipe.yaml index 3bbe12614..d997beefe 100644 --- a/recipes/recipes_emscripten/highs/recipe.yaml +++ b/recipes/recipes_emscripten/highs/recipe.yaml @@ -1,6 +1,6 @@ context: name: highs - version: 1.7.0 + version: 1.7.1 package: name: ${{ name }} @@ -8,7 +8,7 @@ package: source: url: https://github.com/ERGO-Code/${{ name }}/archive/refs/tags/v${{ version }}.tar.gz - sha256: d10175ad66e7f113ac5dc00c9d6650a620663a6884fbf2942d6eb7a3d854604f + sha256: 65c6f9fc2365ced42ee8eb2d209a0d3a7942cd59ff4bd20464e195c433f3a885 build: number: 0 @@ -19,6 +19,12 @@ requirements: - cmake - make +tests: +- script: + - test -f ${PREFIX}/bin/highs.js + - test -f ${PREFIX}/include/highs/Highs.h + - test -f ${PREFIX}/lib/libhighs.a + about: summary: HiGHS is a high performance serial and parallel solver for large scale sparse linear optimization problems @@ -28,11 +34,7 @@ about: license_family: MIT license_file: LICENSE.txt homepage: https://github.com/ERGO-Code/HiGHS + extra: recipe-maintainers: - DerThorsten -tests: -- script: - - test -f ${PREFIX}/bin/highs.js - - test -f ${PREFIX}/include/highs/Highs.h - - test -f ${PREFIX}/lib/libhighs.a diff --git a/recipes/recipes_emscripten/highs/recipe_legacy.yaml b/recipes/recipes_emscripten/highs/recipe_legacy.yaml deleted file mode 100644 index 87fa7daeb..000000000 --- a/recipes/recipes_emscripten/highs/recipe_legacy.yaml +++ /dev/null @@ -1,41 +0,0 @@ -context: - name: highs - version: 1.7.0 - -package: - name: '{{ name }}' - version: '{{ version }}' - -source: - url: https://github.com/ERGO-Code/{{ name }}/archive/refs/tags/v{{ version }}.tar.gz - sha256: d10175ad66e7f113ac5dc00c9d6650a620663a6884fbf2942d6eb7a3d854604f - -build: - number: 0 - -requirements: - build: - - '{{ compiler("cxx") }}' - - cmake - - make - -test: - commands: - - test -f ${PREFIX}/bin/highs.js - - test -f ${PREFIX}/include/highs/Highs.h - - test -f ${PREFIX}/lib/libhighs.a - -about: - home: https://github.com/ERGO-Code/HiGHS - summary: HiGHS is a high performance serial and parallel solver for large scale sparse linear optimization problems - description: | - HiGHS is a high performance serial and parallel solver for large scale sparse linear optimization problems - license: MIT - license_family: MIT - license_file: LICENSE.txt - doc_url: https://highs.dev - dev_url: https://github.com/ERGO-Code/HiGHS - -extra: - recipe-maintainers: - - DerThorsten From f5d5e4f11473b8a6a5723cbd4c65372677c80906 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Wed, 12 Jun 2024 19:10:03 +0200 Subject: [PATCH 085/129] Update freetype from 2.13.0 to 2.13.1 (#1070) * Update freetype from 2.13.0 to 2.13.1 * add sha256 checksum (#1113) * add existence tests (#1114) --------- Co-authored-by: emscripten-forge-bot Co-authored-by: KGB99 <80490551+KGB99@users.noreply.github.com> Co-authored-by: Isabel Paredes --- recipes/recipes_emscripten/freetype/recipe.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/freetype/recipe.yaml b/recipes/recipes_emscripten/freetype/recipe.yaml index eb684bf7b..da7f4bca0 100644 --- a/recipes/recipes_emscripten/freetype/recipe.yaml +++ b/recipes/recipes_emscripten/freetype/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.13.0 + version: 2.13.1 package: name: freetype @@ -7,7 +7,7 @@ package: source: url: https://download.savannah.gnu.org/releases/freetype/freetype-${{ version }}.tar.gz - sha256: a7aca0e532a276ea8d85bd31149f0a74c33d19c8d287116ef8f5f8357b4f1f80 + sha256: 0b109c59914f25b4411a8de2a506fdd18fa8457eb86eca6c7b15c19110a92fa5 build: number: 0 @@ -20,6 +20,11 @@ requirements: host: # - libpng # - zlib +tests: +- script: + - test -f $PREFIX/include/freetype2/freetype/freetype.h + - test -f $PREFIX/include/freetype2/ft2build.h + - test -f $PREFIX/lib/libfreetype.a about: homepage: https://www.freetype.org/ From 00fb066e34448539a7c5b014a545a64208ab1e71 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Wed, 12 Jun 2024 19:21:14 +0200 Subject: [PATCH 086/129] Update xeus-python from 0.16.0 to 0.17.0 (#1089) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/xeus-python/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/xeus-python/recipe.yaml b/recipes/recipes_emscripten/xeus-python/recipe.yaml index ec4b9797e..275ff3263 100644 --- a/recipes/recipes_emscripten/xeus-python/recipe.yaml +++ b/recipes/recipes_emscripten/xeus-python/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 0.16.0 + version: 0.17.0 package: name: xeus-python @@ -7,7 +7,7 @@ package: source: url: https://github.com/jupyter-xeus/xeus-python/archive/refs/tags/${{ version }}.tar.gz - sha256: a9936219650dce05b05eeff5c57472004c098b1fd7145fc2c14c95dbea8e9a3b + sha256: 8cf23dccc8b9f17a663178bed7445280fef4fe95d3b4a9cfd8167a4fddab7035 build: From f6847298ca7065fcedfd3ea7536c571cf7aa17ba Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 13 Jun 2024 09:49:06 +0200 Subject: [PATCH 087/129] Update xz from 5.2.12 to 5.2.13 (#1117) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/xz/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/xz/recipe.yaml b/recipes/recipes_emscripten/xz/recipe.yaml index 098d09903..83431bae7 100644 --- a/recipes/recipes_emscripten/xz/recipe.yaml +++ b/recipes/recipes_emscripten/xz/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 5.2.12 + version: 5.2.13 package: name: xz @@ -7,7 +7,7 @@ package: source: url: http://downloads.sourceforge.net/project/lzmautils/xz-${{ version }}.tar.bz2 - sha256: fbedff8eb67e229f2e95eb1ff920b255e405c86c9e1a53d4a6861d9823acff18 + sha256: 620cdbfc31adbc7e3e5cd8c3c3aa9ffed9335f0ddc42719cf9afce5136a978c1 build: number: 0 From a7883c296fb4b07a4c8ed4642f4827e74912e3b9 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Thu, 13 Jun 2024 14:23:38 +0200 Subject: [PATCH 088/129] Update freetype from 2.13.1 to 2.13.2 (#1115) * Update freetype from 2.13.1 to 2.13.2 * Add sha256 --------- Co-authored-by: emscripten-forge-bot Co-authored-by: Isabel Paredes --- recipes/recipes_emscripten/freetype/recipe.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/freetype/recipe.yaml b/recipes/recipes_emscripten/freetype/recipe.yaml index da7f4bca0..ddee61da0 100644 --- a/recipes/recipes_emscripten/freetype/recipe.yaml +++ b/recipes/recipes_emscripten/freetype/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.13.1 + version: 2.13.2 package: name: freetype @@ -7,7 +7,7 @@ package: source: url: https://download.savannah.gnu.org/releases/freetype/freetype-${{ version }}.tar.gz - sha256: 0b109c59914f25b4411a8de2a506fdd18fa8457eb86eca6c7b15c19110a92fa5 + sha256: 1ac27e16c134a7f2ccea177faba19801131116fd682efc1f5737037c5db224b5 build: number: 0 @@ -20,6 +20,7 @@ requirements: host: # - libpng # - zlib + tests: - script: - test -f $PREFIX/include/freetype2/freetype/freetype.h From 8b5315a60a3eaf15219d5236a2627fb0ec8b2577 Mon Sep 17 00:00:00 2001 From: KGB99 <80490551+KGB99@users.noreply.github.com> Date: Fri, 14 Jun 2024 11:34:22 +0100 Subject: [PATCH 089/129] Add Gtest (#1120) * add build and recipe * add gmock package * cleanup recipe * add existence tests * leave out gmock for now * cleanup recipe * cleanup and change cmake to emcmake --- recipes/recipes_emscripten/gtest/build.sh | 16 ++++++++ recipes/recipes_emscripten/gtest/recipe.yaml | 41 ++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 recipes/recipes_emscripten/gtest/build.sh create mode 100644 recipes/recipes_emscripten/gtest/recipe.yaml diff --git a/recipes/recipes_emscripten/gtest/build.sh b/recipes/recipes_emscripten/gtest/build.sh new file mode 100644 index 000000000..a36984053 --- /dev/null +++ b/recipes/recipes_emscripten/gtest/build.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -ex + +# Build and install dynamic library +mkdir -p build +cd build + +emcmake cmake ${CMAKE_ARGS} \ + -GNinja \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_CXX_STANDARD=17 \ + -DBUILD_SHARED_LIBS=OFF \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + .. +ninja install diff --git a/recipes/recipes_emscripten/gtest/recipe.yaml b/recipes/recipes_emscripten/gtest/recipe.yaml new file mode 100644 index 000000000..6852cf031 --- /dev/null +++ b/recipes/recipes_emscripten/gtest/recipe.yaml @@ -0,0 +1,41 @@ +context: + version: 1.14.0 + name: gtest + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://github.com/google/googletest/archive/refs/tags/v${{ version }}.tar.gz + sha256: 8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7 + +build: + number: 0 + +requirements: + build: + - ${{ compiler('cxx') }} + - cmake + - ninja + run_constraints: + - gmock ${{ version }} + run_exports: + - ${{ pin_subpackage('gtest', max_pin='x.x.x') }} +tests: + - script: + - test -f $PREFIX/lib/libgtest.a + - test -f $PREFIX/lib/libgmock.a + - test -f $PREFIX/include/gtest/gtest.h + - test -f $PREFIX/include/gmock/gmock.h + +about: + homepage: https://github.com/google/googletest + license: BSD-3-Clause + license_family: BSD + license_file: LICENSE + summary: Google's C++ test framework + +extra: + recipe-maintainers: + - KGB99 From 99e8feda959d57e1fb3ed0fe382c1bd45f2c0377 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Wed, 12 Jun 2024 14:09:28 +0200 Subject: [PATCH 090/129] Update version --- recipes/recipes_emscripten/xvega/recipe.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/recipes/recipes_emscripten/xvega/recipe.yaml b/recipes/recipes_emscripten/xvega/recipe.yaml index 753acd17e..a6ff1fb45 100644 --- a/recipes/recipes_emscripten/xvega/recipe.yaml +++ b/recipes/recipes_emscripten/xvega/recipe.yaml @@ -1,16 +1,17 @@ context: - version: 0.0.10 + name: xvega + version: 0.1.0 package: - name: xvega + name: ${{ name }} version: ${{ version }} source: - git: https://github.com/DerThorsten/xvega - rev: patch-1 + url: https://github.com/jupyter-xeus/${{ name }}/archive/${{ version }}.tar.gz + sha256: 750a19078693b7fcf34360745390e2df6158647b317152f2be9dd766936df74b build: - number: 6 + number: 0 requirements: build: @@ -19,7 +20,6 @@ requirements: - ninja host: - nlohmann_json - - xtl - xproperty about: @@ -27,7 +27,7 @@ about: license_family: BSD-3 license_file: LICENSE summary: xvega - homepage: https://github.com/QuantStack/xvega + homepage: https://github.com/jupyter-xeus/xvega extra: recipe-maintainers: - DerThorsten From 51f16d3d890557a1697e2c00cd663d4814b892de Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Wed, 12 Jun 2024 14:09:55 +0200 Subject: [PATCH 091/129] Add patch --- .../xvega/patches/disable_march.patch | 14 ++++++++++++++ recipes/recipes_emscripten/xvega/recipe.yaml | 2 ++ 2 files changed, 16 insertions(+) create mode 100644 recipes/recipes_emscripten/xvega/patches/disable_march.patch diff --git a/recipes/recipes_emscripten/xvega/patches/disable_march.patch b/recipes/recipes_emscripten/xvega/patches/disable_march.patch new file mode 100644 index 000000000..7e106bbde --- /dev/null +++ b/recipes/recipes_emscripten/xvega/patches/disable_march.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 11f0769..c7e8b92 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -369,7 +369,8 @@ macro(xvega_set_common_options target_name) + if (CMAKE_SYSTEM_PROCESSOR MATCHES "ppc|powerpc") + target_compile_options(${target_name} PUBLIC -mtune=native) + else () +- target_compile_options(${target_name} PUBLIC -march=native) ++ # target_compile_options(${target_name} PUBLIC -march=native) ++ message(STATUS "-march=native is not supported for wasm32-unknown-emscripten") + endif () + endif () + endif () diff --git a/recipes/recipes_emscripten/xvega/recipe.yaml b/recipes/recipes_emscripten/xvega/recipe.yaml index a6ff1fb45..4ed2d80db 100644 --- a/recipes/recipes_emscripten/xvega/recipe.yaml +++ b/recipes/recipes_emscripten/xvega/recipe.yaml @@ -9,6 +9,8 @@ package: source: url: https://github.com/jupyter-xeus/${{ name }}/archive/${{ version }}.tar.gz sha256: 750a19078693b7fcf34360745390e2df6158647b317152f2be9dd766936df74b + patches: + - patches/disable_march.patch build: number: 0 From e6c74e68a0f5f1afbb48464e7490e5f9bdc18cd4 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Wed, 12 Jun 2024 14:13:52 +0200 Subject: [PATCH 092/129] Add tests --- recipes/recipes_emscripten/xvega/recipe.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes/recipes_emscripten/xvega/recipe.yaml b/recipes/recipes_emscripten/xvega/recipe.yaml index 4ed2d80db..e763cad5e 100644 --- a/recipes/recipes_emscripten/xvega/recipe.yaml +++ b/recipes/recipes_emscripten/xvega/recipe.yaml @@ -24,6 +24,11 @@ requirements: - nlohmann_json - xproperty +tests: +- script: + - test -f $PREFIX/lib/libxvega.a + - test -f $PREFIX/include/xvega/xvega.hpp + about: license: BSD-3-Clause license_family: BSD-3 From 158979e4a026a61cae7d0b07400d3047e880d008 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Fri, 14 Jun 2024 12:41:34 +0200 Subject: [PATCH 093/129] Remove unused variable --- recipes/recipes_emscripten/xvega/build.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/recipes/recipes_emscripten/xvega/build.sh b/recipes/recipes_emscripten/xvega/build.sh index 3c589c727..13ae4d588 100644 --- a/recipes/recipes_emscripten/xvega/build.sh +++ b/recipes/recipes_emscripten/xvega/build.sh @@ -8,10 +8,9 @@ cmake ${CMAKE_ARGS} .. \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_PREFIX_PATH=$PREFIX \ -DCMAKE_INSTALL_PREFIX=$PREFIX \ - -DXVEGA_DISABLE_ARCH_NATIVE=ON \ - -DXVEGA_BUILD_SHARED=OFF \ - -DXVEGA_BUILD_STATIC=ON \ - -DCMAKE_POSITION_INDEPENDENT_CODE=ON + -DXVEGA_BUILD_SHARED=OFF \ + -DXVEGA_BUILD_STATIC=ON \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON # Build step ninja install From a3025731c47abfd00d331596ea74fc86e2c46a80 Mon Sep 17 00:00:00 2001 From: martinRenou Date: Fri, 14 Jun 2024 15:01:58 +0100 Subject: [PATCH 094/129] Revert pyjs bump + rebuild xeus-python (#1121) --- recipes/recipes_emscripten/pyjs/recipe.yaml | 9 ++++----- recipes/recipes_emscripten/xeus-python/recipe.yaml | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/recipes/recipes_emscripten/pyjs/recipe.yaml b/recipes/recipes_emscripten/pyjs/recipe.yaml index 50b7c3248..40d6f9df5 100644 --- a/recipes/recipes_emscripten/pyjs/recipe.yaml +++ b/recipes/recipes_emscripten/pyjs/recipe.yaml @@ -1,17 +1,16 @@ context: - version: 2.0.1 + version: 2.0.0 name: pyjs package: name: ${{name}} version: ${{ version }} source: -- url: - https://github.com/emscripten-forge/${{name}}/archive/refs/tags/${{version}}.tar.gz - sha256: 54146c30594dc1d4fccf93f4d9313bc389a488196498f99fa2eb74fa5c872dfa +- url: https://github.com/emscripten-forge/${{name}}/archive/refs/tags/${{version}}.tar.gz + sha256: 668f36da03ab81d35850205c47e96e1c08afc20559d72dc3c734bba2c678b826 build: - number: 1 + number: 2 requirements: build: diff --git a/recipes/recipes_emscripten/xeus-python/recipe.yaml b/recipes/recipes_emscripten/xeus-python/recipe.yaml index 275ff3263..7225ba486 100644 --- a/recipes/recipes_emscripten/xeus-python/recipe.yaml +++ b/recipes/recipes_emscripten/xeus-python/recipe.yaml @@ -11,7 +11,7 @@ source: build: - number: 4 + number: 5 requirements: build: From 66dfb619b4f305caa81f8984e6116bbe9de1b4a6 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Mon, 17 Jun 2024 11:03:07 +0200 Subject: [PATCH 095/129] pyjs, pytester updates (#1119) * add missing patches to emscripten compiler pkg * bump pyjs * added tests --- .github/workflows/build_recipes.yaml | 2 - .github/workflows/on_compiler_changes.yaml | 38 ++ .github/workflows/run_with_pixi.yaml | 2 - conda_build_config.yaml | 27 +- pixi.toml | 24 +- .../build_compiler_package.sh | 10 + ...Object-and-fs.readFile-in-loadLibDat.patch | 44 +++ ...l-error-when-symbol-resolution-fails.patch | 37 ++ .../patches/LICENSE | 373 ++++++++++++++++++ .../emscripten_emscripten-wasm32/recipe.yaml | 2 +- recipes/recipes/pytester/recipe.yaml | 15 +- recipes/recipes_emscripten/pyjs/recipe.yaml | 56 ++- 12 files changed, 597 insertions(+), 33 deletions(-) create mode 100644 .github/workflows/on_compiler_changes.yaml create mode 100644 recipes/recipes/emscripten_emscripten-wasm32/patches/0001-Add-back-fs.findObject-and-fs.readFile-in-loadLibDat.patch create mode 100644 recipes/recipes/emscripten_emscripten-wasm32/patches/0001-Add-useful-error-when-symbol-resolution-fails.patch create mode 100644 recipes/recipes/emscripten_emscripten-wasm32/patches/LICENSE diff --git a/.github/workflows/build_recipes.yaml b/.github/workflows/build_recipes.yaml index 498ef30f8..c00d2af68 100644 --- a/.github/workflows/build_recipes.yaml +++ b/.github/workflows/build_recipes.yaml @@ -18,8 +18,6 @@ jobs: GITHUB_OWNER: "emscripten-forge" strategy: fail-fast: false - matrix: - emsdk_ver: ["3.1.45"] steps: ################################################################ diff --git a/.github/workflows/on_compiler_changes.yaml b/.github/workflows/on_compiler_changes.yaml new file mode 100644 index 000000000..e8315ad13 --- /dev/null +++ b/.github/workflows/on_compiler_changes.yaml @@ -0,0 +1,38 @@ +name: compile pyjs +on: + push: + branches: + - 'main' + paths: + - 'recipes/recipes/emscripten_emscripten-wasm3/**' + pull_request: + paths: + - 'recipes/recipes/emscripten_emscripten-wasm32/**' +jobs: + + build_simple_with_pixi: + runs-on: ubuntu-latest + env: + TARGET_PLATFORM: emscripten-wasm32 + GITHUB_OWNER: "emscripten-forge" + strategy: + fail-fast: false + + steps: + ################################################################ + # SETUP + ################################################################ + - name: Checkout repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + ################################################################ + # CONFIG + ################################################################ + - uses: prefix-dev/setup-pixi@v0.6.0 + with: + pixi-version: v0.20.1 + - run: | + pixi run setup + pixi run build-emscripten-wasm32-pkg recipes/recipes_emscripten/pyjs \ No newline at end of file diff --git a/.github/workflows/run_with_pixi.yaml b/.github/workflows/run_with_pixi.yaml index 03e3c5625..6015118ce 100644 --- a/.github/workflows/run_with_pixi.yaml +++ b/.github/workflows/run_with_pixi.yaml @@ -19,8 +19,6 @@ jobs: GITHUB_OWNER: "emscripten-forge" strategy: fail-fast: false - matrix: - emsdk_ver: ["3.1.45"] steps: ################################################################ diff --git a/conda_build_config.yaml b/conda_build_config.yaml index 7cec803e4..ea2ce3fa1 100644 --- a/conda_build_config.yaml +++ b/conda_build_config.yaml @@ -9,32 +9,35 @@ c_compiler: then: - clang -c_compiler_version: + + +cxx_compiler: - if: emscripten then: - - 3 + - emscripten - if: linux then: - - 9 + - gxx - if: osx then: - - 11 + - clangxx -cxx_compiler: +c_compiler_version: - if: emscripten then: - - emscripten + - 3.1.45 - if: linux then: - - gxx + - 9 - if: osx then: - - clangxx + - 11 + cxx_compiler_version: - if: emscripten then: - - 3 + - 3.1.45 - if: linux then: - 9 @@ -42,6 +45,12 @@ cxx_compiler_version: then: - 11 +zip_keys: + - + - cxx_compiler_version + - c_compiler_version + + cuda_compiler: - undefined cuda_compiler_version: diff --git a/pixi.toml b/pixi.toml index 2ceccdc42..1e1e46e99 100644 --- a/pixi.toml +++ b/pixi.toml @@ -12,7 +12,7 @@ platforms = ["osx-arm64", "osx-64", "linux-64"] ############################################ [feature.feature_rattler_build] [feature.feature_rattler_build.dependencies] -rattler-build = ">= 0.14.0" +rattler-build = ">= 0.17.0" python = "3.11.*" typer = "*" @@ -23,8 +23,8 @@ cmd = [ "--package-format", "tar-bz2", # channels "-c", "https://repo.mamba.pm/emscripten-forge", - "-c", "conda-forge", "-c", "microsoft", + "-c", "conda-forge", "--skip-existing", "local", "-m", "conda_build_config.yaml", "--recipe", @@ -38,8 +38,8 @@ cmd = [ "--package-format", "tar-bz2", # channels "-c", "https://repo.mamba.pm/emscripten-forge", - "-c", "conda-forge", "-c", "microsoft", + "-c", "conda-forge", "--skip-existing", "local", "-m", "conda_build_config.yaml", "--recipe", @@ -53,8 +53,8 @@ cmd = [ "--package-format", "tar-bz2", # channels "-c", "https://repo.mamba.pm/emscripten-forge", - "-c", "conda-forge", "-c", "microsoft", + "-c", "conda-forge", "--skip-existing", "local", "-m", "conda_build_config.yaml", "--recipe", @@ -73,9 +73,23 @@ cmd = [ "--package-format", "tar-bz2", # channels "-c", "https://repo.mamba.pm/emscripten-forge", - "-c", "conda-forge", "-c", "microsoft", + "-c", "conda-forge", "--target-platform", "emscripten-wasm32", + # "--skip-existing", "local", + "-m", "conda_build_config.yaml", + "--recipe" +] + +[feature.feature_rattler_build.tasks.build-pkg] +cmd = [ + "rattler-build","build", + # format + "--package-format", "tar-bz2", + # channels + "-c", "https://repo.mamba.pm/emscripten-forge", + "-c", "microsoft", + "-c", "conda-forge", "--skip-existing", "local", "-m", "conda_build_config.yaml", "--recipe" diff --git a/recipes/recipes/emscripten_emscripten-wasm32/build_compiler_package.sh b/recipes/recipes/emscripten_emscripten-wasm32/build_compiler_package.sh index 5365935bc..01803207e 100644 --- a/recipes/recipes/emscripten_emscripten-wasm32/build_compiler_package.sh +++ b/recipes/recipes/emscripten_emscripten-wasm32/build_compiler_package.sh @@ -18,6 +18,16 @@ export EMSDK_PYTHON=${BUILD_PREFIX}/bin/python # export EMSDK=/Users/wolfv/Programs/emscripten-forge/emscripten_forge_emsdk_install export EMSDK=. + +echo "emsdk patching" +pushd upstream/emscripten +cat $RECIPE_DIR/patches/*.patch | patch -p1 --verbose +popd +echo "...done" + + + + mkdir -p $PREFIX/opt/emsdk/ cp -r $EMSDK/upstream $PREFIX/opt/emsdk/upstream rm -rf $PREFIX/opt/emsdk/upstream/emscripten/test/ diff --git a/recipes/recipes/emscripten_emscripten-wasm32/patches/0001-Add-back-fs.findObject-and-fs.readFile-in-loadLibDat.patch b/recipes/recipes/emscripten_emscripten-wasm32/patches/0001-Add-back-fs.findObject-and-fs.readFile-in-loadLibDat.patch new file mode 100644 index 000000000..5212949cd --- /dev/null +++ b/recipes/recipes/emscripten_emscripten-wasm32/patches/0001-Add-back-fs.findObject-and-fs.readFile-in-loadLibDat.patch @@ -0,0 +1,44 @@ +From 0170462a78e86de9ee95017bfa7e4a3dd620a375 Mon Sep 17 00:00:00 2001 +From: Hood Chatham +Date: Fri, 2 Jun 2023 11:59:32 -0700 +Subject: [PATCH] Add back fs.findObject and fs.readFile in loadLibData + +See upstream PR: +https://github.com/emscripten-core/emscripten/pull/19513 +--- + src/library_dylink.js | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +diff --git a/src/library_dylink.js b/src/library_dylink.js +index d7676cdc2..f616d230d 100644 +--- a/src/library_dylink.js ++++ b/src/library_dylink.js +@@ -993,14 +993,23 @@ var LibraryDylink = { + #endif + + // for wasm, we can use fetch for async, but for fs mode we can only imitate it ++ var libData; + if (handle) { + var data = {{{ makeGetValue('handle', C_STRUCTS.dso.file_data, '*') }}}; + var dataSize = {{{ makeGetValue('handle', C_STRUCTS.dso.file_data_size, '*') }}}; + if (data && dataSize) { +- var libData = HEAP8.slice(data, data + dataSize); +- return flags.loadAsync ? Promise.resolve(libData) : libData; ++ libData = HEAP8.slice(data, data + dataSize); + } + } ++ if (!libData && flags.fs && flags.fs.findObject(libName)) { ++ libData = flags.fs.readFile(libName, {encoding: 'binary'}); ++ if (!(libData instanceof Uint8Array)) { ++ libData = new Uint8Array(libData); ++ } ++ } ++ if (libData) { ++ return flags.loadAsync ? Promise.resolve(libData) : libData; ++ } + + var libFile = locateFile(libName); + if (flags.loadAsync) { +-- +2.25.1 + diff --git a/recipes/recipes/emscripten_emscripten-wasm32/patches/0001-Add-useful-error-when-symbol-resolution-fails.patch b/recipes/recipes/emscripten_emscripten-wasm32/patches/0001-Add-useful-error-when-symbol-resolution-fails.patch new file mode 100644 index 000000000..ec50727a1 --- /dev/null +++ b/recipes/recipes/emscripten_emscripten-wasm32/patches/0001-Add-useful-error-when-symbol-resolution-fails.patch @@ -0,0 +1,37 @@ +From a8bdb50a29062ee70c8667e4fd94dde47917f8fa Mon Sep 17 00:00:00 2001 +From: Hood Chatham +Date: Fri, 19 May 2023 12:19:00 -0700 +Subject: [PATCH] Add useful error when symbol resolution fails + +Currently if symbol resolution fails, we get: +```js +TypeError: Cannot read properties of undefined (reading 'apply') +``` +It is very hard for newcomers to Emscripten to recognize this as a +symbol resolution error. Even for people experienced with this message, +it has the annoyance that it doesn't give any hint as to which symbol +went missing. + +This adds a descriptive error message with the name of the missing +symbol. +--- + src/library_dylink.js | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/library_dylink.js b/src/library_dylink.js +index d96e6b425..7f63b5c5e 100644 +--- a/src/library_dylink.js ++++ b/src/library_dylink.js +@@ -727,6 +727,9 @@ var LibraryDylink = { + var resolved; + stubs[prop] = function() { + if (!resolved) resolved = resolveSymbol(prop); ++ if (!resolved) { ++ throw new Error(`Dynamic linking error: cannot resolve symbol ${prop}`); ++ } + return resolved.apply(null, arguments); + }; + } +-- +2.25.1 + diff --git a/recipes/recipes/emscripten_emscripten-wasm32/patches/LICENSE b/recipes/recipes/emscripten_emscripten-wasm32/patches/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/recipes/recipes/emscripten_emscripten-wasm32/patches/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml b/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml index 775f8be4e..808b0cf45 100644 --- a/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml +++ b/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml @@ -3,7 +3,7 @@ context: version: 3.1.45 build: - number: 27 + number: 28 outputs: - package: diff --git a/recipes/recipes/pytester/recipe.yaml b/recipes/recipes/pytester/recipe.yaml index 393a568a8..970578612 100644 --- a/recipes/recipes/pytester/recipe.yaml +++ b/recipes/recipes/pytester/recipe.yaml @@ -13,7 +13,7 @@ outputs: version: ${{ version }} build: - number: 6 + number: 7 noarch: python @@ -21,20 +21,19 @@ outputs: host: - python run: - - pyjs_code_runner - if: linux then: - - playwright < 1.42 - - if: osx - then: - - playwright - + - pyjs_code_runner >= 3.0.0 + - microsoft::playwright <=1.42 + else: + - pyjs_code_runner >= 3.0.0 + - microsoft::playwright - package: name: pytester-run version: ${{ version }} build: - number: 6 + number: 7 noarch: generic requirements: run: diff --git a/recipes/recipes_emscripten/pyjs/recipe.yaml b/recipes/recipes_emscripten/pyjs/recipe.yaml index 40d6f9df5..69591a8fd 100644 --- a/recipes/recipes_emscripten/pyjs/recipe.yaml +++ b/recipes/recipes_emscripten/pyjs/recipe.yaml @@ -1,16 +1,16 @@ context: - version: 2.0.0 + version: 2.1.0 name: pyjs package: name: ${{name}} version: ${{ version }} - + source: -- url: https://github.com/emscripten-forge/${{name}}/archive/refs/tags/${{version}}.tar.gz - sha256: 668f36da03ab81d35850205c47e96e1c08afc20559d72dc3c734bba2c678b826 - + url: https://github.com/emscripten-forge/pyjs/archive/refs/tags/${{ version }}.tar.gz + sha256: 8633dfd8b5bf9403e6b9c02c582557dcc49226034689032939b547c7dc431000 build: - number: 2 + number: 6 + requirements: build: @@ -26,6 +26,50 @@ requirements: - libffi - pybind11 +tests: + - script: | + echo "install playwright" + playwright install + echo "test in browser (main thread)" + pyjs_code_runner run script \ + browser-main \ + --conda-env $PREFIX \ + --mount $(pwd)/tests:/tests \ + --script main.py \ + --work-dir /tests \ + --headless \ + --async-main \ + --no-cache + # worker + echo "test in browser (worker thread)" + pyjs_code_runner run script \ + browser-worker \ + --conda-env $PREFIX \ + --mount $(pwd)/tests:/tests \ + --script main.py \ + --work-dir /tests \ + --headless \ + --async-main \ + --no-cache + + requirements: + build: + - pytester + - if: linux + then: + - pyjs_code_runner >=3.0.0 + - microsoft::playwright <=1.42 + else: + - pyjs_code_runner >=3.0.0 + - microsoft::playwright + run: + - pytest + - numpy + files: + source: + - tests/**/* + + about: license: BSD-3-Clause license_family: BSD From 1e6d779a016d41afb20313dc9b1ab720e697ce9c Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Mon, 17 Jun 2024 11:13:31 +0200 Subject: [PATCH 096/129] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cbd7a3e96..e2f6c6f04 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # Emscripten forge [![CI](https://img.shields.io/badge/emscripten_forge-docs-yellow)](https://emscripten-forge.org) [![CI](https://img.shields.io/badge/emscripten_forge-blog-pink)](https://emscripten-forge.org/blog/) - + + Visit [emscripten-forge.org](https://emscripten-forge.org) for more information and the documentation. From d4411eca3472cbdcea1e614679b8ae574e6aedaa Mon Sep 17 00:00:00 2001 From: martinRenou Date: Mon, 17 Jun 2024 13:56:11 +0100 Subject: [PATCH 097/129] Rebuild xeus-python (#1124) --- recipes/recipes_emscripten/xeus-python/recipe.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/recipes_emscripten/xeus-python/recipe.yaml b/recipes/recipes_emscripten/xeus-python/recipe.yaml index 7225ba486..0ab3810ea 100644 --- a/recipes/recipes_emscripten/xeus-python/recipe.yaml +++ b/recipes/recipes_emscripten/xeus-python/recipe.yaml @@ -11,7 +11,7 @@ source: build: - number: 5 + number: 6 requirements: build: From 6ed7e4aaf68d147d7b5761e602bfde7ac758fcac Mon Sep 17 00:00:00 2001 From: KGB99 <80490551+KGB99@users.noreply.github.com> Date: Mon, 17 Jun 2024 19:54:12 +0100 Subject: [PATCH 098/129] Add Abseil-cpp (#1118) * add recipe and build * comment out output * build without tests * add existence tests, leave out gtest for now * cleanup recipe * attempt at gtest * add more existence tests * cleanup recipe * change cmake to emcmake * remove libabseil-tests * small fixes and rename dir --- recipes/recipes_emscripten/libabseil/build.sh | 19 ++++++++ .../recipes_emscripten/libabseil/recipe.yaml | 46 +++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 recipes/recipes_emscripten/libabseil/build.sh create mode 100644 recipes/recipes_emscripten/libabseil/recipe.yaml diff --git a/recipes/recipes_emscripten/libabseil/build.sh b/recipes/recipes_emscripten/libabseil/build.sh new file mode 100644 index 000000000..1a42b147b --- /dev/null +++ b/recipes/recipes_emscripten/libabseil/build.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +set -exuo pipefail + +mkdir -p build +cd build + +emcmake cmake -GNinja \ + ${CMAKE_ARGS} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_PREFIX_PATH=${PREFIX} \ + -DBUILD_SHARED_LIBS=OFF \ + -DABSL_PROPAGATE_CXX_STD=ON \ + .. + +# Build step +ninja install diff --git a/recipes/recipes_emscripten/libabseil/recipe.yaml b/recipes/recipes_emscripten/libabseil/recipe.yaml new file mode 100644 index 000000000..460d0fa02 --- /dev/null +++ b/recipes/recipes_emscripten/libabseil/recipe.yaml @@ -0,0 +1,46 @@ +context: + version: 20240116.2 + name: libabseil + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://github.com/abseil/abseil-cpp/archive/refs/tags/${{ version }}.tar.gz + sha256: 733726b8c3a6d39a4120d7e45ea8b41a434cdacde401cba500f14236c49b39dc + +build: + number: 0 + +requirements: + build: + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + - cmake + - ninja + +tests: + - script: + - test -f $PREFIX/lib/libabsl_base.a + - test -f $PREFIX/lib/libabsl_civil_time.a + - test -f $PREFIX/lib/libabsl_cord.a + - test -f $PREFIX/lib/libabsl_cordz_functions.a + - test -f $PREFIX/include/absl/synchronization/mutex.h + - test -f $PREFIX/include/absl/base/thread_annotations.h + +about: + homepage: https://github.com/abseil/abseil-cpp + license: Apache-2.0 + license_family: Apache + license_file: LICENSE + summary: Abseil Common Libraries (C++) + description: | + Abseil is an open-source collection of C++ code (compliant to C++11) + designed to augment the C++ standard library. + documentation: https://github.com/abseil/abseil-cpp + repository: https://github.com/abseil/abseil-cpp + +extra: + recipe-maintainers: + - KGB99 From 82d159fcd4e673eeebd362105cb356e4502721af Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:54:26 +0200 Subject: [PATCH 099/129] Update libxslt from 1.1.39 to 1.1.40 (#1116) * Update libxslt from 1.1.39 to 1.1.40 * Update package info * Add tests --------- Co-authored-by: emscripten-forge-bot Co-authored-by: Isabel Paredes --- recipes/recipes_emscripten/libxslt/build.sh | 5 ++- .../recipes_emscripten/libxslt/recipe.yaml | 42 +++++++++++++++---- 2 files changed, 37 insertions(+), 10 deletions(-) diff --git a/recipes/recipes_emscripten/libxslt/build.sh b/recipes/recipes_emscripten/libxslt/build.sh index 10b8da527..c8282d927 100644 --- a/recipes/recipes_emscripten/libxslt/build.sh +++ b/recipes/recipes_emscripten/libxslt/build.sh @@ -15,4 +15,7 @@ emconfigure ./configure \ emmake make -j ${CPU_COUNT:-3} chmod 755 xslt-config -emmake make install \ No newline at end of file +emmake make install + +# Copy wasm file also +cp ./xsltproc/xsltproc.wasm $PREFIX/bin/ diff --git a/recipes/recipes_emscripten/libxslt/recipe.yaml b/recipes/recipes_emscripten/libxslt/recipe.yaml index 6357deac3..7b504f599 100644 --- a/recipes/recipes_emscripten/libxslt/recipe.yaml +++ b/recipes/recipes_emscripten/libxslt/recipe.yaml @@ -1,17 +1,17 @@ context: - version: 1.1.39 + name: libxslt + version: 1.1.40 package: - name: libxslt + name: ${{ name }} version: ${{ version }} source: - url: https://download.gnome.org/sources/libxslt/${{ version[0:3] }}/libxslt-${{ - version }}.tar.xz - sha256: 2a20ad621148339b0759c4d4e96719362dee64c9a096dbba625ba053846349f0 + url: https://download.gnome.org/sources/${{ name }}/${{ version[0:3] }}/${{ name }}-${{ version }}.tar.xz + sha256: 194715db023035f65fb566402f2ad2b5eab4c29d541f511305c40b29b1f48d13 build: - number: 1 + number: 0 requirements: build: @@ -19,6 +19,30 @@ requirements: - gnuconfig host: - libxml2 - - zlib - run: - - libxml2 + +tests: +- script: + - node $PREFIX/bin/xsltproc --version + - test -f $PREFIX/lib/libxslt.a + - test -f $PREFIX/include/libxslt/xslt.h + requirements: + build: + - nodejs + +about: + homepage: https://gitlab.gnome.org/GNOME/libxslt + license: MIT + license_file: COPYING + summary: The XSLT C library developed for the GNOME project + description: | + "Libxslt is the XSLT C library developed for the GNOME project. + XSLT itself is a an XML language to define transformation for XML. + Libxslt is based on libxml2 the XML C library developed for the GNOME project. + It also implements most of the EXSLT set of processor-portable extensions functions + and some of Saxon's evaluate and expressions extensions." + documentation: https://gitlab.gnome.org/GNOME/libxslt/-/wikis + repository: https://gitlab.gnome.org/GNOME/libxslt + +extra: + recipe-maintainers: + - IsabelParedes From bfd918b9c9b9900d765117547cdbcbfb148ac952 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:54:46 +0200 Subject: [PATCH 100/129] Update libxml2 from 2.12.3 to 2.12.4 (#1078) Co-authored-by: emscripten-forge-bot Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/libxml2/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/libxml2/recipe.yaml b/recipes/recipes_emscripten/libxml2/recipe.yaml index 8a3f881d3..c92979910 100644 --- a/recipes/recipes_emscripten/libxml2/recipe.yaml +++ b/recipes/recipes_emscripten/libxml2/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.12.3 + version: 2.12.4 package: @@ -9,7 +9,7 @@ package: source: url: https://gitlab.gnome.org/GNOME/libxml2/-/archive/v${{ version }}/libxml2-v${{ version }}.tar.gz - sha256: 342de599cb988a514bd45d2d8f6c064f636a57cfa0174d894041ac22383cff63 + sha256: 8a65bc0b4d83396e02d781c7a65aedca5a5984f87ff7f2fa86d9f9d2cf60acc3 build: From 0846d52241fcb71ae373fd670988f0b87a75384f Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Tue, 18 Jun 2024 08:58:24 +0200 Subject: [PATCH 101/129] changed channel prio (#1126) * changed channel prio * change min/max to lower/upper bound --- emci/rattler_build.py | 2 +- recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/emci/rattler_build.py b/emci/rattler_build.py index 1d5a1b10a..c3e5543b3 100644 --- a/emci/rattler_build.py +++ b/emci/rattler_build.py @@ -30,8 +30,8 @@ def build_with_rattler(recipe=None, recipes_dir=None, emscripten_wasm32=False, s # add conda forge and emscripten-forge channels cmd.extend([ "-c", "https://repo.mamba.pm/emscripten-forge", - "-c", "conda-forge", "-c", "microsoft", + "-c", "conda-forge", ]) # pass existing env vars to subprocess diff --git a/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml b/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml index 808b0cf45..f826caabc 100644 --- a/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml +++ b/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml @@ -3,7 +3,7 @@ context: version: 3.1.45 build: - number: 28 + number: 29 outputs: - package: @@ -27,7 +27,7 @@ outputs: - python - nodejs 16.* run_exports: - - ${{ pin_subpackage('emscripten-abi', min_pin='x.x.x', max_pin='x.x.x') }} + - ${{ pin_subpackage('emscripten-abi', lower_bound='x.x.x', upper_bound='x.x.x') }} - package: name: emscripten-abi From b2999018c16f7686483aab5770dd8cf7c07b85a1 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Tue, 18 Jun 2024 09:15:10 +0200 Subject: [PATCH 102/129] restrict playwright (#1127) --- recipes/recipes/pytester/recipe.yaml | 6 +++--- recipes/recipes_emscripten/pyjs/recipe.yaml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes/recipes/pytester/recipe.yaml b/recipes/recipes/pytester/recipe.yaml index 970578612..146db1053 100644 --- a/recipes/recipes/pytester/recipe.yaml +++ b/recipes/recipes/pytester/recipe.yaml @@ -13,7 +13,7 @@ outputs: version: ${{ version }} build: - number: 7 + number: 8 noarch: python @@ -24,7 +24,7 @@ outputs: - if: linux then: - pyjs_code_runner >= 3.0.0 - - microsoft::playwright <=1.42 + - microsoft::playwright <1.42 else: - pyjs_code_runner >= 3.0.0 - microsoft::playwright @@ -33,7 +33,7 @@ outputs: name: pytester-run version: ${{ version }} build: - number: 7 + number: 8 noarch: generic requirements: run: diff --git a/recipes/recipes_emscripten/pyjs/recipe.yaml b/recipes/recipes_emscripten/pyjs/recipe.yaml index 69591a8fd..ba0897add 100644 --- a/recipes/recipes_emscripten/pyjs/recipe.yaml +++ b/recipes/recipes_emscripten/pyjs/recipe.yaml @@ -9,7 +9,7 @@ source: url: https://github.com/emscripten-forge/pyjs/archive/refs/tags/${{ version }}.tar.gz sha256: 8633dfd8b5bf9403e6b9c02c582557dcc49226034689032939b547c7dc431000 build: - number: 6 + number: 7 requirements: @@ -58,7 +58,7 @@ tests: - if: linux then: - pyjs_code_runner >=3.0.0 - - microsoft::playwright <=1.42 + - microsoft::playwright <1.42 else: - pyjs_code_runner >=3.0.0 - microsoft::playwright From a9e9036e18105e354d594ac532b361fefba9f7b4 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Tue, 18 Jun 2024 09:21:00 +0200 Subject: [PATCH 103/129] Update xvega from 0.1.0 to 0.1.1 (#1122) * Update version * Remove patch --------- Co-authored-by: Thorsten Beier --- .../xvega/patches/disable_march.patch | 14 -------------- recipes/recipes_emscripten/xvega/recipe.yaml | 7 +++---- 2 files changed, 3 insertions(+), 18 deletions(-) delete mode 100644 recipes/recipes_emscripten/xvega/patches/disable_march.patch diff --git a/recipes/recipes_emscripten/xvega/patches/disable_march.patch b/recipes/recipes_emscripten/xvega/patches/disable_march.patch deleted file mode 100644 index 7e106bbde..000000000 --- a/recipes/recipes_emscripten/xvega/patches/disable_march.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 11f0769..c7e8b92 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -369,7 +369,8 @@ macro(xvega_set_common_options target_name) - if (CMAKE_SYSTEM_PROCESSOR MATCHES "ppc|powerpc") - target_compile_options(${target_name} PUBLIC -mtune=native) - else () -- target_compile_options(${target_name} PUBLIC -march=native) -+ # target_compile_options(${target_name} PUBLIC -march=native) -+ message(STATUS "-march=native is not supported for wasm32-unknown-emscripten") - endif () - endif () - endif () diff --git a/recipes/recipes_emscripten/xvega/recipe.yaml b/recipes/recipes_emscripten/xvega/recipe.yaml index e763cad5e..faa3cc7af 100644 --- a/recipes/recipes_emscripten/xvega/recipe.yaml +++ b/recipes/recipes_emscripten/xvega/recipe.yaml @@ -1,6 +1,6 @@ context: name: xvega - version: 0.1.0 + version: 0.1.1 package: name: ${{ name }} @@ -8,9 +8,7 @@ package: source: url: https://github.com/jupyter-xeus/${{ name }}/archive/${{ version }}.tar.gz - sha256: 750a19078693b7fcf34360745390e2df6158647b317152f2be9dd766936df74b - patches: - - patches/disable_march.patch + sha256: 2da97810669d9a838febfc0d9149362ca1d04d0a780caab0f8ea13e6ee70265c build: number: 0 @@ -35,6 +33,7 @@ about: license_file: LICENSE summary: xvega homepage: https://github.com/jupyter-xeus/xvega + extra: recipe-maintainers: - DerThorsten From 84492bd338f1f761dccb1c67770e681d3a7c50dd Mon Sep 17 00:00:00 2001 From: KGB99 <80490551+KGB99@users.noreply.github.com> Date: Tue, 18 Jun 2024 11:36:08 +0100 Subject: [PATCH 104/129] Add bitarray recipe (#1101) * Add bitarray recipe * small fixes * cleanup --- recipes/recipes_emscripten/bitarray/build.sh | 3 ++ .../recipes_emscripten/bitarray/recipe.yaml | 53 +++++++++++++++++++ .../bitarray/test_bitarray.py | 3 ++ 3 files changed, 59 insertions(+) create mode 100644 recipes/recipes_emscripten/bitarray/build.sh create mode 100644 recipes/recipes_emscripten/bitarray/recipe.yaml create mode 100644 recipes/recipes_emscripten/bitarray/test_bitarray.py diff --git a/recipes/recipes_emscripten/bitarray/build.sh b/recipes/recipes_emscripten/bitarray/build.sh new file mode 100644 index 000000000..2fe8e717a --- /dev/null +++ b/recipes/recipes_emscripten/bitarray/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +${PYTHON} -m pip install . diff --git a/recipes/recipes_emscripten/bitarray/recipe.yaml b/recipes/recipes_emscripten/bitarray/recipe.yaml new file mode 100644 index 000000000..66fed4e79 --- /dev/null +++ b/recipes/recipes_emscripten/bitarray/recipe.yaml @@ -0,0 +1,53 @@ +context: + name: bitarray + version: 2.9.2 + +package: + name: ${{ name|lower }} + version: ${{ version }} + +source: + url: https://pypi.io/packages/source/${{ name[0] }}/${{ name }}/${{ name }}-${{ version }}.tar.gz + sha256: a8f286a51a32323715d77755ed959f94bef13972e9a2fe71b609e40e6d27957e + +build: + number: 0 + +requirements: + build: + - python + - cross-python_${{ target_platform }} + - ${{ compiler('c') }} + - pip + host: + - python + - pip + run: + - python + +tests: +- script: pytester + files: + recipe: + - test_bitarray.py + requirements: + build: + - pytester + run: + - pytester-run + +about: + homepage: https://github.com/ilanschnell/bitarray + license: PSF-2.0 + license_file: LICENSE + summary: efficient arrays of booleans -- C extension + description: | + Bitarray provides an object type which efficiently represents an array of + booleans. Bitarrays are sequence types that behave very similarly + to usual lists. All functionality is implemented in C. + documentation: https://pypi.python.org/pypi/bitarray/0.8.1 + repository: https://github.com/ilanschnell/bitarray + +extra: + recipe-maintainers: + - KGB99 diff --git a/recipes/recipes_emscripten/bitarray/test_bitarray.py b/recipes/recipes_emscripten/bitarray/test_bitarray.py new file mode 100644 index 000000000..7f9fee93d --- /dev/null +++ b/recipes/recipes_emscripten/bitarray/test_bitarray.py @@ -0,0 +1,3 @@ +def test_bitarray(): + import bitarray + assert bitarray.test().wasSuccessful() From 3bbbf39956903621bf448ea090de0bbcb25a7934 Mon Sep 17 00:00:00 2001 From: KGB99 <80490551+KGB99@users.noreply.github.com> Date: Tue, 18 Jun 2024 13:03:18 +0100 Subject: [PATCH 105/129] Add Clarabel (#1108) * add build and recipe * clean up recipe * add tests * add exports to build * remove exports in build * trigger CI * add scipy to test requirements * fix typo --- recipes/recipes_emscripten/clarabel/build.sh | 2 + .../recipes_emscripten/clarabel/recipe.yaml | 65 +++++++++++++++++++ .../clarabel/test_clarabel.py | 26 ++++++++ 3 files changed, 93 insertions(+) create mode 100644 recipes/recipes_emscripten/clarabel/build.sh create mode 100644 recipes/recipes_emscripten/clarabel/recipe.yaml create mode 100644 recipes/recipes_emscripten/clarabel/test_clarabel.py diff --git a/recipes/recipes_emscripten/clarabel/build.sh b/recipes/recipes_emscripten/clarabel/build.sh new file mode 100644 index 000000000..b488fa5ee --- /dev/null +++ b/recipes/recipes_emscripten/clarabel/build.sh @@ -0,0 +1,2 @@ +#!/bin/bash +${PYTHON} -m pip install . -vv diff --git a/recipes/recipes_emscripten/clarabel/recipe.yaml b/recipes/recipes_emscripten/clarabel/recipe.yaml new file mode 100644 index 000000000..1d9c937a6 --- /dev/null +++ b/recipes/recipes_emscripten/clarabel/recipe.yaml @@ -0,0 +1,65 @@ +context: + name: clarabel + version: 0.7.1 + +package: + name: ${{ name|lower }} + version: ${{ version }} + +source: + url: https://pypi.python.org/packages/source/${{ name[0] }}/${{ name }}/${{ name }}-${{ version }}.tar.gz + sha256: a30ab135f475c5bc78329fd7df575291155e6055bcaf02124eb610b8ad176396 + +build: + number: 0 + +requirements: + build: + - python + - crossenv + - cross-python_${{ target_platform }} + - ${{ compiler('c') }} + - cargo-bundle-licenses + - rust + - cffi == 1.15.1 + - setuptools-rust + - maturin + host: + - python + - pip + - cffi == 1.15.1 + run: + - python + - cffi == 1.15.1 + +tests: +- script: pytester + files: + recipe: + - test_clarabel.py + requirements: + build: + - pytester + run: + - pytester-run + - scipy + +about: + homepage: https://oxfordcontrol.github.io/ClarabelDocs/ + license: Apache-2.0 + license_family: Apache + license_file: + - LICENSE.md + - THIRDPARTY.yml + summary: 'Python interface for Clarabel: Interior Point Conic Optimization Solver' + description: | + Clarabel is an interior point numerical solver for convex optimization problems implemented + in Rust. It solves linear programs (LPs), quadratic programs (QPs), second-order cone programs + (SOCPs) and semidefinite programs (SDPs). It also solves problems with exponential, power + cone and generalized power cone constraints. + documentation: https://oxfordcontrol.github.io/ClarabelDocs/ + repository: https://github.com/oxfordcontrol/Clarabel.rs + +extra: + recipe-maintainers: + - KGB99 diff --git a/recipes/recipes_emscripten/clarabel/test_clarabel.py b/recipes/recipes_emscripten/clarabel/test_clarabel.py new file mode 100644 index 000000000..8beaaabc0 --- /dev/null +++ b/recipes/recipes_emscripten/clarabel/test_clarabel.py @@ -0,0 +1,26 @@ +def test_clarabel(): + import clarabel + import numpy as np + from scipy import sparse + + # Define problem data + P = sparse.csc_matrix([[3., 0.], [0., 2.]]) + P = sparse.triu(P).tocsc() + + q = np.array([-1., -4.]) + + A = sparse.csc_matrix( + [[1., -2.], # <-- LHS of equality constraint (lower bound) + [1., 0.], # <-- LHS of inequality constraint (upper bound) + [0., 1.], # <-- LHS of inequality constraint (upper bound) + [-1., 0.], # <-- LHS of inequality constraint (lower bound) + [0., -1.]]) # <-- LHS of inequality constraint (lower bound) + + b = np.array([0., 1., 1., 1., 1.]) + + cones = [clarabel.ZeroConeT(1), clarabel.NonnegativeConeT(4)] + settings = clarabel.DefaultSettings() + + solver = clarabel.DefaultSolver(P, q, A, b, cones, settings) + solution = solver.solve() + assert solution.status == clarabel.SolverStatus.Solved From d49847b3cbb9783fb44d2b57798f1d076679fee3 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Thu, 20 Jun 2024 12:44:30 +0200 Subject: [PATCH 106/129] try with empty emsdk_env.sh (#1131) * try with empty emsdk_env.sh * undo bld number bump as we do not upload this bld --- recipes/recipes_emscripten/python/build.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/recipes_emscripten/python/build.sh b/recipes/recipes_emscripten/python/build.sh index e66625ec9..130971be3 100644 --- a/recipes/recipes_emscripten/python/build.sh +++ b/recipes/recipes_emscripten/python/build.sh @@ -27,12 +27,17 @@ echo "" > $RECIPE_DIR/pyodide_env.sh # But emscripten itself (emcc/emar/...) relies on the env variable PYTHON to be set to python3.11 ln -s $BUILD_PREFIX/bin/python3.11 $BUILD_PREFIX/bin/python.js +# create an empty emsdk_env.sh in CONDA_EMSDK_DIR +echo "" > $EMSCRIPTEN_FORGE_EMSDK_DIR/emsdk_env.sh +# make it executable +chmod +x $EMSCRIPTEN_FORGE_EMSDK_DIR/emsdk_env.sh + # create a symlink from $BUILD_PREFIX/emsdk directory to this dir emsdk. # This allows us to overwrite the emsdk from pyodide rm -rf emsdk mkdir -p emsdk cd emsdk -ln -s $CONDA_EMSDK_DIR emsdk +ln -s $EMSCRIPTEN_FORGE_EMSDK_DIR emsdk cd .. From 02ea5523c9dc3de5803759f384e4b98f193d160c Mon Sep 17 00:00:00 2001 From: KGB99 <80490551+KGB99@users.noreply.github.com> Date: Thu, 20 Jun 2024 18:02:56 +0100 Subject: [PATCH 107/129] Add Geos (#1128) * first attempt * add patches for build * add existence tests * add ctest and cleanup * change ctest * remove ctest --- recipes/recipes_emscripten/geos/build.sh | 14 ++ .../geos/patches/patch_json.patch | 22 +++ .../geos/patches/patch_tests.patch | 135 ++++++++++++++++++ recipes/recipes_emscripten/geos/recipe.yaml | 54 +++++++ 4 files changed, 225 insertions(+) create mode 100644 recipes/recipes_emscripten/geos/build.sh create mode 100644 recipes/recipes_emscripten/geos/patches/patch_json.patch create mode 100644 recipes/recipes_emscripten/geos/patches/patch_tests.patch create mode 100644 recipes/recipes_emscripten/geos/recipe.yaml diff --git a/recipes/recipes_emscripten/geos/build.sh b/recipes/recipes_emscripten/geos/build.sh new file mode 100644 index 000000000..aac990ff1 --- /dev/null +++ b/recipes/recipes_emscripten/geos/build.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +mkdir -p build && cd build + +emcmake cmake ${CMAKE_ARGS} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=${PREFIX} \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_SHARED_LIBS=OFF \ + .. + +emmake make -j${CPU_COUNT} #${VERBOSE_CM} + +emmake make install -j${CPU_COUNT} diff --git a/recipes/recipes_emscripten/geos/patches/patch_json.patch b/recipes/recipes_emscripten/geos/patches/patch_json.patch new file mode 100644 index 000000000..69e433bdf --- /dev/null +++ b/recipes/recipes_emscripten/geos/patches/patch_json.patch @@ -0,0 +1,22 @@ +diff --git a/include/geos/vend/json.hpp b/include/geos/vend/json.hpp +index 492118a..bc58a14 100644 +--- a/include/geos/vend/json.hpp ++++ b/include/geos/vend/json.hpp +@@ -25395,7 +25395,7 @@ if no parse error occurred. + @since version 1.0.0 + */ + JSON_HEDLEY_NON_NULL(1) +-inline nlohmann::json operator "" _json(const char* s, std::size_t n) ++inline nlohmann::json operator ""_json(const char* s, std::size_t n) + { + return nlohmann::json::parse(s, s + n); + } +@@ -25414,7 +25414,7 @@ object if no parse error occurred. + @since version 2.0.0 + */ + JSON_HEDLEY_NON_NULL(1) +-inline nlohmann::json::json_pointer operator "" _json_pointer(const char* s, std::size_t n) ++inline nlohmann::json::json_pointer operator ""_json_pointer(const char* s, std::size_t n) + { + return nlohmann::json::json_pointer(std::string(s, n)); + } diff --git a/recipes/recipes_emscripten/geos/patches/patch_tests.patch b/recipes/recipes_emscripten/geos/patches/patch_tests.patch new file mode 100644 index 000000000..cd4724a74 --- /dev/null +++ b/recipes/recipes_emscripten/geos/patches/patch_tests.patch @@ -0,0 +1,135 @@ +diff --git a/tests/unit/algorithm/distance/DiscreteHausdorffDistanceTest.cpp b/tests/unit/algorithm/distance/DiscreteHausdorffDistanceTest.cpp +index 735344c..4d69d90 100644 +--- a/tests/unit/algorithm/distance/DiscreteHausdorffDistanceTest.cpp ++++ b/tests/unit/algorithm/distance/DiscreteHausdorffDistanceTest.cpp +@@ -198,7 +198,8 @@ void object::test<6> + "LINESTRING (0 0, 100 0, 10 100, 10 100)", + "LINESTRING (0 100, 0 10, 80 10)", 0.001, 47.89); + +- ensure("FE_INVALID raised", !std::fetestexcept(FE_INVALID)); ++ //PATCH: Commented out all FE_* tests due to emscripten not supporting FE_* identifiers anymore ++ //ensure("FE_INVALID raised", !std::fetestexcept(FE_INVALID)); + } + + // Crash on collection with empty components +diff --git a/tests/unit/capi/GEOSDistanceTest.cpp b/tests/unit/capi/GEOSDistanceTest.cpp +index 4c953c4..aeaa983 100644 +--- a/tests/unit/capi/GEOSDistanceTest.cpp ++++ b/tests/unit/capi/GEOSDistanceTest.cpp +@@ -135,9 +135,10 @@ void object::test<4> + ensure_equals(status, 1); + ensure_equals(d, std::sqrt(2)); + ++ //PATCH: Commented out all FE_* tests due to emscripten not supporting FE_* identifiers anymore + // check for floating point overflow exceptions +- int raised = fetestexcept(FE_OVERFLOW); +- ensure_equals(raised & FE_OVERFLOW, 0); ++ //int raised = fetestexcept(FE_OVERFLOW); ++ //ensure_equals(raised & FE_OVERFLOW, 0); + + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); +@@ -152,8 +153,9 @@ void object::test<5> + GEOSGeometry* g1 = GEOSGeomFromWKT("LINESTRING (0 0, 1 1)"); + GEOSGeometry* g2 = GEOSGeomFromWKT("LINESTRING (2 1, 1 2)"); + ++ //PATCH: Commented out all FE_* tests due to emscripten not supporting FE_* identifiers anymore + // clear all floating point exceptions +- feclearexcept (FE_ALL_EXCEPT); ++ //feclearexcept (FE_ALL_EXCEPT); + + double d; + int status = GEOSDistance(g1, g2, &d); +@@ -161,9 +163,10 @@ void object::test<5> + ensure_equals(status, 1); + // ensure_equals(d, std::sqrt(2)); + ++ //PATCH: Commented out all FE_* tests due to emscripten not supporting FE_* identifiers anymore + // check for floating point overflow exceptions +- int raised = fetestexcept(FE_OVERFLOW); +- ensure_equals(raised & FE_OVERFLOW, 0); ++ //int raised = fetestexcept(FE_OVERFLOW); ++ //ensure_equals(raised & FE_OVERFLOW, 0); + + GEOSGeom_destroy(g1); + GEOSGeom_destroy(g2); +diff --git a/tests/unit/capi/GEOSIntersectionTest.cpp b/tests/unit/capi/GEOSIntersectionTest.cpp +index 94d209e..f1443ae 100644 +--- a/tests/unit/capi/GEOSIntersectionTest.cpp ++++ b/tests/unit/capi/GEOSIntersectionTest.cpp +@@ -139,8 +139,9 @@ void object::test<7> + geom2_ = GEOSGeomFromWKT("POLYGON ((1 2, 1 3, 0 3, 0 2, 1 2))"); + + result_ = GEOSIntersection(geom1_, geom2_); +- +- ensure(!std::fetestexcept(FE_INVALID)); ++ ++ //PATCH: Commented out all FE_* tests due to emscripten not supporting FE_* identifiers anymore ++ //ensure(!std::fetestexcept(FE_INVALID)); + } + + +diff --git a/tests/unit/capi/GEOSVoronoiDiagramTest.cpp b/tests/unit/capi/GEOSVoronoiDiagramTest.cpp +index c8843ac..fb3dda1 100644 +--- a/tests/unit/capi/GEOSVoronoiDiagramTest.cpp ++++ b/tests/unit/capi/GEOSVoronoiDiagramTest.cpp +@@ -60,8 +60,9 @@ template<> + template<> + void object::test<1> + () +-{ +- std::feclearexcept(FE_ALL_EXCEPT); ++{ ++ //PATCH: Commented out all FE_* tests due to emscripten not supporting FE_* identifiers anymore: ++ //std::feclearexcept(FE_ALL_EXCEPT); + + geom1_ = GEOSGeomFromWKT("POINT(10 20)"); + +@@ -73,7 +74,8 @@ void object::test<1> + geom2_ = GEOSVoronoiDiagram(geom1_, nullptr, 0, 1); + ensure_geometry_equals(geom2_, "MULTILINESTRING EMPTY"); + +- ensure("FE_INVALID raised", !std::fetestexcept(FE_INVALID)); ++ //PATCH: Commented out all FE_* tests due to emscripten not supporting FE_* identifiers anymore: ++ //ensure("FE_INVALID raised", !std::fetestexcept(FE_INVALID)); + } + + //More points: +diff --git a/tests/unit/capi/capi_test_utils.h b/tests/unit/capi/capi_test_utils.h +index 11305e9..7995e3e 100644 +--- a/tests/unit/capi/capi_test_utils.h ++++ b/tests/unit/capi/capi_test_utils.h +@@ -30,7 +30,8 @@ namespace capitest { + wktw_ = GEOSWKTWriter_create(); + GEOSWKTWriter_setRoundingPrecision(wktw_, 10); + +- std::feclearexcept(FE_ALL_EXCEPT); ++ //PATCH: Commented out all FE_* tests due to emscripten not supporting FE_* identifiers anymore: ++ //std::feclearexcept(FE_ALL_EXCEPT); + } + + ~utility() +diff --git a/tests/unit/geom/EnvelopeTest.cpp b/tests/unit/geom/EnvelopeTest.cpp +index b1250a6..ac57bb6 100644 +--- a/tests/unit/geom/EnvelopeTest.cpp ++++ b/tests/unit/geom/EnvelopeTest.cpp +@@ -87,15 +87,18 @@ struct test_envelope_data { + ensure_equals(Envelope::intersects(p0, p1, q), expected); + } + } +- ++ + static void + ensure_no_fp_except() + { ++ //PATCH: Commented out all FE_* tests due to emscripten not supporting FE_* identifiers anymore: ++ /* + ensure("FE_DIVBYZERO raised", !std::fetestexcept(FE_DIVBYZERO)); + //ensure("FE_INEXACT raised", !std::fetestexcept(FE_INEXACT)); + ensure("FE_INVALID raised", !std::fetestexcept(FE_INVALID)); + ensure("FE_OVERFLOW raised", !std::fetestexcept(FE_OVERFLOW)); + ensure("FE_UNDERFLOW raised", !std::fetestexcept(FE_UNDERFLOW)); ++ */ + } + }; + diff --git a/recipes/recipes_emscripten/geos/recipe.yaml b/recipes/recipes_emscripten/geos/recipe.yaml new file mode 100644 index 000000000..497cc0256 --- /dev/null +++ b/recipes/recipes_emscripten/geos/recipe.yaml @@ -0,0 +1,54 @@ +context: + name: geos + version: 3.12.2 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://download.osgeo.org/geos/geos-${{ version }}.tar.bz2 + sha256: 34c7770bf0090ee88488af98767d08e779f124fa33437e0aabec8abd4609fec6 + patches: + # patch_tests.patch: Commented out all FE_* tests due to emscripten not supporting FE_* identifiers anymore: + # https://github.com/emscripten-core/emscripten/issues/22005 + # https://github.com/emscripten-core/emscripten/pull/11087 + # https://github.com/Keno/julia-wasm/issues/27 + - patches/patch_tests.patch + # patch_json.patch: changed 'operator "" _json_pointer' to 'operator ""_json_pointer' due to deprecation warning + - patches/patch_json.patch + +build: + number: 0 + +requirements: + build: + - cmake + - make + - ninja + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + +tests: + - script: + - test -f ${PREFIX}/bin/geosop.js + - test -f ${PREFIX}/include/geos.h + - test -f ${PREFIX}/include/geos/algorithm/Area.h + - test -f ${PREFIX}/lib/libgeos.a + +about: + homepage: https://libgeos.org/ + license: LGPL-2.1-only + license_file: COPYING + summary: Geometry Engine, Open Source + description: | + GEOS is a C++ library for performing operations on two-dimensional vector + geometries. It is primarily a port of the JTS Topology Suite Java library. + It provides many of the algorithms used by PostGIS, the Shapely package + for Python, the sf package for R, and others. + documentation: https://libgeos.org/ + repository: https://github.com/libgeos/geos + +extra: + recipe-maintainers: + - KGB99 From 8ad253f0d3ae29a0dd5c4d98ece5728957c0ae56 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Mon, 24 Jun 2024 10:44:06 +0200 Subject: [PATCH 108/129] documentation --- docs/development/adding_packages.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/development/adding_packages.md b/docs/development/adding_packages.md index 0e77e821a..270d0ffbd 100644 --- a/docs/development/adding_packages.md +++ b/docs/development/adding_packages.md @@ -10,6 +10,16 @@ The recipe format is described in the [rattler-build recipe format](https://gith Adding cmake based packages is easy. Usually it is enough to replace the `cmake` command with the `emcmake` command and `make` with `emmake` (see the [emscripten documentation](https://emscripten.org/docs/compiling/Building-Projects.html#integrating-with-a-build-system) for more details). +To build a shared library with CMake, one needs these additional flags: +```CMake +set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE) # does not need to be global :) +set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-s SIDE_MODULE=1") +set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-s SIDE_MODULE=1") +set(CMAKE_STRIP FALSE) # used by default in pybind11 on .so modules # only for needed when using pybind11 +``` + + + **Example recipes**: * [xeus](https://github.com/emscripten-forge/recipes/tree/main/recipes/recipes_emscripten/xeus) From 2f13f18cdb5b894f47f25cc19694c36ccd78c6ed Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Mon, 24 Jun 2024 10:49:25 +0200 Subject: [PATCH 109/129] Update adding_packages.md --- docs/development/adding_packages.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/development/adding_packages.md b/docs/development/adding_packages.md index 270d0ffbd..f90337b06 100644 --- a/docs/development/adding_packages.md +++ b/docs/development/adding_packages.md @@ -10,14 +10,21 @@ The recipe format is described in the [rattler-build recipe format](https://gith Adding cmake based packages is easy. Usually it is enough to replace the `cmake` command with the `emcmake` command and `make` with `emmake` (see the [emscripten documentation](https://emscripten.org/docs/compiling/Building-Projects.html#integrating-with-a-build-system) for more details). -To build a shared library with CMake, one needs these additional flags: +To build a shared library with CMake, one needs flags. +These flags can be put into a `.cmake` file: ```CMake +# overwriteProp.cmake set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE) # does not need to be global :) set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-s SIDE_MODULE=1") set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-s SIDE_MODULE=1") set(CMAKE_STRIP FALSE) # used by default in pybind11 on .so modules # only for needed when using pybind11 ``` +This can be passed to the as command line argument to cmake +``` +# CLI +... -DCMAKE_PROJECT_INCLUDE=overwriteProp.cmake +``` **Example recipes**: From 86a772391e6674767ec296e71a0d76ca92f8f1f8 Mon Sep 17 00:00:00 2001 From: martinRenou Date: Tue, 25 Jun 2024 08:54:21 +0100 Subject: [PATCH 110/129] Pydantic-core update (#1141) * Pydantic-core update * Fix URL --- .../recipes_emscripten/pydantic_core/recipe.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/recipes/recipes_emscripten/pydantic_core/recipe.yaml b/recipes/recipes_emscripten/pydantic_core/recipe.yaml index 1002f7002..af3d14dcf 100644 --- a/recipes/recipes_emscripten/pydantic_core/recipe.yaml +++ b/recipes/recipes_emscripten/pydantic_core/recipe.yaml @@ -1,28 +1,28 @@ context: name: pydantic_core - version: '2.16.2' + version: '2.18.4' package: name: pydantic_core version: ${{ version }} source: -- url: https://files.pythonhosted.org/packages/0d/72/64550ef171432f97d046118a9869ad774925c2f442589d5f6164b8288e85/pydantic_core-${{ version }}.tar.gz - sha256: 0ba503850d8b8dcc18391f10de896ae51d37fe5fe43dbfb6a35c5c5cad271a06 +- url: https://pypi.io/packages/source/p/pydantic-core/pydantic_core-${{ version }}.tar.gz + sha256: ec3beeada09ff865c344ff3bc2f427f5e6c26401cc6113d77e372c3fdac73864 build: - number: 3 + number: 0 requirements: build: - cross-python_${{target_platform}} - cffi == 1.15.1 - openssl - - setuptools-rust + - setuptools-rust - rust - maturin - typing_extensions - + host: - python - openssl @@ -31,7 +31,7 @@ requirements: run: - cffi == 1.15.1 - typing_extensions - + tests: - script: pytester requirements: @@ -41,4 +41,4 @@ tests: - pytester-run files: recipe: - - test_pydantic_core.py \ No newline at end of file + - test_pydantic_core.py From 215ef07677604407e1978028f8f4a675f7b73023 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Tue, 25 Jun 2024 10:11:08 +0200 Subject: [PATCH 111/129] Add cairo (#1109) * Add cairo * Add lzo dependency * Add expat * Clean up recipe * Add tests * Downgrade fontconfig * Disable freetype * Clean up * Update conda build config * Restore conda config --- recipes/recipes_emscripten/cairo/build.sh | 29 +++++++++++ .../cairo/emscripten.meson.cross | 14 +++++ recipes/recipes_emscripten/cairo/recipe.yaml | 52 +++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 recipes/recipes_emscripten/cairo/build.sh create mode 100644 recipes/recipes_emscripten/cairo/emscripten.meson.cross create mode 100644 recipes/recipes_emscripten/cairo/recipe.yaml diff --git a/recipes/recipes_emscripten/cairo/build.sh b/recipes/recipes_emscripten/cairo/build.sh new file mode 100644 index 000000000..675efa308 --- /dev/null +++ b/recipes/recipes_emscripten/cairo/build.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +set -ex + +meson_config_args=( + -Dfontconfig=enabled + -Dfreetype=disabled + -Dglib=enabled + -Dpng=disabled + -Dxlib=disabled + -Dxlib-xcb=disabled + -Dxcb=disabled + -Dspectre=disabled + -Dtests=disabled +) + +meson setup builddir \ + ${MESON_ARGS} \ + "${meson_config_args[@]}" \ + --buildtype=release \ + --default-library=static \ + --prefer-static \ + --prefix=$PREFIX \ + -Dlibdir=lib \ + --wrap-mode=nofallback \ + --cross-file=$RECIPE_DIR/emscripten.meson.cross + +ninja -v -C builddir -j ${CPU_COUNT} +ninja -C builddir install -j ${CPU_COUNT} diff --git a/recipes/recipes_emscripten/cairo/emscripten.meson.cross b/recipes/recipes_emscripten/cairo/emscripten.meson.cross new file mode 100644 index 000000000..48763013f --- /dev/null +++ b/recipes/recipes_emscripten/cairo/emscripten.meson.cross @@ -0,0 +1,14 @@ +[properties] +needs_exe_wrapper = true +skip_sanity_check = true +longdouble_format = 'IEEE_QUAD_LE' # for numpy + +[host_machine] +system = 'emscripten' +cpu_family = 'wasm32' +cpu = 'wasm' +endian = 'little' + +[binaries] +exe_wrapper = 'node' +pkg-config = 'pkg-config' diff --git a/recipes/recipes_emscripten/cairo/recipe.yaml b/recipes/recipes_emscripten/cairo/recipe.yaml new file mode 100644 index 000000000..54e2e23d0 --- /dev/null +++ b/recipes/recipes_emscripten/cairo/recipe.yaml @@ -0,0 +1,52 @@ +context: + name: "cairo" + version: 1.18.0 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: http://cairographics.org/releases/${{ name }}-${{ version }}.tar.xz + sha256: 243a0736b978a33dee29f9cca7521733b78a65b5418206fef7bd1c3d4cf10b64 + +build: + number: 0 + +requirements: + build: + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + - meson + - ninja + - pkg-config + host: + - freetype + - fontconfig>=2.12 + - glib + - libpng + - pixman + - lzo + - expat + - zlib + +tests: +- script: + - test -f $PREFIX/lib/libcairo.a + - test -f $PREFIX/lib/libcairo-gobject.a + - test -f $PREFIX/include/cairo/cairo.h + +about: + homepage: http://cairographics.org/ + documentation: https://www.cairographics.org/documentation/ + license: MPL-1.1 # or LGPL-2.1-only + license_file: + - COPYING + - COPYING-LGPL-2.1 + - COPYING-MPL-1.1 + summary: | + Cairo is a 2D graphics library with support for multiple output devices. + +extra: + recipe-maintainers: + - IsabelParedes \ No newline at end of file From a18507cb5d6756057492d0fc37aedc289b68b196 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Tue, 25 Jun 2024 11:48:56 +0200 Subject: [PATCH 112/129] Update numpy from 1.26.4 to 2.0.0 (#1142) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/numpy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/numpy/recipe.yaml b/recipes/recipes_emscripten/numpy/recipe.yaml index d3e8e751d..a6b22f04d 100644 --- a/recipes/recipes_emscripten/numpy/recipe.yaml +++ b/recipes/recipes_emscripten/numpy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 1.26.4 + version: 2.0.0 cross_target_plattform: emscripten-wasm32 target_plattform: emscripten-wasm32 @@ -9,7 +9,7 @@ package: source: url: https://github.com/numpy/numpy/releases/download/v${{ version }}/numpy-${{ version }}.tar.gz - sha256: 2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010 + sha256: cf5d1c9e6837f8af9f92b6bd3e86d513cdc11f60fd62185cc49ec7d1aba34864 build: number: 0 From 46798ffe86cc4ca2785c089fc4cd777f6ddbaccd Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Tue, 25 Jun 2024 11:49:08 +0200 Subject: [PATCH 113/129] Update astropy from 6.1.0 to 6.1.1 (#1140) Co-authored-by: emscripten-forge-bot --- .../recipes_emscripten/astropy/recipe.yaml | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/recipes/recipes_emscripten/astropy/recipe.yaml b/recipes/recipes_emscripten/astropy/recipe.yaml index b21cf9cfa..1e5da0e81 100644 --- a/recipes/recipes_emscripten/astropy/recipe.yaml +++ b/recipes/recipes_emscripten/astropy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 6.1.0 + version: 6.1.1 package: name: astropy @@ -7,7 +7,7 @@ package: source: - url: https://pypi.io/packages/source/a/astropy/astropy-${{ version }}.tar.gz - sha256: 6c3b915f10b1576190730ddce45f6245f9927dda3de6e3f692db45779708950f + sha256: e5c6f45d911c30acb8d556c7f8ed994aec71b108e61eee5067f00af1e4e36138 # patches: # - patches/skip_ep.patch @@ -32,14 +32,14 @@ requirements: - pyerfa - pyyaml - packaging - + tests: - - script: pytester - requirements: - build: - - pytester >= 0.9.0 - run: - - pytester-run >= 0.9.0 - files: - recipe: - - test_astropy.py +- script: pytester + requirements: + build: + - pytester >= 0.9.0 + run: + - pytester-run >= 0.9.0 + files: + recipe: + - test_astropy.py From 2abfa40c8ecfc54491b4e3a3a5a534e5b41f3de8 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Tue, 25 Jun 2024 11:50:36 +0200 Subject: [PATCH 114/129] Update libxslt from 1.1.40 to 1.1.41 (#1136) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/libxslt/recipe.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/recipes_emscripten/libxslt/recipe.yaml b/recipes/recipes_emscripten/libxslt/recipe.yaml index 7b504f599..b03fd1b4f 100644 --- a/recipes/recipes_emscripten/libxslt/recipe.yaml +++ b/recipes/recipes_emscripten/libxslt/recipe.yaml @@ -1,14 +1,15 @@ context: name: libxslt - version: 1.1.40 + version: 1.1.41 package: name: ${{ name }} version: ${{ version }} source: - url: https://download.gnome.org/sources/${{ name }}/${{ version[0:3] }}/${{ name }}-${{ version }}.tar.xz - sha256: 194715db023035f65fb566402f2ad2b5eab4c29d541f511305c40b29b1f48d13 + url: https://download.gnome.org/sources/${{ name }}/${{ version[0:3] }}/${{ name + }}-${{ version }}.tar.xz + sha256: 3ad392af91115b7740f7b50d228cc1c5fc13afc1da7f16cb0213917a37f71bda build: number: 0 From b76a5121282dfcd4d01b7f2dcc47f6e2b3a70d74 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Tue, 25 Jun 2024 11:51:35 +0200 Subject: [PATCH 115/129] Update sqlalchemy from 2.0.30 to 2.0.31 (#1135) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/sqlalchemy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml index 114347da5..350ae231b 100644 --- a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml +++ b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.0.30 + version: 2.0.31 package: name: sqlalchemy @@ -7,7 +7,7 @@ package: source: url: https://pypi.io/packages/source/S/SQLAlchemy/SQLAlchemy-${{ version }}.tar.gz - sha256: 2b1708916730f4830bc69d6f49d37f7698b5bd7530aca7f04f785f8849e95255 + sha256: b607489dd4a54de56984a0c7656247504bd5523d9d0ba799aef59d4add009484 build: number: 0 From 1df0158ea37e35890d70f926db0c9894a3c0fc20 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Tue, 25 Jun 2024 11:51:46 +0200 Subject: [PATCH 116/129] Update clarabel from 0.7.1 to 0.8.0 (#1138) Co-authored-by: emscripten-forge-bot --- .../recipes_emscripten/clarabel/recipe.yaml | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/recipes/recipes_emscripten/clarabel/recipe.yaml b/recipes/recipes_emscripten/clarabel/recipe.yaml index 1d9c937a6..39cb224ce 100644 --- a/recipes/recipes_emscripten/clarabel/recipe.yaml +++ b/recipes/recipes_emscripten/clarabel/recipe.yaml @@ -1,36 +1,37 @@ context: name: clarabel - version: 0.7.1 + version: 0.8.0 package: name: ${{ name|lower }} version: ${{ version }} source: - url: https://pypi.python.org/packages/source/${{ name[0] }}/${{ name }}/${{ name }}-${{ version }}.tar.gz - sha256: a30ab135f475c5bc78329fd7df575291155e6055bcaf02124eb610b8ad176396 + url: https://pypi.python.org/packages/source/${{ name[0] }}/${{ name }}/${{ name + }}-${{ version }}.tar.gz + sha256: 71fea3fa7ec57f3003e9117727cedf4796c85ee517a3674b76f426632093882b build: number: 0 requirements: build: - - python - - crossenv - - cross-python_${{ target_platform }} - - ${{ compiler('c') }} - - cargo-bundle-licenses - - rust - - cffi == 1.15.1 - - setuptools-rust - - maturin + - python + - crossenv + - cross-python_${{ target_platform }} + - ${{ compiler('c') }} + - cargo-bundle-licenses + - rust + - cffi == 1.15.1 + - setuptools-rust + - maturin host: - - python - - pip - - cffi == 1.15.1 + - python + - pip + - cffi == 1.15.1 run: - - python - - cffi == 1.15.1 + - python + - cffi == 1.15.1 tests: - script: pytester @@ -43,14 +44,14 @@ tests: run: - pytester-run - scipy - + about: homepage: https://oxfordcontrol.github.io/ClarabelDocs/ license: Apache-2.0 license_family: Apache license_file: - - LICENSE.md - - THIRDPARTY.yml + - LICENSE.md + - THIRDPARTY.yml summary: 'Python interface for Clarabel: Interior Point Conic Optimization Solver' description: | Clarabel is an interior point numerical solver for convex optimization problems implemented @@ -62,4 +63,4 @@ about: extra: recipe-maintainers: - - KGB99 + - KGB99 From 22159b7a0507487bf4e50ca8d2be242bd709c569 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Wed, 26 Jun 2024 10:31:07 +0200 Subject: [PATCH 117/129] disable_bot_merging (#1145) disable_bot_merging --- emci/bot/bump_recipes_versions.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/emci/bot/bump_recipes_versions.py b/emci/bot/bump_recipes_versions.py index 77d9713cc..3bbb61437 100644 --- a/emci/bot/bump_recipes_versions.py +++ b/emci/bot/bump_recipes_versions.py @@ -245,8 +245,9 @@ def empty_context_manager(): prs_packages = [line.split()[2] for line in prs if line] # Merge PRs if possible - for pr in prs_id: - try_to_merge_pr(pr) + # ATM THIS IS DISABLED + # for pr in prs_id: + # try_to_merge_pr(pr) all_recipes = [recipe for recipe in Path(recipe_dir).iterdir() if recipe.is_dir()] From 1e8bf508c615f93f9134277d85937c438663eefa Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Wed, 26 Jun 2024 11:12:55 +0200 Subject: [PATCH 118/129] restrict pytest (#1146) --- recipes/recipes/pytester/recipe.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/recipes/pytester/recipe.yaml b/recipes/recipes/pytester/recipe.yaml index 146db1053..9cbb0103c 100644 --- a/recipes/recipes/pytester/recipe.yaml +++ b/recipes/recipes/pytester/recipe.yaml @@ -13,7 +13,7 @@ outputs: version: ${{ version }} build: - number: 8 + number: 9 noarch: python @@ -33,12 +33,12 @@ outputs: name: pytester-run version: ${{ version }} build: - number: 8 + number: 9 noarch: generic requirements: run: - pyjs - - pytest + - pytest <8 about: From f8e0b0b4dfbb4e3bea5dff1a57de815028518a4a Mon Sep 17 00:00:00 2001 From: Andreas Trawoeger Date: Wed, 26 Jun 2024 16:03:56 +0000 Subject: [PATCH 119/129] rewrite quetz upload action (#1148) --- .github/workflows/build_recipes.yaml | 54 +++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_recipes.yaml b/.github/workflows/build_recipes.yaml index c00d2af68..326cf89e1 100644 --- a/.github/workflows/build_recipes.yaml +++ b/.github/workflows/build_recipes.yaml @@ -89,13 +89,51 @@ jobs: ################################################################ - name: Upload packages to Quetz if: (github.event_name == 'push' && github.repository == 'emscripten-forge/recipes') - shell: bash -el {0} + shell: bash -l {0} + env: + QUETZ_API_KEY: ${{ secrets.QUETZ_API_KEY }} run: | - # loop over {emscripten-wasm32, linux-64, noarch} + overall_success=true + + # Loop over {emscripten-wasm32, linux-64, noarch} for platform in emscripten-wasm32 linux-64 noarch; do - mkdir -p ${GITHUB_WORKSPACE}/output/${platform} - for package in $(ls ${GITHUB_WORKSPACE}/output/${platform}/*.tar.bz2); do - echo "Uploading ${package} for ${platform} (build with rattler)" - QUETZ_API_KEY=${{ secrets.QUETZ_API_KEY}} quetz-client -u https://beta.mamba.pm post_file_to_channel emscripten-forge ${package} || true - done - done \ No newline at end of file + if [ -d "${GITHUB_WORKSPACE}/output/${platform}" ]; then + cd "${GITHUB_WORKSPACE}/output/${platform}" + files=$(ls *.tar.bz2 2> /dev/null) + if [ -n "$files" ]; then + for package in $files; do + echo "Uploading ${package} for ${platform}" + + FILE_SHA256=$(sha256sum "${package}" | awk '{ print $1 }') + CURL_CMD=( + curl -H "X-API-Key: ${QUETZ_API_KEY}" -X POST + "https://beta.mamba.pm/api/channels/emscripten-forge/upload/${package}?sha256=${FILE_SHA256}&force=false" + --data-binary "@${package}" + -o response_body.txt + -w "%{http_code}" + -s + ) + HTTP_STATUS=$( "${CURL_CMD[@]}" ) + RESPONSE=$( Date: Wed, 26 Jun 2024 18:42:11 +0200 Subject: [PATCH 120/129] adding_curl (#1150) adding_curl --- pixi.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pixi.toml b/pixi.toml index 1e1e46e99..e48c537ea 100644 --- a/pixi.toml +++ b/pixi.toml @@ -15,6 +15,7 @@ platforms = ["osx-arm64", "osx-64", "linux-64"] rattler-build = ">= 0.17.0" python = "3.11.*" typer = "*" +curl = "*" [feature.feature_rattler_build.tasks.build-emscripten-compiler-pkg] cmd = [ From e5667a7ea98dfb185e15547e1445f14474ba1c7c Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Wed, 26 Jun 2024 18:46:14 +0200 Subject: [PATCH 121/129] remove_quetz_client_use_curl (#1152) remove_quetz_client_use_curl --- ci_env.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci_env.yml b/ci_env.yml index 749868f18..acdbb644d 100644 --- a/ci_env.yml +++ b/ci_env.yml @@ -7,5 +7,5 @@ dependencies: - typer - rattler-build >= 0.16.0 - pixi - - quetz-client - jinja2 + - curl From 0c0efa6b2207085488418fe7d96bc8b4588aff28 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Wed, 26 Jun 2024 18:47:35 +0200 Subject: [PATCH 122/129] reupload_pytester (#1149) --- recipes/recipes/pytester/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes/pytester/recipe.yaml b/recipes/recipes/pytester/recipe.yaml index 9cbb0103c..88491dee2 100644 --- a/recipes/recipes/pytester/recipe.yaml +++ b/recipes/recipes/pytester/recipe.yaml @@ -13,7 +13,7 @@ outputs: version: ${{ version }} build: - number: 9 + number: 10 noarch: python @@ -33,7 +33,7 @@ outputs: name: pytester-run version: ${{ version }} build: - number: 9 + number: 10 noarch: generic requirements: run: From 69d1477c8582fcc7a7de6f84da9ebdc85e138402 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Thu, 27 Jun 2024 08:51:00 +0200 Subject: [PATCH 123/129] fix comparison in `build` section (#1133) * fix comparison * Update recipe.yaml --------- Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/pyjs/recipe.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/recipes_emscripten/pyjs/recipe.yaml b/recipes/recipes_emscripten/pyjs/recipe.yaml index ba0897add..cae6e3f3d 100644 --- a/recipes/recipes_emscripten/pyjs/recipe.yaml +++ b/recipes/recipes_emscripten/pyjs/recipe.yaml @@ -55,7 +55,7 @@ tests: requirements: build: - pytester - - if: linux + - if: build_platform == "linux-64" then: - pyjs_code_runner >=3.0.0 - microsoft::playwright <1.42 From 9e4546a39478b0c157ec3cc9b02b96900e00a8f7 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Thu, 27 Jun 2024 09:50:52 +0200 Subject: [PATCH 124/129] restrict numpy in tests (#1158) --- test_recipes/only_py_tests/recipe.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/test_recipes/only_py_tests/recipe.yaml b/test_recipes/only_py_tests/recipe.yaml index 11eda0034..aae13ad67 100644 --- a/test_recipes/only_py_tests/recipe.yaml +++ b/test_recipes/only_py_tests/recipe.yaml @@ -12,6 +12,7 @@ build: requirements: run: + - numpy<2 - python - pandas - arrow-python From 1d05548bff2ec30f239f396f7f95838184c0cd17 Mon Sep 17 00:00:00 2001 From: martinRenou Date: Thu, 27 Jun 2024 10:36:49 +0100 Subject: [PATCH 125/129] Fix pydantic-core package name (#1156) * Fix pydantic-core package name * More * Debug * debug * Update ci_env.yml * use 0.18.1 * Update ci_env.yml * 0.18.1 --------- Co-authored-by: Thorsten Beier --- ci_env.yml | 2 +- pixi.toml | 2 +- .../{pydantic_core => pydantic-core}/build.sh | 0 .../{pydantic_core => pydantic-core}/recipe.yaml | 4 ++-- .../{pydantic_core => pydantic-core}/test_pydantic_core.py | 3 +-- 5 files changed, 5 insertions(+), 6 deletions(-) rename recipes/recipes_emscripten/{pydantic_core => pydantic-core}/build.sh (100%) rename recipes/recipes_emscripten/{pydantic_core => pydantic-core}/recipe.yaml (94%) rename recipes/recipes_emscripten/{pydantic_core => pydantic-core}/test_pydantic_core.py (98%) diff --git a/ci_env.yml b/ci_env.yml index acdbb644d..09a217281 100644 --- a/ci_env.yml +++ b/ci_env.yml @@ -5,7 +5,7 @@ dependencies: - python - ruamel.yaml - typer - - rattler-build >= 0.16.0 + - rattler-build >= 0.18.1 - pixi - jinja2 - curl diff --git a/pixi.toml b/pixi.toml index e48c537ea..273764296 100644 --- a/pixi.toml +++ b/pixi.toml @@ -12,7 +12,7 @@ platforms = ["osx-arm64", "osx-64", "linux-64"] ############################################ [feature.feature_rattler_build] [feature.feature_rattler_build.dependencies] -rattler-build = ">= 0.17.0" +rattler-build = ">= 0.18.1" python = "3.11.*" typer = "*" curl = "*" diff --git a/recipes/recipes_emscripten/pydantic_core/build.sh b/recipes/recipes_emscripten/pydantic-core/build.sh similarity index 100% rename from recipes/recipes_emscripten/pydantic_core/build.sh rename to recipes/recipes_emscripten/pydantic-core/build.sh diff --git a/recipes/recipes_emscripten/pydantic_core/recipe.yaml b/recipes/recipes_emscripten/pydantic-core/recipe.yaml similarity index 94% rename from recipes/recipes_emscripten/pydantic_core/recipe.yaml rename to recipes/recipes_emscripten/pydantic-core/recipe.yaml index af3d14dcf..138af620f 100644 --- a/recipes/recipes_emscripten/pydantic_core/recipe.yaml +++ b/recipes/recipes_emscripten/pydantic-core/recipe.yaml @@ -1,9 +1,9 @@ context: - name: pydantic_core + name: pydantic-core version: '2.18.4' package: - name: pydantic_core + name: ${{ name }} version: ${{ version }} source: diff --git a/recipes/recipes_emscripten/pydantic_core/test_pydantic_core.py b/recipes/recipes_emscripten/pydantic-core/test_pydantic_core.py similarity index 98% rename from recipes/recipes_emscripten/pydantic_core/test_pydantic_core.py rename to recipes/recipes_emscripten/pydantic-core/test_pydantic_core.py index 8c22880ff..cad18c9a1 100644 --- a/recipes/recipes_emscripten/pydantic_core/test_pydantic_core.py +++ b/recipes/recipes_emscripten/pydantic-core/test_pydantic_core.py @@ -2,7 +2,6 @@ def test_pydantic_core(): from pydantic_core import SchemaValidator, ValidationError - v = SchemaValidator( { 'type': 'typed-dict', @@ -37,4 +36,4 @@ def test_pydantic_core(): # pydantic-core can also validate JSON directly r2 = v.validate_json('{"name": "Samuel", "age": 35}') - assert r1 == r2 \ No newline at end of file + assert r1 == r2 From 4b762b384e8feea78f98d581ecd608a59e9e28c4 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Thu, 27 Jun 2024 11:37:09 +0200 Subject: [PATCH 126/129] re-enable merging capabilities of bot (#1157) --- emci/bot/bump_recipes_versions.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/emci/bot/bump_recipes_versions.py b/emci/bot/bump_recipes_versions.py index 3bbb61437..77d9713cc 100644 --- a/emci/bot/bump_recipes_versions.py +++ b/emci/bot/bump_recipes_versions.py @@ -245,9 +245,8 @@ def empty_context_manager(): prs_packages = [line.split()[2] for line in prs if line] # Merge PRs if possible - # ATM THIS IS DISABLED - # for pr in prs_id: - # try_to_merge_pr(pr) + for pr in prs_id: + try_to_merge_pr(pr) all_recipes = [recipe for recipe in Path(recipe_dir).iterdir() if recipe.is_dir()] From e8a720847d821efd0fdd062629b67b4ae3e7468a Mon Sep 17 00:00:00 2001 From: KGB99 <80490551+KGB99@users.noreply.github.com> Date: Fri, 28 Jun 2024 05:50:56 +0100 Subject: [PATCH 127/129] Change Geos to be shared (#1134) * add existence tests * add ctest and cleanup * change ctest * remove ctest * update geos to be a shared library * remove debug * attempt to make geos shared * try with disabled inline * Update build.sh * Update recipe.yaml * remove symlinks * checks * Update recipe.yaml * typo --------- Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/geos/build.sh | 21 +++++++++++++++++-- .../geos/overwriteProp.cmake | 4 ++++ recipes/recipes_emscripten/geos/recipe.yaml | 12 +++++------ 3 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 recipes/recipes_emscripten/geos/overwriteProp.cmake diff --git a/recipes/recipes_emscripten/geos/build.sh b/recipes/recipes_emscripten/geos/build.sh index aac990ff1..e664779c4 100644 --- a/recipes/recipes_emscripten/geos/build.sh +++ b/recipes/recipes_emscripten/geos/build.sh @@ -6,9 +6,26 @@ emcmake cmake ${CMAKE_ARGS} \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=${PREFIX} \ -DCMAKE_INSTALL_LIBDIR=lib \ - -DBUILD_SHARED_LIBS=OFF \ + -DBUILD_SHARED_LIBS=ON \ + -DDISABLE_GEOS_INLINE=ON \ + -DCMAKE_PROJECT_INCLUDE=${RECIPE_DIR}/overwriteProp.cmake \ + -DBUILD_TESTING=OFF \ + -DBUILD_BENCHMARKS=OFF \ + -DBUILD_DOCUMENTATION=OFF \ + -DBUILD_GEOSOP=OFF \ .. -emmake make -j${CPU_COUNT} #${VERBOSE_CM} +emmake make -j${CPU_COUNT} emmake make install -j${CPU_COUNT} + + + + + +rm $PREFIX/lib/libgeos.so +rm $PREFIX/lib/libgeos_c.so.1 +rm $PREFIX/lib/libgeos_c.so + +mv $PREFIX/lib/libgeos.so.3.12.2 $PREFIX/lib/libgeos.so +mv $PREFIX/lib/libgeos_c.so.1.18.2 $PREFIX/lib/libgeos_c.so diff --git a/recipes/recipes_emscripten/geos/overwriteProp.cmake b/recipes/recipes_emscripten/geos/overwriteProp.cmake new file mode 100644 index 000000000..29b247e9b --- /dev/null +++ b/recipes/recipes_emscripten/geos/overwriteProp.cmake @@ -0,0 +1,4 @@ +set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE) +set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-s SIDE_MODULE=1") +set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-s SIDE_MODULE=1") +set(CMAKE_STRIP FALSE) # used by default in pybind11 on .so modules diff --git a/recipes/recipes_emscripten/geos/recipe.yaml b/recipes/recipes_emscripten/geos/recipe.yaml index 497cc0256..e5cc8a353 100644 --- a/recipes/recipes_emscripten/geos/recipe.yaml +++ b/recipes/recipes_emscripten/geos/recipe.yaml @@ -19,7 +19,7 @@ source: - patches/patch_json.patch build: - number: 0 + number: 1 requirements: build: @@ -30,11 +30,11 @@ requirements: - ${{ compiler('cxx') }} tests: - - script: - - test -f ${PREFIX}/bin/geosop.js - - test -f ${PREFIX}/include/geos.h - - test -f ${PREFIX}/include/geos/algorithm/Area.h - - test -f ${PREFIX}/lib/libgeos.a + - script: + - test -f ${PREFIX}/include/geos.h + - test -f ${PREFIX}/include/geos/algorithm/Area.h + - test -f ${PREFIX}/lib/libgeos.so + - test -f ${PREFIX}/lib/libgeos_c.so about: homepage: https://libgeos.org/ From b75d15c34117f78b31f81a4fc3e3295648b91978 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Fri, 28 Jun 2024 08:17:00 +0200 Subject: [PATCH 128/129] geos: change isntalled *so fiels (#1159) * Update build.sh * Update recipe.yaml * Update recipe.yaml * Update build.sh --- recipes/recipes_emscripten/geos/build.sh | 11 ----------- recipes/recipes_emscripten/geos/recipe.yaml | 4 +--- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/recipes/recipes_emscripten/geos/build.sh b/recipes/recipes_emscripten/geos/build.sh index e664779c4..138110376 100644 --- a/recipes/recipes_emscripten/geos/build.sh +++ b/recipes/recipes_emscripten/geos/build.sh @@ -18,14 +18,3 @@ emcmake cmake ${CMAKE_ARGS} \ emmake make -j${CPU_COUNT} emmake make install -j${CPU_COUNT} - - - - - -rm $PREFIX/lib/libgeos.so -rm $PREFIX/lib/libgeos_c.so.1 -rm $PREFIX/lib/libgeos_c.so - -mv $PREFIX/lib/libgeos.so.3.12.2 $PREFIX/lib/libgeos.so -mv $PREFIX/lib/libgeos_c.so.1.18.2 $PREFIX/lib/libgeos_c.so diff --git a/recipes/recipes_emscripten/geos/recipe.yaml b/recipes/recipes_emscripten/geos/recipe.yaml index e5cc8a353..f0e039d70 100644 --- a/recipes/recipes_emscripten/geos/recipe.yaml +++ b/recipes/recipes_emscripten/geos/recipe.yaml @@ -19,7 +19,7 @@ source: - patches/patch_json.patch build: - number: 1 + number: 2 requirements: build: @@ -33,8 +33,6 @@ tests: - script: - test -f ${PREFIX}/include/geos.h - test -f ${PREFIX}/include/geos/algorithm/Area.h - - test -f ${PREFIX}/lib/libgeos.so - - test -f ${PREFIX}/lib/libgeos_c.so about: homepage: https://libgeos.org/ From 8232546d6a9d5f18e5dfe53ffcd17ee7b12d85fe Mon Sep 17 00:00:00 2001 From: KGB99 <80490551+KGB99@users.noreply.github.com> Date: Fri, 28 Jun 2024 07:35:59 +0100 Subject: [PATCH 129/129] Add Shapely (#1130) * add first build and recipe * add flag for custom geos * remove_build_geos re * Create test_shapely.py * Update recipe.yaml * Update recipe.yaml * Update recipe.yaml --------- Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/shapely/build.sh | 3 + .../recipes_emscripten/shapely/recipe.yaml | 55 +++++++++++++++++++ .../shapely/test_shapely.py | 11 ++++ 3 files changed, 69 insertions(+) create mode 100644 recipes/recipes_emscripten/shapely/build.sh create mode 100644 recipes/recipes_emscripten/shapely/recipe.yaml create mode 100644 recipes/recipes_emscripten/shapely/test_shapely.py diff --git a/recipes/recipes_emscripten/shapely/build.sh b/recipes/recipes_emscripten/shapely/build.sh new file mode 100644 index 000000000..0b5e3b8c7 --- /dev/null +++ b/recipes/recipes_emscripten/shapely/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +${PYTHON} -m pip install . -vv --no-binary shapely diff --git a/recipes/recipes_emscripten/shapely/recipe.yaml b/recipes/recipes_emscripten/shapely/recipe.yaml new file mode 100644 index 000000000..e26ffd0c3 --- /dev/null +++ b/recipes/recipes_emscripten/shapely/recipe.yaml @@ -0,0 +1,55 @@ +context: + name: shapely + version: 2.0.4 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://pypi.io/packages/source/S/Shapely/shapely-${{ version }}.tar.gz + sha256: 5dc736127fac70009b8d309a0eeb74f3e08979e530cf7017f2f507ef62e6cfb8 + +build: + number: 0 + +requirements: + build: + - python + - pip + - cross-python_${{ target_platform }} + - cython + - numpy<2 + - ${{ compiler('c') }} + host: + - python + - pip + #- cython + - numpy <2 + - geos + run: + - geos + - python + - numpy + +tests: + - script: pytester + requirements: + build: + - pytester + run: + - pytester-run + files: + recipe: + - test_shapely.py + + +about: + homepage: https://github.com/shapely/shapely + license: BSD-3-Clause + license_file: LICENSE.txt + summary: Python package for manipulation and analysis of geometric objects in the Cartesian plane + +extra: + recipe-maintainers: + - KGB99 diff --git a/recipes/recipes_emscripten/shapely/test_shapely.py b/recipes/recipes_emscripten/shapely/test_shapely.py new file mode 100644 index 000000000..42d138e4f --- /dev/null +++ b/recipes/recipes_emscripten/shapely/test_shapely.py @@ -0,0 +1,11 @@ +import pytest + + +def test_import(): + import shapely + +def test_basics(): + from shapely import Polygon + c = Polygon([[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]]).minimum_clearance + c == pytest.approx(1.0) +