git: 012d37674061 - main - www/wabt: Install libwabt-fuzz.so when FUZZ_TOOLS is ON

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sat, 25 Jul 2026 05:25:41 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=012d376740619504b9f026cf74ac98cf013fe230

commit 012d376740619504b9f026cf74ac98cf013fe230
Author:     Hiroki Tagato <tagattie@FreeBSD.org>
AuthorDate: 2026-07-25 05:07:51 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-07-25 05:25:24 +0000

    www/wabt: Install libwabt-fuzz.so when FUZZ_TOOLS is ON
    
    PR:     297036
---
 www/wabt/Makefile                   |  1 +
 www/wabt/files/patch-CMakeLists.txt | 23 ++++++++++++++++++-----
 www/wabt/pkg-plist                  |  1 +
 3 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/www/wabt/Makefile b/www/wabt/Makefile
index f92246cdfd11..2f97565cb8dd 100644
--- a/www/wabt/Makefile
+++ b/www/wabt/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	wabt
 DISTVERSION=	1.0.41
+PORTREVISION=	1
 CATEGORIES=	www
 
 MAINTAINER=	yuri@FreeBSD.org
diff --git a/www/wabt/files/patch-CMakeLists.txt b/www/wabt/files/patch-CMakeLists.txt
index cc3e0ada75b3..823dbf85f583 100644
--- a/www/wabt/files/patch-CMakeLists.txt
+++ b/www/wabt/files/patch-CMakeLists.txt
@@ -1,6 +1,6 @@
---- CMakeLists.txt.orig	2024-05-14 22:23:51 UTC
+--- CMakeLists.txt.orig	2026-05-06 18:39:06 UTC
 +++ CMakeLists.txt
-@@ -391,7 +391,7 @@ set(WABT_LIBRARY_SRC ${WABT_LIBRARY_CC} ${WABT_LIBRARY
+@@ -396,7 +396,7 @@ set(WABT_LIBRARY_SRC ${WABT_LIBRARY_CC} ${WABT_LIBRARY
  
  set(WABT_LIBRARY_SRC ${WABT_LIBRARY_CC} ${WABT_LIBRARY_H})
  
@@ -9,16 +9,16 @@
  add_dependencies(wabt gen-wasm2c-prebuilt-target)
  add_library(wabt::wabt ALIAS wabt)
  
-@@ -425,7 +425,7 @@ if (HAVE_SETJMP_H)
+@@ -430,7 +430,7 @@ if (HAVE_SETJMP_H)
  if (HAVE_SETJMP_H)
-   set(WASM_RT_FILES "wasm2c/wasm-rt-impl.h" "wasm2c/wasm-rt-impl.c" "wasm2c/wasm-rt-exceptions-impl.c" "wasm2c/wasm-rt-mem-impl.c")
+   set(WASM_RT_FILES "wasm2c/wasm-rt-impl.h" "wasm2c/wasm-rt-impl.c" "wasm2c/wasm-rt-exceptions-impl.c" "wasm2c/wasm-rt-mem-impl.c" "wasm2c/wasm-rt-impl-tableops.inc" "wasm2c/wasm-rt-mem-impl-helper.inc")
  
 -  add_library(wasm-rt-impl STATIC ${WASM_RT_FILES})
 +  add_library(wasm-rt-impl ${WASM_RT_FILES})
    target_link_libraries(wasm-rt-impl ${CMAKE_THREAD_LIBS_INIT})
    add_library(wabt::wasm-rt-impl ALIAS wasm-rt-impl)
    if (WABT_BIG_ENDIAN)
-@@ -454,7 +454,7 @@ if (BUILD_FUZZ_TOOLS)
+@@ -459,12 +459,20 @@ if (BUILD_FUZZ_TOOLS)
  
  if (BUILD_FUZZ_TOOLS)
    set(FUZZ_FLAGS "-fsanitize=fuzzer,address")
@@ -27,3 +27,16 @@
    target_link_libraries(wabt-fuzz PUBLIC wabt)
    set_target_properties(wabt-fuzz
      PROPERTIES
+     COMPILE_FLAGS "${FUZZ_FLAGS}"
+   )
++  if (WABT_INSTALL_RULES)
++    install(
++      TARGETS wabt-fuzz
++      EXPORT wabt-targets
++      COMPONENT wabt-development
++      INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
++    )
++  endif ()
+ endif ()
+ 
+ # libwasm, which implenents the wasm C API
diff --git a/www/wabt/pkg-plist b/www/wabt/pkg-plist
index a04d7f989704..ba3ff32935f8 100644
--- a/www/wabt/pkg-plist
+++ b/www/wabt/pkg-plist
@@ -81,6 +81,7 @@ lib/cmake/wabt/wabt-config-version.cmake
 lib/cmake/wabt/wabt-config.cmake
 lib/cmake/wabt/wabt-targets-%%CMAKE_BUILD_TYPE%%.cmake
 lib/cmake/wabt/wabt-targets.cmake
+%%FUZZ_TOOLS%%lib/libwabt-fuzz.so
 lib/libwabt.so
 lib/libwasm-rt-impl.so
 share/man/man1/spectest-interp.1.gz