From e12f314cdaf57455fb3c08e63adecc9d1e4c08cf Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 9 Aug 2022 23:31:06 +0800 Subject: [PATCH] improve libev (#1397) * improve libev * improve shared --- packages/l/libev/xmake.lua | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/packages/l/libev/xmake.lua b/packages/l/libev/xmake.lua index 8b812a459..76f23ff23 100644 --- a/packages/l/libev/xmake.lua +++ b/packages/l/libev/xmake.lua @@ -3,15 +3,21 @@ package("libev") set_homepage("http://software.schmorp.de/pkg/libev") set_description("Full-featured high-performance event loop loosely modelled after libevent.") - add_urls("http://dist.schmorp.de/libev/libev-$(version).tar.gz", {alias = "home"}) - add_urls("http://git.lighttpd.net/libev.git/snapshot/libev-rel-$(version).tar.gz", {alias = "mirror"}) - add_urls("https://github.com/enki/libev.git", - "https://git.lighttpd.net/libev.git") - add_versions("home:4.24", "973593d3479abdf657674a55afe5f78624b0e440614e2b8cb3a07f16d4d7f821") - add_versions("mirror:4.24", "680a0a720a3629c3c4738387dfaadd591aa282975167dbab743e453399f75963") + add_urls("http://dist.schmorp.de/libev/libev-$(version).tar.gz", + "https://github.com/xmake-mirror/libev/releases/download/$(version)/libev-$(version).tar.gz", + "https://github.com/xmake-mirror/libev.git") + add_versions("4.33", "507eb7b8d1015fbec5b935f34ebed15bf346bed04a11ab82b8eee848c4205aea") + + add_links("ev") on_install("macosx", "linux", "iphoneos", function (package) - import("package.tools.autoconf").install(package) + local configs = {} + table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no")) + table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes")) + if package:debug() then + table.insert(configs, "--enable-debug") + end + import("package.tools.autoconf").install(package, configs) end) on_test(function (package)