* add faad2

* improve devil
pull/613/head
Hoildkv 3 years ago committed by GitHub
parent 7d88956cc7
commit 1b7e4c9074
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      packages/a/automake/xmake.lua
  2. 3
      packages/d/devil/xmake.lua
  3. 59
      packages/f/faad2/xmake.lua
  4. 14
      packages/l/libtool/xmake.lua

@ -4,14 +4,16 @@ package("automake")
set_homepage("https://www.gnu.org/software/automake/") set_homepage("https://www.gnu.org/software/automake/")
set_description("A tool for automatically generating Makefile.in files compliant with the GNU Coding Standards.") set_description("A tool for automatically generating Makefile.in files compliant with the GNU Coding Standards.")
if is_host("macosx", "linux") then add_urls("https://ftp.gnu.org/gnu/automake/automake-$(version).tar.gz",
add_urls("https://ftp.gnu.org/gnu/automake/automake-$(version).tar.gz", "https://mirrors.ustc.edu.cn/gnu/automake/automake-$(version).tar.gz")
"https://mirrors.ustc.edu.cn/gnu/automake/automake-$(version).tar.gz") add_versions("1.16.4", "8a0f0be7aaae2efa3a68482af28e5872d8830b9813a6a932a2571eac63ca1794")
add_versions("1.16.4", "8a0f0be7aaae2efa3a68482af28e5872d8830b9813a6a932a2571eac63ca1794") add_versions("1.16.1", "608a97523f97db32f1f5d5615c98ca69326ced2054c9f82e65bade7fc4c9dea8")
add_versions("1.16.1", "608a97523f97db32f1f5d5615c98ca69326ced2054c9f82e65bade7fc4c9dea8") add_versions("1.15.1", "988e32527abe052307d21c8ca000aa238b914df363a617e38f4fb89f5abf6260")
add_versions("1.15.1", "988e32527abe052307d21c8ca000aa238b914df363a617e38f4fb89f5abf6260") add_versions("1.9.6", "e6d3030dd3f7a07ee2075da5f77864a3cc3e78c5bf76bb48df23dbe3d6ba13b9")
add_versions("1.9.6", "e6d3030dd3f7a07ee2075da5f77864a3cc3e78c5bf76bb48df23dbe3d6ba13b9") add_versions("1.9.5", "68712753fcb756f3707b7da554917afb348450eb8530cae3b623a067078596fd")
add_versions("1.9.5", "68712753fcb756f3707b7da554917afb348450eb8530cae3b623a067078596fd")
if is_host("linux") then
add_extsources("apt::automake")
end end
add_deps("autoconf") add_deps("autoconf")

@ -20,7 +20,7 @@ package("devil")
lcms = {"lcms", "LCMS2"}, lcms = {"lcms", "LCMS2"},
mng = {"libmng", "MNG"}} mng = {"libmng", "MNG"}}
for config, depopt in pairs(configdepopts) do for config, depopt in pairs(configdepopts) do
add_configs(config, {description = "Build with " .. depopt[2] .. " support.", default = true, type = "boolean"}) add_configs(config, {description = "Build with " .. depopt[2] .. " support.", default = (config == "png"), type = "boolean"})
end end
on_load("windows", "macosx", "linux", function (package) on_load("windows", "macosx", "linux", function (package)
@ -43,7 +43,6 @@ package("devil")
table.insert(configs, "-DCMAKE_DISABLE_FIND_PACKAGE_" .. depopt[2] .. "=" .. (package:config(config) and "OFF" or "ON")) table.insert(configs, "-DCMAKE_DISABLE_FIND_PACKAGE_" .. depopt[2] .. "=" .. (package:config(config) and "OFF" or "ON"))
end end
import("package.tools.cmake").install(package, configs) import("package.tools.cmake").install(package, configs)
print(os.files(package:installdir("**")))
end) end)
on_test(function (package) on_test(function (package)

@ -0,0 +1,59 @@
package("faad2")
set_homepage("https://sourceforge.net/projects/faac")
set_description("FAAD2 is a HE, LC, MAIN and LTP profile, MPEG2 and MPEG-4 AAC decoder.")
set_license("GPL-2.0")
add_urls("https://github.com/knik0/faad2/archive/refs/tags/$(version).tar.gz", {version = function (version)
return version:gsub("%.", "_")
end})
add_versions("2.10.0", "0c6d9636c96f95c7d736f097d418829ced8ec6dbd899cc6cc82b728480a84bfb")
if not is_plat("windows") then
add_deps("autoconf", "automake", "libtool")
end
on_install("windows", function (package)
if is_plat("windows") then
local vs = import("core.tool.toolchain").load("msvc"):config("vs")
if tonumber(vs) < 2019 then
raise("Your compiler is too old to use this library.")
end
end
os.cd("project/msvc")
local configs = {"faad2.sln"}
table.insert(configs, "/p:Configuration=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "/p:Platform=" .. (package:is_arch("x64") and "x64" or "Win32"))
import("package.tools.msbuild").build(package, configs)
os.cp("../../include/*.h", package:installdir("include"))
os.cd(path.join("bin", package:debug() and "Debug" or "Release"))
os.cp("faad.exe", package:installdir("bin"))
if package:config("shared") then
os.cp("libfaad2_dll.dll", package:installdir("bin"))
os.cp("libfaad2_dll.lib", package:installdir("lib"))
else
os.cp("libfaad.lib", package:installdir("lib"))
end
package:addenv("PATH", "bin")
end)
on_install("macosx", "linux", function (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:config("pic") ~= false then
table.insert(configs, "--with-pic")
end
local libtool = package:dep("libtool")
if libtool then
os.vrun("autoreconf --force --install -I" .. libtool:installdir("share", "aclocal"))
else
os.vrun("autoreconf --force --install")
end
import("package.tools.autoconf").install(package, configs)
package:addenv("PATH", "bin")
end)
on_test(function (package)
assert(package:has_cfuncs("NeAACDecInit", {includes = "neaacdec.h"}))
end)

@ -4,12 +4,14 @@ package("libtool")
set_homepage("https://www.gnu.org/software/libtool/") set_homepage("https://www.gnu.org/software/libtool/")
set_description("A generic library support script.") set_description("A generic library support script.")
if is_host("macosx", "linux") then add_urls("http://ftpmirror.gnu.org/libtool/libtool-$(version).tar.gz",
add_urls("http://ftpmirror.gnu.org/libtool/libtool-$(version).tar.gz", "https://mirrors.ustc.edu.cn/gnu/libtool/libtool-$(version).tar.gz",
"https://mirrors.ustc.edu.cn/gnu/libtool/libtool-$(version).tar.gz", "git://git.savannah.gnu.org/libtool.git")
"git://git.savannah.gnu.org/libtool.git") add_versions("2.4.6", "e3bd4d5d3d025a36c21dd6af7ea818a2afcd4dfc1ea5a17b39d7854bcd0c06e3")
add_versions("2.4.6", "e3bd4d5d3d025a36c21dd6af7ea818a2afcd4dfc1ea5a17b39d7854bcd0c06e3") add_versions("2.4.5", "509cb49c7de14ce7eaf88993cf09fd4071882699dfd874c2e95b31ab107d6987")
add_versions("2.4.5", "509cb49c7de14ce7eaf88993cf09fd4071882699dfd874c2e95b31ab107d6987")
if is_host("linux") then
add_extsources("apt::libtool")
end end
add_deps("autoconf") add_deps("autoconf")

Loading…
Cancel
Save