-
-
Notifications
You must be signed in to change notification settings - Fork 396
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
capstone: add 5.0.3 version #5474
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4aa5376
capstone: add 5.0.3 version
star-hengxing 0619c71
fix tools pdb install
star-hengxing 7be96e9
test 4.0.2
star-hengxing 5a26b68
Revert "test 4.0.2"
star-hengxing 2efa0b4
remove unused cmake argv
star-hengxing 9da3e85
limit plat
star-hengxing 74472e5
Update wasm_ubuntu.yml
waruqi e3ec015
Update wasm_ubuntu.yml
waruqi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,39 @@ | ||
package("capstone") | ||
set_homepage("http://www.capstone-engine.org") | ||
set_description("Disassembly framework with the target of becoming the ultimate disasm engine for binary analysis and reversing in the security community.") | ||
add_urls("https://github.com/aquynh/capstone/archive/$(version).tar.gz") | ||
set_description("Capstone disassembly/disassembler framework for ARM, ARM64 (ARMv8), Alpha, BPF, Ethereum VM, HPPA, LoongArch, M68K, M680X, Mips, MOS65XX, PPC, RISC-V(rv32G/rv64G), SH, Sparc, SystemZ, TMS320C64X, TriCore, Webassembly, XCore and X86.") | ||
set_license("BSD-3-Clause") | ||
|
||
add_urls("https://github.com/capstone-engine/capstone/archive/refs/tags/$(version).tar.gz", | ||
"https://github.com/capstone-engine/capstone.git") | ||
|
||
add_versions("5.0.3", "3970c63ca1f8755f2c8e69b41432b710ff634f1b45ee4e5351defec4ec8e1753") | ||
|
||
add_versions("4.0.2", "7c81d798022f81e7507f1a60d6817f63aa76e489aa4e7055255f21a22f5e526a") | ||
add_deps("cmake") | ||
|
||
on_load(function (package) | ||
on_install("!iphoneos", function (package) | ||
package:addenv("PATH", "bin") | ||
end) | ||
|
||
on_install("windows", "linux", "macosx", "iphoneos", "mingw", "android", "msys", "bsd", function (package) | ||
local configs = {"-DCAPSTONE_BUILD_CSTOOL=ON", "-DCAPSTONE_BUILD_TESTS=OFF"} | ||
table.insert(configs, "-DCAPSTONE_BUILD_STATIC=" .. (package:config("shared") and "OFF" or "ON")) | ||
table.insert(configs, "-DCAPSTONE_BUILD_SHARED=" .. (package:config("shared") and "ON" or "OFF")) | ||
io.gsub("CMakeLists.txt", "CAPSTONE_BUILD_SHARED AND CAPSTONE_BUILD_CSTOOL", "CAPSTONE_BUILD_CSTOOL") | ||
local configs = { | ||
"-DCAPSTONE_BUILD_CSTOOL=ON", | ||
"-DCAPSTONE_BUILD_STATIC_RUNTIME=OFF", -- Use our pass CMAKE_MSVC_RUNTIME_LIBRARY | ||
"-DCAPSTONE_BUILD_LEGACY_TESTS=OFF", | ||
"-DCAPSTONE_BUILD_TESTS=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, "-DENABLE_ASAN=" .. (package:config("asan") and "ON" or "OFF")) | ||
import("package.tools.cmake").install(package, configs) | ||
os.cp("include", package:installdir()) | ||
|
||
if package:is_plat("windows") and package:is_debug() then | ||
local dir = package:installdir(package:config("shared") and "bin" or "lib") | ||
os.trycp(path.join(package:buildir(), "capstone.pdb"), dir) | ||
os.trycp(path.join(package:buildir(), "cstool.pdb"), package:installdir("bin")) | ||
end | ||
end) | ||
|
||
on_test(function (package) | ||
if package:is_plat(os.host()) then | ||
if not package:is_cross() then | ||
os.vrun("cstool -v") | ||
end | ||
assert(package:has_cfuncs("cs_version", {includes = "capstone/capstone.h"})) | ||
end) | ||
end) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add test if you want to.