From 11f5114bb45b711106c01b5c561740e0d3701e12 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 25 Sep 2020 00:37:55 +0800 Subject: [PATCH] remove trailing spaces --- packages/b/bin2c/xmake.lua | 2 +- packages/b/boost/xmake.lua | 24 ++++++++++++------------ packages/c/cairo/xmake.lua | 4 ++-- packages/c/catch2/xmake.lua | 4 ++-- packages/c/cmake/xmake.lua | 8 ++++---- packages/c/co/xmake.lua | 4 ++-- packages/c/concurrentqueue/xmake.lua | 8 ++++---- packages/c/cpp-taskflow/xmake.lua | 6 +++--- packages/c/cxxopts/xmake.lua | 4 ++-- packages/e/expat/xmake.lua | 2 +- packages/f/ffmpeg/xmake.lua | 4 ++-- packages/f/fmt/xmake.lua | 10 +++++----- packages/f/fontconfig/xmake.lua | 2 +- packages/g/gettext/xmake.lua | 2 +- packages/g/glib/xmake.lua | 8 ++++---- packages/j/json-c/xmake.lua | 2 +- packages/l/libcurl/xmake.lua | 6 +++--- packages/l/libffi/xmake.lua | 2 +- packages/l/libpng/xmake.lua | 4 ++-- packages/l/libraw/xmake.lua | 2 +- packages/l/libxml2/xmake.lua | 8 ++++---- packages/l/libyaml/xmake.lua | 4 ++-- packages/l/luajit/port/xmake.lua | 6 +++--- packages/m/meson/xmake.lua | 2 +- packages/m/moonjit/port/xmake.lua | 6 +++--- packages/m/mysql/xmake.lua | 2 +- packages/n/ninja/xmake.lua | 2 +- packages/o/openssl/xmake.lua | 4 ++-- packages/p/pcre/xmake.lua | 2 +- packages/p/pcre2/xmake.lua | 2 +- packages/p/pixman/xmake.lua | 2 +- packages/p/protobuf-c/xmake.lua | 2 +- packages/p/python/xmake.lua | 6 +++--- packages/p/python2/xmake.lua | 6 +++--- packages/s/skia/xmake.lua | 8 ++++---- packages/s/sol2/xmake.lua | 2 +- packages/s/spdlog/xmake.lua | 6 +++--- packages/t/tbox/xmake.lua | 4 ++-- packages/u/util-linux/xmake.lua | 2 +- packages/x/x265/xmake.lua | 2 +- packages/z/zeromq/xmake.lua | 2 +- packages/z/zlib/xmake.lua | 2 +- 42 files changed, 95 insertions(+), 95 deletions(-) diff --git a/packages/b/bin2c/xmake.lua b/packages/b/bin2c/xmake.lua index cabd2836f..6e0b19438 100644 --- a/packages/b/bin2c/xmake.lua +++ b/packages/b/bin2c/xmake.lua @@ -20,5 +20,5 @@ package("bin2c") end) on_test(function (package) - os.vrun("bin2c test") + os.vrun("bin2c test") end) diff --git a/packages/b/boost/xmake.lua b/packages/b/boost/xmake.lua index ed8a2fe58..3f81cb63b 100644 --- a/packages/b/boost/xmake.lua +++ b/packages/b/boost/xmake.lua @@ -3,10 +3,10 @@ package("boost") set_homepage("https://www.boost.org/") set_description("Collection of portable C++ source libraries.") - add_urls("https://dl.bintray.com/boostorg/release/$(version).tar.bz2", {version = function (version) + add_urls("https://dl.bintray.com/boostorg/release/$(version).tar.bz2", {version = function (version) return version .. "/source/boost_" .. (version:gsub("%.", "_")) end}) - add_urls("https://github.com/xmake-mirror/boost/releases/download/boost-$(version).tar.bz2", {version = function (version) + add_urls("https://github.com/xmake-mirror/boost/releases/download/boost-$(version).tar.bz2", {version = function (version) return version .. "/boost_" .. (version:gsub("%.", "_")) end}) @@ -20,11 +20,11 @@ package("boost") add_cxflags("/EHsc") end - local libnames = {"filesystem", - "fiber", - "coroutine", - "context", - "thread", + local libnames = {"filesystem", + "fiber", + "coroutine", + "context", + "thread", "regex", "system", "container", @@ -67,7 +67,7 @@ package("boost") end) on_install("macosx", "linux", "windows", function (package) - + -- force boost to compile with the desired compiler local file = io.open("user-config.jam", "a") if file then @@ -82,9 +82,9 @@ package("boost") file:close() end - local bootstrap_argv = + local bootstrap_argv = { - "--prefix=" .. package:installdir(), + "--prefix=" .. package:installdir(), "--libdir=" .. package:installdir("lib"), "--without-icu" } @@ -97,8 +97,8 @@ package("boost") local argv = { - "--prefix=" .. package:installdir(), - "--libdir=" .. package:installdir("lib"), + "--prefix=" .. package:installdir(), + "--libdir=" .. package:installdir("lib"), "-d2", "-j4", "--hash", diff --git a/packages/c/cairo/xmake.lua b/packages/c/cairo/xmake.lua index 79b5fbab2..d6a077ace 100644 --- a/packages/c/cairo/xmake.lua +++ b/packages/c/cairo/xmake.lua @@ -5,7 +5,7 @@ package("cairo") set_urls("https://cairographics.org/releases/cairo-$(version).tar.xz") add_versions("1.16.0", "5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331") - + if is_plat("windows") then add_deps("make", "libpng", "pixman", "zlib") else @@ -52,7 +52,7 @@ package("cairo") table.insert(configs, "--enable-quartz=no") table.insert(configs, "--enable-xlib=" .. (is_plat("macosx") and "no" or "yes")) table.insert(configs, "--enable-xlib-xrender=" .. (is_plat("macosx") and "no" or "yes")) - import("package.tools.autoconf").install(package, configs) + import("package.tools.autoconf").install(package, configs) end) on_test(function (package) diff --git a/packages/c/catch2/xmake.lua b/packages/c/catch2/xmake.lua index 484a63492..d2eebeda0 100644 --- a/packages/c/catch2/xmake.lua +++ b/packages/c/catch2/xmake.lua @@ -2,10 +2,10 @@ package("catch2") set_homepage("https://github.com/catchorg/Catch2") set_description("Catch2 is a multi-paradigm test framework for C++. which also supports Objective-C (and maybe C). ") - + add_urls("https://github.com/catchorg/Catch2/archive/v$(version).zip") add_versions("2.9.2", "dc486300de22b0d36ddba1705abb07b9e5780639d824ba172ddf7062b2a1bf8f") - + on_install(function (package) os.cp("single_include/catch2", package:installdir("include")) end) diff --git a/packages/c/cmake/xmake.lua b/packages/c/cmake/xmake.lua index f666e77f3..29d1af9f1 100644 --- a/packages/c/cmake/xmake.lua +++ b/packages/c/cmake/xmake.lua @@ -6,7 +6,7 @@ package("cmake") if is_host("macosx") then add_urls("https://cmake.org/files/v$(version)-Darwin-x86_64.tar.gz", {version = function (version) - return table.concat(table.slice((version):split('%.'), 1, 2), '.') .. "/cmake-" .. version + return table.concat(table.slice((version):split('%.'), 1, 2), '.') .. "/cmake-" .. version end}) add_urls("https://github.com/Kitware/CMake/releases/download/v$(version)/cmake-$(version)-Darwin-x86_64.tar.gz") add_urls("https://gitlab.com/xmake-mirror/cmake-releases/raw/master/cmake-$(version)-Darwin-x86_64.tar.gz") @@ -14,7 +14,7 @@ package("cmake") add_versions("3.15.4", "adfbf611d21daa83b9bf6d85ab06a455e481b63a38d6e1270d563b03d4e5f829") elseif is_host("linux") and is_arch("x86_64") then add_urls("https://cmake.org/files/v$(version)-Linux-x86_64.tar.gz", {version = function (version) - return table.concat(table.slice((version):split('%.'), 1, 2), '.') .. "/cmake-" .. version + return table.concat(table.slice((version):split('%.'), 1, 2), '.') .. "/cmake-" .. version end}) add_urls("https://github.com/Kitware/CMake/releases/download/v$(version)/cmake-$(version)-Linux-x86_64.tar.gz") add_urls("https://gitlab.com/xmake-mirror/cmake-releases/raw/master/cmake-$(version)-Linux-x86_64.tar.gz") @@ -23,7 +23,7 @@ package("cmake") elseif is_host("windows") then if os.arch() == "x64" then add_urls("https://cmake.org/files/v$(version)-win64-x64.zip", {excludes = "*/doc/*", version = function (version) - return table.concat(table.slice((version):split('%.'), 1, 2), '.') .. "/cmake-" .. version + return table.concat(table.slice((version):split('%.'), 1, 2), '.') .. "/cmake-" .. version end}) add_urls("https://github.com/Kitware/CMake/releases/download/v$(version)/cmake-$(version)-win64-x64.zip", {excludes = "*/doc/*"}) add_urls("https://gitlab.com/xmake-mirror/cmake-releases/raw/master/cmake-$(version)-win64-x64.zip", {excludes = "*/doc/*"}) @@ -31,7 +31,7 @@ package("cmake") add_versions("3.15.4", "5bb49c0274800c38833e515a01af75a7341db68ea82c71856bb3cf171d2068be") else add_urls("https://cmake.org/files/v$(version)-win32-x86.zip", {excludes = "*/doc/*", version = function (version) - return table.concat(table.slice((version):split('%.'), 1, 2), '.') .. "/cmake-" .. version + return table.concat(table.slice((version):split('%.'), 1, 2), '.') .. "/cmake-" .. version end}) add_urls("https://github.com/Kitware/CMake/releases/download/v$(version)/cmake-$(version)-win32-x86.zip", {excludes = "*/doc/*"}) add_urls("https://gitlab.com/xmake-mirror/cmake-releases/raw/master/cmake-$(version)-win32-x86.zip", {excludes = "*/doc/*"}) diff --git a/packages/c/co/xmake.lua b/packages/c/co/xmake.lua index b832ff4e8..66e79c923 100644 --- a/packages/c/co/xmake.lua +++ b/packages/c/co/xmake.lua @@ -2,9 +2,9 @@ package("co") set_homepage("https://github.com/idealvin/co") set_description("Yet another libco and more.") - + add_urls("https://github.com/idealvin/co.git") - + on_install("macosx", "linux", "windows", function (package) import("package.tools.xmake").install(package) end) diff --git a/packages/c/concurrentqueue/xmake.lua b/packages/c/concurrentqueue/xmake.lua index bb7e8c89b..43a742f44 100644 --- a/packages/c/concurrentqueue/xmake.lua +++ b/packages/c/concurrentqueue/xmake.lua @@ -2,13 +2,13 @@ package("concurrentqueue") set_homepage("https://github.com/cameron314/concurrentqueue") set_description("An industrial-strength lock-free queue for C++.") - + add_urls("https://github.com/cameron314/concurrentqueue.git") - + on_install(function (package) os.cp("*.h", package:installdir("include/concurrentqueue")) end) - + on_test(function (package) assert(package:check_cxxsnippets({test = [[ #include @@ -20,5 +20,5 @@ package("concurrentqueue") assert(found && item == 25); } ]]}, {configs = {languages = "c++11"}, includes = "concurrentqueue/concurrentqueue.h"})) - end) + end) diff --git a/packages/c/cpp-taskflow/xmake.lua b/packages/c/cpp-taskflow/xmake.lua index aed674494..2f267e59a 100644 --- a/packages/c/cpp-taskflow/xmake.lua +++ b/packages/c/cpp-taskflow/xmake.lua @@ -21,7 +21,7 @@ package("cpp-taskflow") std::vector out(10); std::iota(range.begin(), range.end(), 0); std::iota(out.begin(), out.end(), 0); - taskflow.parallel_for(range.begin(), range.end(), [&] (const int i) { + taskflow.parallel_for(range.begin(), range.end(), [&] (const int i) { out[i] = i; }); executor.run(taskflow).get(); @@ -30,5 +30,5 @@ package("cpp-taskflow") } } ]]}, {configs = {languages = "c++1z"}, includes = "taskflow/taskflow.hpp"})) - end) - + end) + diff --git a/packages/c/cxxopts/xmake.lua b/packages/c/cxxopts/xmake.lua index f319d5a7e..bd12ab5fc 100644 --- a/packages/c/cxxopts/xmake.lua +++ b/packages/c/cxxopts/xmake.lua @@ -22,5 +22,5 @@ package("cxxopts") ("v,verbose", "Verbose output", cxxopts::value()->default_value("false")); } ]]}, {configs = {languages = "c++11"}, includes = "cxxopts.hpp"})) - end) - + end) + diff --git a/packages/e/expat/xmake.lua b/packages/e/expat/xmake.lua index fb30a1a7e..d4d68a9c8 100644 --- a/packages/e/expat/xmake.lua +++ b/packages/e/expat/xmake.lua @@ -14,7 +14,7 @@ package("expat") on_install("windows", function (package) import("package.tools.cmake").install(package) end) - + on_install("linux", "macosx", function (package) import("package.tools.autoconf").install(package) end) diff --git a/packages/f/ffmpeg/xmake.lua b/packages/f/ffmpeg/xmake.lua index b45e21a6c..218b59612 100644 --- a/packages/f/ffmpeg/xmake.lua +++ b/packages/f/ffmpeg/xmake.lua @@ -30,7 +30,7 @@ package("ffmpeg") if is_plat("macosx", "linux") then add_deps("yasm") end - + on_load(function (package) local configdeps = {zlib = "zlib", bzlib = "bzip2", @@ -44,7 +44,7 @@ package("ffmpeg") end end end) - + on_install("linux", "macosx", "android@linux,macosx", function (package) local configs = {"--enable-gpl", "--enable-version3", diff --git a/packages/f/fmt/xmake.lua b/packages/f/fmt/xmake.lua index 350b81757..a782dabd9 100644 --- a/packages/f/fmt/xmake.lua +++ b/packages/f/fmt/xmake.lua @@ -20,13 +20,13 @@ package("fmt") package:add("defines", "FMT_EXPORT") end end) - + on_install(function (package) if package:config("header_only") then os.cp("include/fmt", package:installdir("include")) return end - + local configs = {} table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) table.insert(configs, "-DFMT_TEST=OFF") @@ -34,7 +34,7 @@ package("fmt") table.insert(configs, "-DFMT_FUZZ=OFF") import("package.tools.cmake").install(package, configs) end) - + on_test(function (package) assert(package:check_cxxsnippets({test = [[ #include @@ -45,5 +45,5 @@ package("fmt") assert(s == "hello"); } ]]}, {configs = {languages = "c++11"}, includes = "fmt/format.h", defines="FMT_HEADER_ONLY"})) - end) - + end) + diff --git a/packages/f/fontconfig/xmake.lua b/packages/f/fontconfig/xmake.lua index 6f06d2839..003fc5d32 100644 --- a/packages/f/fontconfig/xmake.lua +++ b/packages/f/fontconfig/xmake.lua @@ -15,7 +15,7 @@ package("fontconfig") -- fix the build issue with --enable-static add_patches("2.13.1", "https://gitlab.freedesktop.org/fontconfig/fontconfig/commit/8208f99fa1676c42bfd8d74de3e9dac5366c150c.diff", "2abdff214b99f2d074170e6512b0149cc858ea26cd930690aa6b4ccea2c549ef") - + on_install("linux", "macosx", function (package) local font_dirs = {} if is_plat("macosx") then diff --git a/packages/g/gettext/xmake.lua b/packages/g/gettext/xmake.lua index 4bbd1dab9..566c97549 100644 --- a/packages/g/gettext/xmake.lua +++ b/packages/g/gettext/xmake.lua @@ -16,7 +16,7 @@ package("gettext") end on_install("macosx", "linux", function (package) - local configs = {"--disable-dependency-tracking", + local configs = {"--disable-dependency-tracking", "--disable-silent-rules", "--enable-shared=no", "--enable-static=yes", diff --git a/packages/g/glib/xmake.lua b/packages/g/glib/xmake.lua index 2427c2309..8b10597a1 100644 --- a/packages/g/glib/xmake.lua +++ b/packages/g/glib/xmake.lua @@ -22,10 +22,10 @@ package("glib") end on_install("macosx", "linux", function (package) - local configs = {"-Dbsymbolic_functions=false", - "-Ddtrace=false", - "-Dman=false", - "-Ddefault_library=static", + local configs = {"-Dbsymbolic_functions=false", + "-Ddtrace=false", + "-Dman=false", + "-Ddefault_library=static", "-Dlibmount=false", "-Dinstalled_tests=false"} if is_plat("macosx") then diff --git a/packages/j/json-c/xmake.lua b/packages/j/json-c/xmake.lua index f4cecd706..6035fe87d 100644 --- a/packages/j/json-c/xmake.lua +++ b/packages/j/json-c/xmake.lua @@ -14,7 +14,7 @@ package("json-c") os.cp("json_object_iterator.h", package:installdir("include/json-c")) end) end - + on_install("linux", "macosx", "iphoneos", "android", function (package) local configs = {"--disable-dependency-tracking", "--disable-silent-rules", "--enable-shared=no"} import("package.tools.autoconf").install(package, configs) diff --git a/packages/l/libcurl/xmake.lua b/packages/l/libcurl/xmake.lua index 78173fc3d..ff4a74818 100644 --- a/packages/l/libcurl/xmake.lua +++ b/packages/l/libcurl/xmake.lua @@ -8,7 +8,7 @@ package("libcurl") add_urls("https://github.com/curl/curl/releases/download/curl-$(version).tar.bz2", {version = function (version) return (version:gsub("%.", "_")) .. "/curl-" .. version end}) add_versions("7.64.1", "4cc7c738b35250d0680f29e93e0820c4cb40035f43514ea3ec8d60322d41a45d") - + if is_plat("linux") then add_deps("openssl") elseif is_plat("windows") then @@ -20,7 +20,7 @@ package("libcurl") elseif is_plat("linux") then add_syslinks("pthread") end - + on_install("windows", function (package) import("package.tools.cmake").install(package) end) @@ -41,7 +41,7 @@ package("libcurl") table.insert(configs, "--without-librtmp") table.insert(configs, "--disable-ares") table.insert(configs, "--disable-ldap") - import("package.tools.autoconf").install(package, configs) + import("package.tools.autoconf").install(package, configs) end) on_test(function (package) diff --git a/packages/l/libffi/xmake.lua b/packages/l/libffi/xmake.lua index 4c2da5a96..7dab76318 100644 --- a/packages/l/libffi/xmake.lua +++ b/packages/l/libffi/xmake.lua @@ -23,7 +23,7 @@ package("libffi") else table.insert(configs, "--disable-debug") end - import("package.tools.autoconf").install(package, configs) + import("package.tools.autoconf").install(package, configs) end) on_test(function (package) diff --git a/packages/l/libpng/xmake.lua b/packages/l/libpng/xmake.lua index 59ca561f1..f8fb9eaa4 100644 --- a/packages/l/libpng/xmake.lua +++ b/packages/l/libpng/xmake.lua @@ -19,10 +19,10 @@ package("libpng") else add_links("png") end - + on_install("windows", function (package) local configs = {"-DPNG_TESTS=OFF", - "-DPNG_SHARED=OFF", + "-DPNG_SHARED=OFF", "-DPNG_DEBUG=" .. (package:debug() and "ON" or "OFF")} import("package.tools.cmake").install(package, configs) end) diff --git a/packages/l/libraw/xmake.lua b/packages/l/libraw/xmake.lua index f30f2d799..77b14be7b 100644 --- a/packages/l/libraw/xmake.lua +++ b/packages/l/libraw/xmake.lua @@ -4,7 +4,7 @@ package("libraw") add_urls("https://github.com/LibRaw/LibRaw/archive/$(version).tar.gz") add_urls("https://github.com/LibRaw/LibRaw.git") - + add_versions("0.19.5", "9a2a40418e4fb0ab908f6d384ff6f9075f4431f8e3d79a0e44e5a6ea9e75abdc") if is_plat("windows", "mingw") then diff --git a/packages/l/libxml2/xmake.lua b/packages/l/libxml2/xmake.lua index ca6e26692..815ca884a 100644 --- a/packages/l/libxml2/xmake.lua +++ b/packages/l/libxml2/xmake.lua @@ -3,12 +3,12 @@ package("libxml2") set_homepage("http://xmlsoft.org/") set_description("The XML C parser and toolkit of Gnome.") - set_urls("http://xmlsoft.org/sources/libxml2-$(version).tar.gz", + set_urls("http://xmlsoft.org/sources/libxml2-$(version).tar.gz", "https://ftp.osuosl.org/pub/blfs/conglomeration/libxml2/libxml2-$(version).tar.gz") add_urls("https://gitlab.gnome.org/GNOME/libxml2.git") add_versions("2.9.9", "94fb70890143e3c6549f265cee93ec064c80a84c42ad0f23e85ee1fd6540a871") - + add_includedirs("include/libxml2") if is_plat("windows") then add_links("libxml2_a") @@ -31,8 +31,8 @@ package("libxml2") on_install("macosx", "linux", "iphoneos", "android", function (package) local configs = {"--disable-dependency-tracking", - "--without-python", - "--without-lzma", + "--without-python", + "--without-lzma", "--without-zlib", "--without-iconv", "--enable-shared=no"} diff --git a/packages/l/libyaml/xmake.lua b/packages/l/libyaml/xmake.lua index 99f5904bb..55a9ad83d 100644 --- a/packages/l/libyaml/xmake.lua +++ b/packages/l/libyaml/xmake.lua @@ -6,12 +6,12 @@ package("libyaml") set_urls("https://github.com/yaml/libyaml/archive/$(version).tar.gz", "https://github.com/yaml/libyaml.git") add_versions("0.2.2", "46bca77dc8be954686cff21888d6ce10ca4016b360ae1f56962e6882a17aa1fe") - + on_install("macosx", "linux", function (package) if not os.isfile("configure") then os.vrun("./bootstrap") end - import("package.tools.autoconf").install(package) + import("package.tools.autoconf").install(package) end) on_test(function (package) diff --git a/packages/l/luajit/port/xmake.lua b/packages/l/luajit/port/xmake.lua index c40797511..bfbd5a069 100755 --- a/packages/l/luajit/port/xmake.lua +++ b/packages/l/luajit/port/xmake.lua @@ -57,7 +57,7 @@ rule("dasc") rule("buildvm") before_build_files(function (target, sourcebatch) - + local buildvm = target:dep("buildvm") local outputdir = buildvm:objectdir() if not os.isdir(outputdir) then @@ -91,12 +91,12 @@ rule("buildvm") compiler.compile(lj_vm_asm, lj_vm_obj, {target = target}) table.join2(target:objectfiles(), lj_vm_obj) end - end) + end) function set_host_toolchains() -- only for cross-compliation if is_plat(os.host()) then - return + return end local arch if is_arch("arm64", "arm64-v8a", "mips64", "x86_64") then diff --git a/packages/m/meson/xmake.lua b/packages/m/meson/xmake.lua index 4918312d2..38de8f637 100644 --- a/packages/m/meson/xmake.lua +++ b/packages/m/meson/xmake.lua @@ -9,7 +9,7 @@ package("meson") add_versions("0.50.1", "f68f56d60c80a77df8fc08fa1016bc5831605d4717b622c96212573271e14ecc") add_deps("ninja", "python 3.x", {kind = "binary"}) - + on_install("@macosx", "@linux", "@windows", function (package) local version = package:dep("python"):version() local envs = {} diff --git a/packages/m/moonjit/port/xmake.lua b/packages/m/moonjit/port/xmake.lua index d7a472587..de3514c8a 100755 --- a/packages/m/moonjit/port/xmake.lua +++ b/packages/m/moonjit/port/xmake.lua @@ -57,7 +57,7 @@ rule("dasc") rule("buildvm") before_build_files(function (target, sourcebatch) - + local buildvm = target:dep("buildvm") local outputdir = buildvm:objectdir() if not os.isdir(outputdir) then @@ -91,12 +91,12 @@ rule("buildvm") compiler.compile(lj_vm_asm, lj_vm_obj, {target = target}) table.join2(target:objectfiles(), lj_vm_obj) end - end) + end) function set_host_toolchains() -- only for cross-compliation if is_plat(os.host()) then - return + return end local arch if is_arch("arm64", "arm64-v8a", "mips64", "x86_64") then diff --git a/packages/m/mysql/xmake.lua b/packages/m/mysql/xmake.lua index d3825bae4..a482f8bd4 100644 --- a/packages/m/mysql/xmake.lua +++ b/packages/m/mysql/xmake.lua @@ -11,7 +11,7 @@ package("mysql") add_deps("cmake", "openssl") end add_includedirs("include/mysql") - + on_install("macosx", "linux", function (package) -- https://bugs.mysql.com/bug.php?id=87348 -- Fixes: "ADD_SUBDIRECTORY given source diff --git a/packages/n/ninja/xmake.lua b/packages/n/ninja/xmake.lua index 2bee28da0..be92c715b 100644 --- a/packages/n/ninja/xmake.lua +++ b/packages/n/ninja/xmake.lua @@ -32,7 +32,7 @@ package("ninja") os.vrun("python2 configure.py --bootstrap") os.cp("./ninja", package:installdir("bin")) end) - + on_test(function (package) os.vrun("ninja --version") end) diff --git a/packages/o/openssl/xmake.lua b/packages/o/openssl/xmake.lua index f466c94f2..f9e2c31c9 100644 --- a/packages/o/openssl/xmake.lua +++ b/packages/o/openssl/xmake.lua @@ -4,7 +4,7 @@ package("openssl") set_description("A robust, commercial-grade, and full-featured toolkit for TLS and SSL.") add_urls("https://www.openssl.org/source/openssl-$(version).tar.gz", {alias = "home", excludes = "*/fuzz/*"}) - add_urls("https://github.com/openssl/openssl/archive/OpenSSL_$(version).zip", + add_urls("https://github.com/openssl/openssl/archive/OpenSSL_$(version).zip", {alias = "github", version = function (version) return version:gsub("%.", "_") end, excludes = "*/fuzz/*"}) add_versions("home:1.1.1", "2836875a0f89c03d0fdf483941512613a50cfb421d6fd94b9f41d7279d586a3d") @@ -19,7 +19,7 @@ package("openssl") os.vrun("make -j4") os.vrun("make install") end) - + on_test(function (package) assert(package:has_cfuncs("SSL_new", {includes = "openssl/ssl.h"})) end) diff --git a/packages/p/pcre/xmake.lua b/packages/p/pcre/xmake.lua index 555a018ec..0fe182dc8 100644 --- a/packages/p/pcre/xmake.lua +++ b/packages/p/pcre/xmake.lua @@ -23,7 +23,7 @@ package("pcre") package:add("defines", "PCRE_STATIC") end end) - + on_install("windows", function (package) local configs = {} table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) diff --git a/packages/p/pcre2/xmake.lua b/packages/p/pcre2/xmake.lua index 7e5be96dd..d460cb1d1 100644 --- a/packages/p/pcre2/xmake.lua +++ b/packages/p/pcre2/xmake.lua @@ -25,7 +25,7 @@ package("pcre2") package:add("defines", "PCRE2_STATIC") end end) - + if is_plat("windows") and winos.version():gt("winxp") then on_install("windows", function (package) local configs = {"-DPCRE2_BUILD_TESTS=OFF", "-DPCRE2_BUILD_PCRE2GREP=OFF"} diff --git a/packages/p/pixman/xmake.lua b/packages/p/pixman/xmake.lua index 022ceb110..cc14009f4 100644 --- a/packages/p/pixman/xmake.lua +++ b/packages/p/pixman/xmake.lua @@ -5,7 +5,7 @@ package("pixman") set_urls("https://cairographics.org/releases/pixman-$(version).tar.gz") add_versions("0.38.0", "a7592bef0156d7c27545487a52245669b00cf7e70054505381cff2136d890ca8") - + if is_plat("windows") then add_deps("make") else diff --git a/packages/p/protobuf-c/xmake.lua b/packages/p/protobuf-c/xmake.lua index ac0f9f492..57dc0a744 100644 --- a/packages/p/protobuf-c/xmake.lua +++ b/packages/p/protobuf-c/xmake.lua @@ -21,7 +21,7 @@ package("protobuf-c") on_load(function (package) package:addenv("PATH", "bin") end) - + on_install("windows", function (package) os.cd("build-cmake") import("package.tools.cmake").install(package, {"-Dprotobuf_BUILD_PROTOC_BINARIES=ON"}) diff --git a/packages/p/python/xmake.lua b/packages/p/python/xmake.lua index 3c2e899eb..b06b0d493 100644 --- a/packages/p/python/xmake.lua +++ b/packages/p/python/xmake.lua @@ -41,7 +41,7 @@ package("python") add_resources("2.7.15", "wheel", "https://files.pythonhosted.org/packages/b7/cf/1ea0f5b3ce55cacde1e84cdde6cee1ebaff51bd9a3e6c7ba4082199af6f6/wheel-0.33.1.tar.gz", "66a8fd76f28977bb664b098372daef2b27f60dc4d1688cfab7b37a09448f0e9d") on_load(function (package) - + -- add PATH package:addenv("PATH", "bin") @@ -69,7 +69,7 @@ package("python") envs.PYTHONPATH = package:installdir("lib", "python" .. version:major() .. "." .. version:minor(), "site-packages") end package:addenv("PYTHONPATH", envs.PYTHONPATH) - + -- install resources local python = path.join(package:installdir("bin"), "python" .. (is_host("windows") and ".exe" or "")) for _, name in ipairs({"setuptools", "pip", "wheel"}) do @@ -133,7 +133,7 @@ package("python") -- yep, this needs the absolute path where zlib needed a path relative to the SDK. table.insert(cflags, "-I" .. path.join(xcode_sdkdir, "/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers")) end - + -- avoid linking to libgcc https://mail.python.org/pipermail/python-dev/2012-February/116205.html local target_minver = get_config("target_minver") if target_minver then diff --git a/packages/p/python2/xmake.lua b/packages/p/python2/xmake.lua index 0ad1944fd..ae9039684 100644 --- a/packages/p/python2/xmake.lua +++ b/packages/p/python2/xmake.lua @@ -32,7 +32,7 @@ package("python2") add_resources("2.7.15", "setuptools", "https://files.pythonhosted.org/packages/c2/f7/c7b501b783e5a74cf1768bc174ee4fb0a8a6ee5af6afa92274ff964703e0/setuptools-40.8.0.zip", "6e4eec90337e849ade7103723b9a99631c1f0d19990d6e8412dc42f5ae8b304d") add_resources("2.7.15", "pip", "https://files.pythonhosted.org/packages/36/fa/51ca4d57392e2f69397cd6e5af23da2a8d37884a605f9e3f2d3bfdc48397/pip-19.0.3.tar.gz", "6e6f197a1abfb45118dbb878b5c859a0edbdd33fd250100bc015b67fded4b9f2") add_resources("2.7.15", "wheel", "https://files.pythonhosted.org/packages/b7/cf/1ea0f5b3ce55cacde1e84cdde6cee1ebaff51bd9a3e6c7ba4082199af6f6/wheel-0.33.1.tar.gz", "66a8fd76f28977bb664b098372daef2b27f60dc4d1688cfab7b37a09448f0e9d") - + on_load(function (package) -- add PATH @@ -56,7 +56,7 @@ package("python2") local envs = {} envs.PYTHONPATH = package:installdir("lib", "python" .. version:major() .. "." .. version:minor(), "site-packages") package:addenv("PYTHONPATH", envs.PYTHONPATH) - + -- install resources local python = path.join(package:installdir("bin"), "python" .. (is_host("windows") and ".exe" or "")) for _, name in ipairs({"setuptools", "pip", "wheel"}) do @@ -103,7 +103,7 @@ package("python2") -- yep, this needs the absolute path where zlib needed a path relative to the SDK. table.insert(cflags, "-I" .. path.join(xcode_sdkdir, "/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers")) end - + -- avoid linking to libgcc https://mail.python.org/pipermail/python-dev/2012-February/116205.html local target_minver = get_config("target_minver") if target_minver then diff --git a/packages/s/skia/xmake.lua b/packages/s/skia/xmake.lua index 28c9fade2..e641fbec4 100644 --- a/packages/s/skia/xmake.lua +++ b/packages/s/skia/xmake.lua @@ -28,7 +28,7 @@ package("skia") add_includedirs("include/svg") add_includedirs("include/third_party") add_includedirs("include/utils") - + -- @note windows: only can build for vs2017 or vs2015 update 3 on_install("macosx", "linux", "windows", function (package) local pathes = os.getenv("PATH") or "" @@ -54,14 +54,14 @@ package("skia") skia_use_zlib = false} args.cc = package:build_getenv("cc") args.cxx = package:build_getenv("cxx") - local argstr = "" + local argstr = "" for k, v in pairs(args) do if type(v) == "string" then argstr = argstr .. ' ' .. k .. '=\"' .. v .. "\"" else argstr = argstr .. ' ' .. k .. '=' .. tostring(v) end - end + end os.vrun("python2 tools/git-sync-deps") os.vrun("bin/gn gen build --args='%s'", argstr:trim()) os.vrun("ninja -C build") @@ -73,7 +73,7 @@ package("skia") os.cp("build/*.a", package:installdir("lib")) end end) - + on_test(function (package) assert(package:check_cxxsnippets({test = [[ static void test() { diff --git a/packages/s/sol2/xmake.lua b/packages/s/sol2/xmake.lua index 6e66882a4..ed4bfeb6a 100644 --- a/packages/s/sol2/xmake.lua +++ b/packages/s/sol2/xmake.lua @@ -9,7 +9,7 @@ package("sol2") add_versions("v3.2.1", "b10f88dc1246f74a10348faef7d2c06e2784693307df74dcd87c4641cf6a6828") add_deps("cmake", "lua") - + on_install("linux", "macosx", "windows", function (package) local configs = {} import("package.tools.cmake").install(package, configs) diff --git a/packages/s/spdlog/xmake.lua b/packages/s/spdlog/xmake.lua index 9164a2b4c..4c9b8d031 100644 --- a/packages/s/spdlog/xmake.lua +++ b/packages/s/spdlog/xmake.lua @@ -13,7 +13,7 @@ package("spdlog") add_configs("header_only", { description = "Use header only", default = true, type = "boolean"}) add_configs("fmt_external", { description = "Use external fmt library instead of bundled", default = false, type = "boolean"}) add_configs("noexcept", { description = "Compile with -fno-exceptions. Call abort() on any spdlog exceptions", default = false, type = "boolean"}) - + on_load(function (package) if not package:config("header_only") then package:add("defines", "SPDLOG_COMPILE_LIB") @@ -28,13 +28,13 @@ package("spdlog") package:add("deps", "fmt") end end) - + on_install(function (package) if package:version():lt("1.4.0") or package:config("header_only") then os.cp("include", package:installdir()) return end - + local configs = {} if package:config("shared") and is_plat("windows") then raise("spdlog shared lib is not yet supported under windows!") diff --git a/packages/t/tbox/xmake.lua b/packages/t/tbox/xmake.lua index 7276e24c2..27baacc85 100644 --- a/packages/t/tbox/xmake.lua +++ b/packages/t/tbox/xmake.lua @@ -33,12 +33,12 @@ package("tbox") add_frameworks("Foundation") end - on_load(function (package) + on_load(function (package) if package:debug() then package:add("defines", "__tb_debug__") end end) - + on_install(function (package) local configs = {demo = false} if package:config("micro") then diff --git a/packages/u/util-linux/xmake.lua b/packages/u/util-linux/xmake.lua index af2710db0..7c2707758 100644 --- a/packages/u/util-linux/xmake.lua +++ b/packages/u/util-linux/xmake.lua @@ -34,7 +34,7 @@ package("util-linux") on_install("macosx", "linux", function (package) local configs = {"--disable-dependency-tracking", - "--disable-silent-rules", + "--disable-silent-rules", "--without-python", "--without-systemd", "--enable-static=yes", diff --git a/packages/x/x265/xmake.lua b/packages/x/x265/xmake.lua index 58da5efb8..662974397 100644 --- a/packages/x/x265/xmake.lua +++ b/packages/x/x265/xmake.lua @@ -14,7 +14,7 @@ package("x265") elseif is_plat("linux") then add_syslinks("pthread", "dl") end - + on_install("linux", "macosx", function (package) os.cd("build/linux") os.vrun("./multilib.sh") diff --git a/packages/z/zeromq/xmake.lua b/packages/z/zeromq/xmake.lua index b95d72ac2..52acd8e94 100644 --- a/packages/z/zeromq/xmake.lua +++ b/packages/z/zeromq/xmake.lua @@ -27,7 +27,7 @@ package("zeromq") end import("package.tools.autoconf").install(package, configs) end) - + on_test(function (package) assert(package:has_cfuncs("zmq_msg_init_size", {includes = "zmq.h"})) end) diff --git a/packages/z/zlib/xmake.lua b/packages/z/zlib/xmake.lua index 990684f60..bc171bf60 100644 --- a/packages/z/zlib/xmake.lua +++ b/packages/z/zlib/xmake.lua @@ -8,7 +8,7 @@ package("zlib") add_versions("1.2.10", "8d7e9f698ce48787b6e1c67e6bff79e487303e66077e25cb9784ac8835978017") add_versions("1.2.11", "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1") - + on_install("windows", function (package) io.gsub("win32/Makefile.msc", "%-MD", "-" .. package:config("vs_runtime")) os.vrun("nmake -f win32\\Makefile.msc zlib.lib")