about summary refs log tree commit diff
path: root/patches
diff options
context:
space:
mode:
Diffstat (limited to 'patches')
-rw-r--r--patches/fuzzy-sat-include.patch83
-rw-r--r--patches/fuzzy-sat-install.patch37
2 files changed, 34 insertions, 86 deletions
diff --git a/patches/fuzzy-sat-include.patch b/patches/fuzzy-sat-include.patch
deleted file mode 100644
index 6798bbd..0000000
--- a/patches/fuzzy-sat-include.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-commit bfd24f9cb93fab5317d16c879857221cc70e54c8
-Author: Nguyễn Gia Phong <cnx@loang.net>
-Date:   2025-04-24 11:25:20 +0900
-
-    Include stdio.h
-
-diff --git a/lib/testcase-list.c b/lib/testcase-list.c
-index 0aa223b7a7e4..6457fd5cab87 100644
---- a/lib/testcase-list.c
-+++ b/lib/testcase-list.c
-@@ -1,4 +1,5 @@
- #include <fts.h>
-+#include <stdio.h>
- #include <stdlib.h>
- #include "testcase-list.h"
- 
-diff --git a/lib/z3-fuzzy-debug-utils.h b/lib/z3-fuzzy-debug-utils.h
-index 0f6f3b891a52..7b88add6c294 100644
---- a/lib/z3-fuzzy-debug-utils.h
-+++ b/lib/z3-fuzzy-debug-utils.h
-@@ -1,3 +1,5 @@
-+#include <stdio.h>
-+
- static inline void print_index_queue(ast_info_ptr data)
- {
-     index_group_t* group;
-diff --git a/lib/z3-fuzzy.c b/lib/z3-fuzzy.c
-index cac1c329088d..69ecb006fd1f 100644
---- a/lib/z3-fuzzy.c
-+++ b/lib/z3-fuzzy.c
-@@ -1,6 +1,7 @@
- #define FUZZY_SOURCE
- 
- #include <fcntl.h>
-+#include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
- #include "gradient_descend.h"
-diff --git a/tools/fuzzy-solver-notify.c b/tools/fuzzy-solver-notify.c
-index 821d3aaff15f..97abd8f71488 100644
---- a/tools/fuzzy-solver-notify.c
-+++ b/tools/fuzzy-solver-notify.c
-@@ -1,5 +1,6 @@
- #define FUZZY_SOURCE
- 
-+#include <stdio.h>
- #include <stdlib.h>
- #include <assert.h>
- #include <sys/time.h>
-diff --git a/tools/fuzzy-solver-vs-z3.c b/tools/fuzzy-solver-vs-z3.c
-index 8803ff390fa2..ba4e8f5b979a 100644
---- a/tools/fuzzy-solver-vs-z3.c
-+++ b/tools/fuzzy-solver-vs-z3.c
-@@ -1,3 +1,4 @@
-+#include <stdio.h>
- #include <stdlib.h>
- #include <assert.h>
- #include <sys/time.h>
-diff --git a/tools/stats-collection-fuzzy.c b/tools/stats-collection-fuzzy.c
-index fdef41761726..c793b1df717d 100644
---- a/tools/stats-collection-fuzzy.c
-+++ b/tools/stats-collection-fuzzy.c
-@@ -1,3 +1,4 @@
-+#include <stdio.h>
- #include <stdlib.h>
- #include <assert.h>
- #include <sys/time.h>
-diff --git a/tools/stats-collection-z3.c b/tools/stats-collection-z3.c
-index 504648a1a6c3..f101eeedb32f 100644
---- a/tools/stats-collection-z3.c
-+++ b/tools/stats-collection-z3.c
-@@ -1,3 +1,4 @@
-+#include <stdio.h>
- #include <stdlib.h>
- #include <assert.h>
- #include <sys/time.h>
-@@ -105,4 +106,4 @@ int main(int argc, char* argv[])
-     Z3_del_context(ctx);
-     fclose(log_file);
-     return 0;
--}
-\ No newline at end of file
-+}
diff --git a/patches/fuzzy-sat-install.patch b/patches/fuzzy-sat-install.patch
index 3ea77a1..2c68cbc 100644
--- a/patches/fuzzy-sat-install.patch
+++ b/patches/fuzzy-sat-install.patch
@@ -1,11 +1,42 @@
-commit d36429fa541c69c566f981cd159b82f85d02b4fd
+commit 3a8ce277d2f26409a1eb139641f0733979bd21ab
 Author: Nguyễn Gia Phong <cnx@loang.net>
 Date:   2025-04-24 13:10:50 +0900
 
     Install libraries and tools
 
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7cfa95cc7174..695bc8757fa5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ cmake_minimum_required(VERSION 3.7)
+-
++include(CMakePackageConfigHelpers)
+ set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
+ 
+ project(Z3Fuzzy)
+@@ -7,3 +7,10 @@ project(Z3Fuzzy)
+ set(Z3_BUILD_PYTHON_BINDINGS true)
+ add_subdirectory(lib)
+ add_subdirectory(tools)
++
++install(EXPORT Z3Fuzzy DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Z3Fuzzy)
++configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
++  "${CMAKE_CURRENT_BINARY_DIR}/Z3FuzzyConfig.cmake"
++  INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Z3Fuzzy)
++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/Z3FuzzyConfig.cmake"
++        DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Z3Fuzzy)
+diff --git a/Config.cmake.in b/Config.cmake.in
+new file mode 100644
+index 000000000000..64b0eaa487fb
+--- /dev/null
++++ b/Config.cmake.in
+@@ -0,0 +1,3 @@
++@PACKAGE_INIT@
++include("${CMAKE_CURRENT_LIST_DIR}/Z3Fuzzy.cmake")
++check_required_components(Z3Fuzzy)
 diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
-index 558c01b7c725..aca4d9210862 100644
+index 558c01b7c725..c30f0f41206a 100644
 --- a/lib/CMakeLists.txt
 +++ b/lib/CMakeLists.txt
 @@ -31,7 +31,9 @@ target_link_libraries(Z3Fuzzy_static
@@ -20,7 +51,7 @@ index 558c01b7c725..aca4d9210862 100644
 +                      PUBLIC_HEADER z3-fuzzy.h)
  
 -install(FILES z3-fuzzy.h DESTINATION include)
-+install(TARGETS Z3Fuzzy_shared Z3Fuzzy_static)
++install(TARGETS Z3Fuzzy_shared Z3Fuzzy_static EXPORT Z3Fuzzy)
 diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
 index a9c1a07fc541..732818c3ad9e 100644
 --- a/tools/CMakeLists.txt