From 273a6b0ff442819c794c410debdbd3e78bdca756 Mon Sep 17 00:00:00 2001 From: vkensou Date: Wed, 15 Apr 2020 22:25:46 +0800 Subject: [PATCH] simplify add_versions. --- packages/l/libraw/xmake.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/l/libraw/xmake.lua b/packages/l/libraw/xmake.lua index 15ad95517..3b6110620 100644 --- a/packages/l/libraw/xmake.lua +++ b/packages/l/libraw/xmake.lua @@ -2,11 +2,10 @@ package("libraw") set_homepage("http://www.libraw.org") set_description("LibRaw is a library for reading RAW files from digital cameras.") - add_urls("https://github.com/LibRaw/LibRaw/archive/$(version).tar.gz", {alias = "archive"}) - add_urls("https://github.com/LibRaw/LibRaw.git", {alias = "git"}) + add_urls("https://github.com/LibRaw/LibRaw/archive/$(version).tar.gz") + add_urls("https://github.com/LibRaw/LibRaw.git") - add_versions("archive:0.19.5", "9a2a40418e4fb0ab908f6d384ff6f9075f4431f8e3d79a0e44e5a6ea9e75abdc") - add_versions("git:0.19.5", "0.19.5") + add_versions("0.19.5", "9a2a40418e4fb0ab908f6d384ff6f9075f4431f8e3d79a0e44e5a6ea9e75abdc") on_install(function(package) io.writefile("xmake.lua", format([[ @@ -40,5 +39,5 @@ package("libraw") if not package:config("shared") then table.insert(defines, "LIBRAW_NODLL") end - assert(package:has_cfuncs("libraw_version", {configs = {defines = defines}, includes = {"libraw/libraw.h"}, })) + assert(package:has_cfuncs("libraw_version", {configs = {defines = defines, shared = true}, includes = {"libraw/libraw.h"}, })) end) \ No newline at end of file