commit:     4ff61553ace74522dfed1aa0bb812a440e922676
Author:     Henri Gasc <gasc <AT> eurecom <DOT> fr>
AuthorDate: Wed Oct 11 08:24:36 2023 +0000
Commit:     Henri Gasc <gasc <AT> eurecom <DOT> fr>
CommitDate: Wed Oct 11 08:25:20 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4ff61553

app-editors/imhex: add patches

Closes: https://bugs.gentoo.org/915572
Signed-off-by: Henri Gasc <gasc <AT> eurecom.fr>

 app-editors/imhex/files/remove-Werror.patch        | 44 ++++++++++++++++++++++
 .../files/{llvm-16.patch => require-llvm-16.patch} |  8 +++-
 app-editors/imhex/imhex-1.31.0.ebuild              |  3 +-
 3 files changed, 52 insertions(+), 3 deletions(-)

diff --git a/app-editors/imhex/files/remove-Werror.patch 
b/app-editors/imhex/files/remove-Werror.patch
new file mode 100644
index 0000000000..e00aad7371
--- /dev/null
+++ b/app-editors/imhex/files/remove-Werror.patch
@@ -0,0 +1,44 @@
+From 94126d5ff7e5a6d6cdd7f515097383619725953b Mon Sep 17 00:00:00 2001
+From: Leoriem-code <henrig...@duck.com>
+Subject: [PATCH] remove -Werror
+
+diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake
+index da078878..3848fbeb 100644
+--- a/cmake/build_helpers.cmake
++++ b/cmake/build_helpers.cmake
+@@ -435,7 +435,7 @@ endfunction()
+ macro(setupCompilerFlags target)
+     if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
+         if (IMHEX_STRICT_WARNINGS)
+-            set(IMHEX_COMMON_FLAGS "-Wall -Wextra -Wpedantic -Werror")
++            set(IMHEX_COMMON_FLAGS "-Wall -Wextra -Wpedantic")
+         endif()
+ 
+         set(IMHEX_C_FLAGS "${IMHEX_COMMON_FLAGS} -Wno-array-bounds")
+
+diff --git a/lib/external/pattern_language/cli/CMakeLists.txt 
b/lib/external/pattern_language/cli/CMakeLists.txt
+index 39e6f90..01b5e87 100644
+--- a/lib/external/pattern_language/cli/CMakeLists.txt
++++ b/lib/external/pattern_language/cli/CMakeLists.txt
+@@ -28,7 +28,7 @@ if(NOT CLI11_FOUND)
+     set(CLI11_LIBRARIES CLI11::CLI11)
+ endif()
+ 
+-target_compile_options(plcli PRIVATE -Wall -Wextra -Werror 
-Wno-unknown-pragmas -Wno-array-bounds)
++target_compile_options(plcli PRIVATE -Wall -Wextra -Wno-unknown-pragmas 
-Wno-array-bounds)
+ target_include_directories(plcli PUBLIC include)
+ target_link_libraries(plcli PUBLIC ${CLI11_LIBRARIES} libpl libpl-gen 
fmt::fmt-header-only)
+ 
+diff --git a/lib/external/pattern_language/lib/CMakeLists.txt 
b/lib/external/pattern_language/lib/CMakeLists.txt
+index dab1499..0bfac35 100644
+--- a/lib/external/pattern_language/lib/CMakeLists.txt
++++ b/lib/external/pattern_language/lib/CMakeLists.txt
+@@ -71,7 +71,7 @@ add_library(libpl ${LIBRARY_TYPE}
+ )
+ 
+ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
+-    target_compile_options(libpl PRIVATE -Wall -Wextra -Werror -Wpedantic 
-Wno-unknown-pragmas -Wno-array-bounds)
++    target_compile_options(libpl PRIVATE -Wall -Wextra -Wpedantic 
-Wno-unknown-pragmas -Wno-array-bounds)
+     if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+         target_compile_options(libpl PRIVATE -Wno-stringop-overflow)
+     endif()

diff --git a/app-editors/imhex/files/llvm-16.patch 
b/app-editors/imhex/files/require-llvm-16.patch
similarity index 66%
rename from app-editors/imhex/files/llvm-16.patch
rename to app-editors/imhex/files/require-llvm-16.patch
index 5c7efa5faa..7642e7654d 100644
--- a/app-editors/imhex/files/llvm-16.patch
+++ b/app-editors/imhex/files/require-llvm-16.patch
@@ -1,8 +1,12 @@
+From 8d86cd22a743c39a04d34d4cf1a104952cf7fbac Mon Sep 17 00:00:00 2001
+From: xiaoming <xiangluoming2...@outlook.com>
+Subject: [PATCH] require llvm 16
+
 diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake
-index 624e401..cfd30c3 100644
+index 0d4839e7..da078878 100644
 --- a/cmake/build_helpers.cmake
 +++ b/cmake/build_helpers.cmake
-@@ -503,7 +503,7 @@ macro(addBundledLibraries)
+@@ -525,7 +525,7 @@ macro(addBundledLibraries)
          add_subdirectory(${EXTERN_LIBS_FOLDER}/llvm-demangle EXCLUDE_FROM_ALL)
          set_target_properties(LLVMDemangle PROPERTIES 
POSITION_INDEPENDENT_CODE ON)
      else()

diff --git a/app-editors/imhex/imhex-1.31.0.ebuild 
b/app-editors/imhex/imhex-1.31.0.ebuild
index ccbb9ef59a..3d29199d1f 100644
--- a/app-editors/imhex/imhex-1.31.0.ebuild
+++ b/app-editors/imhex/imhex-1.31.0.ebuild
@@ -23,7 +23,8 @@ KEYWORDS="~amd64"
 IUSE="+system-llvm"
 
 PATCHES=(
-       "${FILESDIR}/llvm-16.patch"
+       "${FILESDIR}/require-llvm-16.patch"
+       "${FILESDIR}/remove-Werror.patch"
 )
 
 DEPEND="

Reply via email to