Skip to content

Commit

Permalink
add hyperscan
Browse files Browse the repository at this point in the history
  • Loading branch information
c8ef committed Jul 13, 2024
1 parent 04657d8 commit aa21c9c
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/h/hyperscan/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package("hyperscan")
set_homepage("https://www.hyperscan.io")
set_description("High-performance regular expression matching library")
set_license("BSD-3")

add_urls("https://github.com/intel/hyperscan/archive/refs/tags/$(version).tar.gz",
"https://github.com/intel/hyperscan.git")
add_versions("v5.4.2", "32b0f24b3113bbc46b6bfaa05cf7cf45840b6b59333d078cc1f624e4c40b2b99")

add_deps("cmake", "boost", "ragel")

on_install(function (package)
local configs = {}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
end)

on_test(function (package)
assert(package:has_cxxfuncs("hs_compile", {includes = "hs/hs.h"}))
end)
50 changes: 50 additions & 0 deletions packages/r/ragel/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package("ragel")
set_homepage("https://www.colm.net/open-source/ragel/")
set_description("Ragel State Machine Compiler")
set_license("MIT")
set_kind("binary")

add_urls("http://www.colm.net/files/ragel/ragel-$(version).tar.gz",
"https://github.com/adrian-thurston/ragel.git")
add_versions("6.10", "5f156edb65d20b856d638dd9ee2dfb43285914d9aa2b6ec779dac0270cd56c3f")

on_install(function (package)
io.writefile("xmake.lua", [[
add_rules("mode.release", "mode.debug")
target("ragel")
set_kind("binary")
add_files("ragel/*.cpp")
add_headerfiles("ragel/*.h")
add_includedirs("aapl")
]])
io.writefile("ragel/config.h", [[
/* Name of package */
#define PACKAGE "ragel"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME "ragel"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "ragel 6.10"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "ragel"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "6.10"
/* Version number of package */
#define VERSION "6.10"
]])
import("package.tools.xmake").install(package)
end)

on_test(function (package)
os.vrun("ragel -v")
end)

0 comments on commit aa21c9c

Please sign in to comment.