Skip to content

Commit

Permalink
update LIEF to 0.16 (#6046)
Browse files Browse the repository at this point in the history
* init

* fixup

* fixup patch

* fix build

* fmt

* clean

* check

* follow upstream

* follow upstream

* revise

* typo
  • Loading branch information
luadebug authored Dec 26, 2024
1 parent b8de188 commit 37d5a92
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/l/lief/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ package("lief")
set_urls("https://github.com/lief-project/LIEF/archive/refs/tags/$(version).tar.gz",
"https://github.com/lief-project/LIEF.git")

add_versions("0.16.0", "532be16c49539aa98156a9f59c0cd8e7ad6f6b93afbfc6346ad6cb95edf246c2")
add_versions("0.15.1", "28653b59afc8b8b255251f21a0f3cbfbdec05dd988fb3f473e22dde28f427ad8")
add_versions("0.10.1", "6f30c98a559f137e08b25bcbb376c0259914b33c307b8b901e01ca952241d00a")
add_versions("0.11.5", "6d6d57304a56850958e4ce54f3da2ea2b9eb856ccbab61c6cde9cba15d7c9da5")
add_versions("0.14.0", "400804e38cb5ce8d15fb52a4db6345f02da7b2e5cb773665712283001482b808")
add_versions("0.14.1", "92916dcb3178353d863aef4f409186889983c56e025b774741d5316a72ec3a7d")

add_patches("<=0.15.1", "patches/0.15.1/algorithm.patch", "3e110539c3db037b2b24cd32f97ad8cc6241b1f69d4a65dab9fd6c84e482bbd9")

add_patches("0.15.1", "patches/0.15.1/algorithm.patch", "3e110539c3db037b2b24cd32f97ad8cc6241b1f69d4a65dab9fd6c84e482bbd9")
add_patches("0.16.0", "https://github.com/lief-project/LIEF/commit/41166332a2435fdb7d2bdc5c73f9ff9b442c5459.patch", "e42e5dd7e4c7a24bf712c1a7c9efa19c9daf835fc85dd35c8ab4b81d1807d833")

add_configs("elf", {description = "Enable ELF module.", default = true, type = "boolean"})
add_configs("pe", {description = "Enable PE module.", default = true, type = "boolean"})
add_configs("macho", {description = "Enable MachO module.", default = true, type = "boolean"})
Expand Down Expand Up @@ -55,8 +57,13 @@ package("lief")
package:add("defines", "LIEF_IMPORT")
end

os.rm("third-party")

io.replace("CMakeLists.txt", "target_link_libraries(LIB_LIEF PRIVATE utf8cpp)", "target_link_libraries(LIB_LIEF PRIVATE utf8cpp::utf8cpp)", {plain = true})

io.replace("CMakeLists.txt", "target_link_libraries(LIB_LIEF PRIVATE lief_spdlog)", "find_package(spdlog CONFIG REQUIRED)\ntarget_link_libraries(LIB_LIEF PRIVATE spdlog::spdlog)", {plain = true})
io.replace("CMakeLists.txt", "TARGETS LIB_LIEF lief_spdlog", "TARGETS LIB_LIEF", {plain = true})

local configs = {
"-DLIEF_C_API=ON",
"-DLIEF_PYTHON_API=OFF",
Expand Down

0 comments on commit 37d5a92

Please sign in to comment.