%undefine __cmake_in_source_build %bcond_without check %global commit 3e8207aabe969098d2b4941142a1973008c63033 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global ts_commit 7ef86ddeed81458f9031a49a40b3a3f99c1c6a8a %global ts_shortcommit %(c=%{ts_commit}; echo ${c:0:7}) %global wc_commit b6dd1fb658a282c64b029867845bc50ae59e1497 %global wc_shortcommit %(c=%{wc_commit}; echo ${c:0:7}) Summary: The WebAssembly Binary Toolkit Name: wabt Version: 1.0.33 Release: 2%{?dist} URL: https://github.com/WebAssembly/wabt Source0: https://github.com/WebAssembly/wabt/archive/%{version}/%{name}-%{version}.tar.gz Source1: https://github.com/WebAssembly/testsuite/archive/%{ts_commit}/%{name}-testsuite-%{ts_shortcommit}.tar.gz Source2: https://github.com/WebAssembly/wasm-c-api/archive/%{wc_commit}/%{name}-wasm-c-api-%{wc_shortcommit}.tar.gz # https://github.com/WebAssembly/wabt/issues/1885 Patch0: wabt-tests.patch Patch1: wabt-tests-i686.patch License: ASL 2.0 BuildRequires: cmake3 BuildRequires: gcc-c++ BuildRequires: openssl-devel %if %{with check} BuildRequires: gtest-devel BuildRequires: python%{python3_pkgversion}-ply BuildRequires: simde-devel >= 0.7.4~rc4 %endif # wasm.h from https://github.com/WebAssembly/wasm-c-api/ is used for build Provides: bundled(wasm-c-api) = %{wc_commit} %description WABT (we pronounce it "wabbit") is a suite of tools for WebAssembly. These tools are intended for use in (or for development of) toolchains or other systems that want to manipulate WebAssembly files. Unlike the WebAssembly spec interpreter (which is written to be as simple, declarative and "speccy" as possible), they are written in C/C++ and designed for easier integration into other systems. Unlike Binaryen these tools do not aim to provide an optimization platform or a higher-level compiler target; instead they aim for full fidelity and compliance with the spec (e.g. 1:1 round-trips with no changes to instructions). %prep %setup -q rmdir third_party/wasm-c-api tar xzf %{S:2} -C third_party mv third_party/wasm-c-api{-%{wc_commit},} %if %{with check} rmdir third_party/testsuite tar xzf %{S:1} -C third_party mv third_party/testsuite{-%{ts_commit},} %patch 0 -p1 -b .orig %ifarch i686 %patch 1 -p1 -b .i686 %endif pushd test # https://github.com/WebAssembly/wabt/issues/2118 # https://github.com/WebAssembly/wabt/issues/2240 # https://bugzilla.redhat.com/show_bug.cgi?id=2210218 %ifarch aarch64 rm spec/relaxed-simd/relaxed_madd_nmadd.txt rm wasm2c/spec/simd_address.txt rm wasm2c/spec/simd_f32x4.txt %endif # https://github.com/WebAssembly/wabt/issues/1044 %ifarch i686 rm spec/float_exprs.txt rm spec/float_misc.txt rm spec/local_tee.txt rm spec/simd_f32x4_arith.txt rm spec/simd_f32x4_pmin_pmax.txt rm spec/simd_f64x2_arith.txt rm spec/simd_f64x2_pmin_pmax.txt rm wasm2c/spec/conversions.txt rm wasm2c/spec/float_memory.txt rm wasm2c/spec/float_misc.txt rm wasm2c/spec/float_exprs.txt rm wasm2c/spec/local_tee.txt rm wasm2c/spec/memory64/float_memory64.txt rm wasm2c/spec/multi-memory/float_memory0.txt rm wasm2c/spec/select.txt %endif # https://github.com/WebAssembly/wabt/issues/1045 # https://github.com/WebAssembly/wabt/issues/2118 # https://github.com/WebAssembly/wabt/issues/2240 %ifarch ppc64le rm spec/conversions.txt rm spec/relaxed-simd/relaxed_madd_nmadd.txt rm spec/simd_conversions.txt rm wasm2c/spec/conversions.txt rm wasm2c/spec/simd_address.txt rm wasm2c/spec/simd_bit_shift.txt rm wasm2c/spec/simd_f32x4_arith.txt rm wasm2c/spec/simd_f32x4_pmin_pmax.txt rm wasm2c/spec/simd_f64x2_pmin_pmax.txt rm wasm2c/spec/simd_i16x8_arith.txt rm wasm2c/spec/simd_splat.txt %endif # https://github.com/WebAssembly/wabt/issues/2070 # https://github.com/WebAssembly/wabt/issues/2118 # https://github.com/WebAssembly/wabt/issues/2240 %ifarch s390x rm spec/relaxed-simd/relaxed_madd_nmadd.txt rm wasm2c/spec/bulk.txt rm wasm2c/spec/extended-const/data.txt rm wasm2c/spec/memory_copy.txt rm wasm2c/spec/memory_fill.txt rm wasm2c/spec/memory_init.txt rm wasm2c/spec/multi-memory/memory-multi.txt rm wasm2c/spec/multi-memory/memory_copy0.txt rm wasm2c/spec/multi-memory/memory_fill0.txt rm wasm2c/spec/simd_address.txt rm wasm2c/spec/simd_align.txt rm wasm2c/spec/simd_const.txt rm wasm2c/spec/simd_f64x2.txt rm wasm2c/spec/simd_f64x2_arith.txt rm wasm2c/spec/simd_i16x8_arith.txt rm wasm2c/spec/simd_i16x8_cmp.txt rm wasm2c/spec/simd_i16x8_sat_arith.txt rm wasm2c/spec/simd_i32x4_arith.txt rm wasm2c/spec/simd_i32x4_cmp.txt rm wasm2c/spec/simd_i64x2_arith.txt rm wasm2c/spec/simd_i64x2_arith2.txt rm wasm2c/spec/simd_i8x16_arith.txt rm wasm2c/spec/simd_i8x16_cmp.txt rm wasm2c/spec/simd_i8x16_sat_arith.txt rm wasm2c/spec/simd_lane.txt rm wasm2c/spec/simd_load.txt rm wasm2c/spec/simd_load16_lane.txt rm wasm2c/spec/simd_load32_lane.txt rm wasm2c/spec/simd_load64_lane.txt rm wasm2c/spec/simd_load8_lane.txt rm wasm2c/spec/simd_load_extend.txt rm wasm2c/spec/simd_load_splat.txt rm wasm2c/spec/simd_load_zero.txt rm wasm2c/spec/simd_store.txt rm wasm2c/spec/simd_store16_lane.txt rm wasm2c/spec/simd_store32_lane.txt rm wasm2c/spec/simd_store64_lane.txt rm wasm2c/spec/simd_store8_lane.txt rm wasm2c/spec-multi-output/memory_init.txt %endif popd %endif %build %cmake3 -DUSE_SYSTEM_GTEST=ON %cmake3_build %install %cmake3_install %if %{with check} %check test/run-tests.py -v --bindir %{_vpath_builddir} --timeout=1200 %{?_smp_mflags} %endif %files %license LICENSE %doc README.md %{_bindir}/spectest-interp %{_bindir}/wasm-decompile %{_bindir}/wasm-interp %{_bindir}/wasm-objdump %{_bindir}/wasm-opcodecnt %{_bindir}/wasm-strip %{_bindir}/wasm-validate %{_bindir}/wasm2c %{_bindir}/wasm2wat %{_bindir}/wast2json %{_bindir}/wat-desugar %{_bindir}/wat2wasm %{_datadir}/wabt %{_includedir}/wabt %{_includedir}/wasm-rt.h %{_includedir}/wasm-rt-exceptions.h %{_libdir}/cmake/wabt %{_libdir}/libwabt.a %{_libdir}/libwasm-rt-impl.a %{_mandir}/man1/spectest-interp.1* %{_mandir}/man1/wasm-decompile.1* %{_mandir}/man1/wasm-interp.1* %{_mandir}/man1/wasm-objdump.1* %{_mandir}/man1/wasm-opcodecnt.1* %{_mandir}/man1/wasm-strip.1* %{_mandir}/man1/wasm-validate.1* %{_mandir}/man1/wasm2c.1* %{_mandir}/man1/wasm2wat.1* %{_mandir}/man1/wast2json.1* %{_mandir}/man1/wat-desugar.1* %{_mandir}/man1/wat2wasm.1* %changelog * Sat Jul 22 2023 Fedora Release Engineering - 1.0.33-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Thu May 25 2023 Dominik Mierzejewski 1.0.33-1 - update to 1.0.33 (#2203483) - drop obsolete patch - disable failing tests on aarch64 and ppc64le (reported upstream) - fix running tests on i686 - disable failing wasm2c tests on s390x (big endian not supported upstream) - fix deprecated patchN macro usage * Sat Jan 21 2023 Fedora Release Engineering - 1.0.32-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Tue Jan 03 2023 Dominik Mierzejewski 1.0.32-1 - update to 1.0.32 (#2156897) - skip one new failing test on aarch64, ppc64le and s390x for now * Fri Dec 09 2022 Dominik Mierzejewski 1.0.31-1 - update to 1.0.31 (#2143772) - fix build on 32-bit - fix build --without check * Sat Oct 15 2022 Dominik Mierzejewski 1.0.30-1 - update to 1.0.30 (#2132095) - increase timeout to fix tests on ARM - skip some new failing tests on i686 and s390x for now * Sat Jul 23 2022 Fedora Release Engineering - 1.0.29-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Wed May 25 2022 Dominik Mierzejewski 1.0.29-1 - update to 1.0.29 * Fri Apr 01 2022 Dominik Mierzejewski 1.0.28-1 - update to 1.0.28 (#2065997) - run fixed tests on 32-bit again - work around test failures due to new gcc-12 warnings * Tue Mar 15 2022 Dominik Mierzejewski 1.0.27-1 - update to 1.0.27 (#2055947) - drop armv7hl * Mon Feb 07 2022 Dominik Mierzejewski 1.0.25-1 - update to 1.0.25 (#2047107) - skip some new failing tests on 32-bit - skip two more failing tests on i686 * Sat Jan 22 2022 Fedora Release Engineering - 1.0.24-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Aug 20 2021 Dominik Mierzejewski 1.0.24-1 - update to 1.0.24 (#1993479) - enable skipped tests on s390x (fixed upstream) * Fri Jul 23 2021 Fedora Release Engineering - 1.0.23-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri May 14 2021 Dominik Mierzejewski 1.0.23-1 - update to 1.0.23 (#1934466) - drop obsolete patch - skip some failing tests on s390x and ppc64le (reported upstream) * Tue Feb 02 2021 Dominik Mierzejewski 1.0.20-3.20210130git09ac53e - update to 09ac53e git snapshot - enable building on big-endian (fixed upstream) * Wed Jan 27 2021 Fedora Release Engineering - 1.0.20-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Fri Nov 13 2020 Dominik Mierzejewski 1.0.20-1 - update to 1.0.20 (#1896654) * Mon Aug 17 2020 Dominik Mierzejewski 1.0.19-1 - update to 1.0.19 (#1838384) - drop obsolete patches - adapt to https://www.fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds * Wed Jul 29 2020 Fedora Release Engineering - 1.0.17-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Fri Jul 24 2020 Jeff Law 1.0.17-2 - Use __cmake_in_source_build * Tue Jul 14 2020 Dominik Mierzejewski 1.0.17-1 - update to 1.0.17 (#1838384) - backport a fix for 32-bit arches - stop pretending it works on big-endian - use names and macros portable across Fedora and EPEL * Wed May 06 2020 Dominik Mierzejewski 1.0.15-1 - update to 1.0.15 (#1832317) - pathfix.py no longer required, upstream moved to python3-only - skip new failing tests in i686 and ppc64le (reported upstream) * Fri Mar 20 2020 Dominik Mierzejewski 1.0.13-1 - update to 1.0.13 (#1792557) - drop obsolete patch and work-arounds - bundle wasm-c-api (only wasm.h used for build) - double test timeout again to prevent failures on armv7hl * Fri Jan 31 2020 Fedora Release Engineering - 1.0.12-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Sat Sep 28 2019 Dominik Mierzejewski 1.0.12-1 - update to 1.0.12 (#1755644) - drop obsolete patch - disable regress/regress-30.txt until fixed for python3 - fix running test/wasm2c/spec tests under python3 * Thu Sep 12 2019 Dominik Mierzejewski 1.0.11-1 - update to 1.0.11 - drop obsolete patches * Sat Jul 27 2019 Fedora Release Engineering - 1.0.10-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Mon Apr 15 2019 Dominik Mierzejewski 1.0.10-2 - backport some fixes for test failures from upstream git - run tests in parallel and double timeout to prevent failures on armv7hl * Thu Mar 14 2019 Dominik Mierzejewski 1.0.10-1 - initial build