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 001/333] 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 002/333] 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 003/333] 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 004/333] 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 005/333] 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 006/333] 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 007/333] 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 008/333] 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 009/333] 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 010/333] 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 011/333] 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 012/333] 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 013/333] 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 014/333] 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 015/333] 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 016/333] 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 017/333] 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 018/333] 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 019/333] 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 020/333] 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 021/333] 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 022/333] 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 023/333] 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 024/333] 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 025/333] 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 026/333] 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 027/333] 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 028/333] 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 029/333] 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 030/333] 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 031/333] 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 032/333] 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 033/333] 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 034/333] 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 035/333] 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 036/333] 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 037/333] 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 038/333] 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 039/333] 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 040/333] 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 041/333] 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 042/333] 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 043/333] 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 044/333] 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 045/333] 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 046/333] 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 047/333] 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 048/333] 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 049/333] 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 050/333] 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 051/333] 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 052/333] 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 053/333] 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 054/333] 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 055/333] 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 056/333] 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 057/333] 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 058/333] 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 059/333] 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 060/333] 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 061/333] 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 062/333] 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 063/333] 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 064/333] 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 065/333] 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 066/333] 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 067/333] 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 068/333] 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 069/333] 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 070/333] 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 071/333] 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 072/333] 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 073/333] 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 074/333] 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 075/333] 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 076/333] 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 077/333] 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 078/333] 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 079/333] 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 080/333] 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 081/333] 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 082/333] 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 083/333] 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 084/333] 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 085/333] 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 086/333] 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 087/333] 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 088/333] 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 089/333] 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 090/333] 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 091/333] 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 092/333] 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 093/333] 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 094/333] 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 095/333] 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 096/333] 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 097/333] 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 098/333] 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 099/333] 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 100/333] 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 101/333] 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 102/333] 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 103/333] 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 104/333] 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 105/333] 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 106/333] 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 107/333] 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 108/333] 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 109/333] 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 110/333] 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 111/333] 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 112/333] 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 113/333] 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 114/333] 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 115/333] 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 116/333] 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) + From 6c631a83249694c897956cdbd85b3cb909eea51b Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 1 Jul 2024 08:59:27 +0200 Subject: [PATCH 117/333] Update clarabel from 0.8.0 to 0.8.1 (#1144) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/clarabel/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/clarabel/recipe.yaml b/recipes/recipes_emscripten/clarabel/recipe.yaml index 39cb224ce..76d1694a9 100644 --- a/recipes/recipes_emscripten/clarabel/recipe.yaml +++ b/recipes/recipes_emscripten/clarabel/recipe.yaml @@ -1,6 +1,6 @@ context: name: clarabel - version: 0.8.0 + version: 0.8.1 package: name: ${{ name|lower }} @@ -9,7 +9,7 @@ package: source: url: https://pypi.python.org/packages/source/${{ name[0] }}/${{ name }}/${{ name }}-${{ version }}.tar.gz - sha256: 71fea3fa7ec57f3003e9117727cedf4796c85ee517a3674b76f426632093882b + sha256: d3718417396fccb79e74a55e0e891d1c602bc23ba7877666f1c2502fdd2623ea build: number: 0 From 321dd067b538f89395256b61d469a83d982df2f2 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 1 Jul 2024 09:00:08 +0200 Subject: [PATCH 118/333] Update pandas from 2.1.4 to 2.2.0 (#1034) * Update pandas from 2.1.4 to 2.2.0 * relax cython --------- Co-authored-by: emscripten-forge-bot Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/pandas/recipe.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/recipes_emscripten/pandas/recipe.yaml b/recipes/recipes_emscripten/pandas/recipe.yaml index f693ce9e2..36803fd6e 100644 --- a/recipes/recipes_emscripten/pandas/recipe.yaml +++ b/recipes/recipes_emscripten/pandas/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.1.4 + version: 2.2.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: fcb68203c833cc735321512e13861358079a96c174a61f5116a1de89c58c0ef7 + sha256: 9c8a9c3938f4f4727ca056d0f96bdb0dd795e7b195283223e473eb29b3517cb6 #patches: # - patches/fix_json_signature.patch @@ -19,7 +19,7 @@ requirements: build: - cross-python_emscripten-wasm32 - numpy - - cython <=2 + - cython - pip - versioneer - tomli From a68f0b7cca40311bb1ba99ba6598064b31d37a33 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 1 Jul 2024 09:00:28 +0200 Subject: [PATCH 119/333] Update cftime from 1.6.3 to 1.6.4 (#1102) * Update cftime from 1.6.3 to 1.6.4 * Update recipe.yaml --------- Co-authored-by: emscripten-forge-bot Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/cftime/recipe.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/recipes_emscripten/cftime/recipe.yaml b/recipes/recipes_emscripten/cftime/recipe.yaml index 214650ef9..1239a9f5b 100644 --- a/recipes/recipes_emscripten/cftime/recipe.yaml +++ b/recipes/recipes_emscripten/cftime/recipe.yaml @@ -1,6 +1,6 @@ context: name: cftime - version: 1.6.3 + version: 1.6.4 package: name: ${{ name }} @@ -9,10 +9,10 @@ package: source: url: https://pypi.io/packages/source/${{ name[0] }}/${{ name }}/${{ name }}-${{ version }}.tar.gz - sha256: d0a6b29f72a13f08e008b9becff247cc75c84acb213332ede18879c5b6aa4dfd + sha256: e325406193758a7ed67308deb52e727782a19e384e183378e7ff62098be0aedc build: - script: ${{ PYTHON }} -m pip install . -vv + script: $PYTHON -m pip install . -vv number: 0 requirements: From 539dc15643f2288a0334f0e467dda8235248cf55 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Tue, 2 Jul 2024 08:26:16 +0200 Subject: [PATCH 120/333] add howardhinnant_date recipe (#1162) * added howardhinnant date * date --- .../howardhinnant_date/build.sh | 18 ++++++++++ .../howardhinnant_date/recipe.yaml | 36 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 recipes/recipes_emscripten/howardhinnant_date/build.sh create mode 100644 recipes/recipes_emscripten/howardhinnant_date/recipe.yaml diff --git a/recipes/recipes_emscripten/howardhinnant_date/build.sh b/recipes/recipes_emscripten/howardhinnant_date/build.sh new file mode 100644 index 000000000..703f4c8c9 --- /dev/null +++ b/recipes/recipes_emscripten/howardhinnant_date/build.sh @@ -0,0 +1,18 @@ + +mkdir build +cd build + + +# Configure step +cmake ${CMAKE_ARGS} .. \ + -GNinja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_FIND_DEBUG_MODE=OFF \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DUSE_SYSTEM_TZ_DB=ON -DBUILD_TZ_LIB=ON -DCMAKE_CXX_FLAGS="-fPIC" + + +# Build step +ninja install diff --git a/recipes/recipes_emscripten/howardhinnant_date/recipe.yaml b/recipes/recipes_emscripten/howardhinnant_date/recipe.yaml new file mode 100644 index 000000000..c0e16a52c --- /dev/null +++ b/recipes/recipes_emscripten/howardhinnant_date/recipe.yaml @@ -0,0 +1,36 @@ +context: + version: 3.0.1 + + +package: + name: howardhinnant_date + version: ${{ version }} + +source: + url: https://github.com/howardhinnant/date/archive/refs/tags/v${{ version }}.tar.gz + sha256: 7a390f200f0ccd207e8cff6757e04817c1a0aec3e327b006b7eb451c57ee3538 + +build: + number: 0 + +requirements: + build: + - ${{ compiler("cxx") }} + - cmake + - ninja + +tests: +- script: + - test -f $PREFIX/include/date/date.h + - test -f $PREFIX/include/date/tz.h + - test -f $PREFIX/lib/cmake/date/dateConfig.cmake + - test -f $PREFIX/lib/libdate-tz.a + +about: + license: MIT + license_file: LICENSE.txt + summary: date + homepage: https://github.com/howardhinnant/date +extra: + recipe-maintainers: + - DerThorsten From 69719549e3a34a4bc2606adbeaf51376e09b820c Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Tue, 2 Jul 2024 10:21:37 +0200 Subject: [PATCH 121/333] doctest (#1163) --- recipes/recipes_emscripten/doctest/build.sh | 20 +++++++++++ .../recipes_emscripten/doctest/recipe.yaml | 34 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 recipes/recipes_emscripten/doctest/build.sh create mode 100644 recipes/recipes_emscripten/doctest/recipe.yaml diff --git a/recipes/recipes_emscripten/doctest/build.sh b/recipes/recipes_emscripten/doctest/build.sh new file mode 100644 index 000000000..5b6c7c259 --- /dev/null +++ b/recipes/recipes_emscripten/doctest/build.sh @@ -0,0 +1,20 @@ + +mkdir build +cd build + + +# Configure step +cmake ${CMAKE_ARGS} .. \ + -GNinja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_FIND_DEBUG_MODE=OFF \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DDOCTEST_WITH_TESTS=OFF \ + -DDOCTEST_WITH_MAIN_IN_STATIC_LIB=OFF + + +# Build step +ninja install diff --git a/recipes/recipes_emscripten/doctest/recipe.yaml b/recipes/recipes_emscripten/doctest/recipe.yaml new file mode 100644 index 000000000..28003f9e0 --- /dev/null +++ b/recipes/recipes_emscripten/doctest/recipe.yaml @@ -0,0 +1,34 @@ +context: + version: 2.4.11 + + +package: + name: doctest + version: ${{ version }} + +source: + url: https://github.com/onqtam/doctest/archive/refs/tags/v${{ version }}.zip + sha256: 6745e17682d6e2be1ea31ec8bf1814a3d7cb17d61d120e5f2ee5a075926634ad + +build: + number: 0 + +requirements: + build: + - ${{ compiler("cxx") }} + - cmake + - ninja + +tests: +- script: + - test -f $PREFIX/include/doctest/doctest.h + - test -f $PREFIX/lib/cmake/doctest/doctestConfig.cmake + +about: + license: MIT + license_file: LICENSE.txt + summary: doctest + homepage: https://github.com/onqtam/doctest +extra: + recipe-maintainers: + - DerThorsten From 990efd77b25574300768da5339479f2cdfbcead1 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Tue, 2 Jul 2024 18:51:48 +0530 Subject: [PATCH 122/333] Update xeus to 5.1.1 (#1165) --- 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 40498f0fe..db2090ded 100644 --- a/recipes/recipes_emscripten/xeus/recipe.yaml +++ b/recipes/recipes_emscripten/xeus/recipe.yaml @@ -1,6 +1,6 @@ context: - version: 5.1.0 + version: 5.1.1 package: @@ -9,7 +9,7 @@ package: source: url: https://github.com/jupyter-xeus/xeus/archive/refs/tags/${{ version }}.tar.gz - sha256: ff8f854ac5771bc43bd1f5fce45056c0881bfc1e489b59001655d338ecef8ec9 + sha256: 46643f1232a009ef64dc25e7c85da32194bff0c09792f7e56e1bdde2d6f0e948 build: number: 0 From a9085fa2e267be93090f80f1bc2165c622bad3c3 Mon Sep 17 00:00:00 2001 From: KGB99 <80490551+KGB99@users.noreply.github.com> Date: Wed, 3 Jul 2024 09:49:28 +0100 Subject: [PATCH 123/333] Add Proj (#1160) * add build and recipe * build without curl * add comment * update build to use embuilder * remove embuilder * remove overwriteprop.cmake * skip sqlite and libtiff in cmake * rename patch * pass cmake step * add install step * change sqlite to sqlitecpp * successfully builds * add existence tests * add libtiff * cleanup and build shared * build shared off --- recipes/recipes_emscripten/proj/build.sh | 25 ++++++++++++ recipes/recipes_emscripten/proj/recipe.yaml | 45 +++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 recipes/recipes_emscripten/proj/build.sh create mode 100644 recipes/recipes_emscripten/proj/recipe.yaml diff --git a/recipes/recipes_emscripten/proj/build.sh b/recipes/recipes_emscripten/proj/build.sh new file mode 100644 index 000000000..4ea063ded --- /dev/null +++ b/recipes/recipes_emscripten/proj/build.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +mkdir -p build + +cd build + +export LIBS=${BUILD_PREFIX}/include + +# to build without curl we need to disable projsync too +emcmake cmake ${CMAKE_ARGS} .. \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=OFF \ + -DBUILD_APPS=OFF \ + -DBUILD_TESTING=OFF \ + -DENABLE_CURL=OFF \ + -DBUILD_PROJSYNC=OFF \ + -DSQLite3_INCLUDE_DIR=${LIBS} \ + -DSQLite3_LIBRARY=${LIBS} \ + -DTIFF_INCLUDE_DIR=${LIBS} \ + -DTIFF_LIBRARY=${LIBS} \ + +emmake make -j${CPU_COUNT} #${VERBOSE_CM} + +emmake make install -j${CPU_COUNT} + diff --git a/recipes/recipes_emscripten/proj/recipe.yaml b/recipes/recipes_emscripten/proj/recipe.yaml new file mode 100644 index 000000000..b777032c0 --- /dev/null +++ b/recipes/recipes_emscripten/proj/recipe.yaml @@ -0,0 +1,45 @@ +context: + name: proj + version: 9.4.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://download.osgeo.org/proj/proj-${{ version }}.tar.gz + sha256: ffe20170ee2b952207adf8a195e2141eab12cda181e49fdeb54425d98c7171d7 + +build: + number: 0 + +requirements: + build: + - cmake + - make + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + - sqlitecpp + - libtiff + - requests + host: + - sqlitecpp + - libtiff + run: + - sqlitecpp + - libtiff + +tests: + - script: + - test -f ${PREFIX}/include/proj.h + - test -f ${PREFIX}/lib/libproj.a + +about: + homepage: https://proj.org/ + license: MIT + license_file: COPYING + summary: Cartographic Projections and Coordinate Transformations Library + +extra: + recipe-maintainers: + - KGB99 From cdca604177df9ae076dd3d2ad8dbce4984a050c1 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Wed, 3 Jul 2024 10:51:10 +0200 Subject: [PATCH 124/333] Update glib from 2.56.4 to 2.80.0 (#1164) * Update recipe Working patch and build Clean up * Update dependencies * Add tests --- recipes/recipes_emscripten/glib/build.sh | 37 +- .../glib/emscripten.meson.cross | 23 + .../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 - .../glib/patches/glib.patch | 5642 +++++++++++++++++ recipes/recipes_emscripten/glib/recipe.yaml | 34 +- 9 files changed, 5715 insertions(+), 10092 deletions(-) create mode 100644 recipes/recipes_emscripten/glib/emscripten.meson.cross delete mode 100644 recipes/recipes_emscripten/glib/patches/emscripten-configure.diff delete mode 100644 recipes/recipes_emscripten/glib/patches/emscripten-disable-pcre.diff delete mode 100644 recipes/recipes_emscripten/glib/patches/emscripten-function-ptr.diff delete mode 100644 recipes/recipes_emscripten/glib/patches/emscripten-wasm.diff delete mode 100644 recipes/recipes_emscripten/glib/patches/fix-python12.diff create mode 100644 recipes/recipes_emscripten/glib/patches/glib.patch diff --git a/recipes/recipes_emscripten/glib/build.sh b/recipes/recipes_emscripten/glib/build.sh index eb0bdf01d..a70b535e9 100644 --- a/recipes/recipes_emscripten/glib/build.sh +++ b/recipes/recipes_emscripten/glib/build.sh @@ -1,9 +1,28 @@ -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 +#!/bin/bash + +# From https://gist.github.com/kleisauke/acfa1c09522705efa5eb0541d2d00887 + +# Propagate -pthread into CFLAGS to ensure GObject/GIO is compiled with the +# atomics/bulk-memory features +CFLAGS="$CFLAGS -pthread" + +meson_config_args=( + -Dintrospection=disabled + -Dselinux=disabled + -Dlibmount=disabled + -Dnls=disabled + -Dxattr=false + -Dtests=false + -Dglib_assert=false + -Dglib_checks=false +) + +meson setup builddir \ + "${meson_config_args[@]}" \ + --prefix=$PREFIX \ + --cross-file=$RECIPE_DIR/emscripten.meson.cross \ + --default-library=static \ + --buildtype=release \ + --force-fallback-for=pcre2,gvdb + +meson install -C builddir --tag devel diff --git a/recipes/recipes_emscripten/glib/emscripten.meson.cross b/recipes/recipes_emscripten/glib/emscripten.meson.cross new file mode 100644 index 000000000..df89833ab --- /dev/null +++ b/recipes/recipes_emscripten/glib/emscripten.meson.cross @@ -0,0 +1,23 @@ +[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', '--static'] +c = 'emcc' +cpp = 'em++' +ar = 'emar' +ranlib = 'emranlib' + +# Ensure that `-sPTHREAD_POOL_SIZE=4` is not injected into .pc files +[built-in options] +c_thread_count = 0 +cpp_thread_count = 0 diff --git a/recipes/recipes_emscripten/glib/patches/emscripten-configure.diff b/recipes/recipes_emscripten/glib/patches/emscripten-configure.diff deleted file mode 100644 index 7c605e588..000000000 --- a/recipes/recipes_emscripten/glib/patches/emscripten-configure.diff +++ /dev/null @@ -1,1132 +0,0 @@ -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 deleted file mode 100644 index 19285bc65..000000000 --- a/recipes/recipes_emscripten/glib/patches/emscripten-disable-pcre.diff +++ /dev/null @@ -1,3926 +0,0 @@ -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 deleted file mode 100644 index 7bec7e917..000000000 --- a/recipes/recipes_emscripten/glib/patches/emscripten-function-ptr.diff +++ /dev/null @@ -1,2383 +0,0 @@ -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 deleted file mode 100644 index 7d8b46f16..000000000 --- a/recipes/recipes_emscripten/glib/patches/emscripten-wasm.diff +++ /dev/null @@ -1,2588 +0,0 @@ -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 deleted file mode 100644 index ee4559b67..000000000 --- a/recipes/recipes_emscripten/glib/patches/fix-python12.diff +++ /dev/null @@ -1,42 +0,0 @@ -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/patches/glib.patch b/recipes/recipes_emscripten/glib/patches/glib.patch new file mode 100644 index 000000000..1f97af1cb --- /dev/null +++ b/recipes/recipes_emscripten/glib/patches/glib.patch @@ -0,0 +1,5642 @@ +From 0d18ac470a217219cd6123ea2d9348e0ce6456bb Mon Sep 17 00:00:00 2001 +From: Kleis Auke Wolthuizen +Date: Tue, 8 Oct 2019 11:30:00 +0200 +Subject: [PATCH 01/10] Do not build tools + +We're only interested in the libraries. + +Upstream-Status: Inappropriate [disable feature] +This patch is just for our convenience. +--- + gio/meson.build | 137 -------------------------------------------- + glib/meson.build | 2 +- + gobject/meson.build | 5 -- + meson.build | 3 - + 4 files changed, 1 insertion(+), 146 deletions(-) + +diff --git a/gio/meson.build b/gio/meson.build +index 59c2b0fc023..30b411fad40 100644 +--- a/gio/meson.build ++++ b/gio/meson.build +@@ -404,20 +404,6 @@ if host_system != 'windows' + contenttype_sources += files('gcontenttype.c') + unix_sources += files('gdesktopappinfo.c') + gio_unix_include_headers += files('gdesktopappinfo.h') +- launch_desktop_sources = files('gio-launch-desktop.c') +- +- if host_system == 'linux' +- launch_desktop_sources += files('../glib/gjournal-private.c') +- endif +- +- gio_launch_desktop = executable('gio-launch-desktop', launch_desktop_sources, +- include_directories : glibinc, +- install : true, +- install_dir : multiarch_libexecdir, +- install_tag : 'bin', +- c_args : gio_c_args, +- # intl.lib is not compatible with SAFESEH +- link_args : noseh_link_args) + endif + + subdir('xdgmime') +@@ -962,119 +948,6 @@ gconstructor_as_data_h = custom_target('gconstructor_as_data.h', + output : ['gconstructor_as_data.h'], + command : [python, '@INPUT0@', '@INPUT1@', 'gconstructor_code', '@OUTPUT@']) + +-# Several installed executables +-gio_tool_sources = [ +- 'gio-tool.c', +- 'gio-tool.h', +- 'gio-tool-cat.c', +- 'gio-tool-copy.c', +- 'gio-tool-info.c', +- 'gio-tool-launch.c', +- 'gio-tool-list.c', +- 'gio-tool-mime.c', +- 'gio-tool-mkdir.c', +- 'gio-tool-monitor.c', +- 'gio-tool-mount.c', +- 'gio-tool-move.c', +- 'gio-tool-open.c', +- 'gio-tool-rename.c', +- 'gio-tool-remove.c', +- 'gio-tool-save.c', +- 'gio-tool-set.c', +- 'gio-tool-trash.c', +- 'gio-tool-tree.c', +-] +- +-gio_tool = executable('gio', gio_tool_sources, +- install : true, +- install_tag : 'bin', +- c_args : gio_c_args, +- # intl.lib is not compatible with SAFESEH +- link_args : noseh_link_args, +- dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep]) +- +-executable('gresource', 'gresource-tool.c', +- install : true, +- install_tag : 'bin', +- # intl.lib is not compatible with SAFESEH +- link_args : noseh_link_args, +- dependencies : [libelf, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep]) +- +-gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodule-priv.c', +- install : true, +- install_dir : multiarch_bindir, +- install_tag : 'bin', +- c_args : gio_c_args, +- # intl.lib is not compatible with SAFESEH +- link_args : noseh_link_args, +- dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep]) +- +-glib_compile_schemas = executable('glib-compile-schemas', +- ['glib-compile-schemas.c'], +- install : true, +- install_dir : multiarch_bindir, +- install_tag : 'bin', +- # intl.lib is not compatible with SAFESEH +- link_args : noseh_link_args, +- dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep, gvdb_dep]) +- +-glib_compile_resources = executable('glib-compile-resources', +- [gconstructor_as_data_h, 'glib-compile-resources.c'], +- install : true, +- install_tag : 'bin-devel', +- c_args : gio_c_args, +- # intl.lib is not compatible with SAFESEH +- link_args : noseh_link_args, +- dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep, gvdb_dep]) +-install_data('gresource.dtd', +- install_dir: get_option('datadir') / dtds_subdir, +- install_tag: 'devel', +-) +- +-# Cannot override those programs in cross compilation case because they are +-# native executables that cannot be run on the build machine. +-# See https://gitlab.gnome.org/GNOME/glib/issues/1859. +-if meson.can_run_host_binaries() +- meson.override_find_program('glib-compile-schemas', glib_compile_schemas) +- meson.override_find_program('glib-compile-resources', glib_compile_resources) +- meson.override_find_program('gio-querymodules', gio_querymodules) +-endif +- +-executable('gsettings', 'gsettings-tool.c', +- install : true, +- install_tag : 'bin', +- c_args : gio_c_args, +- # intl.lib is not compatible with SAFESEH +- link_args : noseh_link_args, +- dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep]) +-install_data('gschema.dtd', +- install_dir : get_option('datadir') / schemas_subdir, +- install_tag : 'devel', +-) +- +-install_data(['gschema.loc', 'gschema.its'], +- install_dir : get_option('datadir') / 'gettext' / 'its', +- install_tag : 'devel', +-) +- +-executable('gdbus', 'gdbus-tool.c', +- install : true, +- install_tag : 'bin', +- c_args : gio_c_args, +- # intl.lib is not compatible with SAFESEH +- link_args : noseh_link_args, +- dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep]) +- +-if host_system != 'windows' and not glib_have_cocoa +- executable('gapplication', 'gapplication-tool.c', +- install : true, +- install_tag : 'bin', +- c_args : gio_c_args, +- # intl.lib is not compatible with SAFESEH +- link_args : noseh_link_args, +- dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep]) +-endif +- + if enable_systemtap + gio_stp = configure_file(input : 'gio.stp.in', + output : '@0@.stp'.format(libgio.full_path().split('/').get(-1)), +@@ -1084,16 +957,6 @@ if enable_systemtap + ) + endif + +-if multiarch_bindir != get_option('bindir') +- foreach exe : ['gio-querymodules', 'glib-compile-schemas'] +- install_symlink( +- exe, +- install_dir : get_option('bindir'), +- pointing_to : get_option('prefix') / multiarch_bindir / exe, +- ) +- endforeach +-endif +- + if build_tests + subdir('tests') + endif +diff --git a/glib/meson.build b/glib/meson.build +index d2efebadce8..f4944d5f343 100644 +--- a/glib/meson.build ++++ b/glib/meson.build +@@ -487,7 +487,7 @@ if host_system == 'windows' + include_directories : configinc, + dependencies : [libglib_dep]) + endif +-else ++elif host_system != 'emscripten' + gtester = executable('gtester', 'gtester.c', + install : true, + install_tag : 'bin-devel', +diff --git a/gobject/meson.build b/gobject/meson.build +index 2129aaf8a66..0cf39253dc3 100644 +--- a/gobject/meson.build ++++ b/gobject/meson.build +@@ -170,11 +170,6 @@ libgobject_dep = declare_dependency(link_with : libgobject, + ) + meson.override_dependency('gobject-2.0', libgobject_dep) + +-gobject_query = executable('gobject-query', 'gobject-query.c', +- install : true, +- install_tag : 'bin-devel', +- dependencies : [libglib_dep, libgobject_dep]) +- + install_data('gobject_gdb.py', + install_dir : glib_pkgdatadir / 'gdb', + install_tag : 'devel', +diff --git a/meson.build b/meson.build +index 7534542091a..a38fb12514e 100644 +--- a/meson.build ++++ b/meson.build +@@ -2571,9 +2571,6 @@ subdir('gobject') + subdir('gthread') + subdir('gmodule') + subdir('gio') +-subdir('girepository') +-subdir('fuzzing') +-subdir('tests') + + # xgettext is optional (on Windows for instance) + if find_program('xgettext', required : get_option('nls')).found() + +From 8b6b4992c8c1f8216ae3ebcc1c5c16901827c33d Mon Sep 17 00:00:00 2001 +From: Kleis Auke Wolthuizen +Date: Wed, 13 Jul 2022 09:44:36 +0200 +Subject: [PATCH 02/10] Remove GRegex pre-emptively + +Unused by libvips or any of the libraries it relies on. + +Upstream-Status: Inappropriate [disable feature] +Upstream may still depend on GRegex. +--- + gio/gsettingsschema.c | 57 +--------------------------------------- + glib/glib-autocleanups.h | 2 -- + glib/glib.h | 1 - + glib/meson.build | 11 +------- + gobject/gboxed.c | 3 --- + gobject/glib-types.h | 9 ------- + meson.build | 40 ---------------------------- + 7 files changed, 2 insertions(+), 121 deletions(-) + +diff --git a/gio/gsettingsschema.c b/gio/gsettingsschema.c +index b1918657da6..7b9328d4843 100644 +--- a/gio/gsettingsschema.c ++++ b/gio/gsettingsschema.c +@@ -548,62 +548,7 @@ start_element (GMarkupParseContext *context, + 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_pointer (&splitter)) +- { +- GRegex *s; +- +- cleanup[0] = g_regex_new ("^\\s+", G_REGEX_DEFAULT, +- G_REGEX_MATCH_DEFAULT, NULL); +- cleanup[1] = g_regex_new ("\\s+$", G_REGEX_DEFAULT, +- G_REGEX_MATCH_DEFAULT, NULL); +- cleanup[2] = g_regex_new ("\\s+", G_REGEX_DEFAULT, +- G_REGEX_MATCH_DEFAULT, NULL); +- s = g_regex_new ("\\n\\s*\\n+", G_REGEX_DEFAULT, +- G_REGEX_MATCH_DEFAULT, NULL); +- +- g_once_init_leave_pointer (&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 +diff --git a/glib/glib-autocleanups.h b/glib/glib-autocleanups.h +index 68be87c84a3..24e74472883 100644 +--- a/glib/glib-autocleanups.h ++++ b/glib/glib-autocleanups.h +@@ -75,8 +75,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GPatternSpec, g_pattern_spec_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) +diff --git a/glib/glib.h b/glib/glib.h +index 40e501997aa..d107dabc6f8 100644 +--- a/glib/glib.h ++++ b/glib/glib.h +@@ -75,7 +75,6 @@ + #include + #include + #include +-#include + #include + #include + #include +diff --git a/glib/meson.build b/glib/meson.build +index f4944d5f343..86e801a8346 100644 +--- a/glib/meson.build ++++ b/glib/meson.build +@@ -220,7 +220,6 @@ glib_sub_headers = files( + 'grcbox.h', + 'grefcount.h', + 'grefstring.h', +- 'gregex.h', + 'gscanner.h', + 'gsequence.h', + 'gshell.h', +@@ -314,7 +313,6 @@ glib_sources += files( + 'grcbox.c', + 'grefcount.c', + 'grefstring.c', +- 'gregex.c', + 'gscanner.c', + 'gsequence.c', + 'gshell.c', +@@ -400,13 +398,7 @@ else + glib_dtrace_hdr = [] + endif + +-pcre2_static_args = [] +- +-if use_pcre2_static_flag +- pcre2_static_args = ['-DPCRE2_STATIC'] +-endif +- +-glib_c_args = ['-DG_LOG_DOMAIN="GLib"'] + glib_c_args_internal + pcre2_static_args ++glib_c_args = ['-DG_LOG_DOMAIN="GLib"'] + glib_c_args_internal + libglib = library('glib-2.0', + glib_dtrace_obj, glib_dtrace_hdr, + sources : [glib_deprecated_sources, glib_sources], +@@ -425,7 +417,6 @@ libglib = library('glib-2.0', + libm, + librt, + libsysprof_capture_dep, +- pcre2, + platform_deps, + thread_dep, + ], +diff --git a/gobject/gboxed.c b/gobject/gboxed.c +index 04cededa0bd..63a4f2f8116 100644 +--- a/gobject/gboxed.c ++++ b/gobject/gboxed.c +@@ -121,9 +121,6 @@ G_DEFINE_BOXED_TYPE (GByteArray, g_byte_array, g_byte_array_ref, g_byte_array_un + G_DEFINE_BOXED_TYPE (GBytes, g_bytes, g_bytes_ref, g_bytes_unref) + G_DEFINE_BOXED_TYPE (GTree, g_tree, g_tree_ref, g_tree_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/gobject/glib-types.h b/gobject/glib-types.h +index e31baf144b5..239f7ba7000 100644 +--- a/gobject/glib-types.h ++++ b/gobject/glib-types.h +@@ -88,15 +88,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: + * +diff --git a/meson.build b/meson.build +index a38fb12514e..50f40a5f2a4 100644 +--- a/meson.build ++++ b/meson.build +@@ -2170,46 +2170,6 @@ else + libiconv = dependency('iconv') + endif + +-pcre2_req = '>=10.32' +- +-# Pick up pcre from the system, or if "--force-fallback-for libpcre2-8" was specified +-pcre2 = dependency('libpcre2-8', version: pcre2_req, required: false, default_options: ['default_library=static']) +-if not pcre2.found() +- if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' +- # MSVC: Search for the PCRE2 library by the configuration, which corresponds +- # to the output of CMake builds of PCRE2. Note that debugoptimized +- # is really a Release build with .PDB files. +- if vs_crt == 'debug' +- pcre2 = cc.find_library('pcre2d-8', required : false) +- else +- pcre2 = cc.find_library('pcre2-8', required : false) +- endif +- endif +-endif +- +-# Try again with the fallback +-if not pcre2.found() +- pcre2 = dependency('libpcre2-8', version: pcre2_req, allow_fallback: true, default_options: ['default_library=static']) +- assert(pcre2.type_name() == 'internal') +- # static flags are automatically enabled by the subproject if it's built +- # with default_library=static +- use_pcre2_static_flag = false +-elif host_system == 'windows' and pcre2.type_name() != 'internal' +- pcre2_static = cc.links('''#define PCRE2_STATIC +- #define PCRE2_CODE_UNIT_WIDTH 8 +- #include +- int main() { +- void *p = NULL; +- pcre2_code_free(p); +- return 0; +- }''', +- dependencies: pcre2, +- name : 'Windows system PCRE2 is a static build') +- use_pcre2_static_flag = pcre2_static +-else +- use_pcre2_static_flag = false +-endif +- + # Import the gvdb sources as a subproject to avoid having the copylib in-tree + subproject('gvdb') + gvdb_dep = dependency('gvdb') + +From 87a40d9d88cf66169227c9c7f6d302c3130adac7 Mon Sep 17 00:00:00 2001 +From: Kleis Auke Wolthuizen +Date: Tue, 23 Aug 2022 10:29:57 +0200 +Subject: [PATCH 03/10] Disable NLS + +Upstream-Status: Inappropriate [disable feature] +This patch is just for our convenience. +--- + glib/gi18n-lib.h | 15 +++------------ + 1 file changed, 3 insertions(+), 12 deletions(-) + +diff --git a/glib/gi18n-lib.h b/glib/gi18n-lib.h +index fe9e79dbd96..8597f90d1de 100644 +--- a/glib/gi18n-lib.h ++++ b/glib/gi18n-lib.h +@@ -20,19 +20,10 @@ + #ifndef __G_I18N_LIB_H__ + #define __G_I18N_LIB_H__ + +-#include +- +-#include +-#include +- +-#ifndef GETTEXT_PACKAGE +-#error You must define GETTEXT_PACKAGE before including gi18n-lib.h. Did you forget to include config.h? +-#endif +- +-#define _(String) ((char *) g_dgettext (GETTEXT_PACKAGE, String)) +-#define Q_(String) g_dpgettext (GETTEXT_PACKAGE, String, 0) ++#define _(String) (String) ++#define Q_(String) (String) + #define N_(String) (String) +-#define C_(Context,String) g_dpgettext (GETTEXT_PACKAGE, Context "\004" String, strlen (Context) + 1) ++#define C_(Context,String) (String) + #define NC_(Context, String) (String) + + #endif /* __G_I18N_LIB_H__ */ + +From 07086699bbcefcf4ecd22e1453f8f2406fdec05c Mon Sep 17 00:00:00 2001 +From: Kleis Auke Wolthuizen +Date: Wed, 18 Sep 2019 15:00:00 +0200 +Subject: [PATCH 04/10] Emscripten doesn't always define + __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 + +See: +https://github.com/llvm/llvm-project/commit/d227c3b68cf5c236902c9ff4fdf8b719c9a3dd26 +--- + meson.build | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index 50f40a5f2a4..c953b8e343c 100644 +--- a/meson.build ++++ b/meson.build +@@ -2021,8 +2021,8 @@ atomicdefine = ''' + # We know that we can always use real ("lock free") atomic operations with MSVC + if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' or cc.links(atomictest, name : 'atomic ops') + have_atomic_lock_free = true +- if cc.get_id() == 'gcc' and not cc.compiles(atomicdefine, name : 'atomic ops define') +- # Old gcc release may provide ++ if (cc.get_id() == 'gcc' or host_system == 'emscripten') and not cc.compiles(atomicdefine, name : 'atomic ops define') ++ # Some old releases of GCC or Emscripten provides + # __sync_bool_compare_and_swap but doesn't define + # __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 + glib_conf.set('__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4', true) + +From 3d6fcd4a4749f050704cd30cf424bfc8048a18e8 Mon Sep 17 00:00:00 2001 +From: Kleis Auke Wolthuizen +Date: Wed, 18 Sep 2019 15:20:00 +0200 +Subject: [PATCH 05/10] posix_spawn isn't usable in WASM + +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index c953b8e343c..78612d289eb 100644 +--- a/meson.build ++++ b/meson.build +@@ -828,7 +828,7 @@ if host_system != 'windows' and cc.has_function('posix_memalign', prefix: '#incl + endif + + # Check that posix_spawn() is usable; must use header +-if cc.has_function('posix_spawn', prefix : '#include ') ++if host_system != 'emscripten' and cc.has_function('posix_spawn', prefix : '#include ') + glib_conf.set('HAVE_POSIX_SPAWN', 1) + endif + + +From 9fa5a9982ec0a30fc1334c90df6494df6b2baf66 Mon Sep 17 00:00:00 2001 +From: Kleis Auke Wolthuizen +Date: Wed, 18 Sep 2019 15:40:00 +0200 +Subject: [PATCH 06/10] Network libs are not available in WASM + +--- + gio/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gio/meson.build b/gio/meson.build +index 30b411fad40..9cad15151a7 100644 +--- a/gio/meson.build ++++ b/gio/meson.build +@@ -39,7 +39,7 @@ endif + + network_libs = [ ] + network_args = [ ] +-if host_system != 'windows' ++if host_system not in ['windows', 'emscripten'] + # res_query() + res_query_test = '''#include + int main (int argc, char ** argv) { + +From e19a72d46646045f6cb83a70f46c9f0a4968e0de Mon Sep 17 00:00:00 2001 +From: Kleis Auke Wolthuizen +Date: Wed, 22 Apr 2020 12:11:28 +0200 +Subject: [PATCH 07/10] Ensure separate checks are also done for Emscripten + +--- + meson.build | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/meson.build b/meson.build +index 78612d289eb..aac86e3d22c 100644 +--- a/meson.build ++++ b/meson.build +@@ -542,7 +542,7 @@ foreach m : struct_members + endforeach + + # Compiler flags +-if cc.get_id() == 'gcc' or cc.get_id() == 'clang' ++if cc.get_id() == 'gcc' or cc.get_id() == 'clang' or cc.get_id() == 'emscripten' + warning_common_args = [ + '-Wduplicated-branches', + '-Wimplicit-fallthrough', +@@ -1727,10 +1727,10 @@ g_sizet_compatibility = { + 'long long': sizet_size == long_long_size, + } + +-# Do separate checks for gcc/clang (and ignore other compilers for now), since +-# we need to explicitly pass -Werror to the compilers. ++# Do separate checks for gcc/clang/emscripten (and ignore other compilers for now), ++# since we need to explicitly pass -Werror to the compilers. + # FIXME: https://github.com/mesonbuild/meson/issues/5399 +-if cc.get_id() == 'gcc' or cc.get_id() == 'clang' ++if cc.get_id() == 'gcc' or cc.get_id() == 'clang' or cc.get_id() == 'emscripten' + foreach type_name, size_compatibility : g_sizet_compatibility + g_sizet_compatibility += { type_name: size_compatibility and + cc.compiles( + +From 6a19d4c5642beaa3d72d6c5943959030d62cc801 Mon Sep 17 00:00:00 2001 +From: Kleis Auke Wolthuizen +Date: Tue, 13 Apr 2021 15:30:00 +0200 +Subject: [PATCH 08/10] Use vsnpintf/snprintf/printf from musl libc + +The C99 semantics of these functions is well supported in musl libc. + +Note: can also be set with these properties in the Meson cross file: +have_c99_vsnprintf = true +have_c99_snprintf = true +have_unix98_printf = true +--- + meson.build | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/meson.build b/meson.build +index aac86e3d22c..b184db2e485 100644 +--- a/meson.build ++++ b/meson.build +@@ -1160,9 +1160,9 @@ if host_system == 'windows' and (cc.get_id() == 'msvc' or cc.get_id() == 'clang- + glib_conf.set('HAVE_C99_SNPRINTF', false) + glib_conf.set('HAVE_C99_VSNPRINTF', false) + glib_conf.set('HAVE_UNIX98_PRINTF', false) +-elif not cc_can_run and host_system in ['ios', 'darwin'] +- # All these are true when compiling natively on macOS, so we should use good +- # defaults when building for iOS and tvOS. ++elif not cc_can_run and host_system in ['ios', 'darwin', 'emscripten'] ++ # All these are true when compiling natively on macOS, or when compiling with ++ # Emscripten (which uses musl libc internally). + glib_conf.set('HAVE_C99_SNPRINTF', true) + glib_conf.set('HAVE_C99_VSNPRINTF', true) + glib_conf.set('HAVE_UNIX98_PRINTF', true) + +From b8d81ef4ee1b1050e00898a3a500e06580136cad Mon Sep 17 00:00:00 2001 +From: Kleis Auke Wolthuizen +Date: Wed, 24 Aug 2022 21:55:32 +0200 +Subject: [PATCH 09/10] Add support for WebAssembly + +- Exclude unix specific files. +- Add Wasm-specific platform definition. +- Use `.wasm` as shared module suffix. +- Disable subprocess, spawn, signal, pipe, and stdin usage. +- Implement `g_get_os_info(G_OS_INFO_KEY_NAME)`. +- Implement `g_time_zone_new_identifier(NULL)`. +- Implement `g_get_num_processors()`. +--- + gio/gappinfo.c | 4 +- + gio/gapplicationcommandline.c | 4 +- + gio/gcontenttype-wasm.c | 211 ++++++++++++++++++++++++++++++++++ + gio/gdbusprivate.c | 18 +-- + gio/gdesktopappinfo.c | 6 +- + gio/gfile.c | 2 +- + gio/giomodule.c | 6 +- + gio/gkeyfilesettingsbackend.c | 2 +- + gio/glocalfile.c | 39 +++++-- + gio/glocalfileinfo.c | 8 +- + gio/glocalfileinfo.h | 2 +- + gio/glocalfileinputstream.c | 14 ++- + gio/glocalfilemonitor.c | 4 +- + gio/glocalfileoutputstream.c | 20 ++-- + gio/glocalvfs.c | 6 +- + gio/gportalsupport.c | 14 +++ + gio/gresourcefile.c | 2 + + gio/gsocket.c | 18 +-- + gio/gsocketcontrolmessage.c | 2 +- + gio/gsocketinputstream.c | 8 +- + gio/gsocketoutputstream.c | 8 +- + gio/gsubprocess.c | 52 +++++---- + gio/gtestdbus.c | 20 +++- + gio/gthreadedresolver.c | 12 +- + gio/gunixconnection.c | 2 +- + gio/gunixfdlist.c | 4 + + gio/meson.build | 8 +- + glib/gbacktrace.c | 4 +- + glib/gmain.c | 58 +++++----- + glib/gspawn-wasm.c | 164 ++++++++++++++++++++++++++ + glib/gthread.c | 8 +- + glib/gtimezone.c | 12 +- + glib/gutils.c | 7 +- + glib/gwakeup.c | 29 +++++ + glib/meson.build | 3 +- + gobject/gsourceclosure.c | 24 ++-- + meson.build | 5 + + 37 files changed, 662 insertions(+), 148 deletions(-) + create mode 100644 gio/gcontenttype-wasm.c + create mode 100644 glib/gspawn-wasm.c + +diff --git a/gio/gappinfo.c b/gio/gappinfo.c +index 652cae6e1a9..8e7f17a97b8 100644 +--- a/gio/gappinfo.c ++++ b/gio/gappinfo.c +@@ -1020,7 +1020,7 @@ g_app_info_launch_default_for_uri (const char *uri, + g_object_unref (app_info); + } + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + if (!res && glib_should_use_portal ()) + { + const char *parent_window = NULL; +@@ -1072,7 +1072,7 @@ launch_default_for_uri_portal_open_uri_cb (GObject *object, + static void + launch_default_for_uri_portal_open_uri (GTask *task, GError *error) + { +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + LaunchDefaultForUriData *data = g_task_get_task_data (task); + GCancellable *cancellable = g_task_get_cancellable (task); + +diff --git a/gio/gapplicationcommandline.c b/gio/gapplicationcommandline.c +index b3a6d00b42c..ffb682d2831 100644 +--- a/gio/gapplicationcommandline.c ++++ b/gio/gapplicationcommandline.c +@@ -295,7 +295,9 @@ g_application_command_line_real_printerr_literal (GApplicationCommandLine *cmdli + static GInputStream * + g_application_command_line_real_get_stdin (GApplicationCommandLine *cmdline) + { +-#ifdef G_OS_UNIX ++#ifdef G_PLATFORM_WASM ++ return NULL; ++#elif defined(G_OS_UNIX) + return g_unix_input_stream_new (0, FALSE); + #else + return g_win32_input_stream_new (GetStdHandle (STD_INPUT_HANDLE), FALSE); +diff --git a/gio/gcontenttype-wasm.c b/gio/gcontenttype-wasm.c +new file mode 100644 +index 00000000000..082888cde22 +--- /dev/null ++++ b/gio/gcontenttype-wasm.c +@@ -0,0 +1,211 @@ ++/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ ++ ++/* GIO - GLib Input, Output and Streaming Library ++ * ++ * Copyright (C) 2023 Kleis Auke Wolthuizen ++ * ++ * SPDX-License-Identifier: LGPL-2.1-or-later ++ * ++ * 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 ++#include "gcontenttype.h" ++#include "glibintl.h" ++ ++/*< private >*/ ++void ++g_content_type_set_mime_dirs (const gchar * const *dirs) ++{ ++ /* noop on WebAssembly */ ++} ++ ++/*< private >*/ ++const gchar * const * ++g_content_type_get_mime_dirs (void) ++{ ++ const gchar * const *mime_dirs = { NULL }; ++ return mime_dirs; ++} ++ ++gboolean ++g_content_type_equals (const gchar *type1, ++ const gchar *type2) ++{ ++ g_return_val_if_fail (type1 != NULL, FALSE); ++ g_return_val_if_fail (type2 != NULL, FALSE); ++ ++ if (g_ascii_strcasecmp (type1, type2) == 0) ++ return TRUE; ++ ++ return FALSE; ++} ++ ++gboolean ++g_content_type_is_a (const gchar *type, ++ const gchar *supertype) ++{ ++ g_return_val_if_fail (type != NULL, FALSE); ++ g_return_val_if_fail (supertype != NULL, FALSE); ++ ++ if (g_content_type_equals (type, supertype)) ++ return TRUE; ++ ++ return FALSE; ++} ++ ++gboolean ++g_content_type_is_mime_type (const gchar *type, ++ const gchar *mime_type) ++{ ++ gchar *content_type; ++ gboolean ret; ++ ++ g_return_val_if_fail (type != NULL, FALSE); ++ g_return_val_if_fail (mime_type != NULL, FALSE); ++ ++ content_type = g_content_type_from_mime_type (mime_type); ++ ret = g_content_type_is_a (type, content_type); ++ g_free (content_type); ++ ++ return ret; ++} ++ ++gboolean ++g_content_type_is_unknown (const gchar *type) ++{ ++ g_return_val_if_fail (type != NULL, FALSE); ++ ++ return strcmp ("*", type) == 0; ++} ++ ++gchar * ++g_content_type_get_description (const gchar *type) ++{ ++ return g_strdup (_("Unknown type")); ++} ++ ++gchar * ++g_content_type_get_mime_type (const gchar *type) ++{ ++ return g_strdup ("application/octet-stream"); ++} ++ ++GIcon * ++g_content_type_get_icon (const gchar *type) ++{ ++ return NULL; ++} ++ ++GIcon * ++g_content_type_get_symbolic_icon (const gchar *type) ++{ ++ return NULL; ++} ++ ++gchar * ++g_content_type_get_generic_icon_name (const gchar *type) ++{ ++ return NULL; ++} ++ ++gboolean ++g_content_type_can_be_executable (const gchar *type) ++{ ++ g_return_val_if_fail (type != NULL, FALSE); ++ ++ return strcmp (type, ".wasm") == 0; ++} ++ ++static gboolean ++looks_like_text (const guchar *data, ++ gsize data_size) ++{ ++ gsize i; ++ guchar c; ++ for (i = 0; i < data_size; i++) ++ { ++ c = data[i]; ++ if (g_ascii_iscntrl (c) && !g_ascii_isspace (c) && c != '\b') ++ return FALSE; ++ } ++ return TRUE; ++} ++ ++gchar * ++g_content_type_from_mime_type (const gchar *mime_type) ++{ ++ return g_strdup ("*"); ++} ++ ++gchar * ++g_content_type_guess (const gchar *filename, ++ const guchar *data, ++ gsize data_size, ++ gboolean *result_uncertain) ++{ ++ char *basename; ++ char *type; ++ char *dot; ++ size_t i; ++ ++ type = NULL; ++ ++ if (result_uncertain) ++ *result_uncertain = FALSE; ++ ++ /* our test suite and potentially other code used -1 in the past, which is ++ * not documented and not allowed; guard against that */ ++ g_return_val_if_fail (data_size != (gsize) -1, g_strdup ("*")); ++ ++ if (filename) ++ { ++ i = strlen (filename); ++ if (i > 0 && filename[i - 1] == G_DIR_SEPARATOR) ++ { ++ type = g_strdup ("inode/directory"); ++ if (result_uncertain) ++ *result_uncertain = TRUE; ++ } ++ else ++ { ++ basename = g_path_get_basename (filename); ++ dot = strrchr (basename, '.'); ++ if (dot) ++ type = g_strdup (dot); ++ g_free (basename); ++ } ++ } ++ ++ if (type) ++ return type; ++ ++ if (data && looks_like_text (data, data_size)) ++ return g_strdup (".txt"); ++ ++ return g_strdup ("*"); ++} ++ ++GList * ++g_content_types_get_registered (void) ++{ ++ return NULL; ++} ++ ++gchar ** ++g_content_type_guess_for_tree (GFile *root) ++{ ++ return NULL; ++} +diff --git a/gio/gdbusprivate.c b/gio/gdbusprivate.c +index 28083e4ed77..039363b2014 100644 +--- a/gio/gdbusprivate.c ++++ b/gio/gdbusprivate.c +@@ -48,7 +48,7 @@ + #include "gsocketoutputstream.h" + #include "gtask.h" + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + #include "gunixfdmessage.h" + #include "gunixconnection.h" + #include "gunixcredentialsmessage.h" +@@ -600,7 +600,7 @@ _g_dbus_worker_do_read_cb (GInputStream *input_stream, + if (FALSE) + { + } +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + else if (G_IS_UNIX_FD_MESSAGE (control_message)) + { + GUnixFDMessage *fd_message; +@@ -770,7 +770,7 @@ _g_dbus_worker_do_read_cb (GInputStream *input_stream, + goto out; + } + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + if (worker->read_fd_list != NULL) + { + g_dbus_message_set_unix_fd_list (message, worker->read_fd_list); +@@ -970,7 +970,7 @@ write_message_async_cb (GObject *source_object, + * write-lock is not held on entry + * output_pending is PENDING_WRITE on entry + */ +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + static gboolean + on_socket_ready (GSocket *socket, + GIOCondition condition, +@@ -992,7 +992,7 @@ static void + write_message_continue_writing (MessageToWriteData *data) + { + GOutputStream *ostream; +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + GUnixFDList *fd_list; + #endif + +@@ -1003,7 +1003,7 @@ write_message_continue_writing (MessageToWriteData *data) + * like @data is not always freed on every code path in this function. */ + + ostream = g_io_stream_get_output_stream (data->worker->stream); +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + fd_list = g_dbus_message_get_unix_fd_list (data->message); + #endif + +@@ -1013,7 +1013,7 @@ write_message_continue_writing (MessageToWriteData *data) + if (FALSE) + { + } +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + else if (G_IS_SOCKET_OUTPUT_STREAM (ostream) && data->total_written == 0) + { + GOutputVector vector; +@@ -1100,7 +1100,7 @@ write_message_continue_writing (MessageToWriteData *data) + #endif + else + { +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + if (data->total_written == 0 && fd_list != NULL) + { + /* We were trying to write byte 0 of the message, which needs +@@ -1125,7 +1125,7 @@ write_message_continue_writing (MessageToWriteData *data) + write_message_async_cb, + data); /* steal @data */ + } +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + out: + #endif + ; +diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c +index 87db7a97a1e..7d36b6a3401 100644 +--- a/gio/gdesktopappinfo.c ++++ b/gio/gdesktopappinfo.c +@@ -42,7 +42,7 @@ + + #include "gcontenttypeprivate.h" + #include "gdesktopappinfo.h" +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + #include "glib-unix.h" + #endif + #include "gfile.h" +@@ -58,7 +58,7 @@ + #include "glocalfilemonitor.h" + #include "gutilsprivate.h" + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + #include "gdocumentportal.h" + #endif + +@@ -3275,7 +3275,7 @@ g_desktop_app_info_launch_uris_with_dbus (GDesktopAppInfo *info, + + g_return_val_if_fail (info != NULL, FALSE); + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + app_id = g_desktop_app_info_get_string (info, "X-Flatpak"); + if (app_id && *app_id) + { +diff --git a/gio/gfile.c b/gio/gfile.c +index d52262f13f7..9b3d24e6c53 100644 +--- a/gio/gfile.c ++++ b/gio/gfile.c +@@ -58,7 +58,7 @@ + + #include "gfile.h" + #include "glib/gstdio.h" +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + #include "glib-unix.h" + #endif + #include "gvfs.h" +diff --git a/gio/giomodule.c b/gio/giomodule.c +index 1e1495528bb..c080aed5bef 100644 +--- a/gio/giomodule.c ++++ b/gio/giomodule.c +@@ -1085,7 +1085,7 @@ extern GType g_memory_monitor_portal_get_type (void); + extern GType g_memory_monitor_win32_get_type (void); + extern GType g_power_profile_monitor_dbus_get_type (void); + +-#ifdef G_OS_UNIX ++#ifdef G_OS_UNIX && !defined(G_PLATFORM_WASM) + extern GType g_fdo_notification_backend_get_type (void); + extern GType g_gtk_notification_backend_get_type (void); + extern GType g_portal_notification_backend_get_type (void); +@@ -1180,7 +1180,7 @@ _g_io_modules_ensure_extension_points_registered (void) + + if (g_once_init_enter (®istered_extensions)) + { +-#if defined(G_OS_UNIX) && !defined(__APPLE__) ++#if defined(G_OS_UNIX) && !defined(__APPLE__) && !defined(G_PLATFORM_WASM) + #if !GLIB_CHECK_VERSION (3, 0, 0) + ep = g_io_extension_point_register (G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME); + g_io_extension_point_set_required_type (ep, G_TYPE_DESKTOP_APP_INFO_LOOKUP); +@@ -1351,7 +1351,7 @@ _g_io_modules_ensure_loaded (void) + g_type_ensure (g_nextstep_settings_backend_get_type ()); + g_type_ensure (g_osx_app_info_get_type ()); + #endif +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + g_type_ensure (_g_unix_volume_monitor_get_type ()); + g_type_ensure (g_debug_controller_dbus_get_type ()); + g_type_ensure (g_fdo_notification_backend_get_type ()); +diff --git a/gio/gkeyfilesettingsbackend.c b/gio/gkeyfilesettingsbackend.c +index a86c4d913c0..d279b84d430 100644 +--- a/gio/gkeyfilesettingsbackend.c ++++ b/gio/gkeyfilesettingsbackend.c +@@ -79,7 +79,7 @@ typedef struct + GFileMonitor *dir_monitor; + } GKeyfileSettingsBackend; + +-#ifdef G_OS_WIN32 ++#if defined(G_OS_WIN32) || defined(G_PLATFORM_WASM) + #define EXTENSION_PRIORITY 10 + #else + #define EXTENSION_PRIORITY (glib_should_use_portal () && !glib_has_dconf_access_in_sandbox () ? 110 : 10) +diff --git a/gio/glocalfile.c b/gio/glocalfile.c +index ceb888ad8db..099df4d2762 100644 +--- a/gio/glocalfile.c ++++ b/gio/glocalfile.c +@@ -27,7 +27,7 @@ + #include + #include + #include +-#if G_OS_UNIX ++#ifdef G_OS_UNIX + #include + #include + #endif +@@ -69,7 +69,7 @@ + #include + #include + #include "glibintl.h" +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + #include "glib-unix.h" + #include "gportalsupport.h" + #include "gtrashportal.h" +@@ -758,7 +758,7 @@ get_fs_type (long f_type) + } + #endif + +-#ifndef G_OS_WIN32 ++#if !defined(G_OS_WIN32) && !defined(G_PLATFORM_WASM) + + G_LOCK_DEFINE_STATIC(mount_info_hash); + static GHashTable *mount_info_hash = NULL; +@@ -1102,6 +1102,7 @@ g_local_file_query_filesystem_info (GFile *file, + g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE, fstype); + #endif /* G_OS_WIN32 */ + ++#ifndef G_PLATFORM_WASM + if (g_file_attribute_matcher_matches (attribute_matcher, + G_FILE_ATTRIBUTE_FILESYSTEM_READONLY) || + g_file_attribute_matcher_matches (attribute_matcher, +@@ -1113,6 +1114,7 @@ g_local_file_query_filesystem_info (GFile *file, + get_mount_info (info, local->filename, attribute_matcher); + #endif /* G_OS_WIN32 */ + } ++#endif /* !G_PLATFORM_WASM */ + + g_file_attribute_matcher_unref (attribute_matcher); + +@@ -1124,6 +1126,7 @@ g_local_file_find_enclosing_mount (GFile *file, + GCancellable *cancellable, + GError **error) + { ++#ifndef G_PLATFORM_WASM + GLocalFile *local = G_LOCAL_FILE (file); + GStatBuf buf; + char *mountpoint; +@@ -1142,6 +1145,7 @@ g_local_file_find_enclosing_mount (GFile *file, + return mount; + + error: ++#endif + g_set_io_error (error, + /* Translators: This is an error message when trying to find + * the enclosing (user visible) mount of a file, but none +@@ -1525,7 +1529,7 @@ g_local_file_delete (GFile *file, + return TRUE; + } + +-#ifndef G_OS_WIN32 ++#if !defined(G_OS_WIN32) && !defined(G_PLATFORM_WASM) + + static char * + strip_trailing_slashes (const char *path) +@@ -1934,7 +1938,6 @@ _g_local_file_has_trash_dir (const char *dirname, dev_t dir_dev) + return res; + } + +-#ifndef G_OS_WIN32 + gboolean + _g_local_file_is_lost_found_dir (const char *path, dev_t path_dev) + { +@@ -1973,7 +1976,6 @@ _g_local_file_is_lost_found_dir (const char *path, dev_t path_dev) + g_free (mount_dir); + return ret; + } +-#endif + + static gboolean + g_local_file_trash (GFile *file, +@@ -2348,7 +2350,7 @@ g_local_file_trash (GFile *file, + + return TRUE; + } +-#else /* G_OS_WIN32 */ ++#elif defined(G_OS_WIN32) + gboolean + _g_local_file_has_trash_dir (const char *dirname, dev_t dir_dev) + { +@@ -2394,7 +2396,24 @@ g_local_file_trash (GFile *file, + g_free (wfilename); + return success; + } +-#endif /* G_OS_WIN32 */ ++#else /* G_PLATFORM_WASM */ ++gboolean ++_g_local_file_has_trash_dir (const char *dirname, dev_t dir_dev) ++{ ++ return FALSE; ++} ++ ++static gboolean ++g_local_file_trash (GFile *file, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ g_set_io_error (error, ++ _("g_local_file_trash is no-op on WebAssembly"), ++ file, ENOTSUP); ++ return FALSE; ++} ++#endif /* G_PLATFORM_WASM */ + + static gboolean + g_local_file_make_directory (GFile *file, +@@ -2598,7 +2617,7 @@ g_local_file_move (GFile *source, + return TRUE; + } + +-#ifdef G_OS_WIN32 ++#if defined(G_OS_WIN32) || defined(G_PLATFORM_WASM) + + gboolean + g_local_file_is_nfs_home (const gchar *filename) +@@ -2662,7 +2681,7 @@ g_local_file_is_nfs_home (const gchar *filename) + + return FALSE; + } +-#endif /* !G_OS_WIN32 */ ++#endif /* !G_OS_WIN32 && !G_PLATFORM_WASM */ + + static GFileMonitor* + g_local_file_monitor_dir (GFile *file, +diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c +index 2df7c91e522..7aa6418fef1 100644 +--- a/gio/glocalfileinfo.c ++++ b/gio/glocalfileinfo.c +@@ -62,8 +62,10 @@ + + #ifdef G_OS_UNIX + #include ++#ifndef G_PLATFORM_WASM + #include "glib-unix.h" +-#endif ++#endif /* !G_PLATFORM_WASM */ ++#endif /* G_OS_UNIX */ + + #include "glib-private.h" + +@@ -1342,7 +1344,7 @@ get_content_type (const char *basename, + + content_type = g_content_type_guess (basename, NULL, 0, &result_uncertain); + +-#if !defined(G_OS_WIN32) && !defined(__APPLE__) ++#if !defined(G_OS_WIN32) && !defined(__APPLE__) && !defined(G_PLATFORM_WASM) + if (!fast && result_uncertain && path != NULL) + { + /* Sniff the first 16KiB of the file (sometimes less, if xdgmime +@@ -2000,6 +2002,7 @@ _g_local_file_info_get (const char *basename, + if (stat_ok) + set_info_from_stat (info, &statbuf, attribute_matcher); + ++#ifndef G_PLATFORM_WASM + #ifndef G_OS_WIN32 + if (_g_file_attribute_matcher_matches_id (attribute_matcher, + G_FILE_ATTRIBUTE_ID_STANDARD_IS_HIDDEN)) +@@ -2035,6 +2038,7 @@ _g_local_file_info_get (const char *basename, + + _g_file_info_set_attribute_boolean_by_id (info, G_FILE_ATTRIBUTE_ID_STANDARD_IS_BACKUP, FALSE); + #endif ++#endif /* !G_PLATFORM_WASM */ + + symlink_target = NULL; + if (is_symlink) +diff --git a/gio/glocalfileinfo.h b/gio/glocalfileinfo.h +index b098b1980bf..e250119d024 100644 +--- a/gio/glocalfileinfo.h ++++ b/gio/glocalfileinfo.h +@@ -348,7 +348,7 @@ inline static guint32 _g_stat_mtim_nsec (const GLocalFileStat *buf) { return 0 + + gboolean _g_local_file_has_trash_dir (const char *dirname, + dev_t dir_dev); +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + gboolean _g_local_file_is_lost_found_dir (const char *path, + dev_t path_dev); + #endif +diff --git a/gio/glocalfileinputstream.c b/gio/glocalfileinputstream.c +index 933f317147e..33e848f8782 100644 +--- a/gio/glocalfileinputstream.c ++++ b/gio/glocalfileinputstream.c +@@ -37,9 +37,11 @@ + + #ifdef G_OS_UNIX + #include ++#ifndef G_PLATFORM_WASM + #include "glib-unix.h" + #include "gfiledescriptorbased.h" +-#endif ++#endif /* !G_PLATFORM_WASM */ ++#endif /* G_OS_UNIX */ + + #ifdef G_OS_WIN32 + #include +@@ -50,12 +52,12 @@ struct _GLocalFileInputStreamPrivate { + guint do_close : 1; + }; + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + 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 +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + G_DEFINE_TYPE_WITH_CODE (GLocalFileInputStream, g_local_file_input_stream, G_TYPE_FILE_INPUT_STREAM, + G_ADD_PRIVATE (GLocalFileInputStream) + G_IMPLEMENT_INTERFACE (G_TYPE_FILE_DESCRIPTOR_BASED, +@@ -84,7 +86,7 @@ static GFileInfo *g_local_file_input_stream_query_info (GFileInputStream *strea + const char *attributes, + GCancellable *cancellable, + GError **error); +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + static int g_local_file_input_stream_get_fd (GFileDescriptorBased *stream); + #endif + +@@ -109,7 +111,7 @@ g_local_file_input_stream_class_init (GLocalFileInputStreamClass *klass) + file_stream_class->query_info = g_local_file_input_stream_query_info; + } + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + static void + g_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface) + { +@@ -297,7 +299,7 @@ g_local_file_input_stream_query_info (GFileInputStream *stream, + error); + } + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + static int + g_local_file_input_stream_get_fd (GFileDescriptorBased *fd_based) + { +diff --git a/gio/glocalfilemonitor.c b/gio/glocalfilemonitor.c +index 8de40793945..acf3e0291a4 100644 +--- a/gio/glocalfilemonitor.c ++++ b/gio/glocalfilemonitor.c +@@ -742,7 +742,7 @@ g_local_file_monitor_set_property (GObject *object, guint prop_id, + g_object_notify (object, "rate-limit"); + } + +-#ifndef G_OS_WIN32 ++#if !defined(G_OS_WIN32) && !defined(G_PLATFORM_WASM) + static void + g_local_file_monitor_mounts_changed (GUnixMountMonitor *mount_monitor, + gpointer user_data) +@@ -792,7 +792,7 @@ g_local_file_monitor_start (GLocalFileMonitor *local_monitor, + + if (is_directory && !class->mount_notify && (flags & G_FILE_MONITOR_WATCH_MOUNTS)) + { +-#ifdef G_OS_WIN32 ++#if defined(G_OS_WIN32) || defined(G_PLATFORM_WASM) + /*claim everything was mounted */ + local_monitor->was_mounted = TRUE; + #else +diff --git a/gio/glocalfileoutputstream.c b/gio/glocalfileoutputstream.c +index 6875811d0d7..efe2e2c612d 100644 +--- a/gio/glocalfileoutputstream.c ++++ b/gio/glocalfileoutputstream.c +@@ -44,9 +44,11 @@ + + #ifdef G_OS_UNIX + #include ++#ifndef G_PLATFORM_WASM + #include "gfiledescriptorbased.h" + #include +-#endif ++#endif /* !G_PLATFORM_WASM */ ++#endif /* G_OS_UNIX */ + + #include "glib-private.h" + #include "gioprivate.h" +@@ -81,12 +83,12 @@ struct _GLocalFileOutputStreamPrivate { + int fd; + }; + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + 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 +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + G_DEFINE_TYPE_WITH_CODE (GLocalFileOutputStream, g_local_file_output_stream, G_TYPE_FILE_OUTPUT_STREAM, + G_ADD_PRIVATE (GLocalFileOutputStream) + G_IMPLEMENT_INTERFACE (G_TYPE_FILE_DESCRIPTOR_BASED, +@@ -108,7 +110,7 @@ static gssize g_local_file_output_stream_write (GOutputStream *s + gsize count, + GCancellable *cancellable, + GError **error); +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + static gboolean g_local_file_output_stream_writev (GOutputStream *stream, + const GOutputVector *vectors, + gsize n_vectors, +@@ -136,7 +138,7 @@ static gboolean g_local_file_output_stream_truncate (GFileOutputStream *s + goffset size, + GCancellable *cancellable, + GError **error); +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + static int g_local_file_output_stream_get_fd (GFileDescriptorBased *stream); + #endif + +@@ -165,7 +167,7 @@ g_local_file_output_stream_class_init (GLocalFileOutputStreamClass *klass) + gobject_class->finalize = g_local_file_output_stream_finalize; + + stream_class->write_fn = g_local_file_output_stream_write; +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + stream_class->writev_fn = g_local_file_output_stream_writev; + #endif + stream_class->close_fn = g_local_file_output_stream_close; +@@ -178,7 +180,7 @@ g_local_file_output_stream_class_init (GLocalFileOutputStreamClass *klass) + file_stream_class->truncate_fn = g_local_file_output_stream_truncate; + } + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + static void + g_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface) + { +@@ -234,7 +236,7 @@ g_local_file_output_stream_write (GOutputStream *stream, + * things, that each chunk is the size of a whole page and in memory aligned + * to a page. We can't possibly guarantee that in GLib. + */ +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + /* Macro to check if struct iovec and GOutputVector have the same ABI */ + #define G_OUTPUT_VECTOR_IS_IOVEC (sizeof (struct iovec) == sizeof (GOutputVector) && \ + G_SIZEOF_MEMBER (struct iovec, iov_base) == G_SIZEOF_MEMBER (GOutputVector, buffer) && \ +@@ -1333,7 +1335,7 @@ _g_local_file_output_stream_get_fd (GLocalFileOutputStream *stream) + return stream->priv->fd; + } + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + static int + g_local_file_output_stream_get_fd (GFileDescriptorBased *fd_based) + { +diff --git a/gio/glocalvfs.c b/gio/glocalvfs.c +index 7266ee0f833..7c330d026a3 100644 +--- a/gio/glocalvfs.c ++++ b/gio/glocalvfs.c +@@ -28,7 +28,7 @@ + #include "gvfs.h" + #include + #include +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + #include "glib-unix.h" + #include + #endif +@@ -134,7 +134,7 @@ g_local_vfs_parse_name (GVfs *vfs, + { + if (*parse_name == '~') + { +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + const char *user_start; + user_start = parse_name + 1; + #endif +@@ -145,7 +145,7 @@ g_local_vfs_parse_name (GVfs *vfs, + + user_end = parse_name; + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + if (user_end == user_start) + user_prefix = g_strdup (g_get_home_dir ()); + else +diff --git a/gio/gportalsupport.c b/gio/gportalsupport.c +index b002e93f697..4bfcede7bc6 100644 +--- a/gio/gportalsupport.c ++++ b/gio/gportalsupport.c +@@ -29,6 +29,7 @@ static gboolean use_portal; + static gboolean network_available; + static gboolean dconf_access; + ++#ifndef G_PLATFORM_WASM + #ifdef G_PORTAL_SUPPORT_TEST + static const char *snapctl = "snapctl"; + #else +@@ -136,21 +137,29 @@ sandbox_info_read (void) + + g_once_init_leave (&sandbox_info_is_read, 1); + } ++#endif + + gboolean + glib_should_use_portal (void) + { ++#ifdef G_PLATFORM_WASM ++ return FALSE; ++#else + sandbox_info_read (); + + if (sandbox_type == G_SANDBOX_TYPE_SNAP) + return snap_plug_is_connected ("desktop"); + + return use_portal; ++#endif + } + + gboolean + glib_network_available_in_sandbox (void) + { ++#ifdef G_PLATFORM_WASM ++ return FALSE; ++#else + sandbox_info_read (); + + if (sandbox_type == G_SANDBOX_TYPE_SNAP) +@@ -164,15 +173,20 @@ glib_network_available_in_sandbox (void) + } + + return network_available; ++#endif + } + + gboolean + glib_has_dconf_access_in_sandbox (void) + { ++#ifdef G_PLATFORM_WASM ++ return FALSE; ++#else + sandbox_info_read (); + + if (sandbox_type == G_SANDBOX_TYPE_SNAP) + return snap_plug_is_connected ("gsettings"); + + return dconf_access; ++#endif + } +diff --git a/gio/gresourcefile.c b/gio/gresourcefile.c +index 1621839cf73..6066ae2151e 100644 +--- a/gio/gresourcefile.c ++++ b/gio/gresourcefile.c +@@ -516,6 +516,7 @@ g_resource_file_query_info (GFile *file, + g_file_info_set_file_type (info, G_FILE_TYPE_REGULAR); + g_file_info_set_size (info, size); + ++#ifndef G_PLATFORM_WASM + if ((_g_file_attribute_matcher_matches_id (matcher, G_FILE_ATTRIBUTE_ID_STANDARD_CONTENT_TYPE) || + ((~resource_flags & G_RESOURCE_FLAGS_COMPRESSED) && + _g_file_attribute_matcher_matches_id (matcher, G_FILE_ATTRIBUTE_ID_STANDARD_FAST_CONTENT_TYPE))) && +@@ -530,6 +531,7 @@ g_resource_file_query_info (GFile *file, + g_bytes_unref (bytes); + } + else ++#endif + content_type = NULL; + + if (content_type) +diff --git a/gio/gsocket.c b/gio/gsocket.c +index c2ddadeaf00..58bbe5c77ac 100644 +--- a/gio/gsocket.c ++++ b/gio/gsocket.c +@@ -31,7 +31,7 @@ + + #include "gsocket.h" + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + #include "glib-unix.h" + #endif + +@@ -54,7 +54,7 @@ + # include + #endif + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + #include + #endif + +@@ -606,9 +606,9 @@ g_socket_details_from_fd (GSocket *socket) + static void + socket_set_nonblock (int fd) + { +-#ifndef G_OS_WIN32 ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + GError *error = NULL; +-#else ++#elif defined(G_OS_WIN32) + gulong arg; + #endif + +@@ -616,13 +616,13 @@ socket_set_nonblock (int fd) + * nonblocking automatically in certain operations. This way we make + * things work the same on all platforms. + */ +-#ifndef G_OS_WIN32 ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + if (!g_unix_set_fd_nonblocking (fd, TRUE, &error)) + { + g_warning ("Error setting socket to nonblocking mode: %s", error->message); + g_clear_error (&error); + } +-#else ++#elif defined(G_OS_WIN32) + arg = TRUE; + + if (ioctlsocket (fd, FIONBIO, &arg) == SOCKET_ERROR) +@@ -4242,7 +4242,9 @@ socket_source_dispatch (GSource *source, + events = G_IO_NVAL; + else + events = update_condition (socket_source->socket); +-#else ++#elif defined(G_PLATFORM_WASM) ++ events = G_IO_NVAL; ++#elif defined(G_OS_UNIX) + if (g_socket_is_closed (socket_source->socket)) + { + if (socket_source->fd_tag) +@@ -4380,7 +4382,7 @@ socket_source_new (GSocket *socket, + socket_source->pollfd.events = condition; + socket_source->pollfd.revents = 0; + g_source_add_poll (source, &socket_source->pollfd); +-#else ++#elif defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + socket_source->fd_tag = g_source_add_unix_fd (source, socket->priv->fd, condition); + #endif + +diff --git a/gio/gsocketcontrolmessage.c b/gio/gsocketcontrolmessage.c +index d79bd742803..1287ff902c1 100644 +--- a/gio/gsocketcontrolmessage.c ++++ b/gio/gsocketcontrolmessage.c +@@ -176,7 +176,7 @@ g_socket_control_message_deserialize (int level, + guint i; + + /* Ensure we know about the built in types */ +-#ifndef G_OS_WIN32 ++#if !defined(G_OS_WIN32) && !defined(G_PLATFORM_WASM) + g_type_ensure (G_TYPE_UNIX_CREDENTIALS_MESSAGE); + g_type_ensure (G_TYPE_UNIX_FD_MESSAGE); + #endif +diff --git a/gio/gsocketinputstream.c b/gio/gsocketinputstream.c +index 7a15f512db9..fbfbb641bb0 100644 +--- a/gio/gsocketinputstream.c ++++ b/gio/gsocketinputstream.c +@@ -42,13 +42,13 @@ struct _GSocketInputStreamPrivate + }; + + static void g_socket_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface); +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + 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 + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + G_DEFINE_TYPE_WITH_CODE (GSocketInputStream, g_socket_input_stream, G_TYPE_INPUT_STREAM, + G_ADD_PRIVATE (GSocketInputStream) + G_IMPLEMENT_INTERFACE (G_TYPE_POLLABLE_INPUT_STREAM, g_socket_input_stream_pollable_iface_init) +@@ -168,7 +168,7 @@ g_socket_input_stream_pollable_read_nonblocking (GPollableInputStream *pollable + NULL, error); + } + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + static int + g_socket_input_stream_get_fd (GFileDescriptorBased *fd_based) + { +@@ -196,7 +196,7 @@ g_socket_input_stream_class_init (GSocketInputStreamClass *klass) + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + } + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + static void + g_socket_input_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface) + { +diff --git a/gio/gsocketoutputstream.c b/gio/gsocketoutputstream.c +index a5b4c353250..36ea413c165 100644 +--- a/gio/gsocketoutputstream.c ++++ b/gio/gsocketoutputstream.c +@@ -47,13 +47,13 @@ struct _GSocketOutputStreamPrivate + }; + + static void g_socket_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface); +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + 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 + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + G_DEFINE_TYPE_WITH_CODE (GSocketOutputStream, g_socket_output_stream, G_TYPE_OUTPUT_STREAM, + G_ADD_PRIVATE (GSocketOutputStream) + G_IMPLEMENT_INTERFACE (G_TYPE_POLLABLE_OUTPUT_STREAM, g_socket_output_stream_pollable_iface_init) +@@ -223,7 +223,7 @@ g_socket_output_stream_pollable_create_source (GPollableOutputStream *pollable, + return pollable_source; + } + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + static int + g_socket_output_stream_get_fd (GFileDescriptorBased *fd_based) + { +@@ -252,7 +252,7 @@ g_socket_output_stream_class_init (GSocketOutputStreamClass *klass) + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + } + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + static void + g_socket_output_stream_file_descriptor_based_iface_init (GFileDescriptorBasedIface *iface) + { +diff --git a/gio/gsubprocess.c b/gio/gsubprocess.c +index 6af94db8042..8a6bd06b14c 100644 +--- a/gio/gsubprocess.c ++++ b/gio/gsubprocess.c +@@ -91,7 +91,7 @@ + #include "glib-private.h" + + #include +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + #include + #include + #include +@@ -104,6 +104,14 @@ + #include + #include "giowin32-priv.h" + #endif ++#ifdef G_PLATFORM_WASM ++#include ++#include ++#include ++#include ++#include ++#include ++#endif + + #ifndef O_BINARY + #define O_BINARY 0 +@@ -186,7 +194,9 @@ platform_input_stream_from_spawn_fd (gint fd) + if (fd < 0) + return NULL; + +-#ifdef G_OS_UNIX ++#ifdef G_PLATFORM_WASM ++ return NULL; ++#elif defined(G_OS_UNIX) + return g_unix_input_stream_new (fd, TRUE); + #else + return g_win32_input_stream_new_from_fd (fd, TRUE); +@@ -199,14 +209,16 @@ platform_output_stream_from_spawn_fd (gint fd) + if (fd < 0) + return NULL; + +-#ifdef G_OS_UNIX ++#ifdef G_PLATFORM_WASM ++ return NULL; ++#elif defined(G_OS_UNIX) + return g_unix_output_stream_new (fd, TRUE); + #else + return g_win32_output_stream_new_from_fd (fd, TRUE); + #endif + } + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + static gint + unix_open_file (const char *filename, + gint mode, +@@ -300,7 +312,7 @@ initable_init (GInitable *initable, + gint *pipe_ptrs[3] = { NULL, NULL, NULL }; + gint pipe_fds[3] = { -1, -1, -1 }; + gint close_fds[3] = { -1, -1, -1 }; +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + gint stdin_fd = -1, stdout_fd = -1, stderr_fd = -1; + #endif + GSpawnFlags spawn_flags = 0; +@@ -323,7 +335,7 @@ initable_init (GInitable *initable, + spawn_flags |= G_SPAWN_CHILD_INHERITS_STDIN; + else if (self->flags & G_SUBPROCESS_FLAGS_STDIN_PIPE) + pipe_ptrs[0] = &pipe_fds[0]; +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + else if (self->launcher) + { + if (self->launcher->stdin_fd != -1) +@@ -342,7 +354,7 @@ initable_init (GInitable *initable, + spawn_flags |= G_SPAWN_STDOUT_TO_DEV_NULL; + else if (self->flags & G_SUBPROCESS_FLAGS_STDOUT_PIPE) + pipe_ptrs[1] = &pipe_fds[1]; +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + else if (self->launcher) + { + if (self->launcher->stdout_fd != -1) +@@ -361,7 +373,7 @@ initable_init (GInitable *initable, + spawn_flags |= G_SPAWN_STDERR_TO_DEV_NULL; + else if (self->flags & G_SUBPROCESS_FLAGS_STDERR_PIPE) + pipe_ptrs[2] = &pipe_fds[2]; +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + else if (self->flags & G_SUBPROCESS_FLAGS_STDERR_MERGE) + /* This will work because stderr gets set up after stdout. */ + stderr_fd = 1; +@@ -397,7 +409,7 @@ initable_init (GInitable *initable, + (const gchar * const *) self->argv, + (const gchar * const *) (self->launcher ? self->launcher->envp : NULL), + spawn_flags, +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + self->launcher ? self->launcher->child_setup_func : NULL, + self->launcher ? self->launcher->child_setup_user_data : NULL, + stdin_fd, stdout_fd, stderr_fd, +@@ -441,7 +453,7 @@ initable_init (GInitable *initable, + g_source_unref (source); + } + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + out: + #endif + /* we don't need this past init... */ +@@ -961,7 +973,7 @@ g_subprocess_wait_check_finish (GSubprocess *subprocess, + g_spawn_check_wait_status (subprocess->status, error); + } + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + typedef struct + { + GSubprocess *subprocess; +@@ -1056,9 +1068,9 @@ g_subprocess_force_exit (GSubprocess *subprocess) + { + g_return_if_fail (G_IS_SUBPROCESS (subprocess)); + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + g_subprocess_dispatch_signal (subprocess, SIGKILL); +-#else ++#elif defined(G_OS_WIN32) + TerminateProcess (subprocess->pid, 1); + #endif + } +@@ -1113,7 +1125,7 @@ g_subprocess_get_successful (GSubprocess *subprocess) + g_return_val_if_fail (G_IS_SUBPROCESS (subprocess), FALSE); + g_return_val_if_fail (subprocess->pid == 0, FALSE); + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + return WIFEXITED (subprocess->status) && WEXITSTATUS (subprocess->status) == 0; + #else + return subprocess->status == 0; +@@ -1142,7 +1154,7 @@ g_subprocess_get_if_exited (GSubprocess *subprocess) + g_return_val_if_fail (G_IS_SUBPROCESS (subprocess), FALSE); + g_return_val_if_fail (subprocess->pid == 0, FALSE); + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + return WIFEXITED (subprocess->status); + #else + return TRUE; +@@ -1172,7 +1184,7 @@ g_subprocess_get_exit_status (GSubprocess *subprocess) + g_return_val_if_fail (G_IS_SUBPROCESS (subprocess), 1); + g_return_val_if_fail (subprocess->pid == 0, 1); + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + g_return_val_if_fail (WIFEXITED (subprocess->status), 1); + + return WEXITSTATUS (subprocess->status); +@@ -1202,7 +1214,7 @@ g_subprocess_get_if_signaled (GSubprocess *subprocess) + g_return_val_if_fail (G_IS_SUBPROCESS (subprocess), FALSE); + g_return_val_if_fail (subprocess->pid == 0, FALSE); + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + return WIFSIGNALED (subprocess->status); + #else + return FALSE; +@@ -1231,12 +1243,12 @@ g_subprocess_get_term_sig (GSubprocess *subprocess) + g_return_val_if_fail (G_IS_SUBPROCESS (subprocess), 0); + g_return_val_if_fail (subprocess->pid == 0, 0); + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + g_return_val_if_fail (WIFSIGNALED (subprocess->status), 0); + + return WTERMSIG (subprocess->status); + #else +- g_critical ("g_subprocess_get_term_sig() called on Windows, where " ++ g_critical ("g_subprocess_get_term_sig() called on Windows or Wasm, where " + "g_subprocess_get_if_signaled() always returns FALSE..."); + return 0; + #endif +@@ -1451,7 +1463,7 @@ g_subprocess_communicate_internal (GSubprocess *subprocess, + { + g_assert (stdin_buf != NULL); + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + /* We're doing async writes to the pipe, and the async write mechanism assumes + * that streams polling as writable do SOME progress (possibly partial) and then + * stop, but never block. +diff --git a/gio/gtestdbus.c b/gio/gtestdbus.c +index 29727e2e132..24caf661c77 100644 +--- a/gio/gtestdbus.c ++++ b/gio/gtestdbus.c +@@ -48,7 +48,7 @@ + + #include "glibintl.h" + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + #include "glib-unix.h" + #include "glib-unixprivate.h" + #endif +@@ -148,7 +148,7 @@ _g_test_watcher_remove_pid (GPid pid) + will be killed anyway */ + } + +-#else ++#elif defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + + #define ADD_PID_FORMAT "add pid %d\n" + #define REMOVE_PID_FORMAT "remove pid %d\n" +@@ -327,6 +327,20 @@ _g_test_watcher_remove_pid (GPid pid) + g_free (command); + } + ++#else ++ ++static void ++_g_test_watcher_add_pid (GPid pid) ++{ ++ /* no-op */ ++} ++ ++static void ++_g_test_watcher_remove_pid (GPid pid) ++{ ++ /* no-op */ ++} ++ + #endif + + /* -------------------------------------------------------------------------- */ +@@ -597,7 +611,7 @@ static gboolean + make_pipe (gint pipe_fds[2], + GError **error) + { +-#if defined(G_OS_UNIX) ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + return g_unix_open_pipe (pipe_fds, O_CLOEXEC, error); + #elif defined(G_OS_WIN32) + if (_pipe (pipe_fds, 4096, _O_BINARY) < 0) +diff --git a/gio/gthreadedresolver.c b/gio/gthreadedresolver.c +index b8588e77e15..cef6c03e409 100644 +--- a/gio/gthreadedresolver.c ++++ b/gio/gthreadedresolver.c +@@ -1275,7 +1275,7 @@ do_lookup_records (const gchar *rrname, + { + GList *records; + +-#if defined(G_OS_UNIX) ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + gint len = 512; + gint herr; + GByteArray *answer; +@@ -1340,7 +1340,8 @@ do_lookup_records (const gchar *rrname, + + #endif /* HAVE_RES_NQUERY */ + +-#else ++ return g_steal_pointer (&records); ++#elif defined(G_OS_WIN32) + + DNS_STATUS status; + DNS_RECORDA *results = NULL; +@@ -1359,9 +1360,12 @@ do_lookup_records (const gchar *rrname, + if (results != NULL) + DnsRecordListFree (results, DnsFreeRecordList); + +-#endif +- + return g_steal_pointer (&records); ++#else ++ g_set_error (error, G_RESOLVER_ERROR, G_RESOLVER_ERROR_INTERNAL, ++ _("do_lookup_records is no-op on WebAssembly")); ++ return NULL; ++#endif + } + + static GList * +diff --git a/gio/gunixconnection.c b/gio/gunixconnection.c +index 94a92e3c454..e2c3a814585 100644 +--- a/gio/gunixconnection.c ++++ b/gio/gunixconnection.c +@@ -141,7 +141,7 @@ g_unix_connection_receive_fd (GUnixConnection *connection, + GCancellable *cancellable, + GError **error) + { +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + GSocketControlMessage **scms; + gint *fds, nfd, fd, nscm; + GUnixFDMessage *fdmsg; +diff --git a/gio/gunixfdlist.c b/gio/gunixfdlist.c +index 88a5a5f8a8b..d2c2f730862 100644 +--- a/gio/gunixfdlist.c ++++ b/gio/gunixfdlist.c +@@ -45,6 +45,10 @@ + #include "glib/glib-private.h" + #include "glib/gstdio.h" + ++#ifdef G_OS_UNIX ++#include /* dup() */ ++#endif ++ + #ifdef G_OS_WIN32 + #include + #endif +diff --git a/gio/meson.build b/gio/meson.build +index 9cad15151a7..c75847175f1 100644 +--- a/gio/meson.build ++++ b/gio/meson.build +@@ -352,7 +352,7 @@ gdbus_daemon_sources = [ + gdbus_daemon_generated, + ] + +-if host_system != 'windows' ++if host_system not in ['windows', 'emscripten'] + unix_sources = files( + 'gfiledescriptorbased.c', + 'giounix-private.c', +@@ -417,7 +417,7 @@ if host_system != 'windows' + 'gnetworkmonitornm.c', + ) + endif +-else ++elif host_system == 'windows' + win32_sources += files('gwin32appinfo.c') + contenttype_sources += files('gcontenttype-win32.c') + platform_deps += [cc.find_library('shlwapi'), +@@ -459,6 +459,8 @@ else + 'gwin32outputstream.h', + ) + install_headers(gio_win32_include_headers, subdir : 'gio-win32-2.0/gio') ++elif host_system == 'emscripten' ++ contenttype_sources += files('gcontenttype-wasm.c') + endif + + gio_base_sources = files( +@@ -899,7 +901,7 @@ if host_system == 'windows' + description : 'Windows specific headers for glib I/O library', + ) + meson.override_dependency('gio-windows-2.0', libgio_dep) +-else ++elif host_system != 'emscripten' + pkg.generate(requires : ['gobject-2.0', 'gio-2.0'], + subdirs : ['gio-unix-2.0'], + version : glib_version, +diff --git a/glib/gbacktrace.c b/glib/gbacktrace.c +index 0f81502e508..226871af4af 100644 +--- a/glib/gbacktrace.c ++++ b/glib/gbacktrace.c +@@ -260,7 +260,7 @@ g_on_error_query (const gchar *prg_name) + void + g_on_error_stack_trace (const gchar *prg_name) + { +-#if defined(G_OS_UNIX) ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + pid_t pid; + gchar buf[16]; + const gchar *args[5] = { DEBUGGER, NULL, NULL, NULL, NULL }; +@@ -302,9 +302,11 @@ g_on_error_stack_trace (const gchar *prg_name) + break; + } + #else ++#ifdef G_OS_WIN32 + if (IsDebuggerPresent ()) + G_BREAKPOINT (); + else ++#endif + g_abort (); + #endif + } +diff --git a/glib/gmain.c b/glib/gmain.c +index 6d56ab3e8df..2b9e47cb13d 100644 +--- a/glib/gmain.c ++++ b/glib/gmain.c +@@ -48,7 +48,7 @@ + #define G_MAIN_POLL_DEBUG + #endif + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + #include "glib-unix.h" + #include + #ifdef HAVE_EVENTFD +@@ -250,9 +250,9 @@ struct _GChildWatchSource + /* @poll is always used on Windows. + * On Unix, poll.fd will be negative if PIDFD is unavailable. */ + GPollFD poll; +-#ifndef G_OS_WIN32 ++#if !defined(G_OS_WIN32) && !defined(G_PLATFORM_WASM) + gboolean child_maybe_exited; /* (atomic) */ +-#endif /* G_OS_WIN32 */ ++#endif /* !G_OS_WIN32 && !G_PLATFORM_WASM */ + }; + + struct _GUnixSignalWatchSource +@@ -359,11 +359,11 @@ static gboolean g_child_watch_dispatch (GSource *source, + gpointer user_data); + static void g_child_watch_finalize (GSource *source); + +-#ifndef G_OS_WIN32 ++#if !defined(G_OS_WIN32) && !defined(G_PLATFORM_WASM) + static void unref_unix_signal_handler_unlocked (int signum); + #endif + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + static void g_unix_signal_handler (int signum); + static gboolean g_unix_signal_watch_prepare (GSource *source, + gint *timeout); +@@ -384,7 +384,7 @@ static void block_source (GSource *source); + + static GMainContext *glib_worker_context; + +-#ifndef G_OS_WIN32 ++#if !defined(G_OS_WIN32) && !defined(G_PLATFORM_WASM) + + + /* UNIX signals work by marking one of these variables then waking the +@@ -425,7 +425,7 @@ GSourceFuncs g_unix_signal_funcs = + g_unix_signal_watch_finalize, + NULL, NULL + }; +-#endif /* !G_OS_WIN32 */ ++#endif /* !G_OS_WIN32 && !G_PLATFORM_WASM */ + G_LOCK_DEFINE_STATIC (main_context_list); + static GSList *main_context_list = NULL; + +@@ -2595,7 +2595,7 @@ g_clear_handle_id (guint *tag_ptr, + } + } + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + /** + * g_source_add_unix_fd: + * @source: a #GSource +@@ -2777,7 +2777,7 @@ g_source_query_unix_fd (GSource *source, + + return poll_fd->revents; + } +-#endif /* G_OS_UNIX */ ++#endif /* G_OS_UNIX && !G_PLATFORM_WASM */ + + /** + * g_get_current_time: +@@ -5372,9 +5372,9 @@ static gboolean + g_child_watch_prepare (GSource *source, + gint *timeout) + { +-#ifdef G_OS_WIN32 ++#if defined(G_OS_WIN32) || defined(G_PLATFORM_WASM) + return FALSE; +-#else /* G_OS_WIN32 */ ++#else /* !G_OS_WIN32 && !G_PLATFORM_WASM */ + { + GChildWatchSource *child_watch_source; + +@@ -5385,7 +5385,7 @@ g_child_watch_prepare (GSource *source, + + return g_atomic_int_get (&child_watch_source->child_maybe_exited); + } +-#endif /* G_OS_WIN32 */ ++#endif /* !G_OS_WIN32 && !G_PLATFORM_WASM */ + } + + static gboolean +@@ -5396,9 +5396,9 @@ g_child_watch_check (GSource *source) + + child_watch_source = (GChildWatchSource *) source; + +-#ifdef G_OS_WIN32 ++#if defined(G_OS_WIN32) || defined(G_PLATFORM_WASM) + child_exited = !!(child_watch_source->poll.revents & G_IO_IN); +-#else /* G_OS_WIN32 */ ++#else /* !G_OS_WIN32 && !G_PLATFORM_WASM */ + #ifdef HAVE_PIDFD + if (child_watch_source->poll.fd >= 0) + { +@@ -5407,7 +5407,7 @@ g_child_watch_check (GSource *source) + } + #endif /* HAVE_PIDFD */ + child_exited = g_atomic_int_get (&child_watch_source->child_maybe_exited); +-#endif /* G_OS_WIN32 */ ++#endif /* !G_OS_WIN32 && !G_PLATFORM_WASM */ + + return child_exited; + } +@@ -5415,7 +5415,7 @@ g_child_watch_check (GSource *source) + static void + g_child_watch_finalize (GSource *source) + { +-#ifndef G_OS_WIN32 ++#if !defined(G_OS_WIN32) && !defined(G_PLATFORM_WASM) + GChildWatchSource *child_watch_source = (GChildWatchSource *) source; + + if (child_watch_source->poll.fd >= 0) +@@ -5428,10 +5428,10 @@ g_child_watch_finalize (GSource *source) + unix_child_watches = g_slist_remove (unix_child_watches, source); + unref_unix_signal_handler_unlocked (SIGCHLD); + G_UNLOCK (unix_signal_lock); +-#endif /* G_OS_WIN32 */ ++#endif /* !G_OS_WIN32 && !G_PLATFORM_WASM */ + } + +-#ifndef G_OS_WIN32 ++#if !defined(G_OS_WIN32) && !defined(G_PLATFORM_WASM) + + static void + wake_source (GSource *source) +@@ -5761,7 +5761,9 @@ g_child_watch_dispatch (GSource *source, + else + wait_status = child_status; + } +-#else /* G_OS_WIN32 */ ++#elif defined(G_PLATFORM_WASM) /* !G_OS_WIN32 */ ++ wait_status = -1; ++#else /* !G_OS_WIN32 && !G_PLATFORM_WASM */ + { + gboolean child_exited = FALSE; + +@@ -5845,7 +5847,7 @@ g_child_watch_dispatch (GSource *source, + } + } + } +-#endif /* G_OS_WIN32 */ ++#endif /* !G_OS_WIN32 && !G_PLATFORM_WASM */ + + if (!callback) + { +@@ -5860,7 +5862,7 @@ g_child_watch_dispatch (GSource *source, + return FALSE; + } + +-#ifndef G_OS_WIN32 ++#if !defined(G_OS_WIN32) && !defined(G_PLATFORM_WASM) + + static void + g_unix_signal_handler (int signum) +@@ -5881,7 +5883,7 @@ g_unix_signal_handler (int signum) + errno = saved_errno; + } + +-#endif /* !G_OS_WIN32 */ ++#endif /* !G_OS_WIN32 && !G_PLATFORM_WASM */ + + /** + * g_child_watch_source_new: +@@ -5954,12 +5956,12 @@ g_child_watch_source_new (GPid pid) + + child_watch_source->pid = pid; + +-#ifdef G_OS_WIN32 ++#if defined(G_OS_WIN32) || defined(G_PLATFORM_WASM) + child_watch_source->poll.fd = (gintptr) pid; + child_watch_source->poll.events = G_IO_IN; + + g_source_add_poll (source, &child_watch_source->poll); +-#else /* !G_OS_WIN32 */ ++#else /* !G_OS_WIN32 && !G_PLATFORM_WASM */ + + #ifdef HAVE_PIDFD + /* Use a pidfd, if possible, to avoid having to install a global SIGCHLD +@@ -5994,7 +5996,7 @@ g_child_watch_source_new (GPid pid) + ref_unix_signal_handler_unlocked (SIGCHLD); + unix_child_watches = g_slist_prepend (unix_child_watches, child_watch_source); + G_UNLOCK (unix_signal_lock); +-#endif /* !G_OS_WIN32 */ ++#endif /* !G_OS_WIN32 && !G_PLATFORM_WASM */ + + return source; + } +@@ -6441,7 +6443,7 @@ glib_worker_main (gpointer data) + { + g_main_context_iteration (glib_worker_context, TRUE); + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + if (g_atomic_int_get (&any_unix_signal_pending)) + dispatch_unix_signals (); + #endif +@@ -6458,7 +6460,7 @@ g_get_worker_context (void) + if (g_once_init_enter (&initialised)) + { + /* mask all signals in the worker thread */ +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + sigset_t prev_mask; + sigset_t all; + +@@ -6467,7 +6469,7 @@ g_get_worker_context (void) + #endif + glib_worker_context = g_main_context_new (); + g_thread_new ("gmain", glib_worker_main, NULL); +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + pthread_sigmask (SIG_SETMASK, &prev_mask, NULL); + #endif + g_once_init_leave (&initialised, TRUE); +diff --git a/glib/gspawn-wasm.c b/glib/gspawn-wasm.c +new file mode 100644 +index 00000000000..da1da95aa66 +--- /dev/null ++++ b/glib/gspawn-wasm.c +@@ -0,0 +1,164 @@ ++/* gspawn-wasm.c - Process launching on WebAssembly, no-op implementation ++ * ++ * Copyright (C) 2022 Kleis Auke Wolthuizen ++ * ++ * SPDX-License-Identifier: LGPL-2.1-or-later ++ * ++ * 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 "glib.h" ++#include "glibintl.h" ++#include "gspawn.h" ++ ++G_DEFINE_QUARK (g-exec-error-quark, g_spawn_error) ++G_DEFINE_QUARK (g-spawn-exit-error-quark, g_spawn_exit_error) ++ ++gboolean ++g_spawn_async (const gchar *working_directory, ++ gchar **argv, ++ gchar **envp, ++ GSpawnFlags flags, ++ GSpawnChildSetupFunc child_setup, ++ gpointer user_data, ++ GPid *child_pid, ++ GError **error) ++{ ++ g_set_error_literal (error, G_SPAWN_ERROR, G_SPAWN_ERROR_FAILED, ++ _("g_spawn_async is no-op on WebAssembly")); ++ return FALSE; ++} ++ ++gboolean ++g_spawn_async_with_pipes (const gchar *working_directory, ++ gchar **argv, ++ gchar **envp, ++ GSpawnFlags flags, ++ GSpawnChildSetupFunc child_setup, ++ gpointer user_data, ++ GPid *child_pid, ++ gint *standard_input, ++ gint *standard_output, ++ gint *standard_error, ++ GError **error) ++{ ++ g_set_error_literal (error, G_SPAWN_ERROR, G_SPAWN_ERROR_FAILED, ++ _("g_spawn_async_with_pipes is no-op on WebAssembly")); ++ return FALSE; ++} ++ ++gboolean ++g_spawn_async_with_pipes_and_fds (const gchar *working_directory, ++ const gchar * const *argv, ++ const gchar * const *envp, ++ GSpawnFlags flags, ++ GSpawnChildSetupFunc child_setup, ++ gpointer user_data, ++ gint stdin_fd, ++ gint stdout_fd, ++ gint stderr_fd, ++ const gint *source_fds, ++ const gint *target_fds, ++ gsize n_fds, ++ GPid *child_pid_out, ++ gint *stdin_pipe_out, ++ gint *stdout_pipe_out, ++ gint *stderr_pipe_out, ++ GError **error) ++{ ++ g_set_error_literal (error, G_SPAWN_ERROR, G_SPAWN_ERROR_FAILED, ++ _("g_spawn_async_with_pipes_and_fds is no-op on WebAssembly")); ++ return FALSE; ++} ++ ++gboolean ++g_spawn_async_with_fds (const gchar *working_directory, ++ gchar **argv, ++ gchar **envp, ++ GSpawnFlags flags, ++ GSpawnChildSetupFunc child_setup, ++ gpointer user_data, ++ GPid *child_pid, ++ gint stdin_fd, ++ gint stdout_fd, ++ gint stderr_fd, ++ GError **error) ++{ ++ g_set_error_literal (error, G_SPAWN_ERROR, G_SPAWN_ERROR_FAILED, ++ _("g_spawn_async_with_fds is no-op on WebAssembly")); ++ return FALSE; ++} ++ ++gboolean ++g_spawn_sync (const gchar *working_directory, ++ gchar **argv, ++ gchar **envp, ++ GSpawnFlags flags, ++ GSpawnChildSetupFunc child_setup, ++ gpointer user_data, ++ gchar **standard_output, ++ gchar **standard_error, ++ gint *wait_status, ++ GError **error) ++{ ++ g_set_error_literal (error, G_SPAWN_ERROR, G_SPAWN_ERROR_FAILED, ++ _("g_spawn_sync is no-op on WebAssembly")); ++ return FALSE; ++} ++ ++gboolean ++g_spawn_command_line_sync (const gchar *command_line, ++ gchar **standard_output, ++ gchar **standard_error, ++ gint *wait_status, ++ GError **error) ++{ ++ g_set_error_literal (error, G_SPAWN_ERROR, G_SPAWN_ERROR_FAILED, ++ _("g_spawn_command_line_sync is no-op on WebAssembly")); ++ return FALSE; ++} ++ ++gboolean ++g_spawn_command_line_async (const gchar *command_line, ++ GError **error) ++{ ++ g_set_error_literal (error, G_SPAWN_ERROR, G_SPAWN_ERROR_FAILED, ++ _("g_spawn_command_line_async is no-op on WebAssembly")); ++ return FALSE; ++} ++ ++gboolean ++g_spawn_check_wait_status (gint wait_status, ++ GError **error) ++{ ++ g_set_error_literal (error, G_SPAWN_ERROR, G_SPAWN_ERROR_FAILED, ++ _("g_spawn_check_wait_status is no-op on WebAssembly")); ++ return FALSE; ++} ++ ++gboolean ++g_spawn_check_exit_status (gint wait_status, ++ GError **error) ++{ ++ g_set_error_literal (error, G_SPAWN_ERROR, G_SPAWN_ERROR_FAILED, ++ _("g_spawn_check_exit_status is no-op on WebAssembly")); ++ return FALSE; ++} ++ ++void ++g_spawn_close_pid (GPid pid) ++{ ++} +diff --git a/glib/gthread.c b/glib/gthread.c +index b39acc475c1..e53611a579e 100644 +--- a/glib/gthread.c ++++ b/glib/gthread.c +@@ -60,6 +60,10 @@ + #include + #endif /* G_OS_WIN32 */ + ++#ifdef G_PLATFORM_WASM ++#include ++#endif /*G_PLATFORM_WASM*/ ++ + #include "gslice.h" + #include "gstrfuncs.h" + #include "gtestutils.h" +@@ -1064,7 +1068,9 @@ g_thread_self (void) + guint + g_get_num_processors (void) + { +-#ifdef G_OS_WIN32 ++#ifdef G_PLATFORM_WASM ++ return emscripten_num_logical_cores(); ++#elif defined(G_OS_WIN32) + unsigned int count; + SYSTEM_INFO sysinfo; + DWORD_PTR process_cpus; +diff --git a/glib/gtimezone.c b/glib/gtimezone.c +index 0c3cae3f7af..a90c8657818 100644 +--- a/glib/gtimezone.c ++++ b/glib/gtimezone.c +@@ -204,7 +204,7 @@ static GTimeZone *tz_local = NULL; + there's no point in getting carried + away. */ + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + static GTimeZone *parse_footertz (const gchar *, size_t); + #endif + +@@ -504,7 +504,7 @@ zone_identifier_illumos (void) + } + #endif /* defined(__sun) && defined(__SRVR) */ + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + /* + * returns the path to the top of the Olson zoneinfo timezone hierarchy. + */ +@@ -1696,7 +1696,7 @@ rules_from_identifier (const gchar *identifier, + return create_ruleset_from_rule (rules, &tzr); + } + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + static GTimeZone * + parse_footertz (const gchar *footer, size_t footerlen) + { +@@ -1855,7 +1855,9 @@ g_time_zone_new_identifier (const gchar *identifier) + else + { + G_LOCK (tz_default); +-#ifdef G_OS_UNIX ++#ifdef G_PLATFORM_WASM ++ resolved_identifier = g_strdup ("UTC0"); ++#elif defined (G_OS_UNIX) + resolved_identifier = zone_identifier_unix (); + #elif defined (G_OS_WIN32) + resolved_identifier = windows_default_tzname (); +@@ -1895,7 +1897,7 @@ g_time_zone_new_identifier (const gchar *identifier) + + if (tz->t_info == NULL) + { +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + GBytes *zoneinfo = zone_info_unix (identifier, resolved_identifier); + if (zoneinfo != NULL) + { +diff --git a/glib/gutils.c b/glib/gutils.c +index bb88c76b2ad..0365375ab30 100644 +--- a/glib/gutils.c ++++ b/glib/gutils.c +@@ -1522,7 +1522,7 @@ get_windows_version (gboolean with_windows) + } + #endif + +-#if defined (G_OS_UNIX) && !defined (__APPLE__) ++#if defined (G_OS_UNIX) && !defined (__APPLE__) && !defined (G_PLATFORM_WASM) + static gchar * + get_os_info_from_os_release (const gchar *key_name, + const gchar *buffer) +@@ -1679,6 +1679,11 @@ g_get_os_info (const gchar *key_name) + return g_strdup ("macOS"); + else + return NULL; ++#elif defined (G_PLATFORM_WASM) ++ if (g_strcmp0 (key_name, G_OS_INFO_KEY_NAME) == 0) ++ return g_strdup ("wasm"); ++ else ++ return NULL; + #elif defined (G_OS_UNIX) + const gchar * const os_release_files[] = { "/etc/os-release", "/usr/lib/os-release" }; + gsize i; +diff --git a/glib/gwakeup.c b/glib/gwakeup.c +index 82080421621..1f6140e00ef 100644 +--- a/glib/gwakeup.c ++++ b/glib/gwakeup.c +@@ -110,16 +110,24 @@ g_wakeup_free (GWakeup *wakeup) + + #else + ++#ifdef G_PLATFORM_WASM ++#ifdef GLIB_COMPILATION ++#include "gmessages.h" ++#endif ++#else /* !G_PLATFORM_WASM */ + #include "glib-unix.h" + #include + + #if defined (HAVE_EVENTFD) + #include + #endif ++#endif /*G_PLATFORM_WASM*/ + + struct _GWakeup + { ++#ifndef G_PLATFORM_WASM + gint fds[2]; ++#endif + }; + + /*< private > +@@ -136,6 +144,10 @@ struct _GWakeup + GWakeup * + g_wakeup_new (void) + { ++#ifdef G_PLATFORM_WASM ++ g_error ("g_wakeup_new is no-op on WebAssembly"); ++ return NULL; ++#else + GError *error = NULL; + GWakeup *wakeup; + +@@ -166,6 +178,7 @@ g_wakeup_new (void) + g_error ("Set pipes non-blocking for GWakeup: %s", error->message); + + return wakeup; ++#endif + } + + /*< private > +@@ -184,8 +197,12 @@ void + g_wakeup_get_pollfd (GWakeup *wakeup, + GPollFD *poll_fd) + { ++#ifdef G_PLATFORM_WASM ++ g_error ("g_wakeup_get_pollfd is no-op on WebAssembly"); ++#else + poll_fd->fd = wakeup->fds[0]; + poll_fd->events = G_IO_IN; ++#endif + } + + /*< private > +@@ -205,6 +222,9 @@ g_wakeup_get_pollfd (GWakeup *wakeup, + void + g_wakeup_acknowledge (GWakeup *wakeup) + { ++#ifdef G_PLATFORM_WASM ++ g_error ("g_wakeup_acknowledge is no-op on WebAssembly"); ++#else + int res; + + if (wakeup->fds[1] == -1) +@@ -225,6 +245,7 @@ g_wakeup_acknowledge (GWakeup *wakeup) + res = read (wakeup->fds[0], &value, sizeof (value)); + while (res == sizeof (value) || G_UNLIKELY (res == -1 && errno == EINTR)); + } ++#endif + } + + /*< private > +@@ -244,6 +265,9 @@ g_wakeup_acknowledge (GWakeup *wakeup) + void + g_wakeup_signal (GWakeup *wakeup) + { ++#ifdef G_PLATFORM_WASM ++ g_error ("g_wakeup_signal is no-op on WebAssembly"); ++#else + int res; + + if (wakeup->fds[1] == -1) +@@ -266,6 +290,7 @@ g_wakeup_signal (GWakeup *wakeup) + res = write (wakeup->fds[1], &one, sizeof one); + while (G_UNLIKELY (res == -1 && errno == EINTR)); + } ++#endif + } + + /*< private > +@@ -280,12 +305,16 @@ g_wakeup_signal (GWakeup *wakeup) + void + g_wakeup_free (GWakeup *wakeup) + { ++#ifdef G_PLATFORM_WASM ++ g_error ("g_wakeup_free is no-op on WebAssembly"); ++#else + close (wakeup->fds[0]); + + if (wakeup->fds[1] != -1) + close (wakeup->fds[1]); + + g_slice_free (GWakeup, wakeup); ++#endif + } + + #endif /* !_WIN32 */ +diff --git a/glib/meson.build b/glib/meson.build +index 86e801a8346..5c63a4d9a29 100644 +--- a/glib/meson.build ++++ b/glib/meson.build +@@ -368,9 +368,10 @@ if host_system == 'windows' + if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' + glib_sources += files('dirent/wdirent.c') + endif ++elif host_system == 'emscripten' ++ glib_sources += files('gspawn-wasm.c') + else + glib_sources += files('glib-unix.c', 'gspawn.c', 'giounix.c') +- platform_deps = [] + endif + + if host_system == 'linux' +diff --git a/gobject/gsourceclosure.c b/gobject/gsourceclosure.c +index 3ca5e45f9a3..84117485c06 100644 +--- a/gobject/gsourceclosure.c ++++ b/gobject/gsourceclosure.c +@@ -25,7 +25,7 @@ + #include "gmarshal.h" + #include "gvalue.h" + #include "gvaluetypes.h" +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + #include "glib-unix.h" + #endif + +@@ -119,7 +119,7 @@ g_child_watch_closure_callback (GPid pid, + + g_value_init (&result_value, G_TYPE_BOOLEAN); + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + g_value_init (¶ms[0], G_TYPE_ULONG); + g_value_set_ulong (¶ms[0], pid); + #endif +@@ -141,7 +141,7 @@ g_child_watch_closure_callback (GPid pid, + return result; + } + +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + static gboolean + g_unix_fd_source_closure_callback (int fd, + GIOCondition condition, +@@ -199,16 +199,18 @@ closure_callback_get (gpointer cb_data, + + if (!closure_callback) + { +- if (source->source_funcs == &g_io_watch_funcs) +- closure_callback = (GSourceFunc)io_watch_closure_callback; +- else if (source->source_funcs == &g_child_watch_funcs) ++ if (source->source_funcs == &g_child_watch_funcs) + closure_callback = (GSourceFunc)g_child_watch_closure_callback; +-#ifdef G_OS_UNIX ++#ifndef G_PLATFORM_WASM ++ else if (source->source_funcs == &g_io_watch_funcs) ++ closure_callback = (GSourceFunc)io_watch_closure_callback; ++#endif ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + else if (source->source_funcs == &g_unix_fd_source_funcs) + closure_callback = (GSourceFunc)g_unix_fd_source_closure_callback; + #endif + else if (source->source_funcs == &g_timeout_funcs || +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + source->source_funcs == &g_unix_signal_funcs || + #endif + source->source_funcs == &g_idle_funcs) +@@ -251,12 +253,14 @@ g_source_set_closure (GSource *source, + g_return_if_fail (closure != NULL); + + if (!source->source_funcs->closure_callback && +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + source->source_funcs != &g_unix_fd_source_funcs && + source->source_funcs != &g_unix_signal_funcs && + #endif + source->source_funcs != &g_child_watch_funcs && ++#ifndef G_PLATFORM_WASM + source->source_funcs != &g_io_watch_funcs && ++#endif + source->source_funcs != &g_timeout_funcs && + source->source_funcs != &g_idle_funcs) + { +@@ -276,7 +280,7 @@ g_source_set_closure (GSource *source, + if (marshal) + g_closure_set_marshal (closure, marshal); + else if (source->source_funcs == &g_idle_funcs || +-#ifdef G_OS_UNIX ++#if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + source->source_funcs == &g_unix_signal_funcs || + #endif + source->source_funcs == &g_timeout_funcs) +diff --git a/meson.build b/meson.build +index b184db2e485..5b42281ecfc 100644 +--- a/meson.build ++++ b/meson.build +@@ -333,6 +333,9 @@ if host_system == 'windows' + elif host_system == 'cygwin' + glib_os = '''#define G_OS_UNIX + #define G_WITH_CYGWIN''' ++elif host_system == 'emscripten' ++ glib_os = '''#define G_OS_UNIX ++#define G_PLATFORM_WASM''' + else + glib_os = '#define G_OS_UNIX' + endif +@@ -1815,6 +1818,8 @@ glibconfig_conf.set('gssizebits', ssizet_size * 8) + # XXX: https://gitlab.gnome.org/GNOME/glib/issues/1413 + if host_system == 'windows' + g_module_suffix = 'dll' ++elif host_system == 'emscripten' ++ g_module_suffix = 'wasm' + else + g_module_suffix = 'so' + endif + +From f4e716a0fbd817dd94c8d349e30eb4dd812ce37e Mon Sep 17 00:00:00 2001 +From: Kleis Auke Wolthuizen +Date: Fri, 20 Sep 2019 16:05:00 +0200 +Subject: [PATCH 10/10] Fix function pointer cast issues + +It is undefined behavior in C and C++ to cast a function pointer +to another type and call it that way. This does work in most native +platforms, however, despite it being UB, but in WASM it can fail. + +See: +https://emscripten.org/docs/porting/guidelines/function_pointer_issues.html +--- + gio/gapplication.c | 18 ++++++--- + gio/gbufferedinputstream.c | 6 ++- + gio/gbufferedoutputstream.c | 6 ++- + gio/gbytesicon.c | 12 ++++-- + gio/gcharsetconverter.c | 12 ++++-- + gio/gconverterinputstream.c | 7 ++-- + gio/gconverteroutputstream.c | 6 ++- + gio/gdataoutputstream.c | 6 ++- + gio/gdbusactiongroup.c | 12 ++++-- + gio/gdbusconnection.c | 12 ++++-- + gio/gdbusdaemon.c | 12 ++++-- + gio/gdbusobjectmanagerclient.c | 18 ++++++--- + gio/gdbusproxy.c | 18 ++++++--- + gio/gdbusserver.c | 6 ++- + gio/gdebugcontrollerdbus.c | 12 ++++-- + gio/gdesktopappinfo.c | 6 ++- + gio/gdummyfile.c | 6 ++- + gio/gdummyproxyresolver.c | 6 ++- + gio/gdummytlsbackend.c | 36 +++++++++++------ + gio/gemblem.c | 6 ++- + gio/gemblemedicon.c | 6 ++- + gio/gfileicon.c | 12 ++++-- + gio/gfileinputstream.c | 6 ++- + gio/gfileiostream.c | 6 ++- + gio/gfileoutputstream.c | 6 ++- + gio/ghttpproxy.c | 6 ++- + gio/ginetaddressmask.c | 6 ++- + gio/ginetsocketaddress.c | 6 ++- + gio/gliststore.c | 6 ++- + gio/glocalfile.c | 6 ++- + gio/glocalfileinputstream.c | 6 ++- + gio/glocalfileoutputstream.c | 6 ++- + gio/gmemoryinputstream.c | 12 ++++-- + gio/gmemorymonitordbus.c | 12 ++++-- + gio/gmemorymonitorportal.c | 12 ++++-- + gio/gmemorymonitorwin32.c | 12 ++++-- + gio/gmemoryoutputstream.c | 12 ++++-- + gio/gnetworkaddress.c | 6 ++- + gio/gnetworkmonitorbase.c | 12 ++++-- + gio/gnetworkmonitornetlink.c | 12 ++++-- + gio/gnetworkmonitornm.c | 12 ++++-- + gio/gnetworkmonitorportal.c | 12 ++++-- + gio/gnetworkservice.c | 6 ++- + gio/gosxappinfo.m | 6 ++- + gio/gpowerprofilemonitordbus.c | 12 ++++-- + gio/gpowerprofilemonitorportal.c | 12 ++++-- + gio/gpropertyaction.c | 6 ++- + gio/gproxyresolverportal.c | 6 ++- + gio/gresourcefile.c | 6 ++- + gio/gsettings.c | 6 ++- + gio/gsimpleaction.c | 6 ++- + gio/gsimpleactiongroup.c | 12 ++++-- + gio/gsimpleasyncresult.c | 6 ++- + gio/gsimpleproxyresolver.c | 6 ++- + gio/gsocket.c | 12 ++++-- + gio/gsocketaddress.c | 6 ++- + gio/gsocketinputstream.c | 12 ++++-- + gio/gsocketoutputstream.c | 12 ++++-- + gio/gsocks4aproxy.c | 6 ++- + gio/gsocks5proxy.c | 6 ++- + gio/gsubprocess.c | 6 ++- + gio/gtask.c | 6 ++- + gio/gthemedicon.c | 6 ++- + gio/gunixinputstream.c | 12 ++++-- + gio/gunixmount.c | 6 ++- + gio/gunixoutputstream.c | 12 ++++-- + gio/gunixsocketaddress.c | 6 ++- + gio/gunixvolume.c | 6 ++- + gio/gwin32appinfo.c | 6 ++- + gio/gwin32mount.c | 6 ++- + gio/gwin32networkmonitor.c | 12 ++++-- + gio/gwin32registrykey.c | 6 ++- + gio/gzlibcompressor.c | 6 ++- + gio/gzlibdecompressor.c | 6 ++- + gio/win32/gwinhttpfile.c | 6 ++- + gobject/gobject.c | 6 ++- + gobject/gparam.h | 3 +- + gobject/gparamspecs.c | 66 +++++++++++++++++++++----------- + gobject/gtype.h | 26 +++++++++---- + gobject/gtypemodule.c | 3 +- + gobject/gtypemodule.h | 8 ++-- + 81 files changed, 519 insertions(+), 260 deletions(-) + +diff --git a/gio/gapplication.c b/gio/gapplication.c +index b7d2870e995..1128d211352 100644 +--- a/gio/gapplication.c ++++ b/gio/gapplication.c +@@ -290,8 +290,10 @@ enum + + 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) +@@ -317,7 +319,8 @@ typedef struct + } 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)) + +@@ -361,7 +364,8 @@ g_application_exported_actions_init (GApplicationExportedActions *actions) + } + + 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; +@@ -2872,7 +2876,8 @@ g_application_remove_action (GActionMap *action_map, + } + + 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; +@@ -2881,7 +2886,8 @@ g_application_action_group_iface_init (GActionGroupInterface *iface) + } + + 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; +diff --git a/gio/gbufferedinputstream.c b/gio/gbufferedinputstream.c +index 64cb293ef35..f89aa8152a0 100644 +--- a/gio/gbufferedinputstream.c ++++ b/gio/gbufferedinputstream.c +@@ -111,7 +111,8 @@ static gssize g_buffered_input_stream_real_fill_finish (GBufferedInputStream *s + 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, +@@ -301,7 +302,8 @@ g_buffered_input_stream_finalize (GObject *object) + } + + 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; +diff --git a/gio/gbufferedoutputstream.c b/gio/gbufferedoutputstream.c +index f82b10f1149..dc0198c425b 100644 +--- a/gio/gbufferedoutputstream.c ++++ b/gio/gbufferedoutputstream.c +@@ -103,7 +103,8 @@ static gboolean g_buffered_output_stream_close_finish (GOutputStream *str + 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, +@@ -350,7 +351,8 @@ g_buffered_output_stream_init (GBufferedOutputStream *stream) + } + + 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; +diff --git a/gio/gbytesicon.c b/gio/gbytesicon.c +index 37c242afbce..e22e9e055eb 100644 +--- a/gio/gbytesicon.c ++++ b/gio/gbytesicon.c +@@ -56,8 +56,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 @@ g_bytes_icon_serialize (GIcon *icon) + } + + 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 @@ g_bytes_icon_load_finish (GLoadableIcon *icon, + } + + 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; +diff --git a/gio/gcharsetconverter.c b/gio/gcharsetconverter.c +index c9437e1bd47..d38045e40c2 100644 +--- a/gio/gcharsetconverter.c ++++ b/gio/gcharsetconverter.c +@@ -45,8 +45,10 @@ enum { + * [struct@GLib.IConv]. + */ + +-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); + + struct _GCharsetConverter + { +@@ -433,7 +435,8 @@ g_charset_converter_get_num_fallbacks (GCharsetConverter *converter) + } + + 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; +@@ -478,7 +481,8 @@ g_charset_converter_initable_init (GInitable *initable, + } + + 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; + } +diff --git a/gio/gconverterinputstream.c b/gio/gconverterinputstream.c +index c74ec29f38c..afa51313723 100644 +--- a/gio/gconverterinputstream.c ++++ b/gio/gconverterinputstream.c +@@ -90,8 +90,8 @@ static gssize g_converter_input_stream_read_nonblocking (GPollableInputStream + 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, +@@ -129,7 +129,8 @@ g_converter_input_stream_class_init (GConverterInputStreamClass *klass) + } + + 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; +diff --git a/gio/gconverteroutputstream.c b/gio/gconverteroutputstream.c +index 1877b0e4ea2..942d5f750ca 100644 +--- a/gio/gconverteroutputstream.c ++++ b/gio/gconverteroutputstream.c +@@ -105,7 +105,8 @@ static gssize g_converter_output_stream_write_nonblocking (GPollableOutputStre + 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, +@@ -145,7 +146,8 @@ g_converter_output_stream_class_init (GConverterOutputStreamClass *klass) + } + + 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; +diff --git a/gio/gdataoutputstream.c b/gio/gdataoutputstream.c +index f183f96268e..fe8ced0be59 100644 +--- a/gio/gdataoutputstream.c ++++ b/gio/gdataoutputstream.c +@@ -55,7 +55,8 @@ static void g_data_output_stream_get_property (GObject *object, + 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, +@@ -155,7 +156,8 @@ g_data_output_stream_init (GDataOutputStream *stream) + } + + 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; +diff --git a/gio/gdbusactiongroup.c b/gio/gdbusactiongroup.c +index 0bd53112165..060f1478a5e 100644 +--- a/gio/gdbusactiongroup.c ++++ b/gio/gdbusactiongroup.c +@@ -122,8 +122,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)) +@@ -450,14 +452,16 @@ g_dbus_action_group_class_init (GDBusActionGroupClass *class) + } + + 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; +diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c +index 42134a601b0..8f0045d04a1 100644 +--- a/gio/gdbusconnection.c ++++ b/gio/gdbusconnection.c +@@ -505,8 +505,10 @@ static void schedule_method_call (GDBusConnection *connection, + + 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) +@@ -2668,7 +2670,8 @@ initable_init (GInitable *initable, + } + + static void +-initable_iface_init (GInitableIface *initable_iface) ++initable_iface_init (GInitableIface *initable_iface, ++ gpointer iface_data) + { + initable_iface->init = initable_init; + } +@@ -2676,7 +2679,8 @@ initable_iface_init (GInitableIface *initable_iface) + /* ---------------------------------------------------------------------------------------------------- */ + + static void +-async_initable_iface_init (GAsyncInitableIface *async_initable_iface) ++async_initable_iface_init (GAsyncInitableIface *async_initable_iface, ++ gpointer iface_data) + { + /* Use default */ + } +diff --git a/gio/gdbusdaemon.c b/gio/gdbusdaemon.c +index 3474b7091d1..11dc9eb20c3 100644 +--- a/gio/gdbusdaemon.c ++++ b/gio/gdbusdaemon.c +@@ -90,8 +90,10 @@ enum + 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, +@@ -1700,7 +1702,8 @@ g_dbus_daemon_class_init (GDBusDaemonClass *klass) + } + + 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; +@@ -1722,7 +1725,8 @@ g_dbus_daemon_iface_init (_GFreedesktopDBusIface *iface) + } + + static void +-initable_iface_init (GInitableIface *initable_iface) ++initable_iface_init (GInitableIface *initable_iface, ++ gpointer iface_data) + { + initable_iface->init = initable_init; + } +diff --git a/gio/gdbusobjectmanagerclient.c b/gio/gdbusobjectmanagerclient.c +index cb35d066934..c12177e201e 100644 +--- a/gio/gdbusobjectmanagerclient.c ++++ b/gio/gdbusobjectmanagerclient.c +@@ -177,9 +177,12 @@ enum + + 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) +@@ -1500,13 +1503,15 @@ initable_init (GInitable *initable, + } + + 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 */ + } +@@ -1847,7 +1852,8 @@ g_dbus_object_manager_client_get_objects (GDBusObjectManager *_manager) + + + 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; +diff --git a/gio/gdbusproxy.c b/gio/gdbusproxy.c +index 5d9a637c355..a4b3b84ba7d 100644 +--- a/gio/gdbusproxy.c ++++ b/gio/gdbusproxy.c +@@ -179,9 +179,12 @@ enum + + 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) +@@ -1826,7 +1829,8 @@ async_initable_init_finish (GAsyncInitable *initable, + } + + 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; +@@ -1913,7 +1917,8 @@ initable_init (GInitable *initable, + } + + static void +-initable_iface_init (GInitableIface *initable_iface) ++initable_iface_init (GInitableIface *initable_iface, ++ gpointer iface_data) + { + initable_iface->init = initable_init; + } +@@ -3168,7 +3173,8 @@ _g_dbus_proxy_set_object (GDBusInterface *interface, + } + + 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; +diff --git a/gio/gdbusserver.c b/gio/gdbusserver.c +index 4e23e52e4be..891a3c8be65 100644 +--- a/gio/gdbusserver.c ++++ b/gio/gdbusserver.c +@@ -158,7 +158,8 @@ enum + + 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)) +@@ -1163,7 +1164,8 @@ initable_init (GInitable *initable, + + + static void +-initable_iface_init (GInitableIface *initable_iface) ++initable_iface_init (GInitableIface *initable_iface, ++ gpointer iface_data) + { + initable_iface->init = initable_init; + } +diff --git a/gio/gdebugcontrollerdbus.c b/gio/gdebugcontrollerdbus.c +index 03dd1be98ad..cc22d5ab6e2 100644 +--- a/gio/gdebugcontrollerdbus.c ++++ b/gio/gdebugcontrollerdbus.c +@@ -161,8 +161,10 @@ static GDBusInterfaceInfo *org_gtk_Debugging; + + #define G_DEBUG_CONTROLLER_DBUS_GET_INITABLE_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), G_TYPE_INITABLE, GInitable)) + +-static void g_debug_controller_dbus_iface_init (GDebugControllerInterface *iface); +-static void g_debug_controller_dbus_initable_iface_init (GInitableIface *iface); ++static void g_debug_controller_dbus_iface_init (GDebugControllerInterface *iface, ++ gpointer iface_data); ++static void g_debug_controller_dbus_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data); + static gboolean g_debug_controller_dbus_authorize_default (GDebugControllerDBus *self, + GDBusMethodInvocation *invocation); + +@@ -615,12 +617,14 @@ g_debug_controller_dbus_class_init (GDebugControllerDBusClass *klass) + } + + static void +-g_debug_controller_dbus_iface_init (GDebugControllerInterface *iface) ++g_debug_controller_dbus_iface_init (GDebugControllerInterface *iface, ++ gpointer iface_data) + { + } + + static void +-g_debug_controller_dbus_initable_iface_init (GInitableIface *iface) ++g_debug_controller_dbus_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data) + { + iface->init = g_debug_controller_dbus_initable_init; + } +diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c +index 7d36b6a3401..4512a2b6111 100644 +--- a/gio/gdesktopappinfo.c ++++ b/gio/gdesktopappinfo.c +@@ -87,7 +87,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); + static gboolean g_desktop_app_info_load_file (GDesktopAppInfo *self); +@@ -4378,7 +4379,8 @@ g_app_info_create_from_commandline (const char *commandline, + /* 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; +diff --git a/gio/gdummyfile.c b/gio/gdummyfile.c +index 4ec352c6e41..36d55ceeaf2 100644 +--- a/gio/gdummyfile.c ++++ b/gio/gdummyfile.c +@@ -33,7 +33,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; +@@ -398,7 +399,8 @@ g_dummy_file_get_uri_scheme (GFile *file) + + + 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; +diff --git a/gio/gdummyproxyresolver.c b/gio/gdummyproxyresolver.c +index 1cac1db746f..fe354166f08 100644 +--- a/gio/gdummyproxyresolver.c ++++ b/gio/gdummyproxyresolver.c +@@ -38,7 +38,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, +@@ -127,7 +128,8 @@ g_dummy_proxy_resolver_class_init (GDummyProxyResolverClass *resolver_class) + } + + 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; +diff --git a/gio/gdummytlsbackend.c b/gio/gdummytlsbackend.c +index 4c69f1d010a..05c374ce3e0 100644 +--- a/gio/gdummytlsbackend.c ++++ b/gio/gdummytlsbackend.c +@@ -53,7 +53,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, +@@ -105,7 +106,8 @@ g_dummy_tls_backend_get_default_database (GTlsBackend *backend) + } + + 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; +@@ -140,7 +142,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, +@@ -199,7 +202,8 @@ g_dummy_tls_certificate_initable_init (GInitable *initable, + } + + 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; + } +@@ -242,7 +246,8 @@ enum + PROP_CONN_NEGOTIATED_PROTOCOL, + }; + +-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, +@@ -325,7 +330,8 @@ g_dummy_tls_connection_initable_init (GInitable *initable, + } + + 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; + } +@@ -363,7 +369,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, +@@ -427,7 +434,8 @@ g_dummy_dtls_connection_initable_init (GInitable *initable, + } + + 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; + } +@@ -453,8 +461,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, +@@ -502,7 +512,8 @@ g_dummy_tls_database_init (GDummyTlsDatabase *database) + } + + 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) + { + } + +@@ -517,7 +528,8 @@ g_dummy_tls_database_initable_init (GInitable *initable, + } + + 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; + } +diff --git a/gio/gemblem.c b/gio/gemblem.c +index dc032672e07..e328e1c4d01 100644 +--- a/gio/gemblem.c ++++ b/gio/gemblem.c +@@ -41,7 +41,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 + { +@@ -378,7 +379,8 @@ g_emblem_serialize (GIcon *icon) + } + + 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; +diff --git a/gio/gemblemedicon.c b/gio/gemblemedicon.c +index 9415c0b9d46..9c69169ea00 100644 +--- a/gio/gemblemedicon.c ++++ b/gio/gemblemedicon.c +@@ -55,7 +55,8 @@ struct _GEmblemedIconPrivate { + + 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) +@@ -461,7 +462,8 @@ g_emblemed_icon_serialize (GIcon *icon) + } + + 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; +diff --git a/gio/gfileicon.c b/gio/gfileicon.c +index d796ed43f44..8162f229fee 100644 +--- a/gio/gfileicon.c ++++ b/gio/gfileicon.c +@@ -41,8 +41,10 @@ + * It implements [iface@Gio.LoadableIcon]. + */ + +-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, +@@ -276,7 +278,8 @@ g_file_icon_serialize (GIcon *icon) + } + + 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; +@@ -356,7 +359,8 @@ g_file_icon_load_finish (GLoadableIcon *icon, + } + + 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; +diff --git a/gio/gfileinputstream.c b/gio/gfileinputstream.c +index f71beb5bb3c..bd62a7b2447 100644 +--- a/gio/gfileinputstream.c ++++ b/gio/gfileinputstream.c +@@ -46,7 +46,8 @@ + * To position a file input stream, use [vfunc@Gio.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, +@@ -87,7 +88,8 @@ g_file_input_stream_class_init (GFileInputStreamClass *klass) + } + + 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; +diff --git a/gio/gfileiostream.c b/gio/gfileiostream.c +index 4a030c0932b..ac491ddbfa9 100644 +--- a/gio/gfileiostream.c ++++ b/gio/gfileiostream.c +@@ -59,7 +59,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, +@@ -92,7 +93,8 @@ G_DEFINE_TYPE_WITH_CODE (GFileIOStream, g_file_io_stream, G_TYPE_IO_STREAM, + 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; +diff --git a/gio/gfileoutputstream.c b/gio/gfileoutputstream.c +index 786d037c361..bb724050ab3 100644 +--- a/gio/gfileoutputstream.c ++++ b/gio/gfileoutputstream.c +@@ -51,7 +51,8 @@ + * stream, use [method@Gio.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, +@@ -91,7 +92,8 @@ g_file_output_stream_class_init (GFileOutputStreamClass *klass) + } + + 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; +diff --git a/gio/ghttpproxy.c b/gio/ghttpproxy.c +index 605a7299415..28e36747138 100644 +--- a/gio/ghttpproxy.c ++++ b/gio/ghttpproxy.c +@@ -53,7 +53,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, +@@ -379,7 +380,8 @@ g_http_proxy_class_init (GHttpProxyClass *class) + } + + 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; +diff --git a/gio/ginetaddressmask.c b/gio/ginetaddressmask.c +index 1431b94358e..ec262dcb71d 100644 +--- a/gio/ginetaddressmask.c ++++ b/gio/ginetaddressmask.c +@@ -47,7 +47,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) +@@ -238,7 +239,8 @@ g_inet_address_mask_initable_init (GInitable *initable, + } + + 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; + } +diff --git a/gio/ginetsocketaddress.c b/gio/ginetsocketaddress.c +index c17bd1497e1..1d705f61f58 100644 +--- a/gio/ginetsocketaddress.c ++++ b/gio/ginetsocketaddress.c +@@ -51,7 +51,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, +@@ -311,7 +312,8 @@ g_inet_socket_address_class_init (GInetSocketAddressClass *klass) + } + + 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); + +diff --git a/gio/gliststore.c b/gio/gliststore.c +index 41450f6c304..9cfa53016d0 100644 +--- a/gio/gliststore.c ++++ b/gio/gliststore.c +@@ -58,7 +58,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)); +@@ -219,7 +220,8 @@ g_list_store_get_item (GListModel *list, + } + + 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; +diff --git a/gio/glocalfile.c b/gio/glocalfile.c +index 099df4d2762..35dd746d4ae 100644 +--- a/gio/glocalfile.c ++++ b/gio/glocalfile.c +@@ -102,7 +102,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 *local_writable_namespaces = NULL; +@@ -3060,7 +3061,8 @@ g_local_file_measure_disk_usage (GFile *file, + } + + 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; +diff --git a/gio/glocalfileinputstream.c b/gio/glocalfileinputstream.c +index 33e848f8782..b0229f492a9 100644 +--- a/gio/glocalfileinputstream.c ++++ b/gio/glocalfileinputstream.c +@@ -53,7 +53,8 @@ struct _GLocalFileInputStreamPrivate { + }; + + #if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) +-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 +@@ -113,7 +114,8 @@ g_local_file_input_stream_class_init (GLocalFileInputStreamClass *klass) + + #if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + 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; + } +diff --git a/gio/glocalfileoutputstream.c b/gio/glocalfileoutputstream.c +index efe2e2c612d..7e0440461aa 100644 +--- a/gio/glocalfileoutputstream.c ++++ b/gio/glocalfileoutputstream.c +@@ -84,7 +84,8 @@ struct _GLocalFileOutputStreamPrivate { + }; + + #if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) +-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 +@@ -182,7 +183,8 @@ g_local_file_output_stream_class_init (GLocalFileOutputStreamClass *klass) + + #if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + 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; + } +diff --git a/gio/gmemoryinputstream.c b/gio/gmemoryinputstream.c +index de164542d87..f017c37cfc5 100644 +--- a/gio/gmemoryinputstream.c ++++ b/gio/gmemoryinputstream.c +@@ -77,7 +77,8 @@ static gboolean g_memory_input_stream_close_finish (GInputStream *stream + 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, +@@ -91,7 +92,8 @@ static gboolean g_memory_input_stream_truncate (GSeekable *seek + 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); +@@ -142,7 +144,8 @@ g_memory_input_stream_finalize (GObject *object) + } + + 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; +@@ -152,7 +155,8 @@ g_memory_input_stream_seekable_iface_init (GSeekableIface *iface) + } + + 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; +diff --git a/gio/gmemorymonitordbus.c b/gio/gmemorymonitordbus.c +index 37542f75c6f..995b7bf9688 100644 +--- a/gio/gmemorymonitordbus.c ++++ b/gio/gmemorymonitordbus.c +@@ -33,8 +33,10 @@ + + #define G_MEMORY_MONITOR_DBUS_GET_INITABLE_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), G_TYPE_INITABLE, GInitable)) + +-static void g_memory_monitor_dbus_iface_init (GMemoryMonitorInterface *iface); +-static void g_memory_monitor_dbus_initable_iface_init (GInitableIface *iface); ++static void g_memory_monitor_dbus_iface_init (GMemoryMonitorInterface *iface, ++ gpointer iface_data); ++static void g_memory_monitor_dbus_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data); + + struct _GMemoryMonitorDBus + { +@@ -176,12 +178,14 @@ g_memory_monitor_dbus_class_init (GMemoryMonitorDBusClass *nl_class) + } + + static void +-g_memory_monitor_dbus_iface_init (GMemoryMonitorInterface *monitor_iface) ++g_memory_monitor_dbus_iface_init (GMemoryMonitorInterface *monitor_iface, ++ gpointer iface_data) + { + } + + static void +-g_memory_monitor_dbus_initable_iface_init (GInitableIface *iface) ++g_memory_monitor_dbus_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data) + { + iface->init = g_memory_monitor_dbus_initable_init; + } +diff --git a/gio/gmemorymonitorportal.c b/gio/gmemorymonitorportal.c +index 1517d61a9ff..235d45a935e 100644 +--- a/gio/gmemorymonitorportal.c ++++ b/gio/gmemorymonitorportal.c +@@ -29,8 +29,10 @@ + + #define G_MEMORY_MONITOR_PORTAL_GET_INITABLE_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), G_TYPE_INITABLE, GInitable)) + +-static void g_memory_monitor_portal_iface_init (GMemoryMonitorInterface *iface); +-static void g_memory_monitor_portal_initable_iface_init (GInitableIface *iface); ++static void g_memory_monitor_portal_iface_init (GMemoryMonitorInterface *iface, ++ gpointer iface_data); ++static void g_memory_monitor_portal_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data); + + struct _GMemoryMonitorPortal + { +@@ -143,12 +145,14 @@ g_memory_monitor_portal_class_init (GMemoryMonitorPortalClass *nl_class) + } + + static void +-g_memory_monitor_portal_iface_init (GMemoryMonitorInterface *monitor_iface) ++g_memory_monitor_portal_iface_init (GMemoryMonitorInterface *monitor_iface, ++ gpointer iface_data) + { + } + + static void +-g_memory_monitor_portal_initable_iface_init (GInitableIface *iface) ++g_memory_monitor_portal_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data) + { + iface->init = g_memory_monitor_portal_initable_init; + } +diff --git a/gio/gmemorymonitorwin32.c b/gio/gmemorymonitorwin32.c +index 83fef504fb5..36d5ff0eaa7 100644 +--- a/gio/gmemorymonitorwin32.c ++++ b/gio/gmemorymonitorwin32.c +@@ -35,8 +35,10 @@ G_DECLARE_FINAL_TYPE (GMemoryMonitorWin32, g_memory_monitor_win32, G, MEMORY_MON + + #define G_MEMORY_MONITOR_WIN32_GET_INITABLE_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), G_TYPE_INITABLE, GInitable)) + +-static void g_memory_monitor_win32_iface_init (GMemoryMonitorInterface *iface); +-static void g_memory_monitor_win32_initable_iface_init (GInitableIface *iface); ++static void g_memory_monitor_win32_iface_init (GMemoryMonitorInterface *iface, ++ gpointer iface_data); ++static void g_memory_monitor_win32_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data); + + struct _GMemoryMonitorWin32 + { +@@ -252,12 +254,14 @@ g_memory_monitor_win32_class_init (GMemoryMonitorWin32Class *nl_class) + } + + static void +-g_memory_monitor_win32_iface_init (GMemoryMonitorInterface *monitor_iface) ++g_memory_monitor_win32_iface_init (GMemoryMonitorInterface *monitor_iface, ++ gpointer iface_data) + { + } + + static void +-g_memory_monitor_win32_initable_iface_init (GInitableIface *iface) ++g_memory_monitor_win32_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data) + { + iface->init = g_memory_monitor_win32_initable_init; + } +diff --git a/gio/gmemoryoutputstream.c b/gio/gmemoryoutputstream.c +index bf080852c1d..31dcfcb468f 100644 +--- a/gio/gmemoryoutputstream.c ++++ b/gio/gmemoryoutputstream.c +@@ -96,7 +96,8 @@ static gboolean g_memory_output_stream_close_finish (GOutputStream *strea + 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 gboolean g_memory_output_stream_is_writable (GPollableOutputStream + 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) +@@ -211,7 +213,8 @@ g_memory_output_stream_class_init (GMemoryOutputStreamClass *klass) + } + + 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; +@@ -300,7 +303,8 @@ g_memory_output_stream_finalize (GObject *object) + } + + 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; +diff --git a/gio/gnetworkaddress.c b/gio/gnetworkaddress.c +index adff705189d..00435f0d2aa 100644 +--- a/gio/gnetworkaddress.c ++++ b/gio/gnetworkaddress.c +@@ -85,7 +85,8 @@ static void g_network_address_get_property (GObject *object, + 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); +@@ -160,7 +161,8 @@ g_network_address_class_init (GNetworkAddressClass *klass) + } + + 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; +diff --git a/gio/gnetworkmonitorbase.c b/gio/gnetworkmonitorbase.c +index 78e26344477..ab9b8830507 100644 +--- a/gio/gnetworkmonitorbase.c ++++ b/gio/gnetworkmonitorbase.c +@@ -33,8 +33,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 + { +@@ -345,7 +347,8 @@ g_network_monitor_base_can_reach_finish (GNetworkMonitor *monitor, + } + + 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; +@@ -367,7 +370,8 @@ g_network_monitor_base_initable_init (GInitable *initable, + } + + 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; + } +diff --git a/gio/gnetworkmonitornetlink.c b/gio/gnetworkmonitornetlink.c +index 9d4b0f9c572..64ce26e5fc2 100644 +--- a/gio/gnetworkmonitornetlink.c ++++ b/gio/gnetworkmonitornetlink.c +@@ -42,8 +42,10 @@ + #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 + { +@@ -502,12 +504,14 @@ g_network_monitor_netlink_class_init (GNetworkMonitorNetlinkClass *nl_class) + } + + 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); + +diff --git a/gio/gnetworkmonitornm.c b/gio/gnetworkmonitornm.c +index 207d50d5e3d..22eea24f193 100644 +--- a/gio/gnetworkmonitornm.c ++++ b/gio/gnetworkmonitornm.c +@@ -34,8 +34,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 + { +@@ -365,12 +367,14 @@ g_network_monitor_nm_class_init (GNetworkMonitorNMClass *nl_class) + } + + 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; + } +diff --git a/gio/gnetworkmonitorportal.c b/gio/gnetworkmonitorportal.c +index f48d3e6f03b..36389383cd8 100644 +--- a/gio/gnetworkmonitorportal.c ++++ b/gio/gnetworkmonitorportal.c +@@ -27,8 +27,10 @@ + #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 + { +@@ -613,7 +615,8 @@ g_network_monitor_portal_can_reach_finish (GNetworkMonitor *monitor, + } + + static void +-g_network_monitor_portal_iface_init (GNetworkMonitorInterface *monitor_iface) ++g_network_monitor_portal_iface_init (GNetworkMonitorInterface *monitor_iface, ++ gpointer iface_data) + { + monitor_iface->can_reach = g_network_monitor_portal_can_reach; + monitor_iface->can_reach_async = g_network_monitor_portal_can_reach_async; +@@ -621,7 +624,8 @@ g_network_monitor_portal_iface_init (GNetworkMonitorInterface *monitor_iface) + } + + 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); + +diff --git a/gio/gnetworkservice.c b/gio/gnetworkservice.c +index 39c9df1b963..069557010da 100644 +--- a/gio/gnetworkservice.c ++++ b/gio/gnetworkservice.c +@@ -79,7 +79,8 @@ static void g_network_service_get_property (GObject *object, + 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); +@@ -172,7 +173,8 @@ g_network_service_class_init (GNetworkServiceClass *klass) + } + + 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; +diff --git a/gio/gosxappinfo.m b/gio/gosxappinfo.m +index 50b08e0be9b..9b587d92acd 100644 +--- a/gio/gosxappinfo.m ++++ b/gio/gosxappinfo.m +@@ -41,7 +41,8 @@ + * Note that `` is unique to OSX. + */ + +-static void g_osx_app_info_iface_init (GAppInfoIface *iface); ++static void g_osx_app_info_iface_init (GAppInfoIface *iface, ++ gpointer iface_data); + static const char *g_osx_app_info_get_id (GAppInfo *appinfo); + + struct _GOsxAppInfo +@@ -550,7 +551,8 @@ + } + + static void +-g_osx_app_info_iface_init (GAppInfoIface *iface) ++g_osx_app_info_iface_init (GAppInfoIface *iface, ++ gpointer iface_data) + { + iface->dup = g_osx_app_info_dup; + iface->equal = g_osx_app_info_equal; +diff --git a/gio/gpowerprofilemonitordbus.c b/gio/gpowerprofilemonitordbus.c +index ac6f8a88c7a..ffd66d5ed9f 100644 +--- a/gio/gpowerprofilemonitordbus.c ++++ b/gio/gpowerprofilemonitordbus.c +@@ -34,8 +34,10 @@ + + #define G_POWER_PROFILE_MONITOR_DBUS_GET_INITABLE_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), G_TYPE_INITABLE, GInitable)) + +-static void g_power_profile_monitor_dbus_iface_init (GPowerProfileMonitorInterface *iface); +-static void g_power_profile_monitor_dbus_initable_iface_init (GInitableIface *iface); ++static void g_power_profile_monitor_dbus_iface_init (GPowerProfileMonitorInterface *iface, ++ gpointer iface_data); ++static void g_power_profile_monitor_dbus_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data); + + struct _GPowerProfileMonitorDBus + { +@@ -233,12 +235,14 @@ g_power_profile_monitor_dbus_class_init (GPowerProfileMonitorDBusClass *nl_class + } + + static void +-g_power_profile_monitor_dbus_iface_init (GPowerProfileMonitorInterface *monitor_iface) ++g_power_profile_monitor_dbus_iface_init (GPowerProfileMonitorInterface *monitor_iface, ++ gpointer iface_data) + { + } + + static void +-g_power_profile_monitor_dbus_initable_iface_init (GInitableIface *iface) ++g_power_profile_monitor_dbus_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data) + { + iface->init = g_power_profile_monitor_dbus_initable_init; + } +diff --git a/gio/gpowerprofilemonitorportal.c b/gio/gpowerprofilemonitorportal.c +index 0c69ed9b522..3ba794aeeed 100644 +--- a/gio/gpowerprofilemonitorportal.c ++++ b/gio/gpowerprofilemonitorportal.c +@@ -31,8 +31,10 @@ + + #define G_POWER_PROFILE_MONITOR_PORTAL_GET_INITABLE_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), G_TYPE_INITABLE, GInitable)) + +-static void g_power_profile_monitor_portal_iface_init (GPowerProfileMonitorInterface *iface); +-static void g_power_profile_monitor_portal_initable_iface_init (GInitableIface *iface); ++static void g_power_profile_monitor_portal_iface_init (GPowerProfileMonitorInterface *iface, ++ gpointer iface_data); ++static void g_power_profile_monitor_portal_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data); + + typedef enum + { +@@ -180,12 +182,14 @@ g_power_profile_monitor_portal_class_init (GPowerProfileMonitorPortalClass *nl_c + } + + static void +-g_power_profile_monitor_portal_iface_init (GPowerProfileMonitorInterface *monitor_iface) ++g_power_profile_monitor_portal_iface_init (GPowerProfileMonitorInterface *monitor_iface, ++ gpointer iface_data) + { + } + + static void +-g_power_profile_monitor_portal_initable_iface_init (GInitableIface *iface) ++g_power_profile_monitor_portal_initable_iface_init (GInitableIface *iface, ++ gpointer iface_data) + { + iface->init = g_power_profile_monitor_portal_initable_init; + } +diff --git a/gio/gpropertyaction.c b/gio/gpropertyaction.c +index 6b671f54bf5..61a0f045888 100644 +--- a/gio/gpropertyaction.c ++++ b/gio/gpropertyaction.c +@@ -98,7 +98,8 @@ struct _GPropertyAction + + 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)) + +@@ -437,7 +438,8 @@ g_property_action_init (GPropertyAction *property) + } + + 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; +diff --git a/gio/gproxyresolverportal.c b/gio/gproxyresolverportal.c +index ec803b9c412..a25e6e8ccb1 100644 +--- a/gio/gproxyresolverportal.c ++++ b/gio/gproxyresolverportal.c +@@ -33,7 +33,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, +@@ -201,7 +202,8 @@ g_proxy_resolver_portal_class_init (GProxyResolverPortalClass *resolver_class) + } + + 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; +diff --git a/gio/gresourcefile.c b/gio/gresourcefile.c +index 6066ae2151e..6efe0550016 100644 +--- a/gio/gresourcefile.c ++++ b/gio/gresourcefile.c +@@ -68,7 +68,8 @@ struct _GResourceFileEnumeratorClass + 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; +@@ -667,7 +668,8 @@ g_resource_file_set_display_name (GFile *file, + } + + 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; +diff --git a/gio/gsettings.c b/gio/gsettings.c +index a14ba809481..9f4ae47fb5e 100644 +--- a/gio/gsettings.c ++++ b/gio/gsettings.c +@@ -3142,7 +3142,8 @@ typedef struct + 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)) + +@@ -3299,7 +3300,8 @@ g_settings_action_init (GSettingsAction *gsa) + } + + 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; +diff --git a/gio/gsimpleaction.c b/gio/gsimpleaction.c +index 6e3080bec97..de2524f05bd 100644 +--- a/gio/gsimpleaction.c ++++ b/gio/gsimpleaction.c +@@ -48,7 +48,8 @@ struct _GSimpleAction + + 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)) + +@@ -337,7 +338,8 @@ g_simple_action_init (GSimpleAction *simple) + } + + 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; +diff --git a/gio/gsimpleactiongroup.c b/gio/gsimpleactiongroup.c +index cd768a0a1af..3ebc01b192d 100644 +--- a/gio/gsimpleactiongroup.c ++++ b/gio/gsimpleactiongroup.c +@@ -42,8 +42,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) +@@ -274,7 +276,8 @@ g_simple_action_group_class_init (GSimpleActionGroupClass *class) + } + + 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; +@@ -283,7 +286,8 @@ g_simple_action_group_iface_init (GActionGroupInterface *iface) + } + + 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; +diff --git a/gio/gsimpleasyncresult.c b/gio/gsimpleasyncresult.c +index ef5492f8e9e..2ce78569854 100644 +--- a/gio/gsimpleasyncresult.c ++++ b/gio/gsimpleasyncresult.c +@@ -205,7 +205,8 @@ + + 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 @@ g_simple_async_result_is_tagged (GAsyncResult *res, + } + + 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; +diff --git a/gio/gsimpleproxyresolver.c b/gio/gsimpleproxyresolver.c +index 41136527f05..33669d44bbe 100644 +--- a/gio/gsimpleproxyresolver.c ++++ b/gio/gsimpleproxyresolver.c +@@ -61,7 +61,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 @@ g_simple_proxy_resolver_class_init (GSimpleProxyResolverClass *resolver_class) + } + + 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; +diff --git a/gio/gsocket.c b/gio/gsocket.c +index 58bbe5c77ac..84d60ae6c00 100644 +--- a/gio/gsocket.c ++++ b/gio/gsocket.c +@@ -159,12 +159,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, +@@ -1169,13 +1171,15 @@ g_socket_class_init (GSocketClass *klass) + } + + 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; +diff --git a/gio/gsocketaddress.c b/gio/gsocketaddress.c +index 09cb9abbe95..8d46fbd7e1e 100644 +--- a/gio/gsocketaddress.c ++++ b/gio/gsocketaddress.c +@@ -59,7 +59,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 @@ g_socket_address_class_init (GSocketAddressClass *klass) + } + + 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; +diff --git a/gio/gsocketinputstream.c b/gio/gsocketinputstream.c +index fbfbb641bb0..81fa563f88e 100644 +--- a/gio/gsocketinputstream.c ++++ b/gio/gsocketinputstream.c +@@ -41,9 +41,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); + #if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) +-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 @@ g_socket_input_stream_class_init (GSocketInputStreamClass *klass) + + #if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + 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; +diff --git a/gio/gsocketoutputstream.c b/gio/gsocketoutputstream.c +index 36ea413c165..a2d8a46b22f 100644 +--- a/gio/gsocketoutputstream.c ++++ b/gio/gsocketoutputstream.c +@@ -46,9 +46,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); + #if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) +-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 +@@ -254,14 +256,16 @@ g_socket_output_stream_class_init (GSocketOutputStreamClass *klass) + + #if defined(G_OS_UNIX) && !defined(G_PLATFORM_WASM) + 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; +diff --git a/gio/gsocks4aproxy.c b/gio/gsocks4aproxy.c +index 3dad118eb78..e4a1306e689 100644 +--- a/gio/gsocks4aproxy.c ++++ b/gio/gsocks4aproxy.c +@@ -50,7 +50,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, +@@ -451,7 +452,8 @@ g_socks4a_proxy_class_init (GSocks4aProxyClass *class) + } + + 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; +diff --git a/gio/gsocks5proxy.c b/gio/gsocks5proxy.c +index 71ac107dafb..73640c4b71f 100644 +--- a/gio/gsocks5proxy.c ++++ b/gio/gsocks5proxy.c +@@ -82,7 +82,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, +@@ -1101,7 +1102,8 @@ g_socks5_proxy_class_init (GSocks5ProxyClass *class) + } + + 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; +diff --git a/gio/gsubprocess.c b/gio/gsubprocess.c +index 8a6bd06b14c..5ef4a269624 100644 +--- a/gio/gsubprocess.c ++++ b/gio/gsubprocess.c +@@ -149,7 +149,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; + +@@ -495,7 +496,8 @@ g_subprocess_init (GSubprocess *self) + } + + static void +-initable_iface_init (GInitableIface *initable_iface) ++initable_iface_init (GInitableIface *initable_iface, ++ gpointer iface_data) + { + initable_iface->init = initable_init; + } +diff --git a/gio/gtask.c b/gio/gtask.c +index e6815e2d05d..f2633a54a9d 100644 +--- a/gio/gtask.c ++++ b/gio/gtask.c +@@ -623,7 +623,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, +@@ -2503,7 +2504,8 @@ g_task_is_tagged (GAsyncResult *res, + } + + 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; +diff --git a/gio/gthemedicon.c b/gio/gthemedicon.c +index 1d6aacdf198..1efc5123ca4 100644 +--- a/gio/gthemedicon.c ++++ b/gio/gthemedicon.c +@@ -44,7 +44,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 + { +@@ -613,7 +614,8 @@ g_themed_icon_serialize (GIcon *icon) + } + + 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; +diff --git a/gio/gunixinputstream.c b/gio/gunixinputstream.c +index 210decd67f1..13560798316 100644 +--- a/gio/gunixinputstream.c ++++ b/gio/gunixinputstream.c +@@ -64,8 +64,10 @@ struct _GUnixInputStreamPrivate { + guint can_poll : 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) +@@ -152,7 +154,8 @@ g_unix_input_stream_class_init (GUnixInputStreamClass *klass) + } + + 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; +@@ -160,7 +163,8 @@ g_unix_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface) + } + + 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; + } +diff --git a/gio/gunixmount.c b/gio/gunixmount.c +index ec6c57353b7..a4764389227 100644 +--- a/gio/gunixmount.c ++++ b/gio/gunixmount.c +@@ -63,7 +63,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, +@@ -379,7 +380,8 @@ g_unix_mount_eject_finish (GMount *mount, + } + + 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; +diff --git a/gio/gunixoutputstream.c b/gio/gunixoutputstream.c +index 96d9e952ee8..63fc280f02c 100644 +--- a/gio/gunixoutputstream.c ++++ b/gio/gunixoutputstream.c +@@ -66,8 +66,10 @@ struct _GUnixOutputStreamPrivate { + guint can_poll : 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) +@@ -151,7 +153,8 @@ g_unix_output_stream_class_init (GUnixOutputStreamClass *klass) + } + + 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; +@@ -160,7 +163,8 @@ g_unix_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface) + } + + 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; + } +diff --git a/gio/gunixsocketaddress.c b/gio/gunixsocketaddress.c +index 3d1a26e1e08..c2c3d85616c 100644 +--- a/gio/gunixsocketaddress.c ++++ b/gio/gunixsocketaddress.c +@@ -80,7 +80,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, +@@ -329,7 +330,8 @@ g_unix_socket_address_class_init (GUnixSocketAddressClass *klass) + } + + 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); + +diff --git a/gio/gunixvolume.c b/gio/gunixvolume.c +index 67374570b7c..0862c3c3b95 100644 +--- a/gio/gunixvolume.c ++++ b/gio/gunixvolume.c +@@ -61,7 +61,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, +@@ -421,7 +422,8 @@ g_unix_volume_enumerate_identifiers (GVolume *volume) + } + + 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; +diff --git a/gio/gwin32appinfo.c b/gio/gwin32appinfo.c +index f177878466a..c30e1942d42 100644 +--- a/gio/gwin32appinfo.c ++++ b/gio/gwin32appinfo.c +@@ -4059,7 +4059,8 @@ gio_win32_appinfo_init (gboolean do_wait) + } + + +-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 + { +@@ -5724,7 +5725,8 @@ g_app_info_create_from_commandline (const char *commandline, + /* 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; +diff --git a/gio/gwin32mount.c b/gio/gwin32mount.c +index 98560259b77..9a495d2c3e1 100644 +--- a/gio/gwin32mount.c ++++ b/gio/gwin32mount.c +@@ -97,7 +97,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, +@@ -525,7 +526,8 @@ g_win32_mount_eject_finish (GMount *mount, + } + + 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; +diff --git a/gio/gwin32networkmonitor.c b/gio/gwin32networkmonitor.c +index e219225f0bd..836cfee06a6 100644 +--- a/gio/gwin32networkmonitor.c ++++ b/gio/gwin32networkmonitor.c +@@ -46,8 +46,10 @@ + #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 + { +@@ -328,12 +330,14 @@ g_win32_network_monitor_class_init (GWin32NetworkMonitorClass *win_class) + } + + 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); + +diff --git a/gio/gwin32registrykey.c b/gio/gwin32registrykey.c +index bd83b38b5ec..bcc19cd7b84 100644 +--- a/gio/gwin32registrykey.c ++++ b/gio/gwin32registrykey.c +@@ -432,7 +432,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); +@@ -539,7 +540,8 @@ g_win32_registry_key_new_w (const gunichar2 *path, + } + + 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; + } +diff --git a/gio/gzlibcompressor.c b/gio/gzlibcompressor.c +index 00bde8fe2f8..99e1c712527 100644 +--- a/gio/gzlibcompressor.c ++++ b/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); + + struct _GZlibCompressor + { +@@ -434,7 +435,8 @@ g_zlib_compressor_convert (GConverter *converter, + } + + 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; +diff --git a/gio/gzlibdecompressor.c b/gio/gzlibdecompressor.c +index dbe126d3c67..0b114ec6ebc 100644 +--- a/gio/gzlibdecompressor.c ++++ b/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; +@@ -407,7 +408,8 @@ g_zlib_decompressor_convert (GConverter *converter, + } + + 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; +diff --git a/gio/win32/gwinhttpfile.c b/gio/win32/gwinhttpfile.c +index 605c28460c8..e0769cdaacb 100644 +--- a/gio/win32/gwinhttpfile.c ++++ b/gio/win32/gwinhttpfile.c +@@ -37,7 +37,8 @@ + + #include "glibintl.h" + +-static void g_winhttp_file_file_iface_init (GFileIface *iface); ++static void g_winhttp_file_file_iface_init (GFileIface *iface, ++ gpointer iface_data); + + #define g_winhttp_file_get_type _g_winhttp_file_get_type + G_DEFINE_TYPE_WITH_CODE (GWinHttpFile, g_winhttp_file, G_TYPE_OBJECT, +@@ -769,7 +770,8 @@ g_winhttp_file_move (GFile *source, + #endif + + static void +-g_winhttp_file_file_iface_init (GFileIface *iface) ++g_winhttp_file_file_iface_init (GFileIface *iface, ++ gpointer iface_data) + { + iface->dup = g_winhttp_file_dup; + iface->hash = g_winhttp_file_hash; +diff --git a/gobject/gobject.c b/gobject/gobject.c +index 7ec5902b6e4..c54c59defda 100644 +--- a/gobject/gobject.c ++++ b/gobject/gobject.c +@@ -170,7 +170,8 @@ G_STATIC_ASSERT(G_STRUCT_OFFSET(GObject, qdata) == G_STRUCT_OFFSET(GObjectReal, + /* --- 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, +@@ -970,7 +971,8 @@ g_object_base_class_finalize (GObjectClass *class) + } + + static void +-g_object_do_class_init (GObjectClass *class) ++g_object_do_class_init (GObjectClass *class, ++ gpointer class_data) + { + quark_closure_array = g_quark_from_static_string ("GObject-closure-array"); + quark_weak_notifies = g_quark_from_static_string ("GObject-weak-notifies"); +diff --git a/gobject/gparam.h b/gobject/gparam.h +index 89374fec0c3..5f1329567ac 100644 +--- a/gobject/gparam.h ++++ b/gobject/gparam.h +@@ -389,7 +389,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 */ +diff --git a/gobject/gparamspecs.c b/gobject/gparamspecs.c +index cf50df74fb5..fa0cc0dd2b2 100644 +--- a/gobject/gparamspecs.c ++++ b/gobject/gparamspecs.c +@@ -43,7 +43,8 @@ + + /* --- 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); + +@@ -82,7 +83,8 @@ param_char_validate (GParamSpec *pspec, + } + + static void +-param_uchar_init (GParamSpec *pspec) ++param_uchar_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecUChar *uspec = G_PARAM_SPEC_UCHAR (pspec); + +@@ -148,7 +150,8 @@ param_boolean_validate (GParamSpec *pspec, + } + + static void +-param_int_init (GParamSpec *pspec) ++param_int_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecInt *ispec = G_PARAM_SPEC_INT (pspec); + +@@ -198,7 +201,8 @@ param_int_values_cmp (GParamSpec *pspec, + } + + static void +-param_uint_init (GParamSpec *pspec) ++param_uint_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecUInt *uspec = G_PARAM_SPEC_UINT (pspec); + +@@ -248,7 +252,8 @@ param_uint_values_cmp (GParamSpec *pspec, + } + + static void +-param_long_init (GParamSpec *pspec) ++param_long_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecLong *lspec = G_PARAM_SPEC_LONG (pspec); + +@@ -303,7 +308,8 @@ param_long_values_cmp (GParamSpec *pspec, + } + + static void +-param_ulong_init (GParamSpec *pspec) ++param_ulong_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecULong *uspec = G_PARAM_SPEC_ULONG (pspec); + +@@ -357,7 +363,8 @@ param_ulong_values_cmp (GParamSpec *pspec, + } + + static void +-param_int64_init (GParamSpec *pspec) ++param_int64_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecInt64 *lspec = G_PARAM_SPEC_INT64 (pspec); + +@@ -407,7 +414,8 @@ param_int64_values_cmp (GParamSpec *pspec, + } + + static void +-param_uint64_init (GParamSpec *pspec) ++param_uint64_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecUInt64 *uspec = G_PARAM_SPEC_UINT64 (pspec); + +@@ -457,7 +465,8 @@ param_uint64_values_cmp (GParamSpec *pspec, + } + + static void +-param_unichar_init (GParamSpec *pspec) ++param_unichar_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecUnichar *uspec = G_PARAM_SPEC_UNICHAR (pspec); + +@@ -506,7 +515,8 @@ param_unichar_values_cmp (GParamSpec *pspec, + } + + static void +-param_enum_init (GParamSpec *pspec) ++param_enum_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecEnum *espec = G_PARAM_SPEC_ENUM (pspec); + +@@ -561,7 +571,8 @@ param_enum_validate (GParamSpec *pspec, + } + + static void +-param_flags_init (GParamSpec *pspec) ++param_flags_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecFlags *fspec = G_PARAM_SPEC_FLAGS (pspec); + +@@ -616,7 +627,8 @@ param_flags_validate (GParamSpec *pspec, + } + + static void +-param_float_init (GParamSpec *pspec) ++param_float_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecFloat *fspec = G_PARAM_SPEC_FLOAT (pspec); + +@@ -669,7 +681,8 @@ param_float_values_cmp (GParamSpec *pspec, + } + + static void +-param_double_init (GParamSpec *pspec) ++param_double_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecDouble *dspec = G_PARAM_SPEC_DOUBLE (pspec); + +@@ -722,7 +735,8 @@ param_double_values_cmp (GParamSpec *pspec, + } + + static void +-param_string_init (GParamSpec *pspec) ++param_string_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecString *sspec = G_PARAM_SPEC_STRING (pspec); + +@@ -853,7 +867,8 @@ param_string_values_cmp (GParamSpec *pspec, + } + + static void +-param_param_init (GParamSpec *pspec) ++param_param_init (GParamSpec *pspec, ++ gpointer class_data) + { + /* GParamSpecParam *spec = G_PARAM_SPEC_PARAM (pspec); */ + } +@@ -896,7 +911,8 @@ param_param_validate (GParamSpec *pspec, + } + + static void +-param_boxed_init (GParamSpec *pspec) ++param_boxed_init (GParamSpec *pspec, ++ gpointer class_data) + { + /* GParamSpecBoxed *bspec = G_PARAM_SPEC_BOXED (pspec); */ + } +@@ -922,7 +938,8 @@ param_boxed_values_cmp (GParamSpec *pspec, + } + + static void +-param_pointer_init (GParamSpec *pspec) ++param_pointer_init (GParamSpec *pspec, ++ gpointer class_data) + { + /* GParamSpecPointer *spec = G_PARAM_SPEC_POINTER (pspec); */ + } +@@ -948,7 +965,8 @@ param_pointer_values_cmp (GParamSpec *pspec, + } + + 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); + +@@ -1099,7 +1117,8 @@ param_value_array_values_cmp (GParamSpec *pspec, + } + + static void +-param_object_init (GParamSpec *pspec) ++param_object_init (GParamSpec *pspec, ++ gpointer class_data) + { + /* GParamSpecObject *ospec = G_PARAM_SPEC_OBJECT (pspec); */ + } +@@ -1154,7 +1173,8 @@ param_object_values_cmp (GParamSpec *pspec, + } + + static void +-param_override_init (GParamSpec *pspec) ++param_override_init (GParamSpec *pspec, ++ gpointer class_data) + { + /* GParamSpecOverride *ospec = G_PARAM_SPEC_OVERRIDE (pspec); */ + } +@@ -1212,7 +1232,8 @@ param_override_values_cmp (GParamSpec *pspec, + } + + static void +-param_gtype_init (GParamSpec *pspec) ++param_gtype_init (GParamSpec *pspec, ++ gpointer class_data) + { + } + +@@ -1267,7 +1288,8 @@ param_gtype_values_cmp (GParamSpec *pspec, + } + + static void +-param_variant_init (GParamSpec *pspec) ++param_variant_init (GParamSpec *pspec, ++ gpointer class_data) + { + GParamSpecVariant *vspec = G_PARAM_SPEC_VARIANT (pspec); + +diff --git a/gobject/gtype.h b/gobject/gtype.h +index a16da459325..6158dff51d4 100644 +--- a/gobject/gtype.h ++++ b/gobject/gtype.h +@@ -2108,7 +2108,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); \ + } +@@ -2250,7 +2250,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) \ +@@ -2260,7 +2261,8 @@ static void type_name##_class_intern_init (gpointer klass) \ + + #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); \ +@@ -2282,6 +2284,11 @@ static void type_name##_class_intern_init (gpointer klass) \ + \ + 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 GType type_name##_get_type_once (void); \ + static gpointer type_name##_parent_class = NULL; \ + static gint TypeName##_private_offset; \ +@@ -2319,9 +2326,9 @@ type_name##_get_type_once (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() \ +@@ -2341,7 +2348,12 @@ type_name##_get_type_once (void) \ + * to avoid deprecation warnings with older GLIB_VERSION_MAX_ALLOWED */ + #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) \ +@@ -2353,7 +2365,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); \ +diff --git a/gobject/gtypemodule.c b/gobject/gtypemodule.c +index b7f61c67470..3b95ddfc32d 100644 +--- a/gobject/gtypemodule.c ++++ b/gobject/gtypemodule.c +@@ -134,7 +134,8 @@ g_type_module_class_init (GTypeModuleClass *class) + } + + 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/gobject/gtypemodule.h b/gobject/gtypemodule.h +index fba714bc28c..f4ef0847802 100644 +--- a/gobject/gtypemodule.h ++++ b/gobject/gtypemodule.h +@@ -202,12 +202,12 @@ type_name##_register_type (GTypeModule *type_module) \ + sizeof (TypeName##Class), \ + (GBaseInitFunc) NULL, \ + (GBaseFinalizeFunc) NULL, \ +- (GClassInitFunc)(void (*)(void)) type_name##_class_intern_init, \ +- (GClassFinalizeFunc)(void (*)(void)) type_name##_class_finalize, \ ++ (GClassInitFunc) type_name##_class_intern_init, \ ++ (GClassFinalizeFunc) type_name##_class_finalize, \ + NULL, /* class_data */ \ + sizeof (TypeName), \ + 0, /* n_preallocs */ \ +- (GInstanceInitFunc)(void (*)(void)) type_name##_init, \ ++ (GInstanceInitFunc) type_name##_init_adapter, \ + NULL /* value_table */ \ + }; \ + type_name##_type_id = g_type_module_register_type (type_module, \ +@@ -237,7 +237,7 @@ type_name##_register_type (GTypeModule *type_module) \ + */ + #define G_IMPLEMENT_INTERFACE_DYNAMIC(TYPE_IFACE, iface_init) { \ + const GInterfaceInfo g_implement_interface_info = { \ +- (GInterfaceInitFunc)(void (*)(void)) iface_init, NULL, NULL \ ++ (GInterfaceInitFunc) iface_init, NULL, NULL \ + }; \ + g_type_module_add_interface (type_module, g_define_type_id, TYPE_IFACE, &g_implement_interface_info); \ + } diff --git a/recipes/recipes_emscripten/glib/recipe.yaml b/recipes/recipes_emscripten/glib/recipe.yaml index 6f31b01d0..427b55757 100644 --- a/recipes/recipes_emscripten/glib/recipe.yaml +++ b/recipes/recipes_emscripten/glib/recipe.yaml @@ -1,6 +1,6 @@ context: - version: "2.56.4" - major_minor: "2.56" + version: "2.80.0" + major_minor: "2.80" package: name: glib @@ -8,15 +8,10 @@ package: source: url: https://download.gnome.org/sources/glib/${{ major_minor }}/glib-${{ version }}.tar.xz - sha256: 27f703d125efb07f8a743666b580df0b4095c59fc8750e8890132c91d437504c + sha256: 8228a92f92a412160b139ae68b6345bd28f24434a7b5af150ebe21ff587a561d + # Patch from https://gist.github.com/kleisauke/acfa1c09522705efa5eb0541d2d00887 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 + - patches/glib.patch build: number: 0 @@ -26,11 +21,26 @@ requirements: - pkg-config - ${{ compiler('c') }} - ${{ compiler('cxx') }} - - gettext - - make + - meson + - packaging host: - zlib - libffi + - pcre2>=10.43 + +tests: +- package_contents: + include: + - glib-2.0/glib.h + - glib-2.0/gio/gio.h + - glib-2.0/gobject/gobject.h + - glib-2.0/gmodule.h + lib: + - libglib-2.0.a + - libgio-2.0.a + - libgobject-2.0.a + - libgmodule-2.0.a + - libgthread-2.0.a about: homepage: https://developer.gnome.org/glib/ From cf94831a20883098c01871826b788795055b2daf Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Wed, 3 Jul 2024 10:51:47 +0200 Subject: [PATCH 125/333] Update fontconfig from 2.12.6 to 2.14.0 (#1166) * Update recipe Working Clean up Update tests Fix formatting Working v2.14.0 * Fix formatting --- .../recipes_emscripten/fontconfig/build.sh | 37 +++++++----------- .../fontconfig/emscripten.meson.cross | 14 +++++++ .../patches/emscripten_preprocess.patch | 13 +++++++ .../patches/fix-double-sysroot.diff | 14 ------- .../patches/syscache-always-valid.diff | 13 ------- .../recipes_emscripten/fontconfig/recipe.yaml | 39 +++++++------------ 6 files changed, 55 insertions(+), 75 deletions(-) create mode 100644 recipes/recipes_emscripten/fontconfig/emscripten.meson.cross create mode 100644 recipes/recipes_emscripten/fontconfig/patches/emscripten_preprocess.patch delete mode 100644 recipes/recipes_emscripten/fontconfig/patches/fix-double-sysroot.diff delete mode 100644 recipes/recipes_emscripten/fontconfig/patches/syscache-always-valid.diff diff --git a/recipes/recipes_emscripten/fontconfig/build.sh b/recipes/recipes_emscripten/fontconfig/build.sh index 7dc3b4246..077dfc17d 100644 --- a/recipes/recipes_emscripten/fontconfig/build.sh +++ b/recipes/recipes_emscripten/fontconfig/build.sh @@ -1,27 +1,16 @@ -export LDFLAGS="${LDFLAGS} -sUSE_FREETYPE=1 -sUSE_PTHREADS=0" -export PTHREAD_CFLAGS=" " +#!/bin/bash -# delete this file (is excluded in webr) -rm ./src/fcobjshash.h +meson_setup_args=( + -Dtests=disabled + -Ddefault_library=static + -Dtools=disabled +) -mkdir build && cd build +meson setup builddir \ + ${meson_setup_args[@]} \ + --prefix=$PREFIX \ + --buildtype=release \ + --prefer-static \ + --cross-file=$RECIPE_DIR/emscripten.meson.cross -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 - -# 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/ +meson install -C builddir diff --git a/recipes/recipes_emscripten/fontconfig/emscripten.meson.cross b/recipes/recipes_emscripten/fontconfig/emscripten.meson.cross new file mode 100644 index 000000000..48763013f --- /dev/null +++ b/recipes/recipes_emscripten/fontconfig/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/fontconfig/patches/emscripten_preprocess.patch b/recipes/recipes_emscripten/fontconfig/patches/emscripten_preprocess.patch new file mode 100644 index 000000000..aaddd9ff6 --- /dev/null +++ b/recipes/recipes_emscripten/fontconfig/patches/emscripten_preprocess.patch @@ -0,0 +1,13 @@ +diff --git a/src/meson.build b/src/meson.build +index 9a6ba20..713fa96 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -37,6 +37,8 @@ elif cc.get_id() == 'msvc' + cpp += ['/EP'] + elif cc.get_id() == 'clang' + cpp += ['-E', '-P'] ++elif cc.get_id() == 'emscripten' ++ cpp += ['-E', '-P'] + else + error('FIXME: implement cc.preprocess') + endif diff --git a/recipes/recipes_emscripten/fontconfig/patches/fix-double-sysroot.diff b/recipes/recipes_emscripten/fontconfig/patches/fix-double-sysroot.diff deleted file mode 100644 index 348ae30c2..000000000 --- a/recipes/recipes_emscripten/fontconfig/patches/fix-double-sysroot.diff +++ /dev/null @@ -1,14 +0,0 @@ -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 - 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 deleted file mode 100644 index 15645e41b..000000000 --- a/recipes/recipes_emscripten/fontconfig/patches/syscache-always-valid.diff +++ /dev/null @@ -1,13 +0,0 @@ -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 index 8678f06d9..84824a609 100644 --- a/recipes/recipes_emscripten/fontconfig/recipe.yaml +++ b/recipes/recipes_emscripten/fontconfig/recipe.yaml @@ -1,6 +1,6 @@ context: - name: "fontconfig" - version: 2.12.6 + name: fontconfig + version: 2.14.0 package: name: ${{ name }} @@ -8,10 +8,9 @@ package: source: url: http://www.freedesktop.org/software/${{ name }}/release/${{ name }}-${{ version }}.tar.gz - sha256: 064b9ebf060c9e77011733ac9dc0e2ce92870b574cca2405e11f5353a683c334 + sha256: b8f607d556e8257da2f3616b4d704be30fd73bd71e367355ca78963f9a7f0434 patches: - - patches/syscache-always-valid.diff - - patches/fix-double-sysroot.diff + - patches/emscripten_preprocess.patch build: number: 0 @@ -21,30 +20,18 @@ requirements: - ${{ compiler('c') }} - pkg-config - gperf + - meson host: - 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 +- package_contents: + lib: + - libfontconfig.a + include: + - fontconfig/fontconfig.h + - fontconfig/fcfreetype.h about: homepage: http://www.freedesktop.org/wiki/Software/fontconfig/ @@ -56,3 +43,7 @@ about: customization and application access. documentation: https://www.freedesktop.org/software/fontconfig/fontconfig-user.html repository: https://cgit.freedesktop.org/fontconfig/ + +extra: + recipe-maintainers: + - IsabelParedes \ No newline at end of file From 3686f28cb2a2522d8e90fd5eb17f428ee13c6f81 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Wed, 3 Jul 2024 10:52:28 +0200 Subject: [PATCH 126/333] Update awkward-cpp from 30 to 31 (#967) Co-authored-by: emscripten-forge-bot Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/awkward-cpp/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/awkward-cpp/recipe.yaml b/recipes/recipes_emscripten/awkward-cpp/recipe.yaml index 123d951a2..8e431d9f0 100644 --- a/recipes/recipes_emscripten/awkward-cpp/recipe.yaml +++ b/recipes/recipes_emscripten/awkward-cpp/recipe.yaml @@ -1,6 +1,6 @@ context: name: awkward-cpp - version: '30' + version: '31' package: name: ${{ name|lower }} @@ -9,7 +9,7 @@ package: source: url: https://pypi.io/packages/source/${{ name[0] }}/${{ name }}/awkward-cpp-${{ version }}.tar.gz - sha256: 5be94ca7351d8e421cb9478a9b71016fa7673621fa122d477d0b07bb68aa7d4c + sha256: 7d183acdb2d33be0102b1d2af33651fa28a4e670b671e9bd09544eea53004efe build: number: 0 From 1d9f86c2170256939d7bc7dea6cdd3f539fc8f40 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Tue, 9 Jul 2024 11:04:23 +0200 Subject: [PATCH 127/333] libtiff rebuild (-fpic) + shared proj + pyproj (#1170) * add build and recipe * change pinned version * Update recipe.yaml * Update build.sh * current status * more changes * more changes * rebuild libtiff with fpic * proper so * remove proj from builds deps * set PROJ_DIR env variable * bazinga * try static again * add wrapper for wasm-ld * change wasm-ld to emcc * fix bug * call wrapper.. * linking * fixed path * fixed path * fixed path * attempt 2 * usin python script * v2 * v3 * actualy include error code... * fixed typo * add python test * added missing file * try shared again * cleanup * bump bld. number --------- Co-authored-by: KGB99 --- conda_build_config.yaml | 2 +- recipes/recipes_emscripten/libtiff/build.sh | 3 +- .../recipes_emscripten/libtiff/recipe.yaml | 2 +- recipes/recipes_emscripten/proj/build.sh | 14 ++--- .../proj/overwriteProp.cmake | 4 ++ recipes/recipes_emscripten/proj/recipe.yaml | 5 +- recipes/recipes_emscripten/pyproj/build.sh | 20 +++++++ .../recipes_emscripten/pyproj/emcc_wrapper.sh | 5 ++ .../pyproj/py_emcc_wrapper.py | 18 +++++++ recipes/recipes_emscripten/pyproj/recipe.yaml | 54 +++++++++++++++++++ .../recipes_emscripten/pyproj/test_pyproj.py | 4 ++ 11 files changed, 118 insertions(+), 13 deletions(-) create mode 100644 recipes/recipes_emscripten/proj/overwriteProp.cmake create mode 100644 recipes/recipes_emscripten/pyproj/build.sh create mode 100755 recipes/recipes_emscripten/pyproj/emcc_wrapper.sh create mode 100644 recipes/recipes_emscripten/pyproj/py_emcc_wrapper.py create mode 100644 recipes/recipes_emscripten/pyproj/recipe.yaml create mode 100644 recipes/recipes_emscripten/pyproj/test_pyproj.py diff --git a/conda_build_config.yaml b/conda_build_config.yaml index ea2ce3fa1..44329efad 100644 --- a/conda_build_config.yaml +++ b/conda_build_config.yaml @@ -567,7 +567,7 @@ poco: poppler: - '22.01' proj: - - 8.2.0 + - 9.4.1 pybind11_abi: - 4 diff --git a/recipes/recipes_emscripten/libtiff/build.sh b/recipes/recipes_emscripten/libtiff/build.sh index aaf1647f4..925938bda 100644 --- a/recipes/recipes_emscripten/libtiff/build.sh +++ b/recipes/recipes_emscripten/libtiff/build.sh @@ -7,7 +7,8 @@ emcmake cmake .. -GNinja \ -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_PREFIX_PATH=$PREFIX \ -DCMAKE_INSTALL_LIBDIR=lib \ - -DBUILD_SHARED_LIBS=OFF + -DBUILD_SHARED_LIBS=OFF \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON ninja ninja install diff --git a/recipes/recipes_emscripten/libtiff/recipe.yaml b/recipes/recipes_emscripten/libtiff/recipe.yaml index dcc22fc28..d751097cc 100644 --- a/recipes/recipes_emscripten/libtiff/recipe.yaml +++ b/recipes/recipes_emscripten/libtiff/recipe.yaml @@ -10,7 +10,7 @@ source: sha256: c7a1d9296649233979fa3eacffef3fa024d73d05d589cb622727b5b08c423464 build: - number: 0 + number: 1 # Does a very good job of maintaining compatibility. # https://abi-laboratory.pro/tracker/timeline/libtiff/ # run_exports: diff --git a/recipes/recipes_emscripten/proj/build.sh b/recipes/recipes_emscripten/proj/build.sh index 4ea063ded..9e39374a9 100644 --- a/recipes/recipes_emscripten/proj/build.sh +++ b/recipes/recipes_emscripten/proj/build.sh @@ -4,20 +4,22 @@ mkdir -p build cd build -export LIBS=${BUILD_PREFIX}/include + # to build without curl we need to disable projsync too emcmake cmake ${CMAKE_ARGS} .. \ -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=OFF \ + -DBUILD_SHARED_LIBS=ON \ -DBUILD_APPS=OFF \ -DBUILD_TESTING=OFF \ -DENABLE_CURL=OFF \ -DBUILD_PROJSYNC=OFF \ - -DSQLite3_INCLUDE_DIR=${LIBS} \ - -DSQLite3_LIBRARY=${LIBS} \ - -DTIFF_INCLUDE_DIR=${LIBS} \ - -DTIFF_LIBRARY=${LIBS} \ + -DSQLite3_INCLUDE_DIR=$PREFIX/include \ + -DSQLite3_LIBRARY=$PREFIX/lib/libsqlite3.a \ + -DTIFF_INCLUDE_DIR=$PREFIX/include \ + -DTIFF_LIBRARY=$PREFIX/lib/libtiff.a \ + -DCMAKE_PROJECT_INCLUDE=${RECIPE_DIR}/overwriteProp.cmake \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON emmake make -j${CPU_COUNT} #${VERBOSE_CM} diff --git a/recipes/recipes_emscripten/proj/overwriteProp.cmake b/recipes/recipes_emscripten/proj/overwriteProp.cmake new file mode 100644 index 000000000..f2e14b337 --- /dev/null +++ b/recipes/recipes_emscripten/proj/overwriteProp.cmake @@ -0,0 +1,4 @@ +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 diff --git a/recipes/recipes_emscripten/proj/recipe.yaml b/recipes/recipes_emscripten/proj/recipe.yaml index b777032c0..416069f9d 100644 --- a/recipes/recipes_emscripten/proj/recipe.yaml +++ b/recipes/recipes_emscripten/proj/recipe.yaml @@ -11,7 +11,7 @@ source: sha256: ffe20170ee2b952207adf8a195e2141eab12cda181e49fdeb54425d98c7171d7 build: - number: 0 + number: 1 requirements: build: @@ -19,8 +19,6 @@ requirements: - make - ${{ compiler('c') }} - ${{ compiler('cxx') }} - - sqlitecpp - - libtiff - requests host: - sqlitecpp @@ -32,7 +30,6 @@ requirements: tests: - script: - test -f ${PREFIX}/include/proj.h - - test -f ${PREFIX}/lib/libproj.a about: homepage: https://proj.org/ diff --git a/recipes/recipes_emscripten/pyproj/build.sh b/recipes/recipes_emscripten/pyproj/build.sh new file mode 100644 index 000000000..6bb139aae --- /dev/null +++ b/recipes/recipes_emscripten/pyproj/build.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# remove the emcc symlink in the $BUILD_PREFIX/bin +rm $BUILD_PREFIX/bin/emcc + +# make callable +chmod +x $RECIPE_DIR/emcc_wrapper.sh + +# create symlink to $RECIPE_DIR/emcc_wrapper.sh +ln -s $RECIPE_DIR/emcc_wrapper.sh $BUILD_PREFIX/bin/emcc + + +export PROJ_DIR=$PREFIX + +# if version is not set, the python build script +# tries to call the proj binary to get the version +export PROJ_VERSION="9.4.1" + +${PYTHON} -m pip install -vv . + diff --git a/recipes/recipes_emscripten/pyproj/emcc_wrapper.sh b/recipes/recipes_emscripten/pyproj/emcc_wrapper.sh new file mode 100755 index 000000000..7d1f67a55 --- /dev/null +++ b/recipes/recipes_emscripten/pyproj/emcc_wrapper.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +$BUILD_PREFIX/bin/python3 $RECIPE_DIR/py_emcc_wrapper.py $BUILD_PREFIX/opt/emsdk/upstream/emscripten/emcc "$@" +exit $? \ No newline at end of file diff --git a/recipes/recipes_emscripten/pyproj/py_emcc_wrapper.py b/recipes/recipes_emscripten/pyproj/py_emcc_wrapper.py new file mode 100644 index 000000000..2a84520fd --- /dev/null +++ b/recipes/recipes_emscripten/pyproj/py_emcc_wrapper.py @@ -0,0 +1,18 @@ +import sys +import subprocess +if __name__ == '__main__': + + args = sys.argv[2:] + + filtered_args = [] + for arg in args: + if ("-Wl,-R$PREFIX/lib" in arg )or ("-R" in arg): + print("removed arg:", arg) + else: + filtered_args.append(arg) + + # run the actual command in argv[1] + subprocess.run([sys.argv[1]] + filtered_args, check=True) + + + diff --git a/recipes/recipes_emscripten/pyproj/recipe.yaml b/recipes/recipes_emscripten/pyproj/recipe.yaml new file mode 100644 index 000000000..03e341bbc --- /dev/null +++ b/recipes/recipes_emscripten/pyproj/recipe.yaml @@ -0,0 +1,54 @@ +context: + name: pyproj + version: 3.6.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://pypi.io/packages/source/p/pyproj/pyproj-${{ version }}.tar.gz + sha256: 44aa7c704c2b7d8fb3d483bbf75af6cb2350d30a63b144279a09b75fead501bf + +build: + number: 0 + +requirements: + build: + - python + - cross-python_${{ target_platform }} + - cython + - ${{ compiler('c') }} + host: + - python + - pip + - proj + run: + - python + - proj + - certifi + +tests: + - script: pytester + requirements: + build: + - pytester + run: + - pytester-run + files: + recipe: + - test_pyproj.py + + +about: + homepage: https://github.com/pyproj4/pyproj + license: MIT + license_file: + - LICENSE + - LICENSE_proj + summary: Python interface to PROJ library + +extra: + recipe-maintainers: + - KGB99 + - DerThorsten diff --git a/recipes/recipes_emscripten/pyproj/test_pyproj.py b/recipes/recipes_emscripten/pyproj/test_pyproj.py new file mode 100644 index 000000000..6e80ebef7 --- /dev/null +++ b/recipes/recipes_emscripten/pyproj/test_pyproj.py @@ -0,0 +1,4 @@ + + +def test_import(): + from pyproj import Proj, transform From 942ea8f0fcdb2700f5c40da0cf15e45718d3dac2 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Tue, 9 Jul 2024 14:35:05 +0530 Subject: [PATCH 128/333] Add recipe for lpython (#1147) --- recipes/recipes_emscripten/lpython/build.sh | 3 ++ .../patches/remove-static-assert.patch | 15 ------ .../recipes_emscripten/lpython/recipe.yaml | 52 +++++++++++++++++++ 3 files changed, 55 insertions(+), 15 deletions(-) delete mode 100644 recipes/recipes_emscripten/lpython/patches/remove-static-assert.patch create mode 100644 recipes/recipes_emscripten/lpython/recipe.yaml diff --git a/recipes/recipes_emscripten/lpython/build.sh b/recipes/recipes_emscripten/lpython/build.sh index dafdece1e..10a38dc43 100644 --- a/recipes/recipes_emscripten/lpython/build.sh +++ b/recipes/recipes_emscripten/lpython/build.sh @@ -26,3 +26,6 @@ emmake make -j${CPU_COUNT} # Install step emmake make install +# Copy tests +cp src/lpython/tests/test_lpython.js $PREFIX/bin/test_lpython.js +cp src/lpython/tests/test_lpython.wasm $PREFIX/bin/test_lpython.wasm diff --git a/recipes/recipes_emscripten/lpython/patches/remove-static-assert.patch b/recipes/recipes_emscripten/lpython/patches/remove-static-assert.patch deleted file mode 100644 index f49c0b334..000000000 --- a/recipes/recipes_emscripten/lpython/patches/remove-static-assert.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/src/lpython/parser/parser_stype.h b/src/lpython/parser/parser_stype.h -index e24f07344..8bd733379 100644 ---- a/src/lpython/parser/parser_stype.h -+++ b/src/lpython/parser/parser_stype.h -@@ -113,8 +113,8 @@ static_assert(std::is_trivial::value); - // YYSTYPE must be at least as big, but it should not be bigger, otherwise it - // would reduce performance. - // A temporary fix for PowerPC 32-bit, where the following assert fails with (16 == 12). --#ifndef __ppc__ --static_assert(sizeof(YYSTYPE) == sizeof(Vec)); -+#if !defined(HAVE_BUILD_TO_WASM) && !defined(__ppc__) -+static_assert(sizeof(YYSTYPE) == sizeof(Vec)); - #endif - - static_assert(std::is_standard_layout::value); \ No newline at end of file diff --git a/recipes/recipes_emscripten/lpython/recipe.yaml b/recipes/recipes_emscripten/lpython/recipe.yaml new file mode 100644 index 000000000..b3a5372de --- /dev/null +++ b/recipes/recipes_emscripten/lpython/recipe.yaml @@ -0,0 +1,52 @@ +context: + name: lpython + version: 0.22.0 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://github.com/lcompilers/lpython/releases/download/v${{ version }}/${{ + name }}-${{ version }}.tar.gz + sha256: 9dcfe113cd95366ca8e6e7f23e13a60b666243f93e44179a641c6c30f8a02afa + +build: + number: 0 + +requirements: + build: + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + - cmake + - make # [unix] + - zlib=1.3.1 + # - xeus =5.1.0 # [build_platform != target_platform] + # - xeus-zmq =3.0.0 # [build_platform != target_platform] + # - llvmdev =16.0.6 # [build_platform != target_platform] + # - nlohmann_json =3.11.3 # [build_platform != target_platform] + # - zlib # [build_platform != target_platform] + # - zstd-static =1.5.5 # [build_platform != target_platform] + host: + - zlib + +tests: +- script: + - node ${PREFIX}/bin/test_lpython.js + requirements: + build: + - nodejs + +about: + homepage: https://lpython.org + license: BSD-3-Clause + license_family: BSD + license_file: LICENSE + summary: Modern interactive LLVM-based Python compiler + repository: https://github.com/lcompilers/lpython.git + +extra: + recipe-maintainers: + - certik + - anutosh491 + - Shaikh-Ubaid From 5b660d8eb645df10557761ae5154dc8678a31cd8 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Tue, 9 Jul 2024 14:35:34 +0530 Subject: [PATCH 129/333] Update lfortran to 0.38.0 (#1173) * Update lfortran to 0.38.0 * fix zlib version --- recipes/recipes_emscripten/lfortran/recipe.yaml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/recipes/recipes_emscripten/lfortran/recipe.yaml b/recipes/recipes_emscripten/lfortran/recipe.yaml index 93a673a62..4a4412c8a 100644 --- a/recipes/recipes_emscripten/lfortran/recipe.yaml +++ b/recipes/recipes_emscripten/lfortran/recipe.yaml @@ -1,6 +1,6 @@ context: name: lfortran - version: 0.36.0 + version: 0.38.0 package: name: ${{ name }} @@ -9,7 +9,7 @@ package: source: url: https://github.com/lfortran/lfortran/releases/download/v${{ version }}/${{ name }}-${{ version }}.tar.gz - sha256: 6b3b7cb1380e96a98a9fd3166a3e7e43c3339f736f76029c246436784ffc868f + sha256: 7d9cf30fc87fe430f0d5e70759d0fa321643e44dff90915a56f8987d0bcbee57 build: number: 0 @@ -20,14 +20,12 @@ requirements: - ${{ compiler('cxx') }} - cmake - make # [unix] - - zlib=1.2.13 + - zlib=1.3.1 - lfortran=${{ version }} - # - xeus =3.0.5 # [build_platform != target_platform] - # - xeus-zmq =1.0.2 # [build_platform != target_platform] + # - xeus =5.1.0 # [build_platform != target_platform] + # - xeus-zmq =3.0.0 # [build_platform != target_platform] # - llvmdev =16.0.6 # [build_platform != target_platform] - # - xtl # [build_platform != target_platform] - # - nlohmann_json =3.11.2 # [build_platform != target_platform] - # - cppzmq # [build_platform != target_platform] + # - nlohmann_json =3.11.3 # [build_platform != target_platform] # - zlib # [build_platform != target_platform] # - zstd-static =1.5.5 # [build_platform != target_platform] host: From 36add8bd70f36b324c074bce2c6392f221bf26da Mon Sep 17 00:00:00 2001 From: KGB99 <80490551+KGB99@users.noreply.github.com> Date: Tue, 9 Jul 2024 10:31:44 +0100 Subject: [PATCH 130/333] Add Cartopy (#1111) * add cartopy recipe and build * cleanup recipe * fix typo * add test * fix style * remove plt.savefig in test * cleanup * trigger ci --- recipes/recipes_emscripten/cartopy/build.sh | 3 + .../recipes_emscripten/cartopy/recipe.yaml | 60 +++++++++++++++++++ .../cartopy/test_cartopy.py | 12 ++++ 3 files changed, 75 insertions(+) create mode 100644 recipes/recipes_emscripten/cartopy/build.sh create mode 100644 recipes/recipes_emscripten/cartopy/recipe.yaml create mode 100644 recipes/recipes_emscripten/cartopy/test_cartopy.py diff --git a/recipes/recipes_emscripten/cartopy/build.sh b/recipes/recipes_emscripten/cartopy/build.sh new file mode 100644 index 000000000..418e18ac3 --- /dev/null +++ b/recipes/recipes_emscripten/cartopy/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +${PYTHON} -m pip install --no-deps . diff --git a/recipes/recipes_emscripten/cartopy/recipe.yaml b/recipes/recipes_emscripten/cartopy/recipe.yaml new file mode 100644 index 000000000..5840a806f --- /dev/null +++ b/recipes/recipes_emscripten/cartopy/recipe.yaml @@ -0,0 +1,60 @@ +context: + name: cartopy + version: 0.23.0 + +package: + name: ${{ name|lower }} + version: ${{ version }} + +source: + url: https://pypi.io/packages/source/${{ name[0] }}/${{ name }}/Cartopy-${{ version }}.tar.gz + sha256: 231f37b35701f2ba31d94959cca75e6da04c2eea3a7f14ce1c75ee3b0eae7676 + +build: + number: 0 + +requirements: + build: + - python + - cross-python_${{ target_platform }} + - cython + - numpy + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + host: + - python + - pip + - setuptools >=40.6.0 + - setuptools-scm >=7.0.0 + - numpy + run: + - python + - matplotlib-base >=3.5 + - shapely >=1.7 + - packaging >=20 + - pyshp >=2.3 + - pyproj >=3.3.1 + +tests: +- script: pytester + files: + recipe: + - test_cartopy.py + requirements: + build: + - pytester + run: + - pytester-run + +about: + homepage: http://scitools.org.uk/cartopy + license: BSD-3-Clause + license_family: BSD + license_file: LICENSE + summary: A library providing cartographic tools for python + repository: https://github.com/SciTools/cartopy + documentation: https://scitools.org.uk/cartopy/docs/latest/ + +extra: + recipe-maintainers: + - KGB99 diff --git a/recipes/recipes_emscripten/cartopy/test_cartopy.py b/recipes/recipes_emscripten/cartopy/test_cartopy.py new file mode 100644 index 000000000..170a670ab --- /dev/null +++ b/recipes/recipes_emscripten/cartopy/test_cartopy.py @@ -0,0 +1,12 @@ +# this test is taken from the conda forge feedstock for cartopy: +# https://github.com/conda-forge/cartopy-feedstock/blob/main/recipe/run_test.py + +def test_cartopy(): + import cartopy.crs as ccrs + + import matplotlib + matplotlib.use('agg') + import matplotlib.pyplot as plt + + ax = plt.axes(projection=ccrs.Robinson()) + ax.coastlines() From ea248d8841e4318b022892e5f9ebc7fc142ae43e Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Wed, 10 Jul 2024 10:39:36 +0200 Subject: [PATCH 131/333] grep (#1175) * wip * skip po * tests * grep * with bootstrap * wget * skip po * lic --- recipes/recipes_emscripten/grep/COPYING | 674 ++++++++++++++++++++ recipes/recipes_emscripten/grep/build.sh | 38 ++ recipes/recipes_emscripten/grep/recipe.yaml | 42 ++ 3 files changed, 754 insertions(+) create mode 100644 recipes/recipes_emscripten/grep/COPYING create mode 100644 recipes/recipes_emscripten/grep/build.sh create mode 100644 recipes/recipes_emscripten/grep/recipe.yaml diff --git a/recipes/recipes_emscripten/grep/COPYING b/recipes/recipes_emscripten/grep/COPYING new file mode 100644 index 000000000..f288702d2 --- /dev/null +++ b/recipes/recipes_emscripten/grep/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/recipes/recipes_emscripten/grep/build.sh b/recipes/recipes_emscripten/grep/build.sh new file mode 100644 index 000000000..e9fd0e319 --- /dev/null +++ b/recipes/recipes_emscripten/grep/build.sh @@ -0,0 +1,38 @@ + +# 1) git clone --depth 1 --branch v3.11 git://git.savannah.gnu.org/grep.git +# 2) cd grep +# 3) sudo apt update +# 4) sudo apt install -y autoconf autopoint gettext gperf pkg-config texinfo +# 5) ./bootstrap +# 6) emconfigure ./configure \ +# --disable-nls \ +# --disable-threads \ +# FORCE_UNSAFE_CONFIGURE=1 \ +# TIME_T_32_BIT_OK=yes \ +# ac_cv_have_decl_alarm=no \ +# gl_cv_func_sleep_works=yes +# 7) export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker -sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings -sFORCE_FILESYSTEM=1 -sINVOKE_RUN=0 -sMODULARIZE=1 -sSINGLE_FILE=1 -sERROR_ON_UNDEFINED_SYMBOLS=0" +# 8) emmake make all CFLAGS="$CFLAGS" EXEEXT=.js -j4 +# It seems that it is important to pass the CFLAGS on the emmake line, not just have them stored +# in an env var. Need to tolerate all the warnings. +# 9) File needed is src/grep.js + +git clone --depth 1 --branch v3.11 git://git.savannah.gnu.org/grep.git +cd grep + +./bootstrap --skip-po +emconfigure ./configure \ + --disable-nls \ + --disable-threads \ + FORCE_UNSAFE_CONFIGURE=1 \ + TIME_T_32_BIT_OK=yes \ + ac_cv_have_decl_alarm=no \ + gl_cv_func_sleep_works=yes + +export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker -sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings -sFORCE_FILESYSTEM=1 -sINVOKE_RUN=0 -sMODULARIZE=1 -sSINGLE_FILE=1 -sERROR_ON_UNDEFINED_SYMBOLS=0" +emmake make all CFLAGS="$CFLAGS" EXEEXT=.js + +ls + +mkdir -p $PREFIX/bin +cp src/grep.js $PREFIX/bin/grep.js diff --git a/recipes/recipes_emscripten/grep/recipe.yaml b/recipes/recipes_emscripten/grep/recipe.yaml new file mode 100644 index 000000000..4e3b314d6 --- /dev/null +++ b/recipes/recipes_emscripten/grep/recipe.yaml @@ -0,0 +1,42 @@ +context: + version: 0.5.0 + +package: + name: grep + version: ${{ version }} + + +# source: +# url: https://ftp.gnu.org/gnu/grep/grep-3.11.tar.xz +# sha256: 1db2aedde89d0dea42b16d9528f894c8d15dae4e190b59aecc78f5a951276eab +# url: https://github.com/Distrotech/grep +# branch: +build: + number: 0 + +requirements: + build: + - ${{ compiler("cxx") }} + - cmake + - make # [unix] + - autoconf + - automake + - wget + # - autopoint + - gettext + - gperf + - pkg-config + - texinfo + + +tests: + - script: + - test -f $PREFIX/bin/grep.js + +about: + license: GPL-3.0-only + license_file: COPYING + +extra: + recipe-maintainers: + - DerThorsten From aea33ecfa677e53c478f196bf79e5ff746a21a41 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Wed, 10 Jul 2024 10:40:26 +0200 Subject: [PATCH 132/333] Coreutils (#1177) * wip * skip po * tests * coreutils --- recipes/recipes_emscripten/coreutils/build.sh | 27 +++++++++++ .../recipes_emscripten/coreutils/recipe.yaml | 45 +++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 recipes/recipes_emscripten/coreutils/build.sh create mode 100644 recipes/recipes_emscripten/coreutils/recipe.yaml diff --git a/recipes/recipes_emscripten/coreutils/build.sh b/recipes/recipes_emscripten/coreutils/build.sh new file mode 100644 index 000000000..977726883 --- /dev/null +++ b/recipes/recipes_emscripten/coreutils/build.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +echo "lets go" +ls +./bootstrap --skip-po +emconfigure ./configure \ + --enable-single-binary \ + --disable-nls \ + --disable-threads \ + FORCE_UNSAFE_CONFIGURE=1 \ + TIME_T_32_BIT_OK=yes \ + ac_cv_have_decl_alarm=no \ + gl_cv_func_sleep_works=yes + + +echo "sed" +sed -i 's|$(MAKE) src/make-prime-list$(EXEEXT)|gcc src/make-prime-list.c -o src/make-prime-list$(EXEEXT) -Ilib/|' Makefile +export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker -sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings -sFORCE_FILESYSTEM=1 -sINVOKE_RUN=0 -sMODULARIZE=1 -sSINGLE_FILE=1" + +make EXEEXT=.js CFLAGS="$CFLAGS" -k -j4 || true + + +ls +ls src/coreutils.js + +mkdir -p $PREFIX/bin +cp src/coreutils.js $PREFIX/bin/coreutils.js \ No newline at end of file diff --git a/recipes/recipes_emscripten/coreutils/recipe.yaml b/recipes/recipes_emscripten/coreutils/recipe.yaml new file mode 100644 index 000000000..410d9898b --- /dev/null +++ b/recipes/recipes_emscripten/coreutils/recipe.yaml @@ -0,0 +1,45 @@ +context: + version: "9.5" + name: "coreutils" + +package: + name: ${{ name }} + version: ${{ version }} + +source: + # url: https://github.com/coreutils/coreutils/archive/refs/tags/v${{version}}.tar.gz + # sha256: 7155d01f31bccf3387933ae3ba7ff1b313f15ed73ab13ccc5b211018a2d14636 + git: https://github.com/coreutils/coreutils + tag: v9.5 +build: + number: 0 + +requirements: + build: + - ${{ compiler("c") }} + - ${{ compiler("cxx") }} + - make # [unix] + - autoconf + # - autopoint + - gettext + - gperf + - pkg-config + - texinfo + - help2man + - automake + - wget +tests: + - script: + - test -f $PREFIX/bin/coreutils.js + +about: + license: GPL-3.0-only + license_file: COPYING + + +extra: + recipe-maintainers: + - DerThorsten + + + From d51fdd54ec141033020cb2a31b5f3be914054b04 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Wed, 10 Jul 2024 10:41:16 +0200 Subject: [PATCH 133/333] Cockle fs (#1176) * wip * skip po * tests * fs * Update recipe.yaml --- recipes/recipes_emscripten/cockle_fs/LICENSE | 0 recipes/recipes_emscripten/cockle_fs/build.sh | 13 ++++++++ .../recipes_emscripten/cockle_fs/recipe.yaml | 30 +++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 recipes/recipes_emscripten/cockle_fs/LICENSE create mode 100644 recipes/recipes_emscripten/cockle_fs/build.sh create mode 100644 recipes/recipes_emscripten/cockle_fs/recipe.yaml diff --git a/recipes/recipes_emscripten/cockle_fs/LICENSE b/recipes/recipes_emscripten/cockle_fs/LICENSE new file mode 100644 index 000000000..e69de29bb diff --git a/recipes/recipes_emscripten/cockle_fs/build.sh b/recipes/recipes_emscripten/cockle_fs/build.sh new file mode 100644 index 000000000..e84ea8228 --- /dev/null +++ b/recipes/recipes_emscripten/cockle_fs/build.sh @@ -0,0 +1,13 @@ +touch fs.c +emcc fs.c -o fs.js \ + -sALLOW_MEMORY_GROWTH=1 \ + -sENVIRONMENT=web,worker \ + -sEXPORTED_RUNTIME_METHODS=FS,PATH,ERRNO_CODES,PROXYFS \ + -sFORCE_FILESYSTEM=1 \ + -sMODULARIZE=1 \ + -sSINGLE_FILE=1 \ + -lproxyfs.js + + +mkdir -p $PREFIX/bin +cp fs.js $PREFIX/bin/fs.js diff --git a/recipes/recipes_emscripten/cockle_fs/recipe.yaml b/recipes/recipes_emscripten/cockle_fs/recipe.yaml new file mode 100644 index 000000000..11252b887 --- /dev/null +++ b/recipes/recipes_emscripten/cockle_fs/recipe.yaml @@ -0,0 +1,30 @@ +context: + version: 0.1.0 + +package: + name: cockle_fs + version: ${{ version }} + + +build: + number: 0 + +requirements: + build: + - ${{ compiler("cxx") }} + - cmake + +tests: + - script: + - test -f $PREFIX/bin/fs.js + +about: + homepage: https://github.com/jupyterlite/cockle + license: BSD-3-Clause + license_file: LICENSE + summary: fs for cockle + documentation: https://github.com/jupyterlite/cockle + +extra: + recipe-maintainers: + - DerThorsten From e3703548c29e798ceea8ca42135f21239bc31c22 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Wed, 10 Jul 2024 12:17:37 +0200 Subject: [PATCH 134/333] fix_grep_version (#1178) --- recipes/recipes_emscripten/grep/recipe.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/recipes_emscripten/grep/recipe.yaml b/recipes/recipes_emscripten/grep/recipe.yaml index 4e3b314d6..eb8cd489b 100644 --- a/recipes/recipes_emscripten/grep/recipe.yaml +++ b/recipes/recipes_emscripten/grep/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 0.5.0 + version: 3.11 package: name: grep From 3570e7ec3268987380115b789c12d4d4841120a8 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Wed, 10 Jul 2024 13:45:11 +0200 Subject: [PATCH 135/333] wasm-git (#1179) * wasm-git draft * .. * install --- recipes/recipes_emscripten/wasm-git/build.sh | 29 ++++++++++++++ .../recipes_emscripten/wasm-git/recipe.yaml | 39 +++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 recipes/recipes_emscripten/wasm-git/build.sh create mode 100644 recipes/recipes_emscripten/wasm-git/recipe.yaml diff --git a/recipes/recipes_emscripten/wasm-git/build.sh b/recipes/recipes_emscripten/wasm-git/build.sh new file mode 100644 index 000000000..1ce20accc --- /dev/null +++ b/recipes/recipes_emscripten/wasm-git/build.sh @@ -0,0 +1,29 @@ +#!/bin/bash + + + +curl -L https://github.com/libgit2/libgit2/archive/refs/tags/v1.7.1.tar.gz --output libgit2.tar.gz +tar -xzf libgit2.tar.gz +mv libgit2-1.7.1 libgit2 +rm libgit2.tar.gz +rm libgit2/src/libgit2/transports/http.c +cp -r libgit2patchedfiles/examples/* libgit2/examples/ +cp -r libgit2patchedfiles/src/* libgit2/src/libgit2/ +echo 'set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=gnu90")' >> libgit2/examples/CMakeLists.txt +echo 'set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=gnu90")' >> libgit2/src/libgit2/CMakeLists.txt +echo 'set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=gnu90")' >> libgit2/src/util/CMakeLists.txt +# sed -i 's/GIT_PACK_FILE_MODE 0444/GIT_PACK_FILE_MODE 0644/g' libgit2/src/libgit2/pack.h +sed -i -e 's/GIT_PACK_FILE_MODE 0444/GIT_PACK_FILE_MODE 0644/g' libgit2/src/libgit2/pack.h +sed -i -e 's/GIT_OBJECT_FILE_MODE 0444/GIT_OBJECT_FILE_MODE 0644/g' libgit2/src/libgit2/odb.h + +cd emscriptenbuild + +# run the ./build.sh script +./build.sh Release +./build.sh Release-async + +mkdir -p $PREFIX/bin +cp libgit2/examples/lg2.js $PREFIX/bin/lg2.js +cp libgit2/examples/lg2.wasm $PREFIX/bin/lg2.wasm +cp libgit2/examples/lg2_async.js $PREFIX/bin/lg2_async.js +cp libgit2/examples/lg2_async.wasm $PREFIX/bin/lg2_async.wasm diff --git a/recipes/recipes_emscripten/wasm-git/recipe.yaml b/recipes/recipes_emscripten/wasm-git/recipe.yaml new file mode 100644 index 000000000..bf58aa349 --- /dev/null +++ b/recipes/recipes_emscripten/wasm-git/recipe.yaml @@ -0,0 +1,39 @@ +context: + version: 0.0.13 + +package: + name: wasm-git + version: ${{ version }} + + +source: + git: https://github.com/petersalomonsen/wasm-git + rev: 7236b20f1848f239337cf6721f3b6befe64f9d08 + + +build: + number: 0 + +requirements: + build: + - ${{ compiler("cxx") }} + - cmake + - make + - pkg-config + + +tests: + + - script: + - test -f $PREFIX/bin/lg2.js + - test -f $PREFIX/bin/lg2.wasm + - test -f $PREFIX/bin/lg2_async.js + - test -f $PREFIX/bin/lg2_async.wasm + + +about: + license_file: COPYING + +extra: + recipe-maintainers: + - DerThorsten \ No newline at end of file From ae3996029c69e1f97b2362aae790318ebd205978 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Thu, 11 Jul 2024 11:55:43 +0200 Subject: [PATCH 136/333] add requests (#1180) add requests for bot --- ci_env.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ci_env.yml b/ci_env.yml index 09a217281..25bce7102 100644 --- a/ci_env.yml +++ b/ci_env.yml @@ -9,3 +9,4 @@ dependencies: - pixi - jinja2 - curl + - requests From 0955f06498e8a6f8b91eab6840cefa1b331bdaf8 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Fri, 12 Jul 2024 00:59:24 +0000 Subject: [PATCH 137/333] Update pybind11 from 2.12.0 to 2.13.0 --- recipes/recipes_emscripten/pybind11/recipe.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/recipes_emscripten/pybind11/recipe.yaml b/recipes/recipes_emscripten/pybind11/recipe.yaml index 38e276eee..8682c0c61 100644 --- a/recipes/recipes_emscripten/pybind11/recipe.yaml +++ b/recipes/recipes_emscripten/pybind11/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.12.0 + version: 2.13.0 package: name: pybind11 @@ -7,7 +7,7 @@ package: source: url: https://github.com/pybind/pybind11/archive/refs/tags/v${{ version }}.tar.gz - sha256: bf8f242abd1abcd375d516a7067490fb71abd79519a282d22b6e4d19282185a7 + sha256: 8ac2bd138ea3c12683d3496361af6bee0f7754f86bf050e6c61e3966de688215 patches: - patches/0001-no-bitsize-check.patch build: @@ -28,7 +28,7 @@ about: license_file: LICENSE summary: Seamless operability between C++11 and Python homepage: https://github.com/pybind/pybind11 - + extra: recipe-maintainers: - - DerThorsten \ No newline at end of file + - DerThorsten From 12ef0349cbca41abc86ce7355919c9da5641e680 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Fri, 12 Jul 2024 10:24:40 +0200 Subject: [PATCH 138/333] fix missing .wasm for lua binaries (#1191) * lua binaries * no modularize * no modularize --- recipes/recipes_emscripten/lua/CMakeLists.txt | 36 ++++++++++++++++++- recipes/recipes_emscripten/lua/build.sh | 7 ++-- recipes/recipes_emscripten/lua/recipe.yaml | 29 +++++++++------ 3 files changed, 59 insertions(+), 13 deletions(-) diff --git a/recipes/recipes_emscripten/lua/CMakeLists.txt b/recipes/recipes_emscripten/lua/CMakeLists.txt index c9a6f694c..b48db427f 100644 --- a/recipes/recipes_emscripten/lua/CMakeLists.txt +++ b/recipes/recipes_emscripten/lua/CMakeLists.txt @@ -48,12 +48,36 @@ if(BUILD_SHARED_LIBS) target_compile_definitions(liblua PRIVATE LUA_BUILD_AS_DLL) endif() + + + add_executable(lua src/lua.c ${LUA_LIB_SRCS}) target_link_libraries(lua) - add_executable(luac src/luac.c ${LUA_LIB_SRCS}) target_link_libraries(luac) + +set(lua_binaries lua luac) + +foreach(lua_binary ${lua_binaries}) + # set target compile options + target_compile_definitions(${lua_binary} + PUBLIC "SHELL: -s FORCE_FILESYSTEM" + PUBLIC "SHELL: -s ALLOW_MEMORY_GROWTH=1" + # PUBLIC "SHELL: -s MODULARIZE=1" + ) + # set target link options + target_link_options(${lua_binary} + PUBLIC "SHELL: -s FORCE_FILESYSTEM" + PUBLIC "SHELL: -s ALLOW_MEMORY_GROWTH=1" + # PUBLIC "SHELL: -s MODULARIZE=1" + ) +endforeach() + + + + + install(TARGETS liblua ARCHIVE DESTINATION lib LIBRARY DESTINATION lib @@ -61,6 +85,16 @@ install(TARGETS liblua install(TARGETS lua luac DESTINATION bin) + + +install(FILES + "$/lua.wasm" + DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) +install(FILES + "$/luac.wasm" + DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) + + set(LUA_PUBLIC_INCLUDES src/lauxlib.h src/lua.h diff --git a/recipes/recipes_emscripten/lua/build.sh b/recipes/recipes_emscripten/lua/build.sh index 9ec488167..bb91fe538 100644 --- a/recipes/recipes_emscripten/lua/build.sh +++ b/recipes/recipes_emscripten/lua/build.sh @@ -11,7 +11,6 @@ cd build # Configure step cmake ${CMAKE_ARGS} .. \ - -GNinja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_PREFIX_PATH=$PREFIX \ -DCMAKE_INSTALL_PREFIX=$PREFIX \ @@ -19,5 +18,9 @@ cmake ${CMAKE_ARGS} .. \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ -DCMAKE_C_FLAGS="-DLUA_USER_DEFAULT_PATH='\"$PREFIX/\"'" \ +# build step +make -j${CPU_COUNT} + + # Build step -ninja install +make -j${CPU_COUNT} install diff --git a/recipes/recipes_emscripten/lua/recipe.yaml b/recipes/recipes_emscripten/lua/recipe.yaml index 5085ff6f6..db0f20475 100644 --- a/recipes/recipes_emscripten/lua/recipe.yaml +++ b/recipes/recipes_emscripten/lua/recipe.yaml @@ -10,27 +10,36 @@ source: - url: http://www.lua.org/ftp/lua-${{ version }}.tar.gz sha256: 7d5ea1b9cb6aa0b59ca3dde1c6adcb57ef83a1ba8e5432c0ecd06bf439b3ad88 patches: - # Enables Lua to look for packages on a relative path - - luaconf.patch - # Build as a shared library - - liblua.so.patch - # Enables readline on linux - - Makefile.patch -- path: CMakeLists.txt + # Enables Lua to look for packages on a relative path + - luaconf.patch + # Build as a shared library + - liblua.so.patch + # # Enables readline on linux + # - Makefile.patch -build: - number: 5 +- path: CMakeLists.txt +build: + number: 6 requirements: build: - ${{ compiler('c') }} - - ninja - cmake - make +tests: + - script: node $PREFIX/bin/lua.js -e "a=1+1;print(a)" + requirements: + build: + - nodejs + - script: node $PREFIX/bin/luac.js -v + requirements: + build: + - nodejs + about: summary: Lua is a powerful, fast, lightweight, embeddable scripting language license: MIT From da0dec0fd2357013253bf64e0ed0307408e262fc Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Fri, 12 Jul 2024 01:00:42 +0000 Subject: [PATCH 139/333] Update qutip from 5.0.2 to 5.0.3 --- recipes/recipes_emscripten/qutip/recipe.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/recipes_emscripten/qutip/recipe.yaml b/recipes/recipes_emscripten/qutip/recipe.yaml index 886c53889..0576990f2 100644 --- a/recipes/recipes_emscripten/qutip/recipe.yaml +++ b/recipes/recipes_emscripten/qutip/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 5.0.2 + version: 5.0.3 package: name: qutip @@ -7,11 +7,11 @@ package: source: url: https://github.com/qutip/qutip/archive/v${{ version }}.tar.gz - sha256: 39759af6b82d92b9952a651371d2b8b9b4626fecd919e0c1d6474871db23cbcf + sha256: 2f5bcba11f3b0d409a51e5988ddf179d4526da59fe31d90a542777dcbdb6116d build: number: 0 - script: "$PYTHON -m pip install . --no-deps -vv" + script: $PYTHON -m pip install . --no-deps -vv requirements: build: From 1cb3e5999a357c0ddaa6c54089f0997d0be6de58 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Fri, 12 Jul 2024 01:00:33 +0000 Subject: [PATCH 140/333] Update awkward-cpp from 31 to 32 --- recipes/recipes_emscripten/awkward-cpp/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/awkward-cpp/recipe.yaml b/recipes/recipes_emscripten/awkward-cpp/recipe.yaml index 8e431d9f0..f12f72b05 100644 --- a/recipes/recipes_emscripten/awkward-cpp/recipe.yaml +++ b/recipes/recipes_emscripten/awkward-cpp/recipe.yaml @@ -1,6 +1,6 @@ context: name: awkward-cpp - version: '31' + version: '32' package: name: ${{ name|lower }} @@ -9,7 +9,7 @@ package: source: url: https://pypi.io/packages/source/${{ name[0] }}/${{ name }}/awkward-cpp-${{ version }}.tar.gz - sha256: 7d183acdb2d33be0102b1d2af33651fa28a4e670b671e9bd09544eea53004efe + sha256: ad8c5af86206fb0f434b16749cc5cca69a15a88e16ca43e91e56c5cca77421f0 build: number: 0 From f06128082d673d7da31d52370add8cc362006539 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Fri, 12 Jul 2024 00:59:56 +0000 Subject: [PATCH 141/333] Update pandas from 2.2.0 to 2.2.1 --- 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 36803fd6e..df9f66f75 100644 --- a/recipes/recipes_emscripten/pandas/recipe.yaml +++ b/recipes/recipes_emscripten/pandas/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.2.0 + version: 2.2.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: 9c8a9c3938f4f4727ca056d0f96bdb0dd795e7b195283223e473eb29b3517cb6 + sha256: 0ab90f87093c13f3e8fa45b48ba9f39181046e8f3317d3aadb2fffbb1b978572 #patches: # - patches/fix_json_signature.patch From 9b467fa79fd94793efe9a779f45ae552c7843b33 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Fri, 12 Jul 2024 00:59:11 +0000 Subject: [PATCH 142/333] Update ipython from 8.25.0 to 8.26.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 7d320cf3d..dc120fb60 100644 --- a/recipes/recipes_emscripten/ipython/recipe.yaml +++ b/recipes/recipes_emscripten/ipython/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 8.25.0 + version: 8.26.0 package: name: ipython @@ -7,7 +7,7 @@ package: source: - url: https://pypi.io/packages/source/i/ipython/ipython-${{ version }}.tar.gz - sha256: c6ed726a140b6e725b911528f80439c534fac915246af3efc39440a6b0f9d716 + sha256: 1cec0fbba8404af13facebe83d04436a7434c7400e59f47acf467c64abd0956c patches: - patches/0001-Patch-asyncio-tornado.patch From 165f7ccfd98cbda7d4477049aea26a8ff07ae114 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Fri, 12 Jul 2024 00:59:06 +0000 Subject: [PATCH 143/333] Update biopython from 1.83 to 1.84 --- recipes/recipes_emscripten/biopython/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/biopython/recipe.yaml b/recipes/recipes_emscripten/biopython/recipe.yaml index 85970c36c..42826a946 100644 --- a/recipes/recipes_emscripten/biopython/recipe.yaml +++ b/recipes/recipes_emscripten/biopython/recipe.yaml @@ -1,6 +1,6 @@ context: name: biopython - version: '1.83' + version: '1.84' package: name: biopython @@ -9,7 +9,7 @@ package: source: - url: https://pypi.io/packages/source/${{ name[0] }}/${{ name }}/${{ name }}-${{ version }}.tar.gz - sha256: 78e6bfb78de63034037afd35fe77cb6e0a9e5b62706becf78a7d922b16ed83f7 + sha256: 60fbe6f996e8a6866a42698c17e552127d99a9aab3259d6249fbaabd0e0cc7b4 build: number: 0 From c283166c268611052ca74497cd9d8354567461e6 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Sat, 13 Jul 2024 01:02:10 +0000 Subject: [PATCH 144/333] Update pydantic-core from 2.18.4 to 2.19.0 --- .../pydantic-core/recipe.yaml | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/recipes/recipes_emscripten/pydantic-core/recipe.yaml b/recipes/recipes_emscripten/pydantic-core/recipe.yaml index 138af620f..b99cdc7cd 100644 --- a/recipes/recipes_emscripten/pydantic-core/recipe.yaml +++ b/recipes/recipes_emscripten/pydantic-core/recipe.yaml @@ -1,6 +1,6 @@ context: name: pydantic-core - version: '2.18.4' + version: 2.19.0 package: name: ${{ name }} @@ -8,37 +8,37 @@ package: source: - url: https://pypi.io/packages/source/p/pydantic-core/pydantic_core-${{ version }}.tar.gz - sha256: ec3beeada09ff865c344ff3bc2f427f5e6c26401cc6113d77e372c3fdac73864 + sha256: 9ad77f1aecedef233390eff7fd643fe652e5ac92b793329424c2a1d2e28c08d1 build: number: 0 requirements: build: - - cross-python_${{target_platform}} - - cffi == 1.15.1 - - openssl - - setuptools-rust - - rust - - maturin - - typing_extensions + - cross-python_${{target_platform}} + - cffi == 1.15.1 + - openssl + - setuptools-rust + - rust + - maturin + - typing_extensions host: - - python - - openssl - - cffi == 1.15.1 - - typing_extensions + - python + - openssl + - cffi == 1.15.1 + - typing_extensions run: - - cffi == 1.15.1 - - typing_extensions + - cffi == 1.15.1 + - typing_extensions tests: - - script: pytester - requirements: - build: - - pytester - run: - - pytester-run - files: - recipe: - - test_pydantic_core.py +- script: pytester + requirements: + build: + - pytester + run: + - pytester-run + files: + recipe: + - test_pydantic_core.py From 4842cc202fc12a33132c12095a8531ebdba2c0c1 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Sun, 14 Jul 2024 01:05:27 +0000 Subject: [PATCH 145/333] Update shapely from 2.0.4 to 2.0.5 --- .../recipes_emscripten/shapely/recipe.yaml | 55 ++++++++++--------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/recipes/recipes_emscripten/shapely/recipe.yaml b/recipes/recipes_emscripten/shapely/recipe.yaml index e26ffd0c3..e34da1520 100644 --- a/recipes/recipes_emscripten/shapely/recipe.yaml +++ b/recipes/recipes_emscripten/shapely/recipe.yaml @@ -1,6 +1,6 @@ context: name: shapely - version: 2.0.4 + version: 2.0.5 package: name: ${{ name }} @@ -8,48 +8,49 @@ package: source: url: https://pypi.io/packages/source/S/Shapely/shapely-${{ version }}.tar.gz - sha256: 5dc736127fac70009b8d309a0eeb74f3e08979e530cf7017f2f507ef62e6cfb8 + sha256: bff2366bc786bfa6cb353d6b47d0443c570c32776612e527ee47b6df63fcfe32 build: number: 0 requirements: build: - - python - - pip - - cross-python_${{ target_platform }} - - cython - - numpy<2 - - ${{ compiler('c') }} + - python + - pip + - cross-python_${{ target_platform }} + - cython + - numpy<2 + - ${{ compiler('c') }} host: - - python - - pip + - python + - pip #- cython - - numpy <2 - - geos + - numpy <2 + - geos run: - - geos - - python - - numpy - + - geos + - python + - numpy + tests: - - script: pytester - requirements: - build: - - pytester - run: - - pytester-run - files: - recipe: - - test_shapely.py +- 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 + summary: Python package for manipulation and analysis of geometric objects in the + Cartesian plane extra: recipe-maintainers: - - KGB99 + - KGB99 From cb02d1a4d78cfcafc9bba46907aa881bb09b0e3b Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Sun, 14 Jul 2024 01:05:20 +0000 Subject: [PATCH 146/333] Update awkward-cpp from 32 to 33 --- recipes/recipes_emscripten/awkward-cpp/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/awkward-cpp/recipe.yaml b/recipes/recipes_emscripten/awkward-cpp/recipe.yaml index f12f72b05..acca61b44 100644 --- a/recipes/recipes_emscripten/awkward-cpp/recipe.yaml +++ b/recipes/recipes_emscripten/awkward-cpp/recipe.yaml @@ -1,6 +1,6 @@ context: name: awkward-cpp - version: '32' + version: '33' package: name: ${{ name|lower }} @@ -9,7 +9,7 @@ package: source: url: https://pypi.io/packages/source/${{ name[0] }}/${{ name }}/awkward-cpp-${{ version }}.tar.gz - sha256: ad8c5af86206fb0f434b16749cc5cca69a15a88e16ca43e91e56c5cca77421f0 + sha256: 550adebccd329d18d02e95226d0b89698188fd33e44f07450942c692881927d8 build: number: 0 From fa455845e4470a3b3c03e9012a402f7b7c2a276a Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Sun, 14 Jul 2024 01:05:06 +0000 Subject: [PATCH 147/333] Update pandas from 2.2.1 to 2.2.2 --- 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 df9f66f75..bc5bb0891 100644 --- a/recipes/recipes_emscripten/pandas/recipe.yaml +++ b/recipes/recipes_emscripten/pandas/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.2.1 + version: 2.2.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: 0ab90f87093c13f3e8fa45b48ba9f39181046e8f3317d3aadb2fffbb1b978572 + sha256: 9e79019aba43cb4fda9e4d983f8e88ca0373adbb697ae9c6c43093218de28b54 #patches: # - patches/fix_json_signature.patch From dc536d26df951217126f883057069aff177117aa Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Mon, 15 Jul 2024 10:47:21 +0200 Subject: [PATCH 148/333] Add `orjson` (#1194) * Add `orjson` * update build.sh * pull from PyPI * missing $ --- recipes/recipes_emscripten/orjson/build.sh | 7 ++++ recipes/recipes_emscripten/orjson/recipe.yaml | 41 +++++++++++++++++++ .../recipes_emscripten/orjson/test_orjson.py | 8 ++++ 3 files changed, 56 insertions(+) create mode 100644 recipes/recipes_emscripten/orjson/build.sh create mode 100644 recipes/recipes_emscripten/orjson/recipe.yaml create mode 100644 recipes/recipes_emscripten/orjson/test_orjson.py diff --git a/recipes/recipes_emscripten/orjson/build.sh b/recipes/recipes_emscripten/orjson/build.sh new file mode 100644 index 000000000..db581ebf4 --- /dev/null +++ b/recipes/recipes_emscripten/orjson/build.sh @@ -0,0 +1,7 @@ +#!/bin/bash + + +export MATURIN_PYTHON_SYSCONFIGDATA_DIR=${PREFIX}/etc/conda/_sysconfigdata__emscripten_wasm32-emscripten.py +export RUSTFLAGS="-Z link-native-libraries=yes" +${PYTHON} -m pip install . -vvv + diff --git a/recipes/recipes_emscripten/orjson/recipe.yaml b/recipes/recipes_emscripten/orjson/recipe.yaml new file mode 100644 index 000000000..1d793e4cc --- /dev/null +++ b/recipes/recipes_emscripten/orjson/recipe.yaml @@ -0,0 +1,41 @@ +context: + name: orjson + version: 3.10.6 + +package: + name: ${{name}} + version: ${{ version }} + +source: +- url: https://files.pythonhosted.org/packages/70/24/8be1c9f6d21e3c510c441d6cbb6f3a75f2538b42a45f0c17ffb2182882f1/orjson-${{version}}.tar.gz + sha256: e54b63d0a7c6c54a5f5f726bc93a2078111ef060fec4ecbf34c5db800ca3b3a7 + +build: + number: 0 + +requirements: + build: + - cross-python_${{target_platform}} + - cffi == 1.15.1 + - setuptools-rust + - rust + - maturin + + host: + - python + - openssl + - cffi == 1.15.1 + run: + - cffi == 1.15.1 + - typing_extensions + +tests: +- script: pytester + requirements: + build: + - pytester + run: + - pytester-run + files: + recipe: + - test_orjson.py diff --git a/recipes/recipes_emscripten/orjson/test_orjson.py b/recipes/recipes_emscripten/orjson/test_orjson.py new file mode 100644 index 000000000..ec1d5b60f --- /dev/null +++ b/recipes/recipes_emscripten/orjson/test_orjson.py @@ -0,0 +1,8 @@ +import orjson + + +def test_orjson(): + json_string = '{"name": "Alice", "age": 30, "city": "New York"}' + json_data = orjson.loads(json_string) + + assert json_data == {"name": "Alice", "age": 30, "city": "New York"} From 82af4b48a377ca1de950ec760ab0512386cb341f Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:48:03 +0200 Subject: [PATCH 149/333] Update pydantic-core from 2.19.0 to 2.20.0 (#1206) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/pydantic-core/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/pydantic-core/recipe.yaml b/recipes/recipes_emscripten/pydantic-core/recipe.yaml index b99cdc7cd..c0a5961a3 100644 --- a/recipes/recipes_emscripten/pydantic-core/recipe.yaml +++ b/recipes/recipes_emscripten/pydantic-core/recipe.yaml @@ -1,6 +1,6 @@ context: name: pydantic-core - version: 2.19.0 + version: 2.20.0 package: name: ${{ name }} @@ -8,7 +8,7 @@ package: source: - url: https://pypi.io/packages/source/p/pydantic-core/pydantic_core-${{ version }}.tar.gz - sha256: 9ad77f1aecedef233390eff7fd643fe652e5ac92b793329424c2a1d2e28c08d1 + sha256: 366be8e64e0cb63d87cf79b4e1765c0703dd6313c729b22e7b9e378db6b96877 build: number: 0 From cecf2b60c8dec9ff5418e137017d3613a4ad4caa Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:48:16 +0200 Subject: [PATCH 150/333] Update vtk from 9.3.0 to 9.3.1 (#1200) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/vtk/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/vtk/recipe.yaml b/recipes/recipes_emscripten/vtk/recipe.yaml index bb65d06af..82cd72c54 100644 --- a/recipes/recipes_emscripten/vtk/recipe.yaml +++ b/recipes/recipes_emscripten/vtk/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 9.3.0 + version: 9.3.1 package: name: vtk @@ -7,7 +7,7 @@ package: source: url: https://github.com/Kitware/VTK/archive/refs/tags/v${{ version }}.tar.gz - sha256: b4b7323fc24446f0a19813a0c8bdf4fd5b6f796c6f3caf2fb159f65425557a60 + sha256: 91ec1aa00cb15b69b6da7fd7cd9fdf6595b282ff8cf613a5226a00296994214f build: number: 1 From 48cbf87f774171f2874be4f1be0cb97840cfe51a Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:48:29 +0200 Subject: [PATCH 151/333] Update highs from 1.7.1 to 1.7.2 (#1199) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/highs/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/highs/recipe.yaml b/recipes/recipes_emscripten/highs/recipe.yaml index d997beefe..a0ab353ea 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.1 + version: 1.7.2 package: name: ${{ name }} @@ -8,7 +8,7 @@ package: source: url: https://github.com/ERGO-Code/${{ name }}/archive/refs/tags/v${{ version }}.tar.gz - sha256: 65c6f9fc2365ced42ee8eb2d209a0d3a7942cd59ff4bd20464e195c433f3a885 + sha256: 5ff96c14ae19592d3568e9ae107624cbaf3409d328fb1a586359f0adf9b34bf7 build: number: 0 From c0f24011efbaace39db05cd3d4ee84898076a6b7 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:48:43 +0200 Subject: [PATCH 152/333] Update fmt from 10.2.1 to 11.0.0 (#1198) 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 f26988502..f9e13e694 100644 --- a/recipes/recipes_emscripten/fmt/recipe.yaml +++ b/recipes/recipes_emscripten/fmt/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 10.2.1 + version: 11.0.0 package: name: fmt @@ -7,7 +7,7 @@ package: source: url: https://github.com/fmtlib/fmt/archive/${{ version }}.tar.gz - sha256: 1250e4cc58bf06ee631567523f48848dc4596133e163f02615c97f78bab6c811 + sha256: 8e20e2aacdd3f264fa5be9cba879fa3972c52bfd9d5310112250e7eaaf492f2c build: number: 0 From a80db233acef5a3304cae04f085b2c66c1532288 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:49:20 +0200 Subject: [PATCH 153/333] Update xeus-python from 0.17.0 to 0.17.1 (#1195) 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 0ab3810ea..27ac4366b 100644 --- a/recipes/recipes_emscripten/xeus-python/recipe.yaml +++ b/recipes/recipes_emscripten/xeus-python/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 0.17.0 + version: 0.17.1 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: 8cf23dccc8b9f17a663178bed7445280fef4fe95d3b4a9cfd8167a4fddab7035 + sha256: 8ecb2a92dc49309fe3d6dfc096323260ea20fd9736b84532f15578761fb687d0 build: From 45dccdc2ec7f91f3258c67ac2c7b435b2455b64d Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:49:40 +0200 Subject: [PATCH 154/333] Update libxslt from 1.1.41 to 1.1.42 (#1196) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/libxslt/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/libxslt/recipe.yaml b/recipes/recipes_emscripten/libxslt/recipe.yaml index b03fd1b4f..f70b5294d 100644 --- a/recipes/recipes_emscripten/libxslt/recipe.yaml +++ b/recipes/recipes_emscripten/libxslt/recipe.yaml @@ -1,6 +1,6 @@ context: name: libxslt - version: 1.1.41 + version: 1.1.42 package: name: ${{ name }} @@ -9,7 +9,7 @@ package: source: url: https://download.gnome.org/sources/${{ name }}/${{ version[0:3] }}/${{ name }}-${{ version }}.tar.xz - sha256: 3ad392af91115b7740f7b50d228cc1c5fc13afc1da7f16cb0213917a37f71bda + sha256: 85ca62cac0d41fc77d3f6033da9df6fd73d20ea2fc18b0a3609ffb4110e1baeb build: number: 0 From 525dc28b5c25fca590519c0a5e94dbb83c12729e Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:50:06 +0200 Subject: [PATCH 155/333] Update glib from 2.80.0 to 2.80.1 (#1187) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/glib/recipe.yaml | 28 +++++++++++---------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/recipes/recipes_emscripten/glib/recipe.yaml b/recipes/recipes_emscripten/glib/recipe.yaml index 427b55757..c52e948e0 100644 --- a/recipes/recipes_emscripten/glib/recipe.yaml +++ b/recipes/recipes_emscripten/glib/recipe.yaml @@ -1,14 +1,15 @@ context: - version: "2.80.0" - major_minor: "2.80" + version: 2.80.1 + major_minor: '2.80' package: name: glib version: ${{ version }} source: - url: https://download.gnome.org/sources/glib/${{ major_minor }}/glib-${{ version }}.tar.xz - sha256: 8228a92f92a412160b139ae68b6345bd28f24434a7b5af150ebe21ff587a561d + url: https://download.gnome.org/sources/glib/${{ major_minor }}/glib-${{ version + }}.tar.xz + sha256: bcfc8c2fab64fc9dcb91011375422159f1440502257fb90219215079d8716705 # Patch from https://gist.github.com/kleisauke/acfa1c09522705efa5eb0541d2d00887 patches: - patches/glib.patch @@ -18,15 +19,15 @@ build: requirements: build: - - pkg-config - - ${{ compiler('c') }} - - ${{ compiler('cxx') }} - - meson - - packaging + - pkg-config + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + - meson + - packaging host: - - zlib - - libffi - - pcre2>=10.43 + - zlib + - libffi + - pcre2>=10.43 tests: - package_contents: @@ -45,4 +46,5 @@ tests: 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. + summary: Provides core application building blocks for libraries and applications + written in C. From 6c5878fc1252e7c58e9bd9446728e21f53656730 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:50:24 +0200 Subject: [PATCH 156/333] Update fontconfig from 2.14.0 to 2.14.1 (#1184) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/fontconfig/recipe.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/recipes/recipes_emscripten/fontconfig/recipe.yaml b/recipes/recipes_emscripten/fontconfig/recipe.yaml index 84824a609..290a7497c 100644 --- a/recipes/recipes_emscripten/fontconfig/recipe.yaml +++ b/recipes/recipes_emscripten/fontconfig/recipe.yaml @@ -1,14 +1,15 @@ context: name: fontconfig - version: 2.14.0 + version: 2.14.1 package: name: ${{ name }} version: ${{ version }} source: - url: http://www.freedesktop.org/software/${{ name }}/release/${{ name }}-${{ version }}.tar.gz - sha256: b8f607d556e8257da2f3616b4d704be30fd73bd71e367355ca78963f9a7f0434 + url: http://www.freedesktop.org/software/${{ name }}/release/${{ name }}-${{ version + }}.tar.gz + sha256: ae480e9ca34382790312ff062c625ec70df94d6d9a9366e2b2b3d525f7f90387 patches: - patches/emscripten_preprocess.patch @@ -46,4 +47,4 @@ about: extra: recipe-maintainers: - - IsabelParedes \ No newline at end of file + - IsabelParedes From 97834ee79082b69fa6e6f011a79f1752f249b9af Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 15 Jul 2024 11:01:27 +0200 Subject: [PATCH 157/333] Update fontconfig from 2.14.1 to 2.14.2 (#1208) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/fontconfig/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/fontconfig/recipe.yaml b/recipes/recipes_emscripten/fontconfig/recipe.yaml index 290a7497c..4f03bc8c8 100644 --- a/recipes/recipes_emscripten/fontconfig/recipe.yaml +++ b/recipes/recipes_emscripten/fontconfig/recipe.yaml @@ -1,6 +1,6 @@ context: name: fontconfig - version: 2.14.1 + version: 2.14.2 package: name: ${{ name }} @@ -9,7 +9,7 @@ package: source: url: http://www.freedesktop.org/software/${{ name }}/release/${{ name }}-${{ version }}.tar.gz - sha256: ae480e9ca34382790312ff062c625ec70df94d6d9a9366e2b2b3d525f7f90387 + sha256: 3ba2dd92158718acec5caaf1a716043b5aa055c27b081d914af3ccb40dce8a55 patches: - patches/emscripten_preprocess.patch From 016724d100ec9e770a31308fbd914aed7d9faa09 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Mon, 15 Jul 2024 11:32:13 +0200 Subject: [PATCH 158/333] improve bot (#1213) --- emci/bot/bump_recipes_versions.py | 52 +++++++++++++++---------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/emci/bot/bump_recipes_versions.py b/emci/bot/bump_recipes_versions.py index 77d9713cc..8ad4b8d22 100644 --- a/emci/bot/bump_recipes_versions.py +++ b/emci/bot/bump_recipes_versions.py @@ -23,7 +23,7 @@ def __init__(self, recipe_dir, msg): super().__init__(f"Cannot handle recipe in {recipe_dir}: {msg}") -def get_new_version(recipe_file, is_ratler): +def get_new_version(recipe_file): # read the file with open(recipe_file) as file: recipe = YAML().load(file) @@ -61,18 +61,11 @@ def get_new_version(recipe_file, is_ratler): if 'sha256' not in source: raise CannotHandleRecipeException(recipe_file, "No sha256 in source") - # check that the url is a template - if is_ratler: - if "${{" not in url_template or "}}" not in url_template: - raise CannotHandleRecipeException(recipe_file, "url is not a template") - else: - if "{{" not in url_template or "}}" not in url_template: + + if "${{" not in url_template or "}}" not in url_template: raise CannotHandleRecipeException(recipe_file, "url is not a template") - - if is_ratler: - environment = jinja2.Environment(trim_blocks=True,variable_start_string='${{', variable_end_string='}}') - else: - environment = jinja2.Environment(trim_blocks=True,variable_start_string='{{', variable_end_string='}}') + + environment = jinja2.Environment(trim_blocks=True,variable_start_string='${{', variable_end_string='}}') # get name from dir name = recipe_file.parent.name @@ -127,15 +120,19 @@ def bump_recipe_version(recipe_dir): current_version = None new_version = None new_sha256 = None - for recipe_fname, is_rattler in recipe_locations: - if (recipe_dir / recipe_fname).exists(): - recipe_file = recipe_dir / recipe_fname - cv, nv, h = get_new_version(recipe_file, is_ratler=is_rattler) - if nv is not None: - new_version = nv - current_version = cv - new_sha256 = h - break + + + recipe_fname = 'recipe.yaml' + if (recipe_dir / recipe_fname).exists(): + recipe_file = recipe_dir / recipe_fname + cv, nv, h = get_new_version(recipe_file) + if nv is not None: + new_version = nv + current_version = cv + new_sha256 = h + else: + return False, None, None + # no new version found -- nothing to do if new_version is None: @@ -144,12 +141,15 @@ def bump_recipe_version(recipe_dir): # use the last directory in the path as the branch name name = recipe_dir.name - # check if the recipe has test_.py files - # if it does, we can mark the PR as automerge - test_files = [f for f in recipe_dir.iterdir() if f.name.startswith("test_") and f.name.endswith(".py")] - automerge = len(test_files) > 0 - + # check if the recipe has test section + # load recipe + automerge = False + with open(recipe_file) as file: + recipe = YAML().load(file) + if 'tests' in recipe: + automerge = True + branch_name = f"bump-{name}_{current_version}_to_{new_version}" From bf729431853f689380e61d07c0cea5be3792faf2 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Mon, 15 Jul 2024 08:53:24 +0000 Subject: [PATCH 159/333] Update pydantic-core from 2.20.0 to 2.20.1 --- recipes/recipes_emscripten/pydantic-core/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/pydantic-core/recipe.yaml b/recipes/recipes_emscripten/pydantic-core/recipe.yaml index c0a5961a3..9d29df76b 100644 --- a/recipes/recipes_emscripten/pydantic-core/recipe.yaml +++ b/recipes/recipes_emscripten/pydantic-core/recipe.yaml @@ -1,6 +1,6 @@ context: name: pydantic-core - version: 2.20.0 + version: 2.20.1 package: name: ${{ name }} @@ -8,7 +8,7 @@ package: source: - url: https://pypi.io/packages/source/p/pydantic-core/pydantic_core-${{ version }}.tar.gz - sha256: 366be8e64e0cb63d87cf79b4e1765c0703dd6313c729b22e7b9e378db6b96877 + sha256: 26ca695eeee5f9f1aeeb211ffc12f10bcb6f71e2989988fda61dabd65db878d4 build: number: 0 From 1566ba7c1620700bef133550e943a7cfbfdfbb30 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Mon, 15 Jul 2024 08:52:35 +0000 Subject: [PATCH 160/333] Update awkward-cpp from 33 to 34 --- recipes/recipes_emscripten/awkward-cpp/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/awkward-cpp/recipe.yaml b/recipes/recipes_emscripten/awkward-cpp/recipe.yaml index acca61b44..d9d136a9c 100644 --- a/recipes/recipes_emscripten/awkward-cpp/recipe.yaml +++ b/recipes/recipes_emscripten/awkward-cpp/recipe.yaml @@ -1,6 +1,6 @@ context: name: awkward-cpp - version: '33' + version: '34' package: name: ${{ name|lower }} @@ -9,7 +9,7 @@ package: source: url: https://pypi.io/packages/source/${{ name[0] }}/${{ name }}/awkward-cpp-${{ version }}.tar.gz - sha256: 550adebccd329d18d02e95226d0b89698188fd33e44f07450942c692881927d8 + sha256: 39ac814d769f38ade9a5f6c39b85b07bbc05af56342fb15742edce1237f9e049 build: number: 0 From d17050f47c921b66125a4f5be69340932623e5f0 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Mon, 15 Jul 2024 09:34:39 +0000 Subject: [PATCH 161/333] Update glib from 2.80.1 to 2.80.2 --- recipes/recipes_emscripten/glib/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/glib/recipe.yaml b/recipes/recipes_emscripten/glib/recipe.yaml index c52e948e0..b8b2878c2 100644 --- a/recipes/recipes_emscripten/glib/recipe.yaml +++ b/recipes/recipes_emscripten/glib/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.80.1 + version: 2.80.2 major_minor: '2.80' package: @@ -9,7 +9,7 @@ package: source: url: https://download.gnome.org/sources/glib/${{ major_minor }}/glib-${{ version }}.tar.xz - sha256: bcfc8c2fab64fc9dcb91011375422159f1440502257fb90219215079d8716705 + sha256: b9cfb6f7a5bd5b31238fd5d56df226b2dda5ea37611475bf89f6a0f9400fe8bd # Patch from https://gist.github.com/kleisauke/acfa1c09522705efa5eb0541d2d00887 patches: - patches/glib.patch From b1a9f4d6159cd26a1a4243cf1c92635256a96b7a Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Tue, 16 Jul 2024 14:37:13 +0200 Subject: [PATCH 162/333] use micromamba-version: '1.5.8-0' (#1220) --- .github/workflows/build_recipes.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_recipes.yaml b/.github/workflows/build_recipes.yaml index 326cf89e1..4c008a4dc 100644 --- a/.github/workflows/build_recipes.yaml +++ b/.github/workflows/build_recipes.yaml @@ -51,6 +51,7 @@ jobs: - name: Install micromamba uses: mamba-org/setup-micromamba@v1 with: + micromamba-version: '1.5.8-0' environment-file: ci_env.yml environment-name: ci init-shell: bash From 20a52545f5e0b36573d706384f0f2ca7ace79818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Bourgin?= Date: Tue, 16 Jul 2024 16:43:10 +0200 Subject: [PATCH 163/333] Add libevalhyd (#1219) * add libevalhyd * Update recipe.yaml * Update recipe.yaml --------- Co-authored-by: Thorsten Beier --- .../recipes_emscripten/libevalhyd/recipe.yaml | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 recipes/recipes_emscripten/libevalhyd/recipe.yaml diff --git a/recipes/recipes_emscripten/libevalhyd/recipe.yaml b/recipes/recipes_emscripten/libevalhyd/recipe.yaml new file mode 100644 index 000000000..24e02cbc7 --- /dev/null +++ b/recipes/recipes_emscripten/libevalhyd/recipe.yaml @@ -0,0 +1,66 @@ +context: + name: libevalhyd + version: 0.1.2 + +package: + name: libevalhyd + version: ${{ version }} + +source: + url: https://gitlab.irstea.fr/HYCAR-Hydro/evalhyd/evalhyd-cpp/-/archive/v${{ version }}/evalhyd-cpp-v${{ version }}.tar.gz + sha256: 637ba5a227d890fc559fecf41a2c90ffe45629fc756e2d34ec1906b6c2a21b26 + +build: + number: 0 + script: + - if: win + then: | + cmake -G "Ninja" -D EVALHYD_BUILD_TEST=OFF -D CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% %SRC_DIR% + ninja install/ + else: | + cmake ${CMAKE_ARGS} -G "Ninja" -DEVALHYD_BUILD_TEST=OFF -DCMAKE_INSTALL_PREFIX=$PREFIX $SRC_DIR -DCMAKE_INSTALL_LIBDIR=lib + ninja install + +requirements: + build: + - ${{ compiler('cxx') }} + - cmake >=3.15 + - ninja + host: + - xtl >=0.7.5 + - xtensor >=0.24.6 + run: + - xtl >=0.7.5 + - xtensor >=0.24.6 + +tests: +- script: + - if: unix or emscripten + then: + - test -d ${PREFIX}/include/evalhyd + - test -f ${PREFIX}/include/evalhyd/evald.hpp + - test -f ${PREFIX}/include/evalhyd/evalp.hpp + - test -f ${PREFIX}/lib/cmake/EvalHyd/EvalHydConfig.cmake + - test -f ${PREFIX}/lib/cmake/EvalHyd/EvalHydConfigVersion.cmake + - if: win + then: + - if not exist %LIBRARY_PREFIX%\include\evalhyd\evald.hpp (exit 1) + - if not exist %LIBRARY_PREFIX%\include\evalhyd\evalp.hpp (exit 1) + - if not exist %LIBRARY_PREFIX%\lib\cmake\EvalHyd\EvalHydConfig.cmake (exit 1) + - if not exist %LIBRARY_PREFIX%\lib\cmake\EvalHyd\EvalHydConfigVersion.cmake (exit 1) + +about: + homepage: https://hydrogr.github.io/evalhyd + license: GPL-3.0-or-later + license_file: LICENCE.rst + summary: A C++ library to evaluate streamflow predictions + description: | + A header-only C++ library to evaluate deterministic and + probabilistic streamflow predictions + documentation: https://hydrogr.github.io/evalhyd/cpp + repository: https://gitlab.irstea.fr/HYCAR-Hydro/evalhyd/evalhyd-cpp + +extra: + recipe-maintainers: + - fbourgin + - ThibHlln From a1763c20382c6ae49822dfa2fb8cb6658a404a66 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Tue, 16 Jul 2024 08:30:40 -0700 Subject: [PATCH 164/333] Update ci_env.yml (#1221) remove extra space --- ci_env.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci_env.yml b/ci_env.yml index 25bce7102..44dab6281 100644 --- a/ci_env.yml +++ b/ci_env.yml @@ -5,7 +5,7 @@ dependencies: - python - ruamel.yaml - typer - - rattler-build >= 0.18.1 + - rattler-build >=0.18.1 - pixi - jinja2 - curl From 4ea225387ce722b1cbf840b42824286a7863d60c Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Tue, 16 Jul 2024 13:20:22 -0700 Subject: [PATCH 165/333] add qhull and update matplotlib (#1205) --- .../matplotlib/build-base.sh | 33 + .../recipes_emscripten/matplotlib/build.sh | 28 - .../matplotlib/emscripten.meson.cross | 16 + .../matplotlib/mplsetup.cfg | 2 - .../patches/disable_macosx_backend.patch | 17 - .../recipes_emscripten/matplotlib/recipe.yaml | 31 +- .../recipes_emscripten/matplotlib/setupext.py | 736 ------------------ recipes/recipes_emscripten/qhull/build.sh | 11 + recipes/recipes_emscripten/qhull/recipe.yaml | 50 ++ 9 files changed, 123 insertions(+), 801 deletions(-) create mode 100644 recipes/recipes_emscripten/matplotlib/build-base.sh delete mode 100644 recipes/recipes_emscripten/matplotlib/build.sh create mode 100644 recipes/recipes_emscripten/matplotlib/emscripten.meson.cross delete mode 100644 recipes/recipes_emscripten/matplotlib/mplsetup.cfg delete mode 100644 recipes/recipes_emscripten/matplotlib/patches/disable_macosx_backend.patch delete mode 100644 recipes/recipes_emscripten/matplotlib/setupext.py create mode 100644 recipes/recipes_emscripten/qhull/build.sh create mode 100644 recipes/recipes_emscripten/qhull/recipe.yaml diff --git a/recipes/recipes_emscripten/matplotlib/build-base.sh b/recipes/recipes_emscripten/matplotlib/build-base.sh new file mode 100644 index 000000000..16e4f6255 --- /dev/null +++ b/recipes/recipes_emscripten/matplotlib/build-base.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# Set up the cross file +# Note: the include folder is moved to `$BUILD_PREFIX` by the cross-python activation script +export NUMPY_INCLUDE_DIR="$BUILD_PREFIX/lib/python${PY_VER}/site-packages/numpy/core/include" + +# write out the cross file +sed "s|@(NUMPY_INCLUDE_DIR)|${NUMPY_INCLUDE_DIR}|g" $RECIPE_DIR/emscripten.meson.cross > $SRC_DIR/emscripten.meson.cross.temp +sed "s|@(PYTHON)|${PYTHON}|g" $SRC_DIR/emscripten.meson.cross.temp > $SRC_DIR/emscripten.meson.cross +rm $SRC_DIR/emscripten.meson.cross.temp + +cat $SRC_DIR/emscripten.meson.cross + +export CFLAGS="$CFLAGS -sWASM_BIGINT" +export CXXFLAGS="$CXXFLAGS -sWASM_BIGINT" +export LDFLAGS="$LDFLAGS -sWASM_BIGINT" + +${PYTHON} -m pip install . -vvv --no-deps --no-build-isolation \ + -Csetup-args="--cross-file=$SRC_DIR/emscripten.meson.cross" \ + -Csetup-args="-Dsystem-freetype=true" \ + -Csetup-args="-Dsystem-qhull=true" \ + -Csetup-args="-Dmacosx=false" + +export MATPLOTLIB_LOCATION=$PREFIX/lib/python$PY_VER/site-packages/matplotlib + +# Pre-built font cache +cp $RECIPE_DIR/src/fontlist.json $MATPLOTLIB_LOCATION/ +cp $RECIPE_DIR/src/Humor-Sans-1.0.ttf $MATPLOTLIB_LOCATION/mpl-data/fonts/ttf/Humor-Sans.ttf + +# Save space by removing unneeded code +rm -rf $MATPLOTLIB_LOCATION/backends/qt_editor +rm -rf $MATPLOTLIB_LOCATION/backends/web_backend +rm -rf $MATPLOTLIB_LOCATION/sphinxext \ No newline at end of file diff --git a/recipes/recipes_emscripten/matplotlib/build.sh b/recipes/recipes_emscripten/matplotlib/build.sh deleted file mode 100644 index 0ae3846b3..000000000 --- a/recipes/recipes_emscripten/matplotlib/build.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -$EMSCRIPTEN_FORGE_EMSDK_DIR/upstream/emscripten/embuilder build freetype --pic - -export LDFLAGS="$LDFLAGS -s USE_FREETYPE=1 -s USE_LIBPNG=1 -s USE_ZLIB=1" -export CFLAGS="$CFLAGS -s USE_FREETYPE=1 -s USE_LIBPNG=1 -s USE_ZLIB=1" - -$PYTHON -m pip install . --no-deps - -export MATPLOTLIB_LOCATION=$PREFIX/lib/python$PY_VER/site-packages/matplotlib - -# Pre-built font cache -cp $RECIPE_DIR/src/fontlist.json $MATPLOTLIB_LOCATION/ -cp $RECIPE_DIR/src/Humor-Sans-1.0.ttf $MATPLOTLIB_LOCATION/mpl-data/fonts/ttf/Humor-Sans.ttf - -# Save space by removing unneeded code -rm -rf $MATPLOTLIB_LOCATION/backends/qt_editor -rm -rf $MATPLOTLIB_LOCATION/backends/web_backend -rm -rf $MATPLOTLIB_LOCATION/sphinxext - - -# rename import _qhull to import _qhull_matplotlib in file F -F=$MATPLOTLIB_LOCATION/tri/triangulation.py -sed -i 's/_qhull/_qhull_matplotlib/g' $F - -# rename file $MATPLOTLIB_LOCATION/_qhull.* to $MATPLOTLIB_LOCATION/_qhull_matplotlib.* -mv $MATPLOTLIB_LOCATION/_qhull.cpython-311-wasm32-emscripten.so $MATPLOTLIB_LOCATION/_qhull_matplotlib.cpython-311-wasm32-emscripten.so - diff --git a/recipes/recipes_emscripten/matplotlib/emscripten.meson.cross b/recipes/recipes_emscripten/matplotlib/emscripten.meson.cross new file mode 100644 index 000000000..564ce7f4e --- /dev/null +++ b/recipes/recipes_emscripten/matplotlib/emscripten.meson.cross @@ -0,0 +1,16 @@ +[properties] +needs_exe_wrapper = true +skip_sanity_check = true +longdouble_format = 'IEEE_QUAD_LE' # for numpy +numpy-include-dir = '@(NUMPY_INCLUDE_DIR)' + +[host_machine] +system = 'emscripten' +cpu_family = 'wasm32' +cpu = 'wasm' +endian = 'little' + +[binaries] +exe_wrapper = 'node' +pkg-config = 'pkg-config' +python = '@(PYTHON)' \ No newline at end of file diff --git a/recipes/recipes_emscripten/matplotlib/mplsetup.cfg b/recipes/recipes_emscripten/matplotlib/mplsetup.cfg deleted file mode 100644 index 9554d51a4..000000000 --- a/recipes/recipes_emscripten/matplotlib/mplsetup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[libs] -system_freetype = true diff --git a/recipes/recipes_emscripten/matplotlib/patches/disable_macosx_backend.patch b/recipes/recipes_emscripten/matplotlib/patches/disable_macosx_backend.patch deleted file mode 100644 index 455d571a2..000000000 --- a/recipes/recipes_emscripten/matplotlib/patches/disable_macosx_backend.patch +++ /dev/null @@ -1,17 +0,0 @@ -This comes from #541. We let it as is in case it helps building on Mac. - -diff --git a/setupext.py b/setupext.py -index e41ab98fe1..d0e26d484d 100644 ---- a/setupext.py -+++ b/setupext.py -@@ -724,6 +724,7 @@ class BackendMacOSX(OptionalPackage): - name = 'macosx' - - def check(self): -+ raise Skipped("MacOSX backend disabled") - if sys.platform != 'darwin': - raise Skipped("Mac OS-X only") - return super().check() --- -2.35.1 - diff --git a/recipes/recipes_emscripten/matplotlib/recipe.yaml b/recipes/recipes_emscripten/matplotlib/recipe.yaml index 3ac4a1016..b351954ae 100644 --- a/recipes/recipes_emscripten/matplotlib/recipe.yaml +++ b/recipes/recipes_emscripten/matplotlib/recipe.yaml @@ -1,51 +1,45 @@ context: name: matplotlib - version: 3.8.4 - -# package: -# name: ${{ name|lower }} -# version: ${{ version }} + version: "3.9.1" source: - url: https://github.com/matplotlib/matplotlib/archive/v${{ version }}.tar.gz - sha256: 7c4f370b7550eec8342c102f9dd80da3bec2895d7f514f5f6378764db4cb0e35 - # sha256: 5ac5ca25e6ecd1e7711e1f859b4b6f74f290ef517387d1502bf8012bf2b1647e + sha256: 4fdf46dc325fdf4cbc61f7fa66de7b48287df0a71b3442b63ff0784041cae2e7 patches: - - patches/disable_macosx_backend.patch - patches/fix-threading-and-font-cache.patch -- path: mplsetup.cfg -- path: setupext.py build: number: 0 - outputs: - package: name: matplotlib-base version: ${{ version }} build: - script: build.sh + script: build-base.sh requirements: build: - python - - numpy - - cross-python_emscripten-wasm32 - - pybind11 + - pip + - cross-python_${{ target_platform }} - ${{ compiler('c') }} - ${{ compiler('cxx') }} - pkg-config + - meson-python - # TODO add certifi package to emscripten-wasm32 and depend in host on this - - certifi - - pip - setuptools_scm_git_archive + # to template the emscripten.meson.cross file + - sed + host: - python - numpy - pybind11 + - freetype + - qhull + run: - contourpy - cycler @@ -61,6 +55,7 @@ outputs: - package: name: matplotlib version: ${{ version }} + requirements: host: - python diff --git a/recipes/recipes_emscripten/matplotlib/setupext.py b/recipes/recipes_emscripten/matplotlib/setupext.py deleted file mode 100644 index 861ea6c8c..000000000 --- a/recipes/recipes_emscripten/matplotlib/setupext.py +++ /dev/null @@ -1,736 +0,0 @@ -import configparser -import functools -import hashlib -from io import BytesIO -import logging -import os -from pathlib import Path -import platform -import shlex -import shutil -import subprocess -import sys -import sysconfig -import tarfile -import textwrap -import urllib.request - -from setuptools import Distribution, Extension - -_log = logging.getLogger(__name__) - - -def _get_xdg_cache_dir(): - """ - Return the XDG cache directory. - - See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html - """ - cache_dir = os.environ.get('XDG_CACHE_HOME') - if not cache_dir: - cache_dir = os.path.expanduser('~/.cache') - if cache_dir.startswith('~/'): # Expansion failed. - return None - return Path(cache_dir, 'matplotlib') - - -def _get_hash(data): - """Compute the sha256 hash of *data*.""" - hasher = hashlib.sha256() - hasher.update(data) - return hasher.hexdigest() - - -@functools.lru_cache() -def _get_ssl_context(): - import certifi - import ssl - return ssl.create_default_context(cafile=certifi.where()) - - -def get_from_cache_or_download(url, sha): - """ - Get bytes from the given url or local cache. - - Parameters - ---------- - url : str - The url to download. - sha : str - The sha256 of the file. - - Returns - ------- - BytesIO - The file loaded into memory. - """ - cache_dir = _get_xdg_cache_dir() - - if cache_dir is not None: # Try to read from cache. - try: - data = (cache_dir / sha).read_bytes() - except IOError: - pass - else: - if _get_hash(data) == sha: - return BytesIO(data) - - # jQueryUI's website blocks direct downloads from urllib.request's - # default User-Agent, but not (for example) wget; so I don't feel too - # bad passing in an empty User-Agent. - with urllib.request.urlopen( - urllib.request.Request(url, headers={"User-Agent": ""}), - context=_get_ssl_context()) as req: - data = req.read() - - file_sha = _get_hash(data) - if file_sha != sha: - raise Exception( - f"The downloaded file does not match the expected sha. {url} was " - f"expected to have {sha} but it had {file_sha}") - - if cache_dir is not None: # Try to cache the downloaded file. - try: - cache_dir.mkdir(parents=True, exist_ok=True) - with open(cache_dir / sha, "xb") as fout: - fout.write(data) - except IOError: - pass - - return BytesIO(data) - - -def get_and_extract_tarball(urls, sha, dirname): - """ - Obtain a tarball (from cache or download) and extract it. - - Parameters - ---------- - urls : list[str] - URLs from which download is attempted (in order of attempt), if the - tarball is not in the cache yet. - sha : str - SHA256 hash of the tarball; used both as a cache key (by - `get_from_cache_or_download`) and to validate a downloaded tarball. - dirname : path-like - Directory where the tarball is extracted. - """ - toplevel = Path("build", dirname) - if not toplevel.exists(): # Download it or load it from cache. - Path("build").mkdir(exist_ok=True) - for url in urls: - try: - tar_contents = get_from_cache_or_download(url, sha) - break - except Exception: - pass - else: - raise IOError( - f"Failed to download any of the following: {urls}. " - f"Please download one of these urls and extract it into " - f"'build/' at the top-level of the source repository.") - print("Extracting {}".format(urllib.parse.urlparse(url).path)) - with tarfile.open(fileobj=tar_contents, mode="r:gz") as tgz: - if os.path.commonpath(tgz.getnames()) != dirname: - raise IOError( - f"The downloaded tgz file was expected to have {dirname} " - f"as sole top-level directory, but that is not the case") - tgz.extractall("build") - return toplevel - - -# SHA256 hashes of the FreeType tarballs -_freetype_hashes = { - '2.6.1': - '0a3c7dfbda6da1e8fce29232e8e96d987ababbbf71ebc8c75659e4132c367014', - '2.6.2': - '8da42fc4904e600be4b692555ae1dcbf532897da9c5b9fb5ebd3758c77e5c2d4', - '2.6.3': - '7942096c40ee6fea882bd4207667ad3f24bff568b96b10fd3885e11a7baad9a3', - '2.6.4': - '27f0e38347a1850ad57f84fc4dfed68ba0bc30c96a6fa6138ef84d485dd9a8d7', - '2.6.5': - '3bb24add9b9ec53636a63ea8e867ed978c4f8fdd8f1fa5ccfd41171163d4249a', - '2.7': - '7b657d5f872b0ab56461f3bd310bd1c5ec64619bd15f0d8e08282d494d9cfea4', - '2.7.1': - '162ef25aa64480b1189cdb261228e6c5c44f212aac4b4621e28cf2157efb59f5', - '2.8': - '33a28fabac471891d0523033e99c0005b95e5618dc8ffa7fa47f9dadcacb1c9b', - '2.8.1': - '876711d064a6a1bd74beb18dd37f219af26100f72daaebd2d86cb493d7cd7ec6', - '2.9': - 'bf380e4d7c4f3b5b1c1a7b2bf3abb967bda5e9ab480d0df656e0e08c5019c5e6', - '2.9.1': - 'ec391504e55498adceb30baceebd147a6e963f636eb617424bcfc47a169898ce', - '2.10.0': - '955e17244e9b38adb0c98df66abb50467312e6bb70eac07e49ce6bd1a20e809a', - '2.10.1': - '3a60d391fd579440561bf0e7f31af2222bc610ad6ce4d9d7bd2165bca8669110', -} -# This is the version of FreeType to use when building a local version. It -# must match the value in lib/matplotlib.__init__.py and also needs to be -# changed below in the embedded windows build script (grep for "REMINDER" in -# this file). Also update the cache path in `.circleci/config.yml`. -LOCAL_FREETYPE_VERSION = '2.6.1' -LOCAL_FREETYPE_HASH = _freetype_hashes.get(LOCAL_FREETYPE_VERSION, 'unknown') - -# Also update the cache path in `.circleci/config.yml`. -LOCAL_QHULL_VERSION = '2020.2' -LOCAL_QHULL_HASH = 'b5c2d7eb833278881b952c8a52d20179eab87766b00b865000469a45c1838b7e' - - -# Matplotlib build options, which can be altered using mplsetup.cfg -mplsetup_cfg = os.environ.get('MPLSETUPCFG') or 'mplsetup.cfg' -config = configparser.ConfigParser() -if os.path.exists(mplsetup_cfg): - config.read(mplsetup_cfg) -options = { - 'backend': config.get('rc_options', 'backend', fallback=None), - 'system_freetype': config.getboolean( - 'libs', 'system_freetype', fallback=sys.platform.startswith('aix')), - 'system_qhull': config.getboolean( - 'libs', 'system_qhull', fallback=False), -} - -print("\n\nTHE OPTIONS\n", options) - - -if '-q' in sys.argv or '--quiet' in sys.argv: - def print_raw(*args, **kwargs): pass # Suppress our own output. -else: - print_raw = print - - -def print_status(package, status): - initial_indent = "%12s: " % package - indent = ' ' * 18 - print_raw(textwrap.fill(str(status), width=80, - initial_indent=initial_indent, - subsequent_indent=indent)) - - -@functools.lru_cache(1) # We only need to compute this once. -def get_pkg_config(): - """ - Get path to pkg-config and set up the PKG_CONFIG environment variable. - """ - if sys.platform == 'win32': - return None - pkg_config = os.environ.get('PKG_CONFIG') or 'pkg-config' - if shutil.which(pkg_config) is None: - print( - "IMPORTANT WARNING:\n" - " pkg-config is not installed.\n" - " Matplotlib may not be able to find some of its dependencies.") - return None - pkg_config_path = sysconfig.get_config_var('LIBDIR') - if pkg_config_path is not None: - pkg_config_path = os.path.join(pkg_config_path, 'pkgconfig') - try: - os.environ['PKG_CONFIG_PATH'] += ':' + pkg_config_path - except KeyError: - os.environ['PKG_CONFIG_PATH'] = pkg_config_path - return pkg_config - - -def pkg_config_setup_extension( - ext, package, - atleast_version=None, alt_exec=None, default_libraries=()): - """Add parameters to the given *ext* for the given *package*.""" - - # First, try to get the flags from pkg-config. - - pkg_config = get_pkg_config() - cmd = [pkg_config, package] if pkg_config else alt_exec - if cmd is not None: - try: - if pkg_config and atleast_version: - subprocess.check_call( - [*cmd, f"--atleast-version={atleast_version}"]) - # Use sys.getfilesystemencoding() to allow round-tripping - # when passed back to later subprocess calls; do not use - # locale.getpreferredencoding() which universal_newlines=True - # would do. - cflags = shlex.split( - os.fsdecode(subprocess.check_output([*cmd, "--cflags"]))) - libs = shlex.split( - os.fsdecode(subprocess.check_output([*cmd, "--libs"]))) - except (OSError, subprocess.CalledProcessError): - pass - else: - ext.extra_compile_args.extend(cflags) - ext.extra_link_args.extend(libs) - return - - # If that fails, fall back on the defaults. - - # conda Windows header and library paths. - # https://github.com/conda/conda/issues/2312 re: getting the env dir. - if sys.platform == 'win32': - conda_env_path = (os.getenv('CONDA_PREFIX') # conda >= 4.1 - or os.getenv('CONDA_DEFAULT_ENV')) # conda < 4.1 - if conda_env_path and os.path.isdir(conda_env_path): - conda_env_path = Path(conda_env_path) - ext.include_dirs.append(str(conda_env_path / "Library/include")) - ext.library_dirs.append(str(conda_env_path / "Library/lib")) - - # Default linked libs. - ext.libraries.extend(default_libraries) - - -class Skipped(Exception): - """ - Exception thrown by `SetupPackage.check` to indicate that a package should - be skipped. - """ - - -class SetupPackage: - - def check(self): - """ - If the package should be installed, return an informative string, or - None if no information should be displayed at all. - - If the package should be skipped, raise a `Skipped` exception. - - If a missing build dependency is fatal, call `sys.exit`. - """ - - def get_package_data(self): - """ - Get a package data dictionary to add to the configuration. - These are merged into to the *package_data* list passed to - `setuptools.setup`. - """ - return {} - - def get_extensions(self): - """ - Return or yield a list of C extensions (`distutils.core.Extension` - objects) to add to the configuration. These are added to the - *extensions* list passed to `setuptools.setup`. - """ - return [] - - def do_custom_build(self, env): - """ - If a package needs to do extra custom things, such as building a - third-party library, before building an extension, it should - override this method. - """ - - -class OptionalPackage(SetupPackage): - config_category = "packages" - default_config = True - - def check(self): - """ - Check whether ``mplsetup.cfg`` requests this package to be installed. - - May be overridden by subclasses for additional checks. - """ - if config.getboolean(self.config_category, self.name, - fallback=self.default_config): - return "installing" - else: # Configuration opt-out by user - raise Skipped("skipping due to configuration") - - -class Platform(SetupPackage): - name = "platform" - - def check(self): - return sys.platform - - -class Python(SetupPackage): - name = "python" - - def check(self): - return sys.version - - -def _pkg_data_helper(pkg, subdir): - """Glob "lib/$pkg/$subdir/**/*", returning paths relative to "lib/$pkg".""" - base = Path("lib", pkg) - return [str(path.relative_to(base)) for path in (base / subdir).rglob("*")] - - -class Matplotlib(SetupPackage): - name = "matplotlib" - - def get_package_data(self): - return { - 'matplotlib': [ - 'mpl-data/matplotlibrc', - *_pkg_data_helper('matplotlib', 'mpl-data'), - *_pkg_data_helper('matplotlib', 'backends/web_backend'), - '*.dll', # Only actually matters on Windows. - ], - } - - def get_extensions(self): - # agg - ext = Extension( - "matplotlib.backends._backend_agg", [ - "src/py_converters.cpp", - "src/_backend_agg.cpp", - "src/_backend_agg_wrapper.cpp", - ]) - add_numpy_flags(ext) - add_libagg_flags_and_sources(ext) - FreeType.add_flags(ext) - yield ext - # c_internal_utils - ext = Extension( - "matplotlib._c_internal_utils", ["src/_c_internal_utils.c"], - libraries=({ - "linux": ["dl"], - "win32": ["ole32", "shell32", "user32"], - }.get(sys.platform, []))) - yield ext - add_numpy_flags(ext) - add_libagg_flags(ext) - yield ext - # ft2font - ext = Extension( - "matplotlib.ft2font", [ - "src/ft2font.cpp", - "src/ft2font_wrapper.cpp", - "src/py_converters.cpp", - ]) - FreeType.add_flags(ext) - add_numpy_flags(ext) - add_libagg_flags(ext) - yield ext - # image - ext = Extension( - "matplotlib._image", [ - "src/_image_wrapper.cpp", - "src/py_converters.cpp", - ]) - add_numpy_flags(ext) - add_libagg_flags_and_sources(ext) - yield ext - # path - ext = Extension( - "matplotlib._path", [ - "src/py_converters.cpp", - "src/_path_wrapper.cpp", - ]) - add_numpy_flags(ext) - add_libagg_flags_and_sources(ext) - yield ext - # qhull - ext = Extension( - "matplotlib._qhull", ["src/_qhull_wrapper.cpp"], - define_macros=[("MPL_DEVNULL", os.devnull)]) - add_numpy_flags(ext) - Qhull.add_flags(ext) - yield ext - # tkagg - ext = Extension( - "matplotlib.backends._tkagg", [ - "src/_tkagg.cpp", - ], - include_dirs=["src"], - # psapi library needed for finding Tcl/Tk at run time. - libraries={"linux": ["dl"], "win32": ["comctl32", "psapi"], - "cygwin": ["comctl32", "psapi"]}.get(sys.platform, []), - extra_link_args={"win32": ["-mwindows"]}.get(sys.platform, [])) - add_numpy_flags(ext) - add_libagg_flags(ext) - yield ext - # tri - ext = Extension( - "matplotlib._tri", [ - "src/tri/_tri.cpp", - "src/tri/_tri_wrapper.cpp", - ]) - add_numpy_flags(ext) - yield ext - # ttconv - ext = Extension( - "matplotlib._ttconv", [ - "src/_ttconv.cpp", - "extern/ttconv/pprdrv_tt.cpp", - "extern/ttconv/pprdrv_tt2.cpp", - "extern/ttconv/ttutil.cpp", - ], - include_dirs=["extern"]) - add_numpy_flags(ext) - yield ext - - -class Tests(OptionalPackage): - name = "tests" - default_config = False - - def get_package_data(self): - return { - 'matplotlib': [ - *_pkg_data_helper('matplotlib', 'tests/baseline_images'), - *_pkg_data_helper('matplotlib', 'tests/tinypages'), - 'tests/cmr10.pfb', - 'tests/mpltest.ttf', - 'tests/test_*.ipynb', - ], - 'mpl_toolkits': [ - *_pkg_data_helper('mpl_toolkits', 'tests/baseline_images'), - ] - } - - -def add_numpy_flags(ext): - import numpy as np - ext.include_dirs.append(np.get_include()) - ext.define_macros.extend([ - # Ensure that PY_ARRAY_UNIQUE_SYMBOL is uniquely defined for each - # extension. - ('PY_ARRAY_UNIQUE_SYMBOL', - 'MPL_' + ext.name.replace('.', '_') + '_ARRAY_API'), - ('NPY_NO_DEPRECATED_API', 'NPY_1_7_API_VERSION'), - # Allow NumPy's printf format specifiers in C++. - ('__STDC_FORMAT_MACROS', 1), - ]) - - -def add_libagg_flags(ext): - # We need a patched Agg not available elsewhere, so always use the vendored - # version. - ext.include_dirs.insert(0, "extern/agg24-svn/include") - - -def add_libagg_flags_and_sources(ext): - # We need a patched Agg not available elsewhere, so always use the vendored - # version. - ext.include_dirs.insert(0, "extern/agg24-svn/include") - agg_sources = [ - "agg_bezier_arc.cpp", - "agg_curves.cpp", - "agg_image_filters.cpp", - "agg_trans_affine.cpp", - "agg_vcgen_contour.cpp", - "agg_vcgen_dash.cpp", - "agg_vcgen_stroke.cpp", - "agg_vpgen_segmentator.cpp", - ] - ext.sources.extend( - os.path.join("extern", "agg24-svn", "src", x) for x in agg_sources) - - -def get_ccompiler(): - """ - Return a new CCompiler instance. - - CCompiler used to be constructible via `distutils.ccompiler.new_compiler`, - but this API was removed as part of the distutils deprecation. Instead, - we trick setuptools into instantiating it by creating a dummy Distribution - with a list of extension modules that claims to be truthy, but is actually - empty, and then running the Distribution's build_ext command. (If using - a plain empty ext_modules, build_ext would early-return without doing - anything.) - """ - - class L(list): - def __bool__(self): - return True - - build_ext = Distribution({"ext_modules": L()}).get_command_obj("build_ext") - build_ext.finalize_options() - build_ext.run() - return build_ext.compiler - - -class FreeType(SetupPackage): - name = "freetype" - - @classmethod - def add_flags(cls, ext): - # checkdep_freetype2.c immediately aborts the compilation either with - # "foo.h: No such file or directory" if the header is not found, or an - # appropriate error message if the header indicates a too-old version. - ext.sources.insert(0, 'src/checkdep_freetype2.c') - if options.get('system_freetype'): - pkg_config_setup_extension( - # FreeType 2.3 has libtool version 9.11.3 as can be checked - # from the tarball. For FreeType>=2.4, there is a conversion - # table in docs/VERSIONS.txt in the FreeType source tree. - ext, 'freetype2', - atleast_version='9.11.3', - alt_exec=['freetype-config'], - default_libraries=['freetype']) - ext.define_macros.append(('FREETYPE_BUILD_TYPE', 'system')) - else: - src_path = Path('build', f'freetype-{LOCAL_FREETYPE_VERSION}') - # Statically link to the locally-built freetype. - # This is certainly broken on Windows. - ext.include_dirs.insert(0, str(src_path / 'include')) - if sys.platform == 'win32': - libfreetype = 'libfreetype.lib' - else: - libfreetype = 'libfreetype.a' - ext.extra_objects.insert( - 0, str(src_path / 'objs' / '.libs' / libfreetype)) - ext.define_macros.append(('FREETYPE_BUILD_TYPE', 'local')) - - def do_custom_build(self, env): - # We're using a system freetype - if options.get('system_freetype'): - return - - tarball = f'freetype-{LOCAL_FREETYPE_VERSION}.tar.gz' - src_path = get_and_extract_tarball( - urls=[ - (f'https://downloads.sourceforge.net/project/freetype' - f'/freetype2/{LOCAL_FREETYPE_VERSION}/{tarball}'), - (f'https://download.savannah.gnu.org/releases/freetype' - f'/{tarball}'), - (f'https://download.savannah.gnu.org/releases/freetype' - f'/freetype-old/{tarball}') - ], - sha=LOCAL_FREETYPE_HASH, - dirname=f'freetype-{LOCAL_FREETYPE_VERSION}', - ) - - if sys.platform == 'win32': - libfreetype = 'libfreetype.lib' - else: - libfreetype = 'libfreetype.a' - if (src_path / 'objs' / '.libs' / libfreetype).is_file(): - return # Bail out because we have already built FreeType. - - print(f"Building freetype in {src_path}") - if sys.platform != 'win32': # compilation on non-windows - env = { - **{ - var: value - for var, value in sysconfig.get_config_vars().items() - if var in {"CC", "CFLAGS", "CXX", "CXXFLAGS", "LD", - "LDFLAGS"} - }, - **env, - } - env["CFLAGS"] = env.get("CFLAGS", "") + " -fPIC" - configure = [ - "./configure", "--with-zlib=no", "--with-bzip2=no", - "--with-png=no", "--with-harfbuzz=no", "--enable-static", - "--disable-shared" - ] - host = sysconfig.get_config_var('BUILD_GNU_TYPE') - if host is not None: # May be unset on PyPy. - configure.append(f"--host={host}") - subprocess.check_call(configure, env=env, cwd=src_path) - if 'GNUMAKE' in env: - make = env['GNUMAKE'] - elif 'MAKE' in env: - make = env['MAKE'] - else: - try: - output = subprocess.check_output(['make', '-v'], - stderr=subprocess.DEVNULL) - except subprocess.CalledProcessError: - output = b'' - if b'GNU' not in output and b'makepp' not in output: - make = 'gmake' - else: - make = 'make' - subprocess.check_call([make], env=env, cwd=src_path) - else: # compilation on windows - shutil.rmtree(src_path / "objs", ignore_errors=True) - msbuild_platform = ( - 'x64' if platform.architecture()[0] == '64bit' else 'Win32') - base_path = Path("build/freetype-2.6.1/builds/windows") - vc = 'vc2010' - sln_path = ( - base_path / vc / "freetype.sln" - ) - # https://developercommunity.visualstudio.com/comments/190992/view.html - (sln_path.parent / "Directory.Build.props").write_text(""" - - - - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) - - -""") - # It is not a trivial task to determine PlatformToolset to plug it - # into msbuild command, and Directory.Build.props will not override - # the value in the project file. - # The DefaultPlatformToolset is from Microsoft.Cpp.Default.props - with open(base_path / vc / "freetype.vcxproj", 'r+b') as f: - toolset_repl = b'PlatformToolset>$(DefaultPlatformToolset)<' - vcxproj = f.read().replace(b'PlatformToolset>v100<', - toolset_repl) - assert toolset_repl in vcxproj, ( - 'Upgrading Freetype might break this') - f.seek(0) - f.truncate() - f.write(vcxproj) - - cc = get_ccompiler() - cc.initialize() # Get msbuild in the %PATH% of cc.spawn. - cc.spawn(["msbuild", str(sln_path), - "/t:Clean;Build", - f"/p:Configuration=Release;Platform={msbuild_platform}"]) - # Move to the corresponding Unix build path. - (src_path / "objs" / ".libs").mkdir() - # Be robust against change of FreeType version. - lib_path, = (src_path / "objs" / vc / msbuild_platform).glob( - "freetype*.lib") - shutil.copy2(lib_path, src_path / "objs/.libs/libfreetype.lib") - - -class Qhull(SetupPackage): - name = "qhull" - _extensions_to_update = [] - - @classmethod - def add_flags(cls, ext): - if options.get("system_qhull"): - ext.libraries.append("qhull_r") - else: - cls._extensions_to_update.append(ext) - - def do_custom_build(self, env): - if options.get('system_qhull'): - return - - toplevel = get_and_extract_tarball( - urls=["http://www.qhull.org/download/qhull-2020-src-8.0.2.tgz"], - sha=LOCAL_QHULL_HASH, - dirname=f"qhull-{LOCAL_QHULL_VERSION}", - ) - shutil.copyfile(toplevel / "COPYING.txt", "LICENSE/LICENSE_QHULL") - - for ext in self._extensions_to_update: - qhull_path = Path(f'build/qhull-{LOCAL_QHULL_VERSION}/src') - ext.include_dirs.insert(0, str(qhull_path)) - ext.sources.extend(map(str, sorted(qhull_path.glob('libqhull_r/*.c')))) - if sysconfig.get_config_var("LIBM") == "-lm": - ext.libraries.extend("m") - - -class BackendMacOSX(OptionalPackage): - config_category = 'gui_support' - name = 'macosx' - - def check(self): - raise Skipped("MacOSX backend disabled") - if sys.platform != 'darwin': - raise Skipped("Mac OS-X only") - return super().check() - - def get_extensions(self): - sources = [ - 'src/_macosx.m' - ] - ext = Extension('matplotlib.backends._macosx', sources) - ext.extra_compile_args.extend(['-Werror=unguarded-availability']) - ext.extra_link_args.extend(['-framework', 'Cocoa']) - if platform.python_implementation().lower() == 'pypy': - ext.extra_compile_args.append('-DPYPY=1') - yield ext diff --git a/recipes/recipes_emscripten/qhull/build.sh b/recipes/recipes_emscripten/qhull/build.sh new file mode 100644 index 000000000..d629f54c9 --- /dev/null +++ b/recipes/recipes_emscripten/qhull/build.sh @@ -0,0 +1,11 @@ +mkdir -p qhull-build && cd qhull-build +cmake -GNinja $SRC_DIR $CMAKE_ARGS +ninja install + +cp qhull.wasm $PREFIX/bin/qhull.wasm +cp qhull.wasm $PREFIX/bin/qhull.wasm +cp rbox.wasm $PREFIX/bin/rbox.wasm +cp qconvex.wasm $PREFIX/bin/qconvex.wasm +cp qdelaunay.wasm $PREFIX/bin/qdelaunay.wasm +cp qvoronoi.wasm $PREFIX/bin/qvoronoi.wasm +cp qhalf.wasm $PREFIX/bin/qhalf.wasm \ No newline at end of file diff --git a/recipes/recipes_emscripten/qhull/recipe.yaml b/recipes/recipes_emscripten/qhull/recipe.yaml new file mode 100644 index 000000000..b11069ab2 --- /dev/null +++ b/recipes/recipes_emscripten/qhull/recipe.yaml @@ -0,0 +1,50 @@ +context: + version: "2020.2" + +package: + name: qhull + version: ${{ version }} + +source: + url: https://github.com/qhull/qhull/archive/${{ version }}.tar.gz + sha256: 59356b229b768e6e2b09a701448bfa222c37b797a84f87f864f97462d8dbc7c5 + +build: + number: 0 + +requirements: + build: + - ${{ compiler('cxx') }} + - cmake + - ninja + + run_exports: + - ${{ pin_subpackage('qhull', upper_bound='x.x') }} + +tests: + - package_contents: + lib: + - libqhull_r.a + - libqhullstatic.a + include: + - libqhull/libqhull.h + - libqhull_r/qhull_ra.h + - libqhullcpp/Qhull.h + bin: + - qhull.js + - qconvex.js + + - script: + - node $PREFIX/bin/qvoronoi.js - + - node $PREFIX/bin/qhull.js - + requirements: + build: + - nodejs + +about: + homepage: http://www.qhull.org/ + license: LicenseRef-Qhull + license_file: COPYING.txt + summary: Qhull computes the convex hull + documentation: http://www.qhull.org/html + repository: https://github.com/qhull/qhull From c05cc07251083a66df82f84ca4ef1fa34b35319e Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Tue, 16 Jul 2024 01:01:37 +0000 Subject: [PATCH 166/333] Update awkward-cpp from 34 to 35 --- recipes/recipes_emscripten/awkward-cpp/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/awkward-cpp/recipe.yaml b/recipes/recipes_emscripten/awkward-cpp/recipe.yaml index d9d136a9c..f1f523538 100644 --- a/recipes/recipes_emscripten/awkward-cpp/recipe.yaml +++ b/recipes/recipes_emscripten/awkward-cpp/recipe.yaml @@ -1,6 +1,6 @@ context: name: awkward-cpp - version: '34' + version: '35' package: name: ${{ name|lower }} @@ -9,7 +9,7 @@ package: source: url: https://pypi.io/packages/source/${{ name[0] }}/${{ name }}/awkward-cpp-${{ version }}.tar.gz - sha256: 39ac814d769f38ade9a5f6c39b85b07bbc05af56342fb15742edce1237f9e049 + sha256: 1f8b112a597bd2438794e1a721a63aa61869fa9598a17ac6bd811ad6f6400d06 build: number: 0 From 26a8bb354907e0f0519d1866f664d70d08aad28d Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Wed, 17 Jul 2024 06:56:27 +0200 Subject: [PATCH 167/333] Update glib from 2.80.2 to 2.80.3 (#1222) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/glib/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/glib/recipe.yaml b/recipes/recipes_emscripten/glib/recipe.yaml index b8b2878c2..410d7a85f 100644 --- a/recipes/recipes_emscripten/glib/recipe.yaml +++ b/recipes/recipes_emscripten/glib/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.80.2 + version: 2.80.3 major_minor: '2.80' package: @@ -9,7 +9,7 @@ package: source: url: https://download.gnome.org/sources/glib/${{ major_minor }}/glib-${{ version }}.tar.xz - sha256: b9cfb6f7a5bd5b31238fd5d56df226b2dda5ea37611475bf89f6a0f9400fe8bd + sha256: 3947a0eaddd0f3613d0230bb246d0c69e46142c19022f5c4b1b2e3cba236d417 # Patch from https://gist.github.com/kleisauke/acfa1c09522705efa5eb0541d2d00887 patches: - patches/glib.patch From 11d0079187b6781ebbf8488656025a0d4ed7576f Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Wed, 17 Jul 2024 10:45:00 +0200 Subject: [PATCH 168/333] Openssl changes (wasm-bigint / fpic) (#1224) * added -sWASM_BIGINT to openssl * wip... * sed * sed * ...debug * ...debug * openssl changes only --- recipes/recipes_emscripten/openssl/build.sh | 16 ++++++++++++---- recipes/recipes_emscripten/openssl/recipe.yaml | 4 ++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/recipes/recipes_emscripten/openssl/build.sh b/recipes/recipes_emscripten/openssl/build.sh index 6a36dd954..c1264f175 100644 --- a/recipes/recipes_emscripten/openssl/build.sh +++ b/recipes/recipes_emscripten/openssl/build.sh @@ -1,7 +1,15 @@ #!/bin/bash -emconfigure ./Configure gcc -no-ui-console -DHAVE_FORK=0 -DOPENSSL_NO_SECURE_MEMORY -DNO_SYSLOG -fPIC -sed -i '' -e 's!^CROSS_COMPILE=.*!!g' Makefile +emconfigure ./Configure gcc -no-ui-console -DHAVE_FORK=0 -DOPENSSL_NO_SECURE_MEMORY -DNO_SYSLOG -fPIC -sWASM_BIGINT + +# if on a mac +if [[ $(uname) == Darwin ]]; then + sed -i '' -e 's!^CROSS_COMPILE=.*!!g' Makefile +else + sed -i -e 's!^CROSS_COMPILE=.*!!g' Makefile +fi + + make build_generated make -j ${CPU_COUNT:-3} libcrypto.a make -j ${CPU_COUNT:-3} libssl.a @@ -12,8 +20,8 @@ emar -d libcrypto.a liblegacy-lib-bn_asm.o liblegacy-lib-des_enc.o liblegacy-lib mkdir -p ${PREFIX}/include mkdir -p ${PREFIX}/lib -emcc -sSIDE_MODULE=1 libcrypto.a -o ${PREFIX}/lib/libcrypto.so -emcc -sSIDE_MODULE=1 libssl.a -o ${PREFIX}/lib/libssl.so +emcc -sSIDE_MODULE=1 libcrypto.a -o ${PREFIX}/lib/libcrypto.so -sWASM_BIGINT +emcc -sSIDE_MODULE=1 libssl.a -o ${PREFIX}/lib/libssl.so -sWASM_BIGINT cp -r include/crypto ${PREFIX}/include/crypto diff --git a/recipes/recipes_emscripten/openssl/recipe.yaml b/recipes/recipes_emscripten/openssl/recipe.yaml index fd52be0ab..efce7ab54 100644 --- a/recipes/recipes_emscripten/openssl/recipe.yaml +++ b/recipes/recipes_emscripten/openssl/recipe.yaml @@ -7,10 +7,10 @@ package: source: url: https://www.openssl.org/source/openssl-${{ version }}.tar.gz - sha256: f89199be8b23ca45fc7cb9f1d8d3ee67312318286ad030f5316aca6462db6c96 + sha256: cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8 build: - number: 7 + number: 8 requirements: build: From dadffa42e019646898b223e97ef54eb9504dc32a Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Thu, 18 Jul 2024 00:59:29 +0000 Subject: [PATCH 169/333] Update glib from 2.80.3 to 2.80.4 --- recipes/recipes_emscripten/glib/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/glib/recipe.yaml b/recipes/recipes_emscripten/glib/recipe.yaml index 410d7a85f..2c0c87818 100644 --- a/recipes/recipes_emscripten/glib/recipe.yaml +++ b/recipes/recipes_emscripten/glib/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.80.3 + version: 2.80.4 major_minor: '2.80' package: @@ -9,7 +9,7 @@ package: source: url: https://download.gnome.org/sources/glib/${{ major_minor }}/glib-${{ version }}.tar.xz - sha256: 3947a0eaddd0f3613d0230bb246d0c69e46142c19022f5c4b1b2e3cba236d417 + sha256: 24e029c5dfc9b44e4573697adf33078a9827c48938555004b3b9096fa4ea034f # Patch from https://gist.github.com/kleisauke/acfa1c09522705efa5eb0541d2d00887 patches: - patches/glib.patch From 5a7b67f6ec81a7b55d712127156c7bb68c4303a8 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Sun, 21 Jul 2024 01:05:22 +0000 Subject: [PATCH 170/333] Update pytest from 8.2.2 to 8.3.0 --- 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 be5fe78ae..de0ca384d 100644 --- a/recipes/recipes_emscripten/pytest/recipe.yaml +++ b/recipes/recipes_emscripten/pytest/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 8.2.2 + version: 8.3.0 package: name: pytest @@ -7,7 +7,7 @@ package: source: url: https://pypi.io/packages/source/p/pytest/pytest-${{ version }}.tar.gz - sha256: de4bb8104e201939ccdc688b27a89a7be2079b22e2bd2b07f806b6ba71117977 + sha256: 0fe75465746a643f2485f642edf5eb7af7918135177230471150409343f84a6b build: number: 0 From e8b4804ef2b82a416b9d54df79a60056fc4931e9 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Mon, 22 Jul 2024 12:15:21 +0200 Subject: [PATCH 171/333] modularized binaries (#1231) * modularized binary * modularized binary --- recipes/recipes/run_modularized/build.sh | 5 +++++ recipes/recipes/run_modularized/recipe.yaml | 22 +++++++++++++++++++ .../run_modularized/run_modularized.js | 18 +++++++++++++++ recipes/recipes_emscripten/lua/CMakeLists.txt | 8 +++++-- recipes/recipes_emscripten/lua/recipe.yaml | 21 +++++++++++++----- 5 files changed, 67 insertions(+), 7 deletions(-) create mode 100644 recipes/recipes/run_modularized/build.sh create mode 100644 recipes/recipes/run_modularized/recipe.yaml create mode 100644 recipes/recipes/run_modularized/run_modularized.js diff --git a/recipes/recipes/run_modularized/build.sh b/recipes/recipes/run_modularized/build.sh new file mode 100644 index 000000000..d730343d2 --- /dev/null +++ b/recipes/recipes/run_modularized/build.sh @@ -0,0 +1,5 @@ + +mkdir -p $PREFIX/bin +cp $RECIPE_DIR/run_modularized.js $PREFIX/bin/run_modularized +chmod +x $PREFIX/bin/run_modularized + diff --git a/recipes/recipes/run_modularized/recipe.yaml b/recipes/recipes/run_modularized/recipe.yaml new file mode 100644 index 000000000..28740079d --- /dev/null +++ b/recipes/recipes/run_modularized/recipe.yaml @@ -0,0 +1,22 @@ +context: + name: run_modularized + version: "0.1.0" + +package: + name: ${{ name|lower }} + version: ${{ version }} + +build: + number: 0 + +requirements: + run: + - nodejs + +about: + license: BSD-3-Clause + summary: run_modularized + description: run_modularized +extra: + recipe-maintainers: + - DerThorsten diff --git a/recipes/recipes/run_modularized/run_modularized.js b/recipes/recipes/run_modularized/run_modularized.js new file mode 100644 index 000000000..261d59819 --- /dev/null +++ b/recipes/recipes/run_modularized/run_modularized.js @@ -0,0 +1,18 @@ +#!/usr/bin/env node + +const binary_js_runner = process.argv[2]; +process.argv = process.argv.slice(3); +async function my_main(){ + const ModuleF = require(binary_js_runner); + const Module = await ModuleF({ + noInitialRun: true, + // arguments: args_without_js_path + }); + const ret = Module.callMain(process.argv); + return ret; +} +(async function() { + const exitCode = await my_main(); + // exit the process + process.exit(exitCode); +})(); \ No newline at end of file diff --git a/recipes/recipes_emscripten/lua/CMakeLists.txt b/recipes/recipes_emscripten/lua/CMakeLists.txt index b48db427f..749d7692d 100644 --- a/recipes/recipes_emscripten/lua/CMakeLists.txt +++ b/recipes/recipes_emscripten/lua/CMakeLists.txt @@ -64,13 +64,17 @@ foreach(lua_binary ${lua_binaries}) target_compile_definitions(${lua_binary} PUBLIC "SHELL: -s FORCE_FILESYSTEM" PUBLIC "SHELL: -s ALLOW_MEMORY_GROWTH=1" - # PUBLIC "SHELL: -s MODULARIZE=1" + PUBLIC "SHELL: -s ENVIRONMENT=web,worker,node" + PUBLIC "SHELL: -s EXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings" + PUBLIC "SHELL: -s MODULARIZE=1" ) # set target link options target_link_options(${lua_binary} PUBLIC "SHELL: -s FORCE_FILESYSTEM" PUBLIC "SHELL: -s ALLOW_MEMORY_GROWTH=1" - # PUBLIC "SHELL: -s MODULARIZE=1" + PUBLIC "SHELL: -s ENVIRONMENT=web,worker,node" + PUBLIC "SHELL: -s EXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings" + PUBLIC "SHELL: -s MODULARIZE=1" ) endforeach() diff --git a/recipes/recipes_emscripten/lua/recipe.yaml b/recipes/recipes_emscripten/lua/recipe.yaml index db0f20475..19423ca50 100644 --- a/recipes/recipes_emscripten/lua/recipe.yaml +++ b/recipes/recipes_emscripten/lua/recipe.yaml @@ -21,7 +21,7 @@ source: - path: CMakeLists.txt build: - number: 6 + number: 10 requirements: build: @@ -31,14 +31,25 @@ requirements: tests: - - script: node $PREFIX/bin/lua.js -e "a=1+1;print(a)" + - script: | + OUTPUT=$(run_modularized $PREFIX/bin/lua.js -e "a=1+1;print(a)") + if [[ "$OUTPUT" != "2" ]]; then + echo "Unexpected output: $OUTPUT" + exit 1 + fi requirements: build: - - nodejs - - script: node $PREFIX/bin/luac.js -v + - run_modularized + - script: | + OUTPUT=$(run_modularized $PREFIX/bin/luac.js -v) + if [[ "$OUTPUT" != "Lua 5.4.6 Copyright (C) 1994-2023 Lua.org, PUC-Rio" ]]; then + echo "Unexpected output: $OUTPUT" + exit 1 + fi + requirements: build: - - nodejs + - run_modularized about: summary: Lua is a powerful, fast, lightweight, embeddable scripting language From f9ddf75953e59462c13b2d71a12c048b6be538ef Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Mon, 22 Jul 2024 15:45:10 +0200 Subject: [PATCH 172/333] adde node env (#1232) * adde node env adde node env * Update recipe.yaml * adde node env * Update recipe.yaml * Update build.sh * Update recipe.yaml --- recipes/recipes_emscripten/cockle_fs/build.sh | 2 +- recipes/recipes_emscripten/cockle_fs/recipe.yaml | 2 +- recipes/recipes_emscripten/coreutils/build.sh | 4 ++-- recipes/recipes_emscripten/coreutils/recipe.yaml | 2 +- recipes/recipes_emscripten/grep/build.sh | 2 +- recipes/recipes_emscripten/grep/recipe.yaml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/recipes/recipes_emscripten/cockle_fs/build.sh b/recipes/recipes_emscripten/cockle_fs/build.sh index e84ea8228..3d9e12d7e 100644 --- a/recipes/recipes_emscripten/cockle_fs/build.sh +++ b/recipes/recipes_emscripten/cockle_fs/build.sh @@ -1,7 +1,7 @@ touch fs.c emcc fs.c -o fs.js \ -sALLOW_MEMORY_GROWTH=1 \ - -sENVIRONMENT=web,worker \ + -sENVIRONMENT=web,worker,node \ -sEXPORTED_RUNTIME_METHODS=FS,PATH,ERRNO_CODES,PROXYFS \ -sFORCE_FILESYSTEM=1 \ -sMODULARIZE=1 \ diff --git a/recipes/recipes_emscripten/cockle_fs/recipe.yaml b/recipes/recipes_emscripten/cockle_fs/recipe.yaml index 11252b887..526efaae9 100644 --- a/recipes/recipes_emscripten/cockle_fs/recipe.yaml +++ b/recipes/recipes_emscripten/cockle_fs/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 0.1.0 + version: 0.2.0 package: name: cockle_fs diff --git a/recipes/recipes_emscripten/coreutils/build.sh b/recipes/recipes_emscripten/coreutils/build.sh index 977726883..b3de4463c 100644 --- a/recipes/recipes_emscripten/coreutils/build.sh +++ b/recipes/recipes_emscripten/coreutils/build.sh @@ -15,7 +15,7 @@ emconfigure ./configure \ echo "sed" sed -i 's|$(MAKE) src/make-prime-list$(EXEEXT)|gcc src/make-prime-list.c -o src/make-prime-list$(EXEEXT) -Ilib/|' Makefile -export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker -sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings -sFORCE_FILESYSTEM=1 -sINVOKE_RUN=0 -sMODULARIZE=1 -sSINGLE_FILE=1" +export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker,node -sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings -sFORCE_FILESYSTEM=1 -sINVOKE_RUN=0 -sMODULARIZE=1 -sSINGLE_FILE=1" make EXEEXT=.js CFLAGS="$CFLAGS" -k -j4 || true @@ -24,4 +24,4 @@ ls ls src/coreutils.js mkdir -p $PREFIX/bin -cp src/coreutils.js $PREFIX/bin/coreutils.js \ No newline at end of file +cp src/coreutils.js $PREFIX/bin/coreutils.js diff --git a/recipes/recipes_emscripten/coreutils/recipe.yaml b/recipes/recipes_emscripten/coreutils/recipe.yaml index 410d9898b..efe39be49 100644 --- a/recipes/recipes_emscripten/coreutils/recipe.yaml +++ b/recipes/recipes_emscripten/coreutils/recipe.yaml @@ -12,7 +12,7 @@ source: git: https://github.com/coreutils/coreutils tag: v9.5 build: - number: 0 + number: 1 requirements: build: diff --git a/recipes/recipes_emscripten/grep/build.sh b/recipes/recipes_emscripten/grep/build.sh index e9fd0e319..657365e94 100644 --- a/recipes/recipes_emscripten/grep/build.sh +++ b/recipes/recipes_emscripten/grep/build.sh @@ -29,7 +29,7 @@ emconfigure ./configure \ ac_cv_have_decl_alarm=no \ gl_cv_func_sleep_works=yes -export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker -sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings -sFORCE_FILESYSTEM=1 -sINVOKE_RUN=0 -sMODULARIZE=1 -sSINGLE_FILE=1 -sERROR_ON_UNDEFINED_SYMBOLS=0" +export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker,node -sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings -sFORCE_FILESYSTEM=1 -sINVOKE_RUN=0 -sMODULARIZE=1 -sSINGLE_FILE=1 -sERROR_ON_UNDEFINED_SYMBOLS=0" emmake make all CFLAGS="$CFLAGS" EXEEXT=.js ls diff --git a/recipes/recipes_emscripten/grep/recipe.yaml b/recipes/recipes_emscripten/grep/recipe.yaml index eb8cd489b..088e7f95a 100644 --- a/recipes/recipes_emscripten/grep/recipe.yaml +++ b/recipes/recipes_emscripten/grep/recipe.yaml @@ -12,7 +12,7 @@ package: # url: https://github.com/Distrotech/grep # branch: build: - number: 0 + number: 1 requirements: build: From 63b44a20c32d2504f4bc3e1c49f90b5a3f90c3d8 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Mon, 22 Jul 2024 01:03:05 +0000 Subject: [PATCH 173/333] Update numpy from 2.0.0 to 2.0.1 --- 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 a6b22f04d..777003812 100644 --- a/recipes/recipes_emscripten/numpy/recipe.yaml +++ b/recipes/recipes_emscripten/numpy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.0.0 + version: 2.0.1 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: cf5d1c9e6837f8af9f92b6bd3e86d513cdc11f60fd62185cc49ec7d1aba34864 + sha256: 485b87235796410c3519a699cfe1faab097e509e90ebb05dcd098db2ae87e7b3 build: number: 0 From 5427e888002b14f4bfe885b9057507e62c6862b1 Mon Sep 17 00:00:00 2001 From: KGB99 <80490551+KGB99@users.noreply.github.com> Date: Tue, 23 Jul 2024 13:39:38 +0200 Subject: [PATCH 174/333] refactor libffi and upgrade to 3.4.6 (#1234) * refactor libffi to build from repo source * add existence tests * cleanup --- recipes/recipes_emscripten/libffi/build.sh | 54 +++++++++---------- .../recipes_emscripten/libffi/pyodide_env.sh | 1 - recipes/recipes_emscripten/libffi/recipe.yaml | 32 ++++------- 3 files changed, 35 insertions(+), 52 deletions(-) delete mode 100644 recipes/recipes_emscripten/libffi/pyodide_env.sh diff --git a/recipes/recipes_emscripten/libffi/build.sh b/recipes/recipes_emscripten/libffi/build.sh index 46fa5e240..8b5d897ab 100644 --- a/recipes/recipes_emscripten/libffi/build.sh +++ b/recipes/recipes_emscripten/libffi/build.sh @@ -1,37 +1,31 @@ +#!/bin/bash -# make some directories -mkdir -p $PREFIX/include -mkdir -p $PREFIX/lib -mkdir -p $PREFIX/bin -mkdir -p $PREFIX/etc/conda -mkdir -p cpython/build +#this build script is adapted from the libffi repo at `testsuite/emscripten/build.sh` +set -e +# Working directories +SOURCE_DIR=$PWD +TARGET=$SOURCE_DIR/build +mkdir -p "$TARGET" -# overwrite $RECIPEDIR/pyodide_env.sh with am empty file -# since we do not want to use the pyodide_env.sh from pyodide -echo "" > $RECIPE_DIR/pyodide_env.sh +# Common compiler flags +export CFLAGS="-O3 -fPIC" +export CFLAGS+=" -DWASM_BIGINT" # We need to detect WASM_BIGINT support at compile time, if bigint is not wanted simply remove +export CXXFLAGS="$CFLAGS" +# Build paths +export CPATH="$TARGET/include" +export PKG_CONFIG_PATH="$TARGET/lib/pkgconfig" +export EM_PKG_CONFIG_PATH="$PKG_CONFIG_PATH" -# 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 -cd .. +# Specific variables for cross-compilation +export CHOST="wasm32-unknown-linux" # wasm32-unknown-emscripten +autoreconf -fiv +emconfigure ./configure --host=$CHOST --prefix="$TARGET" --enable-static --disable-shared --disable-dependency-tracking \ + --disable-builddir --disable-multi-os-directory --disable-raw-api --disable-docs +make install +cp fficonfig.h build/include/ +cp include/ffi_common.h build/include/ -mkdir -p cpython/build/Python-3.11.3/Include - -#replace "all: $(INSTALL)/lib/$(LIB) $(INSTALL)/lib/libffi.a" with "$(INSTALL)/lib/libffi.a" - -sed -i 's/all: $(INSTALL)\/lib\/$(LIB) $(INSTALL)\/lib\/libffi.a/all: $(INSTALL)\/lib\/libffi.a/g' cpython/Makefile - -################################################################# -# THE ACTUAL BUILD -make -C cpython -################################################################ - - -# install libffi -cp -r cpython/build/libffi/target/ $PREFIX/ \ No newline at end of file +cp -r build/* $PREFIX/ \ No newline at end of file diff --git a/recipes/recipes_emscripten/libffi/pyodide_env.sh b/recipes/recipes_emscripten/libffi/pyodide_env.sh deleted file mode 100644 index 8b1378917..000000000 --- a/recipes/recipes_emscripten/libffi/pyodide_env.sh +++ /dev/null @@ -1 +0,0 @@ - diff --git a/recipes/recipes_emscripten/libffi/recipe.yaml b/recipes/recipes_emscripten/libffi/recipe.yaml index 473527639..0df852a3b 100644 --- a/recipes/recipes_emscripten/libffi/recipe.yaml +++ b/recipes/recipes_emscripten/libffi/recipe.yaml @@ -1,44 +1,34 @@ context: - version: 3.4.2 - pyodide_version: 0.24.0 name: libffi + version: 3.4.6 package: - name: ${{name}} + name: ${{ name }} version: ${{ version }} source: -- url: https://github.com/pyodide/pyodide/archive/refs/tags/${{pyodide_version}}.tar.gz - sha256: c8350c4780be44fe763a66f5024197025b0f8740cc4a7c9ad833a89c69916276 +- url: https://github.com/libffi/libffi/archive/refs/tags/v${{ version }}.tar.gz + sha256: 9ac790464c1eb2f5ab5809e978a1683e9393131aede72d1b0a0703771d3c6cda build: - number: 4 + number: 0 requirements: build: - ${{ compiler("cxx") }} - ${{ compiler("c") }} - - python=3.11 - - nodejs - - ccache - - f2c - - pkg-config - - swig - - make - - cmake - - pkg-config - - texinfo - autoconf - automake - libtool - - patch # only needed on MacOS - - sed # only needed on MacOS - - wget +tests: +- script: + - test -f $PREFIX/include/ffi.h + - test -f $PREFIX/lib/libffi.a + - test -f $PREFIX/share/man/man3/ffi.3 about: license: MIT license_file: LICENSE summary: A Portable Foreign Function Interface Library. - description: | The libffi library provides a portable, high level programming interface to various calling conventions. This allows a programmer to call any @@ -47,4 +37,4 @@ about: extra: recipe-maintainers: - DerThorsten - + - KGB99 \ No newline at end of file From d809583e3e9c3d42b179352c3a10beeb6a80aa09 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Tue, 23 Jul 2024 16:35:36 +0200 Subject: [PATCH 175/333] denodeify (#1235) --- recipes/recipes_emscripten/cockle_fs/build.sh | 2 +- recipes/recipes_emscripten/cockle_fs/recipe.yaml | 4 ++-- recipes/recipes_emscripten/coreutils/build.sh | 2 +- recipes/recipes_emscripten/coreutils/recipe.yaml | 2 +- recipes/recipes_emscripten/grep/build.sh | 2 +- recipes/recipes_emscripten/grep/recipe.yaml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/recipes/recipes_emscripten/cockle_fs/build.sh b/recipes/recipes_emscripten/cockle_fs/build.sh index 3d9e12d7e..e84ea8228 100644 --- a/recipes/recipes_emscripten/cockle_fs/build.sh +++ b/recipes/recipes_emscripten/cockle_fs/build.sh @@ -1,7 +1,7 @@ touch fs.c emcc fs.c -o fs.js \ -sALLOW_MEMORY_GROWTH=1 \ - -sENVIRONMENT=web,worker,node \ + -sENVIRONMENT=web,worker \ -sEXPORTED_RUNTIME_METHODS=FS,PATH,ERRNO_CODES,PROXYFS \ -sFORCE_FILESYSTEM=1 \ -sMODULARIZE=1 \ diff --git a/recipes/recipes_emscripten/cockle_fs/recipe.yaml b/recipes/recipes_emscripten/cockle_fs/recipe.yaml index 526efaae9..be13c19f3 100644 --- a/recipes/recipes_emscripten/cockle_fs/recipe.yaml +++ b/recipes/recipes_emscripten/cockle_fs/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 0.2.0 + version: 0.3.0 package: name: cockle_fs @@ -7,7 +7,7 @@ package: build: - number: 0 + number: 1 requirements: build: diff --git a/recipes/recipes_emscripten/coreutils/build.sh b/recipes/recipes_emscripten/coreutils/build.sh index b3de4463c..df2468b28 100644 --- a/recipes/recipes_emscripten/coreutils/build.sh +++ b/recipes/recipes_emscripten/coreutils/build.sh @@ -15,7 +15,7 @@ emconfigure ./configure \ echo "sed" sed -i 's|$(MAKE) src/make-prime-list$(EXEEXT)|gcc src/make-prime-list.c -o src/make-prime-list$(EXEEXT) -Ilib/|' Makefile -export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker,node -sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings -sFORCE_FILESYSTEM=1 -sINVOKE_RUN=0 -sMODULARIZE=1 -sSINGLE_FILE=1" +export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker -sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings -sFORCE_FILESYSTEM=1 -sINVOKE_RUN=0 -sMODULARIZE=1 -sSINGLE_FILE=1" make EXEEXT=.js CFLAGS="$CFLAGS" -k -j4 || true diff --git a/recipes/recipes_emscripten/coreutils/recipe.yaml b/recipes/recipes_emscripten/coreutils/recipe.yaml index efe39be49..3c970f0c9 100644 --- a/recipes/recipes_emscripten/coreutils/recipe.yaml +++ b/recipes/recipes_emscripten/coreutils/recipe.yaml @@ -12,7 +12,7 @@ source: git: https://github.com/coreutils/coreutils tag: v9.5 build: - number: 1 + number: 2 requirements: build: diff --git a/recipes/recipes_emscripten/grep/build.sh b/recipes/recipes_emscripten/grep/build.sh index 657365e94..e9fd0e319 100644 --- a/recipes/recipes_emscripten/grep/build.sh +++ b/recipes/recipes_emscripten/grep/build.sh @@ -29,7 +29,7 @@ emconfigure ./configure \ ac_cv_have_decl_alarm=no \ gl_cv_func_sleep_works=yes -export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker,node -sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings -sFORCE_FILESYSTEM=1 -sINVOKE_RUN=0 -sMODULARIZE=1 -sSINGLE_FILE=1 -sERROR_ON_UNDEFINED_SYMBOLS=0" +export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker -sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings -sFORCE_FILESYSTEM=1 -sINVOKE_RUN=0 -sMODULARIZE=1 -sSINGLE_FILE=1 -sERROR_ON_UNDEFINED_SYMBOLS=0" emmake make all CFLAGS="$CFLAGS" EXEEXT=.js ls diff --git a/recipes/recipes_emscripten/grep/recipe.yaml b/recipes/recipes_emscripten/grep/recipe.yaml index 088e7f95a..e2334a018 100644 --- a/recipes/recipes_emscripten/grep/recipe.yaml +++ b/recipes/recipes_emscripten/grep/recipe.yaml @@ -12,7 +12,7 @@ package: # url: https://github.com/Distrotech/grep # branch: build: - number: 1 + number: 2 requirements: build: From 23ae5d38371fbcbb993458f41636cabe4a0e9422 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Tue, 23 Jul 2024 01:01:17 +0000 Subject: [PATCH 176/333] Update pytest from 8.3.0 to 8.3.1 --- 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 de0ca384d..3b82d0054 100644 --- a/recipes/recipes_emscripten/pytest/recipe.yaml +++ b/recipes/recipes_emscripten/pytest/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 8.3.0 + version: 8.3.1 package: name: pytest @@ -7,7 +7,7 @@ package: source: url: https://pypi.io/packages/source/p/pytest/pytest-${{ version }}.tar.gz - sha256: 0fe75465746a643f2485f642edf5eb7af7918135177230471150409343f84a6b + sha256: 7e8e5c5abd6e93cb1cc151f23e57adc31fcf8cfd2a3ff2da63e23f732de35db6 build: number: 0 From ae460f91ba4cd550b96472a447182bd7a178fc0e Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Fri, 26 Jul 2024 00:59:53 +0000 Subject: [PATCH 177/333] Update pytest from 8.3.1 to 8.3.2 --- 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 3b82d0054..49918755d 100644 --- a/recipes/recipes_emscripten/pytest/recipe.yaml +++ b/recipes/recipes_emscripten/pytest/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 8.3.1 + version: 8.3.2 package: name: pytest @@ -7,7 +7,7 @@ package: source: url: https://pypi.io/packages/source/p/pytest/pytest-${{ version }}.tar.gz - sha256: 7e8e5c5abd6e93cb1cc151f23e57adc31fcf8cfd2a3ff2da63e23f732de35db6 + sha256: c132345d12ce551242c87269de812483f5bcc87cdbb4722e48487ba194f9fdce build: number: 0 From a263436fd7b1d7c705607b2a190dee5026a5776d Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 29 Jul 2024 10:10:50 +0200 Subject: [PATCH 178/333] Update argparse from 3.0 to 3.1 (#1228) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/argparse/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/argparse/recipe.yaml b/recipes/recipes_emscripten/argparse/recipe.yaml index 402430062..0b33e9157 100644 --- a/recipes/recipes_emscripten/argparse/recipe.yaml +++ b/recipes/recipes_emscripten/argparse/recipe.yaml @@ -1,5 +1,5 @@ context: - version: '3.0' + version: '3.1' package: name: cpp-argparse @@ -7,7 +7,7 @@ package: source: url: https://github.com/p-ranav/argparse/archive/v${{ version }}.tar.gz - sha256: ba7b465759bb01069d57302855eaf4d1f7d677f21ad7b0b00b92939645c30f47 + sha256: d01733552ca4a18ab501ae8b8be878131baa32e89090fafdeef018ebfa4c6e46 build: number: 0 From 69c1f4bd1dfa917b31487fa6463748280d7fcbfc Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 29 Jul 2024 10:11:05 +0200 Subject: [PATCH 179/333] Update fmt from 11.0.0 to 11.0.1 (#1211) 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 f9e13e694..324a8a0a7 100644 --- a/recipes/recipes_emscripten/fmt/recipe.yaml +++ b/recipes/recipes_emscripten/fmt/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 11.0.0 + version: 11.0.1 package: name: fmt @@ -7,7 +7,7 @@ package: source: url: https://github.com/fmtlib/fmt/archive/${{ version }}.tar.gz - sha256: 8e20e2aacdd3f264fa5be9cba879fa3972c52bfd9d5310112250e7eaaf492f2c + sha256: 7d009f7f89ac84c0a83f79ed602463d092fbf66763766a907c97fd02b100f5e9 build: number: 0 From 1fedfad8bba50aec0b86329303b5201efa3b68db Mon Sep 17 00:00:00 2001 From: KGB99 <80490551+KGB99@users.noreply.github.com> Date: Mon, 29 Jul 2024 10:59:44 +0200 Subject: [PATCH 180/333] refactor python 3.11.3 (#1225) * refactor python 3.11.3 build * minimize dependencies * add existence tests * replace pyodide env with fitting env variable * final touches * fix build number * readd torstens fix --- recipes/recipes_emscripten/python/Makefile | 107 +++ recipes/recipes_emscripten/python/build.sh | 55 +- .../0001-Public-pymain_run_python.patch | 25 + ...to-allow-modifications-to-ModuleNotF.patch | 36 + ...latform-support-to-ctypes.util.find_.patch | 48 ++ ...ocessing.connection-top-level-import.patch | 28 + ...b-ctypes-test-to-Lib-test-test_ctype.patch | 753 ++++++++++++++++++ ...b-unttest-test-to-Lib-test-test_unit.patch | 724 +++++++++++++++++ ...d_package_tests-for-testmock-GH-9405.patch | 40 + .../patches/0008-Move-test-directories.patch | 36 + .../python/patches/0011-Brand-Python.patch | 39 - .../recipes_emscripten/python/pyodide_env.sh | 1 - recipes/recipes_emscripten/python/recipe.yaml | 32 +- 13 files changed, 1827 insertions(+), 97 deletions(-) create mode 100644 recipes/recipes_emscripten/python/Makefile create mode 100644 recipes/recipes_emscripten/python/patches/0001-Public-pymain_run_python.patch create mode 100644 recipes/recipes_emscripten/python/patches/0002-Patch-importlib-to-allow-modifications-to-ModuleNotF.patch create mode 100644 recipes/recipes_emscripten/python/patches/0003-Add-emscripten-platform-support-to-ctypes.util.find_.patch create mode 100644 recipes/recipes_emscripten/python/patches/0004-Allow-multiprocessing.connection-top-level-import.patch create mode 100644 recipes/recipes_emscripten/python/patches/0005-gh-93839-Move-Lib-ctypes-test-to-Lib-test-test_ctype.patch create mode 100644 recipes/recipes_emscripten/python/patches/0006-gh-93839-Move-Lib-unttest-test-to-Lib-test-test_unit.patch create mode 100644 recipes/recipes_emscripten/python/patches/0007-gh-93839-Use-load_package_tests-for-testmock-GH-9405.patch create mode 100644 recipes/recipes_emscripten/python/patches/0008-Move-test-directories.patch delete mode 100644 recipes/recipes_emscripten/python/patches/0011-Brand-Python.patch delete mode 100755 recipes/recipes_emscripten/python/pyodide_env.sh diff --git a/recipes/recipes_emscripten/python/Makefile b/recipes/recipes_emscripten/python/Makefile new file mode 100644 index 000000000..b3f8979aa --- /dev/null +++ b/recipes/recipes_emscripten/python/Makefile @@ -0,0 +1,107 @@ +include ./Makefile.envs + +ROOT=$(abspath .) + +PYTHON_CFLAGS=$(CFLAGS_BASE) -DPY_CALL_TRAMPOLINE + +BUILD=$(ROOT)/build/${PKG_VERSION}/Python-${PKG_VERSION} +#INSTALL=$(ROOT)/installs/python-${PKG_VERSION} +INSTALL=$(PREFIX) +LIB=libpython$(PYMAJOR).$(PYMINOR).a + +FFIBUILD=$(ROOT)/build/libffi +LIBFFIREPO=https://github.com/libffi/libffi +LIBFFI_COMMIT=f08493d249d2067c8b3207ba46693dd858f95db3 + +all: $(INSTALL)/lib/$(LIB) $(INSTALL)/lib/libffi.a + + +$(INSTALL)/lib/$(LIB): $(BUILD)/$(LIB) + ( \ + cd $(BUILD); \ + sed -i -e 's/libinstall:.*/libinstall:/' Makefile; \ + sed -i '/MODOBJS=/s/$$/ $$(LIBMPDEC_OBJS) $$(LIBEXPAT_OBJS) /' Makefile; \ + touch $(BUILD)/$(LIB) ; \ + emmake make PYTHON_FOR_BUILD=$(HOSTPYTHON) CROSS_COMPILE=yes inclinstall libinstall $(LIB) -j${CPU_COUNT} && \ + cp $(LIB) $(INSTALL)/lib/ \ + ) + # Generate sysconfigdata. It outputs into a subfolder of build/, and + # the subfolder is written to pybuilddir.txt. + _PYTHON_SYSCONFIGDATA_NAME=$(SYSCONFIG_NAME) _PYTHON_PROJECT_BASE=$(BUILD) $(HOSTPYTHON) -m sysconfig --generate-posix-vars + + $(eval PYBUILDDIR=`cat pybuilddir.txt`) + PYTHONPATH=$(PYBUILDDIR) python adjust_sysconfig.py + cp $(PYBUILDDIR)/$(SYSCONFIG_NAME).py $(INSTALL)/lib/python$(PYMAJOR).$(PYMINOR)/ + mkdir -p $(SYSCONFIGDATA_DIR) + cp $(PYBUILDDIR)/$(SYSCONFIG_NAME).py $(SYSCONFIGDATA_DIR) + rm -rf $(PYBUILDDIR) + rm pybuilddir.txt + + +clean: + -rm -fr $(ROOT)/build + -rm -fr $(ROOT)/installs + +clean-all: clean + -rm -fr $(ROOT)/downloads + + +$(BUILD)/.patched: +# [ -d $(BUILD) ] || $(error "No python version has been downloaded from the build recipe!") + cat patches/*.patch | (cd $(BUILD) ; patch -p1) + touch $@ + +$(INSTALL)/lib/libffi.a : + rm -rf $(FFIBUILD) + mkdir $(FFIBUILD) + (\ + cd $(FFIBUILD) \ + && git init \ + && git fetch --depth 1 $(LIBFFIREPO) $(LIBFFI_COMMIT) \ + && git checkout FETCH_HEAD \ + && . $(EMSCRIPTEN_FORGE_EMSDK_DIR)/emsdk_env.sh \ + && ./testsuite/emscripten/build.sh --wasm-bigint \ + && make install \ + ) + cp $(FFIBUILD)/target/include/*.h $(BUILD)/Include/ + mkdir -p $(INSTALL)/lib + cp $(FFIBUILD)/target/lib/libffi.a $(INSTALL)/lib/ + +$(BUILD)/Makefile: $(BUILD)/.patched + # --enable-big-digits=30 : + # Python integers have "digits" of size 15 by default on systems with 32 + # bit pointers and size 30 on systems with 16 bit pointers. Python uses + # "digits" of size 15 by default on systems with 32 bit pointers and size + # 30 on systems with 16 bit pointers. WASM has 32 bit pointers so Python + # will default to the size 15 digits but WASM has native 64 bit arithmetic + # so it is more efficient to use 30 bit digits. + ( \ + cd $(BUILD); \ + CONFIG_SITE=./Tools/wasm/config.site-wasm32-emscripten READELF=true emconfigure \ + ./configure \ + CFLAGS="${PYTHON_CFLAGS}" \ + CPPFLAGS="-sUSE_BZIP2=1 -sUSE_ZLIB=1" \ + PLATFORM_TRIPLET="$(PLATFORM_TRIPLET)" \ + --without-pymalloc \ + --disable-shared \ + --disable-ipv6 \ + --enable-big-digits=30 \ + --enable-optimizations \ + --host=wasm32-unknown-emscripten\ + --build=$(shell $(BUILD)/config.guess) \ + --prefix=$(INSTALL) \ + --with-build-python=$$(which python3.11) \ + ) + + +$(BUILD)/Modules/Setup.local: Setup.local + cp Setup.local $(BUILD)/Modules/ + +$(BUILD)/$(LIB): $(BUILD)/Makefile $(BUILD)/pyconfig.h $(BUILD)/Modules/Setup.local $(INSTALL)/lib/libffi.a + cp Setup.local $(BUILD)/Modules/ + ( \ + cd $(BUILD); \ + make regen-frozen; \ + emmake make CROSS_COMPILE=yes $(LIB) -j${CPU_COUNT} \ + ) + touch $(BUILD)/$(LIB) diff --git a/recipes/recipes_emscripten/python/build.sh b/recipes/recipes_emscripten/python/build.sh index 130971be3..f65278cc9 100644 --- a/recipes/recipes_emscripten/python/build.sh +++ b/recipes/recipes_emscripten/python/build.sh @@ -1,25 +1,20 @@ +#!/bin/bash + +set -euxo pipefail -# make some directories mkdir -p $PREFIX/include mkdir -p $PREFIX/lib mkdir -p $PREFIX/bin mkdir -p $PREFIX/etc/conda -mkdir -p cpython/build - -# the following line can re-enable the _sqlite3 module (but atm we keep it disabled) -cp $RECIPE_DIR/Setup.local ./cpython/Setup.local - -# this only overwrite the install path -cp $RECIPE_DIR/Makefile.envs . - -# pyodide uses cc instead of emcc so we need to overwrite this -cp $RECIPE_DIR/adjust_sysconfig.py ./cpython/adjust_sysconfig.py - -# overwrite $RECIPEDIR/pyodide_env.sh with am empty file -# since we do not want to use the pyodide_env.sh from pyodide -echo "" > $RECIPE_DIR/pyodide_env.sh +# Move all python package files to the build folder +export BUILD=build/${PKG_VERSION}/Python-${PKG_VERSION} +mkdir -p ${BUILD} +mv Makefile.pre.in README.rst aclocal.m4 config.guess config.sub setup.py pyconfig.h.in install-sh configure.ac ${BUILD} +mv Doc Grammar Include LICENSE Lib Mac Misc Modules Objects PC PCbuild Parser Programs Python Tools configure ${BUILD} +# copy the LICENSE file back for the recipe +cp ${BUILD}/LICENSE . # create a symlink from $BUILD_PREFIX/bin/python3.11 to $BUILD_PREFIX/bin/python.js # since the python build script overwrites the env variable PYTHON to python.js @@ -32,31 +27,17 @@ 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 $EMSCRIPTEN_FORGE_EMSDK_DIR emsdk -cd .. +cp ${RECIPE_DIR}/Makefile . +cp ${RECIPE_DIR}/Makefile.envs . +cp -r ${RECIPE_DIR}/patches . +cp ${RECIPE_DIR}/Setup.local . +cp ${RECIPE_DIR}/adjust_sysconfig.py . - -# when only building libffi we need to uncomment the following line -# mkdir -p cpython/build/Python-3.11.3/Include - -################################################################# -# THE ACTUAL BUILD -make -C cpython -################################################################ - - -# install libffi (we do this in libffi_pyodide) -#cp -r cpython/build/libffi/target/ $PREFIX/ +make # (TODO move in recipe) install libmpdec and libexpat -cp cpython/build/Python-3.11.3/Modules/_decimal/libmpdec/libmpdec.a $PREFIX/lib -cp cpython/build/Python-3.11.3/Modules/expat/libexpat.a $PREFIX/lib - +cp ${BUILD}/Modules/_decimal/libmpdec/libmpdec.a $PREFIX/lib +cp ${BUILD}/Modules/expat/libexpat.a $PREFIX/lib # a fake wheel command touch $PREFIX/bin/wheel diff --git a/recipes/recipes_emscripten/python/patches/0001-Public-pymain_run_python.patch b/recipes/recipes_emscripten/python/patches/0001-Public-pymain_run_python.patch new file mode 100644 index 000000000..cbe4b1903 --- /dev/null +++ b/recipes/recipes_emscripten/python/patches/0001-Public-pymain_run_python.patch @@ -0,0 +1,25 @@ +From 8dc93243eb0cdf27a81e9baf156df621cc8e2eb9 Mon Sep 17 00:00:00 2001 +From: Hood Chatham +Date: Sun, 17 Jul 2022 14:40:39 +0100 +Subject: [PATCH 1/9] Public pymain_run_python + +--- + Modules/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Modules/main.c b/Modules/main.c +index 6904e3f76e..07bea58080 100644 +--- a/Modules/main.c ++++ b/Modules/main.c +@@ -537,7 +537,7 @@ pymain_repl(PyConfig *config, int *exitcode) + } + + +-static void ++void + pymain_run_python(int *exitcode) + { + PyObject *main_importer_path = NULL; +-- +2.25.1 + diff --git a/recipes/recipes_emscripten/python/patches/0002-Patch-importlib-to-allow-modifications-to-ModuleNotF.patch b/recipes/recipes_emscripten/python/patches/0002-Patch-importlib-to-allow-modifications-to-ModuleNotF.patch new file mode 100644 index 000000000..34aabeb36 --- /dev/null +++ b/recipes/recipes_emscripten/python/patches/0002-Patch-importlib-to-allow-modifications-to-ModuleNotF.patch @@ -0,0 +1,36 @@ +From 90812b6dc97860ef164a2810ebf5f3121dfc919e Mon Sep 17 00:00:00 2001 +From: Hood Chatham +Date: Wed, 16 Nov 2022 14:02:53 -0800 +Subject: [PATCH 2/9] Patch importlib to allow modifications to + ModuleNotFoundError + +--- + Lib/importlib/_bootstrap.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py +index afb95f4e1d..32fe7a68bf 100644 +--- a/Lib/importlib/_bootstrap.py ++++ b/Lib/importlib/_bootstrap.py +@@ -1119,6 +1119,9 @@ def _sanity_check(name, package, level): + _ERR_MSG_PREFIX = 'No module named ' + _ERR_MSG = _ERR_MSG_PREFIX + '{!r}' + ++def _get_module_not_found_error(name): ++ return ModuleNotFoundError(_ERR_MSG.format(name), name=name) ++ + def _find_and_load_unlocked(name, import_): + path = None + parent = name.rpartition('.')[0] +@@ -1139,7 +1142,7 @@ def _find_and_load_unlocked(name, import_): + child = name.rpartition('.')[2] + spec = _find_spec(name, path) + if spec is None: +- raise ModuleNotFoundError(_ERR_MSG.format(name), name=name) ++ raise _get_module_not_found_error(name) + else: + if parent_spec: + # Temporarily add child we are currently importing to parent's +-- +2.25.1 + diff --git a/recipes/recipes_emscripten/python/patches/0003-Add-emscripten-platform-support-to-ctypes.util.find_.patch b/recipes/recipes_emscripten/python/patches/0003-Add-emscripten-platform-support-to-ctypes.util.find_.patch new file mode 100644 index 000000000..593876c5a --- /dev/null +++ b/recipes/recipes_emscripten/python/patches/0003-Add-emscripten-platform-support-to-ctypes.util.find_.patch @@ -0,0 +1,48 @@ +From bb33672157df771613c9d6c61756c5294f13333d Mon Sep 17 00:00:00 2001 +From: ryanking13 +Date: Fri, 2 Dec 2022 11:36:44 +0000 +Subject: [PATCH 3/9] Add emscripten platform support to + ctypes.util.find_library + +--- + Lib/ctypes/util.py | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py +index 0c2510e161..c8875ec009 100644 +--- a/Lib/ctypes/util.py ++++ b/Lib/ctypes/util.py +@@ -80,6 +80,30 @@ def find_library(name): + continue + return None + ++elif os.name == "posix" and sys.platform == "emscripten": ++ def _is_wasm(filename): ++ # Return True if the given file is an WASM module ++ wasm_header = b'\x00asm' ++ with open(filename, 'br') as thefile: ++ return thefile.read(4) == wasm_header ++ ++ def find_library(name): ++ possible = ['lib%s.so' % name, ++ 'lib%s.wasm' % name] ++ ++ paths = os.environ.get('LD_LIBRARY_PATH', '') ++ for dir in paths.split(":"): ++ for name in possible: ++ libfile = os.path.join(dir, name) ++ ++ if os.path.isfile(libfile): ++ if not _is_wasm(libfile): ++ continue ++ ++ return libfile ++ ++ return None ++ + elif sys.platform.startswith("aix"): + # AIX has two styles of storing shared libraries + # GNU auto_tools refer to these as svr4 and aix +-- +2.29.2.windows.2 + diff --git a/recipes/recipes_emscripten/python/patches/0004-Allow-multiprocessing.connection-top-level-import.patch b/recipes/recipes_emscripten/python/patches/0004-Allow-multiprocessing.connection-top-level-import.patch new file mode 100644 index 000000000..5f7a0d3b0 --- /dev/null +++ b/recipes/recipes_emscripten/python/patches/0004-Allow-multiprocessing.connection-top-level-import.patch @@ -0,0 +1,28 @@ +From becbcc43e3e09a9c065ea7856a2d3069061fd570 Mon Sep 17 00:00:00 2001 +From: Hood Chatham +Date: Mon, 19 Dec 2022 09:09:14 -0800 +Subject: [PATCH 4/9] Allow multiprocessing.connection top level import + +--- + Lib/multiprocessing/connection.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/Lib/multiprocessing/connection.py b/Lib/multiprocessing/connection.py +index 510e4b5aba..372f9ced37 100644 +--- a/Lib/multiprocessing/connection.py ++++ b/Lib/multiprocessing/connection.py +@@ -18,7 +18,10 @@ + import tempfile + import itertools + +-import _multiprocessing ++try: ++ import _multiprocessing ++except ModuleNotFoundError: ++ pass + + from . import util + +-- +2.25.1 + diff --git a/recipes/recipes_emscripten/python/patches/0005-gh-93839-Move-Lib-ctypes-test-to-Lib-test-test_ctype.patch b/recipes/recipes_emscripten/python/patches/0005-gh-93839-Move-Lib-ctypes-test-to-Lib-test-test_ctype.patch new file mode 100644 index 000000000..49353eb6f --- /dev/null +++ b/recipes/recipes_emscripten/python/patches/0005-gh-93839-Move-Lib-ctypes-test-to-Lib-test-test_ctype.patch @@ -0,0 +1,753 @@ +From d82e0bfe8b98a122ca443b356d81998c804b686e Mon Sep 17 00:00:00 2001 +From: Victor Stinner +Date: Tue, 21 Jun 2022 10:24:33 +0200 +Subject: [PATCH 5/9] gh-93839: Move Lib/ctypes/test/ to Lib/test/test_ctypes/ + (#94041) + +* Move Lib/ctypes/test/ to Lib/test/test_ctypes/ +* Remove Lib/test/test_ctypes.py +* Update imports and build system. +--- + Lib/ctypes/test/__main__.py | 4 - + Lib/test/leakers/test_ctypes.py | 2 +- + Lib/test/test_ctypes.py | 10 -- + .../test => test/test_ctypes}/__init__.py | 0 + Lib/test/test_ctypes/__main__.py | 4 + + .../test => test/test_ctypes}/test_anon.py | 0 + .../test_ctypes}/test_array_in_pointer.py | 0 + .../test => test/test_ctypes}/test_arrays.py | 2 +- + .../test_ctypes}/test_as_parameter.py | 2 +- + .../test_ctypes}/test_bitfields.py | 2 +- + .../test => test/test_ctypes}/test_buffers.py | 2 +- + .../test => test/test_ctypes}/test_bytes.py | 0 + .../test_ctypes}/test_byteswap.py | 0 + .../test_ctypes}/test_callbacks.py | 2 +- + .../test => test/test_ctypes}/test_cast.py | 2 +- + .../test => test/test_ctypes}/test_cfuncs.py | 2 +- + .../test_ctypes}/test_checkretval.py | 2 +- + .../test => test/test_ctypes}/test_delattr.py | 0 + .../test => test/test_ctypes}/test_errno.py | 0 + .../test => test/test_ctypes}/test_find.py | 0 + .../test_ctypes}/test_frombuffer.py | 0 + .../test => test/test_ctypes}/test_funcptr.py | 0 + .../test_ctypes}/test_functions.py | 2 +- + .../test_ctypes}/test_incomplete.py | 0 + .../test => test/test_ctypes}/test_init.py | 0 + .../test_ctypes}/test_internals.py | 0 + .../test_ctypes}/test_keeprefs.py | 0 + .../test => test/test_ctypes}/test_libc.py | 0 + .../test => test/test_ctypes}/test_loading.py | 0 + .../test_ctypes}/test_macholib.py | 0 + .../test_ctypes}/test_memfunctions.py | 2 +- + .../test => test/test_ctypes}/test_numbers.py | 0 + .../test => test/test_ctypes}/test_objects.py | 8 +- + .../test_ctypes}/test_parameters.py | 2 +- + .../test => test/test_ctypes}/test_pep3118.py | 0 + .../test_ctypes}/test_pickling.py | 0 + .../test_ctypes}/test_pointers.py | 0 + .../test_ctypes}/test_prototypes.py | 2 +- + .../test_ctypes}/test_python_api.py | 0 + .../test_ctypes}/test_random_things.py | 0 + .../test_ctypes}/test_refcounts.py | 0 + .../test => test/test_ctypes}/test_repr.py | 0 + .../test_ctypes}/test_returnfuncptrs.py | 0 + .../test_ctypes}/test_simplesubclasses.py | 0 + .../test => test/test_ctypes}/test_sizes.py | 0 + .../test => test/test_ctypes}/test_slicing.py | 2 +- + .../test_ctypes}/test_stringptr.py | 0 + .../test => test/test_ctypes}/test_strings.py | 2 +- + .../test_ctypes}/test_struct_fields.py | 0 + .../test_ctypes}/test_structures.py | 2 +- + .../test_ctypes}/test_unaligned_structures.py | 0 + .../test => test/test_ctypes}/test_unicode.py | 2 +- + .../test => test/test_ctypes}/test_values.py | 0 + .../test_ctypes}/test_varsize_struct.py | 0 + .../test => test/test_ctypes}/test_win32.py | 0 + .../test_ctypes}/test_wintypes.py | 0 + Makefile.pre.in | 4 +- + ...2-06-20-23-04-52.gh-issue-93839.OE3Ybk.rst | 2 + + PCbuild/lib.pyproj | 109 +++++++++--------- + Tools/wasm/wasm_assets.py | 1 - + 60 files changed, 83 insertions(+), 93 deletions(-) + delete mode 100644 Lib/ctypes/test/__main__.py + delete mode 100644 Lib/test/test_ctypes.py + rename Lib/{ctypes/test => test/test_ctypes}/__init__.py (100%) + create mode 100644 Lib/test/test_ctypes/__main__.py + rename Lib/{ctypes/test => test/test_ctypes}/test_anon.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_array_in_pointer.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_arrays.py (99%) + rename Lib/{ctypes/test => test/test_ctypes}/test_as_parameter.py (99%) + rename Lib/{ctypes/test => test/test_ctypes}/test_bitfields.py (99%) + rename Lib/{ctypes/test => test/test_ctypes}/test_buffers.py (98%) + rename Lib/{ctypes/test => test/test_ctypes}/test_bytes.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_byteswap.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_callbacks.py (99%) + rename Lib/{ctypes/test => test/test_ctypes}/test_cast.py (98%) + rename Lib/{ctypes/test => test/test_ctypes}/test_cfuncs.py (99%) + rename Lib/{ctypes/test => test/test_ctypes}/test_checkretval.py (95%) + rename Lib/{ctypes/test => test/test_ctypes}/test_delattr.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_errno.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_find.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_frombuffer.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_funcptr.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_functions.py (99%) + rename Lib/{ctypes/test => test/test_ctypes}/test_incomplete.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_init.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_internals.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_keeprefs.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_libc.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_loading.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_macholib.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_memfunctions.py (98%) + rename Lib/{ctypes/test => test/test_ctypes}/test_numbers.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_objects.py (87%) + rename Lib/{ctypes/test => test/test_ctypes}/test_parameters.py (99%) + rename Lib/{ctypes/test => test/test_ctypes}/test_pep3118.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_pickling.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_pointers.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_prototypes.py (99%) + rename Lib/{ctypes/test => test/test_ctypes}/test_python_api.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_random_things.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_refcounts.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_repr.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_returnfuncptrs.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_simplesubclasses.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_sizes.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_slicing.py (99%) + rename Lib/{ctypes/test => test/test_ctypes}/test_stringptr.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_strings.py (99%) + rename Lib/{ctypes/test => test/test_ctypes}/test_struct_fields.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_structures.py (99%) + rename Lib/{ctypes/test => test/test_ctypes}/test_unaligned_structures.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_unicode.py (97%) + rename Lib/{ctypes/test => test/test_ctypes}/test_values.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_varsize_struct.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_win32.py (100%) + rename Lib/{ctypes/test => test/test_ctypes}/test_wintypes.py (100%) + create mode 100644 Misc/NEWS.d/next/Tests/2022-06-20-23-04-52.gh-issue-93839.OE3Ybk.rst + +diff --git a/Lib/ctypes/test/__main__.py b/Lib/ctypes/test/__main__.py +deleted file mode 100644 +index 362a9ec8cf..0000000000 +--- a/Lib/ctypes/test/__main__.py ++++ /dev/null +@@ -1,4 +0,0 @@ +-from ctypes.test import load_tests +-import unittest +- +-unittest.main() +diff --git a/Lib/test/leakers/test_ctypes.py b/Lib/test/leakers/test_ctypes.py +index 7d7e9ff3a1..ec09ac3699 100644 +--- a/Lib/test/leakers/test_ctypes.py ++++ b/Lib/test/leakers/test_ctypes.py +@@ -1,5 +1,5 @@ + +-# Taken from Lib/ctypes/test/test_keeprefs.py, PointerToStructure.test(). ++# Taken from Lib/test/test_ctypes/test_keeprefs.py, PointerToStructure.test(). + + from ctypes import Structure, c_int, POINTER + import gc +diff --git a/Lib/test/test_ctypes.py b/Lib/test/test_ctypes.py +deleted file mode 100644 +index b0a12c9734..0000000000 +--- a/Lib/test/test_ctypes.py ++++ /dev/null +@@ -1,10 +0,0 @@ +-import unittest +-from test.support.import_helper import import_module +- +- +-ctypes_test = import_module('ctypes.test') +- +-load_tests = ctypes_test.load_tests +- +-if __name__ == "__main__": +- unittest.main() +diff --git a/Lib/ctypes/test/__init__.py b/Lib/test/test_ctypes/__init__.py +similarity index 100% +rename from Lib/ctypes/test/__init__.py +rename to Lib/test/test_ctypes/__init__.py +diff --git a/Lib/test/test_ctypes/__main__.py b/Lib/test/test_ctypes/__main__.py +new file mode 100644 +index 0000000000..3003d4db89 +--- /dev/null ++++ b/Lib/test/test_ctypes/__main__.py +@@ -0,0 +1,4 @@ ++from test.test_ctypes import load_tests ++import unittest ++ ++unittest.main() +diff --git a/Lib/ctypes/test/test_anon.py b/Lib/test/test_ctypes/test_anon.py +similarity index 100% +rename from Lib/ctypes/test/test_anon.py +rename to Lib/test/test_ctypes/test_anon.py +diff --git a/Lib/ctypes/test/test_array_in_pointer.py b/Lib/test/test_ctypes/test_array_in_pointer.py +similarity index 100% +rename from Lib/ctypes/test/test_array_in_pointer.py +rename to Lib/test/test_ctypes/test_array_in_pointer.py +diff --git a/Lib/ctypes/test/test_arrays.py b/Lib/test/test_ctypes/test_arrays.py +similarity index 99% +rename from Lib/ctypes/test/test_arrays.py +rename to Lib/test/test_ctypes/test_arrays.py +index 14603b7049..415a5785a9 100644 +--- a/Lib/ctypes/test/test_arrays.py ++++ b/Lib/test/test_ctypes/test_arrays.py +@@ -3,7 +3,7 @@ + import sys + from ctypes import * + +-from ctypes.test import need_symbol ++from test.test_ctypes import need_symbol + + formats = "bBhHiIlLqQfd" + +diff --git a/Lib/ctypes/test/test_as_parameter.py b/Lib/test/test_ctypes/test_as_parameter.py +similarity index 99% +rename from Lib/ctypes/test/test_as_parameter.py +rename to Lib/test/test_ctypes/test_as_parameter.py +index f9d27cb89d..b35defb158 100644 +--- a/Lib/ctypes/test/test_as_parameter.py ++++ b/Lib/test/test_ctypes/test_as_parameter.py +@@ -1,6 +1,6 @@ + import unittest + from ctypes import * +-from ctypes.test import need_symbol ++from test.test_ctypes import need_symbol + import _ctypes_test + + dll = CDLL(_ctypes_test.__file__) +diff --git a/Lib/ctypes/test/test_bitfields.py b/Lib/test/test_ctypes/test_bitfields.py +similarity index 99% +rename from Lib/ctypes/test/test_bitfields.py +rename to Lib/test/test_ctypes/test_bitfields.py +index 66acd62e68..dad71a0ba7 100644 +--- a/Lib/ctypes/test/test_bitfields.py ++++ b/Lib/test/test_ctypes/test_bitfields.py +@@ -1,5 +1,5 @@ + from ctypes import * +-from ctypes.test import need_symbol ++from test.test_ctypes import need_symbol + from test import support + import unittest + import os +diff --git a/Lib/ctypes/test/test_buffers.py b/Lib/test/test_ctypes/test_buffers.py +similarity index 98% +rename from Lib/ctypes/test/test_buffers.py +rename to Lib/test/test_ctypes/test_buffers.py +index 15782be757..a9be2023aa 100644 +--- a/Lib/ctypes/test/test_buffers.py ++++ b/Lib/test/test_ctypes/test_buffers.py +@@ -1,5 +1,5 @@ + from ctypes import * +-from ctypes.test import need_symbol ++from test.test_ctypes import need_symbol + import unittest + + class StringBufferTestCase(unittest.TestCase): +diff --git a/Lib/ctypes/test/test_bytes.py b/Lib/test/test_ctypes/test_bytes.py +similarity index 100% +rename from Lib/ctypes/test/test_bytes.py +rename to Lib/test/test_ctypes/test_bytes.py +diff --git a/Lib/ctypes/test/test_byteswap.py b/Lib/test/test_ctypes/test_byteswap.py +similarity index 100% +rename from Lib/ctypes/test/test_byteswap.py +rename to Lib/test/test_ctypes/test_byteswap.py +diff --git a/Lib/ctypes/test/test_callbacks.py b/Lib/test/test_ctypes/test_callbacks.py +similarity index 99% +rename from Lib/ctypes/test/test_callbacks.py +rename to Lib/test/test_ctypes/test_callbacks.py +index 1099cf9a69..2758720d4a 100644 +--- a/Lib/ctypes/test/test_callbacks.py ++++ b/Lib/test/test_ctypes/test_callbacks.py +@@ -3,7 +3,7 @@ + from test import support + + from ctypes import * +-from ctypes.test import need_symbol ++from test.test_ctypes import need_symbol + from _ctypes import CTYPES_MAX_ARGCOUNT + import _ctypes_test + +diff --git a/Lib/ctypes/test/test_cast.py b/Lib/test/test_ctypes/test_cast.py +similarity index 98% +rename from Lib/ctypes/test/test_cast.py +rename to Lib/test/test_ctypes/test_cast.py +index 6878f97328..7ee23b16f1 100644 +--- a/Lib/ctypes/test/test_cast.py ++++ b/Lib/test/test_ctypes/test_cast.py +@@ -1,5 +1,5 @@ + from ctypes import * +-from ctypes.test import need_symbol ++from test.test_ctypes import need_symbol + import unittest + import sys + +diff --git a/Lib/ctypes/test/test_cfuncs.py b/Lib/test/test_ctypes/test_cfuncs.py +similarity index 99% +rename from Lib/ctypes/test/test_cfuncs.py +rename to Lib/test/test_ctypes/test_cfuncs.py +index ac2240fa19..0a9394bf31 100644 +--- a/Lib/ctypes/test/test_cfuncs.py ++++ b/Lib/test/test_ctypes/test_cfuncs.py +@@ -3,7 +3,7 @@ + + import unittest + from ctypes import * +-from ctypes.test import need_symbol ++from test.test_ctypes import need_symbol + + import _ctypes_test + +diff --git a/Lib/ctypes/test/test_checkretval.py b/Lib/test/test_ctypes/test_checkretval.py +similarity index 95% +rename from Lib/ctypes/test/test_checkretval.py +rename to Lib/test/test_ctypes/test_checkretval.py +index e9567dc391..1492099f4b 100644 +--- a/Lib/ctypes/test/test_checkretval.py ++++ b/Lib/test/test_ctypes/test_checkretval.py +@@ -1,7 +1,7 @@ + import unittest + + from ctypes import * +-from ctypes.test import need_symbol ++from test.test_ctypes import need_symbol + + class CHECKED(c_int): + def _check_retval_(value): +diff --git a/Lib/ctypes/test/test_delattr.py b/Lib/test/test_ctypes/test_delattr.py +similarity index 100% +rename from Lib/ctypes/test/test_delattr.py +rename to Lib/test/test_ctypes/test_delattr.py +diff --git a/Lib/ctypes/test/test_errno.py b/Lib/test/test_ctypes/test_errno.py +similarity index 100% +rename from Lib/ctypes/test/test_errno.py +rename to Lib/test/test_ctypes/test_errno.py +diff --git a/Lib/ctypes/test/test_find.py b/Lib/test/test_ctypes/test_find.py +similarity index 100% +rename from Lib/ctypes/test/test_find.py +rename to Lib/test/test_ctypes/test_find.py +diff --git a/Lib/ctypes/test/test_frombuffer.py b/Lib/test/test_ctypes/test_frombuffer.py +similarity index 100% +rename from Lib/ctypes/test/test_frombuffer.py +rename to Lib/test/test_ctypes/test_frombuffer.py +diff --git a/Lib/ctypes/test/test_funcptr.py b/Lib/test/test_ctypes/test_funcptr.py +similarity index 100% +rename from Lib/ctypes/test/test_funcptr.py +rename to Lib/test/test_ctypes/test_funcptr.py +diff --git a/Lib/ctypes/test/test_functions.py b/Lib/test/test_ctypes/test_functions.py +similarity index 99% +rename from Lib/ctypes/test/test_functions.py +rename to Lib/test/test_ctypes/test_functions.py +index f9e92e1cc6..4a784c8d79 100644 +--- a/Lib/ctypes/test/test_functions.py ++++ b/Lib/test/test_ctypes/test_functions.py +@@ -6,7 +6,7 @@ + """ + + from ctypes import * +-from ctypes.test import need_symbol ++from test.test_ctypes import need_symbol + import sys, unittest + + try: +diff --git a/Lib/ctypes/test/test_incomplete.py b/Lib/test/test_ctypes/test_incomplete.py +similarity index 100% +rename from Lib/ctypes/test/test_incomplete.py +rename to Lib/test/test_ctypes/test_incomplete.py +diff --git a/Lib/ctypes/test/test_init.py b/Lib/test/test_ctypes/test_init.py +similarity index 100% +rename from Lib/ctypes/test/test_init.py +rename to Lib/test/test_ctypes/test_init.py +diff --git a/Lib/ctypes/test/test_internals.py b/Lib/test/test_ctypes/test_internals.py +similarity index 100% +rename from Lib/ctypes/test/test_internals.py +rename to Lib/test/test_ctypes/test_internals.py +diff --git a/Lib/ctypes/test/test_keeprefs.py b/Lib/test/test_ctypes/test_keeprefs.py +similarity index 100% +rename from Lib/ctypes/test/test_keeprefs.py +rename to Lib/test/test_ctypes/test_keeprefs.py +diff --git a/Lib/ctypes/test/test_libc.py b/Lib/test/test_ctypes/test_libc.py +similarity index 100% +rename from Lib/ctypes/test/test_libc.py +rename to Lib/test/test_ctypes/test_libc.py +diff --git a/Lib/ctypes/test/test_loading.py b/Lib/test/test_ctypes/test_loading.py +similarity index 100% +rename from Lib/ctypes/test/test_loading.py +rename to Lib/test/test_ctypes/test_loading.py +diff --git a/Lib/ctypes/test/test_macholib.py b/Lib/test/test_ctypes/test_macholib.py +similarity index 100% +rename from Lib/ctypes/test/test_macholib.py +rename to Lib/test/test_ctypes/test_macholib.py +diff --git a/Lib/ctypes/test/test_memfunctions.py b/Lib/test/test_ctypes/test_memfunctions.py +similarity index 98% +rename from Lib/ctypes/test/test_memfunctions.py +rename to Lib/test/test_ctypes/test_memfunctions.py +index e784b9a706..d5c9735211 100644 +--- a/Lib/ctypes/test/test_memfunctions.py ++++ b/Lib/test/test_ctypes/test_memfunctions.py +@@ -2,7 +2,7 @@ + from test import support + import unittest + from ctypes import * +-from ctypes.test import need_symbol ++from test.test_ctypes import need_symbol + + class MemFunctionsTest(unittest.TestCase): + @unittest.skip('test disabled') +diff --git a/Lib/ctypes/test/test_numbers.py b/Lib/test/test_ctypes/test_numbers.py +similarity index 100% +rename from Lib/ctypes/test/test_numbers.py +rename to Lib/test/test_ctypes/test_numbers.py +diff --git a/Lib/ctypes/test/test_objects.py b/Lib/test/test_ctypes/test_objects.py +similarity index 87% +rename from Lib/ctypes/test/test_objects.py +rename to Lib/test/test_ctypes/test_objects.py +index 19e3dc1f2d..44a3c61ad7 100644 +--- a/Lib/ctypes/test/test_objects.py ++++ b/Lib/test/test_ctypes/test_objects.py +@@ -42,7 +42,7 @@ + of 'x' ('_b_base_' is either None, or the root object owning the memory block): + + >>> print(x.array._b_base_) # doctest: +ELLIPSIS +- ++ + >>> + + >>> x.array[0] = b'spam spam spam' +@@ -56,12 +56,12 @@ + + import unittest, doctest + +-import ctypes.test.test_objects ++import test.test_ctypes.test_objects + + class TestCase(unittest.TestCase): + def test(self): +- failures, tests = doctest.testmod(ctypes.test.test_objects) ++ failures, tests = doctest.testmod(test.test_ctypes.test_objects) + self.assertFalse(failures, 'doctests failed, see output above') + + if __name__ == '__main__': +- doctest.testmod(ctypes.test.test_objects) ++ doctest.testmod(test.test_ctypes.test_objects) +diff --git a/Lib/ctypes/test/test_parameters.py b/Lib/test/test_ctypes/test_parameters.py +similarity index 99% +rename from Lib/ctypes/test/test_parameters.py +rename to Lib/test/test_ctypes/test_parameters.py +index 38af7ac13d..2f755a6d09 100644 +--- a/Lib/ctypes/test/test_parameters.py ++++ b/Lib/test/test_ctypes/test_parameters.py +@@ -1,5 +1,5 @@ + import unittest +-from ctypes.test import need_symbol ++from test.test_ctypes import need_symbol + import test.support + + class SimpleTypesTestCase(unittest.TestCase): +diff --git a/Lib/ctypes/test/test_pep3118.py b/Lib/test/test_ctypes/test_pep3118.py +similarity index 100% +rename from Lib/ctypes/test/test_pep3118.py +rename to Lib/test/test_ctypes/test_pep3118.py +diff --git a/Lib/ctypes/test/test_pickling.py b/Lib/test/test_ctypes/test_pickling.py +similarity index 100% +rename from Lib/ctypes/test/test_pickling.py +rename to Lib/test/test_ctypes/test_pickling.py +diff --git a/Lib/ctypes/test/test_pointers.py b/Lib/test/test_ctypes/test_pointers.py +similarity index 100% +rename from Lib/ctypes/test/test_pointers.py +rename to Lib/test/test_ctypes/test_pointers.py +diff --git a/Lib/ctypes/test/test_prototypes.py b/Lib/test/test_ctypes/test_prototypes.py +similarity index 99% +rename from Lib/ctypes/test/test_prototypes.py +rename to Lib/test/test_ctypes/test_prototypes.py +index cd0c649de3..bf27561487 100644 +--- a/Lib/ctypes/test/test_prototypes.py ++++ b/Lib/test/test_ctypes/test_prototypes.py +@@ -1,5 +1,5 @@ + from ctypes import * +-from ctypes.test import need_symbol ++from test.test_ctypes import need_symbol + import unittest + + # IMPORTANT INFO: +diff --git a/Lib/ctypes/test/test_python_api.py b/Lib/test/test_ctypes/test_python_api.py +similarity index 100% +rename from Lib/ctypes/test/test_python_api.py +rename to Lib/test/test_ctypes/test_python_api.py +diff --git a/Lib/ctypes/test/test_random_things.py b/Lib/test/test_ctypes/test_random_things.py +similarity index 100% +rename from Lib/ctypes/test/test_random_things.py +rename to Lib/test/test_ctypes/test_random_things.py +diff --git a/Lib/ctypes/test/test_refcounts.py b/Lib/test/test_ctypes/test_refcounts.py +similarity index 100% +rename from Lib/ctypes/test/test_refcounts.py +rename to Lib/test/test_ctypes/test_refcounts.py +diff --git a/Lib/ctypes/test/test_repr.py b/Lib/test/test_ctypes/test_repr.py +similarity index 100% +rename from Lib/ctypes/test/test_repr.py +rename to Lib/test/test_ctypes/test_repr.py +diff --git a/Lib/ctypes/test/test_returnfuncptrs.py b/Lib/test/test_ctypes/test_returnfuncptrs.py +similarity index 100% +rename from Lib/ctypes/test/test_returnfuncptrs.py +rename to Lib/test/test_ctypes/test_returnfuncptrs.py +diff --git a/Lib/ctypes/test/test_simplesubclasses.py b/Lib/test/test_ctypes/test_simplesubclasses.py +similarity index 100% +rename from Lib/ctypes/test/test_simplesubclasses.py +rename to Lib/test/test_ctypes/test_simplesubclasses.py +diff --git a/Lib/ctypes/test/test_sizes.py b/Lib/test/test_ctypes/test_sizes.py +similarity index 100% +rename from Lib/ctypes/test/test_sizes.py +rename to Lib/test/test_ctypes/test_sizes.py +diff --git a/Lib/ctypes/test/test_slicing.py b/Lib/test/test_ctypes/test_slicing.py +similarity index 99% +rename from Lib/ctypes/test/test_slicing.py +rename to Lib/test/test_ctypes/test_slicing.py +index a3932f1767..b3e68f9a82 100644 +--- a/Lib/ctypes/test/test_slicing.py ++++ b/Lib/test/test_ctypes/test_slicing.py +@@ -1,6 +1,6 @@ + import unittest + from ctypes import * +-from ctypes.test import need_symbol ++from test.test_ctypes import need_symbol + + import _ctypes_test + +diff --git a/Lib/ctypes/test/test_stringptr.py b/Lib/test/test_ctypes/test_stringptr.py +similarity index 100% +rename from Lib/ctypes/test/test_stringptr.py +rename to Lib/test/test_ctypes/test_stringptr.py +diff --git a/Lib/ctypes/test/test_strings.py b/Lib/test/test_ctypes/test_strings.py +similarity index 99% +rename from Lib/ctypes/test/test_strings.py +rename to Lib/test/test_ctypes/test_strings.py +index 12e208828a..a9003be3f5 100644 +--- a/Lib/ctypes/test/test_strings.py ++++ b/Lib/test/test_ctypes/test_strings.py +@@ -1,6 +1,6 @@ + import unittest + from ctypes import * +-from ctypes.test import need_symbol ++from test.test_ctypes import need_symbol + + class StringArrayTestCase(unittest.TestCase): + def test(self): +diff --git a/Lib/ctypes/test/test_struct_fields.py b/Lib/test/test_ctypes/test_struct_fields.py +similarity index 100% +rename from Lib/ctypes/test/test_struct_fields.py +rename to Lib/test/test_ctypes/test_struct_fields.py +diff --git a/Lib/ctypes/test/test_structures.py b/Lib/test/test_ctypes/test_structures.py +similarity index 99% +rename from Lib/ctypes/test/test_structures.py +rename to Lib/test/test_ctypes/test_structures.py +index 97ad2b8ed8..13c0470ba2 100644 +--- a/Lib/ctypes/test/test_structures.py ++++ b/Lib/test/test_ctypes/test_structures.py +@@ -2,7 +2,7 @@ + import sys + import unittest + from ctypes import * +-from ctypes.test import need_symbol ++from test.test_ctypes import need_symbol + from struct import calcsize + import _ctypes_test + from test import support +diff --git a/Lib/ctypes/test/test_unaligned_structures.py b/Lib/test/test_ctypes/test_unaligned_structures.py +similarity index 100% +rename from Lib/ctypes/test/test_unaligned_structures.py +rename to Lib/test/test_ctypes/test_unaligned_structures.py +diff --git a/Lib/ctypes/test/test_unicode.py b/Lib/test/test_ctypes/test_unicode.py +similarity index 97% +rename from Lib/ctypes/test/test_unicode.py +rename to Lib/test/test_ctypes/test_unicode.py +index 60c75424b7..319cb3b1dc 100644 +--- a/Lib/ctypes/test/test_unicode.py ++++ b/Lib/test/test_ctypes/test_unicode.py +@@ -1,6 +1,6 @@ + import unittest + import ctypes +-from ctypes.test import need_symbol ++from test.test_ctypes import need_symbol + + import _ctypes_test + +diff --git a/Lib/ctypes/test/test_values.py b/Lib/test/test_ctypes/test_values.py +similarity index 100% +rename from Lib/ctypes/test/test_values.py +rename to Lib/test/test_ctypes/test_values.py +diff --git a/Lib/ctypes/test/test_varsize_struct.py b/Lib/test/test_ctypes/test_varsize_struct.py +similarity index 100% +rename from Lib/ctypes/test/test_varsize_struct.py +rename to Lib/test/test_ctypes/test_varsize_struct.py +diff --git a/Lib/ctypes/test/test_win32.py b/Lib/test/test_ctypes/test_win32.py +similarity index 100% +rename from Lib/ctypes/test/test_win32.py +rename to Lib/test/test_ctypes/test_win32.py +diff --git a/Lib/ctypes/test/test_wintypes.py b/Lib/test/test_ctypes/test_wintypes.py +similarity index 100% +rename from Lib/ctypes/test/test_wintypes.py +rename to Lib/test/test_ctypes/test_wintypes.py +diff --git a/Misc/NEWS.d/next/Tests/2022-06-20-23-04-52.gh-issue-93839.OE3Ybk.rst b/Misc/NEWS.d/next/Tests/2022-06-20-23-04-52.gh-issue-93839.OE3Ybk.rst +new file mode 100644 +index 0000000000..121b64b133 +--- /dev/null ++++ b/Misc/NEWS.d/next/Tests/2022-06-20-23-04-52.gh-issue-93839.OE3Ybk.rst +@@ -0,0 +1,2 @@ ++Move ``Lib/ctypes/test/`` to ``Lib/test/test_ctypes/``. Patch by Victor ++Stinner. +diff --git a/PCbuild/lib.pyproj b/PCbuild/lib.pyproj +index 43c570f1da..692b083349 100644 +--- a/PCbuild/lib.pyproj ++++ b/PCbuild/lib.pyproj +@@ -83,59 +83,6 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- + + + +@@ -944,7 +891,59 @@ + + + +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -1725,7 +1724,6 @@ + + + +- + + + +@@ -1769,6 +1767,7 @@ + + + ++ + + + +diff --git a/Tools/wasm/wasm_assets.py b/Tools/wasm/wasm_assets.py +index b7e83517ca..d0a0570840 100755 +--- a/Tools/wasm/wasm_assets.py ++++ b/Tools/wasm/wasm_assets.py +@@ -111,7 +111,6 @@ + + # regression test sub directories + OMIT_SUBDIRS = ( +- "ctypes/test/", + "tkinter/test/", + "unittest/test/", + ) +-- +2.29.2.windows.2 + diff --git a/recipes/recipes_emscripten/python/patches/0006-gh-93839-Move-Lib-unttest-test-to-Lib-test-test_unit.patch b/recipes/recipes_emscripten/python/patches/0006-gh-93839-Move-Lib-unttest-test-to-Lib-test-test_unit.patch new file mode 100644 index 000000000..9e8d8c47c --- /dev/null +++ b/recipes/recipes_emscripten/python/patches/0006-gh-93839-Move-Lib-unttest-test-to-Lib-test-test_unit.patch @@ -0,0 +1,724 @@ +From c735d545343c3ab002c62596b2fb2cfa4488b0af Mon Sep 17 00:00:00 2001 +From: Victor Stinner +Date: Tue, 21 Jun 2022 10:27:59 +0200 +Subject: [PATCH 6/9] gh-93839: Move Lib/unttest/test/ to Lib/test/test_unittest/ + (#94043) + +* Move Lib/unittest/test/ to Lib/test/test_unittest/ +* Remove Lib/test/test_unittest.py +* Replace unittest.test with test.test_unittest +* Remove unittest.load_tests() +* Rewrite unittest __init__.py and __main__.py +* Update build system, CODEOWNERS, and wasm_assets.py +--- + .github/CODEOWNERS | 2 +- + Lib/test/test_unittest.py | 16 ----- + Lib/test/test_unittest/__init__.py | 6 ++ + Lib/test/test_unittest/__main__.py | 4 ++ + .../test_unittest}/_test_warnings.py | 0 + .../test => test/test_unittest}/dummy.py | 0 + .../test => test/test_unittest}/support.py | 0 + .../test_unittest}/test_assertions.py | 0 + .../test_unittest}/test_async_case.py | 0 + .../test => test/test_unittest}/test_break.py | 0 + .../test => test/test_unittest}/test_case.py | 2 +- + .../test_unittest}/test_discovery.py | 6 +- + .../test_unittest}/test_functiontestcase.py | 2 +- + .../test_unittest}/test_loader.py | 6 +- + .../test_unittest}/test_program.py | 16 ++--- + .../test_unittest}/test_result.py | 0 + .../test_unittest}/test_runner.py | 2 +- + .../test_unittest}/test_setups.py | 0 + .../test_unittest}/test_skipping.py | 2 +- + .../test => test/test_unittest}/test_suite.py | 2 +- + .../test_unittest}/testmock/__init__.py | 2 +- + .../test_unittest}/testmock/__main__.py | 2 +- + .../test_unittest}/testmock/support.py | 0 + .../test_unittest}/testmock/testasync.py | 0 + .../test_unittest}/testmock/testcallable.py | 2 +- + .../test_unittest}/testmock/testhelpers.py | 0 + .../testmock/testmagicmethods.py | 0 + .../test_unittest}/testmock/testmock.py | 2 +- + .../test_unittest}/testmock/testpatch.py | 22 +++---- + .../test_unittest}/testmock/testsealable.py | 0 + .../test_unittest}/testmock/testsentinel.py | 0 + .../test_unittest}/testmock/testwith.py | 2 +- + Lib/unittest/__init__.py | 10 ---- + Lib/unittest/test/__init__.py | 25 -------- + Lib/unittest/test/__main__.py | 18 ------ + Makefile.pre.in | 4 +- + PCbuild/lib.pyproj | 58 +++++++++---------- + Tools/wasm/wasm_assets.py | 1 - + 38 files changed, 77 insertions(+), 137 deletions(-) + delete mode 100644 Lib/test/test_unittest.py + create mode 100644 Lib/test/test_unittest/__init__.py + create mode 100644 Lib/test/test_unittest/__main__.py + rename Lib/{unittest/test => test/test_unittest}/_test_warnings.py (100%) + rename Lib/{unittest/test => test/test_unittest}/dummy.py (100%) + rename Lib/{unittest/test => test/test_unittest}/support.py (100%) + rename Lib/{unittest/test => test/test_unittest}/test_assertions.py (100%) + rename Lib/{unittest/test => test/test_unittest}/test_async_case.py (100%) + rename Lib/{unittest/test => test/test_unittest}/test_break.py (100%) + rename Lib/{unittest/test => test/test_unittest}/test_case.py (99%) + rename Lib/{unittest/test => test/test_unittest}/test_discovery.py (99%) + rename Lib/{unittest/test => test/test_unittest}/test_functiontestcase.py (99%) + rename Lib/{unittest/test => test/test_unittest}/test_loader.py (99%) + rename Lib/{unittest/test => test/test_unittest}/test_program.py (96%) + rename Lib/{unittest/test => test/test_unittest}/test_result.py (100%) + rename Lib/{unittest/test => test/test_unittest}/test_runner.py (99%) + rename Lib/{unittest/test => test/test_unittest}/test_setups.py (100%) + rename Lib/{unittest/test => test/test_unittest}/test_skipping.py (99%) + rename Lib/{unittest/test => test/test_unittest}/test_suite.py (99%) + rename Lib/{unittest/test => test/test_unittest}/testmock/__init__.py (86%) + rename Lib/{unittest/test => test/test_unittest}/testmock/__main__.py (86%) + rename Lib/{unittest/test => test/test_unittest}/testmock/support.py (100%) + rename Lib/{unittest/test => test/test_unittest}/testmock/testasync.py (100%) + rename Lib/{unittest/test => test/test_unittest}/testmock/testcallable.py (98%) + rename Lib/{unittest/test => test/test_unittest}/testmock/testhelpers.py (100%) + rename Lib/{unittest/test => test/test_unittest}/testmock/testmagicmethods.py (100%) + rename Lib/{unittest/test => test/test_unittest}/testmock/testmock.py (99%) + rename Lib/{unittest/test => test/test_unittest}/testmock/testpatch.py (98%) + rename Lib/{unittest/test => test/test_unittest}/testmock/testsealable.py (100%) + rename Lib/{unittest/test => test/test_unittest}/testmock/testsentinel.py (100%) + rename Lib/{unittest/test => test/test_unittest}/testmock/testwith.py (99%) + delete mode 100644 Lib/unittest/test/__init__.py + delete mode 100644 Lib/unittest/test/__main__.py + +diff --git a/Lib/test/test_unittest.py b/Lib/test/test_unittest.py +deleted file mode 100644 +index 1079c7df2e..0000000000 +--- a/Lib/test/test_unittest.py ++++ /dev/null +@@ -1,16 +0,0 @@ +-import unittest.test +- +-from test import support +- +- +-def load_tests(*_): +- # used by unittest +- return unittest.test.suite() +- +- +-def tearDownModule(): +- support.reap_children() +- +- +-if __name__ == "__main__": +- unittest.main() +diff --git a/Lib/test/test_unittest/__init__.py b/Lib/test/test_unittest/__init__.py +new file mode 100644 +index 0000000000..bc502ef32d +--- /dev/null ++++ b/Lib/test/test_unittest/__init__.py +@@ -0,0 +1,6 @@ ++import os.path ++from test.support import load_package_tests ++ ++ ++def load_tests(*args): ++ return load_package_tests(os.path.dirname(__file__), *args) +diff --git a/Lib/test/test_unittest/__main__.py b/Lib/test/test_unittest/__main__.py +new file mode 100644 +index 0000000000..40a23a297e +--- /dev/null ++++ b/Lib/test/test_unittest/__main__.py +@@ -0,0 +1,4 @@ ++from . import load_tests ++import unittest ++ ++unittest.main() +diff --git a/Lib/unittest/test/_test_warnings.py b/Lib/test/test_unittest/_test_warnings.py +similarity index 100% +rename from Lib/unittest/test/_test_warnings.py +rename to Lib/test/test_unittest/_test_warnings.py +diff --git a/Lib/unittest/test/dummy.py b/Lib/test/test_unittest/dummy.py +similarity index 100% +rename from Lib/unittest/test/dummy.py +rename to Lib/test/test_unittest/dummy.py +diff --git a/Lib/unittest/test/support.py b/Lib/test/test_unittest/support.py +similarity index 100% +rename from Lib/unittest/test/support.py +rename to Lib/test/test_unittest/support.py +diff --git a/Lib/unittest/test/test_assertions.py b/Lib/test/test_unittest/test_assertions.py +similarity index 100% +rename from Lib/unittest/test/test_assertions.py +rename to Lib/test/test_unittest/test_assertions.py +diff --git a/Lib/unittest/test/test_async_case.py b/Lib/test/test_unittest/test_async_case.py +similarity index 100% +rename from Lib/unittest/test/test_async_case.py +rename to Lib/test/test_unittest/test_async_case.py +diff --git a/Lib/unittest/test/test_break.py b/Lib/test/test_unittest/test_break.py +similarity index 100% +rename from Lib/unittest/test/test_break.py +rename to Lib/test/test_unittest/test_break.py +diff --git a/Lib/unittest/test/test_case.py b/Lib/test/test_unittest/test_case.py +similarity index 99% +rename from Lib/unittest/test/test_case.py +rename to Lib/test/test_unittest/test_case.py +index 374a255255..e000fe4f07 100644 +--- a/Lib/unittest/test/test_case.py ++++ b/Lib/test/test_unittest/test_case.py +@@ -15,7 +15,7 @@ + + import unittest + +-from unittest.test.support import ( ++from test.test_unittest.support import ( + TestEquality, TestHashing, LoggingResult, LegacyLoggingResult, + ResultWithNoStartTestRunStopTestRun + ) +diff --git a/Lib/unittest/test/test_discovery.py b/Lib/test/test_unittest/test_discovery.py +similarity index 99% +rename from Lib/unittest/test/test_discovery.py +rename to Lib/test/test_unittest/test_discovery.py +index 3b58786ec1..946fa1258e 100644 +--- a/Lib/unittest/test/test_discovery.py ++++ b/Lib/test/test_unittest/test_discovery.py +@@ -10,7 +10,7 @@ + + import unittest + import unittest.mock +-import unittest.test ++import test.test_unittest + + + class TestableTestProgram(unittest.TestProgram): +@@ -789,7 +789,7 @@ def test_discovery_from_dotted_path(self): + loader = unittest.TestLoader() + + tests = [self] +- expectedPath = os.path.abspath(os.path.dirname(unittest.test.__file__)) ++ expectedPath = os.path.abspath(os.path.dirname(test.test_unittest.__file__)) + + self.wasRun = False + def _find_tests(start_dir, pattern): +@@ -797,7 +797,7 @@ def _find_tests(start_dir, pattern): + self.assertEqual(start_dir, expectedPath) + return tests + loader._find_tests = _find_tests +- suite = loader.discover('unittest.test') ++ suite = loader.discover('test.test_unittest') + self.assertTrue(self.wasRun) + self.assertEqual(suite._tests, tests) + +diff --git a/Lib/unittest/test/test_functiontestcase.py b/Lib/test/test_unittest/test_functiontestcase.py +similarity index 99% +rename from Lib/unittest/test/test_functiontestcase.py +rename to Lib/test/test_unittest/test_functiontestcase.py +index 4971729880..2ebed9564a 100644 +--- a/Lib/unittest/test/test_functiontestcase.py ++++ b/Lib/test/test_unittest/test_functiontestcase.py +@@ -1,6 +1,6 @@ + import unittest + +-from unittest.test.support import LoggingResult ++from test.test_unittest.support import LoggingResult + + + class Test_FunctionTestCase(unittest.TestCase): +diff --git a/Lib/unittest/test/test_loader.py b/Lib/test/test_unittest/test_loader.py +similarity index 99% +rename from Lib/unittest/test/test_loader.py +rename to Lib/test/test_unittest/test_loader.py +index de2268cda9..c06ebb658d 100644 +--- a/Lib/unittest/test/test_loader.py ++++ b/Lib/test/test_unittest/test_loader.py +@@ -716,7 +716,7 @@ def test_loadTestsFromName__module_not_loaded(self): + # We're going to try to load this module as a side-effect, so it + # better not be loaded before we try. + # +- module_name = 'unittest.test.dummy' ++ module_name = 'test.test_unittest.dummy' + sys.modules.pop(module_name, None) + + loader = unittest.TestLoader() +@@ -844,7 +844,7 @@ def test_loadTestsFromNames__unknown_attr_name(self): + loader = unittest.TestLoader() + + suite = loader.loadTestsFromNames( +- ['unittest.loader.sdasfasfasdf', 'unittest.test.dummy']) ++ ['unittest.loader.sdasfasfasdf', 'test.test_unittest.dummy']) + error, test = self.check_deferred_error(loader, list(suite)[0]) + expected = "module 'unittest.loader' has no attribute 'sdasfasfasdf'" + self.assertIn( +@@ -1141,7 +1141,7 @@ def test_loadTestsFromNames__module_not_loaded(self): + # We're going to try to load this module as a side-effect, so it + # better not be loaded before we try. + # +- module_name = 'unittest.test.dummy' ++ module_name = 'test.test_unittest.dummy' + sys.modules.pop(module_name, None) + + loader = unittest.TestLoader() +diff --git a/Lib/unittest/test/test_program.py b/Lib/test/test_unittest/test_program.py +similarity index 96% +rename from Lib/unittest/test/test_program.py +rename to Lib/test/test_unittest/test_program.py +index 26a8550af8..169fc4ed94 100644 +--- a/Lib/unittest/test/test_program.py ++++ b/Lib/test/test_unittest/test_program.py +@@ -5,8 +5,8 @@ + import subprocess + from test import support + import unittest +-import unittest.test +-from unittest.test.test_result import BufferedWriter ++import test.test_unittest ++from test.test_unittest.test_result import BufferedWriter + + + class Test_TestProgram(unittest.TestCase): +@@ -15,7 +15,7 @@ def test_discovery_from_dotted_path(self): + loader = unittest.TestLoader() + + tests = [self] +- expectedPath = os.path.abspath(os.path.dirname(unittest.test.__file__)) ++ expectedPath = os.path.abspath(os.path.dirname(test.test_unittest.__file__)) + + self.wasRun = False + def _find_tests(start_dir, pattern): +@@ -23,7 +23,7 @@ def _find_tests(start_dir, pattern): + self.assertEqual(start_dir, expectedPath) + return tests + loader._find_tests = _find_tests +- suite = loader.discover('unittest.test') ++ suite = loader.discover('test.test_unittest') + self.assertTrue(self.wasRun) + self.assertEqual(suite._tests, tests) + +@@ -93,10 +93,10 @@ def run(self, test): + sys.argv = ['faketest'] + runner = FakeRunner() + program = unittest.TestProgram(testRunner=runner, exit=False, +- defaultTest='unittest.test', ++ defaultTest='test.test_unittest', + testLoader=self.FooBarLoader()) + sys.argv = old_argv +- self.assertEqual(('unittest.test',), program.testNames) ++ self.assertEqual(('test.test_unittest',), program.testNames) + + def test_defaultTest_with_iterable(self): + class FakeRunner(object): +@@ -109,10 +109,10 @@ def run(self, test): + runner = FakeRunner() + program = unittest.TestProgram( + testRunner=runner, exit=False, +- defaultTest=['unittest.test', 'unittest.test2'], ++ defaultTest=['test.test_unittest', 'test.test_unittest2'], + testLoader=self.FooBarLoader()) + sys.argv = old_argv +- self.assertEqual(['unittest.test', 'unittest.test2'], ++ self.assertEqual(['test.test_unittest', 'test.test_unittest2'], + program.testNames) + + def test_NonExit(self): +diff --git a/Lib/unittest/test/test_result.py b/Lib/test/test_unittest/test_result.py +similarity index 100% +rename from Lib/unittest/test/test_result.py +rename to Lib/test/test_unittest/test_result.py +diff --git a/Lib/unittest/test/test_runner.py b/Lib/test/test_unittest/test_runner.py +similarity index 99% +rename from Lib/unittest/test/test_runner.py +rename to Lib/test/test_unittest/test_runner.py +index d3488b40e8..9e3a0a9ca0 100644 +--- a/Lib/unittest/test/test_runner.py ++++ b/Lib/test/test_unittest/test_runner.py +@@ -8,7 +8,7 @@ + import unittest + from unittest.case import _Outcome + +-from unittest.test.support import (LoggingResult, ++from test.test_unittest.support import (LoggingResult, + ResultWithNoStartTestRunStopTestRun) + + +diff --git a/Lib/unittest/test/test_setups.py b/Lib/test/test_unittest/test_setups.py +similarity index 100% +rename from Lib/unittest/test/test_setups.py +rename to Lib/test/test_unittest/test_setups.py +diff --git a/Lib/unittest/test/test_skipping.py b/Lib/test/test_unittest/test_skipping.py +similarity index 99% +rename from Lib/unittest/test/test_skipping.py +rename to Lib/test/test_unittest/test_skipping.py +index 64ceeae37e..f146dcac18 100644 +--- a/Lib/unittest/test/test_skipping.py ++++ b/Lib/test/test_unittest/test_skipping.py +@@ -1,6 +1,6 @@ + import unittest + +-from unittest.test.support import LoggingResult ++from test.test_unittest.support import LoggingResult + + + class Test_TestSkipping(unittest.TestCase): +diff --git a/Lib/unittest/test/test_suite.py b/Lib/test/test_unittest/test_suite.py +similarity index 99% +rename from Lib/unittest/test/test_suite.py +rename to Lib/test/test_unittest/test_suite.py +index 0551a16996..ca52ee9d9c 100644 +--- a/Lib/unittest/test/test_suite.py ++++ b/Lib/test/test_unittest/test_suite.py +@@ -3,7 +3,7 @@ + import gc + import sys + import weakref +-from unittest.test.support import LoggingResult, TestEquality ++from test.test_unittest.support import LoggingResult, TestEquality + + + ### Support code for Test_TestSuite +diff --git a/Lib/unittest/test/testmock/__init__.py b/Lib/test/test_unittest/testmock/__init__.py +similarity index 86% +rename from Lib/unittest/test/testmock/__init__.py +rename to Lib/test/test_unittest/testmock/__init__.py +index 87d7ae994d..6ee60b2376 100644 +--- a/Lib/unittest/test/testmock/__init__.py ++++ b/Lib/test/test_unittest/testmock/__init__.py +@@ -10,7 +10,7 @@ def load_tests(*args): + suite = unittest.TestSuite() + for fn in os.listdir(here): + if fn.startswith("test") and fn.endswith(".py"): +- modname = "unittest.test.testmock." + fn[:-3] ++ modname = "test.test_unittest.testmock." + fn[:-3] + __import__(modname) + module = sys.modules[modname] + suite.addTest(loader.loadTestsFromModule(module)) +diff --git a/Lib/unittest/test/testmock/__main__.py b/Lib/test/test_unittest/testmock/__main__.py +similarity index 86% +rename from Lib/unittest/test/testmock/__main__.py +rename to Lib/test/test_unittest/testmock/__main__.py +index 45c633a4ee..1e3068b0dd 100644 +--- a/Lib/unittest/test/testmock/__main__.py ++++ b/Lib/test/test_unittest/testmock/__main__.py +@@ -6,7 +6,7 @@ def load_tests(loader, standard_tests, pattern): + # top level directory cached on loader instance + this_dir = os.path.dirname(__file__) + pattern = pattern or "test*.py" +- # We are inside unittest.test.testmock, so the top-level is three notches up ++ # We are inside test.test_unittest.testmock, so the top-level is three notches up + top_level_dir = os.path.dirname(os.path.dirname(os.path.dirname(this_dir))) + package_tests = loader.discover(start_dir=this_dir, pattern=pattern, + top_level_dir=top_level_dir) +diff --git a/Lib/unittest/test/testmock/support.py b/Lib/test/test_unittest/testmock/support.py +similarity index 100% +rename from Lib/unittest/test/testmock/support.py +rename to Lib/test/test_unittest/testmock/support.py +diff --git a/Lib/unittest/test/testmock/testasync.py b/Lib/test/test_unittest/testmock/testasync.py +similarity index 100% +rename from Lib/unittest/test/testmock/testasync.py +rename to Lib/test/test_unittest/testmock/testasync.py +diff --git a/Lib/unittest/test/testmock/testcallable.py b/Lib/test/test_unittest/testmock/testcallable.py +similarity index 98% +rename from Lib/unittest/test/testmock/testcallable.py +rename to Lib/test/test_unittest/testmock/testcallable.py +index 5eadc00704..ca88511f63 100644 +--- a/Lib/unittest/test/testmock/testcallable.py ++++ b/Lib/test/test_unittest/testmock/testcallable.py +@@ -3,7 +3,7 @@ + # http://www.voidspace.org.uk/python/mock/ + + import unittest +-from unittest.test.testmock.support import is_instance, X, SomeClass ++from test.test_unittest.testmock.support import is_instance, X, SomeClass + + from unittest.mock import ( + Mock, MagicMock, NonCallableMagicMock, +diff --git a/Lib/unittest/test/testmock/testhelpers.py b/Lib/test/test_unittest/testmock/testhelpers.py +similarity index 100% +rename from Lib/unittest/test/testmock/testhelpers.py +rename to Lib/test/test_unittest/testmock/testhelpers.py +diff --git a/Lib/unittest/test/testmock/testmagicmethods.py b/Lib/test/test_unittest/testmock/testmagicmethods.py +similarity index 100% +rename from Lib/unittest/test/testmock/testmagicmethods.py +rename to Lib/test/test_unittest/testmock/testmagicmethods.py +diff --git a/Lib/unittest/test/testmock/testmock.py b/Lib/test/test_unittest/testmock/testmock.py +similarity index 99% +rename from Lib/unittest/test/testmock/testmock.py +rename to Lib/test/test_unittest/testmock/testmock.py +index c99098dc4e..8a92490137 100644 +--- a/Lib/unittest/test/testmock/testmock.py ++++ b/Lib/test/test_unittest/testmock/testmock.py +@@ -5,7 +5,7 @@ + + from test.support import ALWAYS_EQ + import unittest +-from unittest.test.testmock.support import is_instance ++from test.test_unittest.testmock.support import is_instance + from unittest import mock + from unittest.mock import ( + call, DEFAULT, patch, sentinel, +diff --git a/Lib/unittest/test/testmock/testpatch.py b/Lib/test/test_unittest/testmock/testpatch.py +similarity index 98% +rename from Lib/unittest/test/testmock/testpatch.py +rename to Lib/test/test_unittest/testmock/testpatch.py +index 8ab63a1317..93ec0ca4be 100644 +--- a/Lib/unittest/test/testmock/testpatch.py ++++ b/Lib/test/test_unittest/testmock/testpatch.py +@@ -7,8 +7,8 @@ + from collections import OrderedDict + + import unittest +-from unittest.test.testmock import support +-from unittest.test.testmock.support import SomeClass, is_instance ++from test.test_unittest.testmock import support ++from test.test_unittest.testmock.support import SomeClass, is_instance + + from test.test_importlib.util import uncache + from unittest.mock import ( +@@ -669,7 +669,7 @@ def test_patch_dict_decorator_resolution(self): + # the new dictionary during function call + original = support.target.copy() + +- @patch.dict('unittest.test.testmock.support.target', {'bar': 'BAR'}) ++ @patch.dict('test.test_unittest.testmock.support.target', {'bar': 'BAR'}) + def test(): + self.assertEqual(support.target, {'foo': 'BAZ', 'bar': 'BAR'}) + +@@ -1614,7 +1614,7 @@ def test_patch_with_spec_mock_repr(self): + + + def test_patch_nested_autospec_repr(self): +- with patch('unittest.test.testmock.support', autospec=True) as m: ++ with patch('test.test_unittest.testmock.support', autospec=True) as m: + self.assertIn(" name='support.SomeClass.wibble()'", + repr(m.SomeClass.wibble())) + self.assertIn(" name='support.SomeClass().wibble()'", +@@ -1882,7 +1882,7 @@ def foo(x=0): + + with patch.object(foo, '__module__', "testpatch2"): + self.assertEqual(foo.__module__, "testpatch2") +- self.assertEqual(foo.__module__, 'unittest.test.testmock.testpatch') ++ self.assertEqual(foo.__module__, 'test.test_unittest.testmock.testpatch') + + with patch.object(foo, '__annotations__', dict([('s', 1, )])): + self.assertEqual(foo.__annotations__, dict([('s', 1, )])) +@@ -1917,16 +1917,16 @@ def test_dotted_but_module_not_loaded(self): + # This exercises the AttributeError branch of _dot_lookup. + + # make sure it's there +- import unittest.test.testmock.support ++ import test.test_unittest.testmock.support + # now make sure it's not: + with patch.dict('sys.modules'): +- del sys.modules['unittest.test.testmock.support'] +- del sys.modules['unittest.test.testmock'] +- del sys.modules['unittest.test'] ++ del sys.modules['test.test_unittest.testmock.support'] ++ del sys.modules['test.test_unittest.testmock'] ++ del sys.modules['test.test_unittest'] + del sys.modules['unittest'] + + # now make sure we can patch based on a dotted path: +- @patch('unittest.test.testmock.support.X') ++ @patch('test.test_unittest.testmock.support.X') + def test(mock): + pass + test() +@@ -1943,7 +1943,7 @@ class Foo: + + + def test_cant_set_kwargs_when_passing_a_mock(self): +- @patch('unittest.test.testmock.support.X', new=object(), x=1) ++ @patch('test.test_unittest.testmock.support.X', new=object(), x=1) + def test(): pass + with self.assertRaises(TypeError): + test() +diff --git a/Lib/unittest/test/testmock/testsealable.py b/Lib/test/test_unittest/testmock/testsealable.py +similarity index 100% +rename from Lib/unittest/test/testmock/testsealable.py +rename to Lib/test/test_unittest/testmock/testsealable.py +diff --git a/Lib/unittest/test/testmock/testsentinel.py b/Lib/test/test_unittest/testmock/testsentinel.py +similarity index 100% +rename from Lib/unittest/test/testmock/testsentinel.py +rename to Lib/test/test_unittest/testmock/testsentinel.py +diff --git a/Lib/unittest/test/testmock/testwith.py b/Lib/test/test_unittest/testmock/testwith.py +similarity index 99% +rename from Lib/unittest/test/testmock/testwith.py +rename to Lib/test/test_unittest/testmock/testwith.py +index c74d49a63c..8dc8eb1137 100644 +--- a/Lib/unittest/test/testmock/testwith.py ++++ b/Lib/test/test_unittest/testmock/testwith.py +@@ -1,7 +1,7 @@ + import unittest + from warnings import catch_warnings + +-from unittest.test.testmock.support import is_instance ++from test.test_unittest.testmock.support import is_instance + from unittest.mock import MagicMock, Mock, patch, sentinel, mock_open, call + + +diff --git a/Lib/unittest/__init__.py b/Lib/unittest/__init__.py +index 005d23f6d0..b8de8c95d6 100644 +--- a/Lib/unittest/__init__.py ++++ b/Lib/unittest/__init__.py +@@ -73,16 +73,6 @@ def testMultiply(self): + _TextTestResult = TextTestResult + + +-# There are no tests here, so don't try to run anything discovered from +-# introspecting the symbols (e.g. FunctionTestCase). Instead, all our +-# tests come from within unittest.test. +-def load_tests(loader, tests, pattern): +- import os.path +- # top level directory cached on loader instance +- this_dir = os.path.dirname(__file__) +- return loader.discover(start_dir=this_dir, pattern=pattern) +- +- + # Lazy import of IsolatedAsyncioTestCase from .async_case + # It imports asyncio, which is relatively heavy, but most tests + # do not need it. +diff --git a/Lib/unittest/test/__init__.py b/Lib/unittest/test/__init__.py +deleted file mode 100644 +index 143f4ab5a3..0000000000 +--- a/Lib/unittest/test/__init__.py ++++ /dev/null +@@ -1,25 +0,0 @@ +-import os +-import sys +-import unittest +- +- +-here = os.path.dirname(__file__) +-loader = unittest.defaultTestLoader +- +-def suite(): +- suite = unittest.TestSuite() +- for fn in os.listdir(here): +- if fn.startswith("test") and fn.endswith(".py"): +- modname = "unittest.test." + fn[:-3] +- try: +- __import__(modname) +- except unittest.SkipTest: +- continue +- module = sys.modules[modname] +- suite.addTest(loader.loadTestsFromModule(module)) +- suite.addTest(loader.loadTestsFromName('unittest.test.testmock')) +- return suite +- +- +-if __name__ == "__main__": +- unittest.main(defaultTest="suite") +diff --git a/Lib/unittest/test/__main__.py b/Lib/unittest/test/__main__.py +deleted file mode 100644 +index 44d0591e84..0000000000 +--- a/Lib/unittest/test/__main__.py ++++ /dev/null +@@ -1,18 +0,0 @@ +-import os +-import unittest +- +- +-def load_tests(loader, standard_tests, pattern): +- # top level directory cached on loader instance +- this_dir = os.path.dirname(__file__) +- pattern = pattern or "test_*.py" +- # We are inside unittest.test, so the top-level is two notches up +- top_level_dir = os.path.dirname(os.path.dirname(this_dir)) +- package_tests = loader.discover(start_dir=this_dir, pattern=pattern, +- top_level_dir=top_level_dir) +- standard_tests.addTests(package_tests) +- return standard_tests +- +- +-if __name__ == '__main__': +- unittest.main() +diff --git a/PCbuild/lib.pyproj b/PCbuild/lib.pyproj +index 692b083349..f3f44d1d8f 100644 +--- a/PCbuild/lib.pyproj ++++ b/PCbuild/lib.pyproj +@@ -1491,33 +1491,33 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -1804,6 +1804,8 @@ + + + ++ ++ + + + +@@ -1813,8 +1815,6 @@ + + + +- +- + + + +diff --git a/Tools/wasm/wasm_assets.py b/Tools/wasm/wasm_assets.py +index d0a0570840..67afde60f0 100755 +--- a/Tools/wasm/wasm_assets.py ++++ b/Tools/wasm/wasm_assets.py +@@ -112,7 +112,6 @@ + # regression test sub directories + OMIT_SUBDIRS = ( + "tkinter/test/", +- "unittest/test/", + ) + + def get_builddir(args: argparse.Namespace) -> pathlib.Path: +-- +2.29.2.windows.2 + diff --git a/recipes/recipes_emscripten/python/patches/0007-gh-93839-Use-load_package_tests-for-testmock-GH-9405.patch b/recipes/recipes_emscripten/python/patches/0007-gh-93839-Use-load_package_tests-for-testmock-GH-9405.patch new file mode 100644 index 000000000..33531df3b --- /dev/null +++ b/recipes/recipes_emscripten/python/patches/0007-gh-93839-Use-load_package_tests-for-testmock-GH-9405.patch @@ -0,0 +1,40 @@ +From 50ebd72fb0e69c78f95cea3d4a47589beb91ac37 Mon Sep 17 00:00:00 2001 +From: Christian Heimes +Date: Tue, 21 Jun 2022 14:51:39 +0200 +Subject: [PATCH 7/9] gh-93839: Use load_package_tests() for testmock (GH-94055) + +Fixes failing tests on WebAssembly platforms. + +Automerge-Triggered-By: GH:tiran +--- + Lib/test/test_unittest/testmock/__init__.py | 17 +++-------------- + 1 file changed, 3 insertions(+), 14 deletions(-) + +diff --git a/Lib/test/test_unittest/testmock/__init__.py b/Lib/test/test_unittest/testmock/__init__.py +index 6ee60b2376..bc502ef32d 100644 +--- a/Lib/test/test_unittest/testmock/__init__.py ++++ b/Lib/test/test_unittest/testmock/__init__.py +@@ -1,17 +1,6 @@ +-import os +-import sys +-import unittest ++import os.path ++from test.support import load_package_tests + + +-here = os.path.dirname(__file__) +-loader = unittest.defaultTestLoader +- + def load_tests(*args): +- suite = unittest.TestSuite() +- for fn in os.listdir(here): +- if fn.startswith("test") and fn.endswith(".py"): +- modname = "test.test_unittest.testmock." + fn[:-3] +- __import__(modname) +- module = sys.modules[modname] +- suite.addTest(loader.loadTestsFromModule(module)) +- return suite ++ return load_package_tests(os.path.dirname(__file__), *args) +-- +2.29.2.windows.2 + diff --git a/recipes/recipes_emscripten/python/patches/0008-Move-test-directories.patch b/recipes/recipes_emscripten/python/patches/0008-Move-test-directories.patch new file mode 100644 index 000000000..7ca56f31b --- /dev/null +++ b/recipes/recipes_emscripten/python/patches/0008-Move-test-directories.patch @@ -0,0 +1,36 @@ +From 4c71c808cc65ed6003b1e29d583c71586ebb36e1 Mon Sep 17 00:00:00 2001 +From: ryanking13 +Date: Wed, 25 Jan 2023 15:54:16 +0900 +Subject: [PATCH 8/9] Move test directories + +--- + Makefile.pre.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Makefile.pre.in b/Makefile.pre.in +index b356f6293e..68c55a356a 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1932,8 +1932,7 @@ LIBSUBDIRS= asyncio \ + xmlrpc \ + zoneinfo \ + __phello__ +-TESTSUBDIRS= ctypes/test \ +- distutils/tests \ ++TESTSUBDIRS= distutils/tests \ + idlelib/idle_test \ + lib2to3/tests \ + lib2to3/tests/data \ +@@ -2009,7 +2008,8 @@ TESTSUBDIRS= ctypes/test \ + test/ziptestdata \ + tkinter/test tkinter/test/test_tkinter \ + tkinter/test/test_ttk \ +- unittest/test unittest/test/testmock ++ test/test_ctypes \ ++ test/test_unittest test/test_unittest/testmock + + TEST_MODULES=@TEST_MODULES@ + libinstall: all $(srcdir)/Modules/xxmodule.c +-- +2.29.2.windows.2 + diff --git a/recipes/recipes_emscripten/python/patches/0011-Brand-Python.patch b/recipes/recipes_emscripten/python/patches/0011-Brand-Python.patch deleted file mode 100644 index 93f9fcad5..000000000 --- a/recipes/recipes_emscripten/python/patches/0011-Brand-Python.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 1f2a206e561df8a26f5f7233b8e98fcf7eefbfbc Mon Sep 17 00:00:00 2001 -From: martinRenou -Date: Mon, 28 Aug 2023 15:12:13 -0400 -Subject: [PATCH 1/1] Brand Python - ---- - Lib/platform.py | 2 +- - Python/getversion.c | 3 ++- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/Lib/platform.py b/Lib/platform.py -index e32f9c11cd..e7cb133944 100755 ---- a/Lib/platform.py -+++ b/Lib/platform.py -@@ -959,7 +959,7 @@ def processor(): - ### Various APIs for extracting information from sys.version - - _sys_version_parser = re.compile( -- r'([\w.+]+)\s*' # "version" -+ r'([\w.+]+)\s*(?:\ \|\ packaged\ by\ conda\-forge\ \|)?\s*' - r'\(#?([^,]+)' # "(#buildno" - r'(?:,\s*([\w ]*)' # ", builddate" - r'(?:,\s*([\w :]*))?)?\)\s*' # ", buildtime)" -diff --git a/Python/getversion.c b/Python/getversion.c -index c32b6f9d60..ef432e8b74 100644 ---- a/Python/getversion.c -+++ b/Python/getversion.c -@@ -9,7 +9,8 @@ const char * - Py_GetVersion(void) - { - static char version[250]; -- PyOS_snprintf(version, sizeof(version), "%.80s (%.80s) %.80s", -+ PyOS_snprintf(version, sizeof(version), -+ "%.80s | packaged by conda-forge | (%.80s) %.80s", - PY_VERSION, Py_GetBuildInfo(), Py_GetCompiler()); - return version; - } --- -2.41.0 diff --git a/recipes/recipes_emscripten/python/pyodide_env.sh b/recipes/recipes_emscripten/python/pyodide_env.sh deleted file mode 100755 index 8b1378917..000000000 --- a/recipes/recipes_emscripten/python/pyodide_env.sh +++ /dev/null @@ -1 +0,0 @@ - diff --git a/recipes/recipes_emscripten/python/recipe.yaml b/recipes/recipes_emscripten/python/recipe.yaml index 8a1c61f54..3d5734b42 100644 --- a/recipes/recipes_emscripten/python/recipe.yaml +++ b/recipes/recipes_emscripten/python/recipe.yaml @@ -1,40 +1,31 @@ context: version: 3.11.3 - pyodide_version: 0.24.0 name: python package: name: ${{name}} version: ${{ version }} source: -- url: https://github.com/pyodide/pyodide/archive/refs/tags/${{pyodide_version}}.tar.gz - sha256: c8350c4780be44fe763a66f5024197025b0f8740cc4a7c9ad833a89c69916276 +- url: https://www.python.org/ftp/python/${{ version }}/Python-${{ version }}.tar.xz + sha256: 8a5db99c961a7ecf27c75956189c9602c968751f11dbeae2b900dbff1c085b5e build: - number: 24 - string: h_hash_24_cpython + number: 25 + string: h_hash_25_cpython requirements: build: - ${{ compiler("cxx") }} - ${{ compiler("c") }} - - python=3.11 - - nodejs - - ccache - - f2c - - pkg-config - - swig - make - - cmake - - pkg-config - - texinfo - - autoconf - - automake - - libtool - - patch # only needed on MacOS - - sed # only needed on MacOS - - wget +tests: + - script: + - test -f $PREFIX/include/python3.11/Python.h + - test -f $PREFIX/lib/python3.11/enum.py + - test -f $PREFIX/lib/python3.11/ast.py + - test -f $PREFIX/lib/libpython3.11.a + - test -f $PREFIX/bin/python3.11 about: license: Python-2.0 @@ -52,3 +43,4 @@ about: extra: recipe-maintainers: - DerThorsten + - KGB99 From b043347361ca8e865c3ebef2a2bd8449b1ed328f Mon Sep 17 00:00:00 2001 From: Ian Thomas Date: Mon, 29 Jul 2024 10:09:15 +0100 Subject: [PATCH 181/333] Export TTY in WASM modules for cockle (#1239) --- recipes/recipes_emscripten/coreutils/build.sh | 2 +- recipes/recipes_emscripten/coreutils/recipe.yaml | 2 +- recipes/recipes_emscripten/grep/build.sh | 2 +- recipes/recipes_emscripten/grep/recipe.yaml | 2 +- recipes/recipes_emscripten/lua/CMakeLists.txt | 4 ++-- recipes/recipes_emscripten/lua/recipe.yaml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/recipes/recipes_emscripten/coreutils/build.sh b/recipes/recipes_emscripten/coreutils/build.sh index df2468b28..740a30af6 100644 --- a/recipes/recipes_emscripten/coreutils/build.sh +++ b/recipes/recipes_emscripten/coreutils/build.sh @@ -15,7 +15,7 @@ emconfigure ./configure \ echo "sed" sed -i 's|$(MAKE) src/make-prime-list$(EXEEXT)|gcc src/make-prime-list.c -o src/make-prime-list$(EXEEXT) -Ilib/|' Makefile -export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker -sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings -sFORCE_FILESYSTEM=1 -sINVOKE_RUN=0 -sMODULARIZE=1 -sSINGLE_FILE=1" +export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker -sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings,TTY -sFORCE_FILESYSTEM=1 -sINVOKE_RUN=0 -sMODULARIZE=1 -sSINGLE_FILE=1" make EXEEXT=.js CFLAGS="$CFLAGS" -k -j4 || true diff --git a/recipes/recipes_emscripten/coreutils/recipe.yaml b/recipes/recipes_emscripten/coreutils/recipe.yaml index 3c970f0c9..367074492 100644 --- a/recipes/recipes_emscripten/coreutils/recipe.yaml +++ b/recipes/recipes_emscripten/coreutils/recipe.yaml @@ -12,7 +12,7 @@ source: git: https://github.com/coreutils/coreutils tag: v9.5 build: - number: 2 + number: 3 requirements: build: diff --git a/recipes/recipes_emscripten/grep/build.sh b/recipes/recipes_emscripten/grep/build.sh index e9fd0e319..691009363 100644 --- a/recipes/recipes_emscripten/grep/build.sh +++ b/recipes/recipes_emscripten/grep/build.sh @@ -29,7 +29,7 @@ emconfigure ./configure \ ac_cv_have_decl_alarm=no \ gl_cv_func_sleep_works=yes -export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker -sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings -sFORCE_FILESYSTEM=1 -sINVOKE_RUN=0 -sMODULARIZE=1 -sSINGLE_FILE=1 -sERROR_ON_UNDEFINED_SYMBOLS=0" +export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker -sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings,TTY -sFORCE_FILESYSTEM=1 -sINVOKE_RUN=0 -sMODULARIZE=1 -sSINGLE_FILE=1 -sERROR_ON_UNDEFINED_SYMBOLS=0" emmake make all CFLAGS="$CFLAGS" EXEEXT=.js ls diff --git a/recipes/recipes_emscripten/grep/recipe.yaml b/recipes/recipes_emscripten/grep/recipe.yaml index e2334a018..28f441566 100644 --- a/recipes/recipes_emscripten/grep/recipe.yaml +++ b/recipes/recipes_emscripten/grep/recipe.yaml @@ -12,7 +12,7 @@ package: # url: https://github.com/Distrotech/grep # branch: build: - number: 2 + number: 3 requirements: build: diff --git a/recipes/recipes_emscripten/lua/CMakeLists.txt b/recipes/recipes_emscripten/lua/CMakeLists.txt index 749d7692d..6200e6346 100644 --- a/recipes/recipes_emscripten/lua/CMakeLists.txt +++ b/recipes/recipes_emscripten/lua/CMakeLists.txt @@ -65,7 +65,7 @@ foreach(lua_binary ${lua_binaries}) PUBLIC "SHELL: -s FORCE_FILESYSTEM" PUBLIC "SHELL: -s ALLOW_MEMORY_GROWTH=1" PUBLIC "SHELL: -s ENVIRONMENT=web,worker,node" - PUBLIC "SHELL: -s EXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings" + PUBLIC "SHELL: -s EXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings,TTY" PUBLIC "SHELL: -s MODULARIZE=1" ) # set target link options @@ -73,7 +73,7 @@ foreach(lua_binary ${lua_binaries}) PUBLIC "SHELL: -s FORCE_FILESYSTEM" PUBLIC "SHELL: -s ALLOW_MEMORY_GROWTH=1" PUBLIC "SHELL: -s ENVIRONMENT=web,worker,node" - PUBLIC "SHELL: -s EXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings" + PUBLIC "SHELL: -s EXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings,TTY" PUBLIC "SHELL: -s MODULARIZE=1" ) endforeach() diff --git a/recipes/recipes_emscripten/lua/recipe.yaml b/recipes/recipes_emscripten/lua/recipe.yaml index 19423ca50..6d64ec508 100644 --- a/recipes/recipes_emscripten/lua/recipe.yaml +++ b/recipes/recipes_emscripten/lua/recipe.yaml @@ -21,7 +21,7 @@ source: - path: CMakeLists.txt build: - number: 10 + number: 11 requirements: build: From af2f393a97e710afa850a9d71c8842ca125a2d40 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 29 Jul 2024 11:17:26 +0200 Subject: [PATCH 182/333] Update astropy from 6.1.1 to 6.1.2 (#1237) Co-authored-by: emscripten-forge-bot Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/astropy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/astropy/recipe.yaml b/recipes/recipes_emscripten/astropy/recipe.yaml index 1e5da0e81..92412113b 100644 --- a/recipes/recipes_emscripten/astropy/recipe.yaml +++ b/recipes/recipes_emscripten/astropy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 6.1.1 + version: 6.1.2 package: name: astropy @@ -7,7 +7,7 @@ package: source: - url: https://pypi.io/packages/source/a/astropy/astropy-${{ version }}.tar.gz - sha256: e5c6f45d911c30acb8d556c7f8ed994aec71b108e61eee5067f00af1e4e36138 + sha256: a2103d4e24e90389a820cfcdaaf4ca2d1ab22e5fd72978d147ff5cace54f1d3a # patches: # - patches/skip_ep.patch From 58d834b717c05cc6f9eba0beafd245d1c3f8d8f8 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Tue, 30 Jul 2024 08:51:56 +0200 Subject: [PATCH 183/333] Update emscripten (#1241) * 3.1.58 * remove outdated patch --- ...Object-and-fs.readFile-in-loadLibDat.patch | 10 +-- ...-error-when-symbol-resolution-fails.patch} | 16 ++-- .../patches/0003-Changes-for-JSPI.patch | 87 +++++++++++++++++++ ...s-github.com-emscripten-core-emscrip.patch | 28 ++++++ ...0005-Raise-when-no-argument-is-given.patch | 31 +++++++ .../0006-Load-dependent-libs-globally.patch | 35 ++++++++ .../emscripten_emscripten-wasm32/recipe.yaml | 4 +- 7 files changed, 196 insertions(+), 15 deletions(-) rename recipes/recipes/emscripten_emscripten-wasm32/patches/{0001-Add-useful-error-when-symbol-resolution-fails.patch => 0002-Add-useful-error-when-symbol-resolution-fails.patch} (71%) create mode 100644 recipes/recipes/emscripten_emscripten-wasm32/patches/0003-Changes-for-JSPI.patch create mode 100644 recipes/recipes/emscripten_emscripten-wasm32/patches/0004-Upstream-PR-https-github.com-emscripten-core-emscrip.patch create mode 100644 recipes/recipes/emscripten_emscripten-wasm32/patches/0005-Raise-when-no-argument-is-given.patch create mode 100644 recipes/recipes/emscripten_emscripten-wasm32/patches/0006-Load-dependent-libs-globally.patch 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 index 5212949cd..179450c27 100644 --- 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 @@ -1,7 +1,7 @@ -From 0170462a78e86de9ee95017bfa7e4a3dd620a375 Mon Sep 17 00:00:00 2001 +From 137dae4dbdf9a192551582cdae827b085510956f 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 +Subject: [PATCH 1/6] Add back fs.findObject and fs.readFile in loadLibData See upstream PR: https://github.com/emscripten-core/emscripten/pull/19513 @@ -10,10 +10,10 @@ https://github.com/emscripten-core/emscripten/pull/19513 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/library_dylink.js b/src/library_dylink.js -index d7676cdc2..f616d230d 100644 +index aa90bea2b..1e67818a1 100644 --- a/src/library_dylink.js +++ b/src/library_dylink.js -@@ -993,14 +993,23 @@ var LibraryDylink = { +@@ -994,14 +994,23 @@ var LibraryDylink = { #endif // for wasm, we can use fetch for async, but for fs mode we can only imitate it @@ -40,5 +40,5 @@ index d7676cdc2..f616d230d 100644 var libFile = locateFile(libName); if (flags.loadAsync) { -- -2.25.1 +2.34.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/0002-Add-useful-error-when-symbol-resolution-fails.patch similarity index 71% rename from recipes/recipes/emscripten_emscripten-wasm32/patches/0001-Add-useful-error-when-symbol-resolution-fails.patch rename to recipes/recipes/emscripten_emscripten-wasm32/patches/0002-Add-useful-error-when-symbol-resolution-fails.patch index ec50727a1..2f49f6001 100644 --- a/recipes/recipes/emscripten_emscripten-wasm32/patches/0001-Add-useful-error-when-symbol-resolution-fails.patch +++ b/recipes/recipes/emscripten_emscripten-wasm32/patches/0002-Add-useful-error-when-symbol-resolution-fails.patch @@ -1,7 +1,7 @@ -From a8bdb50a29062ee70c8667e4fd94dde47917f8fa Mon Sep 17 00:00:00 2001 +From e0cb884277200310eba263dcce5a7b1c4567bae6 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 +Subject: [PATCH 2/6] Add useful error when symbol resolution fails Currently if symbol resolution fails, we get: ```js @@ -19,19 +19,19 @@ symbol. 1 file changed, 3 insertions(+) diff --git a/src/library_dylink.js b/src/library_dylink.js -index d96e6b425..7f63b5c5e 100644 +index 1e67818a1..cea3ce05d 100644 --- a/src/library_dylink.js +++ b/src/library_dylink.js -@@ -727,6 +727,9 @@ var LibraryDylink = { +@@ -709,6 +709,9 @@ var LibraryDylink = { var resolved; - stubs[prop] = function() { - if (!resolved) resolved = resolveSymbol(prop); + stubs[prop] = (...args) => { + resolved ||= resolveSymbol(prop); + if (!resolved) { + throw new Error(`Dynamic linking error: cannot resolve symbol ${prop}`); + } - return resolved.apply(null, arguments); + return resolved(...args); }; } -- -2.25.1 +2.34.1 diff --git a/recipes/recipes/emscripten_emscripten-wasm32/patches/0003-Changes-for-JSPI.patch b/recipes/recipes/emscripten_emscripten-wasm32/patches/0003-Changes-for-JSPI.patch new file mode 100644 index 000000000..42f189b2b --- /dev/null +++ b/recipes/recipes/emscripten_emscripten-wasm32/patches/0003-Changes-for-JSPI.patch @@ -0,0 +1,87 @@ +From d4d5d35072b6d28c5f98b77a0d578e01bd25ef7e Mon Sep 17 00:00:00 2001 +From: Hood Chatham +Date: Thu, 22 Jun 2023 18:53:22 -0700 +Subject: [PATCH 3/6] Changes for JSPI + +--- + src/library.js | 2 +- + src/library_dylink.js | 3 ++- + src/parseTools.mjs | 2 +- + src/preamble.js | 7 +++++++ + 4 files changed, 11 insertions(+), 3 deletions(-) + +diff --git a/src/library.js b/src/library.js +index 44531ee1d..f02e85ea2 100644 +--- a/src/library.js ++++ b/src/library.js +@@ -1269,7 +1269,7 @@ addToLibrary({ + #if EXCEPTION_STACK_TRACES + throw new EmscriptenSjLj; + #else +- throw Infinity; ++ throw Module.wrapException(Infinity); + #endif + }, + #elif !SUPPORT_LONGJMP +diff --git a/src/library_dylink.js b/src/library_dylink.js +index cea3ce05d..c3f3c2bbf 100644 +--- a/src/library_dylink.js ++++ b/src/library_dylink.js +@@ -73,6 +73,7 @@ var LibraryDylink = { + #if !DISABLE_EXCEPTION_CATCHING || SUPPORT_LONGJMP == 'emscripten' + $createInvokeFunction__internal: true, + $createInvokeFunction__deps: ['$dynCall', 'setThrew', '$stackSave', '$stackRestore'], ++ $createInvokeFunction__postset: "if(!Module.createInvoke) { Module.createInvoke = Module.createInvokeFunction; }", + $createInvokeFunction: (sig) => { + return function() { + var sp = stackSave(); +@@ -125,7 +126,7 @@ var LibraryDylink = { + // Asm.js-style exception handling: invoke wrapper generation + else if (symName.startsWith('invoke_')) { + // Create (and cache) new invoke_ functions on demand. +- sym = wasmImports[symName] = createInvokeFunction(symName.split('_')[1]); ++ sym = wasmImports[symName] = Module.createInvoke(symName.split('_')[1]); + } + #endif + #if !DISABLE_EXCEPTION_CATCHING +diff --git a/src/parseTools.mjs b/src/parseTools.mjs +index 7f20321c3..118a32078 100644 +--- a/src/parseTools.mjs ++++ b/src/parseTools.mjs +@@ -581,7 +581,7 @@ function makeThrow(excPtr) { + } + return `assert(false, '${assertInfo}');`; + } +- return `throw ${excPtr};`; ++ return `throw Module.wrapException(${excPtr});`; + } + + function storeException(varName, excPtr) { +diff --git a/src/preamble.js b/src/preamble.js +index 18cf93959..57a7245ab 100644 +--- a/src/preamble.js ++++ b/src/preamble.js +@@ -18,6 +18,10 @@ + #include "runtime_pthread.js" + #endif + ++if(!Module.wrapException) { ++ Module.wrapException = (e) => e; ++} ++ + #if RELOCATABLE + {{{ makeModuleReceiveWithVar('dynamicLibraries', undefined, '[]', true) }}} + #endif +@@ -942,6 +946,9 @@ function getWasmImports() { + // Receives the wasm imports, returns the exports. + function createWasm() { + var info = getWasmImports(); ++ if (Module.adjustWasmImports) { ++ Module.adjustWasmImports(info); ++ } + // Load the wasm module and create an instance of using native support in the JS engine. + // handle a generated wasm instance, receiving its exports and + // performing other necessary setup +-- +2.34.1 + diff --git a/recipes/recipes/emscripten_emscripten-wasm32/patches/0004-Upstream-PR-https-github.com-emscripten-core-emscrip.patch b/recipes/recipes/emscripten_emscripten-wasm32/patches/0004-Upstream-PR-https-github.com-emscripten-core-emscrip.patch new file mode 100644 index 000000000..294ded3f2 --- /dev/null +++ b/recipes/recipes/emscripten_emscripten-wasm32/patches/0004-Upstream-PR-https-github.com-emscripten-core-emscrip.patch @@ -0,0 +1,28 @@ +From 9352fac9a4618603fbe5ce7ad97a26a3963704bd Mon Sep 17 00:00:00 2001 +From: Joe Marshall +Date: Sat, 13 Apr 2024 21:41:11 +0100 +Subject: [PATCH 4/6] Upstream PR: + https://github.com/emscripten-core/emscripten/pull/21759 + +--- + src/library_dylink.js | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/library_dylink.js b/src/library_dylink.js +index c3f3c2bbf..e0fa4721c 100644 +--- a/src/library_dylink.js ++++ b/src/library_dylink.js +@@ -93,6 +93,10 @@ var LibraryDylink = { + if (e !== e+0) throw e; + #endif + _setThrew(1, 0); ++ // In theory this if could be done on creating the function, ++ // but I just added this to save wasting code space ++ // and it only happens on an exception ++ if (sig[0] == "j") return 0n; + } + } + }, +-- +2.34.1 + diff --git a/recipes/recipes/emscripten_emscripten-wasm32/patches/0005-Raise-when-no-argument-is-given.patch b/recipes/recipes/emscripten_emscripten-wasm32/patches/0005-Raise-when-no-argument-is-given.patch new file mode 100644 index 000000000..10963138e --- /dev/null +++ b/recipes/recipes/emscripten_emscripten-wasm32/patches/0005-Raise-when-no-argument-is-given.patch @@ -0,0 +1,31 @@ +From 44983793a7f67009c228c5c95899f6fe735fd1c5 Mon Sep 17 00:00:00 2001 +From: ryanking13 +Date: Sat, 20 Jan 2024 19:02:32 +0900 +Subject: [PATCH 5/6] Raise when no argument is given + +Emscripten 3.1.51 does not raise an error when no argument is given. +Some build tools (e.g. ffmpeg) relies on this behavior, so we should +keep it. + +Upstream issue: https://github.com/emscripten-core/emscripten/issues/21116 +--- + emcc.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/emcc.py b/emcc.py +index 6be37b217..a77f41c4a 100644 +--- a/emcc.py ++++ b/emcc.py +@@ -628,6 +628,9 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR P + print(libname) + return 0 + ++ if not input_files and not state.link_flags: ++ exit_with_error('no input files') ++ + if options.reproduce: + create_reproduce_file(options.reproduce, args) + +-- +2.34.1 + diff --git a/recipes/recipes/emscripten_emscripten-wasm32/patches/0006-Load-dependent-libs-globally.patch b/recipes/recipes/emscripten_emscripten-wasm32/patches/0006-Load-dependent-libs-globally.patch new file mode 100644 index 000000000..0dba49e96 --- /dev/null +++ b/recipes/recipes/emscripten_emscripten-wasm32/patches/0006-Load-dependent-libs-globally.patch @@ -0,0 +1,35 @@ +From 2f3ae3b30cf8ce8cd04d512ebb4c8b2218563085 Mon Sep 17 00:00:00 2001 +From: Hood Chatham +Date: Mon, 17 Jun 2024 18:32:07 -0700 +Subject: [PATCH 6/6] Load dependent libs globally + +I'm not 100% sure why, but we need all dependent shared libs to be loaded +globally. +--- + src/library_dylink.js | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/library_dylink.js b/src/library_dylink.js +index e0fa4721c..502bc7b25 100644 +--- a/src/library_dylink.js ++++ b/src/library_dylink.js +@@ -880,11 +880,15 @@ var LibraryDylink = { + + // now load needed libraries and the module itself. + if (flags.loadAsync) { ++ const origGlobal = flags.global; ++ flags.global = true; + return metadata.neededDynlibs + .reduce((chain, dynNeeded) => chain.then(() => + loadDynamicLibrary(dynNeeded, flags) + ), Promise.resolve()) +- .then(loadModule); ++ .then(() => { ++ flags.global = origGlobal; ++ }).then(loadModule); + } + + metadata.neededDynlibs.forEach((needed) => loadDynamicLibrary(needed, flags, localScope)); +-- +2.34.1 + diff --git a/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml b/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml index f826caabc..e374aa086 100644 --- a/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml +++ b/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml @@ -1,9 +1,9 @@ context: name: emscripten_emscripten-wasm32 - version: 3.1.45 + version: 3.1.58 build: - number: 29 + number: 0 outputs: - package: From 78fd9925fe7bc967acf0b1dcfc8717a359c64bed Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Wed, 31 Jul 2024 07:09:11 +0200 Subject: [PATCH 184/333] Revert "Update emscripten (#1241)" (#1248) This reverts commit 58d834b717c05cc6f9eba0beafd245d1c3f8d8f8. --- ...Object-and-fs.readFile-in-loadLibDat.patch | 10 +-- ...-error-when-symbol-resolution-fails.patch} | 16 ++-- .../patches/0003-Changes-for-JSPI.patch | 87 ------------------- ...s-github.com-emscripten-core-emscrip.patch | 28 ------ ...0005-Raise-when-no-argument-is-given.patch | 31 ------- .../0006-Load-dependent-libs-globally.patch | 35 -------- .../emscripten_emscripten-wasm32/recipe.yaml | 4 +- 7 files changed, 15 insertions(+), 196 deletions(-) rename recipes/recipes/emscripten_emscripten-wasm32/patches/{0002-Add-useful-error-when-symbol-resolution-fails.patch => 0001-Add-useful-error-when-symbol-resolution-fails.patch} (71%) delete mode 100644 recipes/recipes/emscripten_emscripten-wasm32/patches/0003-Changes-for-JSPI.patch delete mode 100644 recipes/recipes/emscripten_emscripten-wasm32/patches/0004-Upstream-PR-https-github.com-emscripten-core-emscrip.patch delete mode 100644 recipes/recipes/emscripten_emscripten-wasm32/patches/0005-Raise-when-no-argument-is-given.patch delete mode 100644 recipes/recipes/emscripten_emscripten-wasm32/patches/0006-Load-dependent-libs-globally.patch 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 index 179450c27..5212949cd 100644 --- 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 @@ -1,7 +1,7 @@ -From 137dae4dbdf9a192551582cdae827b085510956f Mon Sep 17 00:00:00 2001 +From 0170462a78e86de9ee95017bfa7e4a3dd620a375 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Fri, 2 Jun 2023 11:59:32 -0700 -Subject: [PATCH 1/6] Add back fs.findObject and fs.readFile in loadLibData +Subject: [PATCH] Add back fs.findObject and fs.readFile in loadLibData See upstream PR: https://github.com/emscripten-core/emscripten/pull/19513 @@ -10,10 +10,10 @@ https://github.com/emscripten-core/emscripten/pull/19513 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/library_dylink.js b/src/library_dylink.js -index aa90bea2b..1e67818a1 100644 +index d7676cdc2..f616d230d 100644 --- a/src/library_dylink.js +++ b/src/library_dylink.js -@@ -994,14 +994,23 @@ var LibraryDylink = { +@@ -993,14 +993,23 @@ var LibraryDylink = { #endif // for wasm, we can use fetch for async, but for fs mode we can only imitate it @@ -40,5 +40,5 @@ index aa90bea2b..1e67818a1 100644 var libFile = locateFile(libName); if (flags.loadAsync) { -- -2.34.1 +2.25.1 diff --git a/recipes/recipes/emscripten_emscripten-wasm32/patches/0002-Add-useful-error-when-symbol-resolution-fails.patch b/recipes/recipes/emscripten_emscripten-wasm32/patches/0001-Add-useful-error-when-symbol-resolution-fails.patch similarity index 71% rename from recipes/recipes/emscripten_emscripten-wasm32/patches/0002-Add-useful-error-when-symbol-resolution-fails.patch rename to recipes/recipes/emscripten_emscripten-wasm32/patches/0001-Add-useful-error-when-symbol-resolution-fails.patch index 2f49f6001..ec50727a1 100644 --- a/recipes/recipes/emscripten_emscripten-wasm32/patches/0002-Add-useful-error-when-symbol-resolution-fails.patch +++ b/recipes/recipes/emscripten_emscripten-wasm32/patches/0001-Add-useful-error-when-symbol-resolution-fails.patch @@ -1,7 +1,7 @@ -From e0cb884277200310eba263dcce5a7b1c4567bae6 Mon Sep 17 00:00:00 2001 +From a8bdb50a29062ee70c8667e4fd94dde47917f8fa Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Fri, 19 May 2023 12:19:00 -0700 -Subject: [PATCH 2/6] Add useful error when symbol resolution fails +Subject: [PATCH] Add useful error when symbol resolution fails Currently if symbol resolution fails, we get: ```js @@ -19,19 +19,19 @@ symbol. 1 file changed, 3 insertions(+) diff --git a/src/library_dylink.js b/src/library_dylink.js -index 1e67818a1..cea3ce05d 100644 +index d96e6b425..7f63b5c5e 100644 --- a/src/library_dylink.js +++ b/src/library_dylink.js -@@ -709,6 +709,9 @@ var LibraryDylink = { +@@ -727,6 +727,9 @@ var LibraryDylink = { var resolved; - stubs[prop] = (...args) => { - resolved ||= resolveSymbol(prop); + stubs[prop] = function() { + if (!resolved) resolved = resolveSymbol(prop); + if (!resolved) { + throw new Error(`Dynamic linking error: cannot resolve symbol ${prop}`); + } - return resolved(...args); + return resolved.apply(null, arguments); }; } -- -2.34.1 +2.25.1 diff --git a/recipes/recipes/emscripten_emscripten-wasm32/patches/0003-Changes-for-JSPI.patch b/recipes/recipes/emscripten_emscripten-wasm32/patches/0003-Changes-for-JSPI.patch deleted file mode 100644 index 42f189b2b..000000000 --- a/recipes/recipes/emscripten_emscripten-wasm32/patches/0003-Changes-for-JSPI.patch +++ /dev/null @@ -1,87 +0,0 @@ -From d4d5d35072b6d28c5f98b77a0d578e01bd25ef7e Mon Sep 17 00:00:00 2001 -From: Hood Chatham -Date: Thu, 22 Jun 2023 18:53:22 -0700 -Subject: [PATCH 3/6] Changes for JSPI - ---- - src/library.js | 2 +- - src/library_dylink.js | 3 ++- - src/parseTools.mjs | 2 +- - src/preamble.js | 7 +++++++ - 4 files changed, 11 insertions(+), 3 deletions(-) - -diff --git a/src/library.js b/src/library.js -index 44531ee1d..f02e85ea2 100644 ---- a/src/library.js -+++ b/src/library.js -@@ -1269,7 +1269,7 @@ addToLibrary({ - #if EXCEPTION_STACK_TRACES - throw new EmscriptenSjLj; - #else -- throw Infinity; -+ throw Module.wrapException(Infinity); - #endif - }, - #elif !SUPPORT_LONGJMP -diff --git a/src/library_dylink.js b/src/library_dylink.js -index cea3ce05d..c3f3c2bbf 100644 ---- a/src/library_dylink.js -+++ b/src/library_dylink.js -@@ -73,6 +73,7 @@ var LibraryDylink = { - #if !DISABLE_EXCEPTION_CATCHING || SUPPORT_LONGJMP == 'emscripten' - $createInvokeFunction__internal: true, - $createInvokeFunction__deps: ['$dynCall', 'setThrew', '$stackSave', '$stackRestore'], -+ $createInvokeFunction__postset: "if(!Module.createInvoke) { Module.createInvoke = Module.createInvokeFunction; }", - $createInvokeFunction: (sig) => { - return function() { - var sp = stackSave(); -@@ -125,7 +126,7 @@ var LibraryDylink = { - // Asm.js-style exception handling: invoke wrapper generation - else if (symName.startsWith('invoke_')) { - // Create (and cache) new invoke_ functions on demand. -- sym = wasmImports[symName] = createInvokeFunction(symName.split('_')[1]); -+ sym = wasmImports[symName] = Module.createInvoke(symName.split('_')[1]); - } - #endif - #if !DISABLE_EXCEPTION_CATCHING -diff --git a/src/parseTools.mjs b/src/parseTools.mjs -index 7f20321c3..118a32078 100644 ---- a/src/parseTools.mjs -+++ b/src/parseTools.mjs -@@ -581,7 +581,7 @@ function makeThrow(excPtr) { - } - return `assert(false, '${assertInfo}');`; - } -- return `throw ${excPtr};`; -+ return `throw Module.wrapException(${excPtr});`; - } - - function storeException(varName, excPtr) { -diff --git a/src/preamble.js b/src/preamble.js -index 18cf93959..57a7245ab 100644 ---- a/src/preamble.js -+++ b/src/preamble.js -@@ -18,6 +18,10 @@ - #include "runtime_pthread.js" - #endif - -+if(!Module.wrapException) { -+ Module.wrapException = (e) => e; -+} -+ - #if RELOCATABLE - {{{ makeModuleReceiveWithVar('dynamicLibraries', undefined, '[]', true) }}} - #endif -@@ -942,6 +946,9 @@ function getWasmImports() { - // Receives the wasm imports, returns the exports. - function createWasm() { - var info = getWasmImports(); -+ if (Module.adjustWasmImports) { -+ Module.adjustWasmImports(info); -+ } - // Load the wasm module and create an instance of using native support in the JS engine. - // handle a generated wasm instance, receiving its exports and - // performing other necessary setup --- -2.34.1 - diff --git a/recipes/recipes/emscripten_emscripten-wasm32/patches/0004-Upstream-PR-https-github.com-emscripten-core-emscrip.patch b/recipes/recipes/emscripten_emscripten-wasm32/patches/0004-Upstream-PR-https-github.com-emscripten-core-emscrip.patch deleted file mode 100644 index 294ded3f2..000000000 --- a/recipes/recipes/emscripten_emscripten-wasm32/patches/0004-Upstream-PR-https-github.com-emscripten-core-emscrip.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 9352fac9a4618603fbe5ce7ad97a26a3963704bd Mon Sep 17 00:00:00 2001 -From: Joe Marshall -Date: Sat, 13 Apr 2024 21:41:11 +0100 -Subject: [PATCH 4/6] Upstream PR: - https://github.com/emscripten-core/emscripten/pull/21759 - ---- - src/library_dylink.js | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/library_dylink.js b/src/library_dylink.js -index c3f3c2bbf..e0fa4721c 100644 ---- a/src/library_dylink.js -+++ b/src/library_dylink.js -@@ -93,6 +93,10 @@ var LibraryDylink = { - if (e !== e+0) throw e; - #endif - _setThrew(1, 0); -+ // In theory this if could be done on creating the function, -+ // but I just added this to save wasting code space -+ // and it only happens on an exception -+ if (sig[0] == "j") return 0n; - } - } - }, --- -2.34.1 - diff --git a/recipes/recipes/emscripten_emscripten-wasm32/patches/0005-Raise-when-no-argument-is-given.patch b/recipes/recipes/emscripten_emscripten-wasm32/patches/0005-Raise-when-no-argument-is-given.patch deleted file mode 100644 index 10963138e..000000000 --- a/recipes/recipes/emscripten_emscripten-wasm32/patches/0005-Raise-when-no-argument-is-given.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 44983793a7f67009c228c5c95899f6fe735fd1c5 Mon Sep 17 00:00:00 2001 -From: ryanking13 -Date: Sat, 20 Jan 2024 19:02:32 +0900 -Subject: [PATCH 5/6] Raise when no argument is given - -Emscripten 3.1.51 does not raise an error when no argument is given. -Some build tools (e.g. ffmpeg) relies on this behavior, so we should -keep it. - -Upstream issue: https://github.com/emscripten-core/emscripten/issues/21116 ---- - emcc.py | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/emcc.py b/emcc.py -index 6be37b217..a77f41c4a 100644 ---- a/emcc.py -+++ b/emcc.py -@@ -628,6 +628,9 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR P - print(libname) - return 0 - -+ if not input_files and not state.link_flags: -+ exit_with_error('no input files') -+ - if options.reproduce: - create_reproduce_file(options.reproduce, args) - --- -2.34.1 - diff --git a/recipes/recipes/emscripten_emscripten-wasm32/patches/0006-Load-dependent-libs-globally.patch b/recipes/recipes/emscripten_emscripten-wasm32/patches/0006-Load-dependent-libs-globally.patch deleted file mode 100644 index 0dba49e96..000000000 --- a/recipes/recipes/emscripten_emscripten-wasm32/patches/0006-Load-dependent-libs-globally.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 2f3ae3b30cf8ce8cd04d512ebb4c8b2218563085 Mon Sep 17 00:00:00 2001 -From: Hood Chatham -Date: Mon, 17 Jun 2024 18:32:07 -0700 -Subject: [PATCH 6/6] Load dependent libs globally - -I'm not 100% sure why, but we need all dependent shared libs to be loaded -globally. ---- - src/library_dylink.js | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/library_dylink.js b/src/library_dylink.js -index e0fa4721c..502bc7b25 100644 ---- a/src/library_dylink.js -+++ b/src/library_dylink.js -@@ -880,11 +880,15 @@ var LibraryDylink = { - - // now load needed libraries and the module itself. - if (flags.loadAsync) { -+ const origGlobal = flags.global; -+ flags.global = true; - return metadata.neededDynlibs - .reduce((chain, dynNeeded) => chain.then(() => - loadDynamicLibrary(dynNeeded, flags) - ), Promise.resolve()) -- .then(loadModule); -+ .then(() => { -+ flags.global = origGlobal; -+ }).then(loadModule); - } - - metadata.neededDynlibs.forEach((needed) => loadDynamicLibrary(needed, flags, localScope)); --- -2.34.1 - diff --git a/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml b/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml index e374aa086..f826caabc 100644 --- a/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml +++ b/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml @@ -1,9 +1,9 @@ context: name: emscripten_emscripten-wasm32 - version: 3.1.58 + version: 3.1.45 build: - number: 0 + number: 29 outputs: - package: From 9c013ef85c96dd225da230bece4d77a1aa1ee5d5 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Thu, 1 Aug 2024 13:51:26 +0200 Subject: [PATCH 185/333] ignore patches (#1255) * ignore patches * Update recipe.yaml --- recipes/recipes_emscripten/bzip2/recipe.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/recipes_emscripten/bzip2/recipe.yaml b/recipes/recipes_emscripten/bzip2/recipe.yaml index b0d466a60..70134dcf3 100644 --- a/recipes/recipes_emscripten/bzip2/recipe.yaml +++ b/recipes/recipes_emscripten/bzip2/recipe.yaml @@ -8,12 +8,12 @@ package: source: - url: https://sourceware.org/pub/bzip2/bzip2-${{ version }}.tar.gz sha256: ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269 - patches: - - patches/0001-cross.patch - - path: CMakeLists.txt + # patches: + # - patches/0001-cross.patch + # - path: CMakeLists.txt build: - number: 7 + number: 8 # run_exports: # - '{{ pin_subpackage("bzip2") }}' From bd06877b51971e1039f9dc3381bfdc1cddf8db79 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Fri, 2 Aug 2024 08:31:38 +0200 Subject: [PATCH 186/333] Create bootstrap_python.yml --- .github/workflows/bootstrap_python.yml | 110 +++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 .github/workflows/bootstrap_python.yml diff --git a/.github/workflows/bootstrap_python.yml b/.github/workflows/bootstrap_python.yml new file mode 100644 index 000000000..01d8cb566 --- /dev/null +++ b/.github/workflows/bootstrap_python.yml @@ -0,0 +1,110 @@ +name: bootstrap python +on: + workflow_dispatch: +jobs: + + build_simple_with_pixi: + strategy: + matrix: + os: [ubuntu-latest, macos-11, macos-12] + fail-fast: false + runs-on: ${{ matrix.os }} + env: + TARGET_PLATFORM: emscripten-wasm32 + GITHUB_OWNER: "emscripten-forge" + + 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: | + # build compiler packages + pixi run setup + + # build bzip2 sqlite zlib and libffi + pixi run build-emscripten-wasm32-pkg recipes/recipes_emscripten/bzip2 + pixi run build-emscripten-wasm32-pkg recipes/recipes_emscripten/sqlite + pixi run build-emscripten-wasm32-pkg recipes/recipes_emscripten/zlib + pixi run build-emscripten-wasm32-pkg recipes/recipes_emscripten/libffi + + # build python + pixi run build-emscripten-wasm32-pkg recipes/recipes_emscripten/python + + # build pyjs + pixi run build-emscripten-wasm32-pkg recipes/recipes_emscripten/pyjs + + # build regex + pixi run build-emscripten-wasm32-pkg recipes/recipes_emscripten/regex + + + - name: Upload packages to Quetz + if: github.repository == 'emscripten-forge/recipes' + env: + QUETZ_API_KEY: ${{ secrets.QUETZ_API_KEY }} + MATRIX_OS: ${{ matrix.os }} + run: | + overall_success=true + + if [ "${MATRIX_OS}" = "ubuntu-latest" ]; then + platforms=(emscripten-wasm32 linux-64 noarch) + elif [ "${MATRIX_OS}" = "macos-11" ]; then + platforms=(osx-64) + elif [ "${MATRIX_OS}" = "macos-12" ]; then + platforms=(osx-arm64) + fi + + # Loop over platforms + for platform in "${platforms[@]}"; do + 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=( + pixi run 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: Fri, 2 Aug 2024 08:44:55 +0200 Subject: [PATCH 187/333] Update bootstrap_python.yml --- .github/workflows/bootstrap_python.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bootstrap_python.yml b/.github/workflows/bootstrap_python.yml index 01d8cb566..d2d9462af 100644 --- a/.github/workflows/bootstrap_python.yml +++ b/.github/workflows/bootstrap_python.yml @@ -6,7 +6,7 @@ jobs: build_simple_with_pixi: strategy: matrix: - os: [ubuntu-latest, macos-11, macos-12] + os: [ubuntu-latest, macos-12, macos-14] fail-fast: false runs-on: ${{ matrix.os }} env: @@ -59,9 +59,9 @@ jobs: if [ "${MATRIX_OS}" = "ubuntu-latest" ]; then platforms=(emscripten-wasm32 linux-64 noarch) - elif [ "${MATRIX_OS}" = "macos-11" ]; then - platforms=(osx-64) elif [ "${MATRIX_OS}" = "macos-12" ]; then + platforms=(osx-64) + elif [ "${MATRIX_OS}" = "macos-14" ]; then platforms=(osx-arm64) fi From 4fed9d9bc4e2c2a5f8ff6d934cf6328dded48f67 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Fri, 2 Aug 2024 08:53:05 +0200 Subject: [PATCH 188/333] Update bootstrap_python.yml --- .github/workflows/bootstrap_python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bootstrap_python.yml b/.github/workflows/bootstrap_python.yml index d2d9462af..ff7a33cc1 100644 --- a/.github/workflows/bootstrap_python.yml +++ b/.github/workflows/bootstrap_python.yml @@ -35,8 +35,8 @@ jobs: # build bzip2 sqlite zlib and libffi pixi run build-emscripten-wasm32-pkg recipes/recipes_emscripten/bzip2 - pixi run build-emscripten-wasm32-pkg recipes/recipes_emscripten/sqlite pixi run build-emscripten-wasm32-pkg recipes/recipes_emscripten/zlib + pixi run build-emscripten-wasm32-pkg recipes/recipes_emscripten/sqlite pixi run build-emscripten-wasm32-pkg recipes/recipes_emscripten/libffi # build python From cd31c16dbb5df8a360b09d4edd35b756c2f00f54 Mon Sep 17 00:00:00 2001 From: Richard Otis Date: Sun, 4 Aug 2024 13:07:35 -0500 Subject: [PATCH 189/333] Add `symengine` and `python-symengine` (#1258) * MVP for symengine recipes * Add recipe for symengine * python-symengine: add recipe * Add python-symengine test --- .../python-symengine/build.sh | 4 ++ .../python-symengine/recipe.yaml | 55 +++++++++++++++++++ .../python-symengine/test_symengine.py | 5 ++ .../recipes_emscripten/symengine/recipe.yaml | 49 +++++++++++++++++ 4 files changed, 113 insertions(+) create mode 100644 recipes/recipes_emscripten/python-symengine/build.sh create mode 100644 recipes/recipes_emscripten/python-symengine/recipe.yaml create mode 100644 recipes/recipes_emscripten/python-symengine/test_symengine.py create mode 100644 recipes/recipes_emscripten/symengine/recipe.yaml diff --git a/recipes/recipes_emscripten/python-symengine/build.sh b/recipes/recipes_emscripten/python-symengine/build.sh new file mode 100644 index 000000000..0b7e493ba --- /dev/null +++ b/recipes/recipes_emscripten/python-symengine/build.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +export LDFLAGS="-s MODULARIZE=1 -s LINKABLE=1 -s EXPORT_ALL=1 -s WASM=1 -std=c++14 -s LZ4=1 -s SIDE_MODULE=1 -sWASM_BIGINT" +${PYTHON} -m pip install . diff --git a/recipes/recipes_emscripten/python-symengine/recipe.yaml b/recipes/recipes_emscripten/python-symengine/recipe.yaml new file mode 100644 index 000000000..dfdaa0c4b --- /dev/null +++ b/recipes/recipes_emscripten/python-symengine/recipe.yaml @@ -0,0 +1,55 @@ +context: + version: 0.11.0 + +package: + name: python-symengine + version: ${{ version }} + +source: + sha256: 702fc5e5640e81714eacecf9da03ba1d9cc2f49fc8c4c6154b57d3d7dfacc698 + url: https://github.com/symengine/symengine.py/releases/download/v${{ version }}/symengine.py-${{ version }}.tar.gz + +build: + number: 0 + +requirements: + build: + - cross-python_${{ target_platform }} + - ${{ compiler('cxx') }} + - python + - cython + - numpy + - pip + - cmake + host: + - python + - symengine + - boost-cpp + run: + - setuptools + - numpy + +tests: + - script: pytester + requirements: + build: + - pytester + run: + - pytester-run + files: + recipe: + - test_symengine.py + +about: + homepage: https://github.com/symengine/symengine.py + license: MIT + license_file: LICENSE + summary: Python wrappers to the C++ library SymEngine. + description: | + Python wrappers to the C++ library SymEngine, a fast C++ symbolic manipulation library. + documentation: https://github.com/symengine/symengine.py + repository: https://github.com/symengine/symengine.py + +extra: + recipe-maintainers: + - richardotis \ No newline at end of file diff --git a/recipes/recipes_emscripten/python-symengine/test_symengine.py b/recipes/recipes_emscripten/python-symengine/test_symengine.py new file mode 100644 index 000000000..b2e1684ba --- /dev/null +++ b/recipes/recipes_emscripten/python-symengine/test_symengine.py @@ -0,0 +1,5 @@ + +def test_symengine(): + import symengine + x = symengine.Symbol('x') + assert x.diff(x) == 1 diff --git a/recipes/recipes_emscripten/symengine/recipe.yaml b/recipes/recipes_emscripten/symengine/recipe.yaml new file mode 100644 index 000000000..abbb90890 --- /dev/null +++ b/recipes/recipes_emscripten/symengine/recipe.yaml @@ -0,0 +1,49 @@ +context: + name: symengine + version: 0.12.0 + +package: + name: ${{ name|lower }} + version: ${{ version }} + +source: + sha256: 1b5c3b0bc6a9f187635f93585649f24a18e9c7f2167cebcd885edeaaf211d956 + url: https://github.com/symengine/symengine/releases/download/v${{ version }}/symengine-${{ version }}.tar.gz + +build: + number: 0 + script: | + emcmake cmake \ + -DBUILD_TESTS=OFF \ + -DBUILD_BENCHMARKS=OFF \ + -DINTEGER_CLASS=boostmp \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_FOR_DISTRIBUTION=yes \ + -DBUILD_SHARED_LIBS=no \ + -DBoost_INCLUDE_DIR=$BUILD_PREFIX/include \ + . + emmake make install + +requirements: + build: + - ${{ compiler("cxx") }} + - cmake + - make + - boost-cpp + +about: + homepage: https://symengine.org/ + license: MIT + license_file: LICENSE + summary: A fast symbolic manipulation library, written in C++. + description: | + SymEngine is a standalone fast C++ symbolic manipulation library. + Optional thin wrappers allow usage of the library from other languages. + documentation: https://symengine.org/ + repository: https://github.com/symengine/symengine + +extra: + recipe-maintainers: + - richardotis \ No newline at end of file From ce2ee177ca249afb5fb811f196d9e31d7c23bab3 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Tue, 6 Aug 2024 01:01:09 +0000 Subject: [PATCH 190/333] Update sqlalchemy from 2.0.31 to 2.0.32 --- 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 350ae231b..19cbc4444 100644 --- a/recipes/recipes_emscripten/sqlalchemy/recipe.yaml +++ b/recipes/recipes_emscripten/sqlalchemy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.0.31 + version: 2.0.32 package: name: sqlalchemy @@ -7,7 +7,7 @@ package: source: url: https://pypi.io/packages/source/S/SQLAlchemy/SQLAlchemy-${{ version }}.tar.gz - sha256: b607489dd4a54de56984a0c7656247504bd5523d9d0ba799aef59d4add009484 + sha256: c1b88cc8b02b6a5f0efb0345a03672d4c897dc7d92585176f88c67346f565ea8 build: number: 0 From 5d91f87642fad949896971d616c72d1d4d1ea9ba Mon Sep 17 00:00:00 2001 From: Richard Otis Date: Sat, 10 Aug 2024 11:28:25 -0500 Subject: [PATCH 191/333] Add pycalphad (#1273) --- .../recipes_emscripten/pycalphad/recipe.yaml | 67 +++++++++++++++++++ .../pycalphad/test_pycalphad.py | 4 ++ 2 files changed, 71 insertions(+) create mode 100644 recipes/recipes_emscripten/pycalphad/recipe.yaml create mode 100644 recipes/recipes_emscripten/pycalphad/test_pycalphad.py diff --git a/recipes/recipes_emscripten/pycalphad/recipe.yaml b/recipes/recipes_emscripten/pycalphad/recipe.yaml new file mode 100644 index 000000000..004ced6fc --- /dev/null +++ b/recipes/recipes_emscripten/pycalphad/recipe.yaml @@ -0,0 +1,67 @@ +context: + version: 0.11.0 + +package: + name: pycalphad + version: ${{ version }} + +source: + sha256: 6fc874a37582c35964c672424e65c940579b5e0fbd74bdb41015a21833643eb7 + url: https://files.pythonhosted.org/packages/3c/64/6fb88736abea123c0aac68dd847af5d77d0f0343c3275b78a6f3f63dac5f/pycalphad-${{ version }}.tar.gz + + +build: + number: 0 + script: ${PYTHON} -m pip install . + +requirements: + build: + - cross-python_${{ target_platform }} + - ${{ compiler('cxx') }} + - python + - cython + - numpy>=2.0 + - setuptools-scm + - scipy + - pip + host: + - python + run: + - matplotlib + - numpy + - pint + - pyparsing + - pytest + - python-symengine + - runtype + - scipy + - tinydb + - typing-extensions # drop when pycalphad drops support for Python<3.13 + - xarray + +tests: + - script: pytester + requirements: + build: + - pytester + run: + - pytester-run + files: + recipe: + - test_pycalphad.py + +about: + homepage: https://pycalphad.org/ + license: MIT + license_file: LICENSE.txt + summary: CALPHAD tools for designing thermodynamic models, calculating phase diagrams and investigating phase equilibria. + description: | + pycalphad is a free and open-source Python library for designing thermodynamic models, calculating phase diagrams and investigating phase equilibria within the CALPHAD method. + documentation: https://pycalphad.org/ + repository: https://github.com/pycalphad/pycalphad + +extra: + recipe-maintainers: + - richardotis + - bocklund + diff --git a/recipes/recipes_emscripten/pycalphad/test_pycalphad.py b/recipes/recipes_emscripten/pycalphad/test_pycalphad.py new file mode 100644 index 000000000..c4d6dc68f --- /dev/null +++ b/recipes/recipes_emscripten/pycalphad/test_pycalphad.py @@ -0,0 +1,4 @@ + +def test_pycalphad(): + import pycalphad + wks = pycalphad.Workspace(pycalphad.Database()) From 86a7d74fdc7a13080c11263a0f9da4c5932a622f Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Tue, 13 Aug 2024 01:03:11 +0000 Subject: [PATCH 192/333] Update lfortran from 0.38.0 to 0.39.0 --- recipes/recipes_emscripten/lfortran/recipe.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes/recipes_emscripten/lfortran/recipe.yaml b/recipes/recipes_emscripten/lfortran/recipe.yaml index 4a4412c8a..235d7e3f3 100644 --- a/recipes/recipes_emscripten/lfortran/recipe.yaml +++ b/recipes/recipes_emscripten/lfortran/recipe.yaml @@ -1,6 +1,6 @@ context: name: lfortran - version: 0.38.0 + version: 0.39.0 package: name: ${{ name }} @@ -9,7 +9,7 @@ package: source: url: https://github.com/lfortran/lfortran/releases/download/v${{ version }}/${{ name }}-${{ version }}.tar.gz - sha256: 7d9cf30fc87fe430f0d5e70759d0fa321643e44dff90915a56f8987d0bcbee57 + sha256: bf103af6036226f5e8809f2ef7444d6b0b99a339a7967d6527bb21b35d2b4f7a build: number: 0 @@ -33,11 +33,11 @@ requirements: tests: - script: - - test -f ${PREFIX}/lib/liblfortran_runtime.a - - node ${PREFIX}/bin/test_lfortran.js + - test -f ${PREFIX}/lib/liblfortran_runtime.a + - node ${PREFIX}/bin/test_lfortran.js requirements: build: - - nodejs + - nodejs about: license: BSD-3-Clause From 8c9b1d3cf58c45881c629f54ddcfabfb06eaeed7 Mon Sep 17 00:00:00 2001 From: Ian Thomas Date: Thu, 15 Aug 2024 10:26:28 +0100 Subject: [PATCH 193/333] Use separate WASM and JS files for cockle (#1278) * Use separate WASM and JS files for cockle * Bump build numbers --- recipes/recipes_emscripten/cockle_fs/build.sh | 3 +-- recipes/recipes_emscripten/cockle_fs/recipe.yaml | 2 +- recipes/recipes_emscripten/coreutils/build.sh | 8 ++++---- recipes/recipes_emscripten/coreutils/recipe.yaml | 2 +- recipes/recipes_emscripten/grep/build.sh | 6 +++--- recipes/recipes_emscripten/grep/recipe.yaml | 4 ++-- 6 files changed, 12 insertions(+), 13 deletions(-) diff --git a/recipes/recipes_emscripten/cockle_fs/build.sh b/recipes/recipes_emscripten/cockle_fs/build.sh index e84ea8228..fec7ba25c 100644 --- a/recipes/recipes_emscripten/cockle_fs/build.sh +++ b/recipes/recipes_emscripten/cockle_fs/build.sh @@ -5,9 +5,8 @@ emcc fs.c -o fs.js \ -sEXPORTED_RUNTIME_METHODS=FS,PATH,ERRNO_CODES,PROXYFS \ -sFORCE_FILESYSTEM=1 \ -sMODULARIZE=1 \ - -sSINGLE_FILE=1 \ -lproxyfs.js mkdir -p $PREFIX/bin -cp fs.js $PREFIX/bin/fs.js +cp fs.{js,wasm} $PREFIX/bin/ diff --git a/recipes/recipes_emscripten/cockle_fs/recipe.yaml b/recipes/recipes_emscripten/cockle_fs/recipe.yaml index be13c19f3..2af795cbb 100644 --- a/recipes/recipes_emscripten/cockle_fs/recipe.yaml +++ b/recipes/recipes_emscripten/cockle_fs/recipe.yaml @@ -7,7 +7,7 @@ package: build: - number: 1 + number: 2 requirements: build: diff --git a/recipes/recipes_emscripten/coreutils/build.sh b/recipes/recipes_emscripten/coreutils/build.sh index 740a30af6..127d80ffe 100644 --- a/recipes/recipes_emscripten/coreutils/build.sh +++ b/recipes/recipes_emscripten/coreutils/build.sh @@ -1,7 +1,7 @@ #!/bin/bash echo "lets go" -ls +ls ./bootstrap --skip-po emconfigure ./configure \ --enable-single-binary \ @@ -13,9 +13,9 @@ emconfigure ./configure \ gl_cv_func_sleep_works=yes -echo "sed" +echo "sed" sed -i 's|$(MAKE) src/make-prime-list$(EXEEXT)|gcc src/make-prime-list.c -o src/make-prime-list$(EXEEXT) -Ilib/|' Makefile -export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker -sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings,TTY -sFORCE_FILESYSTEM=1 -sINVOKE_RUN=0 -sMODULARIZE=1 -sSINGLE_FILE=1" +export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker -sEXPORTED_RUNTIME_METHODS=FS,ENV,getEnvStrings,TTY -sFORCE_FILESYSTEM=1 -sMODULARIZE=1" make EXEEXT=.js CFLAGS="$CFLAGS" -k -j4 || true @@ -24,4 +24,4 @@ ls ls src/coreutils.js mkdir -p $PREFIX/bin -cp src/coreutils.js $PREFIX/bin/coreutils.js +cp src/coreutils.{js,wasm} $PREFIX/bin/ diff --git a/recipes/recipes_emscripten/coreutils/recipe.yaml b/recipes/recipes_emscripten/coreutils/recipe.yaml index 367074492..119c35157 100644 --- a/recipes/recipes_emscripten/coreutils/recipe.yaml +++ b/recipes/recipes_emscripten/coreutils/recipe.yaml @@ -12,7 +12,7 @@ source: git: https://github.com/coreutils/coreutils tag: v9.5 build: - number: 3 + number: 4 requirements: build: diff --git a/recipes/recipes_emscripten/grep/build.sh b/recipes/recipes_emscripten/grep/build.sh index 691009363..b8a0db680 100644 --- a/recipes/recipes_emscripten/grep/build.sh +++ b/recipes/recipes_emscripten/grep/build.sh @@ -29,10 +29,10 @@ emconfigure ./configure \ ac_cv_have_decl_alarm=no \ gl_cv_func_sleep_works=yes -export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker -sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings,TTY -sFORCE_FILESYSTEM=1 -sINVOKE_RUN=0 -sMODULARIZE=1 -sSINGLE_FILE=1 -sERROR_ON_UNDEFINED_SYMBOLS=0" -emmake make all CFLAGS="$CFLAGS" EXEEXT=.js +export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker -sEXPORTED_RUNTIME_METHODS=FS,ENV,getEnvStrings,TTY -sFORCE_FILESYSTEM=1 -sMODULARIZE=1 -sERROR_ON_UNDEFINED_SYMBOLS=0" +emmake make all CFLAGS="$CFLAGS" EXEEXT=.js ls mkdir -p $PREFIX/bin -cp src/grep.js $PREFIX/bin/grep.js +cp src/grep.{js,wasm} $PREFIX/bin/ diff --git a/recipes/recipes_emscripten/grep/recipe.yaml b/recipes/recipes_emscripten/grep/recipe.yaml index 28f441566..b5a045065 100644 --- a/recipes/recipes_emscripten/grep/recipe.yaml +++ b/recipes/recipes_emscripten/grep/recipe.yaml @@ -10,9 +10,9 @@ package: # url: https://ftp.gnu.org/gnu/grep/grep-3.11.tar.xz # sha256: 1db2aedde89d0dea42b16d9528f894c8d15dae4e190b59aecc78f5a951276eab # url: https://github.com/Distrotech/grep -# branch: +# branch: build: - number: 3 + number: 4 requirements: build: From e1636226119bc61dc0c1d8ea004714dabd619154 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Sat, 17 Aug 2024 00:59:55 +0000 Subject: [PATCH 194/333] Update freetype from 2.13.2 to 2.13.3 --- recipes/recipes_emscripten/freetype/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/freetype/recipe.yaml b/recipes/recipes_emscripten/freetype/recipe.yaml index ddee61da0..ecca622c9 100644 --- a/recipes/recipes_emscripten/freetype/recipe.yaml +++ b/recipes/recipes_emscripten/freetype/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.13.2 + version: 2.13.3 package: name: freetype @@ -7,7 +7,7 @@ package: source: url: https://download.savannah.gnu.org/releases/freetype/freetype-${{ version }}.tar.gz - sha256: 1ac27e16c134a7f2ccea177faba19801131116fd682efc1f5737037c5db224b5 + sha256: 5c3a8e78f7b24c20b25b54ee575d6daa40007a5f4eea2845861c3409b3021747 build: number: 0 From 038bfe188fce4d5c6fad9189340824b9c5ee62c7 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Tue, 20 Aug 2024 13:50:09 +0200 Subject: [PATCH 195/333] Add libblas and liblapack (#1284) * Add lapack Modify build flags Simplify recipe * Disable fortran compiler tests * Update version * Add patch to disable fortran check * Disable fortran c interface check Fix unexpected arg -pp Set a timeout Add patch to skip files with errors Enable emscripten target Generate object code * Working build of lapack, blas, and runtime * Replace local flang * Clean up recipe Clean patches Remove clang link Add tests Clean build flags Restore workflow --- recipes/recipes_emscripten/lapack/build.sh | 30 ++++++++++ .../0001_Disable_fortran_compiler_check.patch | 32 +++++++++++ recipes/recipes_emscripten/lapack/recipe.yaml | 56 +++++++++++++++++++ 3 files changed, 118 insertions(+) create mode 100644 recipes/recipes_emscripten/lapack/build.sh create mode 100644 recipes/recipes_emscripten/lapack/patches/0001_Disable_fortran_compiler_check.patch create mode 100644 recipes/recipes_emscripten/lapack/recipe.yaml diff --git a/recipes/recipes_emscripten/lapack/build.sh b/recipes/recipes_emscripten/lapack/build.sh new file mode 100644 index 000000000..91ce02357 --- /dev/null +++ b/recipes/recipes_emscripten/lapack/build.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +set -ex + +# Using flang as a WASM cross-compiler +# https://github.com/serge-sans-paille/llvm-project/blob/feature/flang-wasm/README.wasm.md +# https://github.com/conda-forge/flang-feedstock/pull/69 +micromamba install -p $BUILD_PREFIX \ + conda-forge/label/llvm_rc::libllvm19 \ + conda-forge/label/llvm_dev::flang=19.1.0.rc2 \ + -y --no-channel-priority +rm $BUILD_PREFIX/bin/clang # links to clang19 +ln -s $BUILD_PREFIX/bin/clang-18 $BUILD_PREFIX/bin/clang # links to emsdk clang + +export FC=flang-new +export FFLAGS="--target=wasm32-unknown-emscripten" + +emcmake cmake -S . -B _build \ + -DCMAKE_BUILD_TYPE=Release \ + -DCBLAS=no \ + -DLAPACKE=no \ + -DBUILD_TESTING=no \ + -DCMAKE_Fortran_PREPROCESS=yes \ + -DCMAKE_Fortran_COMPILER=$FC \ + -DCMAKE_Fortran_FLAGS=$FFLAGS \ + -DCMAKE_INSTALL_LIBDIR="lib" \ + -DCMAKE_INSTALL_PREFIX=$PREFIX + +$(which cmake) --build _build +$(which cmake) --install _build diff --git a/recipes/recipes_emscripten/lapack/patches/0001_Disable_fortran_compiler_check.patch b/recipes/recipes_emscripten/lapack/patches/0001_Disable_fortran_compiler_check.patch new file mode 100644 index 000000000..5f97d776c --- /dev/null +++ b/recipes/recipes_emscripten/lapack/patches/0001_Disable_fortran_compiler_check.patch @@ -0,0 +1,32 @@ +From 1e0c9f82dae9cbb34608e8978889378ec68495a6 Mon Sep 17 00:00:00 2001 +From: Isabel Paredes +Date: Tue, 20 Aug 2024 11:58:38 +0200 +Subject: [PATCH] Disable fortran compiler checks + +--- + BLAS/CMakeLists.txt | 1 + + LAPACKE/include/CMakeLists.txt | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/BLAS/CMakeLists.txt b/BLAS/CMakeLists.txt +index a33f38f..ae1c765 100644 +--- a/BLAS/CMakeLists.txt ++++ b/BLAS/CMakeLists.txt +@@ -1,3 +1,4 @@ ++set(CMAKE_Fortran_COMPILER_WORKS TRUE) + enable_language(Fortran) + + # Check for any necessary platform specific compiler flags +diff --git a/LAPACKE/include/CMakeLists.txt b/LAPACKE/include/CMakeLists.txt +index 034491e..1ecf561 100644 +--- a/LAPACKE/include/CMakeLists.txt ++++ b/LAPACKE/include/CMakeLists.txt +@@ -14,7 +14,7 @@ if(CMAKE_Fortran_COMPILER AND CMAKE_C_COMPILER) + enable_language(C) + include(FortranCInterface) + ## Ensure that the fortran compiler and c compiler specified are compatible +- FortranCInterface_VERIFY() ++ # FortranCInterface_VERIFY() + FortranCInterface_HEADER(${LAPACK_BINARY_DIR}/include/lapacke_mangling.h + MACRO_NAMESPACE "LAPACK_" + SYMBOL_NAMESPACE "LAPACK_") diff --git a/recipes/recipes_emscripten/lapack/recipe.yaml b/recipes/recipes_emscripten/lapack/recipe.yaml new file mode 100644 index 000000000..e2273f25d --- /dev/null +++ b/recipes/recipes_emscripten/lapack/recipe.yaml @@ -0,0 +1,56 @@ +context: + version: 3.12.0 + name: lapack + +source: + url: https://github.com/Reference-LAPACK/${{ name }}/archive/v${{ version }}.tar.gz + sha256: eac9570f8e0ad6f30ce4b963f4f033f0f643e7c3912fc9ee6cd99120675ad48b + patches: + - patches/0001_Disable_fortran_compiler_check.patch + +build: + number: 0 + +# TODO: Use cache output once it's not experimental + +outputs: +- package: + name: libblas + version: ${{ version }} + build: + files: + - lib/libblas.a + - lib/pkgconfig/blas.pc + requirements: + build: + - ${{ compiler("c") }} + - ninja + tests: + - script: test -f $PREFIX/lib/libblas.a + +- package: + name: liblapack + version: ${{ version }} + build: + files: + - lib/liblapack.a + - lib/pkgconfig/lapack.pc + - lib/cmake/lapack-${{ version }}/lapack* + requirements: + build: + - ${{ compiler("c") }} + - ninja + run: + - libblas + tests: + - script: test -f $PREFIX/lib/liblapack.a + +about: + homepage: http://www.netlib.org/lapack + license: BSD-3-Clause + license_file: LICENSE + summary: Linear Algebra PACKage + +extra: + maintainers: + - IsabelParedes From b08c9d40a888efebd6022caaab58158fc863fce5 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Tue, 20 Aug 2024 15:46:00 +0200 Subject: [PATCH 196/333] Add flang runtime lib (#1285) Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/libflang/build.sh | 10 + ...-building-a-functional-Flang-cross-c.patch | 48 + .../0002-Minimal-WASM-support-for-flang.patch | 69 + ...0003-Specialize-Flang-to-target-WASM.patch | 206 +++ ...plicitly-convert-shift-value-to-Subs.patch | 36 + ...AFTER-IEEE_NEXT_DOWN-IEEE_NEXT_UP-NE.patch | 1478 +++++++++++++++++ ...-Handle-missing-definitions-in-cfenv.patch | 129 ++ ...hes-to-build-flang-runtime-with-emcc.patch | 89 + .../recipes_emscripten/libflang/recipe.yaml | 47 + 9 files changed, 2112 insertions(+) create mode 100644 recipes/recipes_emscripten/libflang/build.sh create mode 100644 recipes/recipes_emscripten/libflang/patches/0001-Instructions-for-building-a-functional-Flang-cross-c.patch create mode 100644 recipes/recipes_emscripten/libflang/patches/0002-Minimal-WASM-support-for-flang.patch create mode 100644 recipes/recipes_emscripten/libflang/patches/0003-Specialize-Flang-to-target-WASM.patch create mode 100644 recipes/recipes_emscripten/libflang/patches/0004-Flang-Runtime-Explicitly-convert-shift-value-to-Subs.patch create mode 100644 recipes/recipes_emscripten/libflang/patches/0005-flang-IEEE_NEXT_AFTER-IEEE_NEXT_DOWN-IEEE_NEXT_UP-NE.patch create mode 100644 recipes/recipes_emscripten/libflang/patches/0006-Flang-Runtime-Handle-missing-definitions-in-cfenv.patch create mode 100644 recipes/recipes_emscripten/libflang/patches/0007-Patches-to-build-flang-runtime-with-emcc.patch create mode 100644 recipes/recipes_emscripten/libflang/recipe.yaml diff --git a/recipes/recipes_emscripten/libflang/build.sh b/recipes/recipes_emscripten/libflang/build.sh new file mode 100644 index 000000000..814a00eb6 --- /dev/null +++ b/recipes/recipes_emscripten/libflang/build.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -ex + +# See https://github.com/serge-sans-paille/llvm-project/blob/feature/flang-wasm/README.wasm.md +emcmake cmake -S flang/runtime -B _fbuild_runtime -GNinja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=$PREFIX +$(which cmake) --build _fbuild_runtime +$(which cmake) --build _fbuild_runtime --target install diff --git a/recipes/recipes_emscripten/libflang/patches/0001-Instructions-for-building-a-functional-Flang-cross-c.patch b/recipes/recipes_emscripten/libflang/patches/0001-Instructions-for-building-a-functional-Flang-cross-c.patch new file mode 100644 index 000000000..66f7a767b --- /dev/null +++ b/recipes/recipes_emscripten/libflang/patches/0001-Instructions-for-building-a-functional-Flang-cross-c.patch @@ -0,0 +1,48 @@ +From 9832ab8489970b1b872ada88e21e2cea9f4925bd Mon Sep 17 00:00:00 2001 +From: serge-sans-paille +Date: Fri, 5 Jul 2024 22:45:47 +0200 +Subject: [PATCH 1/7] Instructions for building a functional Flang cross + compiler + +--- + README.wasm.md | 31 +++++++++++++++++++++++++++++++ + 1 file changed, 31 insertions(+) + create mode 100644 README.wasm.md + +diff --git a/README.wasm.md b/README.wasm.md +new file mode 100644 +index 000000000000..4f6e64a4766d +--- /dev/null ++++ b/README.wasm.md +@@ -0,0 +1,31 @@ ++# Building Flang as a WASM cross-compiler ++ ++From the branch ``feature/flang-wasm`` of ++https://github.com/serge-sans-paille/llvm-project. ++ ++This work is inspired by https://gws.phd/posts/fortran_wasm/. ++ ++## Building the compiler itself ++ ++``` ++$ cmake -S llvm -B _fbuild -GNinja \ ++ -DCMAKE_BUILD_TYPE=Release \ ++ -DCMAKE_INSTALL_PREFIX=_finstall \ ++ -DLLVM_DEFAULT_TARGET_TRIPLE=wasm32-unknown-emscripten \ ++ -DLLVM_TARGETS_TO_BUILD=WebAssembly \ ++ -DLLVM_ENABLE_PROJECTS="clang;flang;mlir" ++$ cmake --build _fbuild ++$ cmake --build _fbuild --target install ++``` ++ ++## Building Flang runtmine ++ ++Assuming you have ``emcmake`` available somewhere in your ``PATH``. ++ ++``` ++$ emcmake cmake -S flang/runtime -B _fbuild_runtime -GNinja \ ++ -DCMAKE_BUILD_TYPE=Release \ ++ -DCMAKE_INSTALL_PREFIX=_finstall ++$ cmake --build _fbuild_runtime ++$ cmake --build _fbuild_runtime --target install ++``` diff --git a/recipes/recipes_emscripten/libflang/patches/0002-Minimal-WASM-support-for-flang.patch b/recipes/recipes_emscripten/libflang/patches/0002-Minimal-WASM-support-for-flang.patch new file mode 100644 index 000000000..a9bfe20c5 --- /dev/null +++ b/recipes/recipes_emscripten/libflang/patches/0002-Minimal-WASM-support-for-flang.patch @@ -0,0 +1,69 @@ +From 50a109a4f3a37b27daf5b05503edc5a918f6a826 Mon Sep 17 00:00:00 2001 +From: serge-sans-paille +Date: Tue, 18 Jun 2024 22:19:09 +0200 +Subject: [PATCH 2/7] Minimal WASM support for flang + +Original patch from https://gws.phd/posts/fortran_wasm/ +--- + flang/lib/Optimizer/CodeGen/Target.cpp | 41 ++++++++++++++++++++++++++ + 1 file changed, 41 insertions(+) + +diff --git a/flang/lib/Optimizer/CodeGen/Target.cpp b/flang/lib/Optimizer/CodeGen/Target.cpp +index 25141102a8c4..715daefc0ba5 100644 +--- a/flang/lib/Optimizer/CodeGen/Target.cpp ++++ b/flang/lib/Optimizer/CodeGen/Target.cpp +@@ -1055,6 +1055,44 @@ struct TargetLoongArch64 : public GenericTarget { + }; + } // namespace + ++//===----------------------------------------------------------------------===// ++// WebAssembly (wasm32) target specifics. ++//===----------------------------------------------------------------------===// ++ ++namespace { ++struct TargetWasm32 : public GenericTarget { ++ using GenericTarget::GenericTarget; ++ ++ static constexpr int defaultWidth = 32; ++ ++ CodeGenSpecifics::Marshalling ++ complexArgumentType(mlir::Location, mlir::Type eleTy) const override { ++ assert(fir::isa_real(eleTy)); ++ CodeGenSpecifics::Marshalling marshal; ++ // Use a type that will be translated into LLVM as: ++ // { t, t } struct of 2 eleTy, byval, align 4 ++ auto structTy = ++ mlir::TupleType::get(eleTy.getContext(), mlir::TypeRange{eleTy, eleTy}); ++ marshal.emplace_back(fir::ReferenceType::get(structTy), ++ AT{/*alignment=*/4, /*byval=*/true}); ++ return marshal; ++ } ++ ++ CodeGenSpecifics::Marshalling ++ complexReturnType(mlir::Location loc, mlir::Type eleTy) const override { ++ assert(fir::isa_real(eleTy)); ++ CodeGenSpecifics::Marshalling marshal; ++ // Use a type that will be translated into LLVM as: ++ // { t, t } struct of 2 eleTy, sret, align 4 ++ auto structTy = ++ mlir::TupleType::get(eleTy.getContext(), mlir::TypeRange{eleTy, eleTy}); ++ marshal.emplace_back(fir::ReferenceType::get(structTy), ++ AT{/*alignment=*/4, /*byval=*/false, /*sret=*/true}); ++ return marshal; ++ } ++}; ++} // namespace ++ + // Instantiate the overloaded target instance based on the triple value. + // TODO: Add other targets to this file as needed. + std::unique_ptr +@@ -1110,6 +1148,9 @@ fir::CodeGenSpecifics::get(mlir::MLIRContext *ctx, llvm::Triple &&trp, + case llvm::Triple::ArchType::loongarch64: + return std::make_unique( + ctx, std::move(trp), std::move(kindMap), targetCPU, targetFeatures, dl); ++ case llvm::Triple::ArchType::wasm32: ++ return std::make_unique( ++ ctx, std::move(trp), std::move(kindMap), targetCPU, targetFeatures, dl); + } + TODO(mlir::UnknownLoc::get(ctx), "target not implemented"); + } diff --git a/recipes/recipes_emscripten/libflang/patches/0003-Specialize-Flang-to-target-WASM.patch b/recipes/recipes_emscripten/libflang/patches/0003-Specialize-Flang-to-target-WASM.patch new file mode 100644 index 000000000..966a8eb9f --- /dev/null +++ b/recipes/recipes_emscripten/libflang/patches/0003-Specialize-Flang-to-target-WASM.patch @@ -0,0 +1,206 @@ +From a15e14e27fdbb7e874f51d02e06b4c6c9349f798 Mon Sep 17 00:00:00 2001 +From: serge-sans-paille +Date: Wed, 10 Jul 2024 22:42:19 +0200 +Subject: [PATCH 3/7] Specialize Flang to target WASM + +Many values were explicitly encoded under the assumation that host and target have +the same architecture. +--- + .../Optimizer/Builder/Runtime/RTBuilder.h | 31 ++++++++++--------- + .../flang/Optimizer/Support/DataLayout.h | 16 ++++++++++ + flang/lib/Optimizer/CodeGen/CodeGen.cpp | 8 +++-- + 3 files changed, 38 insertions(+), 17 deletions(-) + +diff --git a/flang/include/flang/Optimizer/Builder/Runtime/RTBuilder.h b/flang/include/flang/Optimizer/Builder/Runtime/RTBuilder.h +index 845ba385918d..adc6479f9cbf 100644 +--- a/flang/include/flang/Optimizer/Builder/Runtime/RTBuilder.h ++++ b/flang/include/flang/Optimizer/Builder/Runtime/RTBuilder.h +@@ -22,6 +22,7 @@ + #include "flang/Optimizer/Builder/FIRBuilder.h" + #include "flang/Optimizer/Dialect/FIRDialect.h" + #include "flang/Optimizer/Dialect/FIRType.h" ++#include "flang/Optimizer/Support/DataLayout.h" + #include "flang/Runtime/reduce.h" + #include "mlir/IR/BuiltinTypes.h" + #include "mlir/IR/MLIRContext.h" +@@ -85,7 +86,7 @@ using FuncTypeBuilderFunc = mlir::FunctionType (*)(mlir::MLIRContext *); + auto voidTy = fir::LLVMPointerType::get( \ + context, mlir::IntegerType::get(context, 8)); \ + auto size_tTy = \ +- mlir::IntegerType::get(context, 8 * sizeof(std::size_t)); \ ++ mlir::IntegerType::get(context, 8 * FLANG_TARGET_SIZEOF_SIZE_T); \ + auto refTy = fir::ReferenceType::get(f(context)); \ + return mlir::FunctionType::get( \ + context, {refTy, size_tTy, refTy, refTy, size_tTy, size_tTy}, \ +@@ -113,13 +114,13 @@ static constexpr TypeBuilderFunc getModel(); + template <> + constexpr TypeBuilderFunc getModel() { + return [](mlir::MLIRContext *context) -> mlir::Type { +- return mlir::IntegerType::get(context, 8 * sizeof(unsigned int)); ++ return mlir::IntegerType::get(context, 8 * FLANG_TARGET_SIZEOF_UINT); + }; + } + template <> + constexpr TypeBuilderFunc getModel() { + return [](mlir::MLIRContext *context) -> mlir::Type { +- return mlir::IntegerType::get(context, 8 * sizeof(short int)); ++ return mlir::IntegerType::get(context, 8 * FLANG_TARGET_SIZEOF_SHORT); + }; + } + template <> +@@ -136,7 +137,7 @@ constexpr TypeBuilderFunc getModel() { + template <> + constexpr TypeBuilderFunc getModel() { + return [](mlir::MLIRContext *context) -> mlir::Type { +- return mlir::IntegerType::get(context, 8 * sizeof(int)); ++ return mlir::IntegerType::get(context, 8 * FLANG_TARGET_SIZEOF_INT); + }; + } + template <> +@@ -182,13 +183,13 @@ constexpr TypeBuilderFunc getModel() { + template <> + constexpr TypeBuilderFunc getModel() { + return [](mlir::MLIRContext *context) -> mlir::Type { +- return mlir::IntegerType::get(context, 8 * sizeof(char)); ++ return mlir::IntegerType::get(context, 8 * FLANG_TARGET_SIZEOF_CHAR); + }; + } + template <> + constexpr TypeBuilderFunc getModel() { + return [](mlir::MLIRContext *context) -> mlir::Type { +- return mlir::IntegerType::get(context, 8 * sizeof(signed char)); ++ return mlir::IntegerType::get(context, 8 * FLANG_TARGET_SIZEOF_SCHAR); + }; + } + template <> +@@ -205,7 +206,7 @@ constexpr TypeBuilderFunc getModel() { + template <> + constexpr TypeBuilderFunc getModel() { + return [](mlir::MLIRContext *context) -> mlir::Type { +- return mlir::IntegerType::get(context, 8 * sizeof(char16_t)); ++ return mlir::IntegerType::get(context, 8 * FLANG_TARGET_SIZEOF_CHAR16); + }; + } + template <> +@@ -218,7 +219,7 @@ constexpr TypeBuilderFunc getModel() { + template <> + constexpr TypeBuilderFunc getModel() { + return [](mlir::MLIRContext *context) -> mlir::Type { +- return mlir::IntegerType::get(context, 8 * sizeof(char32_t)); ++ return mlir::IntegerType::get(context, 8 * FLANG_TARGET_SIZEOF_CHAR32); + }; + } + template <> +@@ -231,7 +232,7 @@ constexpr TypeBuilderFunc getModel() { + template <> + constexpr TypeBuilderFunc getModel() { + return [](mlir::MLIRContext *context) -> mlir::Type { +- return mlir::IntegerType::get(context, 8 * sizeof(unsigned char)); ++ return mlir::IntegerType::get(context, 8 * FLANG_TARGET_SIZEOF_UCHAR); + }; + } + template <> +@@ -259,7 +260,7 @@ constexpr TypeBuilderFunc getModel() { + template <> + constexpr TypeBuilderFunc getModel() { + return [](mlir::MLIRContext *context) -> mlir::Type { +- return mlir::IntegerType::get(context, 8 * sizeof(long)); ++ return mlir::IntegerType::get(context, 8 * FLANG_TARGET_SIZEOF_LONG); + }; + } + template <> +@@ -280,7 +281,7 @@ constexpr TypeBuilderFunc getModel() { + template <> + constexpr TypeBuilderFunc getModel() { + return [](mlir::MLIRContext *context) -> mlir::Type { +- return mlir::IntegerType::get(context, 8 * sizeof(long long)); ++ return mlir::IntegerType::get(context, 8 * FLANG_TARGET_SIZEOF_LONGLONG); + }; + } + template <> +@@ -308,13 +309,13 @@ constexpr TypeBuilderFunc getModel() { + template <> + constexpr TypeBuilderFunc getModel() { + return [](mlir::MLIRContext *context) -> mlir::Type { +- return mlir::IntegerType::get(context, 8 * sizeof(unsigned long)); ++ return mlir::IntegerType::get(context, 8 * FLANG_TARGET_SIZEOF_ULONG); + }; + } + template <> + constexpr TypeBuilderFunc getModel() { + return [](mlir::MLIRContext *context) -> mlir::Type { +- return mlir::IntegerType::get(context, 8 * sizeof(unsigned long long)); ++ return mlir::IntegerType::get(context, 8 * FLANG_TARGET_SIZEOF_ULONGLONG); + }; + } + template <> +@@ -434,13 +435,13 @@ constexpr TypeBuilderFunc getModel *>() { + template <> + constexpr TypeBuilderFunc getModel() { + return [](mlir::MLIRContext *context) -> mlir::Type { +- return fir::ComplexType::get(context, sizeof(float)); ++ return fir::ComplexType::get(context, FLANG_TARGET_SIZEOF_FLOAT); + }; + } + template <> + constexpr TypeBuilderFunc getModel() { + return [](mlir::MLIRContext *context) -> mlir::Type { +- return fir::ComplexType::get(context, sizeof(double)); ++ return fir::ComplexType::get(context, FLANG_TARGET_SIZEOF_DOUBLE); + }; + } + template <> +diff --git a/flang/include/flang/Optimizer/Support/DataLayout.h b/flang/include/flang/Optimizer/Support/DataLayout.h +index d21576bb95f7..5372039d8702 100644 +--- a/flang/include/flang/Optimizer/Support/DataLayout.h ++++ b/flang/include/flang/Optimizer/Support/DataLayout.h +@@ -23,6 +23,22 @@ namespace llvm { + class DataLayout; + } + ++constexpr size_t FLANG_TARGET_SIZEOF_UINT = 4; ++constexpr size_t FLANG_TARGET_SIZEOF_INT = 4; ++constexpr size_t FLANG_TARGET_SIZEOF_SHORT = 2; ++constexpr size_t FLANG_TARGET_SIZEOF_CHAR = 1; ++constexpr size_t FLANG_TARGET_SIZEOF_SCHAR = 1; ++constexpr size_t FLANG_TARGET_SIZEOF_UCHAR = 1; ++constexpr size_t FLANG_TARGET_SIZEOF_CHAR16 = 2; ++constexpr size_t FLANG_TARGET_SIZEOF_CHAR32 = 4; ++constexpr size_t FLANG_TARGET_SIZEOF_LONG = 4; ++constexpr size_t FLANG_TARGET_SIZEOF_LONGLONG = 8; ++constexpr size_t FLANG_TARGET_SIZEOF_ULONG = 4; ++constexpr size_t FLANG_TARGET_SIZEOF_ULONGLONG = 8; ++constexpr size_t FLANG_TARGET_SIZEOF_SIZE_T = 4; ++constexpr size_t FLANG_TARGET_SIZEOF_FLOAT = 4; ++constexpr size_t FLANG_TARGET_SIZEOF_DOUBLE = 8; ++ + namespace fir::support { + /// Create an mlir::DataLayoutSpecInterface attribute from an llvm::DataLayout + /// and set it on the provided mlir::ModuleOp. +diff --git a/flang/lib/Optimizer/CodeGen/CodeGen.cpp b/flang/lib/Optimizer/CodeGen/CodeGen.cpp +index f9ea92a843b2..ca72d67400b0 100644 +--- a/flang/lib/Optimizer/CodeGen/CodeGen.cpp ++++ b/flang/lib/Optimizer/CodeGen/CodeGen.cpp +@@ -909,7 +909,8 @@ getMalloc(fir::AllocMemOp op, mlir::ConversionPatternRewriter &rewriter) { + return mlir::SymbolRefAttr::get(userMalloc); + mlir::OpBuilder moduleBuilder( + op->getParentOfType().getBodyRegion()); +- auto indexType = mlir::IntegerType::get(op.getContext(), 64); ++ auto indexType = ++ mlir::IntegerType::get(op.getContext(), 8 * FLANG_TARGET_SIZEOF_SIZE_T); + auto mallocDecl = moduleBuilder.create( + op.getLoc(), mallocName, + mlir::LLVM::LLVMFunctionType::get(getLlvmPtrType(op.getContext()), +@@ -976,8 +977,11 @@ struct AllocMemOpConversion : public fir::FIROpConversion { + size = rewriter.create( + loc, ity, size, integerCast(loc, rewriter, ity, opnd)); + heap->setAttr("callee", getMalloc(heap, rewriter)); ++ auto szt_ty = mlir::IntegerType::get(rewriter.getContext(), ++ 8 * FLANG_TARGET_SIZEOF_SIZE_T); ++ auto size_szt = integerCast(loc, rewriter, szt_ty, size); + rewriter.replaceOpWithNewOp( +- heap, ::getLlvmPtrType(heap.getContext()), size, heap->getAttrs()); ++ heap, ::getLlvmPtrType(heap.getContext()), size_szt, heap->getAttrs()); + return mlir::success(); + } + diff --git a/recipes/recipes_emscripten/libflang/patches/0004-Flang-Runtime-Explicitly-convert-shift-value-to-Subs.patch b/recipes/recipes_emscripten/libflang/patches/0004-Flang-Runtime-Explicitly-convert-shift-value-to-Subs.patch new file mode 100644 index 000000000..228b788f8 --- /dev/null +++ b/recipes/recipes_emscripten/libflang/patches/0004-Flang-Runtime-Explicitly-convert-shift-value-to-Subs.patch @@ -0,0 +1,36 @@ +From d248b70f49ae63689962b0f8bd0cab8e2f35a592 Mon Sep 17 00:00:00 2001 +From: serge-sans-paille +Date: Fri, 26 Jul 2024 07:34:39 +0000 +Subject: [PATCH 4/7] [Flang][Runtime] Explicitly convert shift value to + SubscriptValue (#99822) + +Shift value are within the range of SubscriptValue but the API forces +them to 64bits. This assumption doesn't hold for 32bit machine, so add +an explicit cast. +--- + flang/runtime/transformational.cpp | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/flang/runtime/transformational.cpp b/flang/runtime/transformational.cpp +index cf1e61c0844d..b6b204be4418 100644 +--- a/flang/runtime/transformational.cpp ++++ b/flang/runtime/transformational.cpp +@@ -508,7 +508,8 @@ void RTDEF(CshiftVector)(Descriptor &result, const Descriptor &source, + SubscriptValue lb{sourceDim.LowerBound()}; + for (SubscriptValue j{0}; j < extent; ++j) { + SubscriptValue resultAt{1 + j}; +- SubscriptValue sourceAt{lb + (j + shift) % extent}; ++ SubscriptValue sourceAt{ ++ lb + static_cast(j + shift) % extent}; + if (sourceAt < lb) { + sourceAt += extent; + } +@@ -619,7 +620,7 @@ void RTDEF(EoshiftVector)(Descriptor &result, const Descriptor &source, + } + SubscriptValue lb{source.GetDimension(0).LowerBound()}; + for (SubscriptValue j{1}; j <= extent; ++j) { +- SubscriptValue sourceAt{lb + j - 1 + shift}; ++ SubscriptValue sourceAt{lb + j - 1 + static_cast(shift)}; + if (sourceAt >= lb && sourceAt < lb + extent) { + CopyElement(result, &j, source, &sourceAt, terminator); + } else if (boundary) { diff --git a/recipes/recipes_emscripten/libflang/patches/0005-flang-IEEE_NEXT_AFTER-IEEE_NEXT_DOWN-IEEE_NEXT_UP-NE.patch b/recipes/recipes_emscripten/libflang/patches/0005-flang-IEEE_NEXT_AFTER-IEEE_NEXT_DOWN-IEEE_NEXT_UP-NE.patch new file mode 100644 index 000000000..27cce497c --- /dev/null +++ b/recipes/recipes_emscripten/libflang/patches/0005-flang-IEEE_NEXT_AFTER-IEEE_NEXT_DOWN-IEEE_NEXT_UP-NE.patch @@ -0,0 +1,1478 @@ +From e8097a12207e15b6768a473d06a37796d4403b46 Mon Sep 17 00:00:00 2001 +From: vdonaldson <37090318+vdonaldson@users.noreply.github.com> +Date: Mon, 29 Jul 2024 09:22:36 -0400 +Subject: [PATCH 5/7] [flang] IEEE_NEXT_AFTER, IEEE_NEXT_DOWN, IEEE_NEXT_UP, + NEAREST (#100782) + +IEEE_ARITHMETIC intrinsic module procedures IEEE_NEXT_AFTER, +IEEE_NEXT_DOWN, and IEEE_NEXT_UP, and intrinsic NEAREST return larger or +smaller values adjacent to their primary REAL argument. The four +procedures vary in how the direction is chosen, in how special cases are +treated, and in what exceptions are generated. Implement the three +IEEE_ARITHMETIC procedures. Update the NEAREST implementation to support +all six REAL kinds 2,3,4,8,10,16, and fix several bugs. + +IEEE_NEXT_AFTER(X,Y) returns a NaN when Y is a NaN as that seems to be +the universal choice of other compilers. + +Change the front end compile time implementation of these procedures to +return normal (HUGE) values for infinities when applicable, rather than +always returning the input infinity. +--- + .../flang/Optimizer/Builder/IntrinsicCall.h | 9 +- + .../Optimizer/Builder/Runtime/Exceptions.h | 8 +- + flang/include/flang/Runtime/exceptions.h | 9 +- + flang/include/flang/Runtime/magic-numbers.h | 4 + + flang/lib/Evaluate/real.cpp | 4 +- + flang/lib/Optimizer/Builder/IntrinsicCall.cpp | 228 ++++++++- + .../Optimizer/Builder/Runtime/Exceptions.cpp | 8 +- + .../lib/Optimizer/Builder/Runtime/Numeric.cpp | 18 +- + flang/runtime/exceptions.cpp | 75 +-- + flang/test/Evaluate/fold-nearest.f90 | 14 +- + flang/test/Lower/Intrinsics/ieee_next.f90 | 284 +++++++++++ + flang/test/Lower/Intrinsics/nearest.f90 | 475 +++++++++++++++--- + .../Optimizer/Builder/Runtime/NumericTest.cpp | 8 - + 13 files changed, 949 insertions(+), 195 deletions(-) + create mode 100644 flang/test/Lower/Intrinsics/ieee_next.f90 + +diff --git a/flang/include/flang/Optimizer/Builder/IntrinsicCall.h b/flang/include/flang/Optimizer/Builder/IntrinsicCall.h +index 80f077ad133f..78bb82b17d40 100644 +--- a/flang/include/flang/Optimizer/Builder/IntrinsicCall.h ++++ b/flang/include/flang/Optimizer/Builder/IntrinsicCall.h +@@ -330,6 +330,8 @@ struct IntrinsicLibrary { + mlir::Value genModulo(mlir::Type, llvm::ArrayRef); + void genMoveAlloc(llvm::ArrayRef); + void genMvbits(llvm::ArrayRef); ++ enum class NearestProc { Nearest, NextAfter, NextDown, NextUp }; ++ template + mlir::Value genNearest(mlir::Type, llvm::ArrayRef); + mlir::Value genNint(mlir::Type, llvm::ArrayRef); + fir::ExtendedValue genNorm2(mlir::Type, llvm::ArrayRef); +@@ -422,9 +424,12 @@ struct IntrinsicLibrary { + mlir::Type resultType, + llvm::ArrayRef args); + +- /// Generate code to raise \p except if \p cond is absent, ++ /// Generate code to raise \p excepts if \p cond is absent, + /// or present and true. +- void genRaiseExcept(int except, mlir::Value cond = {}); ++ void genRaiseExcept(int excepts, mlir::Value cond = {}); ++ ++ /// Generate a quiet NaN of a given floating point type. ++ mlir::Value genQNan(mlir::Type resultType); + + /// Define the different FIR generators that can be mapped to intrinsic to + /// generate the related code. +diff --git a/flang/include/flang/Optimizer/Builder/Runtime/Exceptions.h b/flang/include/flang/Optimizer/Builder/Runtime/Exceptions.h +index 29745b8c231d..aa6e33c7440a 100644 +--- a/flang/include/flang/Optimizer/Builder/Runtime/Exceptions.h ++++ b/flang/include/flang/Optimizer/Builder/Runtime/Exceptions.h +@@ -21,10 +21,10 @@ class FirOpBuilder; + + namespace fir::runtime { + +-/// Generate a runtime call to map an ieee_flag_type exception value to a +-/// libm fenv.h value. +-mlir::Value genMapException(fir::FirOpBuilder &builder, mlir::Location loc, +- mlir::Value except); ++/// Generate a runtime call to map a set of ieee_flag_type exceptions to a ++/// libm fenv.h excepts value. ++mlir::Value genMapExcept(fir::FirOpBuilder &builder, mlir::Location loc, ++ mlir::Value excepts); + + } // namespace fir::runtime + #endif // FORTRAN_OPTIMIZER_BUILDER_RUNTIME_EXCEPTIONS_H +diff --git a/flang/include/flang/Runtime/exceptions.h b/flang/include/flang/Runtime/exceptions.h +index 8f806ab9ad98..1ab22da103a5 100644 +--- a/flang/include/flang/Runtime/exceptions.h ++++ b/flang/include/flang/Runtime/exceptions.h +@@ -12,7 +12,6 @@ + #define FORTRAN_RUNTIME_EXCEPTIONS_H_ + + #include "flang/Runtime/entry-names.h" +-#include "flang/Runtime/magic-numbers.h" + #include + + namespace Fortran::runtime { +@@ -21,11 +20,9 @@ class Descriptor; + + extern "C" { + +-// Map a (single) IEEE_FLAG_TYPE exception value to a libm fenv.h value. +-// This could be extended to handle sets of exceptions, but there is no +-// current use case for that. This mapping is done at runtime to support +-// cross compilation. +-std::int32_t RTNAME(MapException)(std::int32_t except); ++// Map a set of IEEE_FLAG_TYPE exception values to a libm fenv.h excepts value. ++// This mapping is done at runtime to support cross compilation. ++std::uint32_t RTNAME(MapException)(std::uint32_t excepts); + + } // extern "C" + } // namespace Fortran::runtime +diff --git a/flang/include/flang/Runtime/magic-numbers.h b/flang/include/flang/Runtime/magic-numbers.h +index 1cded1fd6323..bab0e9ae0529 100644 +--- a/flang/include/flang/Runtime/magic-numbers.h ++++ b/flang/include/flang/Runtime/magic-numbers.h +@@ -100,6 +100,10 @@ The denorm value is a nonstandard extension. + #define _FORTRAN_RUNTIME_IEEE_OVERFLOW 8 + #define _FORTRAN_RUNTIME_IEEE_UNDERFLOW 16 + #define _FORTRAN_RUNTIME_IEEE_INEXACT 32 ++#define _FORTRAN_RUNTIME_IEEE_ALL \ ++ _FORTRAN_RUNTIME_IEEE_INVALID | _FORTRAN_RUNTIME_IEEE_DENORM | \ ++ _FORTRAN_RUNTIME_IEEE_DIVIDE_BY_ZERO | _FORTRAN_RUNTIME_IEEE_OVERFLOW | \ ++ _FORTRAN_RUNTIME_IEEE_UNDERFLOW | _FORTRAN_RUNTIME_IEEE_INEXACT + + #if 0 + ieee_round_type values +diff --git a/flang/lib/Evaluate/real.cpp b/flang/lib/Evaluate/real.cpp +index 223f67fee41d..a5f8070c684f 100644 +--- a/flang/lib/Evaluate/real.cpp ++++ b/flang/lib/Evaluate/real.cpp +@@ -330,12 +330,12 @@ ValueWithRealFlags> Real::SQRT(Rounding rounding) const { + template + ValueWithRealFlags> Real::NEAREST(bool upward) const { + ValueWithRealFlags result; ++ bool isNegative{IsNegative()}; + if (IsFinite()) { + Fraction fraction{GetFraction()}; + int expo{Exponent()}; + Fraction one{1}; + Fraction nearest; +- bool isNegative{IsNegative()}; + if (upward != isNegative) { // upward in magnitude + auto next{fraction.AddUnsigned(one)}; + if (next.carry) { +@@ -359,6 +359,8 @@ ValueWithRealFlags> Real::NEAREST(bool upward) const { + } + } + result.flags = result.value.Normalize(isNegative, expo, nearest); ++ } else if (IsInfinite() && upward == isNegative) { ++ result.value = isNegative ? HUGE().Negate() : HUGE(); // largest mag finite + } else { + result.flags.set(RealFlag::InvalidArgument); + result.value = *this; +diff --git a/flang/lib/Optimizer/Builder/IntrinsicCall.cpp b/flang/lib/Optimizer/Builder/IntrinsicCall.cpp +index 0e5e30a7024d..22439010e779 100644 +--- a/flang/lib/Optimizer/Builder/IntrinsicCall.cpp ++++ b/flang/lib/Optimizer/Builder/IntrinsicCall.cpp +@@ -98,9 +98,6 @@ static bool isStaticallyPresent(const fir::ExtendedValue &exv) { + /// IEEE module procedure names not yet implemented for genModuleProcTODO. + static constexpr char ieee_int[] = "ieee_int"; + static constexpr char ieee_get_underflow_mode[] = "ieee_get_underflow_mode"; +-static constexpr char ieee_next_after[] = "ieee_next_after"; +-static constexpr char ieee_next_down[] = "ieee_next_down"; +-static constexpr char ieee_next_up[] = "ieee_next_up"; + static constexpr char ieee_real[] = "ieee_real"; + static constexpr char ieee_rem[] = "ieee_rem"; + static constexpr char ieee_rint[] = "ieee_rint"; +@@ -355,9 +352,9 @@ static constexpr IntrinsicHandler handlers[]{ + &I::genIeeeMaxMin}, + {"ieee_min_num_mag", + &I::genIeeeMaxMin}, +- {"ieee_next_after", &I::genModuleProcTODO}, +- {"ieee_next_down", &I::genModuleProcTODO}, +- {"ieee_next_up", &I::genModuleProcTODO}, ++ {"ieee_next_after", &I::genNearest}, ++ {"ieee_next_down", &I::genNearest}, ++ {"ieee_next_up", &I::genNearest}, + {"ieee_quiet_eq", &I::genIeeeQuietCompare}, + {"ieee_quiet_ge", &I::genIeeeQuietCompare}, + {"ieee_quiet_gt", &I::genIeeeQuietCompare}, +@@ -497,7 +494,7 @@ static constexpr IntrinsicHandler handlers[]{ + {"len", asValue}, + {"to", asAddr}, + {"topos", asValue}}}}, +- {"nearest", &I::genNearest}, ++ {"nearest", &I::genNearest}, + {"nint", &I::genNint}, + {"norm2", + &I::genNorm2, +@@ -3972,11 +3969,14 @@ IntrinsicLibrary::genIchar(mlir::Type resultType, + // 8 Positive normal + // 9 Positive infinity + static constexpr int finiteTest = 0b0111111000; ++static constexpr int infiniteTest = 0b1000000100; + static constexpr int nanTest = 0b0000000011; + static constexpr int negativeTest = 0b0000111100; + static constexpr int normalTest = 0b0101101000; + static constexpr int positiveTest = 0b1111000000; + static constexpr int snanTest = 0b0000000001; ++static constexpr int subnormalTest = 0b0010010000; ++static constexpr int zeroTest = 0b0001100000; + + mlir::Value IntrinsicLibrary::genIsFPClass(mlir::Type resultType, + llvm::ArrayRef args, +@@ -3988,8 +3988,15 @@ mlir::Value IntrinsicLibrary::genIsFPClass(mlir::Type resultType, + return builder.createConvert(loc, resultType, isfpclass); + } + +-/// Generate code to raise \p except if \p cond is absent, or present and true. +-void IntrinsicLibrary::genRaiseExcept(int except, mlir::Value cond) { ++// Generate a quiet NaN of a given floating point type. ++mlir::Value IntrinsicLibrary::genQNan(mlir::Type resultType) { ++ return genIeeeValue(resultType, builder.createIntegerConstant( ++ loc, builder.getIntegerType(8), ++ _FORTRAN_RUNTIME_IEEE_QUIET_NAN)); ++} ++ ++// Generate code to raise \p excepts if \p cond is absent, or present and true. ++void IntrinsicLibrary::genRaiseExcept(int excepts, mlir::Value cond) { + fir::IfOp ifOp; + if (cond) { + ifOp = builder.create(loc, cond, /*withElseRegion=*/false); +@@ -3998,8 +4005,8 @@ void IntrinsicLibrary::genRaiseExcept(int except, mlir::Value cond) { + mlir::Type i32Ty = builder.getIntegerType(32); + genRuntimeCall( + "feraiseexcept", i32Ty, +- fir::runtime::genMapException( +- builder, loc, builder.createIntegerConstant(loc, i32Ty, except))); ++ fir::runtime::genMapExcept( ++ builder, loc, builder.createIntegerConstant(loc, i32Ty, excepts))); + if (cond) + builder.setInsertionPointAfter(ifOp); + } +@@ -4363,14 +4370,14 @@ void IntrinsicLibrary::genIeeeGetFlag(llvm::ArrayRef args) { + mlir::Value zero = builder.createIntegerConstant(loc, i32Ty, 0); + auto [fieldRef, ignore] = getFieldRef(builder, loc, flag); + mlir::Value field = builder.create(loc, fieldRef); +- mlir::Value exceptSet = IntrinsicLibrary::genRuntimeCall( ++ mlir::Value excepts = IntrinsicLibrary::genRuntimeCall( + "fetestexcept", i32Ty, +- fir::runtime::genMapException( ++ fir::runtime::genMapExcept( + builder, loc, builder.create(loc, i32Ty, field))); + mlir::Value logicalResult = builder.create( + loc, resultTy, + builder.create(loc, mlir::arith::CmpIPredicate::ne, +- exceptSet, zero)); ++ excepts, zero)); + builder.create(loc, logicalResult, flagValue); + } + +@@ -4391,7 +4398,7 @@ void IntrinsicLibrary::genIeeeGetHaltingMode( + IntrinsicLibrary::genRuntimeCall("fegetexcept", i32Ty, {}); + mlir::Value intResult = builder.create( + loc, haltSet, +- fir::runtime::genMapException( ++ fir::runtime::genMapExcept( + builder, loc, builder.create(loc, i32Ty, field))); + mlir::Value logicalResult = builder.create( + loc, resultTy, +@@ -4657,7 +4664,6 @@ mlir::Value IntrinsicLibrary::genIeeeMaxMin(mlir::Type resultType, + y1 = y; + } + mlir::Type i1Ty = builder.getI1Type(); +- mlir::Type i8Ty = builder.getIntegerType(8); + mlir::arith::CmpFPredicate pred; + mlir::Value cmp, result, resultIsX, resultIsY; + +@@ -4698,12 +4704,10 @@ mlir::Value IntrinsicLibrary::genIeeeMaxMin(mlir::Type resultType, + } else { + resultIsX = resultIsY = builder.createBool(loc, false); + } +- mlir::Value qNaN = +- genIeeeValue(resultType, builder.createIntegerConstant( +- loc, i8Ty, _FORTRAN_RUNTIME_IEEE_QUIET_NAN)); + result = builder.create( + loc, resultIsX, x, +- builder.create(loc, resultIsY, y, qNaN)); ++ builder.create(loc, resultIsY, y, ++ genQNan(resultType))); + mlir::Value hasSNaNOp = builder.create( + loc, genIsFPClass(builder.getI1Type(), args[0], snanTest), + genIsFPClass(builder.getI1Type(), args[1], snanTest)); +@@ -4747,7 +4751,7 @@ void IntrinsicLibrary::genIeeeSetFlagOrHaltingMode( + mlir::Type i32Ty = builder.getIntegerType(32); + auto [fieldRef, ignore] = getFieldRef(builder, loc, getBase(args[0])); + mlir::Value field = builder.create(loc, fieldRef); +- mlir::Value except = fir::runtime::genMapException( ++ mlir::Value except = fir::runtime::genMapExcept( + builder, loc, builder.create(loc, i32Ty, field)); + auto ifOp = builder.create( + loc, builder.create(loc, i1Ty, getBase(args[1])), +@@ -5610,16 +5614,186 @@ void IntrinsicLibrary::genMvbits(llvm::ArrayRef args) { + builder.create(loc, res, toAddr); + } + +-// NEAREST ++// NEAREST, IEEE_NEXT_AFTER, IEEE_NEXT_DOWN, IEEE_NEXT_UP ++template + mlir::Value IntrinsicLibrary::genNearest(mlir::Type resultType, + llvm::ArrayRef args) { +- assert(args.size() == 2); ++ // NEAREST ++ // Return the number adjacent to arg X in the direction of the infinity ++ // with the sign of arg S. Terminate with an error if arg S is zero. ++ // Generate exceptions as for IEEE_NEXT_AFTER. ++ // IEEE_NEXT_AFTER ++ // Return isNan(Y) ? NaN : X==Y ? X : num adjacent to X in the dir of Y. ++ // Signal IEEE_OVERFLOW, IEEE_INEXACT for finite X and infinite result. ++ // Signal IEEE_UNDERFLOW, IEEE_INEXACT for subnormal result. ++ // IEEE_NEXT_DOWN ++ // Return the number adjacent to X and less than X. ++ // Signal IEEE_INVALID when X is a signaling NaN. ++ // IEEE_NEXT_UP ++ // Return the number adjacent to X and greater than X. ++ // Signal IEEE_INVALID when X is a signaling NaN. ++ // ++ // valueUp -- true if a finite result must be larger than X. ++ // magnitudeUp -- true if a finite abs(result) must be larger than abs(X). ++ // ++ // if (isNextAfter && isNan(Y)) X = NaN // result = NaN ++ // if (isNan(X) || (isNextAfter && X == Y) || (isInfinite(X) && magnitudeUp)) ++ // result = X ++ // else if (isZero(X)) ++ // result = valueUp ? minPositiveSubnormal : minNegativeSubnormal ++ // else ++ // result = magUp ? (X + minPositiveSubnormal) : (X - minPositiveSubnormal) + +- mlir::Value realX = fir::getBase(args[0]); +- mlir::Value realS = fir::getBase(args[1]); ++ assert(args.size() == 1 || args.size() == 2); ++ mlir::Value x = args[0]; ++ mlir::FloatType xType = mlir::dyn_cast(x.getType()); ++ const unsigned xBitWidth = xType.getWidth(); ++ mlir::Type i1Ty = builder.getI1Type(); ++ if constexpr (proc == NearestProc::NextAfter) ++ // If isNan(Y), set X to a qNaN that will propagate to the resultIsX result. ++ x = builder.create( ++ loc, genIsFPClass(i1Ty, args[1], nanTest), genQNan(xType), x); ++ mlir::Value resultIsX = genIsFPClass(i1Ty, x, nanTest); ++ mlir::Type intType = builder.getIntegerType(xBitWidth); ++ mlir::Value one = builder.createIntegerConstant(loc, intType, 1); + +- return builder.createConvert( +- loc, resultType, fir::runtime::genNearest(builder, loc, realX, realS)); ++ // Set valueUp to true if a finite result must be larger than arg X. ++ mlir::Value valueUp; ++ if constexpr (proc == NearestProc::Nearest) { ++ // Arg S must not be zero. ++ fir::IfOp ifOp = ++ builder.create(loc, genIsFPClass(i1Ty, args[1], zeroTest), ++ /*withElseRegion=*/false); ++ builder.setInsertionPointToStart(&ifOp.getThenRegion().front()); ++ fir::runtime::genReportFatalUserError( ++ builder, loc, "intrinsic nearest S argument is zero"); ++ builder.setInsertionPointAfter(ifOp); ++ mlir::Value sSign = IntrinsicLibrary::genIeeeSignbit(intType, {args[1]}); ++ valueUp = builder.create( ++ loc, mlir::arith::CmpIPredicate::ne, sSign, one); ++ } else if constexpr (proc == NearestProc::NextAfter) { ++ // Convert X and Y to a common type to allow comparison. Direct conversions ++ // between kinds 2, 3, 10, and 16 are not all supported. These conversions ++ // are implemented by converting kind=2,3 values to kind=4, possibly ++ // followed with a conversion of that value to a larger type. ++ mlir::Value x1 = x; ++ mlir::Value y = args[1]; ++ mlir::FloatType yType = mlir::dyn_cast(args[1].getType()); ++ const unsigned yBitWidth = yType.getWidth(); ++ if (xType != yType) { ++ mlir::Type f32Ty = mlir::FloatType::getF32(builder.getContext()); ++ if (xBitWidth < 32) ++ x1 = builder.createConvert(loc, f32Ty, x1); ++ if (yBitWidth > 32 && yBitWidth > xBitWidth) ++ x1 = builder.createConvert(loc, yType, x1); ++ if (yBitWidth < 32) ++ y = builder.createConvert(loc, f32Ty, y); ++ if (xBitWidth > 32 && xBitWidth > yBitWidth) ++ y = builder.createConvert(loc, xType, y); ++ } ++ resultIsX = builder.create( ++ loc, resultIsX, ++ builder.create( ++ loc, mlir::arith::CmpFPredicate::OEQ, x1, y)); ++ valueUp = builder.create( ++ loc, mlir::arith::CmpFPredicate::OLT, x1, y); ++ } else if constexpr (proc == NearestProc::NextDown) { ++ valueUp = builder.createBool(loc, false); ++ } else if constexpr (proc == NearestProc::NextUp) { ++ valueUp = builder.createBool(loc, true); ++ } ++ mlir::Value magnitudeUp = builder.create( ++ loc, mlir::arith::CmpIPredicate::ne, valueUp, ++ IntrinsicLibrary::genIeeeSignbit(i1Ty, {args[0]})); ++ resultIsX = builder.create( ++ loc, resultIsX, ++ builder.create( ++ loc, genIsFPClass(i1Ty, x, infiniteTest), magnitudeUp)); ++ ++ // Result is X. (For ieee_next_after with isNan(Y), X has been set to a NaN.) ++ fir::IfOp outerIfOp = builder.create(loc, resultType, resultIsX, ++ /*withElseRegion=*/true); ++ builder.setInsertionPointToStart(&outerIfOp.getThenRegion().front()); ++ if constexpr (proc == NearestProc::NextDown || proc == NearestProc::NextUp) ++ genRaiseExcept(_FORTRAN_RUNTIME_IEEE_INVALID, ++ genIsFPClass(i1Ty, x, snanTest)); ++ builder.create(loc, x); ++ ++ // Result is minPositiveSubnormal or minNegativeSubnormal. (X is zero.) ++ builder.setInsertionPointToStart(&outerIfOp.getElseRegion().front()); ++ mlir::Value resultIsMinSubnormal = builder.create( ++ loc, mlir::arith::CmpFPredicate::OEQ, x, ++ builder.createRealZeroConstant(loc, xType)); ++ fir::IfOp innerIfOp = ++ builder.create(loc, resultType, resultIsMinSubnormal, ++ /*withElseRegion=*/true); ++ builder.setInsertionPointToStart(&innerIfOp.getThenRegion().front()); ++ mlir::Value minPositiveSubnormal = ++ builder.create(loc, resultType, one); ++ mlir::Value minNegativeSubnormal = builder.create( ++ loc, resultType, ++ builder.create( ++ loc, intType, ++ builder.getIntegerAttr( ++ intType, llvm::APInt::getBitsSetWithWrap( ++ xBitWidth, /*lo=*/xBitWidth - 1, /*hi=*/1)))); ++ mlir::Value result = builder.create( ++ loc, valueUp, minPositiveSubnormal, minNegativeSubnormal); ++ if constexpr (proc == NearestProc::Nearest || proc == NearestProc::NextAfter) ++ genRaiseExcept(_FORTRAN_RUNTIME_IEEE_UNDERFLOW | ++ _FORTRAN_RUNTIME_IEEE_INEXACT); ++ builder.create(loc, result); ++ ++ // Result is (X + minPositiveSubnormal) or (X - minPositiveSubnormal). ++ builder.setInsertionPointToStart(&innerIfOp.getElseRegion().front()); ++ if (xBitWidth == 80) { ++ // Kind 10. Call std::nextafter, which generates exceptions as required ++ // for ieee_next_after and nearest. Override this exception processing ++ // for ieee_next_down and ieee_next_up. ++ constexpr bool overrideExceptionGeneration = ++ proc == NearestProc::NextDown || proc == NearestProc::NextUp; ++ [[maybe_unused]] mlir::Type i32Ty; ++ [[maybe_unused]] mlir::Value allExcepts, excepts, mask; ++ if constexpr (overrideExceptionGeneration) { ++ i32Ty = builder.getIntegerType(32); ++ allExcepts = fir::runtime::genMapExcept( ++ builder, loc, ++ builder.createIntegerConstant(loc, i32Ty, _FORTRAN_RUNTIME_IEEE_ALL)); ++ excepts = genRuntimeCall("fetestexcept", i32Ty, allExcepts); ++ mask = genRuntimeCall("fedisableexcept", i32Ty, allExcepts); ++ } ++ result = fir::runtime::genNearest(builder, loc, x, valueUp); ++ if constexpr (overrideExceptionGeneration) { ++ genRuntimeCall("feclearexcept", i32Ty, allExcepts); ++ genRuntimeCall("feraiseexcept", i32Ty, excepts); ++ genRuntimeCall("feenableexcept", i32Ty, mask); ++ } ++ builder.create(loc, result); ++ } else { ++ // Kind 2, 3, 4, 8, 16. Increment or decrement X cast to integer. ++ mlir::Value intX = builder.create(loc, intType, x); ++ result = builder.create( ++ loc, resultType, ++ builder.create( ++ loc, magnitudeUp, ++ builder.create(loc, intX, one), ++ builder.create(loc, intX, one))); ++ if constexpr (proc == NearestProc::Nearest || ++ proc == NearestProc::NextAfter) { ++ genRaiseExcept(_FORTRAN_RUNTIME_IEEE_OVERFLOW | ++ _FORTRAN_RUNTIME_IEEE_INEXACT, ++ genIsFPClass(i1Ty, result, infiniteTest)); ++ genRaiseExcept(_FORTRAN_RUNTIME_IEEE_UNDERFLOW | ++ _FORTRAN_RUNTIME_IEEE_INEXACT, ++ genIsFPClass(i1Ty, result, subnormalTest)); ++ } ++ builder.create(loc, result); ++ } ++ ++ builder.setInsertionPointAfter(innerIfOp); ++ builder.create(loc, innerIfOp.getResult(0)); ++ builder.setInsertionPointAfter(outerIfOp); ++ return outerIfOp.getResult(0); + } + + // NINT +diff --git a/flang/lib/Optimizer/Builder/Runtime/Exceptions.cpp b/flang/lib/Optimizer/Builder/Runtime/Exceptions.cpp +index 294ccbaf82a0..8775b50437af 100644 +--- a/flang/lib/Optimizer/Builder/Runtime/Exceptions.cpp ++++ b/flang/lib/Optimizer/Builder/Runtime/Exceptions.cpp +@@ -13,10 +13,10 @@ + + using namespace Fortran::runtime; + +-mlir::Value fir::runtime::genMapException(fir::FirOpBuilder &builder, +- mlir::Location loc, +- mlir::Value except) { ++mlir::Value fir::runtime::genMapExcept(fir::FirOpBuilder &builder, ++ mlir::Location loc, ++ mlir::Value excepts) { + mlir::func::FuncOp func{ + fir::runtime::getRuntimeFunc(loc, builder)}; +- return builder.create(loc, func, except).getResult(0); ++ return builder.create(loc, func, excepts).getResult(0); + } +diff --git a/flang/lib/Optimizer/Builder/Runtime/Numeric.cpp b/flang/lib/Optimizer/Builder/Runtime/Numeric.cpp +index 1d13248db598..d98288419d68 100644 +--- a/flang/lib/Optimizer/Builder/Runtime/Numeric.cpp ++++ b/flang/lib/Optimizer/Builder/Runtime/Numeric.cpp +@@ -406,10 +406,10 @@ mlir::Value fir::runtime::genModulo(fir::FirOpBuilder &builder, + return builder.create(loc, func, args).getResult(0); + } + +-/// Generate call to Nearest intrinsic runtime routine. ++/// Generate call to Nearest intrinsic or a "Next" intrinsic module procedure. + mlir::Value fir::runtime::genNearest(fir::FirOpBuilder &builder, + mlir::Location loc, mlir::Value x, +- mlir::Value s) { ++ mlir::Value valueUp) { + mlir::func::FuncOp func; + mlir::Type fltTy = x.getType(); + +@@ -425,19 +425,7 @@ mlir::Value fir::runtime::genNearest(fir::FirOpBuilder &builder, + fir::intrinsicTypeTODO(builder, fltTy, loc, "NEAREST"); + + auto funcTy = func.getFunctionType(); +- +- mlir::Type sTy = s.getType(); +- mlir::Value zero = builder.createRealZeroConstant(loc, sTy); +- auto cmp = builder.create( +- loc, mlir::arith::CmpFPredicate::OGT, s, zero); +- +- mlir::Type boolTy = mlir::IntegerType::get(builder.getContext(), 1); +- mlir::Value False = builder.createIntegerConstant(loc, boolTy, 0); +- mlir::Value True = builder.createIntegerConstant(loc, boolTy, 1); +- +- mlir::Value positive = +- builder.create(loc, cmp, True, False); +- auto args = fir::runtime::createArguments(builder, loc, funcTy, x, positive); ++ auto args = fir::runtime::createArguments(builder, loc, funcTy, x, valueUp); + + return builder.create(loc, func, args).getResult(0); + } +diff --git a/flang/runtime/exceptions.cpp b/flang/runtime/exceptions.cpp +index dfd3b812e22a..2032ce7b1224 100644 +--- a/flang/runtime/exceptions.cpp ++++ b/flang/runtime/exceptions.cpp +@@ -6,11 +6,10 @@ + // + //===----------------------------------------------------------------------===// + +-// Map Fortran ieee_arithmetic module exceptions to fenv.h exceptions. ++// Runtime exception support. + + #include "flang/Runtime/exceptions.h" + #include "terminator.h" +-#include "flang/Runtime/magic-numbers.h" + #include + + #ifndef __FE_DENORM +@@ -21,58 +20,32 @@ namespace Fortran::runtime { + + extern "C" { + +-std::int32_t RTNAME(MapException)(int32_t except) { ++// Map a set of Fortran ieee_arithmetic module exceptions to a libm fenv.h ++// excepts value. ++uint32_t RTNAME(MapException)(uint32_t excepts) { + Terminator terminator{__FILE__, __LINE__}; + +- static constexpr int32_t mask{_FORTRAN_RUNTIME_IEEE_INVALID | +- _FORTRAN_RUNTIME_IEEE_DENORM | _FORTRAN_RUNTIME_IEEE_DIVIDE_BY_ZERO | +- _FORTRAN_RUNTIME_IEEE_OVERFLOW | _FORTRAN_RUNTIME_IEEE_UNDERFLOW | +- _FORTRAN_RUNTIME_IEEE_INEXACT}; +- if (except == 0 || except != (except & mask)) { +- terminator.Crash("Invalid exception value: %d", except); ++ static constexpr uint32_t v{FE_INVALID}; ++ static constexpr uint32_t s{__FE_DENORM}; // subnormal ++ static constexpr uint32_t z{FE_DIVBYZERO}; ++ static constexpr uint32_t o{FE_OVERFLOW}; ++ static constexpr uint32_t u{FE_UNDERFLOW}; ++ static constexpr uint32_t x{FE_INEXACT}; ++ ++#define vm(p) p, p | v ++#define sm(p) vm(p), vm(p | s) ++#define zm(p) sm(p), sm(p | z) ++#define om(p) zm(p), zm(p | o) ++#define um(p) om(p), om(p | u) ++#define xm um(0), um(x) ++ ++ static constexpr uint32_t map[]{xm}; ++ static constexpr uint32_t mapSize{sizeof(map) / sizeof(uint32_t)}; ++ static_assert(mapSize == 64); ++ if (excepts == 0 || excepts >= mapSize) { ++ terminator.Crash("Invalid excepts value: %d", excepts); + } +- +- // Fortran and fenv.h values are identical; return the value. +- if constexpr (_FORTRAN_RUNTIME_IEEE_INVALID == FE_INVALID && +- _FORTRAN_RUNTIME_IEEE_DENORM == __FE_DENORM && +- _FORTRAN_RUNTIME_IEEE_DIVIDE_BY_ZERO == FE_DIVBYZERO && +- _FORTRAN_RUNTIME_IEEE_OVERFLOW == FE_OVERFLOW && +- _FORTRAN_RUNTIME_IEEE_UNDERFLOW == FE_UNDERFLOW && +- _FORTRAN_RUNTIME_IEEE_INEXACT == FE_INEXACT) { +- return except; +- } +- +- // fenv.h calls that take exception arguments are able to process multiple +- // exceptions in one call, such as FE_OVERFLOW | FE_DIVBYZERO | FE_INVALID. +- // And intrinsic module procedures that manage exceptions are elemental +- // procedures that may specify multiple exceptions, such as ieee_all. +- // However, general elemental call processing places single scalar arguments +- // in a loop. As a consequence, argument 'except' here will be a power of +- // two, corresponding to a single exception. If code generation were +- // modified to bypass normal elemental call processing for calls with +- // ieee_usual, ieee_all, or user-specified array arguments, this switch +- // could be extended to support that. +- +- // Fortran and fenv.h values differ. +- switch (except) { +- case _FORTRAN_RUNTIME_IEEE_INVALID: +- return FE_INVALID; +- case _FORTRAN_RUNTIME_IEEE_DENORM: +- if (__FE_DENORM) { +- return __FE_DENORM; +- } +- break; +- case _FORTRAN_RUNTIME_IEEE_DIVIDE_BY_ZERO: +- return FE_DIVBYZERO; +- case _FORTRAN_RUNTIME_IEEE_OVERFLOW: +- return FE_OVERFLOW; +- case _FORTRAN_RUNTIME_IEEE_UNDERFLOW: +- return FE_UNDERFLOW; +- case _FORTRAN_RUNTIME_IEEE_INEXACT: +- return FE_INEXACT; +- } +- +- terminator.Crash("Invalid exception set: %d", except); ++ return map[excepts]; + } + + // Verify that the size of ieee_modes_type and ieee_status_type objects from +diff --git a/flang/test/Evaluate/fold-nearest.f90 b/flang/test/Evaluate/fold-nearest.f90 +index a7366e6d7540..41853a699d8e 100644 +--- a/flang/test/Evaluate/fold-nearest.f90 ++++ b/flang/test/Evaluate/fold-nearest.f90 +@@ -39,6 +39,7 @@ end module + module m2 + use ieee_arithmetic, only: ieee_next_after + real, parameter :: minSubnormal = 1.e-45 ++ real, parameter :: h = huge(0.0) + logical, parameter :: test_0 = ieee_next_after(0., 0.) == 0. + logical, parameter :: test_1 = ieee_next_after(0., 1.) == minSubnormal + logical, parameter :: test_2 = ieee_next_after(minSubnormal, -1.) == 0 +@@ -47,9 +48,9 @@ module m2 + !WARN: warning: division by zero + real, parameter :: inf = 1. / 0. + logical, parameter :: test_5 = ieee_next_after(inf, inf) == inf +- logical, parameter :: test_6 = ieee_next_after(inf, -inf) == inf +- logical, parameter :: test_7 = ieee_next_after(-inf, inf) == -inf +- logical, parameter :: test_8 = ieee_next_after(-inf, -1.) == -inf ++ logical, parameter :: test_6 = ieee_next_after(inf, -inf) == h ++ logical, parameter :: test_7 = ieee_next_after(-inf, inf) == -h ++ logical, parameter :: test_8 = ieee_next_after(-inf, -1.) == -h + logical, parameter :: test_9 = ieee_next_after(1.9999999, 3.) == 2. + logical, parameter :: test_10 = ieee_next_after(2., 1.) == 1.9999999 + #if __x86_64__ +@@ -69,6 +70,7 @@ end module + module m3 + use ieee_arithmetic, only: ieee_next_up, ieee_next_down + real(kind(0.d0)), parameter :: minSubnormal = 5.d-324 ++ real(kind(0.d0)), parameter :: h = huge(0.d0) + logical, parameter :: test_1 = ieee_next_up(0.d0) == minSubnormal + logical, parameter :: test_2 = ieee_next_down(0.d0) == -minSubnormal + logical, parameter :: test_3 = ieee_next_up(1.d0) == 1.0000000000000002d0 +@@ -81,10 +83,8 @@ module m3 + logical, parameter :: test_6 = ieee_next_down(-huge(0.d0)) == -inf + !WARN: warning: IEEE_NEXT_UP intrinsic folding: bad argument + logical, parameter :: test_7 = ieee_next_up(inf) == inf +- !WARN: warning: IEEE_NEXT_DOWN intrinsic folding: bad argument +- logical, parameter :: test_8 = ieee_next_down(inf) == inf +- !WARN: warning: IEEE_NEXT_UP intrinsic folding: bad argument +- logical, parameter :: test_9 = ieee_next_up(-inf) == -inf ++ logical, parameter :: test_8 = ieee_next_down(inf) == h ++ logical, parameter :: test_9 = ieee_next_up(-inf) == -h + !WARN: warning: IEEE_NEXT_DOWN intrinsic folding: bad argument + logical, parameter :: test_10 = ieee_next_down(-inf) == -inf + logical, parameter :: test_11 = ieee_next_up(1.9999999999999997d0) == 2.d0 +diff --git a/flang/test/Lower/Intrinsics/ieee_next.f90 b/flang/test/Lower/Intrinsics/ieee_next.f90 +new file mode 100644 +index 000000000000..fa9692b83bc8 +--- /dev/null ++++ b/flang/test/Lower/Intrinsics/ieee_next.f90 +@@ -0,0 +1,284 @@ ++! RUN: bbc -emit-fir -o - %s | FileCheck %s ++ ++! CHECK-LABEL: c.func @_QQmain ++program p ++ use ieee_arithmetic, only: ieee_value, ieee_negative_inf, ieee_positive_inf ++ use ieee_arithmetic, only: ieee_next_after, ieee_next_down, ieee_next_up ++ implicit none ++ ! CHECK-DAG: %[[V_4:[0-9]+]] = fir.alloca f80 {bindc_name = "r10", uniq_name = "_QFEr10"} ++ ! CHECK-DAG: %[[V_5:[0-9]+]] = fir.declare %[[V_4]] {uniq_name = "_QFEr10"} : (!fir.ref) -> !fir.ref ++ ! CHECK-DAG: %[[V_6:[0-9]+]] = fir.alloca f128 {bindc_name = "r16", uniq_name = "_QFEr16"} ++ ! CHECK-DAG: %[[V_7:[0-9]+]] = fir.declare %[[V_6]] {uniq_name = "_QFEr16"} : (!fir.ref) -> !fir.ref ++ ! CHECK-DAG: %[[V_8:[0-9]+]] = fir.alloca f16 {bindc_name = "r2", uniq_name = "_QFEr2"} ++ ! CHECK-DAG: %[[V_9:[0-9]+]] = fir.declare %[[V_8]] {uniq_name = "_QFEr2"} : (!fir.ref) -> !fir.ref ++ ! CHECK-DAG: %[[V_10:[0-9]+]] = fir.alloca bf16 {bindc_name = "r3", uniq_name = "_QFEr3"} ++ ! CHECK-DAG: %[[V_11:[0-9]+]] = fir.declare %[[V_10]] {uniq_name = "_QFEr3"} : (!fir.ref) -> !fir.ref ++ ! CHECK-DAG: %[[V_12:[0-9]+]] = fir.alloca f32 {bindc_name = "r4", uniq_name = "_QFEr4"} ++ ! CHECK-DAG: %[[V_13:[0-9]+]] = fir.declare %[[V_12]] {uniq_name = "_QFEr4"} : (!fir.ref) -> !fir.ref ++ ! CHECK-DAG: %[[V_14:[0-9]+]] = fir.alloca f64 {bindc_name = "r8", uniq_name = "_QFEr8"} ++ ! CHECK-DAG: %[[V_15:[0-9]+]] = fir.declare %[[V_14]] {uniq_name = "_QFEr8"} : (!fir.ref) -> !fir.ref ++ ! CHECK-DAG: %[[V_16:[0-9]+]] = fir.address_of(@_QFEx10) : !fir.ref ++ ! CHECK-DAG: %[[V_17:[0-9]+]] = fir.declare %[[V_16]] {uniq_name = "_QFEx10"} : (!fir.ref) -> !fir.ref ++ ! CHECK-DAG: %[[V_18:[0-9]+]] = fir.alloca f128 {bindc_name = "x16", uniq_name = "_QFEx16"} ++ ! CHECK-DAG: %[[V_19:[0-9]+]] = fir.declare %[[V_18]] {uniq_name = "_QFEx16"} : (!fir.ref) -> !fir.ref ++ ! CHECK-DAG: %[[V_20:[0-9]+]] = fir.alloca f16 {bindc_name = "x2", uniq_name = "_QFEx2"} ++ ! CHECK-DAG: %[[V_21:[0-9]+]] = fir.declare %[[V_20]] {uniq_name = "_QFEx2"} : (!fir.ref) -> !fir.ref ++ ! CHECK-DAG: %[[V_22:[0-9]+]] = fir.address_of(@_QFEx3) : !fir.ref ++ ! CHECK-DAG: %[[V_23:[0-9]+]] = fir.declare %[[V_22]] {uniq_name = "_QFEx3"} : (!fir.ref) -> !fir.ref ++ ! CHECK-DAG: %[[V_24:[0-9]+]] = fir.address_of(@_QFEx4) : !fir.ref ++ ! CHECK-DAG: %[[V_25:[0-9]+]] = fir.declare %[[V_24]] {uniq_name = "_QFEx4"} : (!fir.ref) -> !fir.ref ++ ! CHECK-DAG: %[[V_26:[0-9]+]] = fir.address_of(@_QFEx8) : !fir.ref ++ ! CHECK-DAG: %[[V_27:[0-9]+]] = fir.declare %[[V_26]] {uniq_name = "_QFEx8"} : (!fir.ref) -> !fir.ref ++ real(2) :: r2, x2 ++ real(3) :: r3, x3 = -huge(x3) ++ real(4) :: r4, x4 = -0. ++ real(8) :: r8, x8 = 0. ++ real(10) :: r10, x10 = huge(x10) ++ real(16) :: r16, x16 ++ ++ x2 = ieee_value(x2, ieee_negative_inf) ++ x16 = ieee_value(x2, ieee_positive_inf) ++ ++ ! CHECK: %[[V_45:[0-9]+]] = fir.load %[[V_21]] : !fir.ref ++ ! CHECK: %[[V_46:[0-9]+]] = fir.load %[[V_17]] : !fir.ref ++ ! CHECK-DAG: %[[V_47:[0-9]+]] = fir.coordinate_of %{{.*}}, %c2{{.*}} : (!fir.ref>, i8) -> !fir.ref ++ ! CHECK-DAG: %[[V_48:[0-9]+]] = fir.load %[[V_47]] : !fir.ref ++ ! CHECK-DAG: %[[V_49:[0-9]+]] = arith.bitcast %[[V_48]] : i16 to f16 ++ ! CHECK-DAG: %[[V_50:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_46]]) <{bit = 3 : i32}> : (f80) -> i1 ++ ! CHECK: %[[V_51:[0-9]+]] = arith.select %[[V_50]], %[[V_49]], %[[V_45]] : f16 ++ ! CHECK: %[[V_52:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_51]]) <{bit = 3 : i32}> : (f16) -> i1 ++ ! CHECK: %[[V_53:[0-9]+]] = fir.convert %[[V_51]] : (f16) -> f80 ++ ! CHECK: %[[V_54:[0-9]+]] = arith.cmpf oeq, %[[V_53]], %[[V_46]] fastmath : f80 ++ ! CHECK: %[[V_55:[0-9]+]] = arith.ori %[[V_52]], %[[V_54]] : i1 ++ ! CHECK: %[[V_56:[0-9]+]] = arith.cmpf olt, %[[V_53]], %[[V_46]] fastmath : f80 ++ ! CHECK: %[[V_57:[0-9]+]] = arith.bitcast %[[V_45]] : f16 to i16 ++ ! CHECK: %[[V_58:[0-9]+]] = arith.shrui %[[V_57]], %c15{{.*}} : i16 ++ ! CHECK: %[[V_59:[0-9]+]] = fir.convert %[[V_58]] : (i16) -> i1 ++ ! CHECK: %[[V_60:[0-9]+]] = arith.cmpi ne, %[[V_56]], %[[V_59]] : i1 ++ ! CHECK: %[[V_61:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_51]]) <{bit = 516 : i32}> : (f16) -> i1 ++ ! CHECK: %[[V_62:[0-9]+]] = arith.andi %[[V_61]], %[[V_60]] : i1 ++ ! CHECK: %[[V_63:[0-9]+]] = arith.ori %[[V_55]], %[[V_62]] : i1 ++ ! CHECK: %[[V_64:[0-9]+]] = fir.if %[[V_63]] -> (f16) { ++ ! CHECK: fir.result %[[V_51]] : f16 ++ ! CHECK: } else { ++ ! CHECK: %[[V_202:[0-9]+]] = arith.cmpf oeq, %[[V_51]], %cst{{[_0-9]*}} fastmath : f16 ++ ! CHECK: %[[V_203:[0-9]+]] = fir.if %[[V_202]] -> (f16) { ++ ! CHECK: %[[V_204:[0-9]+]] = arith.select %[[V_56]], %cst{{[_0-9]*}}, %cst{{[_0-9]*}} : f16 ++ ! CHECK: %[[V_205:[0-9]+]] = fir.call @_FortranAMapException(%c48{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_205]]) fastmath : (i32) -> i32 ++ ! CHECK: fir.result %[[V_204]] : f16 ++ ! CHECK: } else { ++ ! CHECK: %[[V_204:[0-9]+]] = arith.bitcast %[[V_51]] : f16 to i16 ++ ! CHECK-DAG: %[[V_205:[0-9]+]] = arith.subi %[[V_204]], %c1{{.*}} : i16 ++ ! CHECK-DAG: %[[V_206:[0-9]+]] = arith.addi %[[V_204]], %c1{{.*}} : i16 ++ ! CHECK: %[[V_207:[0-9]+]] = arith.select %[[V_60]], %[[V_206]], %[[V_205]] : i16 ++ ! CHECK: %[[V_208:[0-9]+]] = arith.bitcast %[[V_207]] : i16 to f16 ++ ! CHECK: %[[V_209:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_208]]) <{bit = 516 : i32}> : (f16) -> i1 ++ ! CHECK: fir.if %[[V_209]] { ++ ! CHECK: %[[V_211:[0-9]+]] = fir.call @_FortranAMapException(%c40{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_211]]) fastmath : (i32) -> i32 ++ ! CHECK: } ++ ! CHECK: %[[V_210:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_208]]) <{bit = 144 : i32}> : (f16) -> i1 ++ ! CHECK: fir.if %[[V_210]] { ++ ! CHECK: %[[V_211:[0-9]+]] = fir.call @_FortranAMapException(%c48{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_211]]) fastmath : (i32) -> i32 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_208]] : f16 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_203]] : f16 ++ ! CHECK: } ++ ! CHECK: fir.store %[[V_64]] to %[[V_9]] : !fir.ref ++ r2 = ieee_next_after(x2, x10) ++ print "('after: ', z4.4, ' -> ', z4.4, ' = ', g0)", x2, r2, r2 ++ ++ ! CHECK: %[[V_81:[0-9]+]] = fir.load %[[V_23]] : !fir.ref ++ ! CHECK: %[[V_82:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_81]]) <{bit = 3 : i32}> : (bf16) -> i1 ++ ! CHECK: %[[V_83:[0-9]+]] = fir.convert %[[V_81]] : (bf16) -> f32 ++ ! CHECK: %[[V_84:[0-9]+]] = arith.bitcast %[[V_83]] : f32 to i32 ++ ! CHECK: %[[V_85:[0-9]+]] = arith.shrui %[[V_84]], %c31{{.*}} : i32 ++ ! CHECK: %[[V_86:[0-9]+]] = fir.convert %[[V_85]] : (i32) -> i1 ++ ! CHECK: %[[V_87:[0-9]+]] = arith.cmpi ne, %[[V_86]], %true{{[_0-9]*}} : i1 ++ ! CHECK: %[[V_88:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_81]]) <{bit = 516 : i32}> : (bf16) -> i1 ++ ! CHECK: %[[V_89:[0-9]+]] = arith.andi %[[V_88]], %[[V_87]] : i1 ++ ! CHECK: %[[V_90:[0-9]+]] = arith.ori %[[V_82]], %[[V_89]] : i1 ++ ! CHECK: %[[V_91:[0-9]+]] = fir.if %[[V_90]] -> (bf16) { ++ ! CHECK: %[[V_202:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_81]]) <{bit = 1 : i32}> : (bf16) -> i1 ++ ! CHECK: fir.if %[[V_202]] { ++ ! CHECK: %[[V_203:[0-9]+]] = fir.call @_FortranAMapException(%c1{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_203]]) fastmath : (i32) -> i32 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_81]] : bf16 ++ ! CHECK: } else { ++ ! CHECK: %[[V_202:[0-9]+]] = arith.cmpf oeq, %[[V_81]], %cst{{[_0-9]*}} fastmath : bf16 ++ ! CHECK: %[[V_203:[0-9]+]] = fir.if %[[V_202]] -> (bf16) { ++ ! CHECK: fir.result %cst{{[_0-9]*}} : bf16 ++ ! CHECK: } else { ++ ! CHECK: %[[V_204:[0-9]+]] = arith.bitcast %[[V_81]] : bf16 to i16 ++ ! CHECK-DAG: %[[V_205:[0-9]+]] = arith.subi %[[V_204]], %c1{{.*}} : i16 ++ ! CHECK-DAG: %[[V_206:[0-9]+]] = arith.addi %[[V_204]], %c1{{.*}} : i16 ++ ! CHECK: %[[V_207:[0-9]+]] = arith.select %[[V_87]], %[[V_206]], %[[V_205]] : i16 ++ ! CHECK: %[[V_208:[0-9]+]] = arith.bitcast %[[V_207]] : i16 to bf16 ++ ! CHECK: fir.result %[[V_208]] : bf16 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_203]] : bf16 ++ ! CHECK: } ++ ! CHECK: fir.store %[[V_91]] to %[[V_11]] : !fir.ref ++ r3 = ieee_next_up(x3) ++ print "('up: ', z4.4, ' -> ', z4.4, ' = ', g0)", x3, r3, r3 ++ ++ ! CHECK: %[[V_104:[0-9]+]] = fir.load %[[V_25]] : !fir.ref ++ ! CHECK: %[[V_105:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_104]]) <{bit = 3 : i32}> : (f32) -> i1 ++ ! CHECK: %[[V_106:[0-9]+]] = arith.bitcast %[[V_104]] : f32 to i32 ++ ! CHECK: %[[V_107:[0-9]+]] = arith.shrui %[[V_106]], %c31{{.*}} : i32 ++ ! CHECK: %[[V_108:[0-9]+]] = fir.convert %[[V_107]] : (i32) -> i1 ++ ! CHECK: %[[V_109:[0-9]+]] = arith.cmpi ne, %[[V_108]], %false{{[_0-9]*}} : i1 ++ ! CHECK: %[[V_110:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_104]]) <{bit = 516 : i32}> : (f32) -> i1 ++ ! CHECK: %[[V_111:[0-9]+]] = arith.andi %[[V_110]], %[[V_109]] : i1 ++ ! CHECK: %[[V_112:[0-9]+]] = arith.ori %[[V_105]], %[[V_111]] : i1 ++ ! CHECK: %[[V_113:[0-9]+]] = fir.if %[[V_112]] -> (f32) { ++ ! CHECK: %[[V_202:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_104]]) <{bit = 1 : i32}> : (f32) -> i1 ++ ! CHECK: fir.if %[[V_202]] { ++ ! CHECK: %[[V_203:[0-9]+]] = fir.call @_FortranAMapException(%c1{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_203]]) fastmath : (i32) -> i32 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_104]] : f32 ++ ! CHECK: } else { ++ ! CHECK: %[[V_202:[0-9]+]] = arith.cmpf oeq, %[[V_104]], %cst{{[_0-9]*}} fastmath : f32 ++ ! CHECK: %[[V_203:[0-9]+]] = fir.if %[[V_202]] -> (f32) { ++ ! CHECK: fir.result %cst{{[_0-9]*}} : f32 ++ ! CHECK: } else { ++ ! CHECK-DAG: %[[V_204:[0-9]+]] = arith.subi %[[V_106]], %c1{{.*}} : i32 ++ ! CHECK-DAG: %[[V_205:[0-9]+]] = arith.addi %[[V_106]], %c1{{.*}} : i32 ++ ! CHECK: %[[V_206:[0-9]+]] = arith.select %[[V_109]], %[[V_205]], %[[V_204]] : i32 ++ ! CHECK: %[[V_207:[0-9]+]] = arith.bitcast %[[V_206]] : i32 to f32 ++ ! CHECK: fir.result %[[V_207]] : f32 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_203]] : f32 ++ ! CHECK: } ++ ! CHECK: fir.store %[[V_113]] to %[[V_13]] : !fir.ref ++ r4 = ieee_next_down(x4) ++ print "('down: ', z8.8, ' -> ', z8.8, ' = ', g0)", x4, r4, r4 ++ ++ ! CHECK: %[[V_125:[0-9]+]] = fir.load %[[V_27]] : !fir.ref ++ ! CHECK: %[[V_126:[0-9]+]] = fir.load %[[V_21]] : !fir.ref ++ ! CHECK-DAG: %[[V_127:[0-9]+]] = fir.address_of(@_FortranAIeeeValueTable_8) : !fir.ref> ++ ! CHECK-DAG: %[[V_128:[0-9]+]] = fir.coordinate_of %[[V_127]], %c2{{.*}} : (!fir.ref>, i8) -> !fir.ref ++ ! CHECK-DAG: %[[V_129:[0-9]+]] = fir.load %[[V_128]] : !fir.ref ++ ! CHECK-DAG: %[[V_130:[0-9]+]] = arith.bitcast %[[V_129]] : i64 to f64 ++ ! CHECK-DAG: %[[V_131:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_126]]) <{bit = 3 : i32}> : (f16) -> i1 ++ ! CHECK: %[[V_132:[0-9]+]] = arith.select %[[V_131]], %[[V_130]], %[[V_125]] : f64 ++ ! CHECK: %[[V_133:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_132]]) <{bit = 3 : i32}> : (f64) -> i1 ++ ! CHECK: %[[V_134:[0-9]+]] = fir.convert %[[V_126]] : (f16) -> f64 ++ ! CHECK: %[[V_135:[0-9]+]] = arith.cmpf oeq, %[[V_132]], %[[V_134]] fastmath : f64 ++ ! CHECK: %[[V_136:[0-9]+]] = arith.ori %[[V_133]], %[[V_135]] : i1 ++ ! CHECK: %[[V_137:[0-9]+]] = arith.cmpf olt, %[[V_132]], %[[V_134]] fastmath : f64 ++ ! CHECK: %[[V_138:[0-9]+]] = arith.bitcast %[[V_125]] : f64 to i64 ++ ! CHECK: %[[V_139:[0-9]+]] = arith.shrui %[[V_138]], %c63{{.*}} : i64 ++ ! CHECK: %[[V_140:[0-9]+]] = fir.convert %[[V_139]] : (i64) -> i1 ++ ! CHECK: %[[V_141:[0-9]+]] = arith.cmpi ne, %[[V_137]], %[[V_140]] : i1 ++ ! CHECK: %[[V_142:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_132]]) <{bit = 516 : i32}> : (f64) -> i1 ++ ! CHECK: %[[V_143:[0-9]+]] = arith.andi %[[V_142]], %[[V_141]] : i1 ++ ! CHECK: %[[V_144:[0-9]+]] = arith.ori %[[V_136]], %[[V_143]] : i1 ++ ! CHECK: %[[V_145:[0-9]+]] = fir.if %[[V_144]] -> (f64) { ++ ! CHECK: fir.result %[[V_132]] : f64 ++ ! CHECK: } else { ++ ! CHECK: %[[V_202:[0-9]+]] = arith.cmpf oeq, %[[V_132]], %cst{{[_0-9]*}} fastmath : f64 ++ ! CHECK: %[[V_203:[0-9]+]] = fir.if %[[V_202]] -> (f64) { ++ ! CHECK: %[[V_204:[0-9]+]] = arith.select %[[V_137]], %cst{{[_0-9]*}}, %cst{{[_0-9]*}} : f64 ++ ! CHECK: %[[V_205:[0-9]+]] = fir.call @_FortranAMapException(%c48{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_205]]) fastmath : (i32) -> i32 ++ ! CHECK: fir.result %[[V_204]] : f64 ++ ! CHECK: } else { ++ ! CHECK: %[[V_204:[0-9]+]] = arith.bitcast %[[V_132]] : f64 to i64 ++ ! CHECK-DAG: %[[V_205:[0-9]+]] = arith.subi %[[V_204]], %c1{{.*}} : i64 ++ ! CHECK-DAG: %[[V_206:[0-9]+]] = arith.addi %[[V_204]], %c1{{.*}} : i64 ++ ! CHECK: %[[V_207:[0-9]+]] = arith.select %[[V_141]], %[[V_206]], %[[V_205]] : i64 ++ ! CHECK: %[[V_208:[0-9]+]] = arith.bitcast %[[V_207]] : i64 to f64 ++ ! CHECK: %[[V_209:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_208]]) <{bit = 516 : i32}> : (f64) -> i1 ++ ! CHECK: fir.if %[[V_209]] { ++ ! CHECK: %[[V_211:[0-9]+]] = fir.call @_FortranAMapException(%c40{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_211]]) fastmath : (i32) -> i32 ++ ! CHECK: } ++ ! CHECK: %[[V_210:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_208]]) <{bit = 144 : i32}> : (f64) -> i1 ++ ! CHECK: fir.if %[[V_210]] { ++ ! CHECK: %[[V_211:[0-9]+]] = fir.call @_FortranAMapException(%c48{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_211]]) fastmath : (i32) -> i32 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_208]] : f64 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_203]] : f64 ++ ! CHECK: } ++ ! CHECK: fir.store %[[V_145]] to %[[V_15]] : !fir.ref ++ r8 = ieee_next_after(x8, x2) ++ print "('after: ', z16.16, ' -> ', z16.16, ' = ', g0)", x8, r8, r8 ++ ++ ! CHECK: %[[V_158:[0-9]+]] = fir.load %[[V_17]] : !fir.ref ++ ! CHECK: %[[V_159:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_158]]) <{bit = 3 : i32}> : (f80) -> i1 ++ ! CHECK: %[[V_160:[0-9]+]] = arith.bitcast %[[V_158]] : f80 to i80 ++ ! CHECK: %[[V_161:[0-9]+]] = arith.shrui %[[V_160]], %c79{{.*}} : i80 ++ ! CHECK: %[[V_162:[0-9]+]] = fir.convert %[[V_161]] : (i80) -> i1 ++ ! CHECK: %[[V_163:[0-9]+]] = arith.cmpi ne, %[[V_162]], %true{{[_0-9]*}} : i1 ++ ! CHECK: %[[V_164:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_158]]) <{bit = 516 : i32}> : (f80) -> i1 ++ ! CHECK: %[[V_165:[0-9]+]] = arith.andi %[[V_164]], %[[V_163]] : i1 ++ ! CHECK: %[[V_166:[0-9]+]] = arith.ori %[[V_159]], %[[V_165]] : i1 ++ ! CHECK: %[[V_167:[0-9]+]] = fir.if %[[V_166]] -> (f80) { ++ ! CHECK: %[[V_202:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_158]]) <{bit = 1 : i32}> : (f80) -> i1 ++ ! CHECK: fir.if %[[V_202]] { ++ ! CHECK: %[[V_203:[0-9]+]] = fir.call @_FortranAMapException(%c1{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_203]]) fastmath : (i32) -> i32 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_158]] : f80 ++ ! CHECK: } else { ++ ! CHECK: %[[V_202:[0-9]+]] = arith.cmpf oeq, %[[V_158]], %cst{{[_0-9]*}} fastmath : f80 ++ ! CHECK: %[[V_203:[0-9]+]] = fir.if %[[V_202]] -> (f80) { ++ ! CHECK: fir.result %cst{{[_0-9]*}} : f80 ++ ! CHECK: } else { ++ ! CHECK: %[[V_204:[0-9]+]] = fir.call @_FortranAMapException(%c63{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: %[[V_205:[0-9]+]] = fir.call @fetestexcept(%[[V_204]]) fastmath : (i32) -> i32 ++ ! CHECK: %[[V_206:[0-9]+]] = fir.call @fedisableexcept(%[[V_204]]) fastmath : (i32) -> i32 ++ ! CHECK: %[[V_207:[0-9]+]] = fir.call @_FortranANearest10(%[[V_158]], %true{{[_0-9]*}}) fastmath : (f80, i1) -> f80 ++ ! CHECK: %[[V_208:[0-9]+]] = fir.call @feclearexcept(%[[V_204]]) fastmath : (i32) -> i32 ++ ! CHECK: %[[V_209:[0-9]+]] = fir.call @feraiseexcept(%[[V_205]]) fastmath : (i32) -> i32 ++ ! CHECK: %[[V_210:[0-9]+]] = fir.call @feenableexcept(%[[V_206]]) fastmath : (i32) -> i32 ++ ! CHECK: fir.result %[[V_207]] : f80 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_203]] : f80 ++ ! CHECK: } ++ ! CHECK: fir.store %[[V_167]] to %[[V_5]] : !fir.ref ++ r10 = ieee_next_up(x10) ++ print "('up: ', z20.20, ' -> ', z20.20, ' = ', g0)", x10, r10, r10 ++ ++ ! CHECK: %[[V_180:[0-9]+]] = fir.load %[[V_19]] : !fir.ref ++ ! CHECK: %[[V_181:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_180]]) <{bit = 3 : i32}> : (f128) -> i1 ++ ! CHECK: %[[V_182:[0-9]+]] = arith.bitcast %[[V_180]] : f128 to i128 ++ ! CHECK: %[[V_183:[0-9]+]] = arith.shrui %[[V_182]], %c127{{.*}} : i128 ++ ! CHECK: %[[V_184:[0-9]+]] = fir.convert %[[V_183]] : (i128) -> i1 ++ ! CHECK: %[[V_185:[0-9]+]] = arith.cmpi ne, %[[V_184]], %false{{[_0-9]*}} : i1 ++ ! CHECK: %[[V_186:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_180]]) <{bit = 516 : i32}> : (f128) -> i1 ++ ! CHECK: %[[V_187:[0-9]+]] = arith.andi %[[V_186]], %[[V_185]] : i1 ++ ! CHECK: %[[V_188:[0-9]+]] = arith.ori %[[V_181]], %[[V_187]] : i1 ++ ! CHECK: %[[V_189:[0-9]+]] = fir.if %[[V_188]] -> (f128) { ++ ! CHECK: %[[V_202:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_180]]) <{bit = 1 : i32}> : (f128) -> i1 ++ ! CHECK: fir.if %[[V_202]] { ++ ! CHECK: %[[V_203:[0-9]+]] = fir.call @_FortranAMapException(%c1{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_203]]) fastmath : (i32) -> i32 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_180]] : f128 ++ ! CHECK: } else { ++ ! CHECK: %[[V_202:[0-9]+]] = arith.cmpf oeq, %[[V_180]], %cst{{[_0-9]*}} fastmath : f128 ++ ! CHECK: %[[V_203:[0-9]+]] = fir.if %[[V_202]] -> (f128) { ++ ! CHECK: fir.result %cst{{[_0-9]*}} : f128 ++ ! CHECK: } else { ++ ! CHECK-DAG: %[[V_204:[0-9]+]] = arith.subi %[[V_182]], %c1{{.*}} : i128 ++ ! CHECK-DAG: %[[V_205:[0-9]+]] = arith.addi %[[V_182]], %c1{{.*}} : i128 ++ ! CHECK: %[[V_206:[0-9]+]] = arith.select %[[V_185]], %[[V_205]], %[[V_204]] : i128 ++ ! CHECK: %[[V_207:[0-9]+]] = arith.bitcast %[[V_206]] : i128 to f128 ++ ! CHECK: fir.result %[[V_207]] : f128 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_203]] : f128 ++ ! CHECK: } ++ ! CHECK: fir.store %[[V_189]] to %[[V_7]] : !fir.ref ++ ++ r16 = ieee_next_down(x16) ++ print "('down: ', z32.32, ' -> ', z32.32, ' = ', g0)", x16, r16, r16 ++end +diff --git a/flang/test/Lower/Intrinsics/nearest.f90 b/flang/test/Lower/Intrinsics/nearest.f90 +index a023fa8cd804..5920d299d5fd 100644 +--- a/flang/test/Lower/Intrinsics/nearest.f90 ++++ b/flang/test/Lower/Intrinsics/nearest.f90 +@@ -1,72 +1,407 @@ +-! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s ++! RUN: bbc -emit-fir %s -o - | FileCheck %s + +-! CHECK-LABEL: nearest_test1 ++! CHECK-LABEL: c.func @_QPnearest_test1 ++ ! CHECK: %[[V_0:[0-9]+]] = fir.dummy_scope : !fir.dscope ++ ! CHECK: %[[V_1:[0-9]+]] = fir.alloca f16 {bindc_name = "res", uniq_name = "_QFnearest_test1Eres"} ++ ! CHECK: %[[V_2:[0-9]+]] = fir.declare %[[V_1]] {uniq_name = "_QFnearest_test1Eres"} : (!fir.ref) -> !fir.ref ++ ! CHECK: %[[V_3:[0-9]+]] = fir.declare %arg1 dummy_scope %[[V_0]] {uniq_name = "_QFnearest_test1Es"} : (!fir.ref, !fir.dscope) -> !fir.ref ++ ! CHECK: %[[V_4:[0-9]+]] = fir.declare %arg0 dummy_scope %[[V_0]] {uniq_name = "_QFnearest_test1Ex"} : (!fir.ref, !fir.dscope) -> !fir.ref ++ ! CHECK: %[[V_5:[0-9]+]] = fir.load %[[V_4]] : !fir.ref ++ ! CHECK: %[[V_6:[0-9]+]] = fir.load %[[V_3]] : !fir.ref ++ ! CHECK: %[[V_7:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_5]]) <{bit = 3 : i32}> : (f16) -> i1 ++ ! CHECK: %[[V_8:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_6]]) <{bit = 96 : i32}> : (f16) -> i1 ++ ! CHECK: fir.if %[[V_8]] { ++ ! CHECK: fir.call @_FortranAReportFatalUserError ++ ! CHECK: } ++ ! CHECK: %[[V_9:[0-9]+]] = arith.bitcast %[[V_6]] : f16 to i16 ++ ! CHECK: %[[V_10:[0-9]+]] = arith.shrui %[[V_9]], %c15{{.*}} : i16 ++ ! CHECK: %[[V_11:[0-9]+]] = arith.cmpi ne, %[[V_10]], %c1{{.*}} : i16 ++ ! CHECK: %[[V_12:[0-9]+]] = arith.bitcast %[[V_5]] : f16 to i16 ++ ! CHECK: %[[V_13:[0-9]+]] = arith.shrui %[[V_12]], %c15{{.*}} : i16 ++ ! CHECK: %[[V_14:[0-9]+]] = fir.convert %[[V_13]] : (i16) -> i1 ++ ! CHECK: %[[V_15:[0-9]+]] = arith.cmpi ne, %[[V_11]], %[[V_14]] : i1 ++ ! CHECK: %[[V_16:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_5]]) <{bit = 516 : i32}> : (f16) -> i1 ++ ! CHECK: %[[V_17:[0-9]+]] = arith.andi %[[V_16]], %[[V_15]] : i1 ++ ! CHECK: %[[V_18:[0-9]+]] = arith.ori %[[V_7]], %[[V_17]] : i1 ++ ! CHECK: %[[V_19:[0-9]+]] = fir.if %[[V_18]] -> (f16) { ++ ! CHECK: fir.result %[[V_5]] : f16 ++ ! CHECK: } else { ++ ! CHECK: %[[V_20:[0-9]+]] = arith.cmpf oeq, %[[V_5]], %cst{{[_0-9]*}} fastmath : f16 ++ ! CHECK: %[[V_21:[0-9]+]] = fir.if %[[V_20]] -> (f16) { ++ ! CHECK: %[[V_22:[0-9]+]] = arith.select %[[V_11]], %cst{{[_0-9]*}}, %cst{{[_0-9]*}} : f16 ++ ! CHECK: %[[V_23:[0-9]+]] = fir.call @_FortranAMapException(%c48{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_23]]) fastmath : (i32) -> i32 ++ ! CHECK: fir.result %[[V_22]] : f16 ++ ! CHECK: } else { ++ ! CHECK-DAG: %[[V_22:[0-9]+]] = arith.subi %[[V_12]], %c1{{.*}} : i16 ++ ! CHECK-DAG: %[[V_23:[0-9]+]] = arith.addi %[[V_12]], %c1{{.*}} : i16 ++ ! CHECK: %[[V_24:[0-9]+]] = arith.select %[[V_15]], %[[V_23]], %[[V_22]] : i16 ++ ! CHECK: %[[V_25:[0-9]+]] = arith.bitcast %[[V_24]] : i16 to f16 ++ ! CHECK: %[[V_26:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_25]]) <{bit = 516 : i32}> : (f16) -> i1 ++ ! CHECK: fir.if %[[V_26]] { ++ ! CHECK: %[[V_28:[0-9]+]] = fir.call @_FortranAMapException(%c40{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_28]]) fastmath : (i32) -> i32 ++ ! CHECK: } ++ ! CHECK: %[[V_27:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_25]]) <{bit = 144 : i32}> : (f16) -> i1 ++ ! CHECK: fir.if %[[V_27]] { ++ ! CHECK: %[[V_28:[0-9]+]] = fir.call @_FortranAMapException(%c48{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_28]]) fastmath : (i32) -> i32 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_25]] : f16 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_21]] : f16 ++ ! CHECK: } ++ ! CHECK: fir.store %[[V_19]] to %[[V_2]] : !fir.ref ++ ! CHECK: return ++ ! CHECK: } + subroutine nearest_test1(x, s) +- real :: x, s, res +- ! CHECK: %[[res:.*]] = fir.alloca f32 {bindc_name = "res", uniq_name = "_QFnearest_test1Eres"} +- ! CHECK: %[[x:.*]] = fir.load %arg0 : !fir.ref +- ! CHECK: %[[s:.*]] = fir.load %arg1 : !fir.ref +- ! CHECK: %[[zero:.*]] = arith.constant 0.000000e+00 : f32 +- ! CHECK: %[[cmp:.*]] = arith.cmpf ogt, %[[s]], %[[zero]] {{.*}} : f32 +- ! CHECK: %[[pos:.*]] = arith.select %[[cmp]], %true, %false : i1 +- res = nearest(x, s) +- ! CHECK: %[[tmp:.*]] = fir.call @_FortranANearest4(%[[x]], %[[pos]]) {{.*}}: (f32, i1) -> f32 +- ! CHECK: fir.store %[[tmp]] to %[[res]] : !fir.ref +- end subroutine nearest_test1 +- +- ! CHECK-LABEL: nearest_test2 +- subroutine nearest_test2(x, s) +- real(kind=8) :: x, s, res +- ! CHECK: %[[res:.*]] = fir.alloca f64 {bindc_name = "res", uniq_name = "_QFnearest_test2Eres"} +- ! CHECK: %[[x:.*]] = fir.load %arg0 : !fir.ref +- ! CHECK: %[[s:.*]] = fir.load %arg1 : !fir.ref +- ! CHECK: %[[zero:.*]] = arith.constant 0.000000e+00 : f64 +- ! CHECK: %[[cmp:.*]] = arith.cmpf ogt, %[[s]], %[[zero]] {{.*}} : f64 +- ! CHECK: %[[pos:.*]] = arith.select %[[cmp]], %true, %false : i1 +- res = nearest(x, s) +- ! CHECK: %[[tmp:.*]] = fir.call @_FortranANearest8(%[[x]], %[[pos]]) {{.*}}: (f64, i1) -> f64 +- ! CHECK: fir.store %[[tmp]] to %[[res]] : !fir.ref +- end subroutine nearest_test2 +- +- ! CHECK-LABEL: nearest_test3 +- subroutine nearest_test3(x, s) +- real(kind=10) :: x, s, res +- ! CHECK: %[[res:.*]] = fir.alloca f80 {bindc_name = "res", uniq_name = "_QFnearest_test3Eres"} +- ! CHECK: %[[x:.*]] = fir.load %arg0 : !fir.ref +- ! CHECK: %[[s:.*]] = fir.load %arg1 : !fir.ref +- ! CHECK: %[[zero:.*]] = arith.constant 0.000000e+00 : f80 +- ! CHECK: %[[cmp:.*]] = arith.cmpf ogt, %[[s]], %[[zero]] {{.*}} : f80 +- ! CHECK: %[[pos:.*]] = arith.select %[[cmp]], %true, %false : i1 +- res = nearest(x, s) +- ! CHECK: %[[tmp:.*]] = fir.call @_FortranANearest10(%[[x]], %[[pos]]) {{.*}}: (f80, i1) -> f80 +- ! CHECK: fir.store %[[tmp]] to %[[res]] : !fir.ref +- end subroutine nearest_test3 +- +- ! CHECK-LABEL: nearest_test4 +- subroutine nearest_test4(x, s) +- real(kind=16) :: x, s, res +- ! CHECK: %[[res:.*]] = fir.alloca f128 {bindc_name = "res", uniq_name = "_QFnearest_test4Eres"} +- ! CHECK: %[[x:.*]] = fir.load %arg0 : !fir.ref +- ! CHECK: %[[s:.*]] = fir.load %arg1 : !fir.ref +- ! CHECK: %[[zero:.*]] = arith.constant 0.000000e+00 : f128 +- ! CHECK: %[[cmp:.*]] = arith.cmpf ogt, %[[s]], %[[zero]] {{.*}} : f128 +- ! CHECK: %[[pos:.*]] = arith.select %[[cmp]], %true, %false : i1 +- res = nearest(x, s) +- ! CHECK: %[[tmp:.*]] = fir.call @_FortranANearest16(%[[x]], %[[pos]]) {{.*}}: (f128, i1) -> f128 +- ! CHECK: fir.store %[[tmp]] to %[[res]] : !fir.ref +- end subroutine nearest_test4 +- +- ! CHECK-LABEL: nearest_test5 +- subroutine nearest_test5(x, s) +- real(kind=16) :: x, res +- ! CHECK: %[[res:.*]] = fir.alloca f128 {bindc_name = "res", uniq_name = "_QFnearest_test5Eres"} +- ! CHECK: %[[x:.*]] = fir.load %arg0 : !fir.ref +- real :: s +- ! CHECK: %[[s:.*]] = fir.load %arg1 : !fir.ref +- ! CHECK: %[[zero:.*]] = arith.constant 0.000000e+00 : f32 +- ! CHECK: %[[cmp:.*]] = arith.cmpf ogt, %[[s]], %[[zero]] {{.*}} : f32 +- ! CHECK: %[[pos:.*]] = arith.select %[[cmp]], %true, %false : i1 +- res = nearest(x, s) +- ! CHECK: %[[tmp:.*]] = fir.call @_FortranANearest16(%[[x]], %[[pos]]) {{.*}}: (f128, i1) -> f128 +- ! CHECK: fir.store %[[tmp]] to %[[res]] : !fir.ref +- end subroutine nearest_test5 ++ real(kind=2) :: x, s, res ++ res = nearest(x, s) ++end ++ ++! CHECK-LABEL: c.func @_QPnearest_test2 ++ ! CHECK: %[[V_0:[0-9]+]] = fir.dummy_scope : !fir.dscope ++ ! CHECK: %[[V_1:[0-9]+]] = fir.alloca bf16 {bindc_name = "res", uniq_name = "_QFnearest_test2Eres"} ++ ! CHECK: %[[V_2:[0-9]+]] = fir.declare %[[V_1]] {uniq_name = "_QFnearest_test2Eres"} : (!fir.ref) -> !fir.ref ++ ! CHECK: %[[V_3:[0-9]+]] = fir.declare %arg1 dummy_scope %[[V_0]] {uniq_name = "_QFnearest_test2Es"} : (!fir.ref, !fir.dscope) -> !fir.ref ++ ! CHECK: %[[V_4:[0-9]+]] = fir.declare %arg0 dummy_scope %[[V_0]] {uniq_name = "_QFnearest_test2Ex"} : (!fir.ref, !fir.dscope) -> !fir.ref ++ ! CHECK: %[[V_5:[0-9]+]] = fir.load %[[V_4]] : !fir.ref ++ ! CHECK: %[[V_6:[0-9]+]] = fir.load %[[V_3]] : !fir.ref ++ ! CHECK: %[[V_7:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_5]]) <{bit = 3 : i32}> : (bf16) -> i1 ++ ! CHECK: %[[V_8:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_6]]) <{bit = 96 : i32}> : (bf16) -> i1 ++ ! CHECK: fir.if %[[V_8]] { ++ ! CHECK: fir.call @_FortranAReportFatalUserError ++ ! CHECK: } ++ ! CHECK: %[[V_9:[0-9]+]] = fir.convert %[[V_6]] : (bf16) -> f32 ++ ! CHECK: %[[V_10:[0-9]+]] = arith.bitcast %[[V_9]] : f32 to i32 ++ ! CHECK: %[[V_11:[0-9]+]] = arith.shrui %[[V_10]], %c31{{.*}} : i32 ++ ! CHECK: %[[V_12:[0-9]+]] = fir.convert %[[V_11]] : (i32) -> i16 ++ ! CHECK: %[[V_13:[0-9]+]] = arith.cmpi ne, %[[V_12]], %c1{{.*}} : i16 ++ ! CHECK: %[[V_14:[0-9]+]] = fir.convert %[[V_5]] : (bf16) -> f32 ++ ! CHECK: %[[V_15:[0-9]+]] = arith.bitcast %[[V_14]] : f32 to i32 ++ ! CHECK: %[[V_16:[0-9]+]] = arith.shrui %[[V_15]], %c31{{.*}} : i32 ++ ! CHECK: %[[V_17:[0-9]+]] = fir.convert %[[V_16]] : (i32) -> i1 ++ ! CHECK: %[[V_18:[0-9]+]] = arith.cmpi ne, %[[V_13]], %[[V_17]] : i1 ++ ! CHECK: %[[V_19:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_5]]) <{bit = 516 : i32}> : (bf16) -> i1 ++ ! CHECK: %[[V_20:[0-9]+]] = arith.andi %[[V_19]], %[[V_18]] : i1 ++ ! CHECK: %[[V_21:[0-9]+]] = arith.ori %[[V_7]], %[[V_20]] : i1 ++ ! CHECK: %[[V_22:[0-9]+]] = fir.if %[[V_21]] -> (bf16) { ++ ! CHECK: fir.result %[[V_5]] : bf16 ++ ! CHECK: } else { ++ ! CHECK: %[[V_23:[0-9]+]] = arith.cmpf oeq, %[[V_5]], %cst{{[_0-9]*}} fastmath : bf16 ++ ! CHECK: %[[V_24:[0-9]+]] = fir.if %[[V_23]] -> (bf16) { ++ ! CHECK: %[[V_25:[0-9]+]] = arith.select %[[V_13]], %cst{{[_0-9]*}}, %cst{{[_0-9]*}} : bf16 ++ ! CHECK: %[[V_26:[0-9]+]] = fir.call @_FortranAMapException(%c48{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_26]]) fastmath : (i32) -> i32 ++ ! CHECK: fir.result %[[V_25]] : bf16 ++ ! CHECK: } else { ++ ! CHECK: %[[V_25:[0-9]+]] = arith.bitcast %[[V_5]] : bf16 to i16 ++ ! CHECK-DAG: %[[V_26:[0-9]+]] = arith.subi %[[V_25]], %c1{{.*}} : i16 ++ ! CHECK-DAG: %[[V_27:[0-9]+]] = arith.addi %[[V_25]], %c1{{.*}} : i16 ++ ! CHECK: %[[V_28:[0-9]+]] = arith.select %[[V_18]], %[[V_27]], %[[V_26]] : i16 ++ ! CHECK: %[[V_29:[0-9]+]] = arith.bitcast %[[V_28]] : i16 to bf16 ++ ! CHECK: %[[V_30:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_29]]) <{bit = 516 : i32}> : (bf16) -> i1 ++ ! CHECK: fir.if %[[V_30]] { ++ ! CHECK: %[[V_32:[0-9]+]] = fir.call @_FortranAMapException(%c40{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_32]]) fastmath : (i32) -> i32 ++ ! CHECK: } ++ ! CHECK: %[[V_31:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_29]]) <{bit = 144 : i32}> : (bf16) -> i1 ++ ! CHECK: fir.if %[[V_31]] { ++ ! CHECK: %[[V_32:[0-9]+]] = fir.call @_FortranAMapException(%c48{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_32]]) fastmath : (i32) -> i32 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_29]] : bf16 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_24]] : bf16 ++ ! CHECK: } ++ ! CHECK: fir.store %[[V_22]] to %[[V_2]] : !fir.ref ++ ! CHECK: return ++ ! CHECK: } ++subroutine nearest_test2(x, s) ++ real(kind=3) :: x, s, res ++ res = nearest(x, s) ++end ++ ++! CHECK-LABEL: c.func @_QPnearest_test3 ++ ! CHECK: %[[V_0:[0-9]+]] = fir.dummy_scope : !fir.dscope ++ ! CHECK: %[[V_1:[0-9]+]] = fir.alloca f32 {bindc_name = "res", uniq_name = "_QFnearest_test3Eres"} ++ ! CHECK: %[[V_2:[0-9]+]] = fir.declare %[[V_1]] {uniq_name = "_QFnearest_test3Eres"} : (!fir.ref) -> !fir.ref ++ ! CHECK: %[[V_3:[0-9]+]] = fir.declare %arg1 dummy_scope %[[V_0]] {uniq_name = "_QFnearest_test3Es"} : (!fir.ref, !fir.dscope) -> !fir.ref ++ ! CHECK: %[[V_4:[0-9]+]] = fir.declare %arg0 dummy_scope %[[V_0]] {uniq_name = "_QFnearest_test3Ex"} : (!fir.ref, !fir.dscope) -> !fir.ref ++ ! CHECK: %[[V_5:[0-9]+]] = fir.load %[[V_4]] : !fir.ref ++ ! CHECK: %[[V_6:[0-9]+]] = fir.load %[[V_3]] : !fir.ref ++ ! CHECK: %[[V_7:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_5]]) <{bit = 3 : i32}> : (f32) -> i1 ++ ! CHECK: %[[V_8:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_6]]) <{bit = 96 : i32}> : (f32) -> i1 ++ ! CHECK: fir.if %[[V_8]] { ++ ! CHECK: fir.call @_FortranAReportFatalUserError ++ ! CHECK: } ++ ! CHECK: %[[V_9:[0-9]+]] = arith.bitcast %[[V_6]] : f32 to i32 ++ ! CHECK: %[[V_10:[0-9]+]] = arith.shrui %[[V_9]], %c31{{.*}} : i32 ++ ! CHECK: %[[V_11:[0-9]+]] = arith.cmpi ne, %[[V_10]], %c1{{.*}} : i32 ++ ! CHECK: %[[V_12:[0-9]+]] = arith.bitcast %[[V_5]] : f32 to i32 ++ ! CHECK: %[[V_13:[0-9]+]] = arith.shrui %[[V_12]], %c31{{.*}} : i32 ++ ! CHECK: %[[V_14:[0-9]+]] = fir.convert %[[V_13]] : (i32) -> i1 ++ ! CHECK: %[[V_15:[0-9]+]] = arith.cmpi ne, %[[V_11]], %[[V_14]] : i1 ++ ! CHECK: %[[V_16:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_5]]) <{bit = 516 : i32}> : (f32) -> i1 ++ ! CHECK: %[[V_17:[0-9]+]] = arith.andi %[[V_16]], %[[V_15]] : i1 ++ ! CHECK: %[[V_18:[0-9]+]] = arith.ori %[[V_7]], %[[V_17]] : i1 ++ ! CHECK: %[[V_19:[0-9]+]] = fir.if %[[V_18]] -> (f32) { ++ ! CHECK: fir.result %[[V_5]] : f32 ++ ! CHECK: } else { ++ ! CHECK: %[[V_20:[0-9]+]] = arith.cmpf oeq, %[[V_5]], %cst{{[_0-9]*}} fastmath : f32 ++ ! CHECK: %[[V_21:[0-9]+]] = fir.if %[[V_20]] -> (f32) { ++ ! CHECK: %[[V_22:[0-9]+]] = arith.select %[[V_11]], %cst{{[_0-9]*}}, %cst{{[_0-9]*}} : f32 ++ ! CHECK: %[[V_23:[0-9]+]] = fir.call @_FortranAMapException(%c48{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_23]]) fastmath : (i32) -> i32 ++ ! CHECK: fir.result %[[V_22]] : f32 ++ ! CHECK: } else { ++ ! CHECK-DAG: %[[V_22:[0-9]+]] = arith.subi %[[V_12]], %c1{{.*}} : i32 ++ ! CHECK-DAG: %[[V_23:[0-9]+]] = arith.addi %[[V_12]], %c1{{.*}} : i32 ++ ! CHECK: %[[V_24:[0-9]+]] = arith.select %[[V_15]], %[[V_23]], %[[V_22]] : i32 ++ ! CHECK: %[[V_25:[0-9]+]] = arith.bitcast %[[V_24]] : i32 to f32 ++ ! CHECK: %[[V_26:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_25]]) <{bit = 516 : i32}> : (f32) -> i1 ++ ! CHECK: fir.if %[[V_26]] { ++ ! CHECK: %[[V_28:[0-9]+]] = fir.call @_FortranAMapException(%c40{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_28]]) fastmath : (i32) -> i32 ++ ! CHECK: } ++ ! CHECK: %[[V_27:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_25]]) <{bit = 144 : i32}> : (f32) -> i1 ++ ! CHECK: fir.if %[[V_27]] { ++ ! CHECK: %[[V_28:[0-9]+]] = fir.call @_FortranAMapException(%c48{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_28]]) fastmath : (i32) -> i32 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_25]] : f32 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_21]] : f32 ++ ! CHECK: } ++ ! CHECK: fir.store %[[V_19]] to %[[V_2]] : !fir.ref ++ ! CHECK: return ++ ! CHECK: } ++subroutine nearest_test3(x, s) ++ real :: x, s, res ++ res = nearest(x, s) ++end ++ ++! CHECK-LABEL: c.func @_QPnearest_test4 ++ ! CHECK: %[[V_0:[0-9]+]] = fir.dummy_scope : !fir.dscope ++ ! CHECK: %[[V_1:[0-9]+]] = fir.alloca f64 {bindc_name = "res", uniq_name = "_QFnearest_test4Eres"} ++ ! CHECK: %[[V_2:[0-9]+]] = fir.declare %[[V_1]] {uniq_name = "_QFnearest_test4Eres"} : (!fir.ref) -> !fir.ref ++ ! CHECK: %[[V_3:[0-9]+]] = fir.declare %arg1 dummy_scope %[[V_0]] {uniq_name = "_QFnearest_test4Es"} : (!fir.ref, !fir.dscope) -> !fir.ref ++ ! CHECK: %[[V_4:[0-9]+]] = fir.declare %arg0 dummy_scope %[[V_0]] {uniq_name = "_QFnearest_test4Ex"} : (!fir.ref, !fir.dscope) -> !fir.ref ++ ! CHECK: %[[V_5:[0-9]+]] = fir.load %[[V_4]] : !fir.ref ++ ! CHECK: %[[V_6:[0-9]+]] = fir.load %[[V_3]] : !fir.ref ++ ! CHECK: %[[V_7:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_5]]) <{bit = 3 : i32}> : (f64) -> i1 ++ ! CHECK: %[[V_8:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_6]]) <{bit = 96 : i32}> : (f64) -> i1 ++ ! CHECK: fir.if %[[V_8]] { ++ ! CHECK: fir.call @_FortranAReportFatalUserError ++ ! CHECK: } ++ ! CHECK: %[[V_9:[0-9]+]] = arith.bitcast %[[V_6]] : f64 to i64 ++ ! CHECK: %[[V_10:[0-9]+]] = arith.shrui %[[V_9]], %c63{{.*}} : i64 ++ ! CHECK: %[[V_11:[0-9]+]] = arith.cmpi ne, %[[V_10]], %c1{{.*}} : i64 ++ ! CHECK: %[[V_12:[0-9]+]] = arith.bitcast %[[V_5]] : f64 to i64 ++ ! CHECK: %[[V_13:[0-9]+]] = arith.shrui %[[V_12]], %c63{{.*}} : i64 ++ ! CHECK: %[[V_14:[0-9]+]] = fir.convert %[[V_13]] : (i64) -> i1 ++ ! CHECK: %[[V_15:[0-9]+]] = arith.cmpi ne, %[[V_11]], %[[V_14]] : i1 ++ ! CHECK: %[[V_16:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_5]]) <{bit = 516 : i32}> : (f64) -> i1 ++ ! CHECK: %[[V_17:[0-9]+]] = arith.andi %[[V_16]], %[[V_15]] : i1 ++ ! CHECK: %[[V_18:[0-9]+]] = arith.ori %[[V_7]], %[[V_17]] : i1 ++ ! CHECK: %[[V_19:[0-9]+]] = fir.if %[[V_18]] -> (f64) { ++ ! CHECK: fir.result %[[V_5]] : f64 ++ ! CHECK: } else { ++ ! CHECK: %[[V_20:[0-9]+]] = arith.cmpf oeq, %[[V_5]], %cst{{[_0-9]*}} fastmath : f64 ++ ! CHECK: %[[V_21:[0-9]+]] = fir.if %[[V_20]] -> (f64) { ++ ! CHECK: %[[V_22:[0-9]+]] = arith.select %[[V_11]], %cst{{[_0-9]*}}, %cst{{[_0-9]*}} : f64 ++ ! CHECK: %[[V_23:[0-9]+]] = fir.call @_FortranAMapException(%c48{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_23]]) fastmath : (i32) -> i32 ++ ! CHECK: fir.result %[[V_22]] : f64 ++ ! CHECK: } else { ++ ! CHECK-DAG: %[[V_22:[0-9]+]] = arith.subi %[[V_12]], %c1{{.*}} : i64 ++ ! CHECK-DAG: %[[V_23:[0-9]+]] = arith.addi %[[V_12]], %c1{{.*}} : i64 ++ ! CHECK: %[[V_24:[0-9]+]] = arith.select %[[V_15]], %[[V_23]], %[[V_22]] : i64 ++ ! CHECK: %[[V_25:[0-9]+]] = arith.bitcast %[[V_24]] : i64 to f64 ++ ! CHECK: %[[V_26:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_25]]) <{bit = 516 : i32}> : (f64) -> i1 ++ ! CHECK: fir.if %[[V_26]] { ++ ! CHECK: %[[V_28:[0-9]+]] = fir.call @_FortranAMapException(%c40{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_28]]) fastmath : (i32) -> i32 ++ ! CHECK: } ++ ! CHECK: %[[V_27:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_25]]) <{bit = 144 : i32}> : (f64) -> i1 ++ ! CHECK: fir.if %[[V_27]] { ++ ! CHECK: %[[V_28:[0-9]+]] = fir.call @_FortranAMapException(%c48{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_28]]) fastmath : (i32) -> i32 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_25]] : f64 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_21]] : f64 ++ ! CHECK: } ++ ! CHECK: fir.store %[[V_19]] to %[[V_2]] : !fir.ref ++ ! CHECK: return ++ ! CHECK: } ++subroutine nearest_test4(x, s) ++ real(kind=8) :: x, s, res ++ res = nearest(x, s) ++end ++ ++! CHECK-LABEL: c.func @_QPnearest_test5 ++ ! CHECK: %[[V_0:[0-9]+]] = fir.dummy_scope : !fir.dscope ++ ! CHECK: %[[V_1:[0-9]+]] = fir.alloca f80 {bindc_name = "res", uniq_name = "_QFnearest_test5Eres"} ++ ! CHECK: %[[V_2:[0-9]+]] = fir.declare %[[V_1]] {uniq_name = "_QFnearest_test5Eres"} : (!fir.ref) -> !fir.ref ++ ! CHECK: %[[V_3:[0-9]+]] = fir.declare %arg1 dummy_scope %[[V_0]] {uniq_name = "_QFnearest_test5Es"} : (!fir.ref, !fir.dscope) -> !fir.ref ++ ! CHECK: %[[V_4:[0-9]+]] = fir.declare %arg0 dummy_scope %[[V_0]] {uniq_name = "_QFnearest_test5Ex"} : (!fir.ref, !fir.dscope) -> !fir.ref ++ ! CHECK: %[[V_5:[0-9]+]] = fir.load %[[V_4]] : !fir.ref ++ ! CHECK: %[[V_6:[0-9]+]] = fir.load %[[V_3]] : !fir.ref ++ ! CHECK: %[[V_7:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_5]]) <{bit = 3 : i32}> : (f80) -> i1 ++ ! CHECK: %[[V_8:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_6]]) <{bit = 96 : i32}> : (f80) -> i1 ++ ! CHECK: fir.if %[[V_8]] { ++ ! CHECK: fir.call @_FortranAReportFatalUserError ++ ! CHECK: } ++ ! CHECK: %[[V_9:[0-9]+]] = arith.bitcast %[[V_6]] : f80 to i80 ++ ! CHECK: %[[V_10:[0-9]+]] = arith.shrui %[[V_9]], %c79{{.*}} : i80 ++ ! CHECK: %[[V_11:[0-9]+]] = arith.cmpi ne, %[[V_10]], %c1{{.*}} : i80 ++ ! CHECK: %[[V_12:[0-9]+]] = arith.bitcast %[[V_5]] : f80 to i80 ++ ! CHECK: %[[V_13:[0-9]+]] = arith.shrui %[[V_12]], %c79{{.*}} : i80 ++ ! CHECK: %[[V_14:[0-9]+]] = fir.convert %[[V_13]] : (i80) -> i1 ++ ! CHECK: %[[V_15:[0-9]+]] = arith.cmpi ne, %[[V_11]], %[[V_14]] : i1 ++ ! CHECK: %[[V_16:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_5]]) <{bit = 516 : i32}> : (f80) -> i1 ++ ! CHECK: %[[V_17:[0-9]+]] = arith.andi %[[V_16]], %[[V_15]] : i1 ++ ! CHECK: %[[V_18:[0-9]+]] = arith.ori %[[V_7]], %[[V_17]] : i1 ++ ! CHECK: %[[V_19:[0-9]+]] = fir.if %[[V_18]] -> (f80) { ++ ! CHECK: fir.result %[[V_5]] : f80 ++ ! CHECK: } else { ++ ! CHECK: %[[V_20:[0-9]+]] = arith.cmpf oeq, %[[V_5]], %cst{{[_0-9]*}} fastmath : f80 ++ ! CHECK: %[[V_21:[0-9]+]] = fir.if %[[V_20]] -> (f80) { ++ ! CHECK: %[[V_22:[0-9]+]] = arith.select %[[V_11]], %cst{{[_0-9]*}}, %cst{{[_0-9]*}} : f80 ++ ! CHECK: %[[V_23:[0-9]+]] = fir.call @_FortranAMapException(%c48{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_23]]) fastmath : (i32) -> i32 ++ ! CHECK: fir.result %[[V_22]] : f80 ++ ! CHECK: } else { ++ ! CHECK: %[[V_22:[0-9]+]] = fir.call @_FortranANearest10(%[[V_5]], %[[V_11]]) fastmath : (f80, i1) -> f80 ++ ! CHECK: fir.result %[[V_22]] : f80 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_21]] : f80 ++ ! CHECK: } ++ ! CHECK: fir.store %[[V_19]] to %[[V_2]] : !fir.ref ++ ! CHECK: return ++ ! CHECK: } ++subroutine nearest_test5(x, s) ++ real(kind=10) :: x, s, res ++ res = nearest(x, s) ++end ++ ++! CHECK-LABEL: c.func @_QPnearest_test6 ++ ! CHECK: %[[V_0:[0-9]+]] = fir.dummy_scope : !fir.dscope ++ ! CHECK: %[[V_1:[0-9]+]] = fir.alloca f128 {bindc_name = "res", uniq_name = "_QFnearest_test6Eres"} ++ ! CHECK: %[[V_2:[0-9]+]] = fir.declare %[[V_1]] {uniq_name = "_QFnearest_test6Eres"} : (!fir.ref) -> !fir.ref ++ ! CHECK: %[[V_3:[0-9]+]] = fir.declare %arg1 dummy_scope %[[V_0]] {uniq_name = "_QFnearest_test6Es"} : (!fir.ref, !fir.dscope) -> !fir.ref ++ ! CHECK: %[[V_4:[0-9]+]] = fir.declare %arg0 dummy_scope %[[V_0]] {uniq_name = "_QFnearest_test6Ex"} : (!fir.ref, !fir.dscope) -> !fir.ref ++ ! CHECK: %[[V_5:[0-9]+]] = fir.load %[[V_4]] : !fir.ref ++ ! CHECK: %[[V_6:[0-9]+]] = fir.load %[[V_3]] : !fir.ref ++ ! CHECK: %[[V_7:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_5]]) <{bit = 3 : i32}> : (f128) -> i1 ++ ! CHECK: %[[V_8:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_6]]) <{bit = 96 : i32}> : (f128) -> i1 ++ ! CHECK: fir.if %[[V_8]] { ++ ! CHECK: fir.call @_FortranAReportFatalUserError ++ ! CHECK: } ++ ! CHECK: %[[V_9:[0-9]+]] = arith.bitcast %[[V_6]] : f128 to i128 ++ ! CHECK: %[[V_10:[0-9]+]] = arith.shrui %[[V_9]], %c127{{.*}} : i128 ++ ! CHECK: %[[V_11:[0-9]+]] = arith.cmpi ne, %[[V_10]], %c1{{.*}} : i128 ++ ! CHECK: %[[V_12:[0-9]+]] = arith.bitcast %[[V_5]] : f128 to i128 ++ ! CHECK: %[[V_13:[0-9]+]] = arith.shrui %[[V_12]], %c127{{.*}} : i128 ++ ! CHECK: %[[V_14:[0-9]+]] = fir.convert %[[V_13]] : (i128) -> i1 ++ ! CHECK: %[[V_15:[0-9]+]] = arith.cmpi ne, %[[V_11]], %[[V_14]] : i1 ++ ! CHECK: %[[V_16:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_5]]) <{bit = 516 : i32}> : (f128) -> i1 ++ ! CHECK: %[[V_17:[0-9]+]] = arith.andi %[[V_16]], %[[V_15]] : i1 ++ ! CHECK: %[[V_18:[0-9]+]] = arith.ori %[[V_7]], %[[V_17]] : i1 ++ ! CHECK: %[[V_19:[0-9]+]] = fir.if %[[V_18]] -> (f128) { ++ ! CHECK: fir.result %[[V_5]] : f128 ++ ! CHECK: } else { ++ ! CHECK: %[[V_20:[0-9]+]] = arith.cmpf oeq, %[[V_5]], %cst{{[_0-9]*}} fastmath : f128 ++ ! CHECK: %[[V_21:[0-9]+]] = fir.if %[[V_20]] -> (f128) { ++ ! CHECK: %[[V_22:[0-9]+]] = arith.select %[[V_11]], %cst{{[_0-9]*}}, %cst{{[_0-9]*}} : f128 ++ ! CHECK: %[[V_23:[0-9]+]] = fir.call @_FortranAMapException(%c48{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_23]]) fastmath : (i32) -> i32 ++ ! CHECK: fir.result %[[V_22]] : f128 ++ ! CHECK: } else { ++ ! CHECK-DAG: %[[V_22:[0-9]+]] = arith.subi %[[V_12]], %c1{{.*}} : i128 ++ ! CHECK-DAG: %[[V_23:[0-9]+]] = arith.addi %[[V_12]], %c1{{.*}} : i128 ++ ! CHECK: %[[V_24:[0-9]+]] = arith.select %[[V_15]], %[[V_23]], %[[V_22]] : i128 ++ ! CHECK: %[[V_25:[0-9]+]] = arith.bitcast %[[V_24]] : i128 to f128 ++ ! CHECK: %[[V_26:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_25]]) <{bit = 516 : i32}> : (f128) -> i1 ++ ! CHECK: fir.if %[[V_26]] { ++ ! CHECK: %[[V_28:[0-9]+]] = fir.call @_FortranAMapException(%c40{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_28]]) fastmath : (i32) -> i32 ++ ! CHECK: } ++ ! CHECK: %[[V_27:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_25]]) <{bit = 144 : i32}> : (f128) -> i1 ++ ! CHECK: fir.if %[[V_27]] { ++ ! CHECK: %[[V_28:[0-9]+]] = fir.call @_FortranAMapException(%c48{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_28]]) fastmath : (i32) -> i32 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_25]] : f128 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_21]] : f128 ++ ! CHECK: } ++ ! CHECK: fir.store %[[V_19]] to %[[V_2]] : !fir.ref ++ ! CHECK: return ++ ! CHECK: } ++subroutine nearest_test6(x, s) ++ real(kind=16) :: x, s, res ++ res = nearest(x, s) ++end ++ ++! CHECK-LABEL: c.func @_QPnearest_test7 ++ ! CHECK: %[[V_0:[0-9]+]] = fir.dummy_scope : !fir.dscope ++ ! CHECK: %[[V_1:[0-9]+]] = fir.alloca f128 {bindc_name = "res", uniq_name = "_QFnearest_test7Eres"} ++ ! CHECK: %[[V_2:[0-9]+]] = fir.declare %[[V_1]] {uniq_name = "_QFnearest_test7Eres"} : (!fir.ref) -> !fir.ref ++ ! CHECK: %[[V_3:[0-9]+]] = fir.declare %arg1 dummy_scope %[[V_0]] {uniq_name = "_QFnearest_test7Es"} : (!fir.ref, !fir.dscope) -> !fir.ref ++ ! CHECK: %[[V_4:[0-9]+]] = fir.declare %arg0 dummy_scope %[[V_0]] {uniq_name = "_QFnearest_test7Ex"} : (!fir.ref, !fir.dscope) -> !fir.ref ++ ! CHECK: %[[V_5:[0-9]+]] = fir.load %[[V_4]] : !fir.ref ++ ! CHECK: %[[V_6:[0-9]+]] = fir.load %[[V_3]] : !fir.ref ++ ! CHECK: %[[V_7:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_5]]) <{bit = 3 : i32}> : (f128) -> i1 ++ ! CHECK: %[[V_8:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_6]]) <{bit = 96 : i32}> : (f32) -> i1 ++ ! CHECK: fir.if %[[V_8]] { ++ ! CHECK: fir.call @_FortranAReportFatalUserError ++ ! CHECK: } ++ ! CHECK: %[[V_9:[0-9]+]] = arith.bitcast %[[V_6]] : f32 to i32 ++ ! CHECK: %[[V_10:[0-9]+]] = arith.shrui %[[V_9]], %c31{{.*}} : i32 ++ ! CHECK: %[[V_11:[0-9]+]] = fir.convert %[[V_10]] : (i32) -> i128 ++ ! CHECK: %[[V_12:[0-9]+]] = arith.cmpi ne, %[[V_11]], %c1{{.*}} : i128 ++ ! CHECK: %[[V_13:[0-9]+]] = arith.bitcast %[[V_5]] : f128 to i128 ++ ! CHECK: %[[V_14:[0-9]+]] = arith.shrui %[[V_13]], %c127{{.*}} : i128 ++ ! CHECK: %[[V_15:[0-9]+]] = fir.convert %[[V_14]] : (i128) -> i1 ++ ! CHECK: %[[V_16:[0-9]+]] = arith.cmpi ne, %[[V_12]], %[[V_15]] : i1 ++ ! CHECK: %[[V_17:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_5]]) <{bit = 516 : i32}> : (f128) -> i1 ++ ! CHECK: %[[V_18:[0-9]+]] = arith.andi %[[V_17]], %[[V_16]] : i1 ++ ! CHECK: %[[V_19:[0-9]+]] = arith.ori %[[V_7]], %[[V_18]] : i1 ++ ! CHECK: %[[V_20:[0-9]+]] = fir.if %[[V_19]] -> (f128) { ++ ! CHECK: fir.result %[[V_5]] : f128 ++ ! CHECK: } else { ++ ! CHECK: %[[V_21:[0-9]+]] = arith.cmpf oeq, %[[V_5]], %cst{{[_0-9]*}} fastmath : f128 ++ ! CHECK: %[[V_22:[0-9]+]] = fir.if %[[V_21]] -> (f128) { ++ ! CHECK: %[[V_23:[0-9]+]] = arith.select %[[V_12]], %cst{{[_0-9]*}}, %cst{{[_0-9]*}} : f128 ++ ! CHECK: %[[V_24:[0-9]+]] = fir.call @_FortranAMapException(%c48{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_24]]) fastmath : (i32) -> i32 ++ ! CHECK: fir.result %[[V_23]] : f128 ++ ! CHECK: } else { ++ ! CHECK-DAG: %[[V_23:[0-9]+]] = arith.subi %[[V_13]], %c1{{.*}} : i128 ++ ! CHECK-DAG: %[[V_24:[0-9]+]] = arith.addi %[[V_13]], %c1{{.*}} : i128 ++ ! CHECK: %[[V_25:[0-9]+]] = arith.select %[[V_16]], %[[V_24]], %[[V_23]] : i128 ++ ! CHECK: %[[V_26:[0-9]+]] = arith.bitcast %[[V_25]] : i128 to f128 ++ ! CHECK: %[[V_27:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_26]]) <{bit = 516 : i32}> : (f128) -> i1 ++ ! CHECK: fir.if %[[V_27]] { ++ ! CHECK: %[[V_29:[0-9]+]] = fir.call @_FortranAMapException(%c40{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_29]]) fastmath : (i32) -> i32 ++ ! CHECK: } ++ ! CHECK: %[[V_28:[0-9]+]] = "llvm.intr.is.fpclass"(%[[V_26]]) <{bit = 144 : i32}> : (f128) -> i1 ++ ! CHECK: fir.if %[[V_28]] { ++ ! CHECK: %[[V_29:[0-9]+]] = fir.call @_FortranAMapException(%c48{{.*}}) fastmath : (i32) -> i32 ++ ! CHECK: fir.call @feraiseexcept(%[[V_29]]) fastmath : (i32) -> i32 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_26]] : f128 ++ ! CHECK: } ++ ! CHECK: fir.result %[[V_22]] : f128 ++ ! CHECK: } ++ ! CHECK: fir.store %[[V_20]] to %[[V_2]] : !fir.ref ++ ! CHECK: return ++ ! CHECK: } ++subroutine nearest_test7(x, s) ++ real(kind=16) :: x, res ++ real :: s ++ res = nearest(x, s) ++end +diff --git a/flang/unittests/Optimizer/Builder/Runtime/NumericTest.cpp b/flang/unittests/Optimizer/Builder/Runtime/NumericTest.cpp +index becaa3c69f6c..47342da07f06 100644 +--- a/flang/unittests/Optimizer/Builder/Runtime/NumericTest.cpp ++++ b/flang/unittests/Optimizer/Builder/Runtime/NumericTest.cpp +@@ -56,14 +56,6 @@ void testGenNearest(fir::FirOpBuilder &builder, mlir::Type xType, + mlir::Value s = builder.create(loc, sType); + mlir::Value nearest = fir::runtime::genNearest(builder, loc, x, s); + checkCallOp(nearest.getDefiningOp(), fctName, 2, /*addLocArg=*/false); +- auto callOp = mlir::dyn_cast(nearest.getDefiningOp()); +- mlir::Value select = callOp.getOperands()[1]; +- EXPECT_TRUE(mlir::isa(select.getDefiningOp())); +- auto selectOp = mlir::dyn_cast(select.getDefiningOp()); +- mlir::Value cmp = selectOp.getCondition(); +- EXPECT_TRUE(mlir::isa(cmp.getDefiningOp())); +- auto cmpOp = mlir::dyn_cast(cmp.getDefiningOp()); +- EXPECT_EQ(s, cmpOp.getLhs()); + } + + TEST_F(RuntimeCallTest, genNearestTest) { diff --git a/recipes/recipes_emscripten/libflang/patches/0006-Flang-Runtime-Handle-missing-definitions-in-cfenv.patch b/recipes/recipes_emscripten/libflang/patches/0006-Flang-Runtime-Handle-missing-definitions-in-cfenv.patch new file mode 100644 index 000000000..4772af124 --- /dev/null +++ b/recipes/recipes_emscripten/libflang/patches/0006-Flang-Runtime-Handle-missing-definitions-in-cfenv.patch @@ -0,0 +1,129 @@ +From bfef30593b38dded4d8be13e59bdc93f3fab10a4 Mon Sep 17 00:00:00 2001 +From: serge-sans-paille +Date: Mon, 29 Jul 2024 10:11:21 +0200 +Subject: [PATCH 6/7] [Flang][Runtime] Handle missing definitions in + +According to the C99 standard, may not define FE_INVALID and +the likes. Even if C++11 mandate them, musl and emscripten don't provide +them, so handle that case. +--- + flang/runtime/edit-input.cpp | 11 +++++++++++ + flang/runtime/exceptions.cpp | 24 +++++++++++++++++++++++- + flang/runtime/stop.cpp | 10 ++++++++++ + 3 files changed, 44 insertions(+), 1 deletion(-) + +diff --git a/flang/runtime/edit-input.cpp b/flang/runtime/edit-input.cpp +index 37989bbcee0a..ec900071875e 100644 +--- a/flang/runtime/edit-input.cpp ++++ b/flang/runtime/edit-input.cpp +@@ -507,18 +507,29 @@ static RT_API_ATTRS void RaiseFPExceptions( + #define RAISE std::feraiseexcept + #endif + #endif // !defined(RT_DEVICE_COMPILATION) ++ ++// Some environment (e.g. emscripten, musl) don't define FE_OVERFLOW as allowed ++// by c99 (but not c++11) :-/ ++#if defined(FE_OVERFLOW) || defined(RT_DEVICE_COMPILATION) + if (flags & decimal::ConversionResultFlags::Overflow) { + RAISE(FE_OVERFLOW); + } ++#endif ++#if defined(FE_UNDERFLOW) || defined(RT_DEVICE_COMPILATION) + if (flags & decimal::ConversionResultFlags::Underflow) { + RAISE(FE_UNDERFLOW); + } ++#endif ++#if defined(FE_INEXACT) || defined(RT_DEVICE_COMPILATION) + if (flags & decimal::ConversionResultFlags::Inexact) { + RAISE(FE_INEXACT); + } ++#endif ++#if defined(FE_INVALID) || defined(RT_DEVICE_COMPILATION) + if (flags & decimal::ConversionResultFlags::Invalid) { + RAISE(FE_INVALID); + } ++#endif + #undef RAISE + } + +diff --git a/flang/runtime/exceptions.cpp b/flang/runtime/exceptions.cpp +index 2032ce7b1224..8239c556bcea 100644 +--- a/flang/runtime/exceptions.cpp ++++ b/flang/runtime/exceptions.cpp +@@ -12,9 +12,26 @@ + #include "terminator.h" + #include + ++// When not supported, these macro are undefined in cfenv.h, ++// set them to zero in that case. ++#ifndef FE_INVALID ++#define FE_INVALID 0 ++#endif + #ifndef __FE_DENORM + #define __FE_DENORM 0 // denorm is nonstandard + #endif ++#ifndef FE_DIVBYZERO ++#define FE_DIVBYZERO 0 ++#endif ++#ifndef FE_OVERFLOW ++#define FE_OVERFLOW 0 ++#endif ++#ifndef FE_UNDERFLOW ++#define FE_UNDERFLOW 0 ++#endif ++#ifndef FE_INEXACT ++#define FE_INEXACT 0 ++#endif + + namespace Fortran::runtime { + +@@ -45,7 +62,12 @@ uint32_t RTNAME(MapException)(uint32_t excepts) { + if (excepts == 0 || excepts >= mapSize) { + terminator.Crash("Invalid excepts value: %d", excepts); + } +- return map[excepts]; ++ uint32_t except_value = map[excepts]; ++ if (except_value == 0) { ++ terminator.Crash( ++ "Excepts value %d not supported by flang runtime", excepts); ++ } ++ return except_value; + } + + // Verify that the size of ieee_modes_type and ieee_status_type objects from +diff --git a/flang/runtime/stop.cpp b/flang/runtime/stop.cpp +index 98324da1d91e..cfb36b408402 100644 +--- a/flang/runtime/stop.cpp ++++ b/flang/runtime/stop.cpp +@@ -26,21 +26,31 @@ static void DescribeIEEESignaledExceptions() { + #endif + if (excepts) { + std::fputs("IEEE arithmetic exceptions signaled:", stderr); ++#ifdef FE_DIVBYZERO + if (excepts & FE_DIVBYZERO) { + std::fputs(" DIVBYZERO", stderr); + } ++#endif ++#ifdef FE_INEXACT + if (excepts & FE_INEXACT) { + std::fputs(" INEXACT", stderr); + } ++#endif ++#ifdef FE_INVALID + if (excepts & FE_INVALID) { + std::fputs(" INVALID", stderr); + } ++#endif ++#ifdef FE_OVERFLOW + if (excepts & FE_OVERFLOW) { + std::fputs(" OVERFLOW", stderr); + } ++#endif ++#ifdef FE_UNDERFLOW + if (excepts & FE_UNDERFLOW) { + std::fputs(" UNDERFLOW", stderr); + } ++#endif + std::fputc('\n', stderr); + } + } diff --git a/recipes/recipes_emscripten/libflang/patches/0007-Patches-to-build-flang-runtime-with-emcc.patch b/recipes/recipes_emscripten/libflang/patches/0007-Patches-to-build-flang-runtime-with-emcc.patch new file mode 100644 index 000000000..a3f885db3 --- /dev/null +++ b/recipes/recipes_emscripten/libflang/patches/0007-Patches-to-build-flang-runtime-with-emcc.patch @@ -0,0 +1,89 @@ +From 6254628834e8a98f06aab0c019613e3dc44575e1 Mon Sep 17 00:00:00 2001 +From: serge-sans-paille +Date: Fri, 9 Aug 2024 08:42:52 +0200 +Subject: [PATCH 7/7] Patches to build flang runtime with emcc + +--- + flang/runtime/CMakeLists.txt | 46 ++++++++++++++++++------------------ + flang/runtime/copy.cpp | 4 ++-- + 2 files changed, 25 insertions(+), 25 deletions(-) + +diff --git a/flang/runtime/CMakeLists.txt b/flang/runtime/CMakeLists.txt +index d587fd44b167..a008e150ad54 100644 +--- a/flang/runtime/CMakeLists.txt ++++ b/flang/runtime/CMakeLists.txt +@@ -103,7 +103,7 @@ append(${NO_LTO_FLAGS} CMAKE_CXX_FLAGS) + add_definitions(-U_GLIBCXX_ASSERTIONS) + add_definitions(-U_LIBCPP_ENABLE_ASSERTIONS) + +-add_subdirectory(Float128Math) ++# add_subdirectory(Float128Math) + + set(sources + ISO_Fortran_binding.cpp +@@ -230,28 +230,28 @@ set(supported_files + enable_cuda_compilation(FortranRuntime "${supported_files}") + enable_omp_offload_compilation("${supported_files}") + +-if (NOT TARGET FortranFloat128Math) +- # If FortranFloat128Math is not defined, then we are not building +- # standalone FortranFloat128Math library. Instead, include +- # the relevant sources into FortranRuntime itself. +- # The information is provided via FortranFloat128MathILib +- # interface library. +- get_target_property(f128_sources +- FortranFloat128MathILib INTERFACE_SOURCES +- ) +- if (f128_sources) +- # The interface may define special macros for Float128Math files, +- # so we need to propagate them. +- get_target_property(f128_defs +- FortranFloat128MathILib INTERFACE_COMPILE_DEFINITIONS +- ) +- set_property(SOURCE ${f128_sources} +- APPEND PROPERTY COMPILE_DEFINITIONS +- ${f128_defs} +- ) +- list(APPEND sources ${f128_sources}) +- endif() +-endif() ++# if (NOT TARGET FortranFloat128Math) ++# # If FortranFloat128Math is not defined, then we are not building ++# # standalone FortranFloat128Math library. Instead, include ++# # the relevant sources into FortranRuntime itself. ++# # The information is provided via FortranFloat128MathILib ++# # interface library. ++# get_target_property(f128_sources ++# FortranFloat128MathILib INTERFACE_SOURCES ++# ) ++# if (f128_sources) ++# # The interface may define special macros for Float128Math files, ++# # so we need to propagate them. ++# get_target_property(f128_defs ++# FortranFloat128MathILib INTERFACE_COMPILE_DEFINITIONS ++# ) ++# set_property(SOURCE ${f128_sources} ++# APPEND PROPERTY COMPILE_DEFINITIONS ++# ${f128_defs} ++# ) ++# list(APPEND sources ${f128_sources}) ++# endif() ++# endif() + + if (NOT DEFINED MSVC) + add_flang_library(FortranRuntime +diff --git a/flang/runtime/copy.cpp b/flang/runtime/copy.cpp +index 7cf948365414..f7f3d5e8dd6d 100644 +--- a/flang/runtime/copy.cpp ++++ b/flang/runtime/copy.cpp +@@ -51,8 +51,8 @@ RT_API_ATTRS void CopyElement(const Descriptor &to, const SubscriptValue toAt[], + SubscriptValue extents[maxRank]; + const typeInfo::Value *bounds{component->bounds()}; + for (int dim{0}; dim < component->rank(); ++dim) { +- SubscriptValue lb{bounds[2 * dim].GetValue(&to).value_or(0)}; +- SubscriptValue ub{bounds[2 * dim + 1].GetValue(&to).value_or(0)}; ++ SubscriptValue lb = bounds[2 * dim].GetValue(&to).value_or(0); ++ SubscriptValue ub = bounds[2 * dim + 1].GetValue(&to).value_or(0); + extents[dim] = ub >= lb ? ub - lb + 1 : 0; + } + const typeInfo::DerivedType &compType{*component->derivedType()}; diff --git a/recipes/recipes_emscripten/libflang/recipe.yaml b/recipes/recipes_emscripten/libflang/recipe.yaml new file mode 100644 index 000000000..d45aab50a --- /dev/null +++ b/recipes/recipes_emscripten/libflang/recipe.yaml @@ -0,0 +1,47 @@ +context: + name: libflang + version: 19.1.0.rc2 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-${{ version | replace(".rc", "-rc") }}.tar.gz + sha256: 5332e77a658136c778fc32ec2a3687de4d63e0ff48010be205c4e7af6e76f1f1 + patches: + # from https://github.com/serge-sans-paille/llvm-project/tree/feature/flang-wasm + - patches/0001-Instructions-for-building-a-functional-Flang-cross-c.patch + - patches/0002-Minimal-WASM-support-for-flang.patch + - patches/0003-Specialize-Flang-to-target-WASM.patch + # see https://github.com/llvm/llvm-project/pull/99822 + - patches/0004-Flang-Runtime-Explicitly-convert-shift-value-to-Subs.patch + # see https://github.com/llvm/llvm-project/pull/101242 (plus a necessary precursor) + - patches/0005-flang-IEEE_NEXT_AFTER-IEEE_NEXT_DOWN-IEEE_NEXT_UP-NE.patch + - patches/0006-Flang-Runtime-Handle-missing-definitions-in-cfenv.patch + # hard wasm overrides for building runtime with emcc + - patches/0007-Patches-to-build-flang-runtime-with-emcc.patch + +build: + number: 0 + +requirements: + build: + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + - ninja + +tests: +- script: + - test -f $PREFIX/lib/libFortranRuntime.a + +about: + homepage: https://flang.llvm.org + license: Apache-2.0 + license_file: flang/LICENSE.TXT + summary: Flang is a Fortran compiler targeting LLVM. + repository: https://github.com/llvm/llvm-project + +extra: + recipe-maintainers: + - IsabelParedes From 9e63ea622b378bd1a02c58153441d77ab4e72853 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Tue, 20 Aug 2024 16:39:55 +0200 Subject: [PATCH 197/333] Add libcblas (#1286) --- recipes/recipes_emscripten/lapack/build.sh | 6 +++--- .../0001_Disable_fortran_compiler_check.patch | 20 +++++++++++++++--- recipes/recipes_emscripten/lapack/recipe.yaml | 21 +++++++++++++++++-- 3 files changed, 39 insertions(+), 8 deletions(-) diff --git a/recipes/recipes_emscripten/lapack/build.sh b/recipes/recipes_emscripten/lapack/build.sh index 91ce02357..c4b95c6ce 100644 --- a/recipes/recipes_emscripten/lapack/build.sh +++ b/recipes/recipes_emscripten/lapack/build.sh @@ -17,9 +17,9 @@ export FFLAGS="--target=wasm32-unknown-emscripten" emcmake cmake -S . -B _build \ -DCMAKE_BUILD_TYPE=Release \ - -DCBLAS=no \ - -DLAPACKE=no \ - -DBUILD_TESTING=no \ + -DCBLAS=ON \ + -DLAPACKE=OFF \ + -DBUILD_TESTING=OFF \ -DCMAKE_Fortran_PREPROCESS=yes \ -DCMAKE_Fortran_COMPILER=$FC \ -DCMAKE_Fortran_FLAGS=$FFLAGS \ diff --git a/recipes/recipes_emscripten/lapack/patches/0001_Disable_fortran_compiler_check.patch b/recipes/recipes_emscripten/lapack/patches/0001_Disable_fortran_compiler_check.patch index 5f97d776c..7c9f960d5 100644 --- a/recipes/recipes_emscripten/lapack/patches/0001_Disable_fortran_compiler_check.patch +++ b/recipes/recipes_emscripten/lapack/patches/0001_Disable_fortran_compiler_check.patch @@ -1,12 +1,13 @@ -From 1e0c9f82dae9cbb34608e8978889378ec68495a6 Mon Sep 17 00:00:00 2001 +From 5dc8495f6d4aa4c1ed11efe7a54fcb037d0a9e08 Mon Sep 17 00:00:00 2001 From: Isabel Paredes -Date: Tue, 20 Aug 2024 11:58:38 +0200 +Date: Tue, 20 Aug 2024 15:05:28 +0200 Subject: [PATCH] Disable fortran compiler checks --- BLAS/CMakeLists.txt | 1 + + CBLAS/CMakeLists.txt | 2 +- LAPACKE/include/CMakeLists.txt | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/BLAS/CMakeLists.txt b/BLAS/CMakeLists.txt index a33f38f..ae1c765 100644 @@ -17,6 +18,19 @@ index a33f38f..ae1c765 100644 enable_language(Fortran) # Check for any necessary platform specific compiler flags +diff --git a/CBLAS/CMakeLists.txt b/CBLAS/CMakeLists.txt +index c276f7d..7ae1539 100644 +--- a/CBLAS/CMakeLists.txt ++++ b/CBLAS/CMakeLists.txt +@@ -10,7 +10,7 @@ if(CMAKE_Fortran_COMPILER) + enable_language(Fortran) + include(FortranCInterface) + ## Ensure that the fortran compiler and c compiler specified are compatible +- FortranCInterface_VERIFY() ++ # FortranCInterface_VERIFY() + FortranCInterface_HEADER(${LAPACK_BINARY_DIR}/include/cblas_mangling.h + MACRO_NAMESPACE "F77_" + SYMBOL_NAMESPACE "F77_") diff --git a/LAPACKE/include/CMakeLists.txt b/LAPACKE/include/CMakeLists.txt index 034491e..1ecf561 100644 --- a/LAPACKE/include/CMakeLists.txt diff --git a/recipes/recipes_emscripten/lapack/recipe.yaml b/recipes/recipes_emscripten/lapack/recipe.yaml index e2273f25d..d3d9110fa 100644 --- a/recipes/recipes_emscripten/lapack/recipe.yaml +++ b/recipes/recipes_emscripten/lapack/recipe.yaml @@ -9,7 +9,7 @@ source: - patches/0001_Disable_fortran_compiler_check.patch build: - number: 0 + number: 1 # TODO: Use cache output once it's not experimental @@ -28,6 +28,23 @@ outputs: tests: - script: test -f $PREFIX/lib/libblas.a +- package: + name: libcblas + version: ${{ version }} + build: + files: + - lib/libcblas.a + - lib/pkgconfig/cblas.pc + - lib/cmake/cblas-${{ version }}/cblas* + requirements: + build: + - ${{ compiler("c") }} + - ninja + run: + - libblas ${{ version }} + tests: + - script: test -f $PREFIX/lib/libcblas.a + - package: name: liblapack version: ${{ version }} @@ -41,7 +58,7 @@ outputs: - ${{ compiler("c") }} - ninja run: - - libblas + - libblas ${{ version }} tests: - script: test -f $PREFIX/lib/liblapack.a From 7fbfdfb84d883a1419acd5c9e6f2250c441b96bb Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Sun, 25 Aug 2024 01:07:01 +0000 Subject: [PATCH 198/333] Update lfortran from 0.39.0 to 0.40.0 --- recipes/recipes_emscripten/lfortran/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/lfortran/recipe.yaml b/recipes/recipes_emscripten/lfortran/recipe.yaml index 235d7e3f3..5d3672117 100644 --- a/recipes/recipes_emscripten/lfortran/recipe.yaml +++ b/recipes/recipes_emscripten/lfortran/recipe.yaml @@ -1,6 +1,6 @@ context: name: lfortran - version: 0.39.0 + version: 0.40.0 package: name: ${{ name }} @@ -9,7 +9,7 @@ package: source: url: https://github.com/lfortran/lfortran/releases/download/v${{ version }}/${{ name }}-${{ version }}.tar.gz - sha256: bf103af6036226f5e8809f2ef7444d6b0b99a339a7967d6527bb21b35d2b4f7a + sha256: 9919f74fa680b9442551338062ae66acd54cc2f090d555414ecc7dfa8a05fe44 build: number: 0 From c69ecf2d4a9d115d35f041365cf1d93d744de8a2 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Tue, 27 Aug 2024 01:03:32 +0000 Subject: [PATCH 199/333] Update glib from 2.80.4 to 2.80.5 --- recipes/recipes_emscripten/glib/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/glib/recipe.yaml b/recipes/recipes_emscripten/glib/recipe.yaml index 2c0c87818..edb87a638 100644 --- a/recipes/recipes_emscripten/glib/recipe.yaml +++ b/recipes/recipes_emscripten/glib/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.80.4 + version: 2.80.5 major_minor: '2.80' package: @@ -9,7 +9,7 @@ package: source: url: https://download.gnome.org/sources/glib/${{ major_minor }}/glib-${{ version }}.tar.xz - sha256: 24e029c5dfc9b44e4573697adf33078a9827c48938555004b3b9096fa4ea034f + sha256: 9f23a9de803c695bbfde7e37d6626b18b9a83869689dd79019bf3ae66c3e6771 # Patch from https://gist.github.com/kleisauke/acfa1c09522705efa5eb0541d2d00887 patches: - patches/glib.patch From 0f2016c5c35d496c074cab15a018853a9b14be7a Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Wed, 28 Aug 2024 14:09:32 +0200 Subject: [PATCH 200/333] Update pcre2 build flags (#1293) --- recipes/recipes_emscripten/pcre2/build.sh | 3 +++ recipes/recipes_emscripten/pcre2/recipe.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/recipes_emscripten/pcre2/build.sh b/recipes/recipes_emscripten/pcre2/build.sh index bcca7d454..9e476877f 100644 --- a/recipes/recipes_emscripten/pcre2/build.sh +++ b/recipes/recipes_emscripten/pcre2/build.sh @@ -1,5 +1,8 @@ #!/bin/bash +export CFLAGS="$CFLAGS -fPIC -I$PREFIX/include" +export LDFLAGS="$LDFLAGS -L$PREFIX/lib" + ./autogen.sh emconfigure ./configure \ --prefix=$PREFIX \ diff --git a/recipes/recipes_emscripten/pcre2/recipe.yaml b/recipes/recipes_emscripten/pcre2/recipe.yaml index 0b52128a4..393143571 100644 --- a/recipes/recipes_emscripten/pcre2/recipe.yaml +++ b/recipes/recipes_emscripten/pcre2/recipe.yaml @@ -11,7 +11,7 @@ source: sha256: f0048e26b02bdfaf43b8cec75030a9c2fe28552bf5caa693d3ccbf4d886fa930 build: - number: 0 + number: 1 requirements: build: From 49cb7a4ae0291113b5cb4a54895fbde7ff973165 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Thu, 29 Aug 2024 18:00:21 +0200 Subject: [PATCH 201/333] Build FortranRuntime with -fPIC (#1294) --- recipes/recipes_emscripten/libflang/build.sh | 3 +++ recipes/recipes_emscripten/libflang/recipe.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/recipes_emscripten/libflang/build.sh b/recipes/recipes_emscripten/libflang/build.sh index 814a00eb6..92392f0a8 100644 --- a/recipes/recipes_emscripten/libflang/build.sh +++ b/recipes/recipes_emscripten/libflang/build.sh @@ -2,6 +2,9 @@ set -ex +export CFLAGS="-fPIC" +export CXXFLAGS="-fPIC" + # See https://github.com/serge-sans-paille/llvm-project/blob/feature/flang-wasm/README.wasm.md emcmake cmake -S flang/runtime -B _fbuild_runtime -GNinja \ -DCMAKE_BUILD_TYPE=Release \ diff --git a/recipes/recipes_emscripten/libflang/recipe.yaml b/recipes/recipes_emscripten/libflang/recipe.yaml index d45aab50a..50b37b1f0 100644 --- a/recipes/recipes_emscripten/libflang/recipe.yaml +++ b/recipes/recipes_emscripten/libflang/recipe.yaml @@ -23,7 +23,7 @@ source: - patches/0007-Patches-to-build-flang-runtime-with-emcc.patch build: - number: 0 + number: 1 requirements: build: From d9074c0ed01fd44d5839a6eb8163d79af10e14a6 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Tue, 3 Sep 2024 08:43:53 +0200 Subject: [PATCH 202/333] minor pyjs fixes (#1297) * [do-not-merge] trigger-test-build * Update recipe.yaml --- 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 cae6e3f3d..8341327d5 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: 7 + number: 8 requirements: @@ -24,7 +24,7 @@ requirements: - zlib - bzip2 - libffi - - pybind11 + - pybind11<2.12.0 tests: - script: | From ed990da8de3da31ae84c6b3e9fa80869cabd4bf3 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Tue, 3 Sep 2024 11:07:49 +0200 Subject: [PATCH 203/333] Update Pillow recipe (#1298) * Update build.sh * remove bin * Update recipe.yaml * Update recipe.yaml * Update recipe.yaml * Update recipe.yaml * Update recipe.yaml --- recipes/recipes_emscripten/pillow/build.sh | 3 +++ recipes/recipes_emscripten/pillow/recipe.yaml | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/pillow/build.sh b/recipes/recipes_emscripten/pillow/build.sh index 7c345a21c..91c857019 100644 --- a/recipes/recipes_emscripten/pillow/build.sh +++ b/recipes/recipes_emscripten/pillow/build.sh @@ -8,3 +8,6 @@ $EMSCRIPTEN_FORGE_EMSDK_DIR/upstream/emscripten/embuilder build libjpeg --pic export LDFLAGS="${LDFLAGS} -s USE_LIBJPEG" export CFLAGS="${CFLAGS} -s USE_ZLIB=1 -s USE_LIBJPEG=1 -s USE_FREETYPE=1 -s SIDE_MODULE=1" ${PYTHON} -m pip install . + + +rm -rf $PREFIX/bin diff --git a/recipes/recipes_emscripten/pillow/recipe.yaml b/recipes/recipes_emscripten/pillow/recipe.yaml index 43bb9608d..8db695906 100644 --- a/recipes/recipes_emscripten/pillow/recipe.yaml +++ b/recipes/recipes_emscripten/pillow/recipe.yaml @@ -14,10 +14,11 @@ source: - path: setup.py build: - number: 0 + number: 1 requirements: build: + - ${{ compiler("cxx") }} - cross-python_emscripten-wasm32 - pip host: @@ -32,5 +33,9 @@ tests: requirements: build: - pytester + - python < 3.12 run: - - pytester-run \ No newline at end of file + - pytest < 8 + - pytester-run + - emscripten-abi = 3.1.45 + - python < 3.12 From 32f29523fa49f08dd8d60f192f742b3a1526893c Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Tue, 3 Sep 2024 13:25:13 +0200 Subject: [PATCH 204/333] updater pytester recipe (#1299) --- recipes/recipes/pytester/recipe.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipes/recipes/pytester/recipe.yaml b/recipes/recipes/pytester/recipe.yaml index 88491dee2..386369593 100644 --- a/recipes/recipes/pytester/recipe.yaml +++ b/recipes/recipes/pytester/recipe.yaml @@ -13,7 +13,7 @@ outputs: version: ${{ version }} build: - number: 10 + number: 11 noarch: python @@ -33,12 +33,14 @@ outputs: name: pytester-run version: ${{ version }} build: - number: 10 + number: 11 noarch: generic requirements: run: - pyjs - pytest <8 + - python <3.12 + - emscripten-abi==3.1.45 about: From b5e80e226d74b713e81ab65a60774a7c9628567b Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Wed, 28 Aug 2024 01:04:41 +0000 Subject: [PATCH 205/333] Update contourpy from 1.2.1 to 1.3.0 --- recipes/recipes_emscripten/contourpy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/contourpy/recipe.yaml b/recipes/recipes_emscripten/contourpy/recipe.yaml index bc5d30d11..6983a009b 100644 --- a/recipes/recipes_emscripten/contourpy/recipe.yaml +++ b/recipes/recipes_emscripten/contourpy/recipe.yaml @@ -1,6 +1,6 @@ context: name: contourpy - version: 1.2.1 + version: 1.3.0 package: name: ${{ name|lower }} @@ -8,7 +8,7 @@ package: source: - url: https://pypi.io/packages/source/c/contourpy/contourpy-${{ version }}.tar.gz - sha256: 4d8908b3bee1c889e547867ca4cdc54e5ab6be6d3e078556814a22457f49423c + sha256: 7ffa0db17717a8ffb127efd0c95a4362d996b892c2904db72428d5b52e1938a4 build: number: 0 From 2567b934f8c123eef207228513c15ed8b34719e0 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Wed, 4 Sep 2024 19:31:30 +0200 Subject: [PATCH 206/333] Rebuild lzma with -fPIC for r-base (#1302) * Build with -fPIC --- recipes/recipes_emscripten/xz/build.sh | 3 +++ recipes/recipes_emscripten/xz/recipe.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/recipes_emscripten/xz/build.sh b/recipes/recipes_emscripten/xz/build.sh index 214211113..48493a294 100644 --- a/recipes/recipes_emscripten/xz/build.sh +++ b/recipes/recipes_emscripten/xz/build.sh @@ -1,5 +1,8 @@ mkdir build && cd build +export CFLAGS="$CFLAGS -fPIC" +export CXXFLAGS="$CXXFLAGS -fPIC" + emconfigure ../configure \ --enable-shared=no \ --enable-static=yes \ diff --git a/recipes/recipes_emscripten/xz/recipe.yaml b/recipes/recipes_emscripten/xz/recipe.yaml index 83431bae7..721017041 100644 --- a/recipes/recipes_emscripten/xz/recipe.yaml +++ b/recipes/recipes_emscripten/xz/recipe.yaml @@ -10,7 +10,7 @@ source: sha256: 620cdbfc31adbc7e3e5cd8c3c3aa9ffed9335f0ddc42719cf9afce5136a978c1 build: - number: 0 + number: 1 requirements: build: From 71d9cb95b54fe872449186606c4320c0fcca5c85 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Sat, 31 Aug 2024 01:04:32 +0000 Subject: [PATCH 207/333] Update astropy from 6.1.2 to 6.1.3 --- recipes/recipes_emscripten/astropy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/astropy/recipe.yaml b/recipes/recipes_emscripten/astropy/recipe.yaml index 92412113b..4b27533a7 100644 --- a/recipes/recipes_emscripten/astropy/recipe.yaml +++ b/recipes/recipes_emscripten/astropy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 6.1.2 + version: 6.1.3 package: name: astropy @@ -7,7 +7,7 @@ package: source: - url: https://pypi.io/packages/source/a/astropy/astropy-${{ version }}.tar.gz - sha256: a2103d4e24e90389a820cfcdaaf4ca2d1ab22e5fd72978d147ff5cace54f1d3a + sha256: 9ac834cdedc1f6b5ce6f941f7bfbbfc58fca861eb172bcf72dd90aff8f750970 # patches: # - patches/skip_ep.patch From afce5847a960a31e74dffdc50c7dba5de74d4c22 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Wed, 4 Sep 2024 10:21:17 +0200 Subject: [PATCH 208/333] Update recipe.yaml --- recipes/recipes_emscripten/astropy/recipe.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/recipes_emscripten/astropy/recipe.yaml b/recipes/recipes_emscripten/astropy/recipe.yaml index 4b27533a7..9d584a8b0 100644 --- a/recipes/recipes_emscripten/astropy/recipe.yaml +++ b/recipes/recipes_emscripten/astropy/recipe.yaml @@ -16,6 +16,7 @@ build: requirements: build: + - ${{ compiler("cxx") }} - cross-python_emscripten-wasm32 - python - cython From 0a965e24d3241b1490e6090732b869bd83db0565 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Sat, 31 Aug 2024 01:04:01 +0000 Subject: [PATCH 209/333] Update ipython from 8.26.0 to 8.27.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 dc120fb60..fb2cc3ec4 100644 --- a/recipes/recipes_emscripten/ipython/recipe.yaml +++ b/recipes/recipes_emscripten/ipython/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 8.26.0 + version: 8.27.0 package: name: ipython @@ -7,7 +7,7 @@ package: source: - url: https://pypi.io/packages/source/i/ipython/ipython-${{ version }}.tar.gz - sha256: 1cec0fbba8404af13facebe83d04436a7434c7400e59f47acf467c64abd0956c + sha256: 0b99a2dc9f15fd68692e898e5568725c6d49c527d36a9fb5960ffbdeaa82ff7e patches: - patches/0001-Patch-asyncio-tornado.patch From 3ce9577740d9315ed91532e5ecb1ecea150d3c0c Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Tue, 20 Aug 2024 01:02:08 +0000 Subject: [PATCH 210/333] Update shapely from 2.0.5 to 2.0.6 --- recipes/recipes_emscripten/shapely/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/shapely/recipe.yaml b/recipes/recipes_emscripten/shapely/recipe.yaml index e34da1520..254868f27 100644 --- a/recipes/recipes_emscripten/shapely/recipe.yaml +++ b/recipes/recipes_emscripten/shapely/recipe.yaml @@ -1,6 +1,6 @@ context: name: shapely - version: 2.0.5 + version: 2.0.6 package: name: ${{ name }} @@ -8,7 +8,7 @@ package: source: url: https://pypi.io/packages/source/S/Shapely/shapely-${{ version }}.tar.gz - sha256: bff2366bc786bfa6cb353d6b47d0443c570c32776612e527ee47b6df63fcfe32 + sha256: 997f6159b1484059ec239cacaa53467fd8b5564dabe186cd84ac2944663b0bf6 build: number: 0 From 7d26fc6de5e7e23bf0a3eb82403ec28caabcb2e0 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Thu, 5 Sep 2024 10:27:33 +0200 Subject: [PATCH 211/333] Add r-base (#1287) * Add R-base recipe * Update recipe * Update lfortran * Add fPIC flag * Update flags * Add config patch * Fix bad substitution * Skip date-time conversions check * Working config * Replace lfortran * Use existing stpcpy * WIP * WIP * Almost building * WIP * Fix R executable * Fix doc build * Clean up This works! * Add comments * Add rlang recipe * Working recipe * Fix r-base Makeconf vars * Update build script * Enable shared libs * Add note about flags * Copy wasm file * Update dependencies * Fix invalid assignment * Working tests * Working recipe * Set default R home patch * Increase stack size * Add memory growth * Clean up flags * Add more linker flags * Enable static * Remove unsupported funs * Update script * Replace local flang * Remove r-rlang * Add modularized test * Set identical versions for llvm and flang * Clean patches * Remove extra -lz * Override some shared flags * Update test * Override -shared * Fix link error with Rblas and undefined symbol LinkError: imported unshared memory but shared required Undefined symbol: _QQclX4E now replaced with undefined R_NaInt * Remove more unsupported system calls * Reset build number * Rebuild * Clean up --- recipes/recipes_emscripten/r-base/build.sh | 75 +++ recipes/recipes_emscripten/r-base/config.site | 539 ++++++++++++++++++ .../0001-Fix-bad-substitution-error.patch | 45 ++ .../r-base/patches/0002-Disable-libcurl.patch | 410 +++++++++++++ .../0003-Remove-unsupported-sigsuspend.patch | 23 + .../0004-Disable-internet-module.patch | 40 ++ .../0005-Use-R-binary-from-build-prefix.patch | 25 + ...006-Ignore-crude-heuristic-file-size.patch | 22 + .../0007-Build-docs-with-Rscript-binary.patch | 86 +++ .../patches/0008-Set-default-R_Home.patch | 24 + .../0009-Use-basenames-for-compilers.patch | 85 +++ recipes/recipes_emscripten/r-base/pre.js | 3 + recipes/recipes_emscripten/r-base/recipe.yaml | 64 +++ 13 files changed, 1441 insertions(+) create mode 100644 recipes/recipes_emscripten/r-base/build.sh create mode 100644 recipes/recipes_emscripten/r-base/config.site create mode 100644 recipes/recipes_emscripten/r-base/patches/0001-Fix-bad-substitution-error.patch create mode 100644 recipes/recipes_emscripten/r-base/patches/0002-Disable-libcurl.patch create mode 100644 recipes/recipes_emscripten/r-base/patches/0003-Remove-unsupported-sigsuspend.patch create mode 100644 recipes/recipes_emscripten/r-base/patches/0004-Disable-internet-module.patch create mode 100644 recipes/recipes_emscripten/r-base/patches/0005-Use-R-binary-from-build-prefix.patch create mode 100644 recipes/recipes_emscripten/r-base/patches/0006-Ignore-crude-heuristic-file-size.patch create mode 100644 recipes/recipes_emscripten/r-base/patches/0007-Build-docs-with-Rscript-binary.patch create mode 100644 recipes/recipes_emscripten/r-base/patches/0008-Set-default-R_Home.patch create mode 100644 recipes/recipes_emscripten/r-base/patches/0009-Use-basenames-for-compilers.patch create mode 100644 recipes/recipes_emscripten/r-base/pre.js create mode 100644 recipes/recipes_emscripten/r-base/recipe.yaml diff --git a/recipes/recipes_emscripten/r-base/build.sh b/recipes/recipes_emscripten/r-base/build.sh new file mode 100644 index 000000000..bd57e83f6 --- /dev/null +++ b/recipes/recipes_emscripten/r-base/build.sh @@ -0,0 +1,75 @@ +#!/bin/bash + +set -e + +# Using flang as a WASM cross-compiler +# https://github.com/serge-sans-paille/llvm-project/blob/feature/flang-wasm/README.wasm.md +# https://github.com/conda-forge/flang-feedstock/pull/69 +micromamba install -p $BUILD_PREFIX \ + conda-forge/label/llvm_rc::libllvm19=19.1.0.rc2 \ + conda-forge/label/llvm_dev::flang=19.1.0.rc2 \ + -y --no-channel-priority +rm $BUILD_PREFIX/bin/clang # links to clang19 +ln -s $BUILD_PREFIX/bin/clang-18 $BUILD_PREFIX/bin/clang # links to emsdk clang + +# Skip non-working checks +export r_cv_header_zlib_h=yes +export r_cv_have_bzlib=yes +export r_cv_have_lzma=yes +export r_cv_have_pcre2utf=yes +export r_cv_size_max=yes + +# NOTE: When cross-compiling, it sets the version check to fail regardless of +# the lapack version. This is a workaround to skip the version check. +# export r_cv_lapack_ver=yes + +# Not supported +export ac_cv_have_decl_getrusage=no +export ac_cv_have_decl_getrlimit=no +export ac_cv_have_decl_sigaltstack=no +export ac_cv_have_decl_wcsftime=no +export ac_cv_have_decl_umask=no + +export OBJDUMP=llvm-objdump + +# Otherwise set to .not_implemented and cannot be used +export SHLIB_EXT=".so" + +mkdir _build +cp $RECIPE_DIR/config.site _build/config.site +cd _build + +# NOTE: the host and build systems are explicitly set to enable the cross- +# compiling options even though it's not fully supported. +# Otherwise, it assumes it's not cross-compiling. +emconfigure ../configure \ + --prefix=$PREFIX \ + --build="x86_64-conda-linux-gnu" \ + --host="wasm32-unknown-emscripten" \ + --enable-R-static-lib \ + --enable-BLAS-shlib \ + --with-cairo \ + --without-readline \ + --without-x \ + --enable-static \ + --enable-java=no \ + --enable-R-profiling=no \ + --enable-byte-compiled-packages=no \ + --disable-rpath \ + --disable-openmp \ + --disable-threads \ + --disable-nls \ + --with-internal-tzcode \ + --with-recommended-packages=no \ + --with-libdeflate-compression=no + +# NOTE: Remove the -lFortranRuntime from the FLIBS to avoid double-linking +# when creating the R binary +echo "FLIBS = " >> Makeconf + +emmake make -j${CPU_COUNT} +emmake make install + +# Manually copying .wasm files +cp src/main/R.* $PREFIX/lib/R/bin/exec/ +cp src/unix/Rscript.wasm $PREFIX/lib/R/bin/ diff --git a/recipes/recipes_emscripten/r-base/config.site b/recipes/recipes_emscripten/r-base/config.site new file mode 100644 index 000000000..92d157595 --- /dev/null +++ b/recipes/recipes_emscripten/r-base/config.site @@ -0,0 +1,539 @@ +#! /bin/sh + +### This file is part of R. +### +### R is free software; you can redistribute it and/or modify it under +### the terms of the GNU General Public License as published by the Free +### Software Foundation; either version 2 of the License, or (at your +### option) any later version. +### +### R 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 General Public +### License for more details. +### +### You should have received a copy of the GNU General Public License +### along with R; if not, a copy is available at +### https://www.r-project.org/Licenses/ + +## By means of this file you can (also) provide default values for the +## configuration process. To set variables, uncomment the VAR=DEFAULT +## lines and set DEFAULT according to your needs. +## See etc/Renviron.in for further variables you may wish to set. + +## The command used to spool PostScript files to the printer. +## If unspecified, the system will look for either 'lpr' or 'lp'. +## R_PRINTCMD=lpr + +## The paper size for the local (PostScript) printer. +## It must either be left blank or set to one of 'a4' or 'letter'. +## If left blank the system will use 'a4'. +## R_PAPERSIZE=a4 + +## Set the default behavior of R when ending a session +## Set this to one of '--save' or '--no-save' depending whether you +## want automatic saving of '.RData' or not. +## Note that this applies to interactive and batch use, +## but NOT to the utility R CMD BATCH +## (which defaults to --save irrespective of this setting) +## R_BATCHSAVE= + +## The command which runs the C compiler. +## If unspecified, a search is made for gcc and cc (in that order). +## To override this choice, specify the name or path of the command +## which runs the compiler, for example 'c99'. +## It is also necessary to set the architecture here, e.g. 'gcc -m32'. +## If this is a wrapper it should pass on --version to the real compiler. +CC=emcc + +## Debugging and optimization options for the C compiler. +## Use this to specify CFLAGS for the version of the C compiler +## specified above. +## If unspecified, defaults to '-g -O2' for gcc, +## and '-g' in all other cases except icc (for which see R-admin.html). +## Be wary of aggressive settings such as -ffast-math, -Ofast and +## -Werror (which is likely to cause configure to fail). +CFLAGS="-g3 -matomics -mbulk-memory -fPIC" # Needed for context.c + +## Ditto for a compiler that supports C17 features and not C23 ones. +## For example, 'CC17=gcc -std=gnu17', omit -Wstrict-prototypes from C17FLAGS. +## With LLVM clang may even want -Wno-strict-prototypes. +## It is assumed that this uses the same runtime library as CC, so the +## latter can be used to link the code it generates. +## Default to CC and CFLAGS with any -std options removed, then +## -std=gmu117 appended to CC. +## If your compiler is so old as to not support C17, select C11 or even C99 +## by e.g. 'CC17=gcc -std=gnu11' +## CC17= +## C17FLAGS= + +## Ditto for a compiler that supports C23 features. +## For example 'CC23=clang-15 -std=gnu2x' +## Eventually -std=gnu23 will be supported and preferred. +## Default to CC and CFLAGS with any -std options removed, then +## -std=gmu2x appended to CC. +## CC23= +## C23FLAGS= + +## Ditto for a compiler that follows the C90 or C99 standard. +## For example 'CC99=gcc -std=gnu99' +### Default to CC and CFLAGS with any -std options removed, then +## -std=gmu90 or gnu99 appended to CC. +## CC90= +## C90FLAGS= +## CC99= +## C99FLAGS= + +## Defines for C compilation. +## Use this to specify defines to be used in the compilation of R, +## DEFS= + +## The following additional CFLAGS to be used only in the main +## compilation and only in building shared objects respectively. +## For example, on some systems one needs 'MAIN_CFLAGS=-pg' when +## profiling. +## NOTE: These apply to Rscript +MAIN_CFLAGS="--pre-js ${RECIPE_DIR}/pre.js \ +-sWASM_BIGINT \ +-sMAIN_MODULE=1 \ +-sSTACK_SIZE=5MB \ +-sALLOW_MEMORY_GROWTH=1 \ +-sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings,TTY \ +-sFORCE_FILESYSTEM=1 \ +-sINVOKE_RUN=0 \ +-sMODULARIZE" +SHLIB_CFLAGS="-sSIDE_MODULE=1" + +## Header file search directory ('-IDIR') and any other miscellaneous +## options (such as defines) for the C preprocessor and compiler. +## If unset defaults to '-I/usr/local/include', with '-I/ssw/include' +## prepended on systems using Fink with root '/sw'. +CPPFLAGS="-I$PREFIX/include" + +## The command which runs the Fortran compiler. +## Used for both fixed-form and free-form Fortran +## If this is a wrapper it should pass on --version to the real compiler. +FC=flang-new + +## Options for the Fortran compiler. +## Use this to specify comilation flags for fixed-form Fortran. +FFLAGS="-g --target=wasm32-unknown-emscripten -fPIC" +## Ditto for free-form Fortran. +## FCFLAGS= +## If just one of these is set, it is used for both. +## If both are unspecified, defaults to '-g -O2' for gfortran, +## otherwise '-g' if this is accepted, otherwise ''. +## Use these if the compiler needs flags such as --free, -qfixed and +## cannot determine which from the source-file extension. + +## macros for compiling by Fortran (for use in Makefiles) +## SHLIB_FCLD=${FC} +## Unlike SHLIB_CXXLDFLAGS, SHLIB_FCLDFLAGS is never additional +## SHLIB_FCLDFLAGS=${SHLIB_LDFLAGS} + +## Additional libraries needed to link a shared object with FC, +## e.g. on x86 Solaris +# FCLIBS_XTRA= + +## Options for safe compilation under the Fortran compiler. +## Use this to specify FFLAGS for the version of the compiler specified +## above, using as accurate a result as possible, e.g. no optimization +## or using -ffloat-store. +## SAFE_FFLAGS= + +## The following additional FFLAGS to be used only in the main +## compilation and only in building shared objects respectively. +## For example, on some systems one needs 'MAIN_FFLAGS=-pg' when +## profiling. +## MAIN_FFLAGS= +## SHLIB_FFLAGS= + +## The command to be used to load the main R binary. +## This is usually the C compiler, but the automatic +## choice can be overridden by means of this variable. +## MAIN_LD= + +## The flags which are necessary for loading main program which will +## load DLLs at runtime. HP-UX and Linux-elf are examples of platforms +## which use this. Those platforms are already taken care of by +## configure, and anything set here will be in addition unless MAIN_LD +## is given. +## For example, one can set flags for profiling here. +## NOTE: These apply to R.bin +MAIN_LDFLAGS="--pre-js ${RECIPE_DIR}/pre.js \ +-sWASM_BIGINT \ +-sMAIN_MODULE=1 \ +-sSTACK_SIZE=5MB \ +-sALLOW_MEMORY_GROWTH=1 \ +-sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings,TTY \ +-sFORCE_FILESYSTEM=1 \ +-sINVOKE_RUN=0" + # -sMODULIRIZE=1 \ + # -sEXPORT_NAME=R" + +## Any special flags which must be used when compiling C code to be +## turned into a shared object. This is typically something like +## '-fpic' or '-fPIC'. If this variable is left unspecified an attempt +## is made to automatically detect the correct value. +CPICFLAGS="-fPIC" + +## The following variable can be used to provide any PIC flags for the +## Fortran compiler. If this variable is left unspecified an +## attempt is made to automatically detect the correct value. +FPICFLAGS="-fPIC" + +## The following variable can be used to provide any PIE flags for the +## Fortran compiler. Currently only needed when using gfortran on +## Linux in conjuunction with a default build of clang 15 where it needs +## to be set to -fPIE: configure tries that value if unset. +## FPIEFLAGS= + +## The command to be used to create shared objects which contain object +## files from a C or Fortran compiler only. This is usually the C +## compiler or 'ld', but the automatic choice can be overridden by means +## of this variable. +## SHLIB_LD= + +## Any special flags which are required by the linker when creating +## shared objects containing object files from a C or Fortran +## compiler only. This is usually automatically detected by configure, +## and anything set here will be in addition unless SHLIB_LD is given. +## On platforms using the GNU lnker, -shared. +## On macOS, the default is +## -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup +## For other platforms, see configure.ac +SHLIB_LDFLAGS="-sSIDE_MODULE=1" + +## ditto for a dynamic library: DYLIB_LDFLAGS defaults to SHLIB_LDFLAGS +## DYLIB_LD= +## DYLIB_LDFLAGS= + +## The appropriate 'lib' dir, normally 'lib', but 'lib64' on Linux on +## x86_64, mips64, ppc64, sparc64, s390x but not ia64 (except Debian +## and derivatives). +## LIBnn= + +## Path ('-L'), and any other miscellaneous options for the linker. +## '-L' options set here will be prepended to LD_LIBRARY_PATH (or its +## system equivalent) at run time. +## If unset defaults to '-L/usr/local/lib', with '-L/sw/lib' prepended +## on macOS systems using Fink with root '/sw'. +## On some Linux 64-bit systems its default is -L/usr/local/lib64. +## If LIBnn is set it defaults to -L/usr/local/$LIBnn. +LDFLAGS="-L$PREFIX/lib" + + +## The command which runs the C++ compiler. +## This is optional, for use in packages. +## If not specified, configure +## uses the values of the environment variables 'CXX' or 'CCC' if set, +## and then looks under the names 'c++', 'g++', 'CC' and more OS-specific +## names (from autoconf). +## If this is a wrapper it should pass on --version to the real compiler. +CXX=em++ + +## Options for the C++ compiler. +CXXFLAGS="-sWASM_BIGINT" + +## Any special flags which must be used when compiling C++ code to be +## turned into a shared object. If this variable is left unspecified +## an attempt is made to automatically detect the correct value. +CXXPICFLAGS="-sSIDE_MODULE=1" + +## Option to specify the default C++ standard, +## e.g. -std=c++14 or -std=gnu++14 +## CXXSTD= + +## The command to be used to load shared objects which contain object +## files from the C++ compiler. This is usually the C++ compiler/linker, +## but the automatic choice can be overridden by means of this +## variable. (Include $(CXXSTD) if set.) +## SHLIB_CXXLD= + +## Any special flags which are required when creating shared objects +## containing object files from a C++ compiler. This is usually +## automatically detected by configure, and anything set here will be in +## addition unless SHLIB_CXXLD is given. +SHLIB_CXXLDFLAGS="-sSIDE_MODULE=1" + +## Not used by R but configure can fail to find it, so set to +## "$CXX -E" if it does. +## CXXCPP= + +## Objective-C(++), mainly for macOS +## On macOS, Apple clang with additional gcc flag -fobjc-exceptions +## OBJC= +## OBJCFLAGS= +## OBJC_LIBS- +## Objective-C compiler, usually the same as $CXX $CXXSTD +## OBJCXX= + +## Tcl/Tk settings. +## Use TCLTK_LIBS for all '-L' and '-l' options needed for linking +## against the Tcl and Tk library. +## TCLTK_LIBS= +## Use TCLTK_CPPFLAGS for all '-I' options needed for finding the tcl.h +## and tk.h headers. +## TCLTK_CPPFLAGS= + +## Browser default +## Default setting for the R_BROWSER env variable +## If unset configure searches in turn for (currently) +## firefox mozilla galeon opera xdg-open kfmclient gnome-moz-remote open +## and uses the full path of the first it finds. +## R_BROWSER= + +## BLAS and LAPACK settings +## Use BLAS_LIBS for all '-L' and '-l' options needed for linking +## against an external BLAS implementation. +# BLAS_LIBS= +## Use LAPACK_LIBS for all '-L' and '-l' options needed for linking +## against an external LAPACK implementation. +## Note that (see R-admin) that our main intention is to allow a +## LAPACK-containing BLAS to be used, so this is rarely needed, and +## it is not used if the BLAS already contains LAPACK. +## LAPACK_LIBS= + +## Make name or path +## Set this if you want to use a make by another name. +## For example, if your GNU make is called 'gmake', use 'MAKE=gmake'. +## MAKE= + +## Tar name or path +## Set this to prefer a tar which has the capability to automagically +## read compressed archives. The default is to choose 'gtar' or +## 'gnutar'(normally GNU tar) then 'tar'. +## Note that 'bsdtar' (from the libarchive project) is known to create +## archives in a non-POSIX format that other tars and untar() cannot +## read, so should be avoided. +## TAR= + +## Dynamic library path +## This is be default created from libraries added to LIBS. +## Used for DYLD_FALLBACK_LIBRARY_PATH on macOS and LD_LIBRARY_PATH elsewhere. +## Allow user to override. +## R_LD_LIBRARY_PATH= + +## C++11 compiler, optional for use in packages. +## Introduced in R 3.1.0 +## The command which runs the C++11 compiler: defaults to $(CXX), but +## empty if that (plus standard) cannot compile the tested C++11 code. +## CXX11= + +## The 'standard' for the C++11 compiler, which is invoked as +## $(CXX11) $(CXX11STD) for both compiling and linking DSOs/DLLs. +## '-std=gnu++11' and '-std=gnu++0x' are tried in turn by configure. +## followed by '-std=c++11' and '-std=c++0x' +## CXX11STD= + +## Analogues for the C++11 compiler: default to the settings for C++ +## CXX11FLAGS= +## CXX11PICFLAGS= +## SHLIB_CXX11LD= +## SHLIB_CXX11LDFLAGS= + +## C++14 compiler, optional for use in packages. +## Introduced in R 3.4.0 +## The command which runs the C++14 compiler: defaults to $(CXX11), but +## empty if that (plus standard) cannot compile the tested C++14 code. +## CXX14= + +## The 'standard' for the C++14 compiler, which is invoked as +## $(CXX14) $(CXX14STD) for both compiling and linking DSOs/DLLs. +## '-std=gnu++14' and '-std=gnu++1y" are tried by configure, also +## '-std=c++14' and '-std=c++1y" +## CXX14STD= + +## Analogues for the C++14 compiler: default to the settings for C++11 +## CXX14FLAGS= +## CXX14PICFLAGS= +## SHLIB_CXX14LD= +## SHLIB_CXX14LDFLAGS= + +## C++17 compiler, optional for use in packages. +## Introduced in R 3.4.0 +## The command which runs the C++17 compiler: defaults to $(CXX14), but +## empty if that (plus standard) cannot compile the tested C++17 code. +## CXX17= + +## The 'standard' for the C++17 compiler, which is invoked as +## $(CXX17) $(CXX17STD) for both compiling and linking DSOs/DLLs. +## '-std=gnu++17' and '-std=gnu++1z" are tried by configure, also +## '-std=c++17' and '-std=c++1z" +## CXX17STD= + +## Analogues for the C++17 compiler: default to the settings for C++14 +## CXX17FLAGS= +## CXX17PICFLAGS= +## SHLIB_CXX17LD= +## SHLIB_CXX17LDFLAGS= + +## C++20 compiler, optional for use in packages. +## Introduced in R 4.0.0 +## The command which runs the C++20 compiler: defaults to $(CXX17), but +## empty if that (plus standard) cannot compile the tested C++20 code. +## CXX20= + +## The 'standard' for the C++20 compiler, which is invoked as +## $(CXX20) $(CXX20STD) for both compiling and linking DSOs/DLLs. +## '-std=gnu++20' and '-std=gnu++2a" are tried by configure, also +## '-std=c++20' and '-std=c++2a" +## CXX20STD= + +## Analogues for the C++20 compiler: default to the settings for C++17 +## CXX20FLAGS= +## CXX20PICFLAGS= +## SHLIB_CXX20LD= +## SHLIB_CXX20LDFLAGS= + +## C++23 compiler, optional for use in packages. +## Introduced in R 4.3.0 +## The command which runs the C++23 compiler: defaults to $(CXX17), but +## empty if that (plus standard) cannot compile the tested C++23 code. +## CXX23= + +## The 'standard' for the C++23 compiler, which is invoked as +## $(CXX23) $(CXX23STD) for both compiling and linking DSOs/DLLs. +## '-std=gnu++23' and '-std=gnu++2a" are tried by configure, also +## '-std=c++23' and '-std=c++2a" +## CXX23STD= + +## Analogues for the C++23 compiler: default to the settings for C++17 +## CXX23FLAGS= +## CXX23PICFLAGS= +## SHLIB_CXX23LD= +## SHLIB_CXX23LDFLAGS= + +## Additional libraries to link the internet module against. +## Some claim Solaris needs -lsocket -lnsl +## INTERNET_LIBS= + +## Script from texinfo 5.1 or later. +## Usually the full path to texi2any. +## TEXI2ANY= + +## Full path to version of curl-config to be used +## CURL_CONFIG= +## Use these to override curl-config if needed. +## Used as from R 3.2.0. +## CURL_CPPFLAGS= +## CURL_LIBS= +## To force a static link use the line below: this is only needed +## if both shared and static libcurl libraries were installed (and +## not guaranteed to work then). +## CURL_LIBS=`curl-config --static-libs` + +## Path to the version of pkg-config to be used for locating cairographics, +## and possibly jpeg, libpng and libtiff. +## PKG_CONFIG= +## search path for pkg-config +## PKG_CONFIG_PATH= +## path overriding pkg-config's default search path +## PKG_CONFIG_LIBDIR= + +## OpenMP settings. +## The configure code is conservative about enabling OpenMP +## so use can be forced here (or non-use if set but empty). +## For packages (note that SHLIB_OPENMP_CXXFLAGS is for CXX, not +## necessarily for CXX11/14/17/20/23). +## SHLIB_OPENMP_CFLAGS= +## SHLIB_OPENMP_CXXFLAGS= +## SHLIB_OPENMP_FFLAGS= +## For R itself (src/main/array.c and src/library/stats/src/distance.c) +## R_OPENMP_CFLAGS= + +## POSIX threads setting +## pthreads is used in src/main/eval.c. The configure code sees if +## any flag is needed to link to pthread functions (after the OpenMP +## CFLAGS) and if so tries -pthread. Setting this allows an +## alternative to be tried immediately before -pthread. +## PTHREAD_OPT= + +## Visibility settings +## Allow user to override the configure checks if they know what they +## are doing. +## C_VISIBILITY= +## CXX_VISIBILITY= +## F_VISIBILITY= + +## Fortran-C compatibility +## The C type used (if any) by Fortran to pass 'hidden' character lengths. +## Often size_t (unsigned int or long, or long long in Win64) +## configure tests if size_t works (which it does on gfortran < 8 +## where int is used). +## Allow user to override the configure checks if they know what they +## are doing (the value is unchecked). Empty values are ignored. +## FC_LEN_T=size_t + +## C Stack Direction +## In case optimization defeats the configure test: 'down' (the usual) or 'up' +## R_C_STACK_DIRECTION= + +## Commands which might need to be set for LTO builds +## Typical values for LTO are gcc-ar, gcc-nm and gcc-ranlib +AR=emar +NM=llvm-nm +RANLIB=emranlib +## +## The LTO macro, defaulting to -flto +## Could be e.g. -flto=8 for GCC or -flto=thin for clang. +## LTO= +## Ditto for the Fortran compiler, defaulting to the value of LTO. +## LTO_FC= +## +## Flags for linking with LTO in addition to $(LTO), e.g. to +## parallelize ThinLTO or to change linker such as -fuse-ld=gold or +## -fuse-ld=lld (with gcc or clang). +## LTO_LD= + +## To allow reduced optimization for src/unix/sys-unix.c with Intel icx +## -O0 and -O1 seem to work with 2023.2.0 +## INTEL_ICX_FIX=-O0 + +## Programs which configure will look for on the path +## AR +## GETWD=pwd +## A BSD-compatible install program or script: +## tries ginstall scoinst install and falls back to tools/install-sh +## INSTALL +## LN_S="ln -s" +## MAKE +## Tries less more page pg in turn +## PAGER +## PAPERCONF +## Tries pkg-config then pkgconf +## PKG_CONFIG +## RANLIB +## REALPATH +## Tries gtar gnutar tar +## TAR +## XMKMF +## R_BZIPCMD=bzip2 +## R_GZIPCMD=gzip +## looks for lpr then lp +## R_PRINTCMD +## tries firefox mozilla galeon opera xdg-open kfmclient gnome-moz-remote open +## R_BROWSER +## tries acroread acroread4 xdg-open evince xpdf gv gnome-gv ggv +## okular kpdf open gpdf kghostview +## R_PDFVIEWER +## R_TEXI2DVICMD +## R_UNZIPCMD=unzip +## R_ZIPCMD=zip + +## Tries ginstall-info install-info +## INSTALL_INFO +## KPSEWHICH +## MAKEINDEX +## PDFLATEX +## PDFTEX +## TEXI2ANY +## TEXI2DVI + +## The exception, looked for in /usr/xpg4/bin before the path +## SED=sed + +## Additional +## NOTE: Required, otherwise it tries to link against libclang_rt.builtins.a +## which doesn't exist. +FCLIBS="-lFortranRuntime" diff --git a/recipes/recipes_emscripten/r-base/patches/0001-Fix-bad-substitution-error.patch b/recipes/recipes_emscripten/r-base/patches/0001-Fix-bad-substitution-error.patch new file mode 100644 index 000000000..34b81c413 --- /dev/null +++ b/recipes/recipes_emscripten/r-base/patches/0001-Fix-bad-substitution-error.patch @@ -0,0 +1,45 @@ +From c4a8150024ae0942ab18d993c6c4617a6d405e65 Mon Sep 17 00:00:00 2001 +From: Isabel Paredes +Date: Wed, 21 Aug 2024 11:42:12 +0200 +Subject: [PATCH 1/9] Fix bad substitution error + +--- + configure | 4 ++-- + etc/ldpaths.in | 12 ++++++------ + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/configure b/configure +index a9a29c0..da201a5 100644 +--- a/configure ++++ b/configure +@@ -24559,8 +24559,8 @@ case "${host_os}" in + esac + + ## Export LD_LIBRARY_PATH or equivalent. +-if eval "test -z \"\${${Rshlibpath_var}}\""; then +- eval "${Rshlibpath_var}=\"${R_LD_LIBRARY_PATH}\"" ++if test -z ${Rshlibpath_var}; then ++ export Rshlibpath_var=${R_LD_LIBRARY_PATH} + else + eval "${Rshlibpath_var}=\"${R_LD_LIBRARY_PATH}${PATH_SEPARATOR}\${${Rshlibpath_var}}\"" + fi +diff --git a/etc/ldpaths.in b/etc/ldpaths.in +index 314d364..ac201a8 100644 +--- a/etc/ldpaths.in ++++ b/etc/ldpaths.in +@@ -13,9 +13,9 @@ fi + ## However, on macOS >=10.11 (if SIP is enabled, the default), the + ## environment value will not be passed to a script such as R.sh, so + ## would not seen here. +-if test -z "${@Rshlibpath_var@}"; then +- @Rshlibpath_var@="${R_LD_LIBRARY_PATH}" +-else +- @Rshlibpath_var@="${R_LD_LIBRARY_PATH}:${@Rshlibpath_var@}" +-fi +-export @Rshlibpath_var@ ++# if test -z "${@Rshlibpath_var@}"; then ++# @Rshlibpath_var@="${R_LD_LIBRARY_PATH}" ++# else ++# @Rshlibpath_var@="${R_LD_LIBRARY_PATH}:${@Rshlibpath_var@}" ++# fi ++# export @Rshlibpath_var@ diff --git a/recipes/recipes_emscripten/r-base/patches/0002-Disable-libcurl.patch b/recipes/recipes_emscripten/r-base/patches/0002-Disable-libcurl.patch new file mode 100644 index 000000000..9eee29c03 --- /dev/null +++ b/recipes/recipes_emscripten/r-base/patches/0002-Disable-libcurl.patch @@ -0,0 +1,410 @@ +From d276ebc10b6aafdfdb5094c947ce148221349ef7 Mon Sep 17 00:00:00 2001 +From: Isabel Paredes +Date: Wed, 21 Aug 2024 12:36:59 +0200 +Subject: [PATCH 2/9] Disable libcurl + +--- + configure | 388 +++++++++++++++++++++++++++--------------------------- + 1 file changed, 194 insertions(+), 194 deletions(-) + +diff --git a/configure b/configure +index da201a5..59ed097 100644 +--- a/configure ++++ b/configure +@@ -53144,202 +53144,202 @@ fi + + + +-## libcurl +- +-# Extract the first word of "curl-config", so it can be a program name with args. +-set dummy curl-config; ac_word=$2 +-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +-printf %s "checking for $ac_word... " >&6; } +-if test ${ac_cv_path_CURL_CONFIG+y} +-then : +- printf %s "(cached) " >&6 +-else case e in #( +- e) case $CURL_CONFIG in +- [\\/]* | ?:[\\/]*) +- ac_cv_path_CURL_CONFIG="$CURL_CONFIG" # Let the user override the test with a path. +- ;; +- *) +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- case $as_dir in #((( +- '') as_dir=./ ;; +- */) ;; +- *) as_dir=$as_dir/ ;; +- esac +- for ac_exec_ext in '' $ac_executable_extensions; do +- if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then +- ac_cv_path_CURL_CONFIG="$as_dir$ac_word$ac_exec_ext" +- printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +- done +-IFS=$as_save_IFS +- +- ;; +-esac ;; +-esac +-fi +-CURL_CONFIG=$ac_cv_path_CURL_CONFIG +-if test -n "$CURL_CONFIG"; then +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CURL_CONFIG" >&5 +-printf "%s\n" "$CURL_CONFIG" >&6; } +-else +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-printf "%s\n" "no" >&6; } +-fi +- +- +-if test -n "${CURL_CONFIG}"; then +- echo "checking libcurl version ..." \ +- `${CURL_CONFIG} --version | sed -e 's,^[^0-9]*,,'` +- if test -z "${CURL_CPPFLAGS}"; then +- CURL_CPPFLAGS=`${CURL_CONFIG} --cflags` +- fi +- ## This should be correct for a static-only build, user will +- ## need to override to specify static linking (see config.site) +- ## SU: No, it's not, unfortunately, we have to use --static-libs +- ## for static-only builds as those provide incomplete flags with --libs +- if test -z "${CURL_LIBS}"; then +- if test x`${CURL_CONFIG} --built-shared` = xno; then +- CURL_LIBS=`${CURL_CONFIG} --static-libs` +- else +- CURL_LIBS=`${CURL_CONFIG} --libs` +- fi +- fi +-fi +-r_save_CPPFLAGS="${CPPFLAGS}" +-CPPFLAGS="${CURL_CPPFLAGS} ${CPPFLAGS}" +-r_save_LIBS="${LIBS}" +-LIBS="${CURL_LIBS} ${LIBS}" +- for ac_header in curl/curl.h +-do : +- ac_fn_c_check_header_compile "$LINENO" "curl/curl.h" "ac_cv_header_curl_curl_h" "$ac_includes_default" +-if test "x$ac_cv_header_curl_curl_h" = xyes +-then : +- printf "%s\n" "#define HAVE_CURL_CURL_H 1" >>confdefs.h +- have_libcurl=yes +-else case e in #( +- e) have_libcurl=no ;; +-esac +-fi +- +-done +- +-if test "x${have_libcurl}" = "xyes"; then +-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libcurl is >= 7.28.0" >&5 +-printf %s "checking if libcurl is >= 7.28.0... " >&6; } +-if test ${r_cv_have_curl728+y} +-then : +- printf %s "(cached) " >&6 +-else case e in #( +- e) if test "$cross_compiling" = yes +-then : +- r_cv_have_curl728=no +-else case e in #( +- e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-#include +-#include +-int main(void) +-{ +-#ifdef LIBCURL_VERSION_MAJOR +-#if LIBCURL_VERSION_MAJOR > 7 +- exit(0); +-#elif LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 28 +- exit(0); +-#else +- exit(1); +-#endif +-#else +- exit(1); +-#endif +-} +- +-_ACEOF +-if ac_fn_c_try_run "$LINENO" +-then : +- r_cv_have_curl728=yes +-else case e in #( +- e) r_cv_have_curl728=no ;; +-esac +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +-esac +-fi +- ;; +-esac +-fi +-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $r_cv_have_curl728" >&5 +-printf "%s\n" "$r_cv_have_curl728" >&6; } +-fi +-if test "x${r_cv_have_curl728}" = xno; then +- have_libcurl=no +-fi +- +-if test "x${have_libcurl}" = "xyes"; then +-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libcurl supports https" >&5 +-printf %s "checking if libcurl supports https... " >&6; } +-if test ${r_cv_have_curl_https+y} +-then : +- printf %s "(cached) " >&6 +-else case e in #( +- e) if test "$cross_compiling" = yes +-then : +- r_cv_have_curl_https=no +-else case e in #( +- e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-#include // for exit +-#include +-#include +-int main(void) +-{ +- curl_version_info_data *data = curl_version_info(CURLVERSION_NOW); +- const char * const *p = data->protocols; +- int found = 0; +- for (; *p; p++) +- if(strcmp(*p, "https") == 0) {found = 1; break;} +- exit(found ? 0 : 1); +-} +- +-_ACEOF +-if ac_fn_c_try_run "$LINENO" +-then : +- r_cv_have_curl_https=yes +-else case e in #( +- e) r_cv_have_curl_https=no ;; +-esac +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +-esac +-fi +- ;; +-esac +-fi +-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $r_cv_have_curl_https" >&5 +-printf "%s\n" "$r_cv_have_curl_https" >&6; } +-fi +-if test "x${r_cv_have_curl_https}" = xno; then +- have_libcurl=no +-fi +-if test "x${have_libcurl}" = xyes; then +- +-printf "%s\n" "#define HAVE_LIBCURL 1" >>confdefs.h +- +- CPPFLAGS="${r_save_CPPFLAGS}" +- LIBS="${r_save_LIBS}" ++# ## libcurl ++ ++# # Extract the first word of "curl-config", so it can be a program name with args. ++# set dummy curl-config; ac_word=$2 ++# { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++# printf %s "checking for $ac_word... " >&6; } ++# if test ${ac_cv_path_CURL_CONFIG+y} ++# then : ++# printf %s "(cached) " >&6 ++# else case e in #( ++# e) case $CURL_CONFIG in ++# [\\/]* | ?:[\\/]*) ++# ac_cv_path_CURL_CONFIG="$CURL_CONFIG" # Let the user override the test with a path. ++# ;; ++# *) ++# as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++# for as_dir in $PATH ++# do ++# IFS=$as_save_IFS ++# case $as_dir in #((( ++# '') as_dir=./ ;; ++# */) ;; ++# *) as_dir=$as_dir/ ;; ++# esac ++# for ac_exec_ext in '' $ac_executable_extensions; do ++# if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ++# ac_cv_path_CURL_CONFIG="$as_dir$ac_word$ac_exec_ext" ++# printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 ++# break 2 ++# fi ++# done ++# done ++# IFS=$as_save_IFS ++ ++# ;; ++# esac ;; ++# esac ++# fi ++# CURL_CONFIG=$ac_cv_path_CURL_CONFIG ++# if test -n "$CURL_CONFIG"; then ++# { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CURL_CONFIG" >&5 ++# printf "%s\n" "$CURL_CONFIG" >&6; } ++# else ++# { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++# printf "%s\n" "no" >&6; } ++# fi ++ ++ ++# if test -n "${CURL_CONFIG}"; then ++# echo "checking libcurl version ..." \ ++# `${CURL_CONFIG} --version | sed -e 's,^[^0-9]*,,'` ++# if test -z "${CURL_CPPFLAGS}"; then ++# CURL_CPPFLAGS=`${CURL_CONFIG} --cflags` ++# fi ++# ## This should be correct for a static-only build, user will ++# ## need to override to specify static linking (see config.site) ++# ## SU: No, it's not, unfortunately, we have to use --static-libs ++# ## for static-only builds as those provide incomplete flags with --libs ++# if test -z "${CURL_LIBS}"; then ++# if test x`${CURL_CONFIG} --built-shared` = xno; then ++# CURL_LIBS=`${CURL_CONFIG} --static-libs` ++# else ++# CURL_LIBS=`${CURL_CONFIG} --libs` ++# fi ++# fi ++# fi ++# r_save_CPPFLAGS="${CPPFLAGS}" ++# CPPFLAGS="${CURL_CPPFLAGS} ${CPPFLAGS}" ++# r_save_LIBS="${LIBS}" ++# LIBS="${CURL_LIBS} ${LIBS}" ++# for ac_header in curl/curl.h ++# do : ++# ac_fn_c_check_header_compile "$LINENO" "curl/curl.h" "ac_cv_header_curl_curl_h" "$ac_includes_default" ++# if test "x$ac_cv_header_curl_curl_h" = xyes ++# then : ++# printf "%s\n" "#define HAVE_CURL_CURL_H 1" >>confdefs.h ++# have_libcurl=yes ++# else case e in #( ++# e) have_libcurl=no ;; ++# esac ++# fi ++ ++# done ++ ++# if test "x${have_libcurl}" = "xyes"; then ++# { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libcurl is >= 7.28.0" >&5 ++# printf %s "checking if libcurl is >= 7.28.0... " >&6; } ++# if test ${r_cv_have_curl728+y} ++# then : ++# printf %s "(cached) " >&6 ++# else case e in #( ++# e) if test "$cross_compiling" = yes ++# then : ++# r_cv_have_curl728=no ++# else case e in #( ++# e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++# /* end confdefs.h. */ ++ ++# #include ++# #include ++# int main(void) ++# { ++# #ifdef LIBCURL_VERSION_MAJOR ++# #if LIBCURL_VERSION_MAJOR > 7 ++# exit(0); ++# #elif LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 28 ++# exit(0); ++# #else ++# exit(1); ++# #endif ++# #else ++# exit(1); ++# #endif ++# } ++ ++# _ACEOF ++# if ac_fn_c_try_run "$LINENO" ++# then : ++# r_cv_have_curl728=yes ++# else case e in #( ++# e) r_cv_have_curl728=no ;; ++# esac ++# fi ++# rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++# conftest.$ac_objext conftest.beam conftest.$ac_ext ;; ++# esac ++# fi ++# ;; ++# esac ++# fi ++# { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $r_cv_have_curl728" >&5 ++# printf "%s\n" "$r_cv_have_curl728" >&6; } ++# fi ++# if test "x${r_cv_have_curl728}" = xno; then ++# have_libcurl=no ++# fi ++ ++# if test "x${have_libcurl}" = "xyes"; then ++# { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libcurl supports https" >&5 ++# printf %s "checking if libcurl supports https... " >&6; } ++# if test ${r_cv_have_curl_https+y} ++# then : ++# printf %s "(cached) " >&6 ++# else case e in #( ++# e) if test "$cross_compiling" = yes ++# then : ++# r_cv_have_curl_https=no ++# else case e in #( ++# e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++# /* end confdefs.h. */ ++ ++# #include // for exit ++# #include ++# #include ++# int main(void) ++# { ++# curl_version_info_data *data = curl_version_info(CURLVERSION_NOW); ++# const char * const *p = data->protocols; ++# int found = 0; ++# for (; *p; p++) ++# if(strcmp(*p, "https") == 0) {found = 1; break;} ++# exit(found ? 0 : 1); ++# } ++ ++# _ACEOF ++# if ac_fn_c_try_run "$LINENO" ++# then : ++# r_cv_have_curl_https=yes ++# else case e in #( ++# e) r_cv_have_curl_https=no ;; ++# esac ++# fi ++# rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++# conftest.$ac_objext conftest.beam conftest.$ac_ext ;; ++# esac ++# fi ++# ;; ++# esac ++# fi ++# { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $r_cv_have_curl_https" >&5 ++# printf "%s\n" "$r_cv_have_curl_https" >&6; } ++# fi ++# if test "x${r_cv_have_curl_https}" = xno; then ++# have_libcurl=no ++# fi ++# if test "x${have_libcurl}" = xyes; then ++ ++# printf "%s\n" "#define HAVE_LIBCURL 1" >>confdefs.h ++ ++# CPPFLAGS="${r_save_CPPFLAGS}" ++# LIBS="${r_save_LIBS}" + + +-else +- as_fn_error $? "libcurl >= 7.28.0 library and headers are required with support for https" "$LINENO" 5 +-fi ++# else ++# as_fn_error $? "WARNING: libcurl >= 7.28.0 library and headers are required with support for https" "$LINENO" 5 ++# fi + + + diff --git a/recipes/recipes_emscripten/r-base/patches/0003-Remove-unsupported-sigsuspend.patch b/recipes/recipes_emscripten/r-base/patches/0003-Remove-unsupported-sigsuspend.patch new file mode 100644 index 000000000..82edfc87f --- /dev/null +++ b/recipes/recipes_emscripten/r-base/patches/0003-Remove-unsupported-sigsuspend.patch @@ -0,0 +1,23 @@ +From 7355d92d5ade339ef4de076bc3d8a5b7772bed4f Mon Sep 17 00:00:00 2001 +From: Isabel Paredes +Date: Wed, 21 Aug 2024 12:42:11 +0200 +Subject: [PATCH 3/9] Remove unsupported sigsuspend + +--- + src/unix/sys-unix.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/unix/sys-unix.c b/src/unix/sys-unix.c +index c20afe6..f6ac6a9 100644 +--- a/src/unix/sys-unix.c ++++ b/src/unix/sys-unix.c +@@ -480,7 +480,8 @@ static pid_t timeout_wait(int *wstatus) + + int saveerrno = errno; + while((wres = waitpid(tost.child_pid, wstatus, WNOHANG)) == 0) +- sigsuspend(&unblocked_ss); ++ // sigsuspend(&unblocked_ss); Not implemented in Emscripten ++ errno = EINTR; + + if (errno == EINTR) + /* EINTR is not really an error but expected situation here, however, diff --git a/recipes/recipes_emscripten/r-base/patches/0004-Disable-internet-module.patch b/recipes/recipes_emscripten/r-base/patches/0004-Disable-internet-module.patch new file mode 100644 index 000000000..536da9fe9 --- /dev/null +++ b/recipes/recipes_emscripten/r-base/patches/0004-Disable-internet-module.patch @@ -0,0 +1,40 @@ +From 05934ca9fc8ba8e1383266cc82d9b73bb2eb4df7 Mon Sep 17 00:00:00 2001 +From: Isabel Paredes +Date: Wed, 21 Aug 2024 12:56:23 +0200 +Subject: [PATCH 4/9] Disable internet module + +--- + src/modules/Makefile.in | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/src/modules/Makefile.in b/src/modules/Makefile.in +index 9ff2a61..05ebf4a 100644 +--- a/src/modules/Makefile.in ++++ b/src/modules/Makefile.in +@@ -13,23 +13,20 @@ include $(top_builddir)/Makeconf + distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + DISTFILES = Makefile.in Makefile.win + +-SUBDIRS = X11 internet lapack ++SUBDIRS = X11 lapack + +-MODULES = internet lapack @BUILD_X11_TRUE@X11 ++MODULES = lapack @BUILD_X11_TRUE@X11 + + all: Makefile R + + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + +-R: Makefile make.internet make.lapack @BUILD_X11_TRUE@make.X11 ++R: Makefile make.lapack @BUILD_X11_TRUE@make.X11 + + make.X11: Makefile + @(cd X11 && $(MAKE)) + +-make.internet: Makefile +- @(cd internet && $(MAKE)) +- + make.lapack: Makefile + @(cd lapack && $(MAKE)) + diff --git a/recipes/recipes_emscripten/r-base/patches/0005-Use-R-binary-from-build-prefix.patch b/recipes/recipes_emscripten/r-base/patches/0005-Use-R-binary-from-build-prefix.patch new file mode 100644 index 000000000..5d362b397 --- /dev/null +++ b/recipes/recipes_emscripten/r-base/patches/0005-Use-R-binary-from-build-prefix.patch @@ -0,0 +1,25 @@ +From 20e0c7a1fbef6b570dd17e9ca8d1c9f763b61d6f Mon Sep 17 00:00:00 2001 +From: Isabel Paredes +Date: Wed, 21 Aug 2024 13:07:43 +0200 +Subject: [PATCH 5/9] Use R binary from build prefix + +--- + src/scripts/R.sh.in | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/scripts/R.sh.in b/src/scripts/R.sh.in +index cdbac8b..9b82870 100644 +--- a/src/scripts/R.sh.in ++++ b/src/scripts/R.sh.in +@@ -249,7 +249,10 @@ done + + . "${R_HOME}/etc${R_ARCH}/ldpaths" + +-R_binary="${R_HOME}/bin/exec${R_ARCH}/R" ++# This does not work when cross-compiling because the R binary is JavaScript ++# R_binary="${R_HOME}/bin/exec${R_ARCH}/R" ++R_binary="${BUILD_PREFIX}/bin/R" ++ + export R_ARCH + + case "${gui}" in diff --git a/recipes/recipes_emscripten/r-base/patches/0006-Ignore-crude-heuristic-file-size.patch b/recipes/recipes_emscripten/r-base/patches/0006-Ignore-crude-heuristic-file-size.patch new file mode 100644 index 000000000..d97126c0d --- /dev/null +++ b/recipes/recipes_emscripten/r-base/patches/0006-Ignore-crude-heuristic-file-size.patch @@ -0,0 +1,22 @@ +From 52092644845f90984a98e854d0409b7c0a21e6a0 Mon Sep 17 00:00:00 2001 +From: Isabel Paredes +Date: Wed, 21 Aug 2024 13:09:01 +0200 +Subject: [PATCH 6/9] Ignore crude heuristic file size + +--- + src/library/base/makebasedb.R | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/library/base/makebasedb.R b/src/library/base/makebasedb.R +index 8922fdc..a555077 100644 +--- a/src/library/base/makebasedb.R ++++ b/src/library/base/makebasedb.R +@@ -119,7 +119,7 @@ local({ + baseFileBase <- file.path(.Library,"base","R","base") + + if (file.info(baseFileBase)["size"] < 20000) # crude heuristic +- stop("may already be using lazy loading on base"); ++ message("WARNING: may already be using lazy loading on base"); + + basevars <- ls(baseenv(), all.names=TRUE) + prims <- basevars[sapply(basevars, function(n) is.primitive(get(n, baseenv())))] diff --git a/recipes/recipes_emscripten/r-base/patches/0007-Build-docs-with-Rscript-binary.patch b/recipes/recipes_emscripten/r-base/patches/0007-Build-docs-with-Rscript-binary.patch new file mode 100644 index 000000000..8b2f76aff --- /dev/null +++ b/recipes/recipes_emscripten/r-base/patches/0007-Build-docs-with-Rscript-binary.patch @@ -0,0 +1,86 @@ +From 88766c447d56089697c5ad49a0ed72f82c22f11f Mon Sep 17 00:00:00 2001 +From: Isabel Paredes +Date: Wed, 21 Aug 2024 13:19:28 +0200 +Subject: [PATCH 7/9] Build docs with Rscript binary + +--- + doc/Makefile.in | 24 +++++++++++++----------- + 1 file changed, 13 insertions(+), 11 deletions(-) + +diff --git a/doc/Makefile.in b/doc/Makefile.in +index c9e3a73..d89a1f5 100644 +--- a/doc/Makefile.in ++++ b/doc/Makefile.in +@@ -23,7 +23,8 @@ INSTDIRS = notes + + HELP2MAN = perl $(top_srcdir)/tools/help2man.pl + +-R_EXE = $(top_builddir)/bin/R --vanilla --no-echo ++R_EXE = "$(BUILD_PREFIX)/bin/R --vanilla --no-echo" ++RSCRIPT_EXE = $(BUILD_PREFIX)/bin/Rscript + + all: Makefile R docs + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +@@ -31,6 +32,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + + ## FIXME: NEWS.rds is needed by news() and hence in principle part of 'R', but + ## it can only be built by R_EXE which at this point does not exist (if built from scratch) ++## But, since we're cross-compiling it does exist + R: Makefile svnonly + @for d in $(SUBDIRS); do \ + (cd $${d} && $(MAKE) $@) || exit 1; \ +@@ -47,24 +49,24 @@ docs: NEWS.rds NEWS html/NEWS.html NEWS.pdf NEWS.2.rds NEWS.3.rds R.1 Rscript.1 + R.1: + @$(HELP2MAN) --include=$(srcdir)/R.aux --no-info --output=R.1 \ + --name="a language for data analysis and graphics" \ +- $(top_builddir)/bin/R ++ $(R_EXE) + + Rscript.1: + @$(HELP2MAN) --no-info --output=Rscript.1 \ + --name="front end for scripting with R" \ +- $(top_builddir)/bin/Rscript ++ $(RSCRIPT_EXE) + + NEWS.rds: $(srcdir)/NEWS.Rd +- @$(ECHO) "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$(srcdir)/NEWS.Rd\", \ ++ @$(RSCRIPT_EXE) -e "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$(srcdir)/NEWS.Rd\", \ + macros = \"../share/Rd/macros/system.Rd\"), stages = 'install', warningCalls = FALSE), \ +- 'NEWS.rds')" | $(R_EXE) ++ 'NEWS.rds')" + + NEWS: NEWS.rds + @$(ECHO) "creating doc/NEWS" +- @$(ECHO) 'options(warn=1);tools:::Rd2txt_NEWS_in_Rd("NEWS.rds", "NEWS")' | $(R_EXE) ++ @$(RSCRIPT_EXE) -e 'options(warn=1);tools:::Rd2txt_NEWS_in_Rd("NEWS.rds", "NEWS")' + + html/NEWS.html: NEWS.rds +- @$(ECHO) 'options(warn=1);tools:::Rd2HTML_NEWS_in_Rd("NEWS.rds", "html/NEWS.html")' | $(R_EXE) ++ @$(RSCRIPT_EXE) -e 'options(warn=1);tools:::Rd2HTML_NEWS_in_Rd("NEWS.rds", "html/NEWS.html")' + + PDFLATEX = @PDFLATEX@ + ## needs pdflatex (and more) +@@ -80,9 +82,9 @@ NEWS.pdf: NEWS.rds + docs3: NEWS.3.rds NEWS.3.html NEWS.3.pdf + + NEWS.3.rds: $(srcdir)/NEWS.3.Rd +- @$(ECHO) "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$(srcdir)/NEWS.3.Rd\", \ ++ @$(RSCRIPT_EXE) -e "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$(srcdir)/NEWS.3.Rd\", \ + macros = \"../share/Rd/macros/system.Rd\"), stages = 'install', warningCalls = FALSE), \ +- 'NEWS.3.rds')" | $(R_EXE) ++ 'NEWS.3.rds')" + + NEWS.3: NEWS.3.rds + @$(ECHO) "creating NEWS.3" +@@ -105,9 +107,9 @@ NEWS.3.pdf: NEWS.3.rds + docs2: NEWS.2.rds NEWS.2.html NEWS.2.pdf + + NEWS.2.rds: $(srcdir)/NEWS.2.Rd +- @$(ECHO) "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$(srcdir)/NEWS.2.Rd\", \ ++ @$(RSCRIPT_EXE) -e "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$(srcdir)/NEWS.2.Rd\", \ + macros = \"../share/Rd/macros/system.Rd\"), stages = 'install', warningCalls = FALSE), \ +- 'NEWS.2.rds')" | $(R_EXE) ++ 'NEWS.2.rds')" + + ## NB: this is only the top part of NEWS.2 in the sources. + NEWS.2: NEWS.2.rds diff --git a/recipes/recipes_emscripten/r-base/patches/0008-Set-default-R_Home.patch b/recipes/recipes_emscripten/r-base/patches/0008-Set-default-R_Home.patch new file mode 100644 index 000000000..38c7bffd4 --- /dev/null +++ b/recipes/recipes_emscripten/r-base/patches/0008-Set-default-R_Home.patch @@ -0,0 +1,24 @@ +From 9b11ddff35b56c1b2b5141a37b3a790e4cd662b7 Mon Sep 17 00:00:00 2001 +From: Isabel Paredes +Date: Wed, 21 Aug 2024 13:51:47 +0200 +Subject: [PATCH 8/9] Set default R_Home + +--- + src/unix/system.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/unix/system.c b/src/unix/system.c +index ff5751d..84cf79c 100644 +--- a/src/unix/system.c ++++ b/src/unix/system.c +@@ -329,8 +329,8 @@ int Rf_initialize_R(int ac, char **av) + + R_GlobalContext = NULL; /* Make R_Suicide less messy... */ + +- if((R_Home = R_HomeDir()) == NULL) +- R_Suicide("R home directory is not defined"); ++ if((R_Home = R_HomeDir()) == NULL) R_Home = "lib/R"; ++ // R_Suicide("R home directory is not defined"); + BindDomain(R_Home); + + process_system_Renviron(); diff --git a/recipes/recipes_emscripten/r-base/patches/0009-Use-basenames-for-compilers.patch b/recipes/recipes_emscripten/r-base/patches/0009-Use-basenames-for-compilers.patch new file mode 100644 index 000000000..c5103b329 --- /dev/null +++ b/recipes/recipes_emscripten/r-base/patches/0009-Use-basenames-for-compilers.patch @@ -0,0 +1,85 @@ +From e5ceab2077126c26e85a829682a30bc0defb78d1 Mon Sep 17 00:00:00 2001 +From: Isabel Paredes +Date: Wed, 21 Aug 2024 13:52:30 +0200 +Subject: [PATCH 9/9] Use basenames for compilers + +This is needed because the path gets hardcoded and then it cannot find emcc when +building other R packages. etc/Makeconf gets copied by the activation script +of cross-r-base. + +--- + etc/Makeconf.in | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +diff --git a/etc/Makeconf.in b/etc/Makeconf.in +index d84a912..f648ee3 100644 +--- a/etc/Makeconf.in ++++ b/etc/Makeconf.in +@@ -9,45 +9,45 @@ + ## This fails if it contains spaces, or if it is quoted + include $(R_SHARE_DIR)/make/vars.mk + +-AR = @AR@ ++AR = emar + BLAS_LIBS = @BLAS_LIBS@ + + ## C compilers +-CC = @CC@ ++CC = emcc + CFLAGS = @CFLAGS@ $(LTO) +-CC17 = @CC17@ ++CC17 = emcc + C17FLAGS = @C17FLAGS@ $(LTO) +-CC23 = @CC23@ ++CC23 = emcc + C23FLAGS = @C23FLAGS@ $(LTO) +-CC90 = @CC90@ ++CC90 = emcc + C90FLAGS = @C90FLAGS@ $(LTO) +-CC99 = @CC99@ ++CC99 = emcc + C99FLAGS = @C99FLAGS@ $(LTO) + CPICFLAGS = @CPICFLAGS@ +-CPPFLAGS = @CPPFLAGS@ ++CPPFLAGS = -I$(PREFIX)/include + C_VISIBILITY = @C_VISIBILITY@ + + ## C++ compilers +-CXX = @CXX@ @CXXSTD@ ++CXX = em++ @CXXSTD@ + CXXFLAGS = @CXXFLAGS@ $(LTO) + CXXPICFLAGS = @CXXPICFLAGS@ +-CXX11 = @CXX11@ ++CXX11 = em++ + CXX11FLAGS = @CXX11FLAGS@ $(LTO) + CXX11PICFLAGS = @CXX11PICFLAGS@ + CXX11STD = @CXX11STD@ +-CXX14 = @CXX14@ ++CXX14 = em++ + CXX14FLAGS = @CXX14FLAGS@ $(LTO) + CXX14PICFLAGS = @CXX14PICFLAGS@ + CXX14STD = @CXX14STD@ +-CXX17 = @CXX17@ ++CXX17 = em++ + CXX17FLAGS = @CXX17FLAGS@ $(LTO) + CXX17PICFLAGS = @CXX17PICFLAGS@ + CXX17STD = @CXX17STD@ +-CXX20 = @CXX20@ ++CXX20 = em++ + CXX20FLAGS = @CXX20FLAGS@ $(LTO) + CXX20PICFLAGS = @CXX20PICFLAGS@ + CXX20STD = @CXX20STD@ +-CXX23 = @CXX23@ ++CXX23 = em++ + CXX23FLAGS = @CXX23FLAGS@ $(LTO) + CXX23PICFLAGS = @CXX23PICFLAGS@ + CXX23STD = @CXX23STD@ +@@ -116,7 +116,7 @@ OBJCFLAGS = @OBJCFLAGS@ $(LTO) + OBJC_LIBS = @OBJC_LIBS@ + OBJCXX = @OBJCXX@ + R_ARCH = @R_ARCH@ +-RANLIB = @RANLIB@ ++RANLIB = emranlib + SAFE_FFLAGS = @SAFE_FFLAGS@ + ## A version of SHLIB_LIBADD not overridden in install.R. + SAN_LIBS = diff --git a/recipes/recipes_emscripten/r-base/pre.js b/recipes/recipes_emscripten/r-base/pre.js new file mode 100644 index 000000000..84b128021 --- /dev/null +++ b/recipes/recipes_emscripten/r-base/pre.js @@ -0,0 +1,3 @@ +Module['prerun'] = () => { + ENV['R_HOME'] = '/lib/R'; +}; \ No newline at end of file diff --git a/recipes/recipes_emscripten/r-base/recipe.yaml b/recipes/recipes_emscripten/r-base/recipe.yaml new file mode 100644 index 000000000..0cab0a37f --- /dev/null +++ b/recipes/recipes_emscripten/r-base/recipe.yaml @@ -0,0 +1,64 @@ +context: + name: "r-base" + version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://cran.r-project.org/src/base/R-4/R-${{ version }}.tar.gz + sha256: b4cb675deaaeb7299d3b265d218cde43f192951ce5b89b7bb1a5148a36b2d94d + patches: + - patches/0001-Fix-bad-substitution-error.patch + - patches/0002-Disable-libcurl.patch + - patches/0003-Remove-unsupported-sigsuspend.patch + - patches/0004-Disable-internet-module.patch + - patches/0005-Use-R-binary-from-build-prefix.patch + - patches/0006-Ignore-crude-heuristic-file-size.patch + - patches/0007-Build-docs-with-Rscript-binary.patch + - patches/0008-Set-default-R_Home.patch + - patches/0009-Use-basenames-for-compilers.patch + +build: + number: 0 + +requirements: + build: + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + - libtool + - pkg-config + - cmake + - make + - r-base == ${{ version }} # for R and Rscript binaries (See patches) + host: + - liblapack>=3.12 + - libflang # for FortranRuntime + - libiconv + - zlib>=1.2.13 + - bzip2 + - xz # for lzma + - cairo>=1.18 + - pcre2>=10.43 + - tzdata + - libpng + - libtiff + +tests: + - script: | + OUTPUT=$(run_modularized $PREFIX/lib/R/bin/Rscript --version) + requirements: + build: + - run_modularized + +about: + homepage: http://www.r-project.org/ + license: GPL-2.0-or-later + license_family: GPL + license_file: COPYING + summary: R is a free software environment for statistical computing and graphics. + +extra: + recipe-maintainers: + - IsabelParedes From 5c32dc3aaef787059b0d34ace6e5e587fec8d634 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Fri, 6 Sep 2024 11:03:45 +0200 Subject: [PATCH 212/333] Update sqlitecpp from 3.3.1 to 3.3.2 (#1280) Co-authored-by: emscripten-forge-bot Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/sqlitecpp/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/sqlitecpp/recipe.yaml b/recipes/recipes_emscripten/sqlitecpp/recipe.yaml index e42eb582a..6c06ffe84 100644 --- a/recipes/recipes_emscripten/sqlitecpp/recipe.yaml +++ b/recipes/recipes_emscripten/sqlitecpp/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 3.3.1 + version: 3.3.2 package: @@ -8,7 +8,7 @@ package: source: url: https://github.com/SRombauts/SQLiteCpp/archive/refs/tags/${{ version }}.tar.gz - sha256: 71f990f9fb4b004533b6859ce40729af823b87fe691dd99ca084a7fd40db54b9 + sha256: 5aa8eda130d0689bd5ed9b2074714c2dbc610f710483c61ba6cf944cebfe03af build: number: 2 From 597f3d67e09e098563862fc9d8a2c6dbb8fae68f Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Fri, 6 Sep 2024 12:30:55 +0200 Subject: [PATCH 213/333] Update fmt from 11.0.1 to 11.0.2 (#1243) 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 324a8a0a7..ea5a31a0a 100644 --- a/recipes/recipes_emscripten/fmt/recipe.yaml +++ b/recipes/recipes_emscripten/fmt/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 11.0.1 + version: 11.0.2 package: name: fmt @@ -7,7 +7,7 @@ package: source: url: https://github.com/fmtlib/fmt/archive/${{ version }}.tar.gz - sha256: 7d009f7f89ac84c0a83f79ed602463d092fbf66763766a907c97fd02b100f5e9 + sha256: 6cb1e6d37bdcb756dbbe59be438790db409cdb4868c66e888d5df9f13f7c027f build: number: 0 From 952d5e8c51868472b8fbb523683f503d564a019a Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Fri, 6 Sep 2024 12:43:45 +0200 Subject: [PATCH 214/333] Update harfbuzz from 8.5.0 to 9.0.0 (#1197) * Update harfbuzz from 8.5.0 to 9.0.0 * Update recipe.yaml --------- Co-authored-by: emscripten-forge-bot Co-authored-by: Thorsten Beier --- .../recipes_emscripten/harfbuzz/recipe.yaml | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/recipes/recipes_emscripten/harfbuzz/recipe.yaml b/recipes/recipes_emscripten/harfbuzz/recipe.yaml index 67c56a1d4..9f6d50984 100644 --- a/recipes/recipes_emscripten/harfbuzz/recipe.yaml +++ b/recipes/recipes_emscripten/harfbuzz/recipe.yaml @@ -1,6 +1,6 @@ context: - name: "harfbuzz" - version: 8.5.0 + name: harfbuzz + version: 9.0.0 package: name: ${{ name }} @@ -8,29 +8,29 @@ package: source: url: https://github.com/${{ name }}/${{ name }}/archive/${{ version }}.tar.gz - sha256: 7ad8e4e23ce776efb6a322f653978b3eb763128fd56a90252775edb9fd327956 + sha256: b7e481b109d19aefdba31e9f5888aa0cdfbe7608fed9a43494c060ce1f8a34d2 build: number: 0 requirements: build: - - ${{ compiler('c') }} - - ${{ compiler('cxx') }} - - meson - - ninja - - pkg-config - - glib + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + - meson + - ninja + - pkg-config + - glib host: # - cairo TODO: add once available - - glib - - freetype - - icu - - graphite2 + - glib + - freetype + - icu + - graphite2 tests: - script: - - test -f $PREFIX/lib/libharfbuzz-gobject.a + # - 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 @@ -49,4 +49,4 @@ about: extra: recipe-maintainers: - - IsabelParedes + - IsabelParedes From 8f98577737fc54b32974d5fd63db09bdc9dca2a8 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 9 Sep 2024 11:44:38 +0200 Subject: [PATCH 215/333] Update geos from 3.12.2 to 3.13.0 (#1304) * Update geos from 3.12.2 to 3.13.0 * Delete recipes/recipes_emscripten/geos/patches/patch_tests.patch * Update recipe.yaml --------- Co-authored-by: emscripten-forge-bot Co-authored-by: Thorsten Beier --- .../geos/patches/patch_tests.patch | 135 ------------------ recipes/recipes_emscripten/geos/recipe.yaml | 28 ++-- 2 files changed, 11 insertions(+), 152 deletions(-) delete mode 100644 recipes/recipes_emscripten/geos/patches/patch_tests.patch diff --git a/recipes/recipes_emscripten/geos/patches/patch_tests.patch b/recipes/recipes_emscripten/geos/patches/patch_tests.patch deleted file mode 100644 index cd4724a74..000000000 --- a/recipes/recipes_emscripten/geos/patches/patch_tests.patch +++ /dev/null @@ -1,135 +0,0 @@ -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 index f0e039d70..ddf3285d5 100644 --- a/recipes/recipes_emscripten/geos/recipe.yaml +++ b/recipes/recipes_emscripten/geos/recipe.yaml @@ -1,6 +1,6 @@ context: name: geos - version: 3.12.2 + version: 3.13.0 package: name: ${{ name }} @@ -8,14 +8,8 @@ package: source: url: https://download.osgeo.org/geos/geos-${{ version }}.tar.bz2 - sha256: 34c7770bf0090ee88488af98767d08e779f124fa33437e0aabec8abd4609fec6 + sha256: 47ec83ff334d672b9e4426695f15da6e6368244214971fabf386ff8ef6df39e4 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: @@ -23,16 +17,16 @@ build: requirements: build: - - cmake - - make - - ninja - - ${{ compiler('c') }} - - ${{ compiler('cxx') }} + - cmake + - make + - ninja + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} tests: - - script: - - test -f ${PREFIX}/include/geos.h - - test -f ${PREFIX}/include/geos/algorithm/Area.h +- script: + - test -f ${PREFIX}/include/geos.h + - test -f ${PREFIX}/include/geos/algorithm/Area.h about: homepage: https://libgeos.org/ @@ -49,4 +43,4 @@ about: extra: recipe-maintainers: - - KGB99 + - KGB99 From 3128f2b35174d0686e34b30163bf18a7cb492f7e Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Mon, 9 Sep 2024 12:32:46 +0200 Subject: [PATCH 216/333] ping maintainers on failing PRs (#1305) * ping maintainers * ping maintainers * ping maintainers --- emci/bot/bump_recipes_versions.py | 32 +++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/emci/bot/bump_recipes_versions.py b/emci/bot/bump_recipes_versions.py index 8ad4b8d22..5346b5406 100644 --- a/emci/bot/bump_recipes_versions.py +++ b/emci/bot/bump_recipes_versions.py @@ -169,7 +169,7 @@ def bump_recipe_version(recipe_dir): return True , current_version, new_version -def try_to_merge_pr(pr): +def try_to_merge_pr(pr, recipe_dir=None): passed = subprocess.run( ['gh', 'pr', 'checks', str(pr)], @@ -188,7 +188,20 @@ def try_to_merge_pr(pr): # Pin recipe maintainer? Or add assignee? subprocess.check_output(['gh', 'pr', 'edit', str(pr), '--add-label', 'Needs Human Review']) - message = 'Either the CI is failing, or the recipe is not tested. I need help from a human.' + maintainers = [] + if recipe_dir is not None: + with open(Path(recipe_dir)/"recipe.yaml") as file: + recipe = YAML().load(file) + if 'extra' in recipe: + if 'recipe-maintainers' in recipe['extra']: + maintainers = recipe['extra']['recipe-maintainers'] + + message = """Either the CI is failing, or the recipe is not tested. I need help from a human.""" + if maintainers: + message += "\nPing the maintainers: " + for maintainer in maintainers: + message += f"@{maintainer} " + message += "\nIf you believe you are wrongly pinned, please comment here or open a PR removing you from the maintainers list." try: # Running edit-last in case there was already a comment, we don't want to spam with comments @@ -241,16 +254,19 @@ def empty_context_manager(): ['gh', 'pr', 'list', '--author', 'emscripten-forge-bot'], ).decode('utf-8').split('\n') + all_recipes = [recipe for recipe in Path(recipe_dir).iterdir() if recipe.is_dir()] + # map from folder names to recipe-dir + recipe_name_to_recipe_dir = {recipe.name: recipe for recipe in all_recipes} + + prs_id = [line.split()[0] for line in prs if line] 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) - - - all_recipes = [recipe for recipe in Path(recipe_dir).iterdir() if recipe.is_dir()] - + for pr,pr_pkg in zip(prs_id, prs_packages): + # get the recipe dir + recipe_dir = recipe_name_to_recipe_dir.get(pr_pkg) + try_to_merge_pr(pr, recipe_dir=recipe_dir) # only recipes for which there is no opened PR all_recipes = [recipe for recipe in all_recipes if recipe.name not in prs_packages] From 85c57de076e591419935de84c9a2561295aef90f Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Mon, 9 Sep 2024 12:42:12 +0200 Subject: [PATCH 217/333] Add r-glue (#1306) * Add r-glue * Add build script --- recipes/recipes_emscripten/r-glue/build.sh | 9 ++++ recipes/recipes_emscripten/r-glue/recipe.yaml | 41 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 recipes/recipes_emscripten/r-glue/build.sh create mode 100644 recipes/recipes_emscripten/r-glue/recipe.yaml diff --git a/recipes/recipes_emscripten/r-glue/build.sh b/recipes/recipes_emscripten/r-glue/build.sh new file mode 100644 index 000000000..eeef5603c --- /dev/null +++ b/recipes/recipes_emscripten/r-glue/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e + +echo "R_HOME=\$(PREFIX)/lib/R" > $BUILD_PREFIX/lib/R/etc/Makeconf +cat $PREFIX/lib/R/etc/Makeconf >> $BUILD_PREFIX/lib/R/etc/Makeconf + +$BUILD_PREFIX/bin/R CMD INSTALL . \ + --no-test-load --no-byte-compile --library=$PREFIX/lib/R/library diff --git a/recipes/recipes_emscripten/r-glue/recipe.yaml b/recipes/recipes_emscripten/r-glue/recipe.yaml new file mode 100644 index 000000000..11367a320 --- /dev/null +++ b/recipes/recipes_emscripten/r-glue/recipe.yaml @@ -0,0 +1,41 @@ +context: + name: r-glue + version: 1.7.0 + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://cran.r-project.org//src/contrib/glue_${{ version }}.tar.gz + sha256: 1af51b51f52c1aeb3bfe9349f55896dd78b5542ffdd5654e432e4d646e4a86dc + +build: + number: 0 + +requirements: + build: + - r-base == ${{ r_base_version }} + - ${{ compiler('c') }} + - make + host: + - r-base == ${{ r_base_version }} + run: + - r-base == ${{ r_base_version }} + +about: + homepage: https://github.com/tidyverse/glue + license: MIT + license_file: LICENSE + license_family: MIT + summary: | + An implementation of interpreted string literals, inspired by Python's + Literal String Interpolation and + Docstrings and Julia's Triple- + Quoted String Literals + . + +extra: + recipe-maintainers: + - IsabelParedes From 42cda9aadcfa800a8402cfe5f412e9d41b2e1918 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Mon, 9 Sep 2024 14:05:01 +0200 Subject: [PATCH 218/333] Add r-digest (#1308) --- recipes/recipes_emscripten/r-digest/build.sh | 9 +++++ .../recipes_emscripten/r-digest/recipe.yaml | 40 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 recipes/recipes_emscripten/r-digest/build.sh create mode 100644 recipes/recipes_emscripten/r-digest/recipe.yaml diff --git a/recipes/recipes_emscripten/r-digest/build.sh b/recipes/recipes_emscripten/r-digest/build.sh new file mode 100644 index 000000000..eeef5603c --- /dev/null +++ b/recipes/recipes_emscripten/r-digest/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e + +echo "R_HOME=\$(PREFIX)/lib/R" > $BUILD_PREFIX/lib/R/etc/Makeconf +cat $PREFIX/lib/R/etc/Makeconf >> $BUILD_PREFIX/lib/R/etc/Makeconf + +$BUILD_PREFIX/bin/R CMD INSTALL . \ + --no-test-load --no-byte-compile --library=$PREFIX/lib/R/library diff --git a/recipes/recipes_emscripten/r-digest/recipe.yaml b/recipes/recipes_emscripten/r-digest/recipe.yaml new file mode 100644 index 000000000..4ba02591e --- /dev/null +++ b/recipes/recipes_emscripten/r-digest/recipe.yaml @@ -0,0 +1,40 @@ +context: + name: r-digest + version: 0.6.37 + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://cran.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + sha256: 82c4d149994b8a4a9af930f5a8e47420829935abed41f3f9030e94b6a48f0321 + +build: + number: 0 + +requirements: + build: + - r-base == ${{ r_base_version }} + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + host: + - r-base == ${{ r_base_version }} + run: + - r-base == ${{ r_base_version }} + +tests: +- script: + - test -f $PREFIX/lib/R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so + +about: + homepage: https://dirk.eddelbuettel.com/code/digest.html + repository: https://github.com/eddelbuettel/digest + license: GPL-2.0 + license_family: GPL2 + summary: Compact hash representations of arbritrary R objects. + +extra: + recipe-maintainers: + - IsabelParedes From 3a57c07daeb1b9645960ebf03ae1107af020ee03 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Mon, 9 Sep 2024 14:05:22 +0200 Subject: [PATCH 219/333] Add r-jsonlite (#1307) * Add r-jsonlite Add build script Clean up * Add test * Fix formatting --- .../recipes_emscripten/r-jsonlite/build.sh | 9 +++++ .../recipes_emscripten/r-jsonlite/recipe.yaml | 40 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 recipes/recipes_emscripten/r-jsonlite/build.sh create mode 100644 recipes/recipes_emscripten/r-jsonlite/recipe.yaml diff --git a/recipes/recipes_emscripten/r-jsonlite/build.sh b/recipes/recipes_emscripten/r-jsonlite/build.sh new file mode 100644 index 000000000..eeef5603c --- /dev/null +++ b/recipes/recipes_emscripten/r-jsonlite/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e + +echo "R_HOME=\$(PREFIX)/lib/R" > $BUILD_PREFIX/lib/R/etc/Makeconf +cat $PREFIX/lib/R/etc/Makeconf >> $BUILD_PREFIX/lib/R/etc/Makeconf + +$BUILD_PREFIX/bin/R CMD INSTALL . \ + --no-test-load --no-byte-compile --library=$PREFIX/lib/R/library diff --git a/recipes/recipes_emscripten/r-jsonlite/recipe.yaml b/recipes/recipes_emscripten/r-jsonlite/recipe.yaml new file mode 100644 index 000000000..9b0b0739b --- /dev/null +++ b/recipes/recipes_emscripten/r-jsonlite/recipe.yaml @@ -0,0 +1,40 @@ +context: + name: r-jsonlite + version: 1.8.8 + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://cran.r-project.org/src/contrib/jsonlite_${{ version }}.tar.gz + sha256: 7de21316984c3ba3d7423d12f43d1c30c716007c5e39bf07e11885e0ceb0caa4 + +build: + number: 0 + +requirements: + build: + - r-base == ${{ r_base_version }} + - ${{ compiler('c') }} + - make + host: + - r-base == ${{ r_base_version }} + run: + - r-base == ${{ r_base_version }} + +tests: +- script: + - test -f $PREFIX/lib/R/library/jsonlite/libs/jsonlite.so + +about: + homepage: https://arxiv.org/abs/1403.2805, https://www.opencpu.org/posts/jsonlite-a-smarter-json-encoder + license: MIT + license_family: MIT + license_file: LICENSE + summary: A fast JSON parser and generator optimized for statistical data and the web. + +extra: + recipe-maintainers: + - IsabelParedes From 001741b605fffa0fd338a25213279be818bf0467 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 9 Sep 2024 18:18:52 +0200 Subject: [PATCH 220/333] Update fontconfig from 2.14.2 to 2.15.0 (#1214) * Update fontconfig from 2.14.2 to 2.15.0 * Remove patch Patch no longer required. `cc.get_argument_syntax` is now used to determine the correct preprocessor flags ('-E', '-P') * Fix sha --------- Co-authored-by: emscripten-forge-bot Co-authored-by: Thorsten Beier Co-authored-by: Isabel Paredes --- .../fontconfig/patches/emscripten_preprocess.patch | 13 ------------- recipes/recipes_emscripten/fontconfig/recipe.yaml | 6 ++---- 2 files changed, 2 insertions(+), 17 deletions(-) delete mode 100644 recipes/recipes_emscripten/fontconfig/patches/emscripten_preprocess.patch diff --git a/recipes/recipes_emscripten/fontconfig/patches/emscripten_preprocess.patch b/recipes/recipes_emscripten/fontconfig/patches/emscripten_preprocess.patch deleted file mode 100644 index aaddd9ff6..000000000 --- a/recipes/recipes_emscripten/fontconfig/patches/emscripten_preprocess.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/meson.build b/src/meson.build -index 9a6ba20..713fa96 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -37,6 +37,8 @@ elif cc.get_id() == 'msvc' - cpp += ['/EP'] - elif cc.get_id() == 'clang' - cpp += ['-E', '-P'] -+elif cc.get_id() == 'emscripten' -+ cpp += ['-E', '-P'] - else - error('FIXME: implement cc.preprocess') - endif diff --git a/recipes/recipes_emscripten/fontconfig/recipe.yaml b/recipes/recipes_emscripten/fontconfig/recipe.yaml index 4f03bc8c8..a4c2a1fc4 100644 --- a/recipes/recipes_emscripten/fontconfig/recipe.yaml +++ b/recipes/recipes_emscripten/fontconfig/recipe.yaml @@ -1,6 +1,6 @@ context: name: fontconfig - version: 2.14.2 + version: 2.15.0 package: name: ${{ name }} @@ -9,9 +9,7 @@ package: source: url: http://www.freedesktop.org/software/${{ name }}/release/${{ name }}-${{ version }}.tar.gz - sha256: 3ba2dd92158718acec5caaf1a716043b5aa055c27b081d914af3ccb40dce8a55 - patches: - - patches/emscripten_preprocess.patch + sha256: f5f359d6332861bd497570848fcb42520964a9e83d5e3abe397b6b6db9bcaaf4 build: number: 0 From d0337c11c7e5c83224a9a9b61fb04711ee112500 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Tue, 10 Sep 2024 07:50:34 +0200 Subject: [PATCH 221/333] Update libtiff from 4.5.0 to 4.5.1 (#1017) * Update libtiff from 4.5.0 to 4.5.1 * disable targets * Update recipe.yaml * Clean up * Add tests --------- Co-authored-by: emscripten-forge-bot Co-authored-by: Thorsten Beier Co-authored-by: Isabel Paredes --- recipes/recipes_emscripten/libtiff/build.sh | 3 + .../recipes_emscripten/libtiff/recipe.yaml | 52 ++++---------- .../libtiff/recipe_legacy.yaml | 71 ------------------- 3 files changed, 15 insertions(+), 111 deletions(-) delete mode 100644 recipes/recipes_emscripten/libtiff/recipe_legacy.yaml diff --git a/recipes/recipes_emscripten/libtiff/build.sh b/recipes/recipes_emscripten/libtiff/build.sh index 925938bda..8ed758cc2 100644 --- a/recipes/recipes_emscripten/libtiff/build.sh +++ b/recipes/recipes_emscripten/libtiff/build.sh @@ -4,6 +4,9 @@ mkdir bld cd bld emcmake cmake .. -GNinja \ + -Dtiff-tests=OFF \ + -Dtiff-tools=OFF \ + -Dtiff-docs=OFF \ -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_PREFIX_PATH=$PREFIX \ -DCMAKE_INSTALL_LIBDIR=lib \ diff --git a/recipes/recipes_emscripten/libtiff/recipe.yaml b/recipes/recipes_emscripten/libtiff/recipe.yaml index d751097cc..6852c6a57 100644 --- a/recipes/recipes_emscripten/libtiff/recipe.yaml +++ b/recipes/recipes_emscripten/libtiff/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 4.5.0 + version: 4.5.1 package: name: libtiff @@ -7,49 +7,26 @@ package: source: url: https://download.osgeo.org/libtiff/tiff-${{ version }}.tar.gz - sha256: c7a1d9296649233979fa3eacffef3fa024d73d05d589cb622727b5b08c423464 + sha256: d7f38b6788e4a8f5da7940c5ac9424f494d8a79eba53d555f4a507167dca5e2b build: - number: 1 - # Does a very good job of maintaining compatibility. - # https://abi-laboratory.pro/tracker/timeline/libtiff/ - # run_exports: - # - {{ pin_subpackage('libtiff', max_pin='x') }} - # missing_dso_whitelist: - # # Only used by libtiff,bin/tiffgt (a viewer), which is ok. - # - /opt/X11/lib/libGL.1.dylib - # - /opt/X11/lib/libglut.3.dylib + number: 0 requirements: build: - # - libtool # [unix] - ${{ compiler('c') }} - ${{ compiler('cxx') }} - cmake - ninja - # host: - # - zlib - # - jpeg - # - xz - # - zstd - # - lerc - # - libdeflate - # - libwebp-base # [linux or osx] -# test: -# downstreams: -# - pillow >=8 -# - py-opencv >=4 -# - tifffile -# commands: -# - test -f ${PREFIX}/lib/libtiff.a # [not win] -# - test -f ${PREFIX}/lib/libtiffxx.a # [not win] -# - test -f ${PREFIX}/lib/libtiff{{ SHLIB_EXT }} # [not win] -# - test -f ${PREFIX}/lib/libtiffxx{{ SHLIB_EXT }} # [not win] -# - if not exist %PREFIX%\\Library\\bin\\tiff.dll exit 1 # [win] -# - if not exist %PREFIX%\\Library\\bin\\tiffxx.dll exit 1 # [win] -# - if not exist %PREFIX%\\Library\\bin\\libtiff.dll exit 1 # [win] -# - if not exist %PREFIX%\\Library\\bin\\libtiffxx.dll exit 1 # [win] +tests: +- package_contents: + lib: + - libtiff.a + - libtiffxx.a + include: + - tiff.h + - tiffio.h about: license: HPND @@ -61,9 +38,4 @@ about: homepage: http://www.libtiff.org/ extra: recipe-maintainers: - - jakirkham - - mingwandroid - - msarahan - - ocefpaf - - stuarteberg - - hmaarrfk + - DerThorsten diff --git a/recipes/recipes_emscripten/libtiff/recipe_legacy.yaml b/recipes/recipes_emscripten/libtiff/recipe_legacy.yaml deleted file mode 100644 index 7cb3975ba..000000000 --- a/recipes/recipes_emscripten/libtiff/recipe_legacy.yaml +++ /dev/null @@ -1,71 +0,0 @@ -context: - version: "4.4.0" - -package: - name: libtiff - version: "{{ version }}" - -source: - url: https://download.osgeo.org/libtiff/tiff-{{ version }}.tar.gz - sha256: 917223b37538959aca3b790d2d73aa6e626b688e02dcda272aec24c2f498abed - -build: - number: 0 - # Does a very good job of maintaining compatibility. - # https://abi-laboratory.pro/tracker/timeline/libtiff/ - # run_exports: - # - {{ pin_subpackage('libtiff', max_pin='x') }} - # missing_dso_whitelist: - # # Only used by libtiff,bin/tiffgt (a viewer), which is ok. - # - /opt/X11/lib/libGL.1.dylib - # - /opt/X11/lib/libglut.3.dylib - -requirements: - build: - # - libtool # [unix] - - "{{ compiler('c') }}" - - "{{ compiler('cxx') }}" - - cmake - - ninja - # host: - # - zlib - # - jpeg - # - xz - # - zstd - # - lerc - # - libdeflate - # - libwebp-base # [linux or osx] - -# test: -# downstreams: -# - pillow >=8 -# - py-opencv >=4 -# - tifffile -# commands: -# - test -f ${PREFIX}/lib/libtiff.a # [not win] -# - test -f ${PREFIX}/lib/libtiffxx.a # [not win] -# - test -f ${PREFIX}/lib/libtiff{{ SHLIB_EXT }} # [not win] -# - test -f ${PREFIX}/lib/libtiffxx{{ SHLIB_EXT }} # [not win] -# - if not exist %PREFIX%\\Library\\bin\\tiff.dll exit 1 # [win] -# - if not exist %PREFIX%\\Library\\bin\\tiffxx.dll exit 1 # [win] -# - if not exist %PREFIX%\\Library\\bin\\libtiff.dll exit 1 # [win] -# - if not exist %PREFIX%\\Library\\bin\\libtiffxx.dll exit 1 # [win] - -about: - home: http://www.libtiff.org/ - license: HPND - license_file: COPYRIGHT - summary: Support for the Tag Image File Format (TIFF). - description: | - This software provides support for the Tag Image File Format (TIFF), a - widely used format for storing image data. - doc_url: http://www.libtiff.org/document.html - -extra: - recipe-maintainers: - - jakirkham - - mingwandroid - - msarahan - - ocefpaf - - stuarteberg - - hmaarrfk From 989e8506ffaa3a24dccd49733c4454fadaf34b02 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Tue, 10 Sep 2024 10:04:55 +0200 Subject: [PATCH 222/333] Update qutip from 5.0.3 to 5.0.4 (#1301) * Update qutip from 5.0.3 to 5.0.4 * Update recipe.yaml --------- Co-authored-by: emscripten-forge-bot Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/qutip/recipe.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/recipes_emscripten/qutip/recipe.yaml b/recipes/recipes_emscripten/qutip/recipe.yaml index 0576990f2..23caf4962 100644 --- a/recipes/recipes_emscripten/qutip/recipe.yaml +++ b/recipes/recipes_emscripten/qutip/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 5.0.3 + version: 5.0.4 package: name: qutip @@ -7,7 +7,7 @@ package: source: url: https://github.com/qutip/qutip/archive/v${{ version }}.tar.gz - sha256: 2f5bcba11f3b0d409a51e5988ddf179d4526da59fe31d90a542777dcbdb6116d + sha256: 9e2f55d151ebaecabcf4c5933908d2d13616b9309fda085fabca40f84768c61f build: number: 0 @@ -21,7 +21,7 @@ requirements: - numpy - setuptools - ${{ compiler('cxx') }} - - packaging <=21.3 + - packaging >=22 - pip host: - python From 2e8e75c9c450eceed52c6c8fa29f91d7ae0c16e7 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Tue, 10 Sep 2024 14:27:59 +0200 Subject: [PATCH 223/333] Add r-fansi (#1311) --- recipes/recipes_emscripten/r-fansi/build.sh | 9 +++++ .../recipes_emscripten/r-fansi/recipe.yaml | 40 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 recipes/recipes_emscripten/r-fansi/build.sh create mode 100644 recipes/recipes_emscripten/r-fansi/recipe.yaml diff --git a/recipes/recipes_emscripten/r-fansi/build.sh b/recipes/recipes_emscripten/r-fansi/build.sh new file mode 100644 index 000000000..eeef5603c --- /dev/null +++ b/recipes/recipes_emscripten/r-fansi/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e + +echo "R_HOME=\$(PREFIX)/lib/R" > $BUILD_PREFIX/lib/R/etc/Makeconf +cat $PREFIX/lib/R/etc/Makeconf >> $BUILD_PREFIX/lib/R/etc/Makeconf + +$BUILD_PREFIX/bin/R CMD INSTALL . \ + --no-test-load --no-byte-compile --library=$PREFIX/lib/R/library diff --git a/recipes/recipes_emscripten/r-fansi/recipe.yaml b/recipes/recipes_emscripten/r-fansi/recipe.yaml new file mode 100644 index 000000000..4213a6f1b --- /dev/null +++ b/recipes/recipes_emscripten/r-fansi/recipe.yaml @@ -0,0 +1,40 @@ +context: + name: r-fansi + version: 1.0.6 + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://cran.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + sha256: ea9dc690dfe50a7fad7c5eb863c157d70385512173574c56f4253b6dfe431863 + +build: + number: 0 + +requirements: + build: + - r-base == ${{ r_base_version }} + - ${{ compiler('c') }} + host: + - r-base == ${{ r_base_version }} + run: + - r-base == ${{ r_base_version }} + +tests: +- package_contents: + lib: + - R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so + +about: + homepage: https://github.com/brodieG/fansi + repository: https://github.com/brodieG/fansi + license: GPL-2.0-or-later + license_family: GLP3 + summary: ANSI Control Sequence Aware String Functions. + +extra: + recipe-maintainers: + - IsabelParedes From 6b4d117e3eaddc86b2ec4103e5a0e46d22a6ce41 Mon Sep 17 00:00:00 2001 From: Thorsten Beier Date: Tue, 10 Sep 2024 15:55:00 +0200 Subject: [PATCH 224/333] remove call main and hotfix run_modularized (#1312) * Remove use of callMain in lua * Pass args in run_modularized * Correct run_modularized pin * only call exit once * cleanup * cleanup --------- Co-authored-by: Ian Thomas --- pixi.toml | 2 +- recipes/recipes/run_modularized/recipe.yaml | 4 ++-- .../recipes/run_modularized/run_modularized.js | 15 +++++++++++---- recipes/recipes_emscripten/lua/CMakeLists.txt | 8 ++++---- recipes/recipes_emscripten/lua/recipe.yaml | 7 +++---- 5 files changed, 21 insertions(+), 15 deletions(-) diff --git a/pixi.toml b/pixi.toml index 273764296..b7c8504d6 100644 --- a/pixi.toml +++ b/pixi.toml @@ -77,7 +77,7 @@ cmd = [ "-c", "microsoft", "-c", "conda-forge", "--target-platform", "emscripten-wasm32", - # "--skip-existing", "local", + "--skip-existing", "local", "-m", "conda_build_config.yaml", "--recipe" ] diff --git a/recipes/recipes/run_modularized/recipe.yaml b/recipes/recipes/run_modularized/recipe.yaml index 28740079d..41e7ebe5b 100644 --- a/recipes/recipes/run_modularized/recipe.yaml +++ b/recipes/recipes/run_modularized/recipe.yaml @@ -1,6 +1,6 @@ context: name: run_modularized - version: "0.1.0" + version: "0.1.2" package: name: ${{ name|lower }} @@ -11,7 +11,7 @@ build: requirements: run: - - nodejs + - nodejs about: license: BSD-3-Clause diff --git a/recipes/recipes/run_modularized/run_modularized.js b/recipes/recipes/run_modularized/run_modularized.js index 261d59819..e2f85ee4c 100644 --- a/recipes/recipes/run_modularized/run_modularized.js +++ b/recipes/recipes/run_modularized/run_modularized.js @@ -2,14 +2,21 @@ const binary_js_runner = process.argv[2]; process.argv = process.argv.slice(3); +let already_called = false; async function my_main(){ + let exitCode = 126; // "Command invoked cannot execute" const ModuleF = require(binary_js_runner); const Module = await ModuleF({ - noInitialRun: true, - // arguments: args_without_js_path + arguments: process.argv, + quit: (status, toThrow) => { + if (already_called) { + return; + } + already_called = true; + exitCode = status; + } }); - const ret = Module.callMain(process.argv); - return ret; + return exitCode; } (async function() { const exitCode = await my_main(); diff --git a/recipes/recipes_emscripten/lua/CMakeLists.txt b/recipes/recipes_emscripten/lua/CMakeLists.txt index 6200e6346..f9abe37f1 100644 --- a/recipes/recipes_emscripten/lua/CMakeLists.txt +++ b/recipes/recipes_emscripten/lua/CMakeLists.txt @@ -61,19 +61,19 @@ set(lua_binaries lua luac) foreach(lua_binary ${lua_binaries}) # set target compile options - target_compile_definitions(${lua_binary} + target_compile_definitions(${lua_binary} PUBLIC "SHELL: -s FORCE_FILESYSTEM" PUBLIC "SHELL: -s ALLOW_MEMORY_GROWTH=1" PUBLIC "SHELL: -s ENVIRONMENT=web,worker,node" - PUBLIC "SHELL: -s EXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings,TTY" + PUBLIC "SHELL: -s EXPORTED_RUNTIME_METHODS=FS,ENV,getEnvStrings,TTY" PUBLIC "SHELL: -s MODULARIZE=1" ) # set target link options - target_link_options(${lua_binary} + target_link_options(${lua_binary} PUBLIC "SHELL: -s FORCE_FILESYSTEM" PUBLIC "SHELL: -s ALLOW_MEMORY_GROWTH=1" PUBLIC "SHELL: -s ENVIRONMENT=web,worker,node" - PUBLIC "SHELL: -s EXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings,TTY" + PUBLIC "SHELL: -s EXPORTED_RUNTIME_METHODS=FS,ENV,getEnvStrings,TTY" PUBLIC "SHELL: -s MODULARIZE=1" ) endforeach() diff --git a/recipes/recipes_emscripten/lua/recipe.yaml b/recipes/recipes_emscripten/lua/recipe.yaml index 6d64ec508..fe4fc4e90 100644 --- a/recipes/recipes_emscripten/lua/recipe.yaml +++ b/recipes/recipes_emscripten/lua/recipe.yaml @@ -21,7 +21,7 @@ source: - path: CMakeLists.txt build: - number: 11 + number: 12 requirements: build: @@ -39,17 +39,16 @@ tests: fi requirements: build: - - run_modularized + - run_modularized >= 0.1.2 - script: | OUTPUT=$(run_modularized $PREFIX/bin/luac.js -v) if [[ "$OUTPUT" != "Lua 5.4.6 Copyright (C) 1994-2023 Lua.org, PUC-Rio" ]]; then echo "Unexpected output: $OUTPUT" exit 1 fi - requirements: build: - - run_modularized + - run_modularized >= 0.1.2 about: summary: Lua is a powerful, fast, lightweight, embeddable scripting language From 58bf1036fa262df73e31773970eecc66e89746f2 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Tue, 10 Sep 2024 17:29:26 +0200 Subject: [PATCH 225/333] Add r-utf8 (#1313) --- recipes/recipes_emscripten/r-utf8/build.sh | 9 ++++ recipes/recipes_emscripten/r-utf8/recipe.yaml | 45 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 recipes/recipes_emscripten/r-utf8/build.sh create mode 100644 recipes/recipes_emscripten/r-utf8/recipe.yaml diff --git a/recipes/recipes_emscripten/r-utf8/build.sh b/recipes/recipes_emscripten/r-utf8/build.sh new file mode 100644 index 000000000..eeef5603c --- /dev/null +++ b/recipes/recipes_emscripten/r-utf8/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e + +echo "R_HOME=\$(PREFIX)/lib/R" > $BUILD_PREFIX/lib/R/etc/Makeconf +cat $PREFIX/lib/R/etc/Makeconf >> $BUILD_PREFIX/lib/R/etc/Makeconf + +$BUILD_PREFIX/bin/R CMD INSTALL . \ + --no-test-load --no-byte-compile --library=$PREFIX/lib/R/library diff --git a/recipes/recipes_emscripten/r-utf8/recipe.yaml b/recipes/recipes_emscripten/r-utf8/recipe.yaml new file mode 100644 index 000000000..a2e2b212c --- /dev/null +++ b/recipes/recipes_emscripten/r-utf8/recipe.yaml @@ -0,0 +1,45 @@ +context: + name: r-utf8 + version: 1.2.4 + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: + - https://cran.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + sha256: 418f824bbd9cd868d2d8a0d4345545c62151d321224cdffca8b1ffd98a167b7d + +build: + number: 0 + +requirements: + build: + - r-base == ${{ r_base_version }} + - ${{ compiler('c') }} + host: + - r-base == ${{ r_base_version }} + run: + - r-base == ${{ r_base_version }} + +tests: +- package_contents: + lib: + - R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so + +about: + homepage: https://ptrckprry.com/r-utf8/ + repository: https://github.com/patperry/r-utf8 + license: Apache-2.0 + license_family: Apache + license_file: LICENSE + summary: | + Process and print 'UTF-8' encoded international text (Unicode). Input, + validate, normalize, encode, format, and display. + +extra: + recipe-maintainers: + - IsabelParedes From 94e48a9caf0e4256b0484fd7e657641402cde361 Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Wed, 11 Sep 2024 12:16:10 +0200 Subject: [PATCH 226/333] Update libtiff from 4.5.1 to 4.6.0 (#1319) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/libtiff/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/libtiff/recipe.yaml b/recipes/recipes_emscripten/libtiff/recipe.yaml index 6852c6a57..37878399c 100644 --- a/recipes/recipes_emscripten/libtiff/recipe.yaml +++ b/recipes/recipes_emscripten/libtiff/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 4.5.1 + version: 4.6.0 package: name: libtiff @@ -7,7 +7,7 @@ package: source: url: https://download.osgeo.org/libtiff/tiff-${{ version }}.tar.gz - sha256: d7f38b6788e4a8f5da7940c5ac9424f494d8a79eba53d555f4a507167dca5e2b + sha256: 88b3979e6d5c7e32b50d7ec72fb15af724f6ab2cbf7e10880c360a77e4b5d99a build: number: 0 From 6ef53844b0b798556864c8f3abedcb54f0375ca8 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Wed, 11 Sep 2024 12:16:26 +0200 Subject: [PATCH 227/333] Add r-base64enc (#1314) --- recipes/recipes_emscripten/r-base64enc/GPL-3 | 674 ++++++++++++++++++ .../recipes_emscripten/r-base64enc/build.sh | 9 + .../r-base64enc/recipe.yaml | 44 ++ 3 files changed, 727 insertions(+) create mode 100644 recipes/recipes_emscripten/r-base64enc/GPL-3 create mode 100644 recipes/recipes_emscripten/r-base64enc/build.sh create mode 100644 recipes/recipes_emscripten/r-base64enc/recipe.yaml diff --git a/recipes/recipes_emscripten/r-base64enc/GPL-3 b/recipes/recipes_emscripten/r-base64enc/GPL-3 new file mode 100644 index 000000000..f288702d2 --- /dev/null +++ b/recipes/recipes_emscripten/r-base64enc/GPL-3 @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/recipes/recipes_emscripten/r-base64enc/build.sh b/recipes/recipes_emscripten/r-base64enc/build.sh new file mode 100644 index 000000000..eeef5603c --- /dev/null +++ b/recipes/recipes_emscripten/r-base64enc/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e + +echo "R_HOME=\$(PREFIX)/lib/R" > $BUILD_PREFIX/lib/R/etc/Makeconf +cat $PREFIX/lib/R/etc/Makeconf >> $BUILD_PREFIX/lib/R/etc/Makeconf + +$BUILD_PREFIX/bin/R CMD INSTALL . \ + --no-test-load --no-byte-compile --library=$PREFIX/lib/R/library diff --git a/recipes/recipes_emscripten/r-base64enc/recipe.yaml b/recipes/recipes_emscripten/r-base64enc/recipe.yaml new file mode 100644 index 000000000..b790b6ca0 --- /dev/null +++ b/recipes/recipes_emscripten/r-base64enc/recipe.yaml @@ -0,0 +1,44 @@ +context: + name: r-base64enc + version: 0.1-3 + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: + - https://cran.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + sha256: 6d856d8a364bcdc499a0bf38bfd283b7c743d08f0b288174fba7dbf0a04b688d + +build: + number: 0 + +requirements: + build: + - r-base == ${{ r_base_version }} + - ${{ compiler('c') }} + host: + - r-base == ${{ r_base_version }} + run: + - r-base == ${{ r_base_version }} + +tests: +- package_contents: + lib: + - R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so + +about: + homepage: http://www.rforge.net/base64enc + license: GPL-2.0-or-later + license_family: GPL3 + license_file: GPL-3 + summary: | + This package provides tools for handling base64 encoding. It is more + flexible than the orphaned base64 package. + +extra: + recipe-maintainers: + - IsabelParedes From 884eb46006d8b566a1094405bb298a8f118c77d8 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Wed, 11 Sep 2024 12:16:46 +0200 Subject: [PATCH 228/333] Add r-mass (#1315) --- recipes/recipes_emscripten/r-mass/GPL-3 | 674 ++++++++++++++++++ recipes/recipes_emscripten/r-mass/build.sh | 9 + recipes/recipes_emscripten/r-mass/recipe.yaml | 45 ++ 3 files changed, 728 insertions(+) create mode 100644 recipes/recipes_emscripten/r-mass/GPL-3 create mode 100644 recipes/recipes_emscripten/r-mass/build.sh create mode 100644 recipes/recipes_emscripten/r-mass/recipe.yaml diff --git a/recipes/recipes_emscripten/r-mass/GPL-3 b/recipes/recipes_emscripten/r-mass/GPL-3 new file mode 100644 index 000000000..f288702d2 --- /dev/null +++ b/recipes/recipes_emscripten/r-mass/GPL-3 @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/recipes/recipes_emscripten/r-mass/build.sh b/recipes/recipes_emscripten/r-mass/build.sh new file mode 100644 index 000000000..eeef5603c --- /dev/null +++ b/recipes/recipes_emscripten/r-mass/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e + +echo "R_HOME=\$(PREFIX)/lib/R" > $BUILD_PREFIX/lib/R/etc/Makeconf +cat $PREFIX/lib/R/etc/Makeconf >> $BUILD_PREFIX/lib/R/etc/Makeconf + +$BUILD_PREFIX/bin/R CMD INSTALL . \ + --no-test-load --no-byte-compile --library=$PREFIX/lib/R/library diff --git a/recipes/recipes_emscripten/r-mass/recipe.yaml b/recipes/recipes_emscripten/r-mass/recipe.yaml new file mode 100644 index 000000000..78ccf4b45 --- /dev/null +++ b/recipes/recipes_emscripten/r-mass/recipe.yaml @@ -0,0 +1,45 @@ +context: + name: r-mass + version: 7.3-61 + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: + - https://cran.r-project.org/src/contrib/${{ name[2:] | upper }}_${{ version }}.tar.gz + - https://cloud.r-project.org/src/contrib/${{ name[2:] | upper }}_${{ version }}.tar.gz + sha256: 3144c8bf579dd7b7c47c259728c27f53f53e294e7ed307da434dfd144e800a90 + +build: + number: 0 + +requirements: + build: + - r-base == ${{ r_base_version }} + - ${{ compiler('c') }} + host: + - r-base == ${{ r_base_version }} + run: + - r-base == ${{ r_base_version }} + +tests: +- package_contents: + lib: + - R/library/${{ name[2:] | upper }}/libs/${{ name[2:] | upper }}.so + +about: + homepage: http://www.stats.ox.ac.uk/pub/MASS4/ + repository: https://github.com/cran/MASS + license: GPL-2.0-or-later + license_family: GPL3 + license_file: GPL-3 + summary: | + Functions and datasets to support Venables and Ripley, "Modern Applied + Statistics with S" (4th edition, 2002). + +extra: + recipe-maintainers: + - IsabelParedes From 4c49088bbbe60002eb61d7e6229d9fb4e0a18282 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Wed, 11 Sep 2024 12:17:06 +0200 Subject: [PATCH 229/333] Add r-isoband (#1316) --- recipes/recipes_emscripten/r-isoband/build.sh | 9 ++++ .../recipes_emscripten/r-isoband/recipe.yaml | 46 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 recipes/recipes_emscripten/r-isoband/build.sh create mode 100644 recipes/recipes_emscripten/r-isoband/recipe.yaml diff --git a/recipes/recipes_emscripten/r-isoband/build.sh b/recipes/recipes_emscripten/r-isoband/build.sh new file mode 100644 index 000000000..eeef5603c --- /dev/null +++ b/recipes/recipes_emscripten/r-isoband/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e + +echo "R_HOME=\$(PREFIX)/lib/R" > $BUILD_PREFIX/lib/R/etc/Makeconf +cat $PREFIX/lib/R/etc/Makeconf >> $BUILD_PREFIX/lib/R/etc/Makeconf + +$BUILD_PREFIX/bin/R CMD INSTALL . \ + --no-test-load --no-byte-compile --library=$PREFIX/lib/R/library diff --git a/recipes/recipes_emscripten/r-isoband/recipe.yaml b/recipes/recipes_emscripten/r-isoband/recipe.yaml new file mode 100644 index 000000000..700af5df6 --- /dev/null +++ b/recipes/recipes_emscripten/r-isoband/recipe.yaml @@ -0,0 +1,46 @@ +context: + name: r-isoband + version: 0.2.7 + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: + - https://cran.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + sha256: 7693223343b45b86de2b5b638ff148f0dafa6d7b1237e822c5272902f79cdf61 + +build: + number: 0 + +requirements: + build: + - r-base == ${{ r_base_version }} + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + host: + - r-base == ${{ r_base_version }} + run: + - r-base == ${{ r_base_version }} + +tests: +- package_contents: + lib: + - R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so + +about: + homepage: https://isoband.r-lib.org/ + repository: https://github.com/r-lib/isoband/ + license: MIT + license_family: MIT + license_file: LICENSE + summary: | + A fast C++ implementation to generate contour lines (isolines) and contour + polygons (isobands) from regularly spaced grids containing elevation data. + +extra: + recipe-maintainers: + - IsabelParedes From 97e12ddcfb37249cd5344bbcc3e92a0614958ed3 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Wed, 11 Sep 2024 12:17:28 +0200 Subject: [PATCH 230/333] Add r-fastmap (#1309) Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/r-fastmap/build.sh | 9 ++++ .../recipes_emscripten/r-fastmap/recipe.yaml | 46 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 recipes/recipes_emscripten/r-fastmap/build.sh create mode 100644 recipes/recipes_emscripten/r-fastmap/recipe.yaml diff --git a/recipes/recipes_emscripten/r-fastmap/build.sh b/recipes/recipes_emscripten/r-fastmap/build.sh new file mode 100644 index 000000000..eeef5603c --- /dev/null +++ b/recipes/recipes_emscripten/r-fastmap/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e + +echo "R_HOME=\$(PREFIX)/lib/R" > $BUILD_PREFIX/lib/R/etc/Makeconf +cat $PREFIX/lib/R/etc/Makeconf >> $BUILD_PREFIX/lib/R/etc/Makeconf + +$BUILD_PREFIX/bin/R CMD INSTALL . \ + --no-test-load --no-byte-compile --library=$PREFIX/lib/R/library diff --git a/recipes/recipes_emscripten/r-fastmap/recipe.yaml b/recipes/recipes_emscripten/r-fastmap/recipe.yaml new file mode 100644 index 000000000..65f5f4ea6 --- /dev/null +++ b/recipes/recipes_emscripten/r-fastmap/recipe.yaml @@ -0,0 +1,46 @@ +context: + name: r-fastmap + version: 1.2.0 + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://cran.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + sha256: b1da04a2915d1d057f3c2525e295ef15016a64e6667eac83a14641bbd83b9246 + +build: + number: 0 + +requirements: + build: + - r-base == ${{ r_base_version }} + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + host: + - r-base == ${{ r_base_version }} + run: + - r-base == ${{ r_base_version }} + +tests: +- package_contents: + lib: + - R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so + +about: + homepage: https://r-lib.github.io/fastmap/ + repository: https://github.com/r-lib/fastmap + license: MIT + license_family: MIT + summary: | + Fast implementation of a key-value store. Environments are commonly used as + key-value stores, but every time a new key is used, it is added to R's + global symbol table, causing a small amount of memory leakage. This can be + problematic in cases where many different keys are used. Fastmap avoids this + memory leak issue by implementing the map using data structures in C++. + +extra: + recipe-maintainers: + - IsabelParedes From f0bd873106c6c908bb10f87c6d47737172f1a5a9 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Wed, 11 Sep 2024 13:13:43 +0200 Subject: [PATCH 231/333] Update r-base version (#1320) --- conda_build_config.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conda_build_config.yaml b/conda_build_config.yaml index 44329efad..3b5f1b773 100644 --- a/conda_build_config.yaml +++ b/conda_build_config.yaml @@ -601,8 +601,7 @@ ruby: - 2.5 - 2.6 r_base: - - 4.0 - - 4.1 + - 4.4.1 scotch: - 6.0.9 ptscotch: From 62197f785d792a5c4744dc5deeb93cc2400d05ee Mon Sep 17 00:00:00 2001 From: Miles Granger Date: Wed, 11 Sep 2024 14:38:47 +0200 Subject: [PATCH 232/333] Add cramjam (#1321) --- recipes/recipes_emscripten/cramjam/build.sh | 4 ++ .../recipes_emscripten/cramjam/recipe.yaml | 53 +++++++++++++++++++ .../cramjam/test_cramjam.py | 6 +++ 3 files changed, 63 insertions(+) create mode 100644 recipes/recipes_emscripten/cramjam/build.sh create mode 100644 recipes/recipes_emscripten/cramjam/recipe.yaml create mode 100644 recipes/recipes_emscripten/cramjam/test_cramjam.py diff --git a/recipes/recipes_emscripten/cramjam/build.sh b/recipes/recipes_emscripten/cramjam/build.sh new file mode 100644 index 000000000..40251a01b --- /dev/null +++ b/recipes/recipes_emscripten/cramjam/build.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +export MATURIN_PYTHON_SYSCONFIGDATA_DIR=${PREFIX}/etc/conda/_sysconfigdata__emscripten_wasm32-emscripten.py +${PYTHON} -m pip install . -vv diff --git a/recipes/recipes_emscripten/cramjam/recipe.yaml b/recipes/recipes_emscripten/cramjam/recipe.yaml new file mode 100644 index 000000000..98218727d --- /dev/null +++ b/recipes/recipes_emscripten/cramjam/recipe.yaml @@ -0,0 +1,53 @@ +context: + name: cramjam + version: 2.8.3 + +package: + name: ${{ name|lower }} + version: ${{ version }} + +source: + url: https://pypi.io/packages/source/${{ name[0] }}/${{ name }}/${{ name }}-${{ version }}.tar.gz + sha256: 6b1fa0a6ea8183831d04572597c182bd6cece62d583a36cde1e6a86e72ce2389 + +build: + number: 0 + +requirements: + build: + - python + - cross-python_${{ target_platform }} + - maturin + - toml + - rust + - ${{ compiler('cxx') }} + host: + - python + - pip + run: + - python + +tests: + - script: pytester + files: + recipe: + - test_cramjam.py + requirements: + build: + - pytester + run: + - pytester-run + +about: + homepage: https://github.com/milesgranger/cramjam + license: MIT + license_family: MIT + license_file: LICENSE + summary: python bindings to rust-implemented compression + description: | + Extremely thin Python bindings to de/compression algorithms in Rust. + documentation: https://docs.rs/cramjam + +extra: + recipe-maintainers: + - milesgranger diff --git a/recipes/recipes_emscripten/cramjam/test_cramjam.py b/recipes/recipes_emscripten/cramjam/test_cramjam.py new file mode 100644 index 000000000..167dbab1e --- /dev/null +++ b/recipes/recipes_emscripten/cramjam/test_cramjam.py @@ -0,0 +1,6 @@ +def test_cramjam(): + import cramjam + + compressed = cramjam.snappy.compress(b"bytes") + decompressed = cramjam.snappy.decompress(compressed) + assert bytes(decompressed) == b"bytes" From e507112e8bd02b120bb783b7129014d0fd4c990e Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Wed, 11 Sep 2024 17:23:24 +0200 Subject: [PATCH 233/333] Rebuild r-packages (#1322) --- .../r-base64enc/recipe.yaml | 6 +- recipes/recipes_emscripten/r-digest/GPL-2 | 339 ++++++++++++++++++ .../recipes_emscripten/r-digest/recipe.yaml | 7 +- .../recipes_emscripten/r-fansi/recipe.yaml | 9 +- .../recipes_emscripten/r-fastmap/recipe.yaml | 7 +- recipes/recipes_emscripten/r-glue/recipe.yaml | 12 +- .../recipes_emscripten/r-isoband/recipe.yaml | 6 +- .../recipes_emscripten/r-jsonlite/recipe.yaml | 13 +- recipes/recipes_emscripten/r-mass/recipe.yaml | 2 +- recipes/recipes_emscripten/r-utf8/recipe.yaml | 6 +- 10 files changed, 382 insertions(+), 25 deletions(-) create mode 100644 recipes/recipes_emscripten/r-digest/GPL-2 diff --git a/recipes/recipes_emscripten/r-base64enc/recipe.yaml b/recipes/recipes_emscripten/r-base64enc/recipe.yaml index b790b6ca0..1d03868af 100644 --- a/recipes/recipes_emscripten/r-base64enc/recipe.yaml +++ b/recipes/recipes_emscripten/r-base64enc/recipe.yaml @@ -9,12 +9,12 @@ package: source: url: - - https://cran.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz - - https://cloud.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz sha256: 6d856d8a364bcdc499a0bf38bfd283b7c743d08f0b288174fba7dbf0a04b688d build: - number: 0 + number: 1 requirements: build: diff --git a/recipes/recipes_emscripten/r-digest/GPL-2 b/recipes/recipes_emscripten/r-digest/GPL-2 new file mode 100644 index 000000000..d159169d1 --- /dev/null +++ b/recipes/recipes_emscripten/r-digest/GPL-2 @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/recipes/recipes_emscripten/r-digest/recipe.yaml b/recipes/recipes_emscripten/r-digest/recipe.yaml index 4ba02591e..d3e5c3321 100644 --- a/recipes/recipes_emscripten/r-digest/recipe.yaml +++ b/recipes/recipes_emscripten/r-digest/recipe.yaml @@ -8,11 +8,13 @@ package: version: ${{ version }} source: - url: https://cran.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + url: + - https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz sha256: 82c4d149994b8a4a9af930f5a8e47420829935abed41f3f9030e94b6a48f0321 build: - number: 0 + number: 1 requirements: build: @@ -33,6 +35,7 @@ about: repository: https://github.com/eddelbuettel/digest license: GPL-2.0 license_family: GPL2 + license_file: GPL-2 summary: Compact hash representations of arbritrary R objects. extra: diff --git a/recipes/recipes_emscripten/r-fansi/recipe.yaml b/recipes/recipes_emscripten/r-fansi/recipe.yaml index 4213a6f1b..50bdba214 100644 --- a/recipes/recipes_emscripten/r-fansi/recipe.yaml +++ b/recipes/recipes_emscripten/r-fansi/recipe.yaml @@ -8,11 +8,13 @@ package: version: ${{ version }} source: - url: https://cran.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + url: + - https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz sha256: ea9dc690dfe50a7fad7c5eb863c157d70385512173574c56f4253b6dfe431863 build: - number: 0 + number: 1 requirements: build: @@ -32,7 +34,8 @@ about: homepage: https://github.com/brodieG/fansi repository: https://github.com/brodieG/fansi license: GPL-2.0-or-later - license_family: GLP3 + license_family: GPL3 + license_file: COPYING summary: ANSI Control Sequence Aware String Functions. extra: diff --git a/recipes/recipes_emscripten/r-fastmap/recipe.yaml b/recipes/recipes_emscripten/r-fastmap/recipe.yaml index 65f5f4ea6..71bf4d70d 100644 --- a/recipes/recipes_emscripten/r-fastmap/recipe.yaml +++ b/recipes/recipes_emscripten/r-fastmap/recipe.yaml @@ -8,11 +8,13 @@ package: version: ${{ version }} source: - url: https://cran.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + url: + - https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz sha256: b1da04a2915d1d057f3c2525e295ef15016a64e6667eac83a14641bbd83b9246 build: - number: 0 + number: 1 requirements: build: @@ -34,6 +36,7 @@ about: repository: https://github.com/r-lib/fastmap license: MIT license_family: MIT + license_file: LICENSE summary: | Fast implementation of a key-value store. Environments are commonly used as key-value stores, but every time a new key is used, it is added to R's diff --git a/recipes/recipes_emscripten/r-glue/recipe.yaml b/recipes/recipes_emscripten/r-glue/recipe.yaml index 11367a320..7ca1be929 100644 --- a/recipes/recipes_emscripten/r-glue/recipe.yaml +++ b/recipes/recipes_emscripten/r-glue/recipe.yaml @@ -8,22 +8,28 @@ package: version: ${{ version }} source: - url: https://cran.r-project.org//src/contrib/glue_${{ version }}.tar.gz + url: + - https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz sha256: 1af51b51f52c1aeb3bfe9349f55896dd78b5542ffdd5654e432e4d646e4a86dc build: - number: 0 + number: 1 requirements: build: - r-base == ${{ r_base_version }} - ${{ compiler('c') }} - - make host: - r-base == ${{ r_base_version }} run: - r-base == ${{ r_base_version }} +tests: +- package_contents: + lib: + - R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so + about: homepage: https://github.com/tidyverse/glue license: MIT diff --git a/recipes/recipes_emscripten/r-isoband/recipe.yaml b/recipes/recipes_emscripten/r-isoband/recipe.yaml index 700af5df6..8bdc17246 100644 --- a/recipes/recipes_emscripten/r-isoband/recipe.yaml +++ b/recipes/recipes_emscripten/r-isoband/recipe.yaml @@ -9,12 +9,12 @@ package: source: url: - - https://cran.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz - - https://cloud.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz sha256: 7693223343b45b86de2b5b638ff148f0dafa6d7b1237e822c5272902f79cdf61 build: - number: 0 + number: 1 requirements: build: diff --git a/recipes/recipes_emscripten/r-jsonlite/recipe.yaml b/recipes/recipes_emscripten/r-jsonlite/recipe.yaml index 9b0b0739b..10974ea9b 100644 --- a/recipes/recipes_emscripten/r-jsonlite/recipe.yaml +++ b/recipes/recipes_emscripten/r-jsonlite/recipe.yaml @@ -8,28 +8,31 @@ package: version: ${{ version }} source: - url: https://cran.r-project.org/src/contrib/jsonlite_${{ version }}.tar.gz + url: + - https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz sha256: 7de21316984c3ba3d7423d12f43d1c30c716007c5e39bf07e11885e0ceb0caa4 build: - number: 0 + number: 1 requirements: build: - r-base == ${{ r_base_version }} - ${{ compiler('c') }} - - make host: - r-base == ${{ r_base_version }} run: - r-base == ${{ r_base_version }} tests: -- script: - - test -f $PREFIX/lib/R/library/jsonlite/libs/jsonlite.so +- package_contents: + lib: + - R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so about: homepage: https://arxiv.org/abs/1403.2805, https://www.opencpu.org/posts/jsonlite-a-smarter-json-encoder + repository: https://github.com/jeroen/jsonlite license: MIT license_family: MIT license_file: LICENSE diff --git a/recipes/recipes_emscripten/r-mass/recipe.yaml b/recipes/recipes_emscripten/r-mass/recipe.yaml index 78ccf4b45..0a0eba397 100644 --- a/recipes/recipes_emscripten/r-mass/recipe.yaml +++ b/recipes/recipes_emscripten/r-mass/recipe.yaml @@ -14,7 +14,7 @@ source: sha256: 3144c8bf579dd7b7c47c259728c27f53f53e294e7ed307da434dfd144e800a90 build: - number: 0 + number: 1 requirements: build: diff --git a/recipes/recipes_emscripten/r-utf8/recipe.yaml b/recipes/recipes_emscripten/r-utf8/recipe.yaml index a2e2b212c..df6514700 100644 --- a/recipes/recipes_emscripten/r-utf8/recipe.yaml +++ b/recipes/recipes_emscripten/r-utf8/recipe.yaml @@ -9,12 +9,12 @@ package: source: url: - - https://cran.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz - - https://cloud.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz sha256: 418f824bbd9cd868d2d8a0d4345545c62151d321224cdffca8b1ffd98a167b7d build: - number: 0 + number: 1 requirements: build: From 251d35d9ff7f6a9f633271342e4c663c14e014c1 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Mon, 16 Sep 2024 01:09:45 +0000 Subject: [PATCH 234/333] Update proj from 9.4.1 to 9.5.0 --- recipes/recipes_emscripten/proj/recipe.yaml | 28 ++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/recipes/recipes_emscripten/proj/recipe.yaml b/recipes/recipes_emscripten/proj/recipe.yaml index 416069f9d..50d28b0b6 100644 --- a/recipes/recipes_emscripten/proj/recipe.yaml +++ b/recipes/recipes_emscripten/proj/recipe.yaml @@ -1,6 +1,6 @@ context: name: proj - version: 9.4.1 + version: 9.5.0 package: name: ${{ name }} @@ -8,28 +8,28 @@ package: source: url: https://download.osgeo.org/proj/proj-${{ version }}.tar.gz - sha256: ffe20170ee2b952207adf8a195e2141eab12cda181e49fdeb54425d98c7171d7 + sha256: 659af0d558f7c5618c322fde2d3392910806faee8684687959339021fa207d99 build: number: 1 requirements: build: - - cmake - - make - - ${{ compiler('c') }} - - ${{ compiler('cxx') }} - - requests + - cmake + - make + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + - requests host: - - sqlitecpp - - libtiff + - sqlitecpp + - libtiff run: - - sqlitecpp - - libtiff + - sqlitecpp + - libtiff tests: - - script: - - test -f ${PREFIX}/include/proj.h +- script: + - test -f ${PREFIX}/include/proj.h about: homepage: https://proj.org/ @@ -39,4 +39,4 @@ about: extra: recipe-maintainers: - - KGB99 + - KGB99 From ab2eec01586e79f21fcc4f183f5b3ee41f957ec3 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Thu, 19 Sep 2024 01:08:06 +0000 Subject: [PATCH 235/333] Update libtiff from 4.6.0 to 4.7.0 --- recipes/recipes_emscripten/libtiff/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/libtiff/recipe.yaml b/recipes/recipes_emscripten/libtiff/recipe.yaml index 37878399c..17eb3ad2e 100644 --- a/recipes/recipes_emscripten/libtiff/recipe.yaml +++ b/recipes/recipes_emscripten/libtiff/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 4.6.0 + version: 4.7.0 package: name: libtiff @@ -7,7 +7,7 @@ package: source: url: https://download.osgeo.org/libtiff/tiff-${{ version }}.tar.gz - sha256: 88b3979e6d5c7e32b50d7ec72fb15af724f6ab2cbf7e10880c360a77e4b5d99a + sha256: 67160e3457365ab96c5b3286a0903aa6e78bdc44c4bc737d2e486bcecb6ba976 build: number: 0 From f4974014ff1037882c2b7343b8eaece1e443a6d0 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Tue, 24 Sep 2024 01:08:54 +0000 Subject: [PATCH 236/333] Update harfbuzz from 9.0.0 to 10.0.0 --- recipes/recipes_emscripten/harfbuzz/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/harfbuzz/recipe.yaml b/recipes/recipes_emscripten/harfbuzz/recipe.yaml index 9f6d50984..6596dd51f 100644 --- a/recipes/recipes_emscripten/harfbuzz/recipe.yaml +++ b/recipes/recipes_emscripten/harfbuzz/recipe.yaml @@ -1,6 +1,6 @@ context: name: harfbuzz - version: 9.0.0 + version: 10.0.0 package: name: ${{ name }} @@ -8,7 +8,7 @@ package: source: url: https://github.com/${{ name }}/${{ name }}/archive/${{ version }}.tar.gz - sha256: b7e481b109d19aefdba31e9f5888aa0cdfbe7608fed9a43494c060ce1f8a34d2 + sha256: b63577e1d306d787a588b22f4e656da100d60b29d4d10a2e0157b575758566e4 build: number: 0 From 3eaffb5ee23b8310f47153f2053aa099efa29c2d Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Thu, 26 Sep 2024 17:59:22 +0530 Subject: [PATCH 237/333] Update attempt from llvm 17 to 19 (#1331) --- pixi.toml | 2 +- recipes/recipes_emscripten/llvm/recipe.yaml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pixi.toml b/pixi.toml index b7c8504d6..10126a30f 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.18.1" +rattler-build = ">=0.18.1" python = "3.11.*" typer = "*" curl = "*" diff --git a/recipes/recipes_emscripten/llvm/recipe.yaml b/recipes/recipes_emscripten/llvm/recipe.yaml index 6cb19e538..7e408994c 100644 --- a/recipes/recipes_emscripten/llvm/recipe.yaml +++ b/recipes/recipes_emscripten/llvm/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 17.0.6 + version: 19.1.0 package: name: llvm @@ -8,12 +8,12 @@ package: source: url: https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-${{ version }}.tar.gz - sha256: 81494d32e6f12ea6f73d6d25424dbd2364646011bb8f7e345ca870750aa27de1 + sha256: 0a08341036ca99a106786f50f9c5cb3fbe458b3b74cab6089fd368d0edb2edfe patches: - patches/cross_compile.patch build: - number: 6 + number: 0 requirements: build: From ee46c5b02612584412084036a0c7b391907075bd Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Thu, 26 Sep 2024 01:09:18 +0000 Subject: [PATCH 238/333] Update fribidi from 1.0.15 to 1.0.16 --- recipes/recipes_emscripten/fribidi/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/fribidi/recipe.yaml b/recipes/recipes_emscripten/fribidi/recipe.yaml index ada40db87..5bb1fb94d 100644 --- a/recipes/recipes_emscripten/fribidi/recipe.yaml +++ b/recipes/recipes_emscripten/fribidi/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 1.0.15 + version: 1.0.16 package: name: fribidi @@ -8,7 +8,7 @@ package: source: url: https://github.com/fribidi/fribidi/releases/download/v${{ version }}/fribidi-${{ version }}.tar.xz - sha256: 0bbc7ff633bfa208ae32d7e369cf5a7d20d5d2557a0b067c9aa98bcbf9967587 + sha256: 1b1cde5b235d40479e91be2f0e88a309e3214c8ab470ec8a2744d82a5a9ea05c build: number: 0 From 14282d9db7939a14d11738e90a72358289ce9ae7 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Thu, 26 Sep 2024 01:08:34 +0000 Subject: [PATCH 239/333] Update harfbuzz from 10.0.0 to 10.0.1 --- recipes/recipes_emscripten/harfbuzz/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/harfbuzz/recipe.yaml b/recipes/recipes_emscripten/harfbuzz/recipe.yaml index 6596dd51f..8d82e2a15 100644 --- a/recipes/recipes_emscripten/harfbuzz/recipe.yaml +++ b/recipes/recipes_emscripten/harfbuzz/recipe.yaml @@ -1,6 +1,6 @@ context: name: harfbuzz - version: 10.0.0 + version: 10.0.1 package: name: ${{ name }} @@ -8,7 +8,7 @@ package: source: url: https://github.com/${{ name }}/${{ name }}/archive/${{ version }}.tar.gz - sha256: b63577e1d306d787a588b22f4e656da100d60b29d4d10a2e0157b575758566e4 + sha256: e7358ea86fe10fb9261931af6f010d4358dac64f7074420ca9bc94aae2bdd542 build: number: 0 From b594ce9b7e4dee0901a730053ac537ea1207a302 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Fri, 27 Sep 2024 01:08:10 +0000 Subject: [PATCH 240/333] Update astropy from 6.1.3 to 6.1.4 --- recipes/recipes_emscripten/astropy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/astropy/recipe.yaml b/recipes/recipes_emscripten/astropy/recipe.yaml index 9d584a8b0..efecd3212 100644 --- a/recipes/recipes_emscripten/astropy/recipe.yaml +++ b/recipes/recipes_emscripten/astropy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 6.1.3 + version: 6.1.4 package: name: astropy @@ -7,7 +7,7 @@ package: source: - url: https://pypi.io/packages/source/a/astropy/astropy-${{ version }}.tar.gz - sha256: 9ac834cdedc1f6b5ce6f941f7bfbbfc58fca861eb172bcf72dd90aff8f750970 + sha256: 361558e2b093a99bebe69f1fd47fac86a192607a4c16ed39ba0a800b2ab60c34 # patches: # - patches/skip_ep.patch From 14618ec9d1ad7d87b811e17860fb8eb97f50192c Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Mon, 30 Sep 2024 12:05:44 +0200 Subject: [PATCH 241/333] Add r-rlang (#1303) * Add r-rlang * Add build script * Update test * Add mirror --- recipes/recipes_emscripten/r-rlang/build.sh | 9 ++++ .../recipes_emscripten/r-rlang/recipe.yaml | 44 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 recipes/recipes_emscripten/r-rlang/build.sh create mode 100644 recipes/recipes_emscripten/r-rlang/recipe.yaml diff --git a/recipes/recipes_emscripten/r-rlang/build.sh b/recipes/recipes_emscripten/r-rlang/build.sh new file mode 100644 index 000000000..eeef5603c --- /dev/null +++ b/recipes/recipes_emscripten/r-rlang/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e + +echo "R_HOME=\$(PREFIX)/lib/R" > $BUILD_PREFIX/lib/R/etc/Makeconf +cat $PREFIX/lib/R/etc/Makeconf >> $BUILD_PREFIX/lib/R/etc/Makeconf + +$BUILD_PREFIX/bin/R CMD INSTALL . \ + --no-test-load --no-byte-compile --library=$PREFIX/lib/R/library diff --git a/recipes/recipes_emscripten/r-rlang/recipe.yaml b/recipes/recipes_emscripten/r-rlang/recipe.yaml new file mode 100644 index 000000000..ecbbe2462 --- /dev/null +++ b/recipes/recipes_emscripten/r-rlang/recipe.yaml @@ -0,0 +1,44 @@ +context: + version: 1.1.4 + name: r-rlang + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: + - https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + sha256: f2d74527508bf3287102470beb27de0d234c3cbba399c28d3312f2c83c64a6e1 + +build: + number: 0 + +requirements: + build: + - r-base == ${{ r_base_version }} + - ${{ compiler('c') }} + host: + - r-base == ${{ r_base_version }} + run: + - r-base == ${{ r_base_version }} + +tests: +- package_contents: + lib: + - R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so + +about: + homepage: http://rlang.r-lib.org + repository: https://github.com/r-lib/rlang + license: GPL-3.0-only + summary: | + A toolbox for working with base types, core R features like the condition + system, and core 'Tidyverse' features like tidy evaluation. + license_family: GPL3 + +extra: + recipe-maintainers: + - IsabelParedes From f32248fe39828d1c9fa8030719dae056d0b3d2e7 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Tue, 1 Oct 2024 17:09:04 +0200 Subject: [PATCH 242/333] Rebuild r-base (#1355) * Remove unused lapack * Disable threads * Limit use of fPIC * Limit use of atomics and bulkmemory * Update R shell wrapper patch * Print config log if failure * Fix use of R binary and data files * Clean up --- recipes/recipes_emscripten/r-base/build.sh | 28 +++-- recipes/recipes_emscripten/r-base/config.site | 18 +-- .../0005-Use-R-binary-from-build-prefix.patch | 49 +++++++-- ...ecks-when-using-internal-lapack-blas.patch | 26 +++++ ...-with-fPIC-only-modules-that-need-it.patch | 104 ++++++++++++++++++ ...12-Build-with-atomics-and-bulkmemory.patch | 37 +++++++ recipes/recipes_emscripten/r-base/recipe.yaml | 18 +-- 7 files changed, 239 insertions(+), 41 deletions(-) create mode 100644 recipes/recipes_emscripten/r-base/patches/0010-Fix-iconv-checks-when-using-internal-lapack-blas.patch create mode 100644 recipes/recipes_emscripten/r-base/patches/0011-Build-with-fPIC-only-modules-that-need-it.patch create mode 100644 recipes/recipes_emscripten/r-base/patches/0012-Build-with-atomics-and-bulkmemory.patch diff --git a/recipes/recipes_emscripten/r-base/build.sh b/recipes/recipes_emscripten/r-base/build.sh index bd57e83f6..1b70c8fb3 100644 --- a/recipes/recipes_emscripten/r-base/build.sh +++ b/recipes/recipes_emscripten/r-base/build.sh @@ -19,10 +19,6 @@ export r_cv_have_lzma=yes export r_cv_have_pcre2utf=yes export r_cv_size_max=yes -# NOTE: When cross-compiling, it sets the version check to fail regardless of -# the lapack version. This is a workaround to skip the version check. -# export r_cv_lapack_ver=yes - # Not supported export ac_cv_have_decl_getrusage=no export ac_cv_have_decl_getrlimit=no @@ -30,6 +26,9 @@ export ac_cv_have_decl_sigaltstack=no export ac_cv_have_decl_wcsftime=no export ac_cv_have_decl_umask=no +# SIDE_MODULE + pthread is experimental, and pthread_kill is not implemented +export r_cv_search_pthread_kill=no + export OBJDUMP=llvm-objdump # Otherwise set to .not_implemented and cannot be used @@ -47,29 +46,38 @@ emconfigure ../configure \ --build="x86_64-conda-linux-gnu" \ --host="wasm32-unknown-emscripten" \ --enable-R-static-lib \ - --enable-BLAS-shlib \ - --with-cairo \ --without-readline \ --without-x \ - --enable-static \ --enable-java=no \ --enable-R-profiling=no \ --enable-byte-compiled-packages=no \ --disable-rpath \ --disable-openmp \ - --disable-threads \ --disable-nls \ --with-internal-tzcode \ --with-recommended-packages=no \ - --with-libdeflate-compression=no +|| cat config.log # NOTE: Remove the -lFortranRuntime from the FLIBS to avoid double-linking # when creating the R binary -echo "FLIBS = " >> Makeconf +echo "FLIBS =" >> Makeconf emmake make -j${CPU_COUNT} emmake make install +# FIXME: The database files for the internal modules are installed in a "help" +# directory, this copies them to the expected location. It also helps avoid +# packaging r-base files in other R packages when using cross-r-base. +pushd $PREFIX/lib/R/library + for pkg in $(ls); do + if [ "$pkg" == "datasets" ]; then + cp -n ${BUILD_PREFIX}/lib/R/library/$pkg/data/* $pkg/data/ + elif [ -d $pkg/help ]; then + cp -n $pkg/help/$pkg.rd* $pkg/R/ + fi + done +popd + # Manually copying .wasm files cp src/main/R.* $PREFIX/lib/R/bin/exec/ cp src/unix/Rscript.wasm $PREFIX/lib/R/bin/ diff --git a/recipes/recipes_emscripten/r-base/config.site b/recipes/recipes_emscripten/r-base/config.site index 92d157595..7864a722c 100644 --- a/recipes/recipes_emscripten/r-base/config.site +++ b/recipes/recipes_emscripten/r-base/config.site @@ -53,7 +53,7 @@ CC=emcc ## and '-g' in all other cases except icc (for which see R-admin.html). ## Be wary of aggressive settings such as -ffast-math, -Ofast and ## -Werror (which is likely to cause configure to fail). -CFLAGS="-g3 -matomics -mbulk-memory -fPIC" # Needed for context.c +# CFLAGS= ## Ditto for a compiler that supports C17 features and not C23 ones. ## For example, 'CC17=gcc -std=gnu17', omit -Wstrict-prototypes from C17FLAGS. @@ -93,15 +93,7 @@ CFLAGS="-g3 -matomics -mbulk-memory -fPIC" # Needed for context.c ## For example, on some systems one needs 'MAIN_CFLAGS=-pg' when ## profiling. ## NOTE: These apply to Rscript -MAIN_CFLAGS="--pre-js ${RECIPE_DIR}/pre.js \ --sWASM_BIGINT \ --sMAIN_MODULE=1 \ --sSTACK_SIZE=5MB \ --sALLOW_MEMORY_GROWTH=1 \ --sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings,TTY \ --sFORCE_FILESYSTEM=1 \ --sINVOKE_RUN=0 \ --sMODULARIZE" +# MAIN_CFLAGS= SHLIB_CFLAGS="-sSIDE_MODULE=1" ## Header file search directory ('-IDIR') and any other miscellaneous @@ -117,7 +109,7 @@ FC=flang-new ## Options for the Fortran compiler. ## Use this to specify comilation flags for fixed-form Fortran. -FFLAGS="-g --target=wasm32-unknown-emscripten -fPIC" +FFLAGS="-g --target=wasm32-unknown-emscripten" ## Ditto for free-form Fortran. ## FCFLAGS= ## If just one of these is set, it is used for both. @@ -168,8 +160,8 @@ MAIN_LDFLAGS="--pre-js ${RECIPE_DIR}/pre.js \ -sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings,TTY \ -sFORCE_FILESYSTEM=1 \ -sINVOKE_RUN=0" - # -sMODULIRIZE=1 \ - # -sEXPORT_NAME=R" +# -sMODULARIZE=1 \ +# -sEXPORT_NAME=R" ## Any special flags which must be used when compiling C code to be ## turned into a shared object. This is typically something like diff --git a/recipes/recipes_emscripten/r-base/patches/0005-Use-R-binary-from-build-prefix.patch b/recipes/recipes_emscripten/r-base/patches/0005-Use-R-binary-from-build-prefix.patch index 5d362b397..2497c2f89 100644 --- a/recipes/recipes_emscripten/r-base/patches/0005-Use-R-binary-from-build-prefix.patch +++ b/recipes/recipes_emscripten/r-base/patches/0005-Use-R-binary-from-build-prefix.patch @@ -1,25 +1,54 @@ -From 20e0c7a1fbef6b570dd17e9ca8d1c9f763b61d6f Mon Sep 17 00:00:00 2001 +From a1bf7a149e8f7728c581b4995bcd143d9de91eb9 Mon Sep 17 00:00:00 2001 From: Isabel Paredes -Date: Wed, 21 Aug 2024 13:07:43 +0200 -Subject: [PATCH 5/9] Use R binary from build prefix +Date: Tue, 1 Oct 2024 13:20:32 +0200 +Subject: [PATCH] Use R binary from build prefix --- - src/scripts/R.sh.in | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) + src/scripts/R.sh.in | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/scripts/R.sh.in b/src/scripts/R.sh.in -index cdbac8b..9b82870 100644 +index cdbac8b..74b0472 100644 --- a/src/scripts/R.sh.in +++ b/src/scripts/R.sh.in -@@ -249,7 +249,10 @@ done +@@ -1,7 +1,7 @@ + #!@R_SHELL@ + # Shell wrapper for R executable. + +-R_HOME_DIR= ++R_HOME_DIR="${BUILD_PREFIX}/lib/R" + if test "${R_HOME_DIR}" = "@prefix@/@LIBnn@/R"; then + case "@R_OS@" in + linux*) +@@ -26,6 +26,9 @@ if test "${R_HOME_DIR}" = "@prefix@/@LIBnn@/R"; then + esac + fi + ++# This is to be able to use R libs in the build environment ++R_HOME_DIR="${BUILD_PREFIX}/lib/R" ++ + if test -n "${R_HOME}" && \ + test "${R_HOME}" != "${R_HOME_DIR}"; then + echo "WARNING: ignoring environment value of R_HOME" +@@ -249,7 +252,9 @@ done . "${R_HOME}/etc${R_ARCH}/ldpaths" -R_binary="${R_HOME}/bin/exec${R_ARCH}/R" -+# This does not work when cross-compiling because the R binary is JavaScript -+# R_binary="${R_HOME}/bin/exec${R_ARCH}/R" -+R_binary="${BUILD_PREFIX}/bin/R" ++# This must be executable in the build environment ++R_binary="${BUILD_PREFIX}/lib/R/bin/exec${R_ARCH}/R" + export R_ARCH case "${gui}" in +@@ -270,7 +275,9 @@ fi + + ## Startup + if test -z "${debugger}"; then +- exec "${R_binary}" @R_BATCHSAVE@ ${args} "${@}" ++ if ! "${R_binary}" @R_BATCHSAVE@ ${args} "${@}"; then ++ echo "WARNING: Failed to execute ${R_binary} ${args} ${@}" ++ fi + else + ## Ideally, we would like the debugger to start R with additional + ## ('inferior') arguments, but not all debuggers can do this. We know diff --git a/recipes/recipes_emscripten/r-base/patches/0010-Fix-iconv-checks-when-using-internal-lapack-blas.patch b/recipes/recipes_emscripten/r-base/patches/0010-Fix-iconv-checks-when-using-internal-lapack-blas.patch new file mode 100644 index 000000000..d141c076e --- /dev/null +++ b/recipes/recipes_emscripten/r-base/patches/0010-Fix-iconv-checks-when-using-internal-lapack-blas.patch @@ -0,0 +1,26 @@ +From c5a9ed4060aae8fb4afba1e93ad443f50fdc348a Mon Sep 17 00:00:00 2001 +From: Isabel Paredes +Date: Thu, 19 Sep 2024 12:01:16 +0200 +Subject: [PATCH] Fix iconv checks when using internal lapack/blas. + +acx_lapack_ok is set to yes even when the lapack library is not +available. This causes "-lblas" to be appended to LIBS, which is a +problem when using the internal lapack/blas implementation because the +blas library is not built yet. And ultimately this causes the iconv +checks to fail because it cannot find blas. +--- + configure | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure b/configure +index 59ed097..a696ecd 100755 +--- a/configure ++++ b/configure +@@ -48419,6 +48419,7 @@ else case e in #( + e) if test "$cross_compiling" = yes + then : + r_cv_atlas_liblapack=no ++ acx_lapack_ok=no + else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ diff --git a/recipes/recipes_emscripten/r-base/patches/0011-Build-with-fPIC-only-modules-that-need-it.patch b/recipes/recipes_emscripten/r-base/patches/0011-Build-with-fPIC-only-modules-that-need-it.patch new file mode 100644 index 000000000..eb73db10d --- /dev/null +++ b/recipes/recipes_emscripten/r-base/patches/0011-Build-with-fPIC-only-modules-that-need-it.patch @@ -0,0 +1,104 @@ +From cd54d15048c734f23c9c352415bf2491a7315c05 Mon Sep 17 00:00:00 2001 +From: Isabel Paredes +Date: Thu, 19 Sep 2024 18:36:33 +0200 +Subject: [PATCH 1/5] Build with -fPIC only modules that need it + +--- + src/appl/Makefile.in | 2 ++ + src/extra/tre/Makefile.in | 2 ++ + src/extra/tzone/Makefile.in | 2 +- + src/extra/xdr/Makefile.in | 2 +- + src/main/Makefile.in | 2 +- + src/nmath/Makefile.in | 1 + + src/unix/Makefile.in | 1 + + 7 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/src/appl/Makefile.in b/src/appl/Makefile.in +index 2c2243e..34ccbd2 100644 +--- a/src/appl/Makefile.in ++++ b/src/appl/Makefile.in +@@ -31,6 +31,8 @@ DISTFILES = \ + @WANT_R_SHLIB_TRUE@ALL_CFLAGS = $(ALL_CFLAGS_LO) + @WANT_R_SHLIB_TRUE@ALL_FFLAGS = $(ALL_FFLAGS_LO) + @WANT_R_SHLIB_FALSE@ALL_FFLAGS = $(ALL_FFLAGS_PIE) ++ALL_CPPFLAGS += $(CPICFLAGS) ++ALL_FFLAGS += $(FPICFLAGS) + + Rblas_la = libRblas$(R_DYLIB_EXT) + ## This should neally be Darwin-only. +diff --git a/src/extra/tre/Makefile.in b/src/extra/tre/Makefile.in +index 844e15e..552cfd0 100644 +--- a/src/extra/tre/Makefile.in ++++ b/src/extra/tre/Makefile.in +@@ -24,6 +24,8 @@ HEADERS = tre.h tre-ast.h tre-compile.h tre-config.h tre-internal.h \ + + DEPENDS = $(SOURCES:.c=.d) + OBJECTS = $(SOURCES:.c=.o) ++ ++ALL_CPPFLAGS += $(CPICFLAGS) + @WANT_R_SHLIB_TRUE@ALL_CFLAGS = $(ALL_CFLAGS_LO) @C_VISIBILITY@ + + distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) +diff --git a/src/extra/tzone/Makefile.in b/src/extra/tzone/Makefile.in +index 07d263a..7064b7f 100644 +--- a/src/extra/tzone/Makefile.in ++++ b/src/extra/tzone/Makefile.in +@@ -18,7 +18,7 @@ DEPENDS = $(SOURCES:.c=.d) + OBJECTS = $(SOURCES:.c=.o) + @WANT_R_SHLIB_TRUE@ALL_CFLAGS = $(R_XTRA_CFLAGS) $(CPICFLAGS) $(SHLIB_CFLAGS) $(CFLAGS) @C_VISIBILITY@ + +-ALL_CPPFLAGS=$(R_XTRA_CPPFLAGS) -I$(srcdir) -I$(top_srcdir)/src/main $(CPPFLAGS) $(DEFS) @XTRA_INTL_CPPFLAGS@ ++ALL_CPPFLAGS=$(R_XTRA_CPPFLAGS) $(CPICFLAGS) -I$(srcdir) -I$(top_srcdir)/src/main $(CPPFLAGS) $(DEFS) @XTRA_INTL_CPPFLAGS@ + + R all: Makefile + @$(MAKE) Makedeps +diff --git a/src/extra/xdr/Makefile.in b/src/extra/xdr/Makefile.in +index c449a57..4b5c756 100644 +--- a/src/extra/xdr/Makefile.in ++++ b/src/extra/xdr/Makefile.in +@@ -12,7 +12,7 @@ R_HOME = $(top_builddir) + include $(top_builddir)/Makeconf + + XDR_CPPFLAGS = -I$(srcdir) +-ALL_CPPFLAGS = $(XDR_CPPFLAGS) $(R_XTRA_CPPFLAGS) $(CPPFLAGS) $(DEFS) ++ALL_CPPFLAGS = $(XDR_CPPFLAGS) $(R_XTRA_CPPFLAGS) $(CPPFLAGS) $(CPICFLAGS) $(DEFS) + + SOURCES = xdr.c xdr_float.c xdr_mem.c xdr_stdio.c + DEPENDS = $(SOURCES:.c=.d) +diff --git a/src/main/Makefile.in b/src/main/Makefile.in +index a4180e8..d7585f9 100644 +--- a/src/main/Makefile.in ++++ b/src/main/Makefile.in +@@ -81,7 +81,7 @@ XDR_CPPFLAGS = @BUILD_XDR_TRUE@ -I$(top_srcdir)/src/extra/xdr + + ## platform.c needs $(CURL_CPPFLAGS). + ALL_CPPFLAGS = $(TRE_CPPFLAGS) $(XDR_CPPFLAGS) $(R_XTRA_CPPFLAGS) \ +- $(CURL_CPPFLAGS) $(CPPFLAGS) -I$(top_srcdir)/src/nmath $(DEFS) ++ $(CURL_CPPFLAGS) $(CPPFLAGS) $(CPICFLAGS) -I$(top_srcdir)/src/nmath $(DEFS) + @WANT_R_SHLIB_TRUE@ALL_CFLAGS = $(ALL_CFLAGS_LO) + @WANT_R_SHLIB_TRUE@ALL_FFLAGS = $(ALL_FFLAGS_LO) + @WANT_R_SHLIB_FALSE@ALL_FFLAGS = $(ALL_FFLAGS_PIE) +diff --git a/src/nmath/Makefile.in b/src/nmath/Makefile.in +index 9d31a57..e006e39 100644 +--- a/src/nmath/Makefile.in ++++ b/src/nmath/Makefile.in +@@ -58,6 +58,7 @@ DISTFILES = Makefile.in Makefile.win $(SOURCES) $(HEADERS) + + SUBDIRS_WITH_NO_BUILD = standalone + ++ALL_CPPFLAGS += $(CPICFLAGS) + @WANT_R_SHLIB_TRUE@ALL_CFLAGS = $(ALL_CFLAGS_LO) + + all: R +diff --git a/src/unix/Makefile.in b/src/unix/Makefile.in +index 4a35278..b1cc9a3 100644 +--- a/src/unix/Makefile.in ++++ b/src/unix/Makefile.in +@@ -31,6 +31,7 @@ DISTFILES = \ + Makefile.in $(SOURCES_C_BASE) Rscript.c \ + $(HEADERS) libR.pc.in system.txt + ++ALL_CPPFLAGS += $(CPICFLAGS) + @WANT_R_SHLIB_TRUE@ALL_CFLAGS = $(ALL_CFLAGS_LO) + + all: R diff --git a/recipes/recipes_emscripten/r-base/patches/0012-Build-with-atomics-and-bulkmemory.patch b/recipes/recipes_emscripten/r-base/patches/0012-Build-with-atomics-and-bulkmemory.patch new file mode 100644 index 000000000..5d0cc775d --- /dev/null +++ b/recipes/recipes_emscripten/r-base/patches/0012-Build-with-atomics-and-bulkmemory.patch @@ -0,0 +1,37 @@ +From 4ff6f58145ba10e61905d93a5084a39f7f139dc6 Mon Sep 17 00:00:00 2001 +From: Isabel Paredes +Date: Thu, 19 Sep 2024 19:00:20 +0200 +Subject: [PATCH 3/5] Build with atomics and bulkmemory + +--- + src/main/Makefile.in | 3 +++ + src/unix/Makefile.in | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/main/Makefile.in b/src/main/Makefile.in +index d7585f9..a80964f 100644 +--- a/src/main/Makefile.in ++++ b/src/main/Makefile.in +@@ -85,6 +85,9 @@ ALL_CPPFLAGS = $(TRE_CPPFLAGS) $(XDR_CPPFLAGS) $(R_XTRA_CPPFLAGS) \ + @WANT_R_SHLIB_TRUE@ALL_CFLAGS = $(ALL_CFLAGS_LO) + @WANT_R_SHLIB_TRUE@ALL_FFLAGS = $(ALL_FFLAGS_LO) + @WANT_R_SHLIB_FALSE@ALL_FFLAGS = $(ALL_FFLAGS_PIE) ++## Fixes: --shared-memory is disallowed by context.o because it was not compiled ++## with 'atomics' or 'bulk-memory' features ++ALL_CPPFLAGS += -matomics -mbulk-memory + + + ## use an explicit library: there might be an unsatisfactory -lintl around +diff --git a/src/unix/Makefile.in b/src/unix/Makefile.in +index b1cc9a3..d3ed938 100644 +--- a/src/unix/Makefile.in ++++ b/src/unix/Makefile.in +@@ -31,7 +31,7 @@ DISTFILES = \ + Makefile.in $(SOURCES_C_BASE) Rscript.c \ + $(HEADERS) libR.pc.in system.txt + +-ALL_CPPFLAGS += $(CPICFLAGS) ++ALL_CPPFLAGS += $(CPICFLAGS) -matomics -mbulk-memory + @WANT_R_SHLIB_TRUE@ALL_CFLAGS = $(ALL_CFLAGS_LO) + + all: R diff --git a/recipes/recipes_emscripten/r-base/recipe.yaml b/recipes/recipes_emscripten/r-base/recipe.yaml index 0cab0a37f..cb1989845 100644 --- a/recipes/recipes_emscripten/r-base/recipe.yaml +++ b/recipes/recipes_emscripten/r-base/recipe.yaml @@ -19,9 +19,12 @@ source: - patches/0007-Build-docs-with-Rscript-binary.patch - patches/0008-Set-default-R_Home.patch - patches/0009-Use-basenames-for-compilers.patch + - patches/0010-Fix-iconv-checks-when-using-internal-lapack-blas.patch + - patches/0011-Build-with-fPIC-only-modules-that-need-it.patch + - patches/0012-Build-with-atomics-and-bulkmemory.patch build: - number: 0 + number: 1 requirements: build: @@ -33,24 +36,23 @@ requirements: - make - r-base == ${{ version }} # for R and Rscript binaries (See patches) host: - - liblapack>=3.12 - libflang # for FortranRuntime - libiconv - zlib>=1.2.13 - bzip2 - xz # for lzma - - cairo>=1.18 - pcre2>=10.43 - tzdata - libpng - libtiff + # TODO: add cairo and pango once available tests: - - script: | - OUTPUT=$(run_modularized $PREFIX/lib/R/bin/Rscript --version) - requirements: - build: - - run_modularized +- script: + - node ${PREFIX}/lib/R/bin/Rscript --version + requirements: + build: + - nodejs about: homepage: http://www.r-project.org/ From ec11b9e64bb2cd0d6dcc29d717a6eebf85dfeb86 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Tue, 1 Oct 2024 17:52:29 +0200 Subject: [PATCH 243/333] Rebuild R packages (#1356) * Rebuild r-base64enc * Rebuild r-digest * Rebuild r-fansi * Rebuild r-fastmap * Rebuild r-glue * Rebuild r-isoband * Update r-jsonlite * Rebuild r-mass * Rebuild r-rlang * Rebuild r-utf8 --- .../recipes_emscripten/r-base64enc/build.sh | 9 --------- .../recipes_emscripten/r-base64enc/recipe.yaml | 14 ++++++++++---- recipes/recipes_emscripten/r-digest/build.sh | 9 --------- .../recipes_emscripten/r-digest/recipe.yaml | 14 ++++++++++---- recipes/recipes_emscripten/r-fansi/build.sh | 9 --------- recipes/recipes_emscripten/r-fansi/recipe.yaml | 14 ++++++++++---- recipes/recipes_emscripten/r-fastmap/build.sh | 9 --------- .../recipes_emscripten/r-fastmap/recipe.yaml | 14 ++++++++++---- recipes/recipes_emscripten/r-glue/build.sh | 9 --------- recipes/recipes_emscripten/r-glue/recipe.yaml | 14 ++++++++++---- recipes/recipes_emscripten/r-isoband/build.sh | 9 --------- .../recipes_emscripten/r-isoband/recipe.yaml | 14 ++++++++++---- recipes/recipes_emscripten/r-jsonlite/build.sh | 9 --------- .../recipes_emscripten/r-jsonlite/recipe.yaml | 18 ++++++++++++------ recipes/recipes_emscripten/r-mass/build.sh | 9 --------- recipes/recipes_emscripten/r-mass/recipe.yaml | 14 ++++++++++---- recipes/recipes_emscripten/r-rlang/build.sh | 9 --------- recipes/recipes_emscripten/r-rlang/recipe.yaml | 14 ++++++++++---- recipes/recipes_emscripten/r-utf8/build.sh | 9 --------- recipes/recipes_emscripten/r-utf8/recipe.yaml | 14 ++++++++++---- 20 files changed, 102 insertions(+), 132 deletions(-) delete mode 100644 recipes/recipes_emscripten/r-base64enc/build.sh delete mode 100644 recipes/recipes_emscripten/r-digest/build.sh delete mode 100644 recipes/recipes_emscripten/r-fansi/build.sh delete mode 100644 recipes/recipes_emscripten/r-fastmap/build.sh delete mode 100644 recipes/recipes_emscripten/r-glue/build.sh delete mode 100644 recipes/recipes_emscripten/r-isoband/build.sh delete mode 100644 recipes/recipes_emscripten/r-jsonlite/build.sh delete mode 100644 recipes/recipes_emscripten/r-mass/build.sh delete mode 100644 recipes/recipes_emscripten/r-rlang/build.sh delete mode 100644 recipes/recipes_emscripten/r-utf8/build.sh diff --git a/recipes/recipes_emscripten/r-base64enc/build.sh b/recipes/recipes_emscripten/r-base64enc/build.sh deleted file mode 100644 index eeef5603c..000000000 --- a/recipes/recipes_emscripten/r-base64enc/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -set -e - -echo "R_HOME=\$(PREFIX)/lib/R" > $BUILD_PREFIX/lib/R/etc/Makeconf -cat $PREFIX/lib/R/etc/Makeconf >> $BUILD_PREFIX/lib/R/etc/Makeconf - -$BUILD_PREFIX/bin/R CMD INSTALL . \ - --no-test-load --no-byte-compile --library=$PREFIX/lib/R/library diff --git a/recipes/recipes_emscripten/r-base64enc/recipe.yaml b/recipes/recipes_emscripten/r-base64enc/recipe.yaml index 1d03868af..25c0956cc 100644 --- a/recipes/recipes_emscripten/r-base64enc/recipe.yaml +++ b/recipes/recipes_emscripten/r-base64enc/recipe.yaml @@ -14,16 +14,22 @@ source: sha256: 6d856d8a364bcdc499a0bf38bfd283b7c743d08f0b288174fba7dbf0a04b688d build: - number: 1 + number: 2 + script: + - $R CMD INSTALL $R_ARGS --no-byte-compile . + - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so + - rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so + # The activation script of cross-r-base copies cairo and tcltk from + # the build environment. requirements: build: - - r-base == ${{ r_base_version }} + - cross-r-base >= ${{ r_base_version }} - ${{ compiler('c') }} host: - - r-base == ${{ r_base_version }} + - r-base >= ${{ r_base_version }} run: - - r-base == ${{ r_base_version }} + - r-base >= ${{ r_base_version }} tests: - package_contents: diff --git a/recipes/recipes_emscripten/r-digest/build.sh b/recipes/recipes_emscripten/r-digest/build.sh deleted file mode 100644 index eeef5603c..000000000 --- a/recipes/recipes_emscripten/r-digest/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -set -e - -echo "R_HOME=\$(PREFIX)/lib/R" > $BUILD_PREFIX/lib/R/etc/Makeconf -cat $PREFIX/lib/R/etc/Makeconf >> $BUILD_PREFIX/lib/R/etc/Makeconf - -$BUILD_PREFIX/bin/R CMD INSTALL . \ - --no-test-load --no-byte-compile --library=$PREFIX/lib/R/library diff --git a/recipes/recipes_emscripten/r-digest/recipe.yaml b/recipes/recipes_emscripten/r-digest/recipe.yaml index d3e5c3321..8c88fdb83 100644 --- a/recipes/recipes_emscripten/r-digest/recipe.yaml +++ b/recipes/recipes_emscripten/r-digest/recipe.yaml @@ -14,17 +14,23 @@ source: sha256: 82c4d149994b8a4a9af930f5a8e47420829935abed41f3f9030e94b6a48f0321 build: - number: 1 + number: 2 + script: + - $R CMD INSTALL $R_ARGS --no-byte-compile . + - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so + - rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so + # The activation script of cross-r-base copies cairo and tcltk from + # the build environment. requirements: build: - - r-base == ${{ r_base_version }} + - cross-r-base >= ${{ r_base_version }} - ${{ compiler('c') }} - ${{ compiler('cxx') }} host: - - r-base == ${{ r_base_version }} + - r-base >= ${{ r_base_version }} run: - - r-base == ${{ r_base_version }} + - r-base >= ${{ r_base_version }} tests: - script: diff --git a/recipes/recipes_emscripten/r-fansi/build.sh b/recipes/recipes_emscripten/r-fansi/build.sh deleted file mode 100644 index eeef5603c..000000000 --- a/recipes/recipes_emscripten/r-fansi/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -set -e - -echo "R_HOME=\$(PREFIX)/lib/R" > $BUILD_PREFIX/lib/R/etc/Makeconf -cat $PREFIX/lib/R/etc/Makeconf >> $BUILD_PREFIX/lib/R/etc/Makeconf - -$BUILD_PREFIX/bin/R CMD INSTALL . \ - --no-test-load --no-byte-compile --library=$PREFIX/lib/R/library diff --git a/recipes/recipes_emscripten/r-fansi/recipe.yaml b/recipes/recipes_emscripten/r-fansi/recipe.yaml index 50bdba214..aebc9da3a 100644 --- a/recipes/recipes_emscripten/r-fansi/recipe.yaml +++ b/recipes/recipes_emscripten/r-fansi/recipe.yaml @@ -14,16 +14,22 @@ source: sha256: ea9dc690dfe50a7fad7c5eb863c157d70385512173574c56f4253b6dfe431863 build: - number: 1 + number: 2 + script: + - $R CMD INSTALL $R_ARGS --no-byte-compile . + - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so + - rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so + # The activation script of cross-r-base copies cairo and tcltk from + # the build environment. requirements: build: - - r-base == ${{ r_base_version }} + - cross-r-base >= ${{ r_base_version }} - ${{ compiler('c') }} host: - - r-base == ${{ r_base_version }} + - r-base >= ${{ r_base_version }} run: - - r-base == ${{ r_base_version }} + - r-base >= ${{ r_base_version }} tests: - package_contents: diff --git a/recipes/recipes_emscripten/r-fastmap/build.sh b/recipes/recipes_emscripten/r-fastmap/build.sh deleted file mode 100644 index eeef5603c..000000000 --- a/recipes/recipes_emscripten/r-fastmap/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -set -e - -echo "R_HOME=\$(PREFIX)/lib/R" > $BUILD_PREFIX/lib/R/etc/Makeconf -cat $PREFIX/lib/R/etc/Makeconf >> $BUILD_PREFIX/lib/R/etc/Makeconf - -$BUILD_PREFIX/bin/R CMD INSTALL . \ - --no-test-load --no-byte-compile --library=$PREFIX/lib/R/library diff --git a/recipes/recipes_emscripten/r-fastmap/recipe.yaml b/recipes/recipes_emscripten/r-fastmap/recipe.yaml index 71bf4d70d..01d4d5623 100644 --- a/recipes/recipes_emscripten/r-fastmap/recipe.yaml +++ b/recipes/recipes_emscripten/r-fastmap/recipe.yaml @@ -14,17 +14,23 @@ source: sha256: b1da04a2915d1d057f3c2525e295ef15016a64e6667eac83a14641bbd83b9246 build: - number: 1 + number: 2 + script: + - $R CMD INSTALL $R_ARGS --no-byte-compile . + - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so + - rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so + # The activation script of cross-r-base copies cairo and tcltk from + # the build environment. requirements: build: - - r-base == ${{ r_base_version }} + - cross-r-base >= ${{ r_base_version }} - ${{ compiler('c') }} - ${{ compiler('cxx') }} host: - - r-base == ${{ r_base_version }} + - r-base >= ${{ r_base_version }} run: - - r-base == ${{ r_base_version }} + - r-base >= ${{ r_base_version }} tests: - package_contents: diff --git a/recipes/recipes_emscripten/r-glue/build.sh b/recipes/recipes_emscripten/r-glue/build.sh deleted file mode 100644 index eeef5603c..000000000 --- a/recipes/recipes_emscripten/r-glue/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -set -e - -echo "R_HOME=\$(PREFIX)/lib/R" > $BUILD_PREFIX/lib/R/etc/Makeconf -cat $PREFIX/lib/R/etc/Makeconf >> $BUILD_PREFIX/lib/R/etc/Makeconf - -$BUILD_PREFIX/bin/R CMD INSTALL . \ - --no-test-load --no-byte-compile --library=$PREFIX/lib/R/library diff --git a/recipes/recipes_emscripten/r-glue/recipe.yaml b/recipes/recipes_emscripten/r-glue/recipe.yaml index 7ca1be929..7bca92467 100644 --- a/recipes/recipes_emscripten/r-glue/recipe.yaml +++ b/recipes/recipes_emscripten/r-glue/recipe.yaml @@ -14,16 +14,22 @@ source: sha256: 1af51b51f52c1aeb3bfe9349f55896dd78b5542ffdd5654e432e4d646e4a86dc build: - number: 1 + number: 2 + script: + - $R CMD INSTALL $R_ARGS --no-byte-compile . + - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so + - rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so + # The activation script of cross-r-base copies cairo and tcltk from + # the build environment. requirements: build: - - r-base == ${{ r_base_version }} + - cross-r-base >= ${{ r_base_version }} - ${{ compiler('c') }} host: - - r-base == ${{ r_base_version }} + - r-base >= ${{ r_base_version }} run: - - r-base == ${{ r_base_version }} + - r-base >= ${{ r_base_version }} tests: - package_contents: diff --git a/recipes/recipes_emscripten/r-isoband/build.sh b/recipes/recipes_emscripten/r-isoband/build.sh deleted file mode 100644 index eeef5603c..000000000 --- a/recipes/recipes_emscripten/r-isoband/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -set -e - -echo "R_HOME=\$(PREFIX)/lib/R" > $BUILD_PREFIX/lib/R/etc/Makeconf -cat $PREFIX/lib/R/etc/Makeconf >> $BUILD_PREFIX/lib/R/etc/Makeconf - -$BUILD_PREFIX/bin/R CMD INSTALL . \ - --no-test-load --no-byte-compile --library=$PREFIX/lib/R/library diff --git a/recipes/recipes_emscripten/r-isoband/recipe.yaml b/recipes/recipes_emscripten/r-isoband/recipe.yaml index 8bdc17246..7365e1e75 100644 --- a/recipes/recipes_emscripten/r-isoband/recipe.yaml +++ b/recipes/recipes_emscripten/r-isoband/recipe.yaml @@ -14,17 +14,23 @@ source: sha256: 7693223343b45b86de2b5b638ff148f0dafa6d7b1237e822c5272902f79cdf61 build: - number: 1 + number: 2 + script: + - $R CMD INSTALL $R_ARGS --no-byte-compile . + - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so + - rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so + # The activation script of cross-r-base copies cairo and tcltk from + # the build environment. requirements: build: - - r-base == ${{ r_base_version }} + - cross-r-base >= ${{ r_base_version }} - ${{ compiler('c') }} - ${{ compiler('cxx') }} host: - - r-base == ${{ r_base_version }} + - r-base >= ${{ r_base_version }} run: - - r-base == ${{ r_base_version }} + - r-base >= ${{ r_base_version }} tests: - package_contents: diff --git a/recipes/recipes_emscripten/r-jsonlite/build.sh b/recipes/recipes_emscripten/r-jsonlite/build.sh deleted file mode 100644 index eeef5603c..000000000 --- a/recipes/recipes_emscripten/r-jsonlite/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -set -e - -echo "R_HOME=\$(PREFIX)/lib/R" > $BUILD_PREFIX/lib/R/etc/Makeconf -cat $PREFIX/lib/R/etc/Makeconf >> $BUILD_PREFIX/lib/R/etc/Makeconf - -$BUILD_PREFIX/bin/R CMD INSTALL . \ - --no-test-load --no-byte-compile --library=$PREFIX/lib/R/library diff --git a/recipes/recipes_emscripten/r-jsonlite/recipe.yaml b/recipes/recipes_emscripten/r-jsonlite/recipe.yaml index 10974ea9b..fad408a1c 100644 --- a/recipes/recipes_emscripten/r-jsonlite/recipe.yaml +++ b/recipes/recipes_emscripten/r-jsonlite/recipe.yaml @@ -1,6 +1,6 @@ context: name: r-jsonlite - version: 1.8.8 + version: 1.8.9 r_base_version: 4.4.1 package: @@ -11,19 +11,25 @@ source: url: - https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz - https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz - sha256: 7de21316984c3ba3d7423d12f43d1c30c716007c5e39bf07e11885e0ceb0caa4 + sha256: 89f130e0e1163328c01decd54e7712b5ebf3d0a667da0052833722cb9a6e90b0 build: - number: 1 + number: 0 + script: + - $R CMD INSTALL $R_ARGS --no-byte-compile . + - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so + - rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so + # The activation script of cross-r-base copies cairo and tcltk from + # the build environment. requirements: build: - - r-base == ${{ r_base_version }} + - cross-r-base >= ${{ r_base_version }} - ${{ compiler('c') }} host: - - r-base == ${{ r_base_version }} + - r-base >= ${{ r_base_version }} run: - - r-base == ${{ r_base_version }} + - r-base >= ${{ r_base_version }} tests: - package_contents: diff --git a/recipes/recipes_emscripten/r-mass/build.sh b/recipes/recipes_emscripten/r-mass/build.sh deleted file mode 100644 index eeef5603c..000000000 --- a/recipes/recipes_emscripten/r-mass/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -set -e - -echo "R_HOME=\$(PREFIX)/lib/R" > $BUILD_PREFIX/lib/R/etc/Makeconf -cat $PREFIX/lib/R/etc/Makeconf >> $BUILD_PREFIX/lib/R/etc/Makeconf - -$BUILD_PREFIX/bin/R CMD INSTALL . \ - --no-test-load --no-byte-compile --library=$PREFIX/lib/R/library diff --git a/recipes/recipes_emscripten/r-mass/recipe.yaml b/recipes/recipes_emscripten/r-mass/recipe.yaml index 0a0eba397..ba7a5e704 100644 --- a/recipes/recipes_emscripten/r-mass/recipe.yaml +++ b/recipes/recipes_emscripten/r-mass/recipe.yaml @@ -14,16 +14,22 @@ source: sha256: 3144c8bf579dd7b7c47c259728c27f53f53e294e7ed307da434dfd144e800a90 build: - number: 1 + number: 2 + script: + - $R CMD INSTALL $R_ARGS --no-byte-compile . + - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so + - rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so + # The activation script of cross-r-base copies cairo and tcltk from + # the build environment. requirements: build: - - r-base == ${{ r_base_version }} + - cross-r-base >= ${{ r_base_version }} - ${{ compiler('c') }} host: - - r-base == ${{ r_base_version }} + - r-base >= ${{ r_base_version }} run: - - r-base == ${{ r_base_version }} + - r-base >= ${{ r_base_version }} tests: - package_contents: diff --git a/recipes/recipes_emscripten/r-rlang/build.sh b/recipes/recipes_emscripten/r-rlang/build.sh deleted file mode 100644 index eeef5603c..000000000 --- a/recipes/recipes_emscripten/r-rlang/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -set -e - -echo "R_HOME=\$(PREFIX)/lib/R" > $BUILD_PREFIX/lib/R/etc/Makeconf -cat $PREFIX/lib/R/etc/Makeconf >> $BUILD_PREFIX/lib/R/etc/Makeconf - -$BUILD_PREFIX/bin/R CMD INSTALL . \ - --no-test-load --no-byte-compile --library=$PREFIX/lib/R/library diff --git a/recipes/recipes_emscripten/r-rlang/recipe.yaml b/recipes/recipes_emscripten/r-rlang/recipe.yaml index ecbbe2462..ae6aaeeb7 100644 --- a/recipes/recipes_emscripten/r-rlang/recipe.yaml +++ b/recipes/recipes_emscripten/r-rlang/recipe.yaml @@ -14,16 +14,22 @@ source: sha256: f2d74527508bf3287102470beb27de0d234c3cbba399c28d3312f2c83c64a6e1 build: - number: 0 + number: 1 + script: + - $R CMD INSTALL $R_ARGS --no-byte-compile . + - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so + - rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so + # The activation script of cross-r-base copies cairo and tcltk from + # the build environment. requirements: build: - - r-base == ${{ r_base_version }} + - cross-r-base >= ${{ r_base_version }} - ${{ compiler('c') }} host: - - r-base == ${{ r_base_version }} + - r-base >= ${{ r_base_version }} run: - - r-base == ${{ r_base_version }} + - r-base >= ${{ r_base_version }} tests: - package_contents: diff --git a/recipes/recipes_emscripten/r-utf8/build.sh b/recipes/recipes_emscripten/r-utf8/build.sh deleted file mode 100644 index eeef5603c..000000000 --- a/recipes/recipes_emscripten/r-utf8/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -set -e - -echo "R_HOME=\$(PREFIX)/lib/R" > $BUILD_PREFIX/lib/R/etc/Makeconf -cat $PREFIX/lib/R/etc/Makeconf >> $BUILD_PREFIX/lib/R/etc/Makeconf - -$BUILD_PREFIX/bin/R CMD INSTALL . \ - --no-test-load --no-byte-compile --library=$PREFIX/lib/R/library diff --git a/recipes/recipes_emscripten/r-utf8/recipe.yaml b/recipes/recipes_emscripten/r-utf8/recipe.yaml index df6514700..dfb998ca1 100644 --- a/recipes/recipes_emscripten/r-utf8/recipe.yaml +++ b/recipes/recipes_emscripten/r-utf8/recipe.yaml @@ -14,16 +14,22 @@ source: sha256: 418f824bbd9cd868d2d8a0d4345545c62151d321224cdffca8b1ffd98a167b7d build: - number: 1 + number: 2 + script: + - $R CMD INSTALL $R_ARGS --no-byte-compile . + - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so + - rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so + # The activation script of cross-r-base copies cairo and tcltk from + # the build environment. requirements: build: - - r-base == ${{ r_base_version }} + - cross-r-base >= ${{ r_base_version }} - ${{ compiler('c') }} host: - - r-base == ${{ r_base_version }} + - r-base >= ${{ r_base_version }} run: - - r-base == ${{ r_base_version }} + - r-base >= ${{ r_base_version }} tests: - package_contents: From 5259e67b1ba51db083030fce2ae1ba9aa1596a42 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Tue, 1 Oct 2024 18:03:45 +0200 Subject: [PATCH 244/333] Add r-lattice (#1317) --- .../recipes_emscripten/r-lattice/recipe.yaml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 recipes/recipes_emscripten/r-lattice/recipe.yaml diff --git a/recipes/recipes_emscripten/r-lattice/recipe.yaml b/recipes/recipes_emscripten/r-lattice/recipe.yaml new file mode 100644 index 000000000..1277c2a56 --- /dev/null +++ b/recipes/recipes_emscripten/r-lattice/recipe.yaml @@ -0,0 +1,52 @@ +context: + name: r-lattice + version: 0.22-6 + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: + - https://cran.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + sha256: 4b377211e472ece7872b9d6759f9b9c660b09594500462eb6146312a1d4d00f7 + +build: + number: 0 + script: + - $R CMD INSTALL $R_ARGS --no-byte-compile . + - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so + - rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so + # The activation script of cross-r-base copies cairo and tcltk from + # the build environment. + +requirements: + build: + - cross-r-base >= ${{ r_base_version }} + - ${{ compiler('c') }} + host: + - r-base >= ${{ r_base_version }} + run: + - r-base >= ${{ r_base_version }} + +tests: +- package_contents: + lib: + - R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so + +about: + homepage: https://lattice.r-forge.r-project.org/ + repository: https://github.com/deepayan/lattice/ + license: GPL-2.0-or-later + license_family: GPL3 + summary: | + A powerful and elegant high-level data visualization system inspired by + Trellis graphics, with an emphasis on multivariate data. Lattice is + sufficient for typical graphics needs, and is also flexible enough to handle + most nonstandard requirements. See ?Lattice for an introduction. + +extra: + recipe-maintainers: + - IsabelParedes From d419f847b9a83b381e11a9b2e6a66640abc9512b Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Tue, 1 Oct 2024 18:31:31 +0200 Subject: [PATCH 245/333] Add r-farver (#1323) --- .../recipes_emscripten/r-farver/recipe.yaml | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 recipes/recipes_emscripten/r-farver/recipe.yaml diff --git a/recipes/recipes_emscripten/r-farver/recipe.yaml b/recipes/recipes_emscripten/r-farver/recipe.yaml new file mode 100644 index 000000000..8c4692579 --- /dev/null +++ b/recipes/recipes_emscripten/r-farver/recipe.yaml @@ -0,0 +1,55 @@ +context: + name: r-farver + version: 2.1.2 + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: + - https://cran.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + sha256: 528823b95daab4566137711f1c842027a952bea1b2ae6ff098e2ca512b17fe25 + +build: + number: 0 + script: + - $R CMD INSTALL $R_ARGS --no-byte-compile . + - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so + - rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so + # The activation script of cross-r-base copies cairo and tcltk from + # the build environment. + +requirements: + build: + - cross-r-base >= ${{ r_base_version }} + - ${{ compiler('cxx') }} + host: + - r-base >= ${{ r_base_version }} + run: + - r-base >= ${{ r_base_version }} + +tests: +- package_contents: + lib: + - R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so + +about: + homepage: https://farver.data-imaginist.com/ + repository: https://github.com/thomasp85/farver + license: MIT + license_family: MIT + license_file: LICENSE + summary: | + The encoding of colour can be handled in many different ways, using + different colour spaces. As different colour spaces have different uses, + efficient conversion between these representations are important. The + 'farver' package provides a set of functions that gives access to very fast + colour space conversion and comparisons implemented in C++, and offers speed + improvements over the 'convertColor' function in the 'grDevices' package. + +extra: + recipe-maintainers: + - IsabelParedes From 6a9ef6e5e10b70d4d1e24b47ef9ae12201bec667 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Tue, 1 Oct 2024 18:37:03 +0200 Subject: [PATCH 246/333] Add r-magrittr (#1324) --- .../recipes_emscripten/r-magrittr/recipe.yaml | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 recipes/recipes_emscripten/r-magrittr/recipe.yaml diff --git a/recipes/recipes_emscripten/r-magrittr/recipe.yaml b/recipes/recipes_emscripten/r-magrittr/recipe.yaml new file mode 100644 index 000000000..d90c3a608 --- /dev/null +++ b/recipes/recipes_emscripten/r-magrittr/recipe.yaml @@ -0,0 +1,54 @@ +context: + name: r-magrittr + version: 2.0.3 + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: + - https://cran.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org//src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + sha256: a2bff83f792a1acb801bfe6330bb62724c74d5308832f2cb6a6178336ace55d2 + +build: + number: 0 + script: + - $R CMD INSTALL $R_ARGS --no-byte-compile . + - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so + - rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so + # The activation script of cross-r-base copies cairo and tcltk from + # the build environment. + +requirements: + build: + - cross-r-base >= ${{ r_base_version }} + - ${{ compiler('c') }} + host: + - r-base >= ${{ r_base_version }} + run: + - r-base >= ${{ r_base_version }} + +tests: +- package_contents: + lib: + - R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so + +about: + homepage: https://magrittr.tidyverse.org/ + repository: https://github.com/tidyverse/magrittr + license: MIT + license_family: MIT + license_file: LICENSE + summary: | + Provides a mechanism for chaining commands with a new forward-pipe operator, + %>%. This operator will forward a value, or the result of an expression, + into the next function call/expression. There is flexible support for the + type of right-hand side expressions. For more information, see package + vignette. To quote Rene Magritte, "Ceci n'est pas un pipe." + +extra: + recipe-maintainers: + - IsabelParedes From 47c5aac7ad60679b8057402470af353269605777 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Wed, 2 Oct 2024 14:05:15 +0530 Subject: [PATCH 247/333] Add r-ellipsis (#1343) --- .../recipes_emscripten/r-ellipsis/recipe.yaml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 recipes/recipes_emscripten/r-ellipsis/recipe.yaml diff --git a/recipes/recipes_emscripten/r-ellipsis/recipe.yaml b/recipes/recipes_emscripten/r-ellipsis/recipe.yaml new file mode 100644 index 000000000..4c9a5852f --- /dev/null +++ b/recipes/recipes_emscripten/r-ellipsis/recipe.yaml @@ -0,0 +1,56 @@ +context: + name: r-ellipsis + version: 0.3.2 + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: + - https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + sha256: a90266e5eb59c7f419774d5c6d6bd5e09701a26c9218c5933c9bce6765aa1558 + +build: + number: 0 + script: + - $R CMD INSTALL $R_ARGS --no-byte-compile . + - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so + - rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so + # The activation script of cross-r-base copies cairo and tcltk from + # the build environment. + +requirements: + build: + - cross-r-base >= ${{ r_base_version }} + - r-rlang + - ${{ compiler('c') }} + host: + - r-base >= ${{ r_base_version }} + - r-rlang + run: + - r-base >= ${{ r_base_version }} + - r-rlang + +tests: +- package_contents: + lib: + - R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so + +about: + homepage: https://ellipsis.r-lib.org + repository: https://github.com/r-lib/ellipsis + license: MIT + license_family: MIT + summary: | + The ellipsis is a powerful tool for extending functions. Unfortunately this + power comes at a cost: misspelled arguments will be silently ignored. The + ellipsis package provides a collection of functions to catch problems and + alert the user. + +extra: + recipe-maintainers: + - IsabelParedes + - anutosh491 From ee015d059f474276a87b403c2c7f5eca05beff38 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Wed, 2 Oct 2024 14:09:43 +0530 Subject: [PATCH 248/333] Rebuild r-mass and r-base64enc (#1361) Co-authored-by: Isabel Paredes --- recipes/recipes_emscripten/r-base64enc/recipe.yaml | 4 ++-- recipes/recipes_emscripten/r-mass/recipe.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/recipes_emscripten/r-base64enc/recipe.yaml b/recipes/recipes_emscripten/r-base64enc/recipe.yaml index 25c0956cc..f9fa992bf 100644 --- a/recipes/recipes_emscripten/r-base64enc/recipe.yaml +++ b/recipes/recipes_emscripten/r-base64enc/recipe.yaml @@ -5,7 +5,7 @@ context: package: name: ${{ name }} - version: ${{ version }} + version: ${{ version|replace('-', '_') }} source: url: @@ -14,7 +14,7 @@ source: sha256: 6d856d8a364bcdc499a0bf38bfd283b7c743d08f0b288174fba7dbf0a04b688d build: - number: 2 + number: 3 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so diff --git a/recipes/recipes_emscripten/r-mass/recipe.yaml b/recipes/recipes_emscripten/r-mass/recipe.yaml index ba7a5e704..d511efd42 100644 --- a/recipes/recipes_emscripten/r-mass/recipe.yaml +++ b/recipes/recipes_emscripten/r-mass/recipe.yaml @@ -5,7 +5,7 @@ context: package: name: ${{ name }} - version: ${{ version }} + version: ${{ version|replace('-', '_') }} source: url: @@ -14,7 +14,7 @@ source: sha256: 3144c8bf579dd7b7c47c259728c27f53f53e294e7ed307da434dfd144e800a90 build: - number: 2 + number: 3 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so From 502b9000eddf087714e8a92d7b901e2f5fdada52 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Wed, 2 Oct 2024 14:13:12 +0530 Subject: [PATCH 249/333] Rebuild r-lattice (#1360) * Rebuild r-lattice * fix version --- recipes/recipes_emscripten/r-lattice/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/r-lattice/recipe.yaml b/recipes/recipes_emscripten/r-lattice/recipe.yaml index 1277c2a56..3455a46b2 100644 --- a/recipes/recipes_emscripten/r-lattice/recipe.yaml +++ b/recipes/recipes_emscripten/r-lattice/recipe.yaml @@ -5,7 +5,7 @@ context: package: name: ${{ name }} - version: ${{ version }} + version: ${{ version|replace('-', '_') }} source: url: @@ -14,7 +14,7 @@ source: sha256: 4b377211e472ece7872b9d6759f9b9c660b09594500462eb6146312a1d4d00f7 build: - number: 0 + number: 1 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so From f700c86c2c31d1c085721caaaadbe97b50194e65 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Wed, 2 Oct 2024 15:16:31 +0530 Subject: [PATCH 250/333] Add r-htmltools (#1345) --- .../r-htmltools/recipe.yaml | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 recipes/recipes_emscripten/r-htmltools/recipe.yaml diff --git a/recipes/recipes_emscripten/r-htmltools/recipe.yaml b/recipes/recipes_emscripten/r-htmltools/recipe.yaml new file mode 100644 index 000000000..72dd2b79d --- /dev/null +++ b/recipes/recipes_emscripten/r-htmltools/recipe.yaml @@ -0,0 +1,64 @@ +context: + name: r-htmltools + version: 0.5.8.1 + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: + - https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + sha256: f9f62293ec06c353c4584db6ccedb06a2da12e485208bd26b856f17dd013f176 + +build: + number: 0 + script: + - $R CMD INSTALL $R_ARGS --no-byte-compile . + - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so + - rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so + # The activation script of cross-r-base copies cairo and tcltk from + # the build environment. + +requirements: + build: + - cross-r-base >= ${{ r_base_version }} + - r-base64enc + - r-digest + - r-ellipsis + - r-fastmap + - r-rlang + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + host: + - r-base == ${{ r_base_version }} + - r-base64enc + - r-digest + - r-ellipsis + - r-fastmap + - r-rlang + run: + - r-base == ${{ r_base_version }} + - r-base64enc + - r-digest + - r-ellipsis + - r-fastmap + - r-rlang + +tests: +- package_contents: + lib: + - R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so + +about: + homepage: https://github.com/rstudio/htmltools + license: GPL-2.0-or-later + license_family: GPL3 + summary: Tools for HTML generation and output. + +extra: + recipe-maintainers: + - IsabelParedes + - anutosh491 From 01269268565dc306979fc5ebf64d3fd5f5a0c12e Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Wed, 2 Oct 2024 17:46:26 +0530 Subject: [PATCH 251/333] Add r-matrix (#1339) * Add r-matrix * fixed formatting for summary --- .../recipes_emscripten/r-matrix/recipe.yaml | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 recipes/recipes_emscripten/r-matrix/recipe.yaml diff --git a/recipes/recipes_emscripten/r-matrix/recipe.yaml b/recipes/recipes_emscripten/r-matrix/recipe.yaml new file mode 100644 index 000000000..72c2d8106 --- /dev/null +++ b/recipes/recipes_emscripten/r-matrix/recipe.yaml @@ -0,0 +1,58 @@ +context: + name: r-matrix + version: 1.7-0 + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version|replace('-', '_') }} + +source: + url: + - https://cran.r-project.org/src/contrib/Matrix_${{ version }}.tar.gz + - https://cloud.r-project.org/src/contrib/Matrix_${{ version }}.tar.gz + sha256: fb97bba0df370222eb4f7e2da2e94dd01053b5e054b1c51829ff9a6efc08ad37 + +build: + number: 0 + script: + - $R CMD INSTALL $R_ARGS --no-byte-compile . + - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so + - rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so + # The activation script of cross-r-base copies cairo and tcltk from + # the build environment. + +requirements: + build: + - cross-r-base >= ${{ r_base_version }} + - r-lattice + - ${{ compiler('c') }} + host: + - r-base == ${{ r_base_version }} + - r-lattice + - libblas>=3.12 + - liblapack>=3.12 + - libflang # for FortranRuntime + run: + - r-base == ${{ r_base_version }} + - r-lattice + +tests: +- package_contents: + lib: + - R/library/Matrix/libs/Matrix.so + +about: + homepage: http://Matrix.R-forge.R-project.org/ + license: GPL-2.0-or-later + license_family: GPL3 + summary: | + A rich hierarchy of sparse and dense matrix classes, including general, + symmetric, triangular, and diagonal matrices with numeric, logical, or + pattern entries. Efficient methods for operating on such matrices, often + wrapping the 'BLAS', 'LAPACK', and 'SuiteSparse' libraries. + +extra: + recipe-maintainers: + - IsabelParedes + - anutosh491 From 547bcc52c2aee7551eb0c4390dee437662cdb151 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Wed, 2 Oct 2024 18:28:56 +0530 Subject: [PATCH 252/333] Add r-nlme (#1338) * Add r-nlme * addressing reviews --- recipes/recipes_emscripten/r-nlme/build.sh | 18 ++++++++ recipes/recipes_emscripten/r-nlme/recipe.yaml | 46 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 recipes/recipes_emscripten/r-nlme/build.sh create mode 100644 recipes/recipes_emscripten/r-nlme/recipe.yaml diff --git a/recipes/recipes_emscripten/r-nlme/build.sh b/recipes/recipes_emscripten/r-nlme/build.sh new file mode 100644 index 000000000..ae5fbc4dd --- /dev/null +++ b/recipes/recipes_emscripten/r-nlme/build.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -e + +# Using flang as a WASM cross-compiler +# https://github.com/serge-sans-paille/llvm-project/blob/feature/flang-wasm/README.wasm.md +# https://github.com/conda-forge/flang-feedstock/pull/69 +micromamba install -p $BUILD_PREFIX \ + conda-forge/label/llvm_rc::libllvm19=19.1.0.rc2 \ + conda-forge/label/llvm_dev::flang=19.1.0.rc2 \ + -y --no-channel-priority +rm $BUILD_PREFIX/bin/clang # links to clang19 +ln -s $BUILD_PREFIX/bin/clang-18 $BUILD_PREFIX/bin/clang # links to emsdk clang + +$R CMD INSTALL $R_ARGS --no-byte-compile . + +rm $PREFIX/lib/R/library/grDevices/libs/cairo.so +rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so \ No newline at end of file diff --git a/recipes/recipes_emscripten/r-nlme/recipe.yaml b/recipes/recipes_emscripten/r-nlme/recipe.yaml new file mode 100644 index 000000000..ef9c830ab --- /dev/null +++ b/recipes/recipes_emscripten/r-nlme/recipe.yaml @@ -0,0 +1,46 @@ +context: + name: r-nlme + version: 3.1-166 + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version|replace('-', '_') }} + +source: + url: + - https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + sha256: 237a14ee8d78755b11a7efe234b95be40b46fbdd1b4aaf463f6d532be1909762 + +build: + number: 0 + +requirements: + build: + - cross-r-base >= ${{ r_base_version }} + - r-lattice + - ${{ compiler('c') }} + host: + - r-base >= ${{ r_base_version }} + - r-lattice + - libflang # for FortranRuntime + run: + - r-base >= ${{ r_base_version }} + - r-lattice + +tests: +- package_contents: + lib: + - R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so + +about: + homepage: https://svn.r-project.org/R-packages/trunk/nlme + license: GPL-2.0-or-later + license_family: GPL3 + summary: A fast JSON parser and generator optimized for statistical data and the web. + +extra: + recipe-maintainers: + - IsabelParedes + - anutosh491 From d0a1d05a5a6dcacc435399cf7be7f4168624ad9a Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Wed, 2 Oct 2024 01:09:27 +0000 Subject: [PATCH 253/333] Update pyproj from 3.6.1 to 3.7.0 --- recipes/recipes_emscripten/pyproj/recipe.yaml | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/recipes/recipes_emscripten/pyproj/recipe.yaml b/recipes/recipes_emscripten/pyproj/recipe.yaml index 03e341bbc..b6668c784 100644 --- a/recipes/recipes_emscripten/pyproj/recipe.yaml +++ b/recipes/recipes_emscripten/pyproj/recipe.yaml @@ -1,6 +1,6 @@ context: name: pyproj - version: 3.6.1 + version: 3.7.0 package: name: ${{ name }} @@ -8,47 +8,47 @@ package: source: url: https://pypi.io/packages/source/p/pyproj/pyproj-${{ version }}.tar.gz - sha256: 44aa7c704c2b7d8fb3d483bbf75af6cb2350d30a63b144279a09b75fead501bf + sha256: bf658f4aaf815d9d03c8121650b6f0b8067265c36e31bc6660b98ef144d81813 build: number: 0 requirements: build: - - python - - cross-python_${{ target_platform }} - - cython - - ${{ compiler('c') }} + - python + - cross-python_${{ target_platform }} + - cython + - ${{ compiler('c') }} host: - - python - - pip - - proj + - python + - pip + - proj run: - - python - - proj - - certifi + - python + - proj + - certifi tests: - - script: pytester - requirements: - build: - - pytester - run: - - pytester-run - files: - recipe: - - test_pyproj.py +- script: pytester + requirements: + build: + - pytester + run: + - pytester-run + files: + recipe: + - test_pyproj.py about: homepage: https://github.com/pyproj4/pyproj license: MIT license_file: - - LICENSE - - LICENSE_proj + - LICENSE + - LICENSE_proj summary: Python interface to PROJ library extra: recipe-maintainers: - - KGB99 - - DerThorsten + - KGB99 + - DerThorsten From 7ef0b7c1ac593417b5bf3f0a0fb6959b9492490b Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Thu, 3 Oct 2024 22:07:53 +0530 Subject: [PATCH 254/333] Add r-mgcv (#1340) --- recipes/recipes_emscripten/r-mgcv/recipe.yaml | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 recipes/recipes_emscripten/r-mgcv/recipe.yaml diff --git a/recipes/recipes_emscripten/r-mgcv/recipe.yaml b/recipes/recipes_emscripten/r-mgcv/recipe.yaml new file mode 100644 index 000000000..43e1430ed --- /dev/null +++ b/recipes/recipes_emscripten/r-mgcv/recipe.yaml @@ -0,0 +1,60 @@ +context: + name: r-mgcv + version: 1.9-1 + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version|replace('-', '_') }} + +source: + url: + - https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + sha256: 700fbc37bedd3a49505b9bc4949faee156d9cfb4f669d797d06a10a15a5bdb32 + +build: + number: 0 + script: + - $R CMD INSTALL $R_ARGS --no-byte-compile . + - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so + - rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so + # The activation script of cross-r-base copies cairo and tcltk from + # the build environment. + + # Remove the Matrix folder which is not required. + - rm -rf $PREFIX/lib/R/library/Matrix + +requirements: + build: + - cross-r-base >= ${{ r_base_version }} + - r-matrix + - r-nlme + - ${{ compiler('c') }} + host: + - r-base == ${{ r_base_version }} + - libblas>=3.12 + - liblapack>=3.12 + - r-matrix + - r-nlme + - libflang # for FortranRuntime + run: + - r-base == ${{ r_base_version }} + - r-matrix + - r-nlme + +tests: +- package_contents: + lib: + - R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so + +about: + homepage: https://CRAN.R-project.org/package=mgcv + license: GPL-2.0-or-later + license_family: GPL2 + summary: Generalized additive (mixed) models, some of their extensions and other generalized ridge regression with multiple smoothing parameter estimation by (Restricted) Marginal Likelihood, Generalized Cross Validation and similar, or using iterated nested Laplace approximation for fully Bayesian inference. + +extra: + recipe-maintainers: + - IsabelParedes + - anutosh491 From 7f845a76aba9f06e60050c4732f3616e7e7c4f0c Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Thu, 3 Oct 2024 01:09:16 +0000 Subject: [PATCH 255/333] Update ipython from 8.27.0 to 8.28.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 fb2cc3ec4..73b561b0a 100644 --- a/recipes/recipes_emscripten/ipython/recipe.yaml +++ b/recipes/recipes_emscripten/ipython/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 8.27.0 + version: 8.28.0 package: name: ipython @@ -7,7 +7,7 @@ package: source: - url: https://pypi.io/packages/source/i/ipython/ipython-${{ version }}.tar.gz - sha256: 0b99a2dc9f15fd68692e898e5568725c6d49c527d36a9fb5960ffbdeaa82ff7e + sha256: 0d0d15ca1e01faeb868ef56bc7ee5a0de5bd66885735682e8a322ae289a13d1a patches: - patches/0001-Patch-asyncio-tornado.patch From 903af79f446bbbfb124f9da25445e655984bfc83 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Fri, 4 Oct 2024 17:51:42 +0530 Subject: [PATCH 256/333] Add r-cli (#1364) --- recipes/recipes_emscripten/r-cli/recipe.yaml | 53 ++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 recipes/recipes_emscripten/r-cli/recipe.yaml diff --git a/recipes/recipes_emscripten/r-cli/recipe.yaml b/recipes/recipes_emscripten/r-cli/recipe.yaml new file mode 100644 index 000000000..d1bafaf24 --- /dev/null +++ b/recipes/recipes_emscripten/r-cli/recipe.yaml @@ -0,0 +1,53 @@ +context: + version: 3.6.3 + name: r-cli + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: + - https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + sha256: 4295085f11221c54b1dd2b1d39a675a85dfd9f900294297567e1d36f65ac4841 + +build: + number: 0 + script: + - $R CMD INSTALL $R_ARGS --no-byte-compile . + - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so + - rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so + # The activation script of cross-r-base copies cairo and tcltk from + # the build environment. + +requirements: + build: + - cross-r-base >= ${{ r_base_version }} + - ${{ compiler('c') }} + host: + - r-base >= ${{ r_base_version }} + run: + - r-base >= ${{ r_base_version }} + +tests: +- package_contents: + lib: + - R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so + +about: + homepage: https://cli.r-lib.org + repository: https://github.com/r-lib/cli + license: MIT + license_family: MIT + summary: | + A suite of tools to build attractive command line interfaces ('CLIs'), from semantic elements: + headings, lists, alerts, paragraphs, etc. Supports custom themes via a 'CSS'-like language. + It also contains a number of lower level 'CLI' elements: rules, boxes, trees, and 'Unicode' + symbols with 'ASCII' alternatives. It support ANSI colors and text styles as well. + +extra: + recipe-maintainers: + - IsabelParedes + - anutosh491 \ No newline at end of file From 4ed30fc2dd29a2692280cf03b3abe0148c926417 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Fri, 4 Oct 2024 18:21:08 +0530 Subject: [PATCH 257/333] Add r-vctrs (#1342) --- .../recipes_emscripten/r-vctrs/recipe.yaml | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 recipes/recipes_emscripten/r-vctrs/recipe.yaml diff --git a/recipes/recipes_emscripten/r-vctrs/recipe.yaml b/recipes/recipes_emscripten/r-vctrs/recipe.yaml new file mode 100644 index 000000000..ff1f60815 --- /dev/null +++ b/recipes/recipes_emscripten/r-vctrs/recipe.yaml @@ -0,0 +1,63 @@ +context: + name: r-vctrs + version: 0.6.5 + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: + - https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + sha256: 43167d2248fd699594044b5c8f1dbb7ed163f2d64761e08ba805b04e7ec8e402 + +build: + number: 0 + script: + - $R CMD INSTALL $R_ARGS --no-byte-compile . + - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so + - rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so + # The activation script of cross-r-base copies cairo and tcltk from + # the build environment. + +requirements: + build: + - cross-r-base >= ${{ r_base_version }} + - r-glue + - r-rlang + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + host: + - r-base == ${{ r_base_version }} + - r-cli >=3.6.3 + - r-glue + - r-rlang + - r-lifecycle >=1.0.4 + run: + - r-base == ${{ r_base_version }} + - r-cli >=3.6.3 + - r-glue + - r-rlang + - r-lifecycle >=1.0.4 + +tests: +- package_contents: + lib: + - R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so + +about: + homepage: https://vctrs.r-lib.org/ + license: MIT + license_family: MIT + license_file: LICENSE + summary: | + Defines new notions of prototype and size that are used to provide tools for consistent + and well-founded type-coercion and size-recycling, and are in turn connected to ideas of + type- and size-stability useful for analysing function interfaces. + +extra: + recipe-maintainers: + - IsabelParedes + - anutosh491 From a4453ed3743cf16ea6e227b9158703c3a4710802 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Fri, 4 Oct 2024 18:28:06 +0530 Subject: [PATCH 258/333] add r-purrr (#1348) --- .../recipes_emscripten/r-purrr/recipe.yaml | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 recipes/recipes_emscripten/r-purrr/recipe.yaml diff --git a/recipes/recipes_emscripten/r-purrr/recipe.yaml b/recipes/recipes_emscripten/r-purrr/recipe.yaml new file mode 100644 index 000000000..d881cd429 --- /dev/null +++ b/recipes/recipes_emscripten/r-purrr/recipe.yaml @@ -0,0 +1,64 @@ +context: + name: r-purrr + version: 1.0.2 + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: + - https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + sha256: 2c1bc6bb88433dff0892b41136f2f5c23573b335ff35a4775c72aa57b48bbb63 + +build: + number: 0 + script: + - $R CMD INSTALL $R_ARGS --no-byte-compile . + - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so + - rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so + # The activation script of cross-r-base copies cairo and tcltk from + # the build environment. + +requirements: + build: + - cross-r-base >= ${{ r_base_version }} + - r-cli >=3.6.3 + - r-lifecycle >=1.0.4 + - r-magrittr + - r-rlang + - r-vctrs + - ${{ compiler('c') }} + host: + - r-base == ${{ r_base_version }} + - r-cli >=3.6.3 + - r-lifecycle >=1.0.4 + - r-magrittr + - r-rlang + - r-vctrs + run: + - r-base == ${{ r_base_version }} + - r-cli >=3.6.3 + - r-lifecycle >=1.0.4 + - r-magrittr + - r-rlang + - r-vctrs + +tests: +- package_contents: + lib: + - R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so + +about: + homepage: https://purrr.tidyverse.org + license: MIT + license_family: MIT + license_file: LICENSE + summary: A complete and consistent functional programming toolkit for R. + +extra: + recipe-maintainers: + - IsabelParedes + - anutosh491 From 31f02c9e100fdc927e8970ac1fba4003ed097a49 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Fri, 4 Oct 2024 18:39:02 +0530 Subject: [PATCH 259/333] add r-tibble (#1347) --- .../recipes_emscripten/r-tibble/recipe.yaml | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 recipes/recipes_emscripten/r-tibble/recipe.yaml diff --git a/recipes/recipes_emscripten/r-tibble/recipe.yaml b/recipes/recipes_emscripten/r-tibble/recipe.yaml new file mode 100644 index 000000000..6486ca766 --- /dev/null +++ b/recipes/recipes_emscripten/r-tibble/recipe.yaml @@ -0,0 +1,72 @@ +context: + name: r-tibble + version: 3.2.1 + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: + - https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + sha256: 65a72d0c557fd6e7c510d150c935ed6ced5db7d05fc20236b370f11428372131 + +build: + number: 0 + script: + - $R CMD INSTALL $R_ARGS --no-byte-compile . + - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so + - rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so + # The activation script of cross-r-base copies cairo and tcltk from + # the build environment. + +requirements: + build: + - cross-r-base >= ${{ r_base_version }} + - r-fansi + - r-lifecycle + - r-magrittr + - r-pillar + - r-pkgconfig + - r-rlang + - r-vctrs + - ${{ compiler('c') }} + host: + - r-base == ${{ r_base_version }} + - r-fansi + - r-lifecycle + - r-magrittr + - r-pillar + - r-pkgconfig + - r-rlang + - r-vctrs + run: + - r-base == ${{ r_base_version }} + - r-fansi + - r-lifecycle + - r-magrittr + - r-pillar + - r-pkgconfig + - r-rlang + - r-vctrs + +tests: +- package_contents: + lib: + - R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so + +about: + homepage: https://tibble.tidyverse.org/ + license: MIT + license_family: MIT + license_file: LICENSE + summary: | + Provides a 'tbl_df' class (the 'tibble') that provides stricter checking and + better formatting than the traditional data frame. + +extra: + recipe-maintainers: + - IsabelParedes + - anutosh491 From dc80524302043b2a51b9f9afb016d972b88af887 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Sat, 5 Oct 2024 01:08:29 +0000 Subject: [PATCH 260/333] Update cytoolz from 0.12.3 to 1.0.0 --- recipes/recipes_emscripten/cytoolz/recipe.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/recipes_emscripten/cytoolz/recipe.yaml b/recipes/recipes_emscripten/cytoolz/recipe.yaml index d3601f9f6..87bb2d94f 100644 --- a/recipes/recipes_emscripten/cytoolz/recipe.yaml +++ b/recipes/recipes_emscripten/cytoolz/recipe.yaml @@ -1,6 +1,6 @@ context: name: cytoolz - version: 0.12.3 + version: 1.0.0 package: name: cytoolz @@ -9,7 +9,7 @@ package: source: - url: https://pypi.io/packages/source/${{ name[0] }}/${{ name }}/cytoolz-${{ version }}.tar.gz - sha256: 4503dc59f4ced53a54643272c61dc305d1dbbfbd7d6bdf296948de9f34c3a282 + sha256: eb453b30182152f9917a5189b7d99046b6ce90cdf8aeb0feff4b2683e600defd build: number: 0 @@ -37,4 +37,4 @@ tests: build: - pytester run: - - pytester-run \ No newline at end of file + - pytester-run From ff555adf67f4cc6356db84a59076ac2042074013 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Mon, 7 Oct 2024 11:38:14 +0530 Subject: [PATCH 261/333] Update llvm to 19.1.1 (#1366) * Update llvm to 19.1.1 * fixed tests --- recipes/recipes_emscripten/llvm/recipe.yaml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/recipes/recipes_emscripten/llvm/recipe.yaml b/recipes/recipes_emscripten/llvm/recipe.yaml index 7e408994c..a96ad7f33 100644 --- a/recipes/recipes_emscripten/llvm/recipe.yaml +++ b/recipes/recipes_emscripten/llvm/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 19.1.0 + version: 19.1.1 package: name: llvm @@ -8,7 +8,7 @@ package: source: url: https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-${{ version }}.tar.gz - sha256: 0a08341036ca99a106786f50f9c5cb3fbe458b3b74cab6089fd368d0edb2edfe + sha256: 115dfd98a353d05bffdab3f80db22f159da48aca0124e8c416f437adcd54b77f patches: - patches/cross_compile.patch @@ -22,11 +22,20 @@ requirements: - cmake - make # [unix] +tests: +- package_contents: + files: + - lib/cmake/llvm/LLVMConfig.cmake + - lib/cmake/clang/ClangConfig.cmake + - lib/cmake/lld/LLDConfig.cmake + - lib/liblldWasm.a + - lib/libclangInterpreter.a + about: license: Apache-2.0 WITH LLVM-exception license_family: Apache license_file: LICENSE.TXT - summary: llvm + summary: The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. homepage: https://llvm.org extra: recipe-maintainers: From 7e5910fbc10106b7b5cdded433c3aae34ba4a48c Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Thu, 10 Oct 2024 13:39:15 +0530 Subject: [PATCH 262/333] Add r-colorspace (#1370) --- .../r-colorspace/recipe.yaml | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 recipes/recipes_emscripten/r-colorspace/recipe.yaml diff --git a/recipes/recipes_emscripten/r-colorspace/recipe.yaml b/recipes/recipes_emscripten/r-colorspace/recipe.yaml new file mode 100644 index 000000000..41788454c --- /dev/null +++ b/recipes/recipes_emscripten/r-colorspace/recipe.yaml @@ -0,0 +1,48 @@ +context: + version: 2.1-1 + name: r-colorspace + r_base_version: 4.4.1 + +package: + name: ${{ name }} + version: ${{ version|replace('-', '_') }} + +source: + url: + - https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + sha256: e721cee5f4d6e4b0fc8eb18265e316b4f856fd3be02f0775a26032663758cd0b + +build: + number: 0 + script: + - $R CMD INSTALL $R_ARGS --no-byte-compile . + - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so + - rm $PREFIX/lib/R/library/tcltk/libs/tcltk.so + # The activation script of cross-r-base copies cairo and tcltk from + # the build environment. + +requirements: + build: + - cross-r-base >= ${{ r_base_version }} + - ${{ compiler('c') }} + host: + - r-base >= ${{ r_base_version }} + run: + - r-base >= ${{ r_base_version }} + +tests: +- package_contents: + lib: + - R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so + +about: + homepage: http://colorspace.R-Forge.R-project.org + license: BSD-3-Clause + license_family: BSD + summary: A Toolbox for Manipulating and Assessing Colors and Palettes + +extra: + recipe-maintainers: + - IsabelParedes + - anutosh491 \ No newline at end of file From 3908cd32a8b665c7ac79766054025ef9c88ca127 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Thu, 10 Oct 2024 18:25:30 +0530 Subject: [PATCH 263/333] Bump Build number for libiconv (#1371) * Bump Build number for libiconv * deleted recipe_legacy.yml --- recipes/recipes_emscripten/libiconv/recipe.yaml | 2 +- .../libiconv/recipe_legacy.yaml | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 recipes/recipes_emscripten/libiconv/recipe_legacy.yaml diff --git a/recipes/recipes_emscripten/libiconv/recipe.yaml b/recipes/recipes_emscripten/libiconv/recipe.yaml index 2ac3a0c7d..112bae5d2 100644 --- a/recipes/recipes_emscripten/libiconv/recipe.yaml +++ b/recipes/recipes_emscripten/libiconv/recipe.yaml @@ -10,7 +10,7 @@ source: sha256: 8f74213b56238c85a50a5329f77e06198771e70dd9a739779f4c02f65d971313 build: - number: 1 + number: 2 requirements: build: diff --git a/recipes/recipes_emscripten/libiconv/recipe_legacy.yaml b/recipes/recipes_emscripten/libiconv/recipe_legacy.yaml deleted file mode 100644 index 7352fa4ea..000000000 --- a/recipes/recipes_emscripten/libiconv/recipe_legacy.yaml +++ /dev/null @@ -1,17 +0,0 @@ -context: - version: '1.17' - -package: - name: libiconv - version: '{{ version }}' - -source: - - url: https://ftp.gnu.org/pub/gnu/libiconv/libiconv-{{ version }}.tar.gz - sha256: 8f74213b56238c85a50a5329f77e06198771e70dd9a739779f4c02f65d971313 - -build: - number: 1 - -requirements: - build: - - '{{ compiler("c") }}' From 76f57caa44c552a71a143c8ac36f17d603566789 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Fri, 11 Oct 2024 13:22:06 +0200 Subject: [PATCH 264/333] Add WASM_BIGINT flag (#1373) --- recipes/recipes_emscripten/r-base/config.site | 2 +- recipes/recipes_emscripten/r-base/recipe.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/r-base/config.site b/recipes/recipes_emscripten/r-base/config.site index 7864a722c..bbf30e742 100644 --- a/recipes/recipes_emscripten/r-base/config.site +++ b/recipes/recipes_emscripten/r-base/config.site @@ -194,7 +194,7 @@ FPICFLAGS="-fPIC" ## On macOS, the default is ## -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup ## For other platforms, see configure.ac -SHLIB_LDFLAGS="-sSIDE_MODULE=1" +SHLIB_LDFLAGS="-sSIDE_MODULE=1 -sWASM_BIGINT" ## ditto for a dynamic library: DYLIB_LDFLAGS defaults to SHLIB_LDFLAGS ## DYLIB_LD= diff --git a/recipes/recipes_emscripten/r-base/recipe.yaml b/recipes/recipes_emscripten/r-base/recipe.yaml index cb1989845..04adeecfd 100644 --- a/recipes/recipes_emscripten/r-base/recipe.yaml +++ b/recipes/recipes_emscripten/r-base/recipe.yaml @@ -24,7 +24,7 @@ source: - patches/0012-Build-with-atomics-and-bulkmemory.patch build: - number: 1 + number: 2 requirements: build: From 9cfab4c3e2d8625f50fe75ce9b4a19aad00e2c20 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Fri, 11 Oct 2024 17:27:18 +0200 Subject: [PATCH 265/333] Fix xerbla_ signature mismatch (#1374) --- recipes/recipes_emscripten/r-base/config.site | 2 +- recipes/recipes_emscripten/r-base/recipe.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/r-base/config.site b/recipes/recipes_emscripten/r-base/config.site index bbf30e742..5e7f821ac 100644 --- a/recipes/recipes_emscripten/r-base/config.site +++ b/recipes/recipes_emscripten/r-base/config.site @@ -455,7 +455,7 @@ SHLIB_CXXLDFLAGS="-sSIDE_MODULE=1" ## where int is used). ## Allow user to override the configure checks if they know what they ## are doing (the value is unchecked). Empty values are ignored. -## FC_LEN_T=size_t +FC_LEN_T=size_t ## C Stack Direction ## In case optimization defeats the configure test: 'down' (the usual) or 'up' diff --git a/recipes/recipes_emscripten/r-base/recipe.yaml b/recipes/recipes_emscripten/r-base/recipe.yaml index 04adeecfd..270c98a06 100644 --- a/recipes/recipes_emscripten/r-base/recipe.yaml +++ b/recipes/recipes_emscripten/r-base/recipe.yaml @@ -24,7 +24,7 @@ source: - patches/0012-Build-with-atomics-and-bulkmemory.patch build: - number: 2 + number: 3 requirements: build: From c7ca32142b732da149be7f48faae865803b11a02 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Fri, 11 Oct 2024 01:08:46 +0000 Subject: [PATCH 266/333] Update bitarray from 2.9.2 to 2.9.3 --- .../recipes_emscripten/bitarray/recipe.yaml | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/recipes/recipes_emscripten/bitarray/recipe.yaml b/recipes/recipes_emscripten/bitarray/recipe.yaml index 66fed4e79..a9ddc489f 100644 --- a/recipes/recipes_emscripten/bitarray/recipe.yaml +++ b/recipes/recipes_emscripten/bitarray/recipe.yaml @@ -1,29 +1,30 @@ context: name: bitarray - version: 2.9.2 + version: 2.9.3 package: name: ${{ name|lower }} version: ${{ version }} source: - url: https://pypi.io/packages/source/${{ name[0] }}/${{ name }}/${{ name }}-${{ version }}.tar.gz - sha256: a8f286a51a32323715d77755ed959f94bef13972e9a2fe71b609e40e6d27957e + url: https://pypi.io/packages/source/${{ name[0] }}/${{ name }}/${{ name }}-${{ + version }}.tar.gz + sha256: 9eff55cf189b0c37ba97156a00d640eb7392db58a8049be6f26ff2712b93fa89 build: number: 0 requirements: build: - - python - - cross-python_${{ target_platform }} - - ${{ compiler('c') }} - - pip + - python + - cross-python_${{ target_platform }} + - ${{ compiler('c') }} + - pip host: - - python - - pip + - python + - pip run: - - python + - python tests: - script: pytester @@ -50,4 +51,4 @@ about: extra: recipe-maintainers: - - KGB99 + - KGB99 From 944d498467000cf3d7ae4c7a3437e1162ae14bcb Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Sun, 13 Oct 2024 01:13:45 +0000 Subject: [PATCH 267/333] Update howardhinnant_date from 3.0.1 to 3.0.2 --- recipes/recipes_emscripten/howardhinnant_date/recipe.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/recipes_emscripten/howardhinnant_date/recipe.yaml b/recipes/recipes_emscripten/howardhinnant_date/recipe.yaml index c0e16a52c..c164d7f42 100644 --- a/recipes/recipes_emscripten/howardhinnant_date/recipe.yaml +++ b/recipes/recipes_emscripten/howardhinnant_date/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 3.0.1 + version: 3.0.2 package: @@ -8,7 +8,7 @@ package: source: url: https://github.com/howardhinnant/date/archive/refs/tags/v${{ version }}.tar.gz - sha256: 7a390f200f0ccd207e8cff6757e04817c1a0aec3e327b006b7eb451c57ee3538 + sha256: 0449667ea85c5b411c28d08a53f1e420c73416caa5b693c249dac9763eb97b7c build: number: 0 @@ -26,11 +26,11 @@ tests: - test -f $PREFIX/lib/cmake/date/dateConfig.cmake - test -f $PREFIX/lib/libdate-tz.a -about: +about: license: MIT license_file: LICENSE.txt summary: date - homepage: https://github.com/howardhinnant/date + homepage: https://github.com/howardhinnant/date extra: recipe-maintainers: - DerThorsten From 2898af25b5e977f9e6a03ce3fc4cc87d28aaf43e Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Mon, 14 Oct 2024 11:43:32 +0530 Subject: [PATCH 268/333] Added xsimd 13.0.0 (#1369) --- recipes/recipes_emscripten/xsimd/build.sh | 26 +++++++++++ recipes/recipes_emscripten/xsimd/recipe.yaml | 46 ++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 recipes/recipes_emscripten/xsimd/build.sh create mode 100644 recipes/recipes_emscripten/xsimd/recipe.yaml diff --git a/recipes/recipes_emscripten/xsimd/build.sh b/recipes/recipes_emscripten/xsimd/build.sh new file mode 100644 index 000000000..3984ab72d --- /dev/null +++ b/recipes/recipes_emscripten/xsimd/build.sh @@ -0,0 +1,26 @@ + +#!/bin/bash +set -e + +# Configure step +mkdir -p build +cd build +emcmake cmake .. \ + -DBUILD_TESTS=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DDOWNLOAD_DOCTEST=ON + +emmake make -j4 + +# Install step +emmake make install +cd .. + +# Copy test files to $PREFIX/test +mkdir -p $PREFIX/bin +cp test/test_wasm/browser_main.html $PREFIX/bin/ +cp test/test_wasm/test_wasm_playwright.py $PREFIX/bin/ +cp build/test/test_xsimd.js $PREFIX/bin/ +cp build/test/test_xsimd.wasm $PREFIX/bin/ diff --git a/recipes/recipes_emscripten/xsimd/recipe.yaml b/recipes/recipes_emscripten/xsimd/recipe.yaml new file mode 100644 index 000000000..750cf70e4 --- /dev/null +++ b/recipes/recipes_emscripten/xsimd/recipe.yaml @@ -0,0 +1,46 @@ +context: + name: xsimd + version: 13.0.0 + +package: + name: ${{ name|lower }} + version: ${{ version }} + +source: + url: https://github.com/xtensor-stack/xsimd/archive/refs/tags/${{ version }}.tar.gz + sha256: 8bdbbad0c3e7afa38d88d0d484d70a1671a1d8aefff03f4223ab2eb6a41110a3 + +build: + number: 0 + +requirements: + build: + - ${{ compiler('cxx') }} + - cmake + - ninja + host: + - python + +tests: + - script: | + echo "install playwright" + playwright install + python ${PREFIX}/bin/test_wasm_playwright.py ${PREFIX}/bin + + requirements: + build: + - microsoft::playwright + +about: + homepage: https://github.com/xtensor-stack/xsimd + license: BSD-3-Clause + license_file: LICENSE + summary: C++ Wrappers for SIMD Intrinsices + description: High-level APIs for SIMD operations + documentation: https://xsimd.readthedocs.io + repository: https://github.com/xtensor-stack/xsimd + +extra: + recipe-maintainers: + - JohanMabille + - anutosh491 From eec66512678cc8d35ecab4a326b21d721be36e57 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Mon, 14 Oct 2024 17:26:04 +0200 Subject: [PATCH 269/333] Rebuild R packages (#1378) * Rebuild R packages * Add another mirror link for glue * Update digest test --- recipes/recipes_emscripten/r-base64enc/recipe.yaml | 2 +- recipes/recipes_emscripten/r-cli/recipe.yaml | 2 +- recipes/recipes_emscripten/r-colorspace/recipe.yaml | 2 +- recipes/recipes_emscripten/r-digest/recipe.yaml | 7 ++++--- recipes/recipes_emscripten/r-ellipsis/recipe.yaml | 4 ++-- recipes/recipes_emscripten/r-fansi/recipe.yaml | 2 +- recipes/recipes_emscripten/r-farver/recipe.yaml | 2 +- recipes/recipes_emscripten/r-fastmap/recipe.yaml | 2 +- recipes/recipes_emscripten/r-glue/recipe.yaml | 3 ++- recipes/recipes_emscripten/r-htmltools/recipe.yaml | 2 +- recipes/recipes_emscripten/r-isoband/recipe.yaml | 2 +- recipes/recipes_emscripten/r-jsonlite/recipe.yaml | 2 +- recipes/recipes_emscripten/r-lattice/recipe.yaml | 2 +- recipes/recipes_emscripten/r-magrittr/recipe.yaml | 2 +- recipes/recipes_emscripten/r-mass/recipe.yaml | 2 +- recipes/recipes_emscripten/r-matrix/recipe.yaml | 2 +- recipes/recipes_emscripten/r-mgcv/recipe.yaml | 2 +- recipes/recipes_emscripten/r-nlme/recipe.yaml | 2 +- recipes/recipes_emscripten/r-purrr/recipe.yaml | 2 +- recipes/recipes_emscripten/r-rlang/recipe.yaml | 2 +- recipes/recipes_emscripten/r-tibble/recipe.yaml | 2 +- recipes/recipes_emscripten/r-utf8/recipe.yaml | 2 +- recipes/recipes_emscripten/r-vctrs/recipe.yaml | 2 +- 23 files changed, 28 insertions(+), 26 deletions(-) diff --git a/recipes/recipes_emscripten/r-base64enc/recipe.yaml b/recipes/recipes_emscripten/r-base64enc/recipe.yaml index f9fa992bf..3996365d1 100644 --- a/recipes/recipes_emscripten/r-base64enc/recipe.yaml +++ b/recipes/recipes_emscripten/r-base64enc/recipe.yaml @@ -14,7 +14,7 @@ source: sha256: 6d856d8a364bcdc499a0bf38bfd283b7c743d08f0b288174fba7dbf0a04b688d build: - number: 3 + number: 4 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so diff --git a/recipes/recipes_emscripten/r-cli/recipe.yaml b/recipes/recipes_emscripten/r-cli/recipe.yaml index d1bafaf24..d708b6039 100644 --- a/recipes/recipes_emscripten/r-cli/recipe.yaml +++ b/recipes/recipes_emscripten/r-cli/recipe.yaml @@ -14,7 +14,7 @@ source: sha256: 4295085f11221c54b1dd2b1d39a675a85dfd9f900294297567e1d36f65ac4841 build: - number: 0 + number: 1 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so diff --git a/recipes/recipes_emscripten/r-colorspace/recipe.yaml b/recipes/recipes_emscripten/r-colorspace/recipe.yaml index 41788454c..95ccf8acd 100644 --- a/recipes/recipes_emscripten/r-colorspace/recipe.yaml +++ b/recipes/recipes_emscripten/r-colorspace/recipe.yaml @@ -14,7 +14,7 @@ source: sha256: e721cee5f4d6e4b0fc8eb18265e316b4f856fd3be02f0775a26032663758cd0b build: - number: 0 + number: 1 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so diff --git a/recipes/recipes_emscripten/r-digest/recipe.yaml b/recipes/recipes_emscripten/r-digest/recipe.yaml index 8c88fdb83..b0ca7e227 100644 --- a/recipes/recipes_emscripten/r-digest/recipe.yaml +++ b/recipes/recipes_emscripten/r-digest/recipe.yaml @@ -14,7 +14,7 @@ source: sha256: 82c4d149994b8a4a9af930f5a8e47420829935abed41f3f9030e94b6a48f0321 build: - number: 2 + number: 3 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so @@ -33,8 +33,9 @@ requirements: - r-base >= ${{ r_base_version }} tests: -- script: - - test -f $PREFIX/lib/R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so +- package_contents: + lib: + - R/library/${{ name[2:] }}/libs/${{ name[2:] }}.so about: homepage: https://dirk.eddelbuettel.com/code/digest.html diff --git a/recipes/recipes_emscripten/r-ellipsis/recipe.yaml b/recipes/recipes_emscripten/r-ellipsis/recipe.yaml index 4c9a5852f..be0669dcd 100644 --- a/recipes/recipes_emscripten/r-ellipsis/recipe.yaml +++ b/recipes/recipes_emscripten/r-ellipsis/recipe.yaml @@ -12,9 +12,9 @@ source: - https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz - https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz sha256: a90266e5eb59c7f419774d5c6d6bd5e09701a26c9218c5933c9bce6765aa1558 - + build: - number: 0 + number: 1 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so diff --git a/recipes/recipes_emscripten/r-fansi/recipe.yaml b/recipes/recipes_emscripten/r-fansi/recipe.yaml index aebc9da3a..846377e58 100644 --- a/recipes/recipes_emscripten/r-fansi/recipe.yaml +++ b/recipes/recipes_emscripten/r-fansi/recipe.yaml @@ -14,7 +14,7 @@ source: sha256: ea9dc690dfe50a7fad7c5eb863c157d70385512173574c56f4253b6dfe431863 build: - number: 2 + number: 3 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so diff --git a/recipes/recipes_emscripten/r-farver/recipe.yaml b/recipes/recipes_emscripten/r-farver/recipe.yaml index 8c4692579..8b2bd36bd 100644 --- a/recipes/recipes_emscripten/r-farver/recipe.yaml +++ b/recipes/recipes_emscripten/r-farver/recipe.yaml @@ -14,7 +14,7 @@ source: sha256: 528823b95daab4566137711f1c842027a952bea1b2ae6ff098e2ca512b17fe25 build: - number: 0 + number: 1 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so diff --git a/recipes/recipes_emscripten/r-fastmap/recipe.yaml b/recipes/recipes_emscripten/r-fastmap/recipe.yaml index 01d4d5623..276b2709a 100644 --- a/recipes/recipes_emscripten/r-fastmap/recipe.yaml +++ b/recipes/recipes_emscripten/r-fastmap/recipe.yaml @@ -14,7 +14,7 @@ source: sha256: b1da04a2915d1d057f3c2525e295ef15016a64e6667eac83a14641bbd83b9246 build: - number: 2 + number: 3 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so diff --git a/recipes/recipes_emscripten/r-glue/recipe.yaml b/recipes/recipes_emscripten/r-glue/recipe.yaml index 7bca92467..228f3fb24 100644 --- a/recipes/recipes_emscripten/r-glue/recipe.yaml +++ b/recipes/recipes_emscripten/r-glue/recipe.yaml @@ -10,11 +10,12 @@ package: source: url: - https://cran.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz + - https://cran.r-project.org/src/contrib/Archive/${{ name[2:] }}/${{ name[2:] }}_${{ version }}.tar.gz - https://cloud.r-project.org/src/contrib/${{ name[2:] }}_${{ version }}.tar.gz sha256: 1af51b51f52c1aeb3bfe9349f55896dd78b5542ffdd5654e432e4d646e4a86dc build: - number: 2 + number: 3 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so diff --git a/recipes/recipes_emscripten/r-htmltools/recipe.yaml b/recipes/recipes_emscripten/r-htmltools/recipe.yaml index 72dd2b79d..57e5334c4 100644 --- a/recipes/recipes_emscripten/r-htmltools/recipe.yaml +++ b/recipes/recipes_emscripten/r-htmltools/recipe.yaml @@ -14,7 +14,7 @@ source: sha256: f9f62293ec06c353c4584db6ccedb06a2da12e485208bd26b856f17dd013f176 build: - number: 0 + number: 1 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so diff --git a/recipes/recipes_emscripten/r-isoband/recipe.yaml b/recipes/recipes_emscripten/r-isoband/recipe.yaml index 7365e1e75..7aca3a052 100644 --- a/recipes/recipes_emscripten/r-isoband/recipe.yaml +++ b/recipes/recipes_emscripten/r-isoband/recipe.yaml @@ -14,7 +14,7 @@ source: sha256: 7693223343b45b86de2b5b638ff148f0dafa6d7b1237e822c5272902f79cdf61 build: - number: 2 + number: 3 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so diff --git a/recipes/recipes_emscripten/r-jsonlite/recipe.yaml b/recipes/recipes_emscripten/r-jsonlite/recipe.yaml index fad408a1c..697ad8b95 100644 --- a/recipes/recipes_emscripten/r-jsonlite/recipe.yaml +++ b/recipes/recipes_emscripten/r-jsonlite/recipe.yaml @@ -14,7 +14,7 @@ source: sha256: 89f130e0e1163328c01decd54e7712b5ebf3d0a667da0052833722cb9a6e90b0 build: - number: 0 + number: 1 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so diff --git a/recipes/recipes_emscripten/r-lattice/recipe.yaml b/recipes/recipes_emscripten/r-lattice/recipe.yaml index 3455a46b2..20c24ffd5 100644 --- a/recipes/recipes_emscripten/r-lattice/recipe.yaml +++ b/recipes/recipes_emscripten/r-lattice/recipe.yaml @@ -14,7 +14,7 @@ source: sha256: 4b377211e472ece7872b9d6759f9b9c660b09594500462eb6146312a1d4d00f7 build: - number: 1 + number: 2 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so diff --git a/recipes/recipes_emscripten/r-magrittr/recipe.yaml b/recipes/recipes_emscripten/r-magrittr/recipe.yaml index d90c3a608..abec5140f 100644 --- a/recipes/recipes_emscripten/r-magrittr/recipe.yaml +++ b/recipes/recipes_emscripten/r-magrittr/recipe.yaml @@ -14,7 +14,7 @@ source: sha256: a2bff83f792a1acb801bfe6330bb62724c74d5308832f2cb6a6178336ace55d2 build: - number: 0 + number: 1 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so diff --git a/recipes/recipes_emscripten/r-mass/recipe.yaml b/recipes/recipes_emscripten/r-mass/recipe.yaml index d511efd42..d19ddab2a 100644 --- a/recipes/recipes_emscripten/r-mass/recipe.yaml +++ b/recipes/recipes_emscripten/r-mass/recipe.yaml @@ -14,7 +14,7 @@ source: sha256: 3144c8bf579dd7b7c47c259728c27f53f53e294e7ed307da434dfd144e800a90 build: - number: 3 + number: 4 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so diff --git a/recipes/recipes_emscripten/r-matrix/recipe.yaml b/recipes/recipes_emscripten/r-matrix/recipe.yaml index 72c2d8106..08e9cd5f7 100644 --- a/recipes/recipes_emscripten/r-matrix/recipe.yaml +++ b/recipes/recipes_emscripten/r-matrix/recipe.yaml @@ -14,7 +14,7 @@ source: sha256: fb97bba0df370222eb4f7e2da2e94dd01053b5e054b1c51829ff9a6efc08ad37 build: - number: 0 + number: 1 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so diff --git a/recipes/recipes_emscripten/r-mgcv/recipe.yaml b/recipes/recipes_emscripten/r-mgcv/recipe.yaml index 43e1430ed..a38536734 100644 --- a/recipes/recipes_emscripten/r-mgcv/recipe.yaml +++ b/recipes/recipes_emscripten/r-mgcv/recipe.yaml @@ -14,7 +14,7 @@ source: sha256: 700fbc37bedd3a49505b9bc4949faee156d9cfb4f669d797d06a10a15a5bdb32 build: - number: 0 + number: 1 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so diff --git a/recipes/recipes_emscripten/r-nlme/recipe.yaml b/recipes/recipes_emscripten/r-nlme/recipe.yaml index ef9c830ab..068fe49a1 100644 --- a/recipes/recipes_emscripten/r-nlme/recipe.yaml +++ b/recipes/recipes_emscripten/r-nlme/recipe.yaml @@ -14,7 +14,7 @@ source: sha256: 237a14ee8d78755b11a7efe234b95be40b46fbdd1b4aaf463f6d532be1909762 build: - number: 0 + number: 1 requirements: build: diff --git a/recipes/recipes_emscripten/r-purrr/recipe.yaml b/recipes/recipes_emscripten/r-purrr/recipe.yaml index d881cd429..a06a84d4e 100644 --- a/recipes/recipes_emscripten/r-purrr/recipe.yaml +++ b/recipes/recipes_emscripten/r-purrr/recipe.yaml @@ -14,7 +14,7 @@ source: sha256: 2c1bc6bb88433dff0892b41136f2f5c23573b335ff35a4775c72aa57b48bbb63 build: - number: 0 + number: 1 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so diff --git a/recipes/recipes_emscripten/r-rlang/recipe.yaml b/recipes/recipes_emscripten/r-rlang/recipe.yaml index ae6aaeeb7..a22c02c7d 100644 --- a/recipes/recipes_emscripten/r-rlang/recipe.yaml +++ b/recipes/recipes_emscripten/r-rlang/recipe.yaml @@ -14,7 +14,7 @@ source: sha256: f2d74527508bf3287102470beb27de0d234c3cbba399c28d3312f2c83c64a6e1 build: - number: 1 + number: 2 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so diff --git a/recipes/recipes_emscripten/r-tibble/recipe.yaml b/recipes/recipes_emscripten/r-tibble/recipe.yaml index 6486ca766..46ea62be8 100644 --- a/recipes/recipes_emscripten/r-tibble/recipe.yaml +++ b/recipes/recipes_emscripten/r-tibble/recipe.yaml @@ -14,7 +14,7 @@ source: sha256: 65a72d0c557fd6e7c510d150c935ed6ced5db7d05fc20236b370f11428372131 build: - number: 0 + number: 1 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so diff --git a/recipes/recipes_emscripten/r-utf8/recipe.yaml b/recipes/recipes_emscripten/r-utf8/recipe.yaml index dfb998ca1..403a811a1 100644 --- a/recipes/recipes_emscripten/r-utf8/recipe.yaml +++ b/recipes/recipes_emscripten/r-utf8/recipe.yaml @@ -14,7 +14,7 @@ source: sha256: 418f824bbd9cd868d2d8a0d4345545c62151d321224cdffca8b1ffd98a167b7d build: - number: 2 + number: 3 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so diff --git a/recipes/recipes_emscripten/r-vctrs/recipe.yaml b/recipes/recipes_emscripten/r-vctrs/recipe.yaml index ff1f60815..6418c19cf 100644 --- a/recipes/recipes_emscripten/r-vctrs/recipe.yaml +++ b/recipes/recipes_emscripten/r-vctrs/recipe.yaml @@ -14,7 +14,7 @@ source: sha256: 43167d2248fd699594044b5c8f1dbb7ed163f2d64761e08ba805b04e7ec8e402 build: - number: 0 + number: 1 script: - $R CMD INSTALL $R_ARGS --no-byte-compile . - rm $PREFIX/lib/R/library/grDevices/libs/cairo.so From f3486a53fab201d7c8038afd4a34f009ef615340 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Tue, 15 Oct 2024 01:10:11 +0000 Subject: [PATCH 270/333] Update lfortran from 0.40.0 to 0.41.0 --- recipes/recipes_emscripten/lfortran/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/lfortran/recipe.yaml b/recipes/recipes_emscripten/lfortran/recipe.yaml index 5d3672117..8476aad2e 100644 --- a/recipes/recipes_emscripten/lfortran/recipe.yaml +++ b/recipes/recipes_emscripten/lfortran/recipe.yaml @@ -1,6 +1,6 @@ context: name: lfortran - version: 0.40.0 + version: 0.41.0 package: name: ${{ name }} @@ -9,7 +9,7 @@ package: source: url: https://github.com/lfortran/lfortran/releases/download/v${{ version }}/${{ name }}-${{ version }}.tar.gz - sha256: 9919f74fa680b9442551338062ae66acd54cc2f090d555414ecc7dfa8a05fe44 + sha256: edc37baa0714b283e6b36369d5bde85ad8bc6a6d335e9ded33ffea27496e1306 build: number: 0 From 376197ae4e2e199ed4877921d99e46d40e126c2c Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Wed, 16 Oct 2024 01:09:50 +0000 Subject: [PATCH 271/333] Update llvm from 19.1.1 to 19.1.2 --- recipes/recipes_emscripten/llvm/recipe.yaml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/recipes/recipes_emscripten/llvm/recipe.yaml b/recipes/recipes_emscripten/llvm/recipe.yaml index a96ad7f33..d96c91876 100644 --- a/recipes/recipes_emscripten/llvm/recipe.yaml +++ b/recipes/recipes_emscripten/llvm/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 19.1.1 + version: 19.1.2 package: name: llvm @@ -8,7 +8,7 @@ package: source: url: https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-${{ version }}.tar.gz - sha256: 115dfd98a353d05bffdab3f80db22f159da48aca0124e8c416f437adcd54b77f + sha256: 622cb6c5e95a3bb7e9876c4696a65671f235bd836cfd0c096b272f6c2ada41e7 patches: - patches/cross_compile.patch @@ -25,17 +25,18 @@ requirements: tests: - package_contents: files: - - lib/cmake/llvm/LLVMConfig.cmake - - lib/cmake/clang/ClangConfig.cmake - - lib/cmake/lld/LLDConfig.cmake - - lib/liblldWasm.a - - lib/libclangInterpreter.a + - lib/cmake/llvm/LLVMConfig.cmake + - lib/cmake/clang/ClangConfig.cmake + - lib/cmake/lld/LLDConfig.cmake + - lib/liblldWasm.a + - lib/libclangInterpreter.a about: license: Apache-2.0 WITH LLVM-exception license_family: Apache license_file: LICENSE.TXT - summary: The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. + summary: The LLVM Project is a collection of modular and reusable compiler and toolchain + technologies. homepage: https://llvm.org extra: recipe-maintainers: From 1f3fb8d4ecb240d7f00a0f5a06c784d84f6b8d88 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Wed, 16 Oct 2024 01:09:38 +0000 Subject: [PATCH 272/333] Update bitarray from 2.9.3 to 3.0.0 --- recipes/recipes_emscripten/bitarray/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/bitarray/recipe.yaml b/recipes/recipes_emscripten/bitarray/recipe.yaml index a9ddc489f..318c96ec5 100644 --- a/recipes/recipes_emscripten/bitarray/recipe.yaml +++ b/recipes/recipes_emscripten/bitarray/recipe.yaml @@ -1,6 +1,6 @@ context: name: bitarray - version: 2.9.3 + version: 3.0.0 package: name: ${{ name|lower }} @@ -9,7 +9,7 @@ package: source: url: https://pypi.io/packages/source/${{ name[0] }}/${{ name }}/${{ name }}-${{ version }}.tar.gz - sha256: 9eff55cf189b0c37ba97156a00d640eb7392db58a8049be6f26ff2712b93fa89 + sha256: a2083dc20f0d828a7cdf7a16b20dae56aab0f43dc4f347a3b3039f6577992b03 build: number: 0 From 685c405b0961d740fd2bef32640333fcdf8fcb7f Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Fri, 18 Oct 2024 08:32:15 +0200 Subject: [PATCH 273/333] Update highs from 1.7.2 to 1.8.0 (#1382) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/highs/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/highs/recipe.yaml b/recipes/recipes_emscripten/highs/recipe.yaml index a0ab353ea..369de752d 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.2 + version: 1.8.0 package: name: ${{ name }} @@ -8,7 +8,7 @@ package: source: url: https://github.com/ERGO-Code/${{ name }}/archive/refs/tags/v${{ version }}.tar.gz - sha256: 5ff96c14ae19592d3568e9ae107624cbaf3409d328fb1a586359f0adf9b34bf7 + sha256: e184e63101cf19688a02102f58447acc7c021d77eef0d3475ceaceb61f035539 build: number: 0 From c16452a886ad704b80fa76de45f56f47dcc1f85a Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:29:42 +0200 Subject: [PATCH 274/333] Update symengine from 0.12.0 to 0.13.0 (#1351) Co-authored-by: emscripten-forge-bot --- .../recipes_emscripten/symengine/recipe.yaml | 41 ++++++++++--------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/recipes/recipes_emscripten/symengine/recipe.yaml b/recipes/recipes_emscripten/symengine/recipe.yaml index abbb90890..6fb06e056 100644 --- a/recipes/recipes_emscripten/symengine/recipe.yaml +++ b/recipes/recipes_emscripten/symengine/recipe.yaml @@ -1,37 +1,38 @@ context: name: symengine - version: 0.12.0 + version: 0.13.0 package: name: ${{ name|lower }} version: ${{ version }} source: - sha256: 1b5c3b0bc6a9f187635f93585649f24a18e9c7f2167cebcd885edeaaf211d956 - url: https://github.com/symengine/symengine/releases/download/v${{ version }}/symengine-${{ version }}.tar.gz + sha256: f46bcf037529cd1a422369327bf360ad4c7d2b02d0f607a62a5b09c74a55bb59 + url: https://github.com/symengine/symengine/releases/download/v${{ version }}/symengine-${{ + version }}.tar.gz build: number: 0 script: | - emcmake cmake \ - -DBUILD_TESTS=OFF \ - -DBUILD_BENCHMARKS=OFF \ - -DINTEGER_CLASS=boostmp \ - -DCMAKE_PREFIX_PATH=$PREFIX \ - -DCMAKE_INSTALL_PREFIX=$PREFIX \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DBUILD_FOR_DISTRIBUTION=yes \ - -DBUILD_SHARED_LIBS=no \ - -DBoost_INCLUDE_DIR=$BUILD_PREFIX/include \ - . - emmake make install + emcmake cmake \ + -DBUILD_TESTS=OFF \ + -DBUILD_BENCHMARKS=OFF \ + -DINTEGER_CLASS=boostmp \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_FOR_DISTRIBUTION=yes \ + -DBUILD_SHARED_LIBS=no \ + -DBoost_INCLUDE_DIR=$BUILD_PREFIX/include \ + . + emmake make install requirements: build: - - ${{ compiler("cxx") }} - - cmake - - make - - boost-cpp + - ${{ compiler("cxx") }} + - cmake + - make + - boost-cpp about: homepage: https://symengine.org/ @@ -46,4 +47,4 @@ about: extra: recipe-maintainers: - - richardotis \ No newline at end of file + - richardotis From d0704bf9fa4e45f77ecb0194a345a88367e181a7 Mon Sep 17 00:00:00 2001 From: Manon Marchand Date: Fri, 18 Oct 2024 10:44:42 +0200 Subject: [PATCH 275/333] fix: astropy recipe add missing mandatory dependency (#1357) * fix: add missing mandatory dependency * test: add imports that fail without astropy-iers-data * Update recipe.yaml --------- Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/astropy/recipe.yaml | 3 ++- recipes/recipes_emscripten/astropy/test_astropy.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/recipes_emscripten/astropy/recipe.yaml b/recipes/recipes_emscripten/astropy/recipe.yaml index efecd3212..a8fac4e2c 100644 --- a/recipes/recipes_emscripten/astropy/recipe.yaml +++ b/recipes/recipes_emscripten/astropy/recipe.yaml @@ -12,7 +12,7 @@ source: # - patches/skip_ep.patch build: - number: 0 + number: 1 requirements: build: @@ -33,6 +33,7 @@ requirements: - pyerfa - pyyaml - packaging + - astropy-iers-data>=0.2024.7.1.0.34.3 tests: - script: pytester diff --git a/recipes/recipes_emscripten/astropy/test_astropy.py b/recipes/recipes_emscripten/astropy/test_astropy.py index c9a51f87f..4dabbb093 100644 --- a/recipes/recipes_emscripten/astropy/test_astropy.py +++ b/recipes/recipes_emscripten/astropy/test_astropy.py @@ -1,2 +1,4 @@ def test_import_astropy(): import astropy.units as u + from astropy.coordinates import SkyCoord + import astropy.io.ascii From cbb095e30b47c2a5d9ea1419d4fb5acc3c974992 Mon Sep 17 00:00:00 2001 From: Talmo Pereira Date: Fri, 18 Oct 2024 01:45:52 -0700 Subject: [PATCH 276/333] Re-add `gettext` to `emscripten_emscripten-wasm32` recipe (#1353) * Re-add `gettext` to `emscripten_emscripten-wasm32` recipe * Bump build number * Update recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml Co-authored-by: Luiz Irber --------- Co-authored-by: Thorsten Beier Co-authored-by: Luiz Irber --- recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml b/recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml index f826caabc..2c6746e0e 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: 29 + number: 30 outputs: - package: @@ -23,6 +23,7 @@ outputs: build: - curl - python + - gettext-tools run: - python - nodejs 16.* From bff475022898d865c063a00b820ccc16646dc3e5 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Sat, 19 Oct 2024 01:08:07 +0000 Subject: [PATCH 277/333] Update rice from 4.3.1 to 4.3.2 --- recipes/recipes_emscripten/rice/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/rice/recipe.yaml b/recipes/recipes_emscripten/rice/recipe.yaml index 8ecaf4a20..e14ee616d 100644 --- a/recipes/recipes_emscripten/rice/recipe.yaml +++ b/recipes/recipes_emscripten/rice/recipe.yaml @@ -1,6 +1,6 @@ context: name: rice - version: 4.3.1 + version: 4.3.2 package: name: ${{ name }} @@ -8,7 +8,7 @@ package: source: url: https://github.com/jasonroelofs/${{ name }}/archive/refs/tags/${{ version }}.tar.gz - sha256: fb34402bf0f79a900fa02bd7396a35d661165f0975a93aee902e89e59adf045c + sha256: d653bea8499144b59e59fbc1066fcacec5039cd775fda680b2bf4fd02004223e build: number: 0 From 4e0ec654d29730bcf1223f140019acfe14676217 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:06:30 +0530 Subject: [PATCH 278/333] Updated CppInterOp to 1.4.0 (#1385) --- recipes/recipes_emscripten/cppinterop/build.sh | 2 +- .../cppinterop/patches/cppinterop/README.md | 1 - recipes/recipes_emscripten/cppinterop/recipe.yaml | 8 +++----- 3 files changed, 4 insertions(+), 7 deletions(-) delete mode 100644 recipes/recipes_emscripten/cppinterop/patches/cppinterop/README.md diff --git a/recipes/recipes_emscripten/cppinterop/build.sh b/recipes/recipes_emscripten/cppinterop/build.sh index 642c36ce9..fc115485d 100644 --- a/recipes/recipes_emscripten/cppinterop/build.sh +++ b/recipes/recipes_emscripten/cppinterop/build.sh @@ -17,7 +17,7 @@ emcmake cmake -DCMAKE_BUILD_TYPE=Release \ ../ # Build step -EMCC_CFLAGS='-sERROR_ON_UNDEFINED_SYMBOLS=0' emmake make -j1 +emmake make -j1 # Install step emmake make install diff --git a/recipes/recipes_emscripten/cppinterop/patches/cppinterop/README.md b/recipes/recipes_emscripten/cppinterop/patches/cppinterop/README.md deleted file mode 100644 index 3177347cb..000000000 --- a/recipes/recipes_emscripten/cppinterop/patches/cppinterop/README.md +++ /dev/null @@ -1 +0,0 @@ -CppInterOp patches diff --git a/recipes/recipes_emscripten/cppinterop/recipe.yaml b/recipes/recipes_emscripten/cppinterop/recipe.yaml index 12b2e2ab1..f2c06fa39 100644 --- a/recipes/recipes_emscripten/cppinterop/recipe.yaml +++ b/recipes/recipes_emscripten/cppinterop/recipe.yaml @@ -1,15 +1,13 @@ context: - version: 1.3.0 + version: 1.4.0 package: name: cppinterop version: ${{ version }} source: - url: https://github.com/compiler-research/CppInterOp/archive/refs/tags/v{{ version }}.tar.gz - sha256: 7f9be052f5d798ad1b0c4ddc1e80038de753b22775a9b783c17b10c07facdeec - patches: - + url: https://github.com/compiler-research/CppInterOp/archive/refs/tags/v${{ version }}.tar.gz + sha256: 566e3818de97656990d302a916a2d6925db33c7765a762f36ba28dead03c34a8 build: number: 0 From a4c4a034d4f00b0aed0fcabbac477f3aa0e6558f Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 21 Oct 2024 07:59:12 +0200 Subject: [PATCH 279/333] Update howardhinnant_date from 3.0.2 to 3.0.3 (#1386) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/howardhinnant_date/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/howardhinnant_date/recipe.yaml b/recipes/recipes_emscripten/howardhinnant_date/recipe.yaml index c164d7f42..2c692e5d9 100644 --- a/recipes/recipes_emscripten/howardhinnant_date/recipe.yaml +++ b/recipes/recipes_emscripten/howardhinnant_date/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 3.0.2 + version: 3.0.3 package: @@ -8,7 +8,7 @@ package: source: url: https://github.com/howardhinnant/date/archive/refs/tags/v${{ version }}.tar.gz - sha256: 0449667ea85c5b411c28d08a53f1e420c73416caa5b693c249dac9763eb97b7c + sha256: 30de45a34a2605cca33a993a9ea54e8f140f23b1caf1acf3c2fd436c42c7d942 build: number: 0 From aff25bf87331fb195fdebac1d6eb565caf3e11e3 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:38:46 +0530 Subject: [PATCH 280/333] Fix Undefined Symbols while building llvm (#1384) * Update recipe.yaml * try building without flag * fix cmake_cxx_flags * add lldwasm_link patch --- recipes/recipes_emscripten/llvm/build.sh | 5 ++--- .../llvm/patches/lldwasm_link.patch | 20 +++++++++++++++++++ recipes/recipes_emscripten/llvm/recipe.yaml | 3 ++- 3 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 recipes/recipes_emscripten/llvm/patches/lldwasm_link.patch diff --git a/recipes/recipes_emscripten/llvm/build.sh b/recipes/recipes_emscripten/llvm/build.sh index 6213ec0ea..d83391abd 100644 --- a/recipes/recipes_emscripten/llvm/build.sh +++ b/recipes/recipes_emscripten/llvm/build.sh @@ -20,13 +20,12 @@ emcmake cmake ${CMAKE_ARGS} -S ../llvm -B . \ -DLLVM_INCLUDE_TESTS=OFF \ -DLLVM_ENABLE_LIBEDIT=OFF \ -DLLVM_ENABLE_PROJECTS="clang;lld" \ - -DCMAKE_CXX_FLAGS="-Dwait4=__syscall_wait4" \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DLLVM_ENABLE_THREADS=OFF \ - -DCMAKE_CXX_FLAGS="-isystem $EMSCRIPTEN_FORGE_EMSDK_DIR/upstream/emscripten/cache/sysroot/include/c++/v1" + -DCMAKE_CXX_FLAGS="-Dwait4=__syscall_wait4 -isystem $EMSCRIPTEN_FORGE_EMSDK_DIR/upstream/emscripten/cache/sysroot/include/c++/v1" # Build step -EMCC_CFLAGS='-sERROR_ON_UNDEFINED_SYMBOLS=0' emmake make -j1 +emmake make -j1 # Install step emmake make install diff --git a/recipes/recipes_emscripten/llvm/patches/lldwasm_link.patch b/recipes/recipes_emscripten/llvm/patches/lldwasm_link.patch new file mode 100644 index 000000000..d2c1ced1f --- /dev/null +++ b/recipes/recipes_emscripten/llvm/patches/lldwasm_link.patch @@ -0,0 +1,20 @@ +diff --git a/clang/lib/Interpreter/CMakeLists.txt b/clang/lib/Interpreter/CMakeLists.txt +index 2cc7c59b61d3..d5ffe78251d2 100644 +--- a/clang/lib/Interpreter/CMakeLists.txt ++++ b/clang/lib/Interpreter/CMakeLists.txt +@@ -14,6 +14,7 @@ set(LLVM_LINK_COMPONENTS + + if (EMSCRIPTEN AND "lld" IN_LIST LLVM_ENABLE_PROJECTS) + set(WASM_SRC Wasm.cpp) ++ set(WASM_LINK lldWasm) + endif() + + add_clang_library(clangInterpreter +@@ -44,6 +45,7 @@ add_clang_library(clangInterpreter + clangParse + clangSema + clangSerialization ++ ${WASM_LINK} + ) + + if ((MINGW OR CYGWIN) AND BUILD_SHARED_LIBS) diff --git a/recipes/recipes_emscripten/llvm/recipe.yaml b/recipes/recipes_emscripten/llvm/recipe.yaml index d96c91876..50e33261e 100644 --- a/recipes/recipes_emscripten/llvm/recipe.yaml +++ b/recipes/recipes_emscripten/llvm/recipe.yaml @@ -11,9 +11,10 @@ source: sha256: 622cb6c5e95a3bb7e9876c4696a65671f235bd836cfd0c096b272f6c2ada41e7 patches: - patches/cross_compile.patch + - patches/lldwasm_link.patch build: - number: 0 + number: 1 requirements: build: From eaa3b6c8a1b6edff8a46b23900dc254d1f2a6264 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Tue, 22 Oct 2024 15:25:07 +0200 Subject: [PATCH 281/333] Add libarchive (#1388) --- .../recipes_emscripten/libarchive/build.sh | 28 +++++++++ .../recipes_emscripten/libarchive/recipe.yaml | 62 +++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 recipes/recipes_emscripten/libarchive/build.sh create mode 100644 recipes/recipes_emscripten/libarchive/recipe.yaml diff --git a/recipes/recipes_emscripten/libarchive/build.sh b/recipes/recipes_emscripten/libarchive/build.sh new file mode 100644 index 000000000..ec83122e0 --- /dev/null +++ b/recipes/recipes_emscripten/libarchive/build.sh @@ -0,0 +1,28 @@ +set -eux + +export CPPFLAGS="-I$PREFIX/include" +export LDFLAGS="$LDFLAGS -L$PREFIX/lib" +export LDLIBS="-lbz2 -lz -lzstd" + +mkdir -p _build +cd _build + +autoreconf -fiv .. +emconfigure ../configure \ + --prefix=${PREFIX} \ + --build="x86_64-conda-linux-gnu" \ + --host="wasm32-unknown-emscripten" \ + --disable-shared \ + --enable-static \ + --with-bz2lib \ + --with-zlib \ + --with-zstd \ + --enable-bsdtar=static \ + --enable-bsdcat=static \ + --enable-bsdcpio=static \ + --verbose + +emmake make VERBOSE=1 +emmake make install + +cp bsd*.wasm $PREFIX/bin/ \ No newline at end of file diff --git a/recipes/recipes_emscripten/libarchive/recipe.yaml b/recipes/recipes_emscripten/libarchive/recipe.yaml new file mode 100644 index 000000000..3a89350ac --- /dev/null +++ b/recipes/recipes_emscripten/libarchive/recipe.yaml @@ -0,0 +1,62 @@ +context: + name: libarchive + version: 3.7.6 + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://github.com/${{ name }}/${{ name }}/archive/v${{ version }}.tar.gz + sha256: 2a27a429dde8a6920973a609f13e0d1f94b45a2c40c9f49fc66f7fd915e15b79 + +build: + number: 0 + +requirements: + build: + - ${{ compiler('c') }} + - autoconf + - automake + - libtool + - pkg-config + host: + - bzip2 + - zlib + - zstd + - libxml2 + +tests: +- script: + - node $PREFIX/bin/bsdtar --version + requirements: + build: + - nodejs +- package_contents: + bin: + - bsdcat.wasm + - bsdcpio.wasm + - bsdtar.wasm + - bsdunzip.wasm + include: + - archive.h + lib: + - libarchive.a + +about: + homepage: http://www.libarchive.org/ + license: BSD-2-Clause + license_file: COPYING + license_family: BSD + summary: Multi-format archive and compression library + description: | + The libarchive project develops a portable, efficient C library that can + read and write streaming archives in a variety of formats. It also includes + implementations of the common tar, cpio, and zcat command-line tools that + use the libarchive library. + repository: https://github.com/libarchive/libarchive + +extra: + recipe-maintainers: + - IsabelParedes + - AnastasiaSliusar From 87e4c0635c967288f86c4922f4bdeb8c1f8e247f Mon Sep 17 00:00:00 2001 From: Duc Trung Le Date: Wed, 23 Oct 2024 11:33:23 +0200 Subject: [PATCH 282/333] bump pyjs to 2.4.0 (#1391) * bump pyjs to 2.4.0 * Missing zstd * restrict python * Update recipe.yaml * Update recipe.yaml --------- Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/pyjs/recipe.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/recipes/recipes_emscripten/pyjs/recipe.yaml b/recipes/recipes_emscripten/pyjs/recipe.yaml index 8341327d5..3d13ef1b5 100644 --- a/recipes/recipes_emscripten/pyjs/recipe.yaml +++ b/recipes/recipes_emscripten/pyjs/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.1.0 + version: 2.4.0 name: pyjs package: name: ${{name}} @@ -7,9 +7,9 @@ package: source: url: https://github.com/emscripten-forge/pyjs/archive/refs/tags/${{ version }}.tar.gz - sha256: 8633dfd8b5bf9403e6b9c02c582557dcc49226034689032939b547c7dc431000 + sha256: f99ccde0b025efe76dd21243534660f231881fdff969b811b215406096a9488e build: - number: 8 + number: 0 requirements: @@ -19,9 +19,10 @@ requirements: - cmake - make host: - - python + - python<3.12 - sqlite - zlib + - zstd - bzip2 - libffi - pybind11<2.12.0 @@ -64,7 +65,8 @@ tests: - microsoft::playwright run: - pytest - - numpy + - numpy<2 + - python<3.12 files: source: - tests/**/* From 462c2db3e1e90ccccf7d7f5f28fc6d72017a130c Mon Sep 17 00:00:00 2001 From: Duc Trung Le Date: Wed, 23 Oct 2024 12:12:20 +0200 Subject: [PATCH 283/333] Bump xeus-python to 0.17.2 (#1393) * Bump xeus-python to 0.17.2 * Update recipe.yaml * reset bld number --------- Co-authored-by: Thorsten Beier --- recipes/recipes_emscripten/xeus-python/recipe.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/recipes_emscripten/xeus-python/recipe.yaml b/recipes/recipes_emscripten/xeus-python/recipe.yaml index 27ac4366b..7e66db54b 100644 --- a/recipes/recipes_emscripten/xeus-python/recipe.yaml +++ b/recipes/recipes_emscripten/xeus-python/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 0.17.1 + version: 0.17.2 package: name: xeus-python @@ -7,11 +7,11 @@ package: source: url: https://github.com/jupyter-xeus/xeus-python/archive/refs/tags/${{ version }}.tar.gz - sha256: 8ecb2a92dc49309fe3d6dfc096323260ea20fd9736b84532f15578761fb687d0 + sha256: bb8858c9fa9f746b8dbd91aecc74fd5abd1b259a83fdd6d26315e4d793672393 build: - number: 6 + number: 0 requirements: build: @@ -27,6 +27,7 @@ requirements: - pybind11_json - xtl - pyjs >=2,<3 + - zstd run: - python - ipython From 0fb5eded653c6048b3a5d18d4452d164dd76ea22 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Wed, 23 Oct 2024 01:09:56 +0000 Subject: [PATCH 284/333] Update libarchive from 3.7.6 to 3.7.7 --- .../recipes_emscripten/libarchive/recipe.yaml | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/recipes/recipes_emscripten/libarchive/recipe.yaml b/recipes/recipes_emscripten/libarchive/recipe.yaml index 3a89350ac..74a8f401b 100644 --- a/recipes/recipes_emscripten/libarchive/recipe.yaml +++ b/recipes/recipes_emscripten/libarchive/recipe.yaml @@ -1,6 +1,6 @@ context: name: libarchive - version: 3.7.6 + version: 3.7.7 package: name: ${{ name }} @@ -8,27 +8,27 @@ package: source: url: https://github.com/${{ name }}/${{ name }}/archive/v${{ version }}.tar.gz - sha256: 2a27a429dde8a6920973a609f13e0d1f94b45a2c40c9f49fc66f7fd915e15b79 + sha256: fa62384995e8aa4f5a901c184fb5c91e56a29e24c05b6881a7f8fd5bbea694d2 build: number: 0 requirements: build: - - ${{ compiler('c') }} - - autoconf - - automake - - libtool - - pkg-config + - ${{ compiler('c') }} + - autoconf + - automake + - libtool + - pkg-config host: - - bzip2 - - zlib - - zstd - - libxml2 + - bzip2 + - zlib + - zstd + - libxml2 tests: - script: - - node $PREFIX/bin/bsdtar --version + - node $PREFIX/bin/bsdtar --version requirements: build: - nodejs @@ -58,5 +58,5 @@ about: extra: recipe-maintainers: - - IsabelParedes - - AnastasiaSliusar + - IsabelParedes + - AnastasiaSliusar From 5fe76c8400fb8ebcbb4cf868ccf5bd7790cc2b44 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Wed, 23 Oct 2024 01:08:59 +0000 Subject: [PATCH 285/333] Update rice from 4.3.2 to 4.3.3 --- recipes/recipes_emscripten/rice/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/rice/recipe.yaml b/recipes/recipes_emscripten/rice/recipe.yaml index e14ee616d..b2dbb3348 100644 --- a/recipes/recipes_emscripten/rice/recipe.yaml +++ b/recipes/recipes_emscripten/rice/recipe.yaml @@ -1,6 +1,6 @@ context: name: rice - version: 4.3.2 + version: 4.3.3 package: name: ${{ name }} @@ -8,7 +8,7 @@ package: source: url: https://github.com/jasonroelofs/${{ name }}/archive/refs/tags/${{ version }}.tar.gz - sha256: d653bea8499144b59e59fbc1066fcacec5039cd775fda680b2bf4fd02004223e + sha256: 2ddfc7999befe1f87453b260a5e9ece17d1c57aed8ce916e611192222fe8d9de build: number: 0 From 4206c3075621f2ab046caa9b0502053be947a290 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Fri, 25 Oct 2024 15:26:09 +0530 Subject: [PATCH 286/333] Update freetype recipe (#1395) --- recipes/recipes_emscripten/freetype/build.sh | 6 +++++- recipes/recipes_emscripten/freetype/recipe.yaml | 11 ++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/recipes/recipes_emscripten/freetype/build.sh b/recipes/recipes_emscripten/freetype/build.sh index 31f4dc51f..1f92af30d 100644 --- a/recipes/recipes_emscripten/freetype/build.sh +++ b/recipes/recipes_emscripten/freetype/build.sh @@ -1,5 +1,9 @@ mkdir build && cd build -emcmake cmake .. $CMAKE_ARGS +# NOTE: freetype needs to be compiled with atomics/bulk-memory features +# for use cases like cairo, pango etc. +emcmake cmake .. ${CMAKE_ARGS} \ + -DCMAKE_INSTALL_PREFIX=${PREFIX} \ + -DCMAKE_C_FLAGS="-matomics -mbulk-memory" 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 index ecca622c9..cd45e3117 100644 --- a/recipes/recipes_emscripten/freetype/recipe.yaml +++ b/recipes/recipes_emscripten/freetype/recipe.yaml @@ -10,7 +10,7 @@ source: sha256: 5c3a8e78f7b24c20b25b54ee575d6daa40007a5f4eea2845861c3409b3021747 build: - number: 0 + number: 1 requirements: build: @@ -18,8 +18,8 @@ requirements: - cmake - make host: - # - libpng - # - zlib + - libpng + - zlib tests: - script: @@ -37,3 +37,8 @@ about: of most vector and bitmap font formats. documentation: http://freetype.sourceforge.net/freetype2/documentation.html repository: http://git.savannah.gnu.org/cgit/freetype/ + +extra: + recipe-maintainers: + - wolfv + - anutosh491 \ No newline at end of file From 0c9011091fdac5650f9b124d515ef62f0543a323 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Fri, 25 Oct 2024 15:38:49 +0530 Subject: [PATCH 287/333] Build Cairo with freetype (#1396) * Build Cairo with freetype * add as maintainer --- recipes/recipes_emscripten/cairo/build.sh | 8 +++++++- .../cairo/patches/cairo-wasm.patch | 13 +++++++++++++ recipes/recipes_emscripten/cairo/recipe.yaml | 8 ++++++-- 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 recipes/recipes_emscripten/cairo/patches/cairo-wasm.patch diff --git a/recipes/recipes_emscripten/cairo/build.sh b/recipes/recipes_emscripten/cairo/build.sh index 675efa308..6afd872e7 100644 --- a/recipes/recipes_emscripten/cairo/build.sh +++ b/recipes/recipes_emscripten/cairo/build.sh @@ -2,9 +2,15 @@ set -ex +export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BUILD_PREFIX/lib/pkgconfig +export PKG_CONFIG=$BUILD_PREFIX/bin/pkg-config + +export CFLAGS="${CFLAGS} -DCAIRO_NO_MUTEX=1" +export LDFLAGS="${LDFLAGS} -lz" + meson_config_args=( -Dfontconfig=enabled - -Dfreetype=disabled + -Dfreetype=enabled -Dglib=enabled -Dpng=disabled -Dxlib=disabled diff --git a/recipes/recipes_emscripten/cairo/patches/cairo-wasm.patch b/recipes/recipes_emscripten/cairo/patches/cairo-wasm.patch new file mode 100644 index 000000000..0eb3e46dd --- /dev/null +++ b/recipes/recipes_emscripten/cairo/patches/cairo-wasm.patch @@ -0,0 +1,13 @@ +diff --git a/src/cairo-ft-private.h b/src/cairo-ft-private.h +index 836f7e523..6b0e30223 100644 +--- a/src/cairo-ft-private.h ++++ b/src/cairo-ft-private.h +@@ -43,6 +43,8 @@ + + #if CAIRO_HAS_FT_FONT + ++#include FT_COLOR_H ++ + CAIRO_BEGIN_DECLS + + typedef struct _cairo_ft_unscaled_font cairo_ft_unscaled_font_t; diff --git a/recipes/recipes_emscripten/cairo/recipe.yaml b/recipes/recipes_emscripten/cairo/recipe.yaml index 54e2e23d0..8a0327f8d 100644 --- a/recipes/recipes_emscripten/cairo/recipe.yaml +++ b/recipes/recipes_emscripten/cairo/recipe.yaml @@ -9,9 +9,11 @@ package: source: url: http://cairographics.org/releases/${{ name }}-${{ version }}.tar.xz sha256: 243a0736b978a33dee29f9cca7521733b78a65b5418206fef7bd1c3d4cf10b64 + patches: + - patches/cairo-wasm.patch build: - number: 0 + number: 1 requirements: build: @@ -20,6 +22,7 @@ requirements: - meson - ninja - pkg-config + - gobject-introspection host: - freetype - fontconfig>=2.12 @@ -49,4 +52,5 @@ about: extra: recipe-maintainers: - - IsabelParedes \ No newline at end of file + - IsabelParedes + - anutosh491 \ No newline at end of file From ef6876fdbd570ce4166de957e4f804e5cf45cfb7 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Fri, 25 Oct 2024 16:00:24 +0530 Subject: [PATCH 288/333] Update glib (#1397) * Update glib * Update recipe.yaml --- recipes/recipes_emscripten/glib/build.sh | 2 +- recipes/recipes_emscripten/glib/recipe.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/glib/build.sh b/recipes/recipes_emscripten/glib/build.sh index a70b535e9..492b95e0b 100644 --- a/recipes/recipes_emscripten/glib/build.sh +++ b/recipes/recipes_emscripten/glib/build.sh @@ -4,7 +4,7 @@ # Propagate -pthread into CFLAGS to ensure GObject/GIO is compiled with the # atomics/bulk-memory features -CFLAGS="$CFLAGS -pthread" +export CFLAGS="$CFLAGS -pthread -matomics -mbulk-memory" meson_config_args=( -Dintrospection=disabled diff --git a/recipes/recipes_emscripten/glib/recipe.yaml b/recipes/recipes_emscripten/glib/recipe.yaml index edb87a638..15302f1d9 100644 --- a/recipes/recipes_emscripten/glib/recipe.yaml +++ b/recipes/recipes_emscripten/glib/recipe.yaml @@ -15,7 +15,7 @@ source: - patches/glib.patch build: - number: 0 + number: 1 requirements: build: From 5c7f24273a637299fa17099f1b8a64fb97f7a7b9 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Fri, 25 Oct 2024 16:19:39 +0530 Subject: [PATCH 289/333] Add pango (#1398) * Add pango * improve recipe * add tests * add todo for enabling cairo --- recipes/recipes_emscripten/pango/build.sh | 30 ++++++++++ .../pango/emscripten.meson.cross | 14 +++++ recipes/recipes_emscripten/pango/recipe.yaml | 55 +++++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 recipes/recipes_emscripten/pango/build.sh create mode 100644 recipes/recipes_emscripten/pango/emscripten.meson.cross create mode 100644 recipes/recipes_emscripten/pango/recipe.yaml diff --git a/recipes/recipes_emscripten/pango/build.sh b/recipes/recipes_emscripten/pango/build.sh new file mode 100644 index 000000000..910f6b94c --- /dev/null +++ b/recipes/recipes_emscripten/pango/build.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +set -ex + +# get meson to find pkg-config when cross compiling +export PKG_CONFIG=$BUILD_PREFIX/bin/pkg-config +export PKG_CONFIG_PATH_FOR_BUILD=$BUILD_PREFIX/lib/pkgconfig +export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BUILD_PREFIX/lib/pkgconfig + +meson_config_args=( + -Dintrospection=disabled # requires gobject-introspection as run-time dep + -Dfontconfig=enabled + -Dfreetype=enabled + -Dcairo=disabled + -Dbuild-testsuite=false +) + +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} \ No newline at end of file diff --git a/recipes/recipes_emscripten/pango/emscripten.meson.cross b/recipes/recipes_emscripten/pango/emscripten.meson.cross new file mode 100644 index 000000000..48763013f --- /dev/null +++ b/recipes/recipes_emscripten/pango/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/pango/recipe.yaml b/recipes/recipes_emscripten/pango/recipe.yaml new file mode 100644 index 000000000..590ffc34f --- /dev/null +++ b/recipes/recipes_emscripten/pango/recipe.yaml @@ -0,0 +1,55 @@ +context: + name: "pango" + version: "1.54.0" + version_major_minor: "1.54" + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://download.gnome.org/sources/pango/${{ version_major_minor }}/${{ name }}-${{ version }}.tar.xz + sha256: 8a9eed75021ee734d7fc0fdf3a65c3bba51dfefe4ae51a9b414a60c70b2d1ed8 + +build: + number: 0 + +requirements: + build: + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + - meson + - ninja + - pkg-config + - glib + - fontconfig + - freetype + host: + # TODO: enable cairo + # - cairo >=1.18 + - fribidi + - glib + - harfbuzz >=10.0.0 + - fontconfig >=2.15.0 + - freetype + - libpng + - graphite2 + - libffi + - expat + +tests: +- script: + - test -f $PREFIX/lib/libpango-1.0.a + - test -f $PREFIX/lib/libpangoft2-1.0.a + - test -f $PREFIX/include/pango-1.0/pango/pango.h + +about: + homepage: http://www.pango.org/ + license: LGPL-2.1-or-later + license_file: COPYING + summary: Text layout and rendering engine. + +extra: + recipe-maintainers: + - IsabelParedes + - anutosh491 \ No newline at end of file From 215c779a9e20bb507ba5ac363d69feda27af519f Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Sat, 26 Oct 2024 10:54:53 +0530 Subject: [PATCH 290/333] Rebuild CppinterOp to use latest llvm (#1387) * Update recipe.yaml * debug --- .../recipes_emscripten/cppinterop/build.sh | 1 + .../cppinterop/patches/lld.patch | 195 ++++++++++++++++++ .../recipes_emscripten/cppinterop/recipe.yaml | 4 +- 3 files changed, 199 insertions(+), 1 deletion(-) create mode 100644 recipes/recipes_emscripten/cppinterop/patches/lld.patch diff --git a/recipes/recipes_emscripten/cppinterop/build.sh b/recipes/recipes_emscripten/cppinterop/build.sh index fc115485d..b23dfa58e 100644 --- a/recipes/recipes_emscripten/cppinterop/build.sh +++ b/recipes/recipes_emscripten/cppinterop/build.sh @@ -10,6 +10,7 @@ emcmake cmake -DCMAKE_BUILD_TYPE=Release \ -DUSE_REPL=ON \ -DCMAKE_PREFIX_PATH=$PREFIX \ -DLLVM_DIR=$PREFIX \ + -DLLD_DIR=$PREFIX \ -DClang_DIR=$PREFIX \ -DBUILD_SHARED_LIBS=OFF \ -DCMAKE_INSTALL_PREFIX=$PREFIX \ diff --git a/recipes/recipes_emscripten/cppinterop/patches/lld.patch b/recipes/recipes_emscripten/cppinterop/patches/lld.patch new file mode 100644 index 000000000..0fc1f1dcc --- /dev/null +++ b/recipes/recipes_emscripten/cppinterop/patches/lld.patch @@ -0,0 +1,195 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bcd16a9..ab4f254 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -24,11 +24,28 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) + if (NOT DEFINED Cling_DIR) + set(Cling_DIR ${LLVM_DIR}) + endif() ++ if (NOT DEFINED LLD_DIR) ++ set(LLD_DIR ${LLVM_DIR}) ++ endif() ++ endif() ++ if (DEFINED LLD_DIR) ++ if (NOT DEFINED LLVM_DIR) ++ set(LLVM_DIR ${LLD_DIR}) ++ endif() ++ if (NOT DEFINED Clang_DIR) ++ set(Clang_DIR ${LLD_DIR}) ++ endif() ++ if (NOT DEFINED Cling_DIR) ++ set(Cling_DIR ${LLD_DIR}) ++ endif() + endif() + if (DEFINED Clang_DIR) + if (NOT DEFINED LLVM_DIR) + set(LLVM_DIR ${Clang_DIR}) + endif() ++ if (NOT DEFINED LLD_DIR) ++ set(LLD_DIR ${Clang_DIR}) ++ endif() + if (NOT DEFINED Cling_DIR) + set(Cling_DIR ${Clang_DIR}) + endif() +@@ -61,6 +78,9 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) + set(CLANG_MIN_SUPPORTED 13.0) + set(CLANG_MAX_SUPPORTED "19.1.x") + set(CLANG_VERSION_UPPER_BOUND 20.0.0) ++ set(LLD_MIN_SUPPORTED 13.0) ++ set(LLD_MAX_SUPPORTED "19.1.x") ++ set(LLD_VERSION_UPPER_BOUND 20.0.0) + set(LLVM_MIN_SUPPORTED 13.0) + set(LLVM_MAX_SUPPORTED "19.1.x") + set(LLVM_VERSION_UPPER_BOUND 20.0.0) +@@ -75,6 +95,11 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) + if (DEFINED LLVM_DIR) + set(llvm_search_hints PATHS ${LLVM_DIR} HINTS "${LLVM_DIR}/lib/cmake/llvm" "${LLVM_DIR}/cmake" "${LLVM_CONFIG_EXTRA_PATH_HINTS}") + set(clang_search_hints PATHS ${LLVM_DIR} HINTS "${LLVM_DIR}/lib/cmake/clang" "${LLVM_DIR}/cmake") ++ set(lld_search_hints PATHS ${LLVM_DIR} HINTS "${LLVM_DIR}/lib/cmake/lld" "${LLVM_DIR}/cmake") ++ endif() ++ if (DEFINED LLD_DIR) ++ set(llvm_search_hints PATHS ${LLD_DIR} HINTS "${LLD_DIR}/lib/cmake/llvm" "${LLD_DIR}/cmake") ++ set(lld_search_hints PATHS ${LLD_DIR} HINTS "${lld_search_hints}" "${LLD_DIR}/lib/cmake/lld" "${LLD_DIR}/cmake") + endif() + if (DEFINED Clang_DIR) + set(llvm_search_hints PATHS ${Clang_DIR} HINTS "${Clang_DIR}/lib/cmake/llvm" "${Clang_DIR}/cmake") +@@ -137,6 +162,43 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) + message(STATUS "Found supported version: LLVM ${LLVM_PACKAGE_VERSION}") + message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}") + ++## Find supported LLD ++ ++if (DEFINED LLD_VERSION) ++ if (LLD_VERSION VERSION_GREATER_EQUAL LLD_VERSION_UPPER_BOUND) ++ set(LLD_VERSION ${LLD_VERSION_UPPER_BOUND}) ++ endif() ++ if (LLD_VERSION VERSION_LESS LLD_MIN_SUPPORTED) ++ set(LLD_VERSION ${LLD_MIN_SUPPORTED}) ++ endif() ++ ++ find_package(LLD ${LLD_VERSION} REQUIRED CONFIG ${lld_search_hints} NO_DEFAULT_PATH) ++endif() ++ ++if (NOT LLD_FOUND AND DEFINED LLD_DIR) ++ find_package(LLD REQUIRED CONFIG ${lld_search_hints} NO_DEFAULT_PATH) ++endif() ++ ++if (NOT LLD_FOUND) ++ find_package(LLD REQUIRED CONFIG) ++endif() ++ ++if (NOT LLD_FOUND) ++ message(FATAL_ERROR "Please set LLD_DIR pointing to the LLD build or installation folder") ++endif() ++ ++set(LLD_VERSION_MAJOR ${LLVM_VERSION_MAJOR}) ++set(LLD_VERSION_MINOR ${LLVM_VERSION_MINOR}) ++set(LLD_VERSION_PATCH ${LLVM_VERSION_PATCH}) ++set(LLD_PACKAGE_VERSION ${LLVM_PACKAGE_VERSION}) ++ ++if (LLD_PACKAGE_VERSION VERSION_LESS LLD_MIN_SUPPORTED OR LLD_PACKAGE_VERSION VERSION_GREATER_EQUAL LLD_VERSION_UPPER_BOUND) ++ message(FATAL_ERROR "Found unsupported version: LLD ${LLD_PACKAGE_VERSION};\nPlease set LLD_DIR pointing to the LLD version ${LLD_MIN_SUPPORTED} to ${LLD_MAX_SUPPORTED} build or installation folder") ++endif() ++ ++message(STATUS "Found supported version: LLD ${LLD_PACKAGE_VERSION}") ++message(STATUS "Using LLDConfig.cmake in: ${LLD_DIR}") ++ + ## Find supported Clang + + if (DEFINED CLANG_VERSION) +@@ -237,6 +299,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) + if (USE_CLING) + include_directories(SYSTEM ${CLING_INCLUDE_DIRS}) + endif(USE_CLING) ++ include_directories(SYSTEM ${LLD_INCLUDE_DIRS}) + include_directories(SYSTEM ${CLANG_INCLUDE_DIRS}) + include_directories(SYSTEM ${LLVM_INCLUDE_DIRS}) + separate_arguments(LLVM_DEFINITIONS_LIST NATIVE_COMMAND ${LLVM_DEFINITIONS}) +@@ -247,6 +310,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) + endif(USE_CLING) + message(STATUS "CLANG_INCLUDE_DIRS: ${CLANG_INCLUDE_DIRS}") + message(STATUS "LLVM_INCLUDE_DIRS: ${LLVM_INCLUDE_DIRS}") ++ message(STATUS "LLD_INCLUDE_DIRS: ${LLD_INCLUDE_DIRS}") + message(STATUS "LLVM_DEFINITIONS_LIST: ${LLVM_DEFINITIONS_LIST}") + + # If the llvm sources are present add them with higher priority. +@@ -299,7 +363,7 @@ endif() + + # Add appropriate flags for GCC + if (LLVM_COMPILER_IS_GCC_COMPATIBLE) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -fPIC") + endif () + + # Fixes "C++ exception handler used, but unwind semantics are not enabled" warning Windows +@@ -378,6 +442,9 @@ endif() + if (TARGET clang-headers) + list(APPEND LLVM_COMMON_DEPENDS clang-headers) + endif() ++if (TARGET lld-headers) # Check for LLD headers ++ list(APPEND LLVM_COMMON_DEPENDS lld-headers) ++endif() + + # Generate docs for CppInterOp + option(CPPINTEROP_INCLUDE_DOCS "Generate build targets for the CppInterOp docs.") +diff --git a/lib/Interpreter/CMakeLists.txt b/lib/Interpreter/CMakeLists.txt +index 7f4ca53..ee87c5f 100644 +--- a/lib/Interpreter/CMakeLists.txt ++++ b/lib/Interpreter/CMakeLists.txt +@@ -6,6 +6,12 @@ set(LLVM_LINK_COMPONENTS + OrcJit + Support + ) ++ ++if(EMSCRIPTEN) ++ list(APPEND LLVM_LINK_COMPONENTS MC TargetParser WebAssembly) ++ set(WASM_LINK lldWasm) ++endif() ++ + # FIXME: Investigate why this needs to be conditionally included. + if ("LLVMFrontendDriver" IN_LIST LLVM_AVAILABLE_LIBS) + list(APPEND LLVM_LINK_COMPONENTS FrontendDriver) +@@ -41,8 +47,18 @@ set(link_libs + clangFrontend + clangLex + clangSema ++ ${WASM_LINK} + ) + ++ ++if(EMSCRIPTEN) ++ # Map LLVM components to their corresponding library names ++ llvm_map_components_to_libnames(llvm_libs ${LLVM_LINK_COMPONENTS}) ++ ++ # Append llvm_libs to your existing link_libs ++ list(APPEND link_libs ${llvm_libs}) ++endif() ++ + if(NOT WIN32) + list(APPEND link_libs dl) + endif() +@@ -102,6 +118,24 @@ add_llvm_library(clangCppInterOp + ${link_libs} + ) + ++if(EMSCRIPTEN) ++ target_link_libraries(clangCppInterOp PRIVATE embind) ++ ++ target_link_options(clangCppInterOp PRIVATE ++ -O1 ++ -sMODULARIZE ++ -sEXPORT_ES6=1 ++ -sASSERTIONS ++ -sALLOW_MEMORY_GROWTH=1 ++ -sINITIAL_MEMORY=128MB ++ -sTOTAL_STACK=32MB ++ -sMAIN_MODULE=1 ++ -sEXPORTED_RUNTIME_METHODS=ccall,cwrap,stringToNewUTF8,getValue,setValue ++ -sEXPORTED_FUNCTIONS=_malloc,_free,__ZTIN10emscripten3valE ++ --preload-file ${EMSCRIPTEN_SYSROOT}/@/ ++ ) ++endif() ++ + string(REPLACE ";" "\;" _VER CPPINTEROP_VERSION) + set_source_files_properties(CppInterOp.cpp PROPERTIES COMPILE_DEFINITIONS + "LLVM_BINARY_DIR=\"${LLVM_BINARY_DIR}\";CPPINTEROP_VERSION=\"${_VAR}\"" diff --git a/recipes/recipes_emscripten/cppinterop/recipe.yaml b/recipes/recipes_emscripten/cppinterop/recipe.yaml index f2c06fa39..017aefa56 100644 --- a/recipes/recipes_emscripten/cppinterop/recipe.yaml +++ b/recipes/recipes_emscripten/cppinterop/recipe.yaml @@ -8,9 +8,11 @@ package: source: url: https://github.com/compiler-research/CppInterOp/archive/refs/tags/v${{ version }}.tar.gz sha256: 566e3818de97656990d302a916a2d6925db33c7765a762f36ba28dead03c34a8 + patches: + - patches/lld.patch build: - number: 0 + number: 1 requirements: build: From d2291317e34da27603f8933eec7407b42a884f2d Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Sat, 26 Oct 2024 01:08:04 +0000 Subject: [PATCH 291/333] Update ipython from 8.28.0 to 8.29.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 73b561b0a..29f0d5229 100644 --- a/recipes/recipes_emscripten/ipython/recipe.yaml +++ b/recipes/recipes_emscripten/ipython/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 8.28.0 + version: 8.29.0 package: name: ipython @@ -7,7 +7,7 @@ package: source: - url: https://pypi.io/packages/source/i/ipython/ipython-${{ version }}.tar.gz - sha256: 0d0d15ca1e01faeb868ef56bc7ee5a0de5bd66885735682e8a322ae289a13d1a + sha256: 40b60e15b22591450eef73e40a027cf77bd652e757523eebc5bd7c7c498290eb patches: - patches/0001-Patch-asyncio-tornado.patch From 25ec11c2b4d94fd2cad192137b1057503d3b9889 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <87052487+anutosh491@users.noreply.github.com> Date: Wed, 30 Oct 2024 21:49:21 +0530 Subject: [PATCH 292/333] Update llvm to 19.1.3 (#1403) Update llvm to 19.1.3 --- recipes/recipes_emscripten/llvm/recipe.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/recipes_emscripten/llvm/recipe.yaml b/recipes/recipes_emscripten/llvm/recipe.yaml index 50e33261e..e02a27ed0 100644 --- a/recipes/recipes_emscripten/llvm/recipe.yaml +++ b/recipes/recipes_emscripten/llvm/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 19.1.2 + version: 19.1.3 package: name: llvm @@ -8,13 +8,13 @@ package: source: url: https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-${{ version }}.tar.gz - sha256: 622cb6c5e95a3bb7e9876c4696a65671f235bd836cfd0c096b272f6c2ada41e7 + sha256: e5106e2bef341b3f5e41340e4b6c6a58259f4021ad801acf14e88f1a84567b05 patches: - patches/cross_compile.patch - patches/lldwasm_link.patch build: - number: 1 + number: 0 requirements: build: From 9f6640c6300be78adf08a314b8b70a7cb994f13c Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Wed, 6 Nov 2024 01:08:28 +0000 Subject: [PATCH 293/333] Update harfbuzz from 10.0.1 to 10.1.0 --- recipes/recipes_emscripten/harfbuzz/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/harfbuzz/recipe.yaml b/recipes/recipes_emscripten/harfbuzz/recipe.yaml index 8d82e2a15..50b4d1819 100644 --- a/recipes/recipes_emscripten/harfbuzz/recipe.yaml +++ b/recipes/recipes_emscripten/harfbuzz/recipe.yaml @@ -1,6 +1,6 @@ context: name: harfbuzz - version: 10.0.1 + version: 10.1.0 package: name: ${{ name }} @@ -8,7 +8,7 @@ package: source: url: https://github.com/${{ name }}/${{ name }}/archive/${{ version }}.tar.gz - sha256: e7358ea86fe10fb9261931af6f010d4358dac64f7074420ca9bc94aae2bdd542 + sha256: c758fdce8587641b00403ee0df2cd5d30cbea7803d43c65fddd76224f7b49b88 build: number: 0 From 4b171a46b85e7ff2bb4d217c930b74e6dd74d8a3 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Fri, 8 Nov 2024 01:10:01 +0000 Subject: [PATCH 294/333] Update astropy from 6.1.4 to 6.1.5 --- recipes/recipes_emscripten/astropy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/astropy/recipe.yaml b/recipes/recipes_emscripten/astropy/recipe.yaml index a8fac4e2c..8b4e0fd0c 100644 --- a/recipes/recipes_emscripten/astropy/recipe.yaml +++ b/recipes/recipes_emscripten/astropy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 6.1.4 + version: 6.1.5 package: name: astropy @@ -7,7 +7,7 @@ package: source: - url: https://pypi.io/packages/source/a/astropy/astropy-${{ version }}.tar.gz - sha256: 361558e2b093a99bebe69f1fd47fac86a192607a4c16ed39ba0a800b2ab60c34 + sha256: 9098dddd0946a6a39df622ecbf8704ed031cfb066381e9d960c0913c2db46b81 # patches: # - patches/skip_ep.patch From fc1b81dc5e573dd644d8a8636ba2142335881a2a Mon Sep 17 00:00:00 2001 From: Anutosh Bhat Date: Tue, 12 Nov 2024 19:28:38 +0530 Subject: [PATCH 295/333] LLVM : Skip undefined symbols at link step in Wasm.cpp (#1411) * Skip undefined symbols at link step * Attempt to speed up build * trying 2 parallel jobs --- recipes/recipes_emscripten/llvm/build.sh | 2 +- .../skip_undefined_symbols_at_link_step.patch | 13 +++++++++++++ recipes/recipes_emscripten/llvm/recipe.yaml | 3 ++- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch diff --git a/recipes/recipes_emscripten/llvm/build.sh b/recipes/recipes_emscripten/llvm/build.sh index d83391abd..9ea5c7725 100644 --- a/recipes/recipes_emscripten/llvm/build.sh +++ b/recipes/recipes_emscripten/llvm/build.sh @@ -25,7 +25,7 @@ emcmake cmake ${CMAKE_ARGS} -S ../llvm -B . \ -DCMAKE_CXX_FLAGS="-Dwait4=__syscall_wait4 -isystem $EMSCRIPTEN_FORGE_EMSDK_DIR/upstream/emscripten/cache/sysroot/include/c++/v1" # Build step -emmake make -j1 +emmake make -j2 # Install step emmake make install diff --git a/recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch b/recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch new file mode 100644 index 000000000..2732b734b --- /dev/null +++ b/recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch @@ -0,0 +1,13 @@ +diff --git a/clang/lib/Interpreter/Wasm.cpp b/clang/lib/Interpreter/Wasm.cpp +index 1001410aa0f2..fe9222b2658c 100644 +--- a/clang/lib/Interpreter/Wasm.cpp ++++ b/clang/lib/Interpreter/Wasm.cpp +@@ -79,6 +79,8 @@ llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) { + "--experimental-pic", + "--no-export-dynamic", + "--stack-first", ++ "--allow-undefined", ++ "--import-function=printf", + OutputFileName.c_str(), + "-o", + OutputFileName.c_str()}; diff --git a/recipes/recipes_emscripten/llvm/recipe.yaml b/recipes/recipes_emscripten/llvm/recipe.yaml index e02a27ed0..d051c844b 100644 --- a/recipes/recipes_emscripten/llvm/recipe.yaml +++ b/recipes/recipes_emscripten/llvm/recipe.yaml @@ -12,9 +12,10 @@ source: patches: - patches/cross_compile.patch - patches/lldwasm_link.patch + - patches/skip_undefined_symbols_at_link_step.patch build: - number: 0 + number: 1 requirements: build: From 0bb5ca02b0f5f2f1b198c91fb9b8f53714440a0c Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Tue, 12 Nov 2024 01:08:10 +0000 Subject: [PATCH 296/333] Update astropy from 6.1.5 to 6.1.6 --- recipes/recipes_emscripten/astropy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/astropy/recipe.yaml b/recipes/recipes_emscripten/astropy/recipe.yaml index 8b4e0fd0c..2759e071e 100644 --- a/recipes/recipes_emscripten/astropy/recipe.yaml +++ b/recipes/recipes_emscripten/astropy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 6.1.5 + version: 6.1.6 package: name: astropy @@ -7,7 +7,7 @@ package: source: - url: https://pypi.io/packages/source/a/astropy/astropy-${{ version }}.tar.gz - sha256: 9098dddd0946a6a39df622ecbf8704ed031cfb066381e9d960c0913c2db46b81 + sha256: 63e153747de7892138860925f0395de66d0bd036c69837f68bf93aeadaac6847 # patches: # - patches/skip_ep.patch From 733930a51400222784693397355da6e2c0094608 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat Date: Wed, 13 Nov 2024 08:09:00 +0530 Subject: [PATCH 297/333] Add patch to skip include new for CppInterOp (#1414) --- .../cppinterop/patches/new.patch | 15 +++++++++++++++ recipes/recipes_emscripten/cppinterop/recipe.yaml | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 recipes/recipes_emscripten/cppinterop/patches/new.patch diff --git a/recipes/recipes_emscripten/cppinterop/patches/new.patch b/recipes/recipes_emscripten/cppinterop/patches/new.patch new file mode 100644 index 000000000..41a6fd010 --- /dev/null +++ b/recipes/recipes_emscripten/cppinterop/patches/new.patch @@ -0,0 +1,15 @@ +diff --git a/lib/Interpreter/CppInterOpInterpreter.h b/lib/Interpreter/CppInterOpInterpreter.h +index e358406..760fec5 100644 +--- a/lib/Interpreter/CppInterOpInterpreter.h ++++ b/lib/Interpreter/CppInterOpInterpreter.h +@@ -148,8 +148,8 @@ public: + llvm::InitializeAllAsmPrinters(); + + std::vector vargs(argv + 1, argv + argc); +- vargs.push_back("-include"); +- vargs.push_back("new"); ++ // vargs.push_back("-include"); ++ // vargs.push_back("new"); + inner = compat::createClangInterpreter(vargs); + } + diff --git a/recipes/recipes_emscripten/cppinterop/recipe.yaml b/recipes/recipes_emscripten/cppinterop/recipe.yaml index 017aefa56..133a53fbe 100644 --- a/recipes/recipes_emscripten/cppinterop/recipe.yaml +++ b/recipes/recipes_emscripten/cppinterop/recipe.yaml @@ -10,9 +10,10 @@ source: sha256: 566e3818de97656990d302a916a2d6925db33c7765a762f36ba28dead03c34a8 patches: - patches/lld.patch + - patches/new.patch build: - number: 1 + number: 2 requirements: build: From dc2bf4d34d05915acc942b6b03a6a135f75bfd64 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat Date: Wed, 13 Nov 2024 14:23:21 +0530 Subject: [PATCH 298/333] Remove redundant flag from patch added for llvm (#1415) * Remove redundant flag from patch added for llvm * modified patch * fix CI --- recipes/recipes_emscripten/llvm/build.sh | 2 +- .../skip_undefined_symbols_at_link_step.patch | 16 ++++++++++++---- recipes/recipes_emscripten/llvm/recipe.yaml | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/recipes/recipes_emscripten/llvm/build.sh b/recipes/recipes_emscripten/llvm/build.sh index 9ea5c7725..32ea40395 100644 --- a/recipes/recipes_emscripten/llvm/build.sh +++ b/recipes/recipes_emscripten/llvm/build.sh @@ -25,7 +25,7 @@ emcmake cmake ${CMAKE_ARGS} -S ../llvm -B . \ -DCMAKE_CXX_FLAGS="-Dwait4=__syscall_wait4 -isystem $EMSCRIPTEN_FORGE_EMSDK_DIR/upstream/emscripten/cache/sysroot/include/c++/v1" # Build step -emmake make -j2 +emmake make -j4 # Install step emmake make install diff --git a/recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch b/recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch index 2732b734b..98e19ab3b 100644 --- a/recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch +++ b/recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch @@ -1,13 +1,21 @@ diff --git a/clang/lib/Interpreter/Wasm.cpp b/clang/lib/Interpreter/Wasm.cpp -index 1001410aa0f2..fe9222b2658c 100644 +index 1001410aa0f2..1dbf17d4d6f2 100644 --- a/clang/lib/Interpreter/Wasm.cpp +++ b/clang/lib/Interpreter/Wasm.cpp -@@ -79,6 +79,8 @@ llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) { +@@ -72,13 +72,14 @@ llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) { + OutputFile.close(); + + std::vector LinkerArgs = {"wasm-ld", +- "-pie", ++ "-shared", + "--import-memory", + "--no-entry", + "--export-all", "--experimental-pic", - "--no-export-dynamic", +- "--no-export-dynamic", ++ "--export-dynamic", "--stack-first", + "--allow-undefined", -+ "--import-function=printf", OutputFileName.c_str(), "-o", OutputFileName.c_str()}; diff --git a/recipes/recipes_emscripten/llvm/recipe.yaml b/recipes/recipes_emscripten/llvm/recipe.yaml index d051c844b..e452d9dc7 100644 --- a/recipes/recipes_emscripten/llvm/recipe.yaml +++ b/recipes/recipes_emscripten/llvm/recipe.yaml @@ -15,7 +15,7 @@ source: - patches/skip_undefined_symbols_at_link_step.patch build: - number: 1 + number: 2 requirements: build: From 73c27e374f9575ed2700d616de3ec8286dd44a31 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Wed, 13 Nov 2024 01:09:07 +0000 Subject: [PATCH 299/333] Update patsy from 0.5.6 to 1.0.0 --- recipes/recipes_emscripten/patsy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/patsy/recipe.yaml b/recipes/recipes_emscripten/patsy/recipe.yaml index 534f60fb8..10bd2e42a 100644 --- a/recipes/recipes_emscripten/patsy/recipe.yaml +++ b/recipes/recipes_emscripten/patsy/recipe.yaml @@ -1,6 +1,6 @@ context: name: patsy - version: 0.5.6 + version: 1.0.0 package: name: patsy @@ -9,7 +9,7 @@ package: source: - url: https://pypi.io/packages/source/${{ name[0] }}/${{ name }}/${{ name }}-${{ version }}.tar.gz - sha256: 95c6d47a7222535f84bff7f63d7303f2e297747a598db89cf5c67f0c0c7d2cdb + sha256: 787d2a5d15333fb1e4dc11331b2e7fd17d92f9a815db2fbca29b50c0e6c0159d build: number: 0 From 93f49cd195b8ea3e8b866bf3f92ee9bd3248786a Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Thu, 14 Nov 2024 01:09:07 +0000 Subject: [PATCH 300/333] Update highs from 1.8.0 to 1.8.1 --- recipes/recipes_emscripten/highs/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/highs/recipe.yaml b/recipes/recipes_emscripten/highs/recipe.yaml index 369de752d..aae5cea60 100644 --- a/recipes/recipes_emscripten/highs/recipe.yaml +++ b/recipes/recipes_emscripten/highs/recipe.yaml @@ -1,6 +1,6 @@ context: name: highs - version: 1.8.0 + version: 1.8.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: e184e63101cf19688a02102f58447acc7c021d77eef0d3475ceaceb61f035539 + sha256: a0d09371fadb56489497996b28433be1ef91a705e3811fcb1f50a107c7d427d1 build: number: 0 From cda77a24f187595924c42d7da49fe610d5ada966 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Wed, 13 Nov 2024 01:09:10 +0000 Subject: [PATCH 301/333] Update contourpy from 1.3.0 to 1.3.1 --- recipes/recipes_emscripten/contourpy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/contourpy/recipe.yaml b/recipes/recipes_emscripten/contourpy/recipe.yaml index 6983a009b..855754d49 100644 --- a/recipes/recipes_emscripten/contourpy/recipe.yaml +++ b/recipes/recipes_emscripten/contourpy/recipe.yaml @@ -1,6 +1,6 @@ context: name: contourpy - version: 1.3.0 + version: 1.3.1 package: name: ${{ name|lower }} @@ -8,7 +8,7 @@ package: source: - url: https://pypi.io/packages/source/c/contourpy/contourpy-${{ version }}.tar.gz - sha256: 7ffa0db17717a8ffb127efd0c95a4362d996b892c2904db72428d5b52e1938a4 + sha256: dfd97abd83335045a913e3bcc4a09c0ceadbe66580cf573fe961f4a825efa699 build: number: 0 From 20bcee0c869ef983f647fe1e14bdc2622a9ee556 Mon Sep 17 00:00:00 2001 From: Ian Thomas Date: Thu, 14 Nov 2024 09:56:28 +0000 Subject: [PATCH 302/333] Pin pybind11 < 2.13.6 --- recipes/recipes_emscripten/contourpy/build.sh | 2 -- recipes/recipes_emscripten/contourpy/recipe.yaml | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/recipes/recipes_emscripten/contourpy/build.sh b/recipes/recipes_emscripten/contourpy/build.sh index 0665f96db..2523ecd98 100644 --- a/recipes/recipes_emscripten/contourpy/build.sh +++ b/recipes/recipes_emscripten/contourpy/build.sh @@ -1,5 +1,3 @@ -#!/bin/bash - cp $RECIPE_DIR/emscripten.meson.cross $SRC_DIR echo "python = '${PYTHON}'" >> $SRC_DIR/emscripten.meson.cross diff --git a/recipes/recipes_emscripten/contourpy/recipe.yaml b/recipes/recipes_emscripten/contourpy/recipe.yaml index 855754d49..0286e5904 100644 --- a/recipes/recipes_emscripten/contourpy/recipe.yaml +++ b/recipes/recipes_emscripten/contourpy/recipe.yaml @@ -7,7 +7,7 @@ package: version: ${{ version }} source: -- url: https://pypi.io/packages/source/c/contourpy/contourpy-${{ version }}.tar.gz +- url: https://pypi.org/packages/source/c/contourpy/contourpy-${{ version }}.tar.gz sha256: dfd97abd83335045a913e3bcc4a09c0ceadbe66580cf573fe961f4a825efa699 build: @@ -19,7 +19,7 @@ requirements: - cross-python_${{target_platform}} - meson-python - pip >=24 - - pybind11 + - pybind11 <2.13.6 host: - python run: From ea33818cf5564e1ae6a9cbc6e6dd86a00424da53 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Fri, 15 Nov 2024 01:13:13 +0000 Subject: [PATCH 303/333] Update patsy from 1.0.0 to 1.0.1 --- recipes/recipes_emscripten/patsy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/patsy/recipe.yaml b/recipes/recipes_emscripten/patsy/recipe.yaml index 10bd2e42a..76939a275 100644 --- a/recipes/recipes_emscripten/patsy/recipe.yaml +++ b/recipes/recipes_emscripten/patsy/recipe.yaml @@ -1,6 +1,6 @@ context: name: patsy - version: 1.0.0 + version: 1.0.1 package: name: patsy @@ -9,7 +9,7 @@ package: source: - url: https://pypi.io/packages/source/${{ name[0] }}/${{ name }}/${{ name }}-${{ version }}.tar.gz - sha256: 787d2a5d15333fb1e4dc11331b2e7fd17d92f9a815db2fbca29b50c0e6c0159d + sha256: e786a9391eec818c054e359b737bbce692f051aee4c661f4141cc88fb459c0c4 build: number: 0 From a9bfbcc2f0273546ef5e0d3dbd99e198401643da Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Tue, 19 Nov 2024 17:03:24 +0100 Subject: [PATCH 304/333] Update lfortran from 0.41.0 to 0.42.0 (#1418) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/lfortran/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/lfortran/recipe.yaml b/recipes/recipes_emscripten/lfortran/recipe.yaml index 8476aad2e..ba68a40c3 100644 --- a/recipes/recipes_emscripten/lfortran/recipe.yaml +++ b/recipes/recipes_emscripten/lfortran/recipe.yaml @@ -1,6 +1,6 @@ context: name: lfortran - version: 0.41.0 + version: 0.42.0 package: name: ${{ name }} @@ -9,7 +9,7 @@ package: source: url: https://github.com/lfortran/lfortran/releases/download/v${{ version }}/${{ name }}-${{ version }}.tar.gz - sha256: edc37baa0714b283e6b36369d5bde85ad8bc6a6d335e9ded33ffea27496e1306 + sha256: 3144abce88da2bcfd39e2c5c655b1bc977c429f3e7dae58afbe45c0237f07298 build: number: 0 From 2a2662722352e5347f70b8e2defcf238152f5bb5 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat Date: Wed, 20 Nov 2024 00:34:18 +0530 Subject: [PATCH 305/333] Update llvm to 19.1.4 (#1420) * Update llvm to 19.1.4 --- .../llvm/patches/lldwasm_link.patch | 20 ------- .../skip_undefined_symbols_at_link_step.patch | 57 +++++++++++++++++-- recipes/recipes_emscripten/llvm/recipe.yaml | 7 +-- 3 files changed, 56 insertions(+), 28 deletions(-) delete mode 100644 recipes/recipes_emscripten/llvm/patches/lldwasm_link.patch diff --git a/recipes/recipes_emscripten/llvm/patches/lldwasm_link.patch b/recipes/recipes_emscripten/llvm/patches/lldwasm_link.patch deleted file mode 100644 index d2c1ced1f..000000000 --- a/recipes/recipes_emscripten/llvm/patches/lldwasm_link.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/clang/lib/Interpreter/CMakeLists.txt b/clang/lib/Interpreter/CMakeLists.txt -index 2cc7c59b61d3..d5ffe78251d2 100644 ---- a/clang/lib/Interpreter/CMakeLists.txt -+++ b/clang/lib/Interpreter/CMakeLists.txt -@@ -14,6 +14,7 @@ set(LLVM_LINK_COMPONENTS - - if (EMSCRIPTEN AND "lld" IN_LIST LLVM_ENABLE_PROJECTS) - set(WASM_SRC Wasm.cpp) -+ set(WASM_LINK lldWasm) - endif() - - add_clang_library(clangInterpreter -@@ -44,6 +45,7 @@ add_clang_library(clangInterpreter - clangParse - clangSema - clangSerialization -+ ${WASM_LINK} - ) - - if ((MINGW OR CYGWIN) AND BUILD_SHARED_LIBS) diff --git a/recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch b/recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch index 98e19ab3b..0fe82bc30 100644 --- a/recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch +++ b/recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch @@ -1,8 +1,35 @@ +diff --git a/clang/lib/Interpreter/IncrementalExecutor.h b/clang/lib/Interpreter/IncrementalExecutor.h +index 7954cde36588..dbd61f0b8b1e 100644 +--- a/clang/lib/Interpreter/IncrementalExecutor.h ++++ b/clang/lib/Interpreter/IncrementalExecutor.h +@@ -56,7 +56,7 @@ public: + virtual llvm::Error addModule(PartialTranslationUnit &PTU); + virtual llvm::Error removeModule(PartialTranslationUnit &PTU); + virtual llvm::Error runCtors() const; +- llvm::Error cleanUp(); ++ virtual llvm::Error cleanUp(); + llvm::Expected + getSymbolAddress(llvm::StringRef Name, SymbolNameKind NameKind) const; + +diff --git a/clang/lib/Interpreter/Interpreter.cpp b/clang/lib/Interpreter/Interpreter.cpp +index b4882ab5d223..985d0b7c0ef3 100644 +--- a/clang/lib/Interpreter/Interpreter.cpp ++++ b/clang/lib/Interpreter/Interpreter.cpp +@@ -192,8 +192,8 @@ IncrementalCompilerBuilder::CreateCpp() { + #ifdef __EMSCRIPTEN__ + Argv.push_back("-target"); + Argv.push_back("wasm32-unknown-emscripten"); +- Argv.push_back("-pie"); + Argv.push_back("-shared"); ++ Argv.push_back("-fvisibility=default"); + #endif + Argv.insert(Argv.end(), UserArgs.begin(), UserArgs.end()); + diff --git a/clang/lib/Interpreter/Wasm.cpp b/clang/lib/Interpreter/Wasm.cpp -index 1001410aa0f2..1dbf17d4d6f2 100644 +index 1001410aa0f2..56d215d00f58 100644 --- a/clang/lib/Interpreter/Wasm.cpp +++ b/clang/lib/Interpreter/Wasm.cpp -@@ -72,13 +72,14 @@ llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) { +@@ -72,13 +72,12 @@ llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) { OutputFile.close(); std::vector LinkerArgs = {"wasm-ld", @@ -10,12 +37,34 @@ index 1001410aa0f2..1dbf17d4d6f2 100644 + "-shared", "--import-memory", "--no-entry", - "--export-all", +- "--export-all", "--experimental-pic", - "--no-export-dynamic", -+ "--export-dynamic", "--stack-first", + "--allow-undefined", OutputFileName.c_str(), "-o", OutputFileName.c_str()}; +@@ -109,6 +108,10 @@ llvm::Error WasmIncrementalExecutor::runCtors() const { + return llvm::Error::success(); + } + ++llvm::Error WasmIncrementalExecutor::cleanUp() { ++ return llvm::Error::success(); ++} ++ + WasmIncrementalExecutor::~WasmIncrementalExecutor() = default; + + } // namespace clang +diff --git a/clang/lib/Interpreter/Wasm.h b/clang/lib/Interpreter/Wasm.h +index b1fd88024f14..4632613326d3 100644 +--- a/clang/lib/Interpreter/Wasm.h ++++ b/clang/lib/Interpreter/Wasm.h +@@ -28,6 +28,7 @@ public: + llvm::Error addModule(PartialTranslationUnit &PTU) override; + llvm::Error removeModule(PartialTranslationUnit &PTU) override; + llvm::Error runCtors() const override; ++ llvm::Error cleanUp() override; + + ~WasmIncrementalExecutor() override; + }; diff --git a/recipes/recipes_emscripten/llvm/recipe.yaml b/recipes/recipes_emscripten/llvm/recipe.yaml index e452d9dc7..497cfd3fa 100644 --- a/recipes/recipes_emscripten/llvm/recipe.yaml +++ b/recipes/recipes_emscripten/llvm/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 19.1.3 + version: 19.1.4 package: name: llvm @@ -8,14 +8,13 @@ package: source: url: https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-${{ version }}.tar.gz - sha256: e5106e2bef341b3f5e41340e4b6c6a58259f4021ad801acf14e88f1a84567b05 + sha256: 010e1fd3cabee8799bd2f8a6fbc68f28207494f315cf9da7057a2820f79fd531 patches: - patches/cross_compile.patch - - patches/lldwasm_link.patch - patches/skip_undefined_symbols_at_link_step.patch build: - number: 2 + number: 0 requirements: build: From 8c7bfcdfdad7d90a0f584f62a673e6d816c00706 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat Date: Thu, 21 Nov 2024 16:45:50 +0530 Subject: [PATCH 306/333] Attempt to fix output duplication through clang-repl (#1422) --- .../skip_undefined_symbols_at_link_step.patch | 47 ++++++++++++------- recipes/recipes_emscripten/llvm/recipe.yaml | 2 +- 2 files changed, 30 insertions(+), 19 deletions(-) diff --git a/recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch b/recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch index 0fe82bc30..e69ab09cb 100644 --- a/recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch +++ b/recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch @@ -11,25 +11,27 @@ index 7954cde36588..dbd61f0b8b1e 100644 llvm::Expected getSymbolAddress(llvm::StringRef Name, SymbolNameKind NameKind) const; -diff --git a/clang/lib/Interpreter/Interpreter.cpp b/clang/lib/Interpreter/Interpreter.cpp -index b4882ab5d223..985d0b7c0ef3 100644 ---- a/clang/lib/Interpreter/Interpreter.cpp -+++ b/clang/lib/Interpreter/Interpreter.cpp -@@ -192,8 +192,8 @@ IncrementalCompilerBuilder::CreateCpp() { - #ifdef __EMSCRIPTEN__ - Argv.push_back("-target"); - Argv.push_back("wasm32-unknown-emscripten"); -- Argv.push_back("-pie"); - Argv.push_back("-shared"); -+ Argv.push_back("-fvisibility=default"); - #endif - Argv.insert(Argv.end(), UserArgs.begin(), UserArgs.end()); - diff --git a/clang/lib/Interpreter/Wasm.cpp b/clang/lib/Interpreter/Wasm.cpp -index 1001410aa0f2..56d215d00f58 100644 +index 1001410aa0f2..c0297e0d3a05 100644 --- a/clang/lib/Interpreter/Wasm.cpp +++ b/clang/lib/Interpreter/Wasm.cpp -@@ -72,13 +72,12 @@ llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) { +@@ -37,6 +37,15 @@ WasmIncrementalExecutor::WasmIncrementalExecutor( + llvm::orc::ThreadSafeContext &TSC) + : IncrementalExecutor(TSC) {} + ++void removeGlobalInit(llvm::Module *M) { ++ std::string targetName = "_GLOBAL__sub_I_" + M->getName().str(); ++ for (auto &Func : *M) { ++ if (Func.hasName() && Func.getName().str() == targetName) { ++ Func.deleteBody(); ++ } ++ } ++} ++ + llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) { + std::string ErrorString; + +@@ -72,13 +81,13 @@ llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) { OutputFile.close(); std::vector LinkerArgs = {"wasm-ld", @@ -37,7 +39,7 @@ index 1001410aa0f2..56d215d00f58 100644 + "-shared", "--import-memory", "--no-entry", -- "--export-all", + "--export-all", "--experimental-pic", - "--no-export-dynamic", "--stack-first", @@ -45,7 +47,16 @@ index 1001410aa0f2..56d215d00f58 100644 OutputFileName.c_str(), "-o", OutputFileName.c_str()}; -@@ -109,6 +108,10 @@ llvm::Error WasmIncrementalExecutor::runCtors() const { +@@ -96,6 +105,8 @@ llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) { + "Failed to load incremental module", llvm::inconvertibleErrorCode()); + } + ++ removeGlobalInit(PTU.TheModule.get()); ++ + return llvm::Error::success(); + } + +@@ -109,6 +120,10 @@ llvm::Error WasmIncrementalExecutor::runCtors() const { return llvm::Error::success(); } diff --git a/recipes/recipes_emscripten/llvm/recipe.yaml b/recipes/recipes_emscripten/llvm/recipe.yaml index 497cfd3fa..c4101c0c2 100644 --- a/recipes/recipes_emscripten/llvm/recipe.yaml +++ b/recipes/recipes_emscripten/llvm/recipe.yaml @@ -14,7 +14,7 @@ source: - patches/skip_undefined_symbols_at_link_step.patch build: - number: 0 + number: 1 requirements: build: From 1002d570db84eb3d7ee54cbd9b95ce3ed300beb9 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat Date: Fri, 22 Nov 2024 13:44:54 +0530 Subject: [PATCH 307/333] Update CppInterOp's recipe based on llvm 19.1.4 (#1424) --- .../cppinterop/patches/lld.patch | 183 ++++++++++++------ .../recipes_emscripten/cppinterop/recipe.yaml | 3 +- 2 files changed, 121 insertions(+), 65 deletions(-) diff --git a/recipes/recipes_emscripten/cppinterop/patches/lld.patch b/recipes/recipes_emscripten/cppinterop/patches/lld.patch index 0fc1f1dcc..f1273ec98 100644 --- a/recipes/recipes_emscripten/cppinterop/patches/lld.patch +++ b/recipes/recipes_emscripten/cppinterop/patches/lld.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index bcd16a9..ab4f254 100644 +index bcd16a9..8060d9f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,11 +24,28 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) @@ -122,74 +122,129 @@ index bcd16a9..ab4f254 100644 endif () # Fixes "C++ exception handler used, but unwind semantics are not enabled" warning Windows -@@ -378,6 +442,9 @@ endif() - if (TARGET clang-headers) - list(APPEND LLVM_COMMON_DEPENDS clang-headers) - endif() -+if (TARGET lld-headers) # Check for LLD headers -+ list(APPEND LLVM_COMMON_DEPENDS lld-headers) -+endif() - - # Generate docs for CppInterOp - option(CPPINTEROP_INCLUDE_DOCS "Generate build targets for the CppInterOp docs.") diff --git a/lib/Interpreter/CMakeLists.txt b/lib/Interpreter/CMakeLists.txt -index 7f4ca53..ee87c5f 100644 +index 7f4ca53..a151d96 100644 --- a/lib/Interpreter/CMakeLists.txt +++ b/lib/Interpreter/CMakeLists.txt -@@ -6,6 +6,12 @@ set(LLVM_LINK_COMPONENTS - OrcJit - Support - ) -+ -+if(EMSCRIPTEN) -+ list(APPEND LLVM_LINK_COMPONENTS MC TargetParser WebAssembly) -+ set(WASM_LINK lldWasm) -+endif() -+ - # FIXME: Investigate why this needs to be conditionally included. - if ("LLVMFrontendDriver" IN_LIST LLVM_AVAILABLE_LIBS) - list(APPEND LLVM_LINK_COMPONENTS FrontendDriver) -@@ -41,8 +47,18 @@ set(link_libs - clangFrontend - clangLex - clangSema -+ ${WASM_LINK} - ) +@@ -1,108 +1,22 @@ +-set(LLVM_LINK_COMPONENTS +- ${LLVM_TARGETS_TO_BUILD} +- BinaryFormat +- Core +- Object +- OrcJit +- Support +-) +-# FIXME: Investigate why this needs to be conditionally included. +-if ("LLVMFrontendDriver" IN_LIST LLVM_AVAILABLE_LIBS) +- list(APPEND LLVM_LINK_COMPONENTS FrontendDriver) +-endif() +-if ("LLVMOrcDebugging" IN_LIST LLVM_AVAILABLE_LIBS) +- list(APPEND LLVM_LINK_COMPONENTS OrcDebugging) +-endif() ++set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE) ++set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-s SIDE_MODULE=1 -s EXPORT_ALL=1 -s LINKABLE=1") ++set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-s SIDE_MODULE=1 -s EXPORT_ALL=1 -s LINKABLE=1") ++set(CMAKE_STRIP FALSE) ++ ++add_llvm_library(clangCppInterOp ++ SHARED -+ -+if(EMSCRIPTEN) -+ # Map LLVM components to their corresponding library names -+ llvm_map_components_to_libnames(llvm_libs ${LLVM_LINK_COMPONENTS}) -+ -+ # Append llvm_libs to your existing link_libs -+ list(APPEND link_libs ${llvm_libs}) -+endif() -+ - if(NOT WIN32) - list(APPEND link_libs dl) - endif() -@@ -102,6 +118,24 @@ add_llvm_library(clangCppInterOp - ${link_libs} - ) +-set(DLM ++ CppInterOp.cpp + DynamicLibraryManager.cpp + DynamicLibraryManagerSymbol.cpp + Paths.cpp +-) +-if (USE_CLING) +- set(LLVM_OPTIONAL_SOURCES ${LLVM_OPTIONAL_SOURCES} ${DLM}) +- set(DLM) +-endif(USE_CLING) +-if (USE_REPL) +- #Use DML optional sources +-endif(USE_REPL) +- +-if (USE_CLING) +- set(cling_clang_interp clingInterpreter) +-endif() +-if (USE_REPL) +- set(cling_clang_interp clangInterpreter) +-endif() +- +-set(link_libs +- ${cling_clang_interp} +- clangAST +- clangBasic +- clangFrontend +- clangLex +- clangSema +- ) + +- if(NOT WIN32) +- list(APPEND link_libs dl) +- endif() +- +-# Get rid of libLLVM-X.so which is appended to the list of static libraries. +-if (LLVM_LINK_LLVM_DYLIB) +- set(new_libs ${link_libs}) +- set(libs ${new_libs}) +- while(NOT "${new_libs}" STREQUAL "") +- foreach(lib ${new_libs}) +- if(TARGET ${lib}) +- get_target_property(transitive_libs ${lib} INTERFACE_LINK_LIBRARIES) +- if (NOT transitive_libs) +- continue() +- endif() +- foreach(transitive_lib ${transitive_libs}) +- get_target_property(lib_type ${transitive_lib} TYPE) +- if("${lib_type}" STREQUAL "STATIC_LIBRARY") +- list(APPEND static_transitive_libs ${transitive_lib}) +- else() +- # Filter our libLLVM.so and friends. +- continue() +- endif() +- if(NOT ${transitive_lib} IN_LIST libs) +- list(APPEND newer_libs ${transitive_lib}) +- list(APPEND libs ${transitive_lib}) +- endif() +- endforeach(transitive_lib) +- # Update the target properties with the list of only static libraries. +- set_target_properties(${lib} PROPERTIES INTERFACE_LINK_LIBRARIES "${static_transitive_libs}") +- set(static_transitive_libs "") +- endif() +- endforeach(lib) +- set(new_libs ${newer_libs}) +- set(newer_libs "") +- endwhile() +- # We just got rid of the libLLVM.so and other components shipped as shared +- # libraries, we need to make up for the missing dependency. +- list(APPEND LLVM_LINK_COMPONENTS +- Coverage +- FrontendHLSL +- LTO +- ) +- # We will need to append the missing dependencies to pull in the right +- # LLVM library dependencies. +- list(APPEND link_libs +- clangCodeGen +- clangStaticAnalyzerCore +- ) +-endif(LLVM_LINK_LLVM_DYLIB) +- +-add_llvm_library(clangCppInterOp +- DISABLE_LLVM_LINK_LLVM_DYLIB +- CppInterOp.cpp +- ${DLM} ++ # Additional libraries from Clang and LLD + LINK_LIBS +- ${link_libs} +- ) ++ clangInterpreter ++) -+if(EMSCRIPTEN) -+ target_link_libraries(clangCppInterOp PRIVATE embind) -+ -+ target_link_options(clangCppInterOp PRIVATE -+ -O1 -+ -sMODULARIZE -+ -sEXPORT_ES6=1 -+ -sASSERTIONS -+ -sALLOW_MEMORY_GROWTH=1 -+ -sINITIAL_MEMORY=128MB -+ -sTOTAL_STACK=32MB -+ -sMAIN_MODULE=1 -+ -sEXPORTED_RUNTIME_METHODS=ccall,cwrap,stringToNewUTF8,getValue,setValue -+ -sEXPORTED_FUNCTIONS=_malloc,_free,__ZTIN10emscripten3valE -+ --preload-file ${EMSCRIPTEN_SYSROOT}/@/ -+ ) -+endif() -+ string(REPLACE ";" "\;" _VER CPPINTEROP_VERSION) set_source_files_properties(CppInterOp.cpp PROPERTIES COMPILE_DEFINITIONS "LLVM_BINARY_DIR=\"${LLVM_BINARY_DIR}\";CPPINTEROP_VERSION=\"${_VAR}\"" +-) ++) +\ No newline at end of file diff --git a/recipes/recipes_emscripten/cppinterop/recipe.yaml b/recipes/recipes_emscripten/cppinterop/recipe.yaml index 133a53fbe..8dbdf8164 100644 --- a/recipes/recipes_emscripten/cppinterop/recipe.yaml +++ b/recipes/recipes_emscripten/cppinterop/recipe.yaml @@ -13,7 +13,7 @@ source: - patches/new.patch build: - number: 2 + number: 3 requirements: build: @@ -44,3 +44,4 @@ extra: - alexander-penev - vgvassilev - mcbarton + - anutosh491 From df3feba55e8538fab8443f6d34a3d04227078366 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat Date: Fri, 22 Nov 2024 17:21:17 +0530 Subject: [PATCH 308/333] Fix wasm-ld flags for creating correct shared wasm binaries (#1423) --- .../skip_undefined_symbols_at_link_step.patch | 41 ++----------------- recipes/recipes_emscripten/llvm/recipe.yaml | 2 +- 2 files changed, 5 insertions(+), 38 deletions(-) diff --git a/recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch b/recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch index e69ab09cb..50ff0590b 100644 --- a/recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch +++ b/recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch @@ -12,51 +12,18 @@ index 7954cde36588..dbd61f0b8b1e 100644 getSymbolAddress(llvm::StringRef Name, SymbolNameKind NameKind) const; diff --git a/clang/lib/Interpreter/Wasm.cpp b/clang/lib/Interpreter/Wasm.cpp -index 1001410aa0f2..c0297e0d3a05 100644 +index 1001410aa0f2..ef0b54d7884b 100644 --- a/clang/lib/Interpreter/Wasm.cpp +++ b/clang/lib/Interpreter/Wasm.cpp -@@ -37,6 +37,15 @@ WasmIncrementalExecutor::WasmIncrementalExecutor( - llvm::orc::ThreadSafeContext &TSC) - : IncrementalExecutor(TSC) {} - -+void removeGlobalInit(llvm::Module *M) { -+ std::string targetName = "_GLOBAL__sub_I_" + M->getName().str(); -+ for (auto &Func : *M) { -+ if (Func.hasName() && Func.getName().str() == targetName) { -+ Func.deleteBody(); -+ } -+ } -+} -+ - llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) { - std::string ErrorString; - -@@ -72,13 +81,13 @@ llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) { - OutputFile.close(); - - std::vector LinkerArgs = {"wasm-ld", -- "-pie", -+ "-shared", - "--import-memory", - "--no-entry", - "--export-all", +@@ -79,6 +79,7 @@ llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) { "--experimental-pic", -- "--no-export-dynamic", + "--no-export-dynamic", "--stack-first", + "--allow-undefined", OutputFileName.c_str(), "-o", OutputFileName.c_str()}; -@@ -96,6 +105,8 @@ llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) { - "Failed to load incremental module", llvm::inconvertibleErrorCode()); - } - -+ removeGlobalInit(PTU.TheModule.get()); -+ - return llvm::Error::success(); - } - -@@ -109,6 +120,10 @@ llvm::Error WasmIncrementalExecutor::runCtors() const { +@@ -109,6 +110,10 @@ llvm::Error WasmIncrementalExecutor::runCtors() const { return llvm::Error::success(); } diff --git a/recipes/recipes_emscripten/llvm/recipe.yaml b/recipes/recipes_emscripten/llvm/recipe.yaml index c4101c0c2..dbb9a9e4b 100644 --- a/recipes/recipes_emscripten/llvm/recipe.yaml +++ b/recipes/recipes_emscripten/llvm/recipe.yaml @@ -14,7 +14,7 @@ source: - patches/skip_undefined_symbols_at_link_step.patch build: - number: 1 + number: 2 requirements: build: From 27c9091f9993c76b60c42c25a87d3b227b77de65 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Sat, 23 Nov 2024 01:11:58 +0000 Subject: [PATCH 309/333] Update astropy from 6.1.6 to 6.1.7 --- recipes/recipes_emscripten/astropy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/astropy/recipe.yaml b/recipes/recipes_emscripten/astropy/recipe.yaml index 2759e071e..8dc26b0e5 100644 --- a/recipes/recipes_emscripten/astropy/recipe.yaml +++ b/recipes/recipes_emscripten/astropy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 6.1.6 + version: 6.1.7 package: name: astropy @@ -7,7 +7,7 @@ package: source: - url: https://pypi.io/packages/source/a/astropy/astropy-${{ version }}.tar.gz - sha256: 63e153747de7892138860925f0395de66d0bd036c69837f68bf93aeadaac6847 + sha256: a405ac186306b6cb152e6df2f7444ab8bd764e4127d7519da1b3ae4dd65357ef # patches: # - patches/skip_ep.patch From d0322472d3f5cb63932f3460358e5cf25917020c Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Sat, 23 Nov 2024 01:10:53 +0000 Subject: [PATCH 310/333] Update wrapt from 1.16.0 to 1.17.0 --- recipes/recipes_emscripten/wrapt/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/wrapt/recipe.yaml b/recipes/recipes_emscripten/wrapt/recipe.yaml index ccaf62e28..858a95f92 100644 --- a/recipes/recipes_emscripten/wrapt/recipe.yaml +++ b/recipes/recipes_emscripten/wrapt/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 1.16.0 + version: 1.17.0 package: name: wrapt @@ -7,7 +7,7 @@ package: source: - url: https://pypi.io/packages/source/w/wrapt/wrapt-${{ version }}.tar.gz - sha256: 5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d + sha256: 16187aa2317c731170a88ef35e8937ae0f533c402872c1ee5e6d079fcf320801 build: number: 0 From a71bd5abc2f36234c26e1b51ab3e92fd1ba4dcac Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Sun, 24 Nov 2024 01:16:54 +0000 Subject: [PATCH 311/333] Update r-base from 4.4.1 to 4.4.2 --- recipes/recipes_emscripten/r-base/recipe.yaml | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/recipes/recipes_emscripten/r-base/recipe.yaml b/recipes/recipes_emscripten/r-base/recipe.yaml index 270c98a06..578d147d1 100644 --- a/recipes/recipes_emscripten/r-base/recipe.yaml +++ b/recipes/recipes_emscripten/r-base/recipe.yaml @@ -1,6 +1,6 @@ context: - name: "r-base" - version: 4.4.1 + name: r-base + version: 4.4.2 package: name: ${{ name }} @@ -8,51 +8,51 @@ package: source: url: https://cran.r-project.org/src/base/R-4/R-${{ version }}.tar.gz - sha256: b4cb675deaaeb7299d3b265d218cde43f192951ce5b89b7bb1a5148a36b2d94d + sha256: 1578cd603e8d866b58743e49d8bf99c569e81079b6a60cf33cdf7bdffeb817ec patches: - - patches/0001-Fix-bad-substitution-error.patch - - patches/0002-Disable-libcurl.patch - - patches/0003-Remove-unsupported-sigsuspend.patch - - patches/0004-Disable-internet-module.patch - - patches/0005-Use-R-binary-from-build-prefix.patch - - patches/0006-Ignore-crude-heuristic-file-size.patch - - patches/0007-Build-docs-with-Rscript-binary.patch - - patches/0008-Set-default-R_Home.patch - - patches/0009-Use-basenames-for-compilers.patch - - patches/0010-Fix-iconv-checks-when-using-internal-lapack-blas.patch - - patches/0011-Build-with-fPIC-only-modules-that-need-it.patch - - patches/0012-Build-with-atomics-and-bulkmemory.patch + - patches/0001-Fix-bad-substitution-error.patch + - patches/0002-Disable-libcurl.patch + - patches/0003-Remove-unsupported-sigsuspend.patch + - patches/0004-Disable-internet-module.patch + - patches/0005-Use-R-binary-from-build-prefix.patch + - patches/0006-Ignore-crude-heuristic-file-size.patch + - patches/0007-Build-docs-with-Rscript-binary.patch + - patches/0008-Set-default-R_Home.patch + - patches/0009-Use-basenames-for-compilers.patch + - patches/0010-Fix-iconv-checks-when-using-internal-lapack-blas.patch + - patches/0011-Build-with-fPIC-only-modules-that-need-it.patch + - patches/0012-Build-with-atomics-and-bulkmemory.patch build: number: 3 requirements: build: - - ${{ compiler('c') }} - - ${{ compiler('cxx') }} - - libtool - - pkg-config - - cmake - - make - - r-base == ${{ version }} # for R and Rscript binaries (See patches) + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + - libtool + - pkg-config + - cmake + - make + - r-base == ${{ version }} # for R and Rscript binaries (See patches) host: - - libflang # for FortranRuntime - - libiconv - - zlib>=1.2.13 - - bzip2 - - xz # for lzma - - pcre2>=10.43 - - tzdata - - libpng - - libtiff + - libflang # for FortranRuntime + - libiconv + - zlib>=1.2.13 + - bzip2 + - xz # for lzma + - pcre2>=10.43 + - tzdata + - libpng + - libtiff # TODO: add cairo and pango once available tests: - script: - - node ${PREFIX}/lib/R/bin/Rscript --version + - node ${PREFIX}/lib/R/bin/Rscript --version requirements: build: - - nodejs + - nodejs about: homepage: http://www.r-project.org/ @@ -63,4 +63,4 @@ about: extra: recipe-maintainers: - - IsabelParedes + - IsabelParedes From 70f89ffe17e30e0240d636b54c8c0cb622155da8 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Tue, 13 Aug 2024 01:03:19 +0000 Subject: [PATCH 312/333] Update matplotlib from 3.9.1 to 3.9.2 --- .../recipes_emscripten/matplotlib/recipe.yaml | 104 +++++++++--------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/recipes/recipes_emscripten/matplotlib/recipe.yaml b/recipes/recipes_emscripten/matplotlib/recipe.yaml index b351954ae..dc4aaa0fa 100644 --- a/recipes/recipes_emscripten/matplotlib/recipe.yaml +++ b/recipes/recipes_emscripten/matplotlib/recipe.yaml @@ -1,10 +1,10 @@ context: name: matplotlib - version: "3.9.1" + version: 3.9.2 source: - url: https://github.com/matplotlib/matplotlib/archive/v${{ version }}.tar.gz - sha256: 4fdf46dc325fdf4cbc61f7fa66de7b48287df0a71b3442b63ff0784041cae2e7 + sha256: 9c49b6683a34469e6d20864c7d5b975c4f29d7c60de1ce857980bead48769c3f patches: - patches/fix-threading-and-font-cache.patch @@ -12,64 +12,64 @@ build: number: 0 outputs: - - package: - name: matplotlib-base - version: ${{ version }} +- package: + name: matplotlib-base + version: ${{ version }} + build: + script: build-base.sh + requirements: build: - script: build-base.sh - requirements: - build: - - python - - pip - - cross-python_${{ target_platform }} + - python + - pip + - cross-python_${{ target_platform }} - - ${{ compiler('c') }} - - ${{ compiler('cxx') }} - - pkg-config - - meson-python + - ${{ compiler('c') }} + - ${{ compiler('cxx') }} + - pkg-config + - meson-python - - setuptools_scm_git_archive + - setuptools_scm_git_archive # to template the emscripten.meson.cross file - - sed + - sed - host: - - python - - numpy - - pybind11 - - freetype - - qhull + host: + - python + - numpy + - pybind11 + - freetype + - qhull - run: - - contourpy - - cycler - - fonttools - - kiwisolver - - numpy - - packaging - - pillow - - pyparsing - - python-dateutil - - pytz + run: + - contourpy + - cycler + - fonttools + - kiwisolver + - numpy + - packaging + - pillow + - pyparsing + - python-dateutil + - pytz - - package: - name: matplotlib - version: ${{ version }} +- package: + name: matplotlib + version: ${{ version }} + requirements: + host: + - python + run: + - python + - ${{ pin_subpackage('matplotlib-base', exact=True) }} + + tests: + - script: pytester + files: + recipe: + - test_import_matplotlib.py requirements: - host: - - python + build: + - pytester run: - - python - - ${{ pin_subpackage('matplotlib-base', exact=True) }} - - tests: - - script: pytester - files: - recipe: - - test_import_matplotlib.py - requirements: - build: - - pytester - run: - - pytester-run + - pytester-run From d0055308b07511250b188d25aa8937f765e40680 Mon Sep 17 00:00:00 2001 From: Ian Thomas Date: Mon, 25 Nov 2024 09:56:47 +0000 Subject: [PATCH 313/333] Update patch --- .../pybind11/patches/0001-no-bitsize-check.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/recipes_emscripten/pybind11/patches/0001-no-bitsize-check.patch b/recipes/recipes_emscripten/pybind11/patches/0001-no-bitsize-check.patch index bed5b03ab..3d9b57a1b 100644 --- a/recipes/recipes_emscripten/pybind11/patches/0001-no-bitsize-check.patch +++ b/recipes/recipes_emscripten/pybind11/patches/0001-no-bitsize-check.patch @@ -11,16 +11,16 @@ diff --git a/tools/FindPythonLibsNew.cmake b/tools/FindPythonLibsNew.cmake index ce558d4e..74d59d21 100644 --- a/tools/FindPythonLibsNew.cmake +++ b/tools/FindPythonLibsNew.cmake -@@ -182,7 +182,8 @@ _pybind11_get_if_undef(_PYTHON_VALUES 9 PYTHON_MULTIARCH) +@@ -205,7 +205,8 @@ _pybind11_get_if_undef(_PYTHON_VALUES 9 PYTHON_MULTIARCH) # Make sure the Python has the same pointer-size as the chosen compiler # Skip if CMAKE_SIZEOF_VOID_P is not defined # This should be skipped for (non-Apple) cross-compiles (like EMSCRIPTEN) --if(NOT CMAKE_CROSSCOMPILING +-if(NOT _PYBIND11_CROSSCOMPILING +if(NOT EMSCRIPTEN + AND NOT CMAKE_CROSSCOMPILING AND CMAKE_SIZEOF_VOID_P AND (NOT "${PYTHON_SIZEOF_VOID_P}" STREQUAL "${CMAKE_SIZEOF_VOID_P}")) if(PythonLibsNew_FIND_REQUIRED) --- +--- 2.41.0 From 665db6a5b404c67c1363132b2bb93dd9ab19d541 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Mon, 19 Aug 2024 01:02:40 +0000 Subject: [PATCH 314/333] Update numpy from 2.0.1 to 2.1.0 --- 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 777003812..75ed16804 100644 --- a/recipes/recipes_emscripten/numpy/recipe.yaml +++ b/recipes/recipes_emscripten/numpy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.0.1 + version: 2.1.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: 485b87235796410c3519a699cfe1faab097e509e90ebb05dcd098db2ae87e7b3 + sha256: 7dc90da0081f7e1da49ec4e398ede6a8e9cc4f5ebe5f9e06b443ed889ee9aaa2 build: number: 0 From 1692bf086fd2981b09e40bb936679153b46b79f4 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Mon, 25 Nov 2024 14:41:59 +0100 Subject: [PATCH 315/333] Update r-base (#1425) * Bump version * Remove r-base dependency in build env * Add dependencies for native build * Update patches * Update pre.js * Update build instructions * Clean up * Bump build number --- recipes/recipes_emscripten/r-base/build.sh | 128 +++++++++++------- .../r-base/cross_libraries.sh | 51 +++++++ ...cripten-platform-to-configure-script.patch | 128 ++++++++++++++++++ .../0001-Fix-bad-substitution-error.patch | 45 ------ .../r-base/patches/0002-Disable-libcurl.patch | 12 +- ...tch => 0003-Disable-internet-module.patch} | 6 +- .../0003-Remove-unsupported-sigsuspend.patch | 23 ---- ...cks-when-using-internal-lapack-blas.patch} | 10 +- ...nd-stub-for-Emscripten-compatibility.patch | 39 ++++++ .../0005-Use-R-binary-from-build-prefix.patch | 54 -------- ...-with-fPIC-the-modules-that-need-it.patch} | 6 +- ...006-Ignore-crude-heuristic-file-size.patch | 22 --- .../0007-Build-docs-with-Rscript-binary.patch | 86 ------------ .../0007-Disable-which-for-emscripten.patch | 22 +++ .../patches/0008-Set-default-R_Home.patch | 24 ---- ...pt-executable-when-building-the-docs.patch | 61 +++++++++ .../0009-Use-basenames-for-compilers.patch | 85 ------------ .../0009-Use-source-files-directly.patch | 92 +++++++++++++ ...re-warnings-when-building-Rdts-files.patch | 33 +++++ ...ibraries-script-when-cross-compiling.patch | 26 ++++ ...12-Build-with-atomics-and-bulkmemory.patch | 37 ----- .../patches/0012-Install-wasm-files.patch | 34 +++++ recipes/recipes_emscripten/r-base/pre.js | 5 +- recipes/recipes_emscripten/r-base/recipe.yaml | 38 ++++-- 24 files changed, 612 insertions(+), 455 deletions(-) create mode 100755 recipes/recipes_emscripten/r-base/cross_libraries.sh create mode 100644 recipes/recipes_emscripten/r-base/patches/0001-Add-emscripten-platform-to-configure-script.patch delete mode 100644 recipes/recipes_emscripten/r-base/patches/0001-Fix-bad-substitution-error.patch rename recipes/recipes_emscripten/r-base/patches/{0004-Disable-internet-module.patch => 0003-Disable-internet-module.patch} (87%) delete mode 100644 recipes/recipes_emscripten/r-base/patches/0003-Remove-unsupported-sigsuspend.patch rename recipes/recipes_emscripten/r-base/patches/{0010-Fix-iconv-checks-when-using-internal-lapack-blas.patch => 0004-Fix-iconv-checks-when-using-internal-lapack-blas.patch} (73%) create mode 100644 recipes/recipes_emscripten/r-base/patches/0005-Add-sigsuspend-stub-for-Emscripten-compatibility.patch delete mode 100644 recipes/recipes_emscripten/r-base/patches/0005-Use-R-binary-from-build-prefix.patch rename recipes/recipes_emscripten/r-base/patches/{0011-Build-with-fPIC-only-modules-that-need-it.patch => 0006-Build-with-fPIC-the-modules-that-need-it.patch} (95%) delete mode 100644 recipes/recipes_emscripten/r-base/patches/0006-Ignore-crude-heuristic-file-size.patch delete mode 100644 recipes/recipes_emscripten/r-base/patches/0007-Build-docs-with-Rscript-binary.patch create mode 100644 recipes/recipes_emscripten/r-base/patches/0007-Disable-which-for-emscripten.patch delete mode 100644 recipes/recipes_emscripten/r-base/patches/0008-Set-default-R_Home.patch create mode 100644 recipes/recipes_emscripten/r-base/patches/0008-Use-linux-Rscript-executable-when-building-the-docs.patch delete mode 100644 recipes/recipes_emscripten/r-base/patches/0009-Use-basenames-for-compilers.patch create mode 100644 recipes/recipes_emscripten/r-base/patches/0009-Use-source-files-directly.patch create mode 100644 recipes/recipes_emscripten/r-base/patches/0010-Ignore-warnings-when-building-Rdts-files.patch create mode 100644 recipes/recipes_emscripten/r-base/patches/0011-Use-cross_libraries-script-when-cross-compiling.patch delete mode 100644 recipes/recipes_emscripten/r-base/patches/0012-Build-with-atomics-and-bulkmemory.patch create mode 100644 recipes/recipes_emscripten/r-base/patches/0012-Install-wasm-files.patch diff --git a/recipes/recipes_emscripten/r-base/build.sh b/recipes/recipes_emscripten/r-base/build.sh index 1b70c8fb3..f4485fe51 100644 --- a/recipes/recipes_emscripten/r-base/build.sh +++ b/recipes/recipes_emscripten/r-base/build.sh @@ -25,59 +25,93 @@ export ac_cv_have_decl_getrlimit=no export ac_cv_have_decl_sigaltstack=no export ac_cv_have_decl_wcsftime=no export ac_cv_have_decl_umask=no +export ac_cv_have_decl_sched_getaffinity=no +export ac_cv_have_decl_sched_setaffinity=no # SIDE_MODULE + pthread is experimental, and pthread_kill is not implemented export r_cv_search_pthread_kill=no -export OBJDUMP=llvm-objdump - # Otherwise set to .not_implemented and cannot be used export SHLIB_EXT=".so" -mkdir _build -cp $RECIPE_DIR/config.site _build/config.site -cd _build - -# NOTE: the host and build systems are explicitly set to enable the cross- -# compiling options even though it's not fully supported. -# Otherwise, it assumes it's not cross-compiling. -emconfigure ../configure \ - --prefix=$PREFIX \ - --build="x86_64-conda-linux-gnu" \ - --host="wasm32-unknown-emscripten" \ - --enable-R-static-lib \ - --without-readline \ - --without-x \ - --enable-java=no \ - --enable-R-profiling=no \ - --enable-byte-compiled-packages=no \ - --disable-rpath \ - --disable-openmp \ - --disable-nls \ - --with-internal-tzcode \ - --with-recommended-packages=no \ -|| cat config.log - -# NOTE: Remove the -lFortranRuntime from the FLIBS to avoid double-linking -# when creating the R binary -echo "FLIBS =" >> Makeconf - -emmake make -j${CPU_COUNT} -emmake make install - -# FIXME: The database files for the internal modules are installed in a "help" -# directory, this copies them to the expected location. It also helps avoid -# packaging r-base files in other R packages when using cross-r-base. -pushd $PREFIX/lib/R/library - for pkg in $(ls); do - if [ "$pkg" == "datasets" ]; then - cp -n ${BUILD_PREFIX}/lib/R/library/$pkg/data/* $pkg/data/ - elif [ -d $pkg/help ]; then - cp -n $pkg/help/$pkg.rd* $pkg/R/ - fi - done +export CONFIG_ARGS="--enable-R-static-lib \ +--without-readline \ +--without-x \ +--enable-java=no \ +--enable-R-profiling=no \ +--enable-byte-compiled-packages=no \ +--disable-rpath \ +--disable-openmp \ +--disable-nls \ +--with-internal-tzcode \ +--with-libdeflate-compression=no \ +--with-recommended-packages=no" + +#------------------------------------------------------------------------------- +# LINUX BUILD +#------------------------------------------------------------------------------- +# Building R for Linux so that we can use the R and Rscript binaries to build +# the R internal modules for WebAssembly. + +mkdir -p _build_linux +pushd _build_linux +( + # export PREFIX=$BUILD_PREFIX + export CC=gcc + export CXX=g++ + export FC=flang-new + export CPPFLAGS="-I$BUILD_PREFIX/include" + export LDFLAGS="-L$BUILD_PREFIX/lib" + export FC_LEN_T=size_t + + unset CROSS_COMPILING + + ../configure \ + --prefix=$BUILD_PREFIX \ + $CONFIG_ARGS + + make -j${CPU_COUNT} + # No need to install, we just need the R binary +) popd -# Manually copying .wasm files -cp src/main/R.* $PREFIX/lib/R/bin/exec/ -cp src/unix/Rscript.wasm $PREFIX/lib/R/bin/ +#------------------------------------------------------------------------------- +# WASM BUILD +#------------------------------------------------------------------------------- +# Building R for WebAssembly using the R binary from the Linux build. + +# libz.so has an invalid ELF header which causes an error when looking for +# opendir during the configure step. Link with libz.a instead. +rm $PREFIX/lib/libz.so* || true + +mkdir -p _build_wasm +pushd _build_wasm +( + cp $RECIPE_DIR/config.site . + + export CROSS_COMPILING="true" + export R_EXECUTABLE=$(realpath ..)/_build_linux/bin/exec/R # binary not shell wrapper + export R_SCRIPT_EXECUTABLE=$(realpath ..)/_build_linux/bin/Rscript + export LINUX_BUILD_DIR=$(realpath ..)/_build_linux + + # NOTE: the host and build systems are explicitly set to enable the cross- + # compiling options even though it's not fully supported. + # Otherwise, it assumes it's not cross-compiling. + emconfigure ../configure \ + --prefix=$PREFIX \ + --build="x86_64-conda-linux-gnu" \ + --host="wasm32-unknown-emscripten" \ + $CONFIG_ARGS + + # NOTE: Remove the -lFortranRuntime from the FLIBS to avoid double-linking + # when creating the R binary + echo "FLIBS =" >> Makeconf + + emmake make -j${CPU_COUNT} + + $RECIPE_DIR/cross_libraries.sh --restore $(pwd) + + emmake make install + +) +popd diff --git a/recipes/recipes_emscripten/r-base/cross_libraries.sh b/recipes/recipes_emscripten/r-base/cross_libraries.sh new file mode 100755 index 000000000..580e9e1ef --- /dev/null +++ b/recipes/recipes_emscripten/r-base/cross_libraries.sh @@ -0,0 +1,51 @@ +#!/bin/bash +# This script moves some libraries from the linux build directory to the wasm +# build directory. This is required in order to use the build platform's R +# executables when cross-compiling. + +set -u + +TARGET_PATH=$2 + +libraries=("tools" "grDevices" "graphics" "utils" "stats" "methods") # "lapack" + +setup() { + for lib in "${libraries[@]}"; do + if [ -d "${TARGET_PATH}/library/$lib/libs/" ]; then + if [ ! -f "${TARGET_PATH}/library/$lib/libs/$lib.so.bak" ]; then + echo "Backing up $lib.so" + mv "${TARGET_PATH}/library/$lib/libs/$lib.so" "${TARGET_PATH}/library/$lib/libs/$lib.so.bak" + fi + if [ -f "${TARGET_PATH}/library/$lib/libs/$lib.so.bak" ]; then + cp ${LINUX_BUILD_DIR}/library/${lib}/libs/${lib}.so ${TARGET_PATH}/library/$lib/libs/ + fi + fi + done + + if [ ! -f "${TARGET_PATH}/modules/lapack.so.bak" ]; then + mv "${TARGET_PATH}/modules/lapack.so" "${TARGET_PATH}/modules/lapack.so.bak" + fi + if [ -f "${TARGET_PATH}/modules/lapack.so.bak" ]; then + cp ${LINUX_BUILD_DIR}/modules/lapack.so "${TARGET_PATH}/modules/lapack.so" + fi +} + +restore() { + echo "Restoring libraries" + for lib in "${libraries[@]}"; do + rm $TARGET_PATH/library/$lib/libs/$lib.so + mv $TARGET_PATH/library/$lib/libs/$lib.so.bak $TARGET_PATH/library/$lib/libs/$lib.so + done + + rm $TARGET_PATH/modules/lapack.so + mv $TARGET_PATH/modules/lapack.so.bak $TARGET_PATH/modules/lapack.so +} + +if [ "$1" == "--setup" ]; then + setup +elif [ "$1" == "--restore" ]; then + restore +else + echo "Invalid arguments. Use '--setup ' or '--restore '" + exit 1 +fi diff --git a/recipes/recipes_emscripten/r-base/patches/0001-Add-emscripten-platform-to-configure-script.patch b/recipes/recipes_emscripten/r-base/patches/0001-Add-emscripten-platform-to-configure-script.patch new file mode 100644 index 000000000..c836abe55 --- /dev/null +++ b/recipes/recipes_emscripten/r-base/patches/0001-Add-emscripten-platform-to-configure-script.patch @@ -0,0 +1,128 @@ +From ae49ea769b4c34444a908655837ddef2db11e823 Mon Sep 17 00:00:00 2001 +From: Isabel Paredes +Date: Tue, 19 Nov 2024 20:48:15 +0100 +Subject: [PATCH 01/12] Add emscripten platform to configure script + +Needed to correctly set shlibpath_var=LD_LIBRARY_PATH for emscripten +and avoid substitution errors in the configure script. +--- + configure | 29 +++++++++++++++++++---------- + 1 file changed, 19 insertions(+), 10 deletions(-) + +diff --git a/configure b/configure +index ca7bd8d..a709af3 100644 +--- a/configure ++++ b/configure +@@ -11285,7 +11285,7 @@ irix5* | irix6* | nonstopux*) + ;; + + # This must be glibc/ELF. +-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) ++linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | emscripten*) + lt_cv_deplibs_check_method=pass_all + ;; + +@@ -14420,7 +14420,7 @@ lt_prog_compiler_static= + lt_prog_compiler_static='-non_shared' + ;; + +- linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) ++ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | emscripten*) + case $cc_basename in + # old Intel for x86_64, which still supported -KPIC. + ecc*) +@@ -16919,7 +16919,7 @@ linux*android*) + ;; + + # This must be glibc/ELF. +-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) ++linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | emscripten*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no +@@ -19071,7 +19071,7 @@ fi + inherit_rpath_CXX=yes + ;; + +- linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) ++ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | emscripten*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler +@@ -19887,7 +19887,7 @@ lt_prog_compiler_static_CXX= + ;; + esac + ;; +- linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) ++ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | emscripten*) + case $cc_basename in + KCC*) + # KAI C++ Compiler +@@ -20962,7 +20962,7 @@ linux*android*) + ;; + + # This must be glibc/ELF. +-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) ++linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | emscripten*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no +@@ -21834,7 +21834,7 @@ lt_prog_compiler_static_FC= + lt_prog_compiler_static_FC='-non_shared' + ;; + +- linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) ++ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | emscripten*) + case $cc_basename in + # old Intel for x86_64, which still supported -KPIC. + ecc*) +@@ -24094,7 +24094,7 @@ linux*android*) + ;; + + # This must be glibc/ELF. +-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) ++linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | emscripten*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no +@@ -29580,11 +29580,14 @@ case "${host_os}" in + freebsd*) + R_SYSTEM_ABI="freebsd" + ;; ++ emscripten*) ++ R_SYSTEM_ABI="emscripten" ++ ;; + *) + R_SYSTEM_ABI="?" + ;; + esac +-if test "${GCC}" = yes; then ++if test "${GCC}" = yes && test "${host_os}" != "emscripten"; then + R_SYSTEM_ABI="${R_SYSTEM_ABI},gcc" + else + case "${host_os}" in +@@ -29592,17 +29595,23 @@ case "${host_os}" in + ## we assume native compilers elsewhere (e.g. for -KPIC), so do so here too. + R_SYSTEM_ABI="${R_SYSTEM_ABI},solcc" + ;; ++ emscripten*) ++ R_SYSTEM_ABI="${R_SYSTEM_ABI},emcc" ++ ;; + *) + R_SYSTEM_ABI="${R_SYSTEM_ABI},?" + esac + fi +-if test "${GXX}" = yes; then ++if test "${GXX}" = yes && test "${host_os}" != "emscripten"; then + R_SYSTEM_ABI="${R_SYSTEM_ABI},gxx" + else + case "${host_os}" in + solaris*) + R_SYSTEM_ABI="${R_SYSTEM_ABI},solCC" + ;; ++ emscripten*) ++ R_SYSTEM_ABI="${R_SYSTEM_ABI},em++" ++ ;; + *) + R_SYSTEM_ABI="${R_SYSTEM_ABI},?" + esac diff --git a/recipes/recipes_emscripten/r-base/patches/0001-Fix-bad-substitution-error.patch b/recipes/recipes_emscripten/r-base/patches/0001-Fix-bad-substitution-error.patch deleted file mode 100644 index 34b81c413..000000000 --- a/recipes/recipes_emscripten/r-base/patches/0001-Fix-bad-substitution-error.patch +++ /dev/null @@ -1,45 +0,0 @@ -From c4a8150024ae0942ab18d993c6c4617a6d405e65 Mon Sep 17 00:00:00 2001 -From: Isabel Paredes -Date: Wed, 21 Aug 2024 11:42:12 +0200 -Subject: [PATCH 1/9] Fix bad substitution error - ---- - configure | 4 ++-- - etc/ldpaths.in | 12 ++++++------ - 2 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/configure b/configure -index a9a29c0..da201a5 100644 ---- a/configure -+++ b/configure -@@ -24559,8 +24559,8 @@ case "${host_os}" in - esac - - ## Export LD_LIBRARY_PATH or equivalent. --if eval "test -z \"\${${Rshlibpath_var}}\""; then -- eval "${Rshlibpath_var}=\"${R_LD_LIBRARY_PATH}\"" -+if test -z ${Rshlibpath_var}; then -+ export Rshlibpath_var=${R_LD_LIBRARY_PATH} - else - eval "${Rshlibpath_var}=\"${R_LD_LIBRARY_PATH}${PATH_SEPARATOR}\${${Rshlibpath_var}}\"" - fi -diff --git a/etc/ldpaths.in b/etc/ldpaths.in -index 314d364..ac201a8 100644 ---- a/etc/ldpaths.in -+++ b/etc/ldpaths.in -@@ -13,9 +13,9 @@ fi - ## However, on macOS >=10.11 (if SIP is enabled, the default), the - ## environment value will not be passed to a script such as R.sh, so - ## would not seen here. --if test -z "${@Rshlibpath_var@}"; then -- @Rshlibpath_var@="${R_LD_LIBRARY_PATH}" --else -- @Rshlibpath_var@="${R_LD_LIBRARY_PATH}:${@Rshlibpath_var@}" --fi --export @Rshlibpath_var@ -+# if test -z "${@Rshlibpath_var@}"; then -+# @Rshlibpath_var@="${R_LD_LIBRARY_PATH}" -+# else -+# @Rshlibpath_var@="${R_LD_LIBRARY_PATH}:${@Rshlibpath_var@}" -+# fi -+# export @Rshlibpath_var@ diff --git a/recipes/recipes_emscripten/r-base/patches/0002-Disable-libcurl.patch b/recipes/recipes_emscripten/r-base/patches/0002-Disable-libcurl.patch index 9eee29c03..2c53ec33c 100644 --- a/recipes/recipes_emscripten/r-base/patches/0002-Disable-libcurl.patch +++ b/recipes/recipes_emscripten/r-base/patches/0002-Disable-libcurl.patch @@ -1,17 +1,17 @@ -From d276ebc10b6aafdfdb5094c947ce148221349ef7 Mon Sep 17 00:00:00 2001 +From fce73f868b2f054ff37b8caa587d542a79431642 Mon Sep 17 00:00:00 2001 From: Isabel Paredes -Date: Wed, 21 Aug 2024 12:36:59 +0200 -Subject: [PATCH 2/9] Disable libcurl +Date: Tue, 19 Nov 2024 20:51:21 +0100 +Subject: [PATCH 02/12] Disable libcurl --- configure | 388 +++++++++++++++++++++++++++--------------------------- 1 file changed, 194 insertions(+), 194 deletions(-) diff --git a/configure b/configure -index da201a5..59ed097 100644 +index a709af3..71c1f55 100644 --- a/configure +++ b/configure -@@ -53144,202 +53144,202 @@ fi +@@ -53153,202 +53153,202 @@ fi @@ -403,7 +403,7 @@ index da201a5..59ed097 100644 - as_fn_error $? "libcurl >= 7.28.0 library and headers are required with support for https" "$LINENO" 5 -fi +# else -+# as_fn_error $? "WARNING: libcurl >= 7.28.0 library and headers are required with support for https" "$LINENO" 5 ++# as_fn_error $? "libcurl >= 7.28.0 library and headers are required with support for https" "$LINENO" 5 +# fi diff --git a/recipes/recipes_emscripten/r-base/patches/0004-Disable-internet-module.patch b/recipes/recipes_emscripten/r-base/patches/0003-Disable-internet-module.patch similarity index 87% rename from recipes/recipes_emscripten/r-base/patches/0004-Disable-internet-module.patch rename to recipes/recipes_emscripten/r-base/patches/0003-Disable-internet-module.patch index 536da9fe9..dabf3dd81 100644 --- a/recipes/recipes_emscripten/r-base/patches/0004-Disable-internet-module.patch +++ b/recipes/recipes_emscripten/r-base/patches/0003-Disable-internet-module.patch @@ -1,7 +1,7 @@ -From 05934ca9fc8ba8e1383266cc82d9b73bb2eb4df7 Mon Sep 17 00:00:00 2001 +From 6cf0957749deb5870b96c420d3a8d26d231fbaf6 Mon Sep 17 00:00:00 2001 From: Isabel Paredes -Date: Wed, 21 Aug 2024 12:56:23 +0200 -Subject: [PATCH 4/9] Disable internet module +Date: Tue, 19 Nov 2024 20:54:59 +0100 +Subject: [PATCH 03/12] Disable internet module --- src/modules/Makefile.in | 9 +++------ diff --git a/recipes/recipes_emscripten/r-base/patches/0003-Remove-unsupported-sigsuspend.patch b/recipes/recipes_emscripten/r-base/patches/0003-Remove-unsupported-sigsuspend.patch deleted file mode 100644 index 82edfc87f..000000000 --- a/recipes/recipes_emscripten/r-base/patches/0003-Remove-unsupported-sigsuspend.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 7355d92d5ade339ef4de076bc3d8a5b7772bed4f Mon Sep 17 00:00:00 2001 -From: Isabel Paredes -Date: Wed, 21 Aug 2024 12:42:11 +0200 -Subject: [PATCH 3/9] Remove unsupported sigsuspend - ---- - src/unix/sys-unix.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/unix/sys-unix.c b/src/unix/sys-unix.c -index c20afe6..f6ac6a9 100644 ---- a/src/unix/sys-unix.c -+++ b/src/unix/sys-unix.c -@@ -480,7 +480,8 @@ static pid_t timeout_wait(int *wstatus) - - int saveerrno = errno; - while((wres = waitpid(tost.child_pid, wstatus, WNOHANG)) == 0) -- sigsuspend(&unblocked_ss); -+ // sigsuspend(&unblocked_ss); Not implemented in Emscripten -+ errno = EINTR; - - if (errno == EINTR) - /* EINTR is not really an error but expected situation here, however, diff --git a/recipes/recipes_emscripten/r-base/patches/0010-Fix-iconv-checks-when-using-internal-lapack-blas.patch b/recipes/recipes_emscripten/r-base/patches/0004-Fix-iconv-checks-when-using-internal-lapack-blas.patch similarity index 73% rename from recipes/recipes_emscripten/r-base/patches/0010-Fix-iconv-checks-when-using-internal-lapack-blas.patch rename to recipes/recipes_emscripten/r-base/patches/0004-Fix-iconv-checks-when-using-internal-lapack-blas.patch index d141c076e..57822ee97 100644 --- a/recipes/recipes_emscripten/r-base/patches/0010-Fix-iconv-checks-when-using-internal-lapack-blas.patch +++ b/recipes/recipes_emscripten/r-base/patches/0004-Fix-iconv-checks-when-using-internal-lapack-blas.patch @@ -1,7 +1,7 @@ -From c5a9ed4060aae8fb4afba1e93ad443f50fdc348a Mon Sep 17 00:00:00 2001 +From 6e1480e27fa707e08e93267170d4c2e4b971c2db Mon Sep 17 00:00:00 2001 From: Isabel Paredes -Date: Thu, 19 Sep 2024 12:01:16 +0200 -Subject: [PATCH] Fix iconv checks when using internal lapack/blas. +Date: Tue, 19 Nov 2024 20:58:28 +0100 +Subject: [PATCH 04/12] Fix iconv checks when using internal lapack/blas acx_lapack_ok is set to yes even when the lapack library is not available. This causes "-lblas" to be appended to LIBS, which is a @@ -13,10 +13,10 @@ checks to fail because it cannot find blas. 1 file changed, 1 insertion(+) diff --git a/configure b/configure -index 59ed097..a696ecd 100755 +index 71c1f55..05ee57c 100644 --- a/configure +++ b/configure -@@ -48419,6 +48419,7 @@ else case e in #( +@@ -48428,6 +48428,7 @@ else case e in #( e) if test "$cross_compiling" = yes then : r_cv_atlas_liblapack=no diff --git a/recipes/recipes_emscripten/r-base/patches/0005-Add-sigsuspend-stub-for-Emscripten-compatibility.patch b/recipes/recipes_emscripten/r-base/patches/0005-Add-sigsuspend-stub-for-Emscripten-compatibility.patch new file mode 100644 index 000000000..2b6892425 --- /dev/null +++ b/recipes/recipes_emscripten/r-base/patches/0005-Add-sigsuspend-stub-for-Emscripten-compatibility.patch @@ -0,0 +1,39 @@ +From 2a0a911d1a4b86a3ad15d9fc20e4d1dcc9d2b828 Mon Sep 17 00:00:00 2001 +From: Isabel Paredes +Date: Wed, 20 Nov 2024 15:14:59 +0100 +Subject: [PATCH 05/12] Add sigsuspend stub for Emscripten compatibility + +Emscripten does not support sigsuspend, so a stub function is added. +--- + src/unix/sys-unix.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/src/unix/sys-unix.c b/src/unix/sys-unix.c +index c20afe6..6e84985 100644 +--- a/src/unix/sys-unix.c ++++ b/src/unix/sys-unix.c +@@ -467,6 +467,15 @@ static void timeout_handler(int sig) + /* tost.child_pid is -1 when child process no longer exists */ + } + ++#ifdef EMSCRIPTEN ++/* sigsuspend is not supported in Emscripten */ ++int sigsuspend(const sigset_t *mask) ++{ ++ errno = EINVAL; ++ return -1; ++} ++#endif ++ + static pid_t timeout_wait(int *wstatus) + { + pid_t wres; +@@ -480,7 +489,7 @@ static pid_t timeout_wait(int *wstatus) + + int saveerrno = errno; + while((wres = waitpid(tost.child_pid, wstatus, WNOHANG)) == 0) +- sigsuspend(&unblocked_ss); ++ sigsuspend(&unblocked_ss); + + if (errno == EINTR) + /* EINTR is not really an error but expected situation here, however, diff --git a/recipes/recipes_emscripten/r-base/patches/0005-Use-R-binary-from-build-prefix.patch b/recipes/recipes_emscripten/r-base/patches/0005-Use-R-binary-from-build-prefix.patch deleted file mode 100644 index 2497c2f89..000000000 --- a/recipes/recipes_emscripten/r-base/patches/0005-Use-R-binary-from-build-prefix.patch +++ /dev/null @@ -1,54 +0,0 @@ -From a1bf7a149e8f7728c581b4995bcd143d9de91eb9 Mon Sep 17 00:00:00 2001 -From: Isabel Paredes -Date: Tue, 1 Oct 2024 13:20:32 +0200 -Subject: [PATCH] Use R binary from build prefix - ---- - src/scripts/R.sh.in | 13 ++++++++++--- - 1 file changed, 10 insertions(+), 3 deletions(-) - -diff --git a/src/scripts/R.sh.in b/src/scripts/R.sh.in -index cdbac8b..74b0472 100644 ---- a/src/scripts/R.sh.in -+++ b/src/scripts/R.sh.in -@@ -1,7 +1,7 @@ - #!@R_SHELL@ - # Shell wrapper for R executable. - --R_HOME_DIR= -+R_HOME_DIR="${BUILD_PREFIX}/lib/R" - if test "${R_HOME_DIR}" = "@prefix@/@LIBnn@/R"; then - case "@R_OS@" in - linux*) -@@ -26,6 +26,9 @@ if test "${R_HOME_DIR}" = "@prefix@/@LIBnn@/R"; then - esac - fi - -+# This is to be able to use R libs in the build environment -+R_HOME_DIR="${BUILD_PREFIX}/lib/R" -+ - if test -n "${R_HOME}" && \ - test "${R_HOME}" != "${R_HOME_DIR}"; then - echo "WARNING: ignoring environment value of R_HOME" -@@ -249,7 +252,9 @@ done - - . "${R_HOME}/etc${R_ARCH}/ldpaths" - --R_binary="${R_HOME}/bin/exec${R_ARCH}/R" -+# This must be executable in the build environment -+R_binary="${BUILD_PREFIX}/lib/R/bin/exec${R_ARCH}/R" -+ - export R_ARCH - - case "${gui}" in -@@ -270,7 +275,9 @@ fi - - ## Startup - if test -z "${debugger}"; then -- exec "${R_binary}" @R_BATCHSAVE@ ${args} "${@}" -+ if ! "${R_binary}" @R_BATCHSAVE@ ${args} "${@}"; then -+ echo "WARNING: Failed to execute ${R_binary} ${args} ${@}" -+ fi - else - ## Ideally, we would like the debugger to start R with additional - ## ('inferior') arguments, but not all debuggers can do this. We know diff --git a/recipes/recipes_emscripten/r-base/patches/0011-Build-with-fPIC-only-modules-that-need-it.patch b/recipes/recipes_emscripten/r-base/patches/0006-Build-with-fPIC-the-modules-that-need-it.patch similarity index 95% rename from recipes/recipes_emscripten/r-base/patches/0011-Build-with-fPIC-only-modules-that-need-it.patch rename to recipes/recipes_emscripten/r-base/patches/0006-Build-with-fPIC-the-modules-that-need-it.patch index eb73db10d..d80d56659 100644 --- a/recipes/recipes_emscripten/r-base/patches/0011-Build-with-fPIC-only-modules-that-need-it.patch +++ b/recipes/recipes_emscripten/r-base/patches/0006-Build-with-fPIC-the-modules-that-need-it.patch @@ -1,7 +1,7 @@ -From cd54d15048c734f23c9c352415bf2491a7315c05 Mon Sep 17 00:00:00 2001 +From 4c19e985b5b8eacce8692eded26ee1c7955c060b Mon Sep 17 00:00:00 2001 From: Isabel Paredes -Date: Thu, 19 Sep 2024 18:36:33 +0200 -Subject: [PATCH 1/5] Build with -fPIC only modules that need it +Date: Wed, 20 Nov 2024 15:22:57 +0100 +Subject: [PATCH 06/12] Build with -fPIC the modules that need it --- src/appl/Makefile.in | 2 ++ diff --git a/recipes/recipes_emscripten/r-base/patches/0006-Ignore-crude-heuristic-file-size.patch b/recipes/recipes_emscripten/r-base/patches/0006-Ignore-crude-heuristic-file-size.patch deleted file mode 100644 index d97126c0d..000000000 --- a/recipes/recipes_emscripten/r-base/patches/0006-Ignore-crude-heuristic-file-size.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 52092644845f90984a98e854d0409b7c0a21e6a0 Mon Sep 17 00:00:00 2001 -From: Isabel Paredes -Date: Wed, 21 Aug 2024 13:09:01 +0200 -Subject: [PATCH 6/9] Ignore crude heuristic file size - ---- - src/library/base/makebasedb.R | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/library/base/makebasedb.R b/src/library/base/makebasedb.R -index 8922fdc..a555077 100644 ---- a/src/library/base/makebasedb.R -+++ b/src/library/base/makebasedb.R -@@ -119,7 +119,7 @@ local({ - baseFileBase <- file.path(.Library,"base","R","base") - - if (file.info(baseFileBase)["size"] < 20000) # crude heuristic -- stop("may already be using lazy loading on base"); -+ message("WARNING: may already be using lazy loading on base"); - - basevars <- ls(baseenv(), all.names=TRUE) - prims <- basevars[sapply(basevars, function(n) is.primitive(get(n, baseenv())))] diff --git a/recipes/recipes_emscripten/r-base/patches/0007-Build-docs-with-Rscript-binary.patch b/recipes/recipes_emscripten/r-base/patches/0007-Build-docs-with-Rscript-binary.patch deleted file mode 100644 index 8b2f76aff..000000000 --- a/recipes/recipes_emscripten/r-base/patches/0007-Build-docs-with-Rscript-binary.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 88766c447d56089697c5ad49a0ed72f82c22f11f Mon Sep 17 00:00:00 2001 -From: Isabel Paredes -Date: Wed, 21 Aug 2024 13:19:28 +0200 -Subject: [PATCH 7/9] Build docs with Rscript binary - ---- - doc/Makefile.in | 24 +++++++++++++----------- - 1 file changed, 13 insertions(+), 11 deletions(-) - -diff --git a/doc/Makefile.in b/doc/Makefile.in -index c9e3a73..d89a1f5 100644 ---- a/doc/Makefile.in -+++ b/doc/Makefile.in -@@ -23,7 +23,8 @@ INSTDIRS = notes - - HELP2MAN = perl $(top_srcdir)/tools/help2man.pl - --R_EXE = $(top_builddir)/bin/R --vanilla --no-echo -+R_EXE = "$(BUILD_PREFIX)/bin/R --vanilla --no-echo" -+RSCRIPT_EXE = $(BUILD_PREFIX)/bin/Rscript - - all: Makefile R docs - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -@@ -31,6 +32,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - - ## FIXME: NEWS.rds is needed by news() and hence in principle part of 'R', but - ## it can only be built by R_EXE which at this point does not exist (if built from scratch) -+## But, since we're cross-compiling it does exist - R: Makefile svnonly - @for d in $(SUBDIRS); do \ - (cd $${d} && $(MAKE) $@) || exit 1; \ -@@ -47,24 +49,24 @@ docs: NEWS.rds NEWS html/NEWS.html NEWS.pdf NEWS.2.rds NEWS.3.rds R.1 Rscript.1 - R.1: - @$(HELP2MAN) --include=$(srcdir)/R.aux --no-info --output=R.1 \ - --name="a language for data analysis and graphics" \ -- $(top_builddir)/bin/R -+ $(R_EXE) - - Rscript.1: - @$(HELP2MAN) --no-info --output=Rscript.1 \ - --name="front end for scripting with R" \ -- $(top_builddir)/bin/Rscript -+ $(RSCRIPT_EXE) - - NEWS.rds: $(srcdir)/NEWS.Rd -- @$(ECHO) "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$(srcdir)/NEWS.Rd\", \ -+ @$(RSCRIPT_EXE) -e "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$(srcdir)/NEWS.Rd\", \ - macros = \"../share/Rd/macros/system.Rd\"), stages = 'install', warningCalls = FALSE), \ -- 'NEWS.rds')" | $(R_EXE) -+ 'NEWS.rds')" - - NEWS: NEWS.rds - @$(ECHO) "creating doc/NEWS" -- @$(ECHO) 'options(warn=1);tools:::Rd2txt_NEWS_in_Rd("NEWS.rds", "NEWS")' | $(R_EXE) -+ @$(RSCRIPT_EXE) -e 'options(warn=1);tools:::Rd2txt_NEWS_in_Rd("NEWS.rds", "NEWS")' - - html/NEWS.html: NEWS.rds -- @$(ECHO) 'options(warn=1);tools:::Rd2HTML_NEWS_in_Rd("NEWS.rds", "html/NEWS.html")' | $(R_EXE) -+ @$(RSCRIPT_EXE) -e 'options(warn=1);tools:::Rd2HTML_NEWS_in_Rd("NEWS.rds", "html/NEWS.html")' - - PDFLATEX = @PDFLATEX@ - ## needs pdflatex (and more) -@@ -80,9 +82,9 @@ NEWS.pdf: NEWS.rds - docs3: NEWS.3.rds NEWS.3.html NEWS.3.pdf - - NEWS.3.rds: $(srcdir)/NEWS.3.Rd -- @$(ECHO) "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$(srcdir)/NEWS.3.Rd\", \ -+ @$(RSCRIPT_EXE) -e "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$(srcdir)/NEWS.3.Rd\", \ - macros = \"../share/Rd/macros/system.Rd\"), stages = 'install', warningCalls = FALSE), \ -- 'NEWS.3.rds')" | $(R_EXE) -+ 'NEWS.3.rds')" - - NEWS.3: NEWS.3.rds - @$(ECHO) "creating NEWS.3" -@@ -105,9 +107,9 @@ NEWS.3.pdf: NEWS.3.rds - docs2: NEWS.2.rds NEWS.2.html NEWS.2.pdf - - NEWS.2.rds: $(srcdir)/NEWS.2.Rd -- @$(ECHO) "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$(srcdir)/NEWS.2.Rd\", \ -+ @$(RSCRIPT_EXE) -e "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$(srcdir)/NEWS.2.Rd\", \ - macros = \"../share/Rd/macros/system.Rd\"), stages = 'install', warningCalls = FALSE), \ -- 'NEWS.2.rds')" | $(R_EXE) -+ 'NEWS.2.rds')" - - ## NB: this is only the top part of NEWS.2 in the sources. - NEWS.2: NEWS.2.rds diff --git a/recipes/recipes_emscripten/r-base/patches/0007-Disable-which-for-emscripten.patch b/recipes/recipes_emscripten/r-base/patches/0007-Disable-which-for-emscripten.patch new file mode 100644 index 000000000..100f23daa --- /dev/null +++ b/recipes/recipes_emscripten/r-base/patches/0007-Disable-which-for-emscripten.patch @@ -0,0 +1,22 @@ +From 4cdc89745924bfcee5264c4eb952ef863030e024 Mon Sep 17 00:00:00 2001 +From: Isabel Paredes +Date: Wed, 20 Nov 2024 18:30:45 +0100 +Subject: [PATCH 07/12] Disable which for emscripten + +--- + src/library/base/R/unix/system.unix.R | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/library/base/R/unix/system.unix.R b/src/library/base/R/unix/system.unix.R +index 3bb7d0c..a2afcc6 100644 +--- a/src/library/base/R/unix/system.unix.R ++++ b/src/library/base/R/unix/system.unix.R +@@ -116,7 +116,7 @@ Sys.which <- function(names) + res <- character(length(names)); names(res) <- names + ## hopefully configure found [/usr]/bin/which + which <- "@WHICH@" +- if (!nzchar(which)) { ++ if (!nzchar(which) || grepl("emscripten", R.version$os)) { + warning("'which' was not found on this platform") + return(res) + } diff --git a/recipes/recipes_emscripten/r-base/patches/0008-Set-default-R_Home.patch b/recipes/recipes_emscripten/r-base/patches/0008-Set-default-R_Home.patch deleted file mode 100644 index 38c7bffd4..000000000 --- a/recipes/recipes_emscripten/r-base/patches/0008-Set-default-R_Home.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 9b11ddff35b56c1b2b5141a37b3a790e4cd662b7 Mon Sep 17 00:00:00 2001 -From: Isabel Paredes -Date: Wed, 21 Aug 2024 13:51:47 +0200 -Subject: [PATCH 8/9] Set default R_Home - ---- - src/unix/system.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/unix/system.c b/src/unix/system.c -index ff5751d..84cf79c 100644 ---- a/src/unix/system.c -+++ b/src/unix/system.c -@@ -329,8 +329,8 @@ int Rf_initialize_R(int ac, char **av) - - R_GlobalContext = NULL; /* Make R_Suicide less messy... */ - -- if((R_Home = R_HomeDir()) == NULL) -- R_Suicide("R home directory is not defined"); -+ if((R_Home = R_HomeDir()) == NULL) R_Home = "lib/R"; -+ // R_Suicide("R home directory is not defined"); - BindDomain(R_Home); - - process_system_Renviron(); diff --git a/recipes/recipes_emscripten/r-base/patches/0008-Use-linux-Rscript-executable-when-building-the-docs.patch b/recipes/recipes_emscripten/r-base/patches/0008-Use-linux-Rscript-executable-when-building-the-docs.patch new file mode 100644 index 000000000..0e9249b01 --- /dev/null +++ b/recipes/recipes_emscripten/r-base/patches/0008-Use-linux-Rscript-executable-when-building-the-docs.patch @@ -0,0 +1,61 @@ +From db261fc0f078fc3884a1399ffc4efba293825de0 Mon Sep 17 00:00:00 2001 +From: Isabel Paredes +Date: Fri, 22 Nov 2024 16:48:11 +0100 +Subject: [PATCH 08/12] Use linux Rscript executable when building the docs + +Creating the NEWS files fails even though the command works when testing +directly. Copying the files from the linux build as a workaround. +--- + doc/Makefile.in | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/doc/Makefile.in b/doc/Makefile.in +index c9e3a73..7865bf7 100644 +--- a/doc/Makefile.in ++++ b/doc/Makefile.in +@@ -25,6 +25,12 @@ HELP2MAN = perl $(top_srcdir)/tools/help2man.pl + + R_EXE = $(top_builddir)/bin/R --vanilla --no-echo + ++R_SCRIPT_EXE = $(top_builddir)/bin/Rscript ++ ++ifdef CROSS_COMPILING ++R_SCRIPT_EXE = $(R_SCRIPT_EXECUTABLE) ++endif ++ + all: Makefile R docs + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +@@ -52,12 +58,12 @@ R.1: + Rscript.1: + @$(HELP2MAN) --no-info --output=Rscript.1 \ + --name="front end for scripting with R" \ +- $(top_builddir)/bin/Rscript ++ $(R_SCRIPT_EXE) + + NEWS.rds: $(srcdir)/NEWS.Rd + @$(ECHO) "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$(srcdir)/NEWS.Rd\", \ + macros = \"../share/Rd/macros/system.Rd\"), stages = 'install', warningCalls = FALSE), \ +- 'NEWS.rds')" | $(R_EXE) ++ 'NEWS.rds')" | $(R_EXE) || cp $(LINUX_BUILD_DIR)/doc/NEWS.rds . + + NEWS: NEWS.rds + @$(ECHO) "creating doc/NEWS" +@@ -82,7 +88,7 @@ docs3: NEWS.3.rds NEWS.3.html NEWS.3.pdf + NEWS.3.rds: $(srcdir)/NEWS.3.Rd + @$(ECHO) "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$(srcdir)/NEWS.3.Rd\", \ + macros = \"../share/Rd/macros/system.Rd\"), stages = 'install', warningCalls = FALSE), \ +- 'NEWS.3.rds')" | $(R_EXE) ++ 'NEWS.3.rds')" | $(R_EXE) || cp $(LINUX_BUILD_DIR)/doc/NEWS.3.rds . + + NEWS.3: NEWS.3.rds + @$(ECHO) "creating NEWS.3" +@@ -107,7 +113,7 @@ docs2: NEWS.2.rds NEWS.2.html NEWS.2.pdf + NEWS.2.rds: $(srcdir)/NEWS.2.Rd + @$(ECHO) "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$(srcdir)/NEWS.2.Rd\", \ + macros = \"../share/Rd/macros/system.Rd\"), stages = 'install', warningCalls = FALSE), \ +- 'NEWS.2.rds')" | $(R_EXE) ++ 'NEWS.2.rds')" | $(R_EXE) || cp $(LINUX_BUILD_DIR)/doc/NEWS.2.rds . + + ## NB: this is only the top part of NEWS.2 in the sources. + NEWS.2: NEWS.2.rds diff --git a/recipes/recipes_emscripten/r-base/patches/0009-Use-basenames-for-compilers.patch b/recipes/recipes_emscripten/r-base/patches/0009-Use-basenames-for-compilers.patch deleted file mode 100644 index c5103b329..000000000 --- a/recipes/recipes_emscripten/r-base/patches/0009-Use-basenames-for-compilers.patch +++ /dev/null @@ -1,85 +0,0 @@ -From e5ceab2077126c26e85a829682a30bc0defb78d1 Mon Sep 17 00:00:00 2001 -From: Isabel Paredes -Date: Wed, 21 Aug 2024 13:52:30 +0200 -Subject: [PATCH 9/9] Use basenames for compilers - -This is needed because the path gets hardcoded and then it cannot find emcc when -building other R packages. etc/Makeconf gets copied by the activation script -of cross-r-base. - ---- - etc/Makeconf.in | 28 ++++++++++++++-------------- - 1 file changed, 14 insertions(+), 14 deletions(-) - -diff --git a/etc/Makeconf.in b/etc/Makeconf.in -index d84a912..f648ee3 100644 ---- a/etc/Makeconf.in -+++ b/etc/Makeconf.in -@@ -9,45 +9,45 @@ - ## This fails if it contains spaces, or if it is quoted - include $(R_SHARE_DIR)/make/vars.mk - --AR = @AR@ -+AR = emar - BLAS_LIBS = @BLAS_LIBS@ - - ## C compilers --CC = @CC@ -+CC = emcc - CFLAGS = @CFLAGS@ $(LTO) --CC17 = @CC17@ -+CC17 = emcc - C17FLAGS = @C17FLAGS@ $(LTO) --CC23 = @CC23@ -+CC23 = emcc - C23FLAGS = @C23FLAGS@ $(LTO) --CC90 = @CC90@ -+CC90 = emcc - C90FLAGS = @C90FLAGS@ $(LTO) --CC99 = @CC99@ -+CC99 = emcc - C99FLAGS = @C99FLAGS@ $(LTO) - CPICFLAGS = @CPICFLAGS@ --CPPFLAGS = @CPPFLAGS@ -+CPPFLAGS = -I$(PREFIX)/include - C_VISIBILITY = @C_VISIBILITY@ - - ## C++ compilers --CXX = @CXX@ @CXXSTD@ -+CXX = em++ @CXXSTD@ - CXXFLAGS = @CXXFLAGS@ $(LTO) - CXXPICFLAGS = @CXXPICFLAGS@ --CXX11 = @CXX11@ -+CXX11 = em++ - CXX11FLAGS = @CXX11FLAGS@ $(LTO) - CXX11PICFLAGS = @CXX11PICFLAGS@ - CXX11STD = @CXX11STD@ --CXX14 = @CXX14@ -+CXX14 = em++ - CXX14FLAGS = @CXX14FLAGS@ $(LTO) - CXX14PICFLAGS = @CXX14PICFLAGS@ - CXX14STD = @CXX14STD@ --CXX17 = @CXX17@ -+CXX17 = em++ - CXX17FLAGS = @CXX17FLAGS@ $(LTO) - CXX17PICFLAGS = @CXX17PICFLAGS@ - CXX17STD = @CXX17STD@ --CXX20 = @CXX20@ -+CXX20 = em++ - CXX20FLAGS = @CXX20FLAGS@ $(LTO) - CXX20PICFLAGS = @CXX20PICFLAGS@ - CXX20STD = @CXX20STD@ --CXX23 = @CXX23@ -+CXX23 = em++ - CXX23FLAGS = @CXX23FLAGS@ $(LTO) - CXX23PICFLAGS = @CXX23PICFLAGS@ - CXX23STD = @CXX23STD@ -@@ -116,7 +116,7 @@ OBJCFLAGS = @OBJCFLAGS@ $(LTO) - OBJC_LIBS = @OBJC_LIBS@ - OBJCXX = @OBJCXX@ - R_ARCH = @R_ARCH@ --RANLIB = @RANLIB@ -+RANLIB = emranlib - SAFE_FFLAGS = @SAFE_FFLAGS@ - ## A version of SHLIB_LIBADD not overridden in install.R. - SAN_LIBS = diff --git a/recipes/recipes_emscripten/r-base/patches/0009-Use-source-files-directly.patch b/recipes/recipes_emscripten/r-base/patches/0009-Use-source-files-directly.patch new file mode 100644 index 000000000..840c44843 --- /dev/null +++ b/recipes/recipes_emscripten/r-base/patches/0009-Use-source-files-directly.patch @@ -0,0 +1,92 @@ +From 6b2d42bbb8895cb321124814b526fca8aca36433 Mon Sep 17 00:00:00 2001 +From: Isabel Paredes +Date: Fri, 22 Nov 2024 16:57:55 +0100 +Subject: [PATCH 09/12] Use source files directly + +--- + share/make/basepkg.mk | 19 ++++++++++++++----- + src/library/tools/Makefile.in | 11 ++++++++--- + 2 files changed, 22 insertions(+), 8 deletions(-) + +diff --git a/share/make/basepkg.mk b/share/make/basepkg.mk +index c0a69c8..cf1bdd2 100644 +--- a/share/make/basepkg.mk ++++ b/share/make/basepkg.mk +@@ -1,5 +1,6 @@ + ## ${R_HOME}/share/make/basepkg.mk + ++toolsdir = $(srcdir)/../tools + + .PHONY: front instdirs mkR mkR1 mkR2 mkRbase mkdesc mkdesc2 mkdemos mkdemos2 \ + mkexec mkman mkpo mksrc mksrc-win mksrc-win2 mkRsimple mklazy mklazycomp \ +@@ -86,11 +87,17 @@ mkRbase: + mkdesc: + @if test -f DESCRIPTION; then \ + if test "$(PKG_BUILT_STAMP)" != ""; then \ +- $(ECHO) "tools:::.install_package_description('.', '$(top_builddir)/library/${pkg}', '$(PKG_BUILT_STAMP)')" | \ ++ (cat $(toolsdir)/R/admin.R; \ ++ cat $(toolsdir)/R/QC.R; \ ++ cat $(toolsdir)/R/utils.R; \ ++ $(ECHO) ".install_package_description('.', '$(top_builddir)/library/${pkg}', '$(PKG_BUILT_STAMP)')") | \ + R_DEFAULT_PACKAGES=NULL $(R_EXE) > /dev/null ; \ + else \ +- $(ECHO) "tools:::.install_package_description('.', '$(top_builddir)/library/${pkg}')" | \ +- R_DEFAULT_PACKAGES=NULL $(R_EXE) > /dev/null ; \ ++ (cat $(toolsdir)/R/admin.R; \ ++ cat $(toolsdir)/R/QC.R; \ ++ cat $(toolsdir)/R/utils.R; \ ++ $(ECHO) ".install_package_description('.', '$(top_builddir)/library/${pkg}')") | \ ++ R_DEFAULT_PACKAGES=NULL $(R_EXE) > /dev/null ; \ + fi; \ + fi + +@@ -127,7 +134,8 @@ mkexec: + ## only used if byte-compilation is disabled + mklazy: + @$(INSTALL_DATA) all.R $(top_builddir)/library/$(pkg)/R/$(pkg) +- @$(ECHO) "tools:::makeLazyLoading(\"$(pkg)\")" | \ ++ @(cat $(toolsdir)/R/makeLazyLoad.R; \ ++ $(ECHO) "makeLazyLoading(\"$(pkg)\")") | \ + R_DEFAULT_PACKAGES=$(DEFPKGS) LC_ALL=C $(R_EXE) > /dev/null + + mklazycomp: $(top_builddir)/library/$(pkg)/R/$(pkg).rdb +@@ -148,7 +156,8 @@ mksrc-win2: + + sysdata: $(srcdir)/R/sysdata.rda + @$(ECHO) "installing 'sysdata.rda'" +- @$(ECHO) "tools:::sysdata2LazyLoadDB(\"$(srcdir)/R/sysdata.rda\",\"$(top_builddir)/library/$(pkg)/R\")" | \ ++ @(cat $(toolsdir)/R/makeLazyLoad.R; \ ++ $(ECHO) "sysdata2LazyLoadDB(\"$(srcdir)/R/sysdata.rda\",\"$(top_builddir)/library/$(pkg)/R\")") | \ + R_DEFAULT_PACKAGES=NULL LC_ALL=C $(R_EXE) + + +diff --git a/src/library/tools/Makefile.in b/src/library/tools/Makefile.in +index 786a6d7..7299435 100644 +--- a/src/library/tools/Makefile.in ++++ b/src/library/tools/Makefile.in +@@ -39,7 +39,10 @@ all: Makefile DESCRIPTION + fi \ + fi + @$(MAKE) sysdata +- @$(ECHO) "tools:::.install_package_description('.', '"$(top_builddir)/library/${pkg}"')" | \ ++ @(cat $(srcdir)/R/admin.R; \ ++ cat $(srcdir)/R/QC.R; \ ++ cat $(srcdir)/R/utils.R; \ ++ $(ECHO) ".install_package_description('.', '"$(top_builddir)/library/${pkg}"')") | \ + R_DEFAULT_PACKAGES=NULL $(R_EXE) > /dev/null + + mkR: mkR1 +@@ -61,9 +64,11 @@ Rsimple: mkR mkRsimple + + Rlazy: mkR mkRsimple + @$(INSTALL_DATA) all.R $(top_builddir)/library/$(pkg)/R/$(pkg) +- @(cat $(srcdir)/R/makeLazyLoad.R; \ ++ R_SYSTEM_ABI='@R_SYSTEM_ABI@' ++ $(ECHO) "R_SYSTEM_ABI is ${R_SYSTEM_ABI}" ++ (cat $(srcdir)/R/makeLazyLoad.R; \ + $(ECHO) "makeLazyLoading(\"$(pkg)\")") | \ + R_SYSTEM_ABI='@R_SYSTEM_ABI@' \ +- R_DEFAULT_PACKAGES=NULL LC_ALL=C $(R_EXE) > /dev/null ++ R_DEFAULT_PACKAGES=NULL LC_ALL=C $(R_EXE) + + Rlazycomp: mkR mkRsimple mklazycomp diff --git a/recipes/recipes_emscripten/r-base/patches/0010-Ignore-warnings-when-building-Rdts-files.patch b/recipes/recipes_emscripten/r-base/patches/0010-Ignore-warnings-when-building-Rdts-files.patch new file mode 100644 index 000000000..d379c3b13 --- /dev/null +++ b/recipes/recipes_emscripten/r-base/patches/0010-Ignore-warnings-when-building-Rdts-files.patch @@ -0,0 +1,33 @@ +From b7fd52bc7d44cd68165fca8504f33abcc3406e8e Mon Sep 17 00:00:00 2001 +From: Isabel Paredes +Date: Fri, 22 Nov 2024 16:58:55 +0100 +Subject: [PATCH 10/12] Ignore warnings when building Rdts files + +It is possible that the warnings coming from not having `which` are +being treated as errors, but the files are being built anyway. +--- + src/library/Makefile.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/library/Makefile.in b/src/library/Makefile.in +index 812ee58..a499ecd 100644 +--- a/src/library/Makefile.in ++++ b/src/library/Makefile.in +@@ -72,7 +72,7 @@ RD-TS = base.Rdts stats.Rdts utils.Rdts methods.Rdts graphics.Rdts grDevices.Rdt + .inn.Rdts: + @$(ECHO) "options(warn=1);tools:::.install_package_Rd_objects('$(srcdir)/$*',\ + '$(top_builddir)/library/$*')" | \ +- R_DEFAULT_PACKAGES=NULL $(R_EXE) || exit 1 ++ R_DEFAULT_PACKAGES=NULL $(R_EXE) || exit 0 + @$(ECHO) " $*" + + Rdobjects: +@@ -81,7 +81,7 @@ Rdobjects: + @$(MAKE) $(RD-TS) + + .inn.Rdh: +- @$(ECHO) "tools:::.writePkgIndices(\"$(srcdir)/$*\", \"$(top_builddir)/library/$*\")" | R_DEFAULT_PACKAGES=utils LC_ALL=C $(R_EXE) || exit 1 ++ @$(ECHO) "tools:::.writePkgIndices(\"$(srcdir)/$*\", \"$(top_builddir)/library/$*\")" | R_DEFAULT_PACKAGES=utils LC_ALL=C $(R_EXE) || exit 0 + + RD-H = $(R_PKGS_BASE:=.Rdh) + diff --git a/recipes/recipes_emscripten/r-base/patches/0011-Use-cross_libraries-script-when-cross-compiling.patch b/recipes/recipes_emscripten/r-base/patches/0011-Use-cross_libraries-script-when-cross-compiling.patch new file mode 100644 index 000000000..7b6fe9a1a --- /dev/null +++ b/recipes/recipes_emscripten/r-base/patches/0011-Use-cross_libraries-script-when-cross-compiling.patch @@ -0,0 +1,26 @@ +From e9a701fc520af1dcf9c35c99a170055c351e2873 Mon Sep 17 00:00:00 2001 +From: Isabel Paredes +Date: Fri, 22 Nov 2024 17:01:35 +0100 +Subject: [PATCH 11/12] Use cross_libraries script when cross-compiling + +--- + src/scripts/R.sh.in | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/scripts/R.sh.in b/src/scripts/R.sh.in +index cdbac8b..61a0fb7 100644 +--- a/src/scripts/R.sh.in ++++ b/src/scripts/R.sh.in +@@ -252,6 +252,12 @@ done + R_binary="${R_HOME}/bin/exec${R_ARCH}/R" + export R_ARCH + ++if [ "${CROSS_COMPILING}" = "true" ] && [ -n "${RECIPE_DIR}" ]; then ++ LD_LIBRARY_PATH="${LINUX_BUILD_DIR}/lib:${LD_LIBRARY_PATH}" ++ R_binary="${R_EXECUTABLE}" ++ ${RECIPE_DIR}/cross_libraries.sh --setup ${R_HOME} ++fi ++ + case "${gui}" in + Tk|tk|X11|x11) + ;; diff --git a/recipes/recipes_emscripten/r-base/patches/0012-Build-with-atomics-and-bulkmemory.patch b/recipes/recipes_emscripten/r-base/patches/0012-Build-with-atomics-and-bulkmemory.patch deleted file mode 100644 index 5d0cc775d..000000000 --- a/recipes/recipes_emscripten/r-base/patches/0012-Build-with-atomics-and-bulkmemory.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 4ff6f58145ba10e61905d93a5084a39f7f139dc6 Mon Sep 17 00:00:00 2001 -From: Isabel Paredes -Date: Thu, 19 Sep 2024 19:00:20 +0200 -Subject: [PATCH 3/5] Build with atomics and bulkmemory - ---- - src/main/Makefile.in | 3 +++ - src/unix/Makefile.in | 2 +- - 2 files changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/main/Makefile.in b/src/main/Makefile.in -index d7585f9..a80964f 100644 ---- a/src/main/Makefile.in -+++ b/src/main/Makefile.in -@@ -85,6 +85,9 @@ ALL_CPPFLAGS = $(TRE_CPPFLAGS) $(XDR_CPPFLAGS) $(R_XTRA_CPPFLAGS) \ - @WANT_R_SHLIB_TRUE@ALL_CFLAGS = $(ALL_CFLAGS_LO) - @WANT_R_SHLIB_TRUE@ALL_FFLAGS = $(ALL_FFLAGS_LO) - @WANT_R_SHLIB_FALSE@ALL_FFLAGS = $(ALL_FFLAGS_PIE) -+## Fixes: --shared-memory is disallowed by context.o because it was not compiled -+## with 'atomics' or 'bulk-memory' features -+ALL_CPPFLAGS += -matomics -mbulk-memory - - - ## use an explicit library: there might be an unsatisfactory -lintl around -diff --git a/src/unix/Makefile.in b/src/unix/Makefile.in -index b1cc9a3..d3ed938 100644 ---- a/src/unix/Makefile.in -+++ b/src/unix/Makefile.in -@@ -31,7 +31,7 @@ DISTFILES = \ - Makefile.in $(SOURCES_C_BASE) Rscript.c \ - $(HEADERS) libR.pc.in system.txt - --ALL_CPPFLAGS += $(CPICFLAGS) -+ALL_CPPFLAGS += $(CPICFLAGS) -matomics -mbulk-memory - @WANT_R_SHLIB_TRUE@ALL_CFLAGS = $(ALL_CFLAGS_LO) - - all: R diff --git a/recipes/recipes_emscripten/r-base/patches/0012-Install-wasm-files.patch b/recipes/recipes_emscripten/r-base/patches/0012-Install-wasm-files.patch new file mode 100644 index 000000000..8aa2b1d57 --- /dev/null +++ b/recipes/recipes_emscripten/r-base/patches/0012-Install-wasm-files.patch @@ -0,0 +1,34 @@ +From db3ec3cb52056eb608ccaa4e04f21aaccc13fce3 Mon Sep 17 00:00:00 2001 +From: Isabel Paredes +Date: Fri, 22 Nov 2024 18:20:58 +0100 +Subject: [PATCH 12/12] Install .wasm files + +--- + src/main/Makefile.in | 1 + + src/unix/Makefile.in | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/main/Makefile.in b/src/main/Makefile.in +index d7585f9..848dbce 100644 +--- a/src/main/Makefile.in ++++ b/src/main/Makefile.in +@@ -200,6 +200,7 @@ installdirs: + @$(MKINSTALLDIRS) "$(DESTDIR)$(Rexecbindir2)" + install-bin: installdirs + @$(SHELL) $(top_srcdir)/tools/copy-if-change $(R_binary) "$(DESTDIR)$(Rexecbindir2)/R" ++ @$(SHELL) $(top_srcdir)/tools/copy-if-change R.wasm "$(DESTDIR)$(Rexecbindir2)/R.wasm" || true + install-lib: installdirs + @$(MKINSTALLDIRS) "$(DESTDIR)$(Rexeclibdir)" + @$(SHELL) $(top_srcdir)/tools/copy-if-change $(libR_la) "$(DESTDIR)$(Rexeclibdir)/$(libR_la)" +diff --git a/src/unix/Makefile.in b/src/unix/Makefile.in +index b1cc9a3..bedd384 100644 +--- a/src/unix/Makefile.in ++++ b/src/unix/Makefile.in +@@ -80,6 +80,7 @@ install-Rscript: + -o Rscript $(srcdir)/Rscript.c + @$(MKINSTALLDIRS) "$(DESTDIR)$(Rexecbindir)" + @$(INSTALL_PROGRAM) Rscript "$(DESTDIR)$(Rexecbindir)/Rscript" ++ @$(INSTALL_PROGRAM) Rscript.wasm "$(DESTDIR)$(Rexecbindir)/Rscript.wasm" || true + ## substitute at install time to allow 'prefix' to be overridden + install-pc: + @$(MKINSTALLDIRS) "$(DESTDIR)$(libdir)/pkgconfig" diff --git a/recipes/recipes_emscripten/r-base/pre.js b/recipes/recipes_emscripten/r-base/pre.js index 84b128021..75ce98ecb 100644 --- a/recipes/recipes_emscripten/r-base/pre.js +++ b/recipes/recipes_emscripten/r-base/pre.js @@ -1,3 +1,6 @@ -Module['prerun'] = () => { +Module['preRun'] = () => { ENV['R_HOME'] = '/lib/R'; + ENV['R_ENABLE_JIT'] = '0'; + ENV['R_DEFAULT_PACKAGES'] = 'NULL'; + ENV["EDITOR"] = "vim"; }; \ No newline at end of file diff --git a/recipes/recipes_emscripten/r-base/recipe.yaml b/recipes/recipes_emscripten/r-base/recipe.yaml index 578d147d1..bfa74e39a 100644 --- a/recipes/recipes_emscripten/r-base/recipe.yaml +++ b/recipes/recipes_emscripten/r-base/recipe.yaml @@ -10,21 +10,21 @@ source: url: https://cran.r-project.org/src/base/R-4/R-${{ version }}.tar.gz sha256: 1578cd603e8d866b58743e49d8bf99c569e81079b6a60cf33cdf7bdffeb817ec patches: - - patches/0001-Fix-bad-substitution-error.patch - - patches/0002-Disable-libcurl.patch - - patches/0003-Remove-unsupported-sigsuspend.patch - - patches/0004-Disable-internet-module.patch - - patches/0005-Use-R-binary-from-build-prefix.patch - - patches/0006-Ignore-crude-heuristic-file-size.patch - - patches/0007-Build-docs-with-Rscript-binary.patch - - patches/0008-Set-default-R_Home.patch - - patches/0009-Use-basenames-for-compilers.patch - - patches/0010-Fix-iconv-checks-when-using-internal-lapack-blas.patch - - patches/0011-Build-with-fPIC-only-modules-that-need-it.patch - - patches/0012-Build-with-atomics-and-bulkmemory.patch + - patches/0001-Add-emscripten-platform-to-configure-script.patch + - patches/0002-Disable-libcurl.patch + - patches/0003-Disable-internet-module.patch + - patches/0004-Fix-iconv-checks-when-using-internal-lapack-blas.patch + - patches/0005-Add-sigsuspend-stub-for-Emscripten-compatibility.patch + - patches/0006-Build-with-fPIC-the-modules-that-need-it.patch + - patches/0007-Disable-which-for-emscripten.patch + - patches/0008-Use-linux-Rscript-executable-when-building-the-docs.patch + - patches/0009-Use-source-files-directly.patch + - patches/0010-Ignore-warnings-when-building-Rdts-files.patch + - patches/0011-Use-cross_libraries-script-when-cross-compiling.patch + - patches/0012-Install-wasm-files.patch build: - number: 3 + number: 4 requirements: build: @@ -34,7 +34,17 @@ requirements: - pkg-config - cmake - make - - r-base == ${{ version }} # for R and Rscript binaries (See patches) + # Dependencies to build R in the build environment + - gcc + - libflang + - libiconv + - zlib>=1.2.13 + - bzip2 + - xz + - pcre2>=10.43 + - tzdata + - libpng + - libtiff host: - libflang # for FortranRuntime - libiconv From bccd05966ada5b2a2ecfdb153840c51283e5718a Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Mon, 25 Nov 2024 01:16:13 +0000 Subject: [PATCH 316/333] Update astropy from 6.1.7 to 7.0.0 --- recipes/recipes_emscripten/astropy/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/astropy/recipe.yaml b/recipes/recipes_emscripten/astropy/recipe.yaml index 8dc26b0e5..41717f8a4 100644 --- a/recipes/recipes_emscripten/astropy/recipe.yaml +++ b/recipes/recipes_emscripten/astropy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 6.1.7 + version: 7.0.0 package: name: astropy @@ -7,7 +7,7 @@ package: source: - url: https://pypi.io/packages/source/a/astropy/astropy-${{ version }}.tar.gz - sha256: a405ac186306b6cb152e6df2f7444ab8bd764e4127d7519da1b3ae4dd65357ef + sha256: e92d7c9fee86eb3df8714e5dd41bbf9f163d343e1a183d95bf6bd09e4313c940 # patches: # - patches/skip_ep.patch From cfa910cba1e1969b064c64b1ef5f9731b10f2266 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Tue, 26 Nov 2024 01:13:35 +0000 Subject: [PATCH 317/333] Update pybind11 from 2.13.0 to 2.13.1 --- recipes/recipes_emscripten/pybind11/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/pybind11/recipe.yaml b/recipes/recipes_emscripten/pybind11/recipe.yaml index 8682c0c61..3c528d982 100644 --- a/recipes/recipes_emscripten/pybind11/recipe.yaml +++ b/recipes/recipes_emscripten/pybind11/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.13.0 + version: 2.13.1 package: name: pybind11 @@ -7,7 +7,7 @@ package: source: url: https://github.com/pybind/pybind11/archive/refs/tags/v${{ version }}.tar.gz - sha256: 8ac2bd138ea3c12683d3496361af6bee0f7754f86bf050e6c61e3966de688215 + sha256: 51631e88960a8856f9c497027f55c9f2f9115cafb08c0005439838a05ba17bfc patches: - patches/0001-no-bitsize-check.patch build: From 30bfcd64715ba71558b1a07f05de2d511eda1c86 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Tue, 26 Nov 2024 01:14:16 +0000 Subject: [PATCH 318/333] Update numpy from 2.1.0 to 2.1.1 --- 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 75ed16804..634c10318 100644 --- a/recipes/recipes_emscripten/numpy/recipe.yaml +++ b/recipes/recipes_emscripten/numpy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.1.0 + version: 2.1.1 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: 7dc90da0081f7e1da49ec4e398ede6a8e9cc4f5ebe5f9e06b443ed889ee9aaa2 + sha256: d0cf7d55b1051387807405b3898efafa862997b4cba8aa5dbe657be794afeafd build: number: 0 From 081ac6df71076b1822cd4aeee6333ac0592d6afd Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Tue, 26 Nov 2024 11:19:55 +0100 Subject: [PATCH 319/333] Update libpng from 1.6.43 to 1.6.44 (#1325) * Update libpng from 1.6.43 to 1.6.44 * Add alternate url * Update build instructions --------- Co-authored-by: emscripten-forge-bot Co-authored-by: Isabel Paredes --- recipes/recipes_emscripten/libpng/build.sh | 23 +++++++++++++++---- recipes/recipes_emscripten/libpng/recipe.yaml | 9 +++++--- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/recipes/recipes_emscripten/libpng/build.sh b/recipes/recipes_emscripten/libpng/build.sh index b4e540c29..1804ab41a 100644 --- a/recipes/recipes_emscripten/libpng/build.sh +++ b/recipes/recipes_emscripten/libpng/build.sh @@ -1,11 +1,24 @@ +# FIXME: libz.so has the wrong magic bytes +rm $PREFIX/lib/libz.so* + # Get an updated config.sub and config.guess cp $BUILD_PREFIX/share/libtool/build-aux/config.* . -export CFLAGS="$CFLAGS -I$PREFIX/include -L$PREFIX/lib" -export CPPFLAGS="$CPPFLAGS -I$PREFIX/include" +# atomics and bulk-memory are required for cairo +export CFLAGS="-I$PREFIX/include -matomics -mbulk-memory" +export CPPFLAGS="-I$PREFIX/include" +export LDFLAGS="$LDFLAGS -L$PREFIX/lib" + +mkdir -p build +cd build -emconfigure ./configure --prefix=$PREFIX \ - --with-zlib-prefix=$PREFIX +emconfigure ../configure --prefix=$PREFIX \ + --with-zlib-prefix=$PREFIX \ + --disable-shared +# NOTE: to enable shared, the -shared flag needs to be replaced with SIDE_MODULE -emmake make -j${CPU_COUNT} ${VERBOSE_AT} +emmake make -j${CPU_COUNT} emmake make install + +# Not packaging any shared libraries +rm $PREFIX/lib/libpng*.la diff --git a/recipes/recipes_emscripten/libpng/recipe.yaml b/recipes/recipes_emscripten/libpng/recipe.yaml index ba6e93837..c80bba40f 100644 --- a/recipes/recipes_emscripten/libpng/recipe.yaml +++ b/recipes/recipes_emscripten/libpng/recipe.yaml @@ -1,14 +1,14 @@ context: name: libpng - version: 1.6.43 + version: 1.6.44 package: name: ${{ name }} version: ${{ version }} source: - url: http://download.sourceforge.net/libpng/libpng-${{ version }}.tar.gz - sha256: e804e465d4b109b5ad285a8fb71f0dd3f74f0068f91ce3cdfde618180c174925 + url: http://downloads.sourceforge.net/project/${{ name }}/libpng16/${{ version }}/${{ name }}-${{ version }}.tar.gz + sha256: 8c25a7792099a0089fa1cc76c94260d0bb3f1ec52b93671b572f8bb61577b732 build: number: 0 @@ -25,6 +25,7 @@ tests: - test -f ${PREFIX}/lib/libpng.a - test -f ${PREFIX}/include/png.h - libpng-config --version + about: license: zlib-acknowledgement license_file: LICENSE @@ -34,6 +35,8 @@ about: libpng is the official PNG reference library. It supports almost all PNG features, is extensible, and has been extensively tested for over 20 years. homepage: http://www.libpng.org/pub/png/libpng.html + extra: recipe-maintainers: - martinRenou + - IsabelParedes \ No newline at end of file From 441551c4d41a565a540013c45eae8b97136046c4 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Tue, 26 Nov 2024 11:38:35 +0100 Subject: [PATCH 320/333] Update cairo (#1432) * Enable png * Update recipe * Remove patches * Add libffi --- recipes/recipes_emscripten/cairo/build.sh | 6 +----- .../cairo/patches/cairo-wasm.patch | 13 ------------- recipes/recipes_emscripten/cairo/recipe.yaml | 16 +++++++++------- 3 files changed, 10 insertions(+), 25 deletions(-) delete mode 100644 recipes/recipes_emscripten/cairo/patches/cairo-wasm.patch diff --git a/recipes/recipes_emscripten/cairo/build.sh b/recipes/recipes_emscripten/cairo/build.sh index 6afd872e7..a8f08b569 100644 --- a/recipes/recipes_emscripten/cairo/build.sh +++ b/recipes/recipes_emscripten/cairo/build.sh @@ -2,17 +2,13 @@ set -ex -export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BUILD_PREFIX/lib/pkgconfig -export PKG_CONFIG=$BUILD_PREFIX/bin/pkg-config - export CFLAGS="${CFLAGS} -DCAIRO_NO_MUTEX=1" -export LDFLAGS="${LDFLAGS} -lz" meson_config_args=( -Dfontconfig=enabled -Dfreetype=enabled -Dglib=enabled - -Dpng=disabled + -Dpng=enabled -Dxlib=disabled -Dxlib-xcb=disabled -Dxcb=disabled diff --git a/recipes/recipes_emscripten/cairo/patches/cairo-wasm.patch b/recipes/recipes_emscripten/cairo/patches/cairo-wasm.patch deleted file mode 100644 index 0eb3e46dd..000000000 --- a/recipes/recipes_emscripten/cairo/patches/cairo-wasm.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/cairo-ft-private.h b/src/cairo-ft-private.h -index 836f7e523..6b0e30223 100644 ---- a/src/cairo-ft-private.h -+++ b/src/cairo-ft-private.h -@@ -43,6 +43,8 @@ - - #if CAIRO_HAS_FT_FONT - -+#include FT_COLOR_H -+ - CAIRO_BEGIN_DECLS - - typedef struct _cairo_ft_unscaled_font cairo_ft_unscaled_font_t; diff --git a/recipes/recipes_emscripten/cairo/recipe.yaml b/recipes/recipes_emscripten/cairo/recipe.yaml index 8a0327f8d..a27db4f12 100644 --- a/recipes/recipes_emscripten/cairo/recipe.yaml +++ b/recipes/recipes_emscripten/cairo/recipe.yaml @@ -9,11 +9,9 @@ package: source: url: http://cairographics.org/releases/${{ name }}-${{ version }}.tar.xz sha256: 243a0736b978a33dee29f9cca7521733b78a65b5418206fef7bd1c3d4cf10b64 - patches: - - patches/cairo-wasm.patch build: - number: 1 + number: 2 requirements: build: @@ -32,12 +30,16 @@ requirements: - lzo - expat - zlib + - libffi tests: -- script: - - test -f $PREFIX/lib/libcairo.a - - test -f $PREFIX/lib/libcairo-gobject.a - - test -f $PREFIX/include/cairo/cairo.h +- package_contents: + lib: + - libcairo.a + - libcairo-script-interpreter.a + include: + - cairo/cairo.h + - cairo/cairo-svg.h about: homepage: http://cairographics.org/ From 7025d0968b5e3a0d38a514400fc69fb3698758c9 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Wed, 27 Nov 2024 01:14:41 +0000 Subject: [PATCH 321/333] Update pybind11 from 2.13.1 to 2.13.2 --- recipes/recipes_emscripten/pybind11/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/pybind11/recipe.yaml b/recipes/recipes_emscripten/pybind11/recipe.yaml index 3c528d982..7747b8483 100644 --- a/recipes/recipes_emscripten/pybind11/recipe.yaml +++ b/recipes/recipes_emscripten/pybind11/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.13.1 + version: 2.13.2 package: name: pybind11 @@ -7,7 +7,7 @@ package: source: url: https://github.com/pybind/pybind11/archive/refs/tags/v${{ version }}.tar.gz - sha256: 51631e88960a8856f9c497027f55c9f2f9115cafb08c0005439838a05ba17bfc + sha256: 50eebef369d28f07ce1fe1797f38149e5928817be8e539239f2aadfd95b227f3 patches: - patches/0001-no-bitsize-check.patch build: From 90b00fb6e28ca51a24a50498b2da332ad524bdd2 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Wed, 27 Nov 2024 01:15:16 +0000 Subject: [PATCH 322/333] Update numpy from 2.1.1 to 2.1.2 --- 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 634c10318..e8bd78e2a 100644 --- a/recipes/recipes_emscripten/numpy/recipe.yaml +++ b/recipes/recipes_emscripten/numpy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.1.1 + version: 2.1.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: d0cf7d55b1051387807405b3898efafa862997b4cba8aa5dbe657be794afeafd + sha256: 13532a088217fa624c99b843eeb54640de23b3414b14aa66d023805eb731066c build: number: 0 From 1d0c4f2d72766b67269dcc9e3f8b2d7949926ca0 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Wed, 27 Nov 2024 18:31:00 +0100 Subject: [PATCH 323/333] Update pango (#1437) --- recipes/recipes_emscripten/pango/build.sh | 24 ++++++++++----- recipes/recipes_emscripten/pango/recipe.yaml | 31 ++++++++++++++------ 2 files changed, 38 insertions(+), 17 deletions(-) diff --git a/recipes/recipes_emscripten/pango/build.sh b/recipes/recipes_emscripten/pango/build.sh index 910f6b94c..7abaef8c6 100644 --- a/recipes/recipes_emscripten/pango/build.sh +++ b/recipes/recipes_emscripten/pango/build.sh @@ -1,22 +1,24 @@ #!/bin/bash -set -ex +set -eux -# get meson to find pkg-config when cross compiling -export PKG_CONFIG=$BUILD_PREFIX/bin/pkg-config -export PKG_CONFIG_PATH_FOR_BUILD=$BUILD_PREFIX/lib/pkgconfig -export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BUILD_PREFIX/lib/pkgconfig +# Requires glib-mkenums to generate some headers during the build process, +# so this executable must come from the build environment. +ln -s $BUILD_PREFIX/bin/glib-mkenums $PREFIX/bin/glib-mkenums meson_config_args=( -Dintrospection=disabled # requires gobject-introspection as run-time dep -Dfontconfig=enabled -Dfreetype=enabled - -Dcairo=disabled + -Dcairo=enabled + -Dlibthai=disabled + -Dxft=disabled + -Ddocumentation=false + -Dbuild-examples=false -Dbuild-testsuite=false ) meson setup builddir \ - ${MESON_ARGS} \ "${meson_config_args[@]}" \ --buildtype=release \ --default-library=static \ @@ -27,4 +29,10 @@ meson setup builddir \ --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 +ninja -C builddir install -j ${CPU_COUNT} + +# Remove the symlink to glib-mkenums +rm $PREFIX/bin/glib-mkenums + +# These worker files do not get installed by the meson install command +cp builddir/utils/*.worker.js $PREFIX/bin/ \ No newline at end of file diff --git a/recipes/recipes_emscripten/pango/recipe.yaml b/recipes/recipes_emscripten/pango/recipe.yaml index 590ffc34f..67f8a2fa1 100644 --- a/recipes/recipes_emscripten/pango/recipe.yaml +++ b/recipes/recipes_emscripten/pango/recipe.yaml @@ -1,7 +1,7 @@ context: - name: "pango" - version: "1.54.0" - version_major_minor: "1.54" + name: pango + version: 1.54.0 + version_major_minor: 1.54 package: name: ${{ name }} @@ -12,7 +12,7 @@ source: sha256: 8a9eed75021ee734d7fc0fdf3a65c3bba51dfefe4ae51a9b414a60c70b2d1ed8 build: - number: 0 + number: 1 requirements: build: @@ -25,8 +25,7 @@ requirements: - fontconfig - freetype host: - # TODO: enable cairo - # - cairo >=1.18 + - cairo >=1.18 - fribidi - glib - harfbuzz >=10.0.0 @@ -36,12 +35,26 @@ requirements: - graphite2 - libffi - expat + - pixman + - zlib tests: +- package_contents: + bin: + - pango-view.js + - pango-list.wasm + - pango-segmentation.worker.js + lib: + - libpango-1.0.a + - libpangoft2-1.0.a + - libpangocairo-1.0.a + include: + - pango-1.0/pango/pango.h - script: - - test -f $PREFIX/lib/libpango-1.0.a - - test -f $PREFIX/lib/libpangoft2-1.0.a - - test -f $PREFIX/include/pango-1.0/pango/pango.h + - node $PREFIX/bin/pango-view.js --help + requirements: + build: + - nodejs about: homepage: http://www.pango.org/ From 046024f9bf867ba8155feb2d211ab69f2bfaf7e3 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Thu, 28 Nov 2024 01:14:14 +0000 Subject: [PATCH 324/333] Update pybind11 from 2.13.2 to 2.13.3 --- recipes/recipes_emscripten/pybind11/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/pybind11/recipe.yaml b/recipes/recipes_emscripten/pybind11/recipe.yaml index 7747b8483..a26a216ef 100644 --- a/recipes/recipes_emscripten/pybind11/recipe.yaml +++ b/recipes/recipes_emscripten/pybind11/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.13.2 + version: 2.13.3 package: name: pybind11 @@ -7,7 +7,7 @@ package: source: url: https://github.com/pybind/pybind11/archive/refs/tags/v${{ version }}.tar.gz - sha256: 50eebef369d28f07ce1fe1797f38149e5928817be8e539239f2aadfd95b227f3 + sha256: 6e7a84ec241544f2f5e30c7a82c09c81f0541dd14e9d9ef61051e07105f9c445 patches: - patches/0001-no-bitsize-check.patch build: From fa03bf9c518c21c24d2b6db56940deca37150347 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Thu, 28 Nov 2024 01:14:47 +0000 Subject: [PATCH 325/333] Update numpy from 2.1.2 to 2.1.3 --- 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 e8bd78e2a..b3ba998fb 100644 --- a/recipes/recipes_emscripten/numpy/recipe.yaml +++ b/recipes/recipes_emscripten/numpy/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 2.1.2 + version: 2.1.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: 13532a088217fa624c99b843eeb54640de23b3414b14aa66d023805eb731066c + sha256: aa08e04e08aaf974d4458def539dece0d28146d866a39da5639596f4921fd761 build: number: 0 From f8c1b3fd845398e8edebf8cd673e3f5492c4a696 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Fri, 29 Nov 2024 11:24:35 +0100 Subject: [PATCH 326/333] Build fribidi with fPIC (#1440) --- recipes/recipes_emscripten/fribidi/build.sh | 2 ++ recipes/recipes_emscripten/fribidi/recipe.yaml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/recipes_emscripten/fribidi/build.sh b/recipes/recipes_emscripten/fribidi/build.sh index d5f00f548..bb4196b04 100644 --- a/recipes/recipes_emscripten/fribidi/build.sh +++ b/recipes/recipes_emscripten/fribidi/build.sh @@ -1,3 +1,5 @@ +export CFLAGS="$CFLAGS -fPIC" + emconfigure ./configure \ --enable-shared=no \ --enable-static=yes \ diff --git a/recipes/recipes_emscripten/fribidi/recipe.yaml b/recipes/recipes_emscripten/fribidi/recipe.yaml index 5bb1fb94d..b60ef0ab4 100644 --- a/recipes/recipes_emscripten/fribidi/recipe.yaml +++ b/recipes/recipes_emscripten/fribidi/recipe.yaml @@ -11,7 +11,7 @@ source: sha256: 1b1cde5b235d40479e91be2f0e88a309e3214c8ab470ec8a2744d82a5a9ea05c build: - number: 0 + number: 1 requirements: build: From 802749c32bb867626eccc76ec07ed621f6a853ac Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Fri, 29 Nov 2024 12:33:53 +0100 Subject: [PATCH 327/333] Build expat with fPIC (#1442) --- recipes/recipes_emscripten/expat/build.sh | 12 +++---- recipes/recipes_emscripten/expat/recipe.yaml | 38 ++++++++++++-------- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/recipes/recipes_emscripten/expat/build.sh b/recipes/recipes_emscripten/expat/build.sh index a1312c32e..0c280d914 100644 --- a/recipes/recipes_emscripten/expat/build.sh +++ b/recipes/recipes_emscripten/expat/build.sh @@ -2,16 +2,14 @@ # Get an updated config.sub and config.guess cp $BUILD_PREFIX/share/libtool/build-aux/config.* ./conftools +export CFLAGS="-fPIC" + emconfigure ./configure --prefix=$PREFIX \ - --host=${HOST} \ - --build=${BUILD} \ --enable-static \ --disable-shared -make -j${CPU_COUNT} ${VERBOSE_AT} +make -j${CPU_COUNT} -# if [[ "${CONDA_BUILD_CROSS_COMPILATION}" != "1" ]]; then -# make check -# fi +make install -make install \ No newline at end of file +cp xmlwf/xmlwf.wasm $PREFIX/bin/ \ No newline at end of file diff --git a/recipes/recipes_emscripten/expat/recipe.yaml b/recipes/recipes_emscripten/expat/recipe.yaml index 5dc6fd777..304706d83 100644 --- a/recipes/recipes_emscripten/expat/recipe.yaml +++ b/recipes/recipes_emscripten/expat/recipe.yaml @@ -1,9 +1,10 @@ context: + name: expat version: 2.4.8 ver: ${{ version|replace('.', '_') }} package: - name: expat + name: ${{ name }} version: ${{ version }} source: @@ -12,34 +13,41 @@ source: sha256: a247a7f6bbb21cf2ca81ea4cbb916bfb9717ca523631675f99b3d4a5678dcd16 build: - number: 0 - # run_exports: - # # changes soname at major versions, default settings OK - # # https://abi-laboratory.pro/tracker/timeline/expat/ - # - {{ pin_subpackage('expat') }} + number: 1 requirements: build: - # - cmake - ninja - - make # [unix] - - libtool # [unix] + - make + - automake<1.17 + - libtool - ${{ compiler('c') }} - ${{ compiler('cxx') }} - # host: - # - msinttypes # [win and vc<14] -# test: -# commands: -# - xmlwf -h +tests: +- package_contents: + bin: + - xmlwf.wasm + lib: + - libexpat.a + include: + - expat.h +- script: + - node $PREFIX/bin/xmlwf -h + requirements: + build: + - nodejs + about: license: MIT license_family: MIT license_file: COPYING summary: Expat XML parser library in C - homepage: http://expat.sourceforge.net/ + repository: https://github.com/libexpat/libexpat + extra: recipe-maintainers: - wolfv + - IsabelParedes From c56d262f70991225109b662f41cc2579fbb6a073 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Fri, 29 Nov 2024 12:45:59 +0100 Subject: [PATCH 328/333] Update expat from 2.4.8 to 2.5.0 (#1443) --- recipes/recipes_emscripten/expat/recipe.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/recipes_emscripten/expat/recipe.yaml b/recipes/recipes_emscripten/expat/recipe.yaml index 304706d83..b68d727c3 100644 --- a/recipes/recipes_emscripten/expat/recipe.yaml +++ b/recipes/recipes_emscripten/expat/recipe.yaml @@ -1,6 +1,6 @@ context: name: expat - version: 2.4.8 + version: 2.5.0 ver: ${{ version|replace('.', '_') }} package: @@ -10,10 +10,10 @@ package: source: url: https://github.com/libexpat/libexpat/releases/download/R_${{ ver }}/expat-${{ version }}.tar.bz2 - sha256: a247a7f6bbb21cf2ca81ea4cbb916bfb9717ca523631675f99b3d4a5678dcd16 + sha256: 6f0e6e01f7b30025fa05c85fdad1e5d0ec7fd35d9f61b22f34998de11969ff67 build: - number: 1 + number: 0 requirements: build: From 1f65134b8c97a1d80e5b9eec523f4b850abe480e Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Fri, 29 Nov 2024 12:53:01 +0100 Subject: [PATCH 329/333] Update expat from 2.5.0 to 2.6.4 (#1444) --- recipes/recipes_emscripten/expat/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/expat/recipe.yaml b/recipes/recipes_emscripten/expat/recipe.yaml index b68d727c3..55c01822b 100644 --- a/recipes/recipes_emscripten/expat/recipe.yaml +++ b/recipes/recipes_emscripten/expat/recipe.yaml @@ -1,6 +1,6 @@ context: name: expat - version: 2.5.0 + version: 2.6.4 ver: ${{ version|replace('.', '_') }} package: @@ -10,7 +10,7 @@ package: source: url: https://github.com/libexpat/libexpat/releases/download/R_${{ ver }}/expat-${{ version }}.tar.bz2 - sha256: 6f0e6e01f7b30025fa05c85fdad1e5d0ec7fd35d9f61b22f34998de11969ff67 + sha256: 8dc480b796163d4436e6f1352e71800a774f73dbae213f1860b60607d2a83ada build: number: 0 From 1d2db44799d9b1794a3205b280f42a6806fcd7c3 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Fri, 29 Nov 2024 13:31:07 +0100 Subject: [PATCH 330/333] Build libpng with fPIC (#1445) --- recipes/recipes_emscripten/libpng/build.sh | 6 +++++- recipes/recipes_emscripten/libpng/recipe.yaml | 14 ++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/recipes/recipes_emscripten/libpng/build.sh b/recipes/recipes_emscripten/libpng/build.sh index 1804ab41a..a019296f9 100644 --- a/recipes/recipes_emscripten/libpng/build.sh +++ b/recipes/recipes_emscripten/libpng/build.sh @@ -5,7 +5,7 @@ rm $PREFIX/lib/libz.so* cp $BUILD_PREFIX/share/libtool/build-aux/config.* . # atomics and bulk-memory are required for cairo -export CFLAGS="-I$PREFIX/include -matomics -mbulk-memory" +export CFLAGS="-I$PREFIX/include -matomics -mbulk-memory -fPIC" export CPPFLAGS="-I$PREFIX/include" export LDFLAGS="$LDFLAGS -L$PREFIX/lib" @@ -22,3 +22,7 @@ emmake make install # Not packaging any shared libraries rm $PREFIX/lib/libpng*.la + +# Copy wasm files +cp pngfix.wasm $PREFIX/bin/ +cp png-fix-itxt.wasm $PREFIX/bin/ diff --git a/recipes/recipes_emscripten/libpng/recipe.yaml b/recipes/recipes_emscripten/libpng/recipe.yaml index c80bba40f..fbbc68bf8 100644 --- a/recipes/recipes_emscripten/libpng/recipe.yaml +++ b/recipes/recipes_emscripten/libpng/recipe.yaml @@ -11,7 +11,7 @@ source: sha256: 8c25a7792099a0089fa1cc76c94260d0bb3f1ec52b93671b572f8bb61577b732 build: - number: 0 + number: 1 requirements: build: @@ -21,10 +21,16 @@ requirements: - zlib tests: +- package_contents: + bin: + - pngfix.wasm + - png-fix-itxt.wasm + lib: + - libpng16.a + include: + - png.h - script: - - test -f ${PREFIX}/lib/libpng.a - - test -f ${PREFIX}/include/png.h - - libpng-config --version + - libpng-config --version about: license: zlib-acknowledgement From 2b9f99cc8e30523e90919ab6dc8c72db0772b2e4 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Sat, 30 Nov 2024 01:13:40 +0000 Subject: [PATCH 331/333] Update ipython from 8.29.0 to 8.30.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 29f0d5229..d44ad174d 100644 --- a/recipes/recipes_emscripten/ipython/recipe.yaml +++ b/recipes/recipes_emscripten/ipython/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 8.29.0 + version: 8.30.0 package: name: ipython @@ -7,7 +7,7 @@ package: source: - url: https://pypi.io/packages/source/i/ipython/ipython-${{ version }}.tar.gz - sha256: 40b60e15b22591450eef73e40a027cf77bd652e757523eebc5bd7c7c498290eb + sha256: cb0a405a306d2995a5cbb9901894d240784a9f341394c6ba3f4fe8c6eb89ff6e patches: - patches/0001-Patch-asyncio-tornado.patch From 33ce10d8b7f3385afac2832513341308ebc4f711 Mon Sep 17 00:00:00 2001 From: emscripten-forge-bot Date: Sun, 1 Dec 2024 01:25:56 +0000 Subject: [PATCH 332/333] Update matplotlib from 3.9.2 to 3.9.3 --- recipes/recipes_emscripten/matplotlib/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/matplotlib/recipe.yaml b/recipes/recipes_emscripten/matplotlib/recipe.yaml index dc4aaa0fa..5d6e3b8a9 100644 --- a/recipes/recipes_emscripten/matplotlib/recipe.yaml +++ b/recipes/recipes_emscripten/matplotlib/recipe.yaml @@ -1,10 +1,10 @@ context: name: matplotlib - version: 3.9.2 + version: 3.9.3 source: - url: https://github.com/matplotlib/matplotlib/archive/v${{ version }}.tar.gz - sha256: 9c49b6683a34469e6d20864c7d5b975c4f29d7c60de1ce857980bead48769c3f + sha256: 4929c085a0116fcd0f672d6dee97d9191385f5449d59385cd5c48c04b1565912 patches: - patches/fix-threading-and-font-cache.patch From a7fc3c568c952e8439b5912f54f234da66d7675f Mon Sep 17 00:00:00 2001 From: R2 <136319114+emscripten-forge-bot@users.noreply.github.com> Date: Mon, 2 Dec 2024 05:41:46 +0100 Subject: [PATCH 333/333] Update proj from 9.5.0 to 9.5.1 (#1448) Co-authored-by: emscripten-forge-bot --- recipes/recipes_emscripten/proj/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/recipes_emscripten/proj/recipe.yaml b/recipes/recipes_emscripten/proj/recipe.yaml index 50d28b0b6..a6e93ee64 100644 --- a/recipes/recipes_emscripten/proj/recipe.yaml +++ b/recipes/recipes_emscripten/proj/recipe.yaml @@ -1,6 +1,6 @@ context: name: proj - version: 9.5.0 + version: 9.5.1 package: name: ${{ name }} @@ -8,7 +8,7 @@ package: source: url: https://download.osgeo.org/proj/proj-${{ version }}.tar.gz - sha256: 659af0d558f7c5618c322fde2d3392910806faee8684687959339021fa207d99 + sha256: a8395f9696338ffd46b0feb603edbb730fad6746fba77753c77f7f997345e3d3 build: number: 1