-
-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
71 additions
and
0 deletions.
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 |
---|---|---|
@@ -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) |
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 |
---|---|---|
@@ -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) |