瀏覽代碼

add some packages

ruki 6 年之前
父節點
當前提交
0291adec1f

+ 21 - 0
packages/a/autoconf/xmake.lua

@@ -0,0 +1,21 @@
+package("autoconf")
+
+    set_kind("binary")
+    set_homepage("https://www.gnu.org/software/autoconf/autoconf.html")
+    set_description("An extensible package of M4 macros that produce shell scripts to automatically configure software source code packages.")
+
+    if is_host("macosx", "linux") then
+        add_urls("http://ftp.gnu.org/gnu/autoconf/autoconf-$(version).tar.gz",
+                 "https://mirrors.ustc.edu.cn/gnu/autoconf/autoconf-$(version).tar.gz",
+                 "git://git.sv.gnu.org/autoconf")
+        add_versions("2.69", "954bd69b391edc12d6a4a51a2dd1476543da5c6bbf05a95b59dc0dd6fd4c2969")
+        add_versions("2.68", "eff70a2916f2e2b3ed7fe8a2d7e63d72cf3a23684b56456b319c3ebce0705d99")
+    end
+
+    on_install("macosx", "linux", function (package)
+        import("package.tools.autoconf").install(package)
+    end)
+
+    on_test(function (package)
+        os.vrun("autoconf --version")
+    end)

+ 26 - 0
packages/a/automake/xmake.lua

@@ -0,0 +1,26 @@
+package("automake")
+
+    set_kind("binary")
+    set_homepage("https://www.gnu.org/software/automake/")
+    set_description("A tool for automatically generating Makefile.in files compliant with the GNU Coding Standards.")
+
+    if is_host("macosx", "linux") then
+        add_urls("http://ftp.gnu.org/gnu/automake/automake-$(version).tar.gz",
+                 "https://mirrors.ustc.edu.cn/gnu/automake/automake-$(version).tar.gz")
+        add_versions("1.16.1", "608a97523f97db32f1f5d5615c98ca69326ced2054c9f82e65bade7fc4c9dea8")
+        add_versions("1.15.1", "988e32527abe052307d21c8ca000aa238b914df363a617e38f4fb89f5abf6260")
+        add_versions("1.9.6", "e6d3030dd3f7a07ee2075da5f77864a3cc3e78c5bf76bb48df23dbe3d6ba13b9")
+        add_versions("1.9.5", "68712753fcb756f3707b7da554917afb348450eb8530cae3b623a067078596fd")
+    end
+
+    on_install("macosx", "linux", function (package)
+        import("package.tools.autoconf").install(package)
+        io.writefile(path.join(package:installdir("share", "aclocal"), "dirlist"), [[
+            /usr/local/share/aclocal
+            /usr/share/aclocal
+        ]])
+    end)
+
+    on_test(function (package)
+        os.vrun("automake --version")
+    end)

+ 51 - 0
packages/c/cmake/xmake.lua

@@ -0,0 +1,51 @@
+package("cmake")
+
+    set_kind("binary")
+    set_homepage("https://cmake.org")
+    set_description("A cross-platform family of tool designed to build, test and package software")
+
+    if is_host("macosx") then
+        add_urls("https://cmake.org/files/v3.11/cmake-3.11.4-Darwin-x86_64.tar.gz")
+        add_urls("https://github.com/Kitware/CMake/releases/download/v3.11.4/cmake-3.11.4-Darwin-x86_64.tar.gz")
+        add_urls("https://gitlab.com/xmake-mirror/cmake-releases/raw/master/cmake-3.11.4-Darwin-x86_64.tar.gz")
+        add_urls("https://dev.tencent.com/u/waruqi/p/cmake-releases/git/raw/master/cmake-3.11.4-Darwin-x86_64.tar.gz")
+        add_versions("3.11.4", "2b5eb705f036b1906a5e0bce996e9cd56d43d73bdee8318ece3e5ce31657b812")
+    elseif is_host("linux") and is_arch("x86_64") then
+        add_urls("https://cmake.org/files/v3.11/cmake-3.11.4-Linux-x86_64.tar.gz")
+        add_urls("https://github.com/Kitware/CMake/releases/download/v3.11.4/cmake-3.11.4-Linux-x86_64.tar.gz")
+        add_urls("https://gitlab.com/xmake-mirror/cmake-releases/raw/master/cmake-3.11.4-Linux-x86_64.tar.gz")
+        add_urls("https://dev.tencent.com/u/waruqi/p/cmake-releases/git/raw/master/cmake-3.11.4-Linux-x86_64.tar.gz")
+        add_versions("3.11.4", "6dab016a6b82082b8bcd0f4d1e53418d6372015dd983d29367b9153f1a376435")
+    elseif is_host("windows") then
+        if os.arch() == "x64" then
+            add_urls("https://cmake.org/files/v3.11/cmake-3.11.4-win64-x64.zip", {excludes = "*/doc/*"})
+            add_urls("https://github.com/Kitware/CMake/releases/download/v3.11.4/cmake-3.11.4-win64-x64.zip", {excludes = "*/doc/*"})
+            add_urls("https://gitlab.com/xmake-mirror/cmake-releases/raw/master/cmake-3.11.4-win64-x64.zip", {excludes = "*/doc/*"})
+            add_urls("https://dev.tencent.com/u/waruqi/p/cmake-releases/git/raw/master/cmake-3.11.4-win64-x64.zip", {excludes = "*/doc/*"})
+            add_versions("3.11.4", "d3102abd0ded446c898252b58857871ee170312d8e7fd5cbff01fbcb1068a6e5")
+        else
+            add_urls("https://cmake.org/files/v3.11/cmake-3.11.4-win32-x86.zip", {excludes = "*/doc/*"})
+            add_urls("https://github.com/Kitware/CMake/releases/download/v3.11.4/cmake-3.11.4-win32-x86.zip", {excludes = "*/doc/*"})
+            add_urls("https://gitlab.com/xmake-mirror/cmake-releases/raw/master/cmake-3.11.4-win32-x86.zip", {excludes = "*/doc/*"})
+            add_urls("https://dev.tencent.com/u/waruqi/p/cmake-releases/git/raw/master/cmake-3.11.4-win32-x86.zip", {excludes = "*/doc/*"})
+            add_versions("3.11.4", "b068001ff879f86e704977c50a8c5917e4b4406c66242366dba2674abe316579")
+        end
+    end
+
+    on_install("macosx", function (package)
+        os.cp("CMake.app/Contents/bin", package:installdir())
+        os.cp("CMake.app/Contents/share", package:installdir())
+    end)
+
+    on_install("linux|x86_64", "windows", function (package)
+        os.cp("bin", package:installdir())
+        os.cp("share", package:installdir())
+    end)
+
+    on_install(function (package)
+        import("package.manager").install("cmake")
+    end)
+
+    on_test(function (package)
+        os.vrun("cmake --version")
+    end)

+ 21 - 0
packages/l/libtool/xmake.lua

@@ -0,0 +1,21 @@
+package("libtool")
+
+    set_kind("binary")
+    set_homepage("https://www.gnu.org/software/libtool/")
+    set_description("A generic library support script.")
+
+    if is_host("macosx", "linux") then
+        add_urls("http://ftpmirror.gnu.org/libtool/libtool-$(version).tar.gz",
+                 "https://mirrors.ustc.edu.cn/gnu/libtool/libtool-$(version).tar.gz",
+                 "git://git.savannah.gnu.org/libtool.git")
+        add_versions("2.4.6", "e3bd4d5d3d025a36c21dd6af7ea818a2afcd4dfc1ea5a17b39d7854bcd0c06e3")
+        add_versions("2.4.5", "509cb49c7de14ce7eaf88993cf09fd4071882699dfd874c2e95b31ab107d6987")
+    end
+
+    on_install("macosx", "linux", function (package)
+        import("package.tools.autoconf").install(package, {"--disable-dependency-tracking", "--enable-ltdl-install"})
+    end)
+
+    on_test(function (package)
+        os.vrun("libtool --version")
+    end)

+ 28 - 0
packages/p/patch/xmake.lua

@@ -0,0 +1,28 @@
+package("patch")
+
+    set_kind("binary")
+    set_homepage("http://www.gnu.org/software/patch/patch.html")
+    set_description("GNU patch, which applies diff files to original files.")
+
+    if is_host("windows") then
+        add_urls("https://gitlab.com/xmake-mirror/patch/uploads/2ff76c0c6a35a4a6af98bb7052544c38/patch-$(version)-bin.zip")
+        add_urls("https://github.com/xmake-mirror/patch/releases/download/v2.5.9/patch-$(version)-bin.zip")
+        add_versions("2.5.9-7", "fabd6517e7bd88e067db9bf630d69bb3a38a08e044fa73d13a704ab5f8dd110b")
+    else
+        add_urls("https://ftp.gnu.org/gnu/patch/patch-$(version).tar.bz2", {alias = "gnuftp"})
+        add_urls("https://github.com/xmake-mirror/patch/archive/v$(version).tar.gz", {alias = "github"})
+        add_versions("gnuftp:2.7.6", "3d1d001210d76c9f754c12824aa69f25de7cb27bb6765df63455b77601a0dcc9")
+        add_versions("github:2.7.6", "33d5a86bad9813b27dbbe890123d0b88fbcc74d5d997aeadde60c670a2bd0eb9")
+    end
+
+    on_install("windows", function (package)
+        os.cp("bin/*", package:installdir("bin"))
+    end)
+
+    on_install("macosx", "linux", function (package)
+        import("package.tools.autoconf").install(package)
+    end)
+
+    on_test(function (package)
+        os.vrun("patch --version")
+    end)

+ 24 - 0
packages/p/pkg-config/xmake.lua

@@ -0,0 +1,24 @@
+package("pkg-config")
+
+    set_kind("binary")
+    set_homepage("https://freedesktop.org/wiki/Software/pkg-config/")
+    set_description("A helper tool used when compiling applications and libraries.")
+
+    if is_host("macosx", "linux") then
+        add_urls("https://pkgconfig.freedesktop.org/releases/pkg-config-$(version).tar.gz",
+                 "http://fco.it.distfiles.macports.org/mirrors/macports-distfiles/pkgconfig/pkg-config-$(version).tar.gz",
+                 "git://anongit.freedesktop.org/pkg-config")
+        add_versions("0.29.2", "6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591")
+    end
+
+    on_install("macosx", "linux", function (package)
+        local pcpath = {"/usr/local/lib/pkgconfig", "/usr/lib/pkgconfig"}
+        if is_host("macosx") then
+            table.insert(pcpath, "/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/" .. macos.version():major() .. '.' .. macos.version():minor())
+        end
+        import("package.tools.autoconf").install(package, {"--disable-debug", "--disable-host-tool", "--with-internal-glib", ["with-pc-path"] = table.concat(pcpath, ':')})
+    end)
+
+    on_test(function (package)
+        os.vrun("pkg-config --version")
+    end)