From 8a5bd04ff72f54879579c6e242f1a670cc526740 Mon Sep 17 00:00:00 2001 From: yecate Date: Mon, 16 Nov 2020 08:28:28 +0800 Subject: [PATCH] add xhook (#137) * add xhook * modify xhook * modify xhook remove add_links --- packages/x/xhook/xmake.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 packages/x/xhook/xmake.lua diff --git a/packages/x/xhook/xmake.lua b/packages/x/xhook/xmake.lua new file mode 100644 index 000000000..345235d87 --- /dev/null +++ b/packages/x/xhook/xmake.lua @@ -0,0 +1,24 @@ +package("xhook") + set_homepage("https://github.com/iqiyi/xHook") + set_description("PLT (Procedure Linkage Table) hook library for Android native ELF (executable and shared libraries)") + add_urls("https://github.com/iqiyi/xHook/archive/$(version).tar.gz") + + add_versions("v1.2.0", "b4153559ea4d0f975ad46783374a0103e165a81c767e9515a3b2d6efe70a06ae") + add_syslinks("log") + + on_install("android", function (package) + os.cd("libxhook/jni") + io.writefile("xmake.lua", [[ + add_rules("mode.release", "mode.debug") + target("xhook") + set_kind("static") + set_warnings("allextra", "error") + add_files("*.c") + add_headerfiles("xhook.h") + ]]) + import("package.tools.xmake").install(package) + end) + + on_test(function (package) + assert(package:has_cfuncs("xhook_register", {includes = "xhook.h"})) + end) \ No newline at end of file