parent
c539d35a6b
commit
49e91ab000
2 changed files with 57 additions and 0 deletions
@ -0,0 +1,34 @@ |
||||
package("strawberry-perl") |
||||
|
||||
set_kind("binary") |
||||
set_homepage("http://strawberryperl.com/") |
||||
set_description("Strawberry Perl is a perl environment for MS Windows containing all you need to run and develop perl applications.") |
||||
|
||||
if os.arch() == "x64" or os.arch() == "x86_64" then |
||||
add_urls("http://strawberryperl.com/download/$(version)/strawberry-perl-$(version)-64bit.zip", {version = function (version) return version:gsub("%+", ".") end}) |
||||
add_versions("5.32.0+1", "24601fdadd25f921501f04505895d2061a8d8ccfbe515241ceddbd2c372fe78e") |
||||
else |
||||
add_urls("http://strawberryperl.com/download/$(version)/strawberry-perl-$(version)-32bit.zip", {version = function (version) return version:gsub("%+", ".") end}) |
||||
add_versions("5.32.0+1", "0888c87cb99e42a209f7d6b03fd3a72eda53c647b1c27060913e224f644ab866") |
||||
end |
||||
|
||||
add_configs("mingw", {description = "Export built-in MinGW binaries.", default = false, type = "boolean"}) |
||||
|
||||
on_install("@windows", "@msys", "@cygwin", function (package) |
||||
os.mv("perl", package:installdir()) |
||||
os.mv("c", package:installdir()) |
||||
os.mv("reloc*", package:installdir()) |
||||
os.cd(package:installdir()) |
||||
os.vrun("relocation.pl.bat") |
||||
package:addenv("PATH", path.join("perl", "bin")) |
||||
if package:config("mingw") then |
||||
package:addenv("PATH", path.join("c", "bin")) |
||||
end |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
os.vrun("perl -v") |
||||
if package:config("mingw") then |
||||
os.vrun("gcc -v") |
||||
end |
||||
end) |
@ -0,0 +1,23 @@ |
||||
package("tinyformat") |
||||
|
||||
set_homepage("https://github.com/c42f/tinyformat/") |
||||
set_description("Minimal, type safe printf replacement library for C++") |
||||
|
||||
add_urls("https://github.com/c42f/tinyformat/archive/v$(version).tar.gz") |
||||
add_versions("2.3.0", "ecba2fbbd3829002a63e141b77b9f1fc30e920962f68466b50c3244652d69391") |
||||
|
||||
on_install(function (package) |
||||
os.mv("tinyformat.h", package:installdir("include")) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:check_cxxsnippets({test = [[ |
||||
#include <iostream> |
||||
#include <string> |
||||
void test() { |
||||
tfm::printf("%s", "printf test"); |
||||
tfm::format(std::cout, "%s", "format test"); |
||||
std::string res = tfm::format("%s", "string format"); |
||||
} |
||||
]]}, {configs = {languages = "c++11"}, includes = "tinyformat.h"})) |
||||
end) |
Loading…
Reference in new issue