Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libpeconv: add 2024.09.06 version #5328

Merged
merged 3 commits into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions packages/l/libpeconv/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,34 @@ package("libpeconv")
set_license("BSD-2-Clause")

add_urls("https://github.com/hasherezade/libpeconv.git")

add_versions("2024.09.06", "e4841b678c14a2e735e59354aa1b0f6755339cab")
add_versions("2023.05.31", "709a9b40fa6420c6cd7aa1145b0ff1a154858358")

add_configs("unicode", {description = "Enable Unicode support.", default = false, type = "boolean"})
add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})

add_syslinks("kernel32", "ntdll")

add_deps("cmake")

if is_plat("windows", "mingw") then
add_syslinks("kernel32", "ntdll")
end
on_install("windows|x64", "windows|x86", "mingw", "msys", function (package)
if package:config("unicode") then
package:add("defines", "UNICODE", "_UNICODE")
end

on_install("windows", "mingw", function (package)
local configs = {"-DPECONV_BUILD_TESTING=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
table.insert(configs, "-DPECONV_UNICODE=" .. (package:config("unicode") and "ON" or "OFF"))

io.replace("run_pe/CMakeLists.txt", "/MT", "", {plain = true})
io.replace("libpeconv/CMakeLists.txt", "/MT", "", {plain = true})
io.replace("CMakeLists.txt", "add_subdirectory ( run_pe )", "", {plain = true})
io.replace("CMakeLists.txt", "add_dependencies ( run_pe libpeconv )", "", {plain = true})
if package:is_plat("windows") then
os.mkdir(path.join(package:buildir(), "run_pe/pdb"))
os.mkdir(path.join(package:buildir(), "libpeconv/pdb"))
end
import("package.tools.cmake").install(package, configs)
os.trycp(path.join(package:buildir(), "run_pe/pdb/run_pe.pdb"), package:installdir("bin"))
end)

on_test(function (package)
Expand Down
Loading