update some packages (#678)

* update opencv

* update x264

* update libuv

* improve pkgconf

* improve libffi static

* fix libintl

* update glib
pull/819/head
Hoildkv 3 years ago committed by GitHub
parent e8014417a2
commit c42b5ee32c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 34
      packages/g/glib/xmake.lua
  2. 7
      packages/l/libffi/port/xmake.lua
  3. 6
      packages/l/libffi/xmake.lua
  4. 25
      packages/l/libintl/port/xmake.lua
  5. 2
      packages/l/libuv/xmake.lua
  6. 2
      packages/o/opencv/xmake.lua
  7. 7
      packages/p/pkgconf/xmake.lua
  8. 10
      packages/x/x264/xmake.lua

@ -8,12 +8,17 @@ package("glib")
add_versions("2.60.2", "2ef15475060addfda0443a7e8a52b28a10d5e981e82c083034061daf9a8f80d9")
add_versions("2.68.2", "ecc7798a9cc034eabdfd7f246e6dd461cdbf1175fcc2e9867cc7da7b7309e0fb")
add_versions("2.69.2", "a62249e35a8635175a697b3215f1df2b89e0fbb4adb520dcbe21a3ae1ebb8882")
add_versions("2.70.0", "200d7df811c5ba634afbf109f14bb40ba7fde670e89389885da14e27c0840742")
if is_plat("windows") then
add_configs("shared", {description = "Build shared library.", default = true, type = "boolean", readonly = true})
end
add_deps("meson", "ninja", "libffi", "pcre")
if is_plat("linux") then
add_deps("libiconv")
elseif is_plat("macosx") then
add_deps("gettext")
elseif is_plat("windows", "macosx") then
add_deps("libintl")
end
add_includedirs("include/glib-2.0", "lib/glib-2.0/include")
@ -50,16 +55,20 @@ package("glib")
end)
end
on_install("macosx", "linux", function (package)
on_install("windows", "macosx", "linux", function (package)
import("package.tools.meson")
local configs = {"-Dbsymbolic_functions=false",
"-Ddtrace=false",
"-Dman=false",
"-Dgtk_doc=false",
"-Dtests=false",
"-Dinstalled_tests=false",
"-Dsystemtap=false",
"-Dlibmount=disabled"}
if package:is_plat("macosx") and package:version():le("2.61.0") then
table.insert(configs, "-Diconv=native")
elseif package:is_plat("windows") then
table.insert(configs, "-Diconv=external")
end
table.insert(configs, "-Dglib_debug=" .. (package:debug() and "enabled" or "disabled"))
table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static"))
@ -67,7 +76,24 @@ package("glib")
io.gsub("meson.build", "subdir%('tests'%)", "")
io.gsub("meson.build", "subdir%('fuzzing'%)", "")
io.gsub("gio/meson.build", "subdir%('tests'%)", "")
import("package.tools.meson").install(package, configs)
if package:is_plat("windows") then
io.gsub("meson.build", "dependency%('libffi',", "dependency('libffi', modules: ['libffi::ffi'],")
end
local envs = meson.buildenvs(package)
if package:is_plat("windows") then
for _, dep in ipairs(package:orderdeps()) do
local fetchinfo = dep:fetch()
if fetchinfo then
for _, includedir in ipairs(fetchinfo.includedirs or fetchinfo.sysincludedirs) do
envs.INCLUDE = (envs.INCLUDE or "") .. path.envsep() .. includedir
end
for _, linkdir in ipairs(fetchinfo.linkdirs) do
envs.LIB = (envs.LIB or "") .. path.envsep() .. linkdir
end
end
end
end
meson.install(package, configs, {envs = envs})
package:addenv("PATH", "bin")
end)

@ -2,6 +2,8 @@ set_project("libffi")
add_rules("mode.debug", "mode.release")
add_rules("utils.install.cmake_importfiles")
set_configvar("PACKAGE", "libffi")
set_configvar("PACKAGE_NAME", "libffi")
set_configvar("PACKAGE_TARNAME", "libffi")
@ -13,6 +15,7 @@ option("vers")
set_showmenu(true)
option_end()
if has_config("vers") then
set_version(get_config("vers"))
set_configvar("VERSION", get_config("vers"))
set_configvar("PACKAGE_VERSION", get_config("vers"))
set_configvar("PACKAGE_STRING", "libffi " .. get_config("vers"))
@ -115,7 +118,6 @@ end
target("ffi")
set_kind("$(kind)")
add_defines("FFI_BUILDING")
if is_plat("windows") and is_kind("shared") then
add_defines("FFI_BUILDING_DLL")
end
@ -153,3 +155,6 @@ target("ffi")
add_includedirs("src/aarch64")
add_headerfiles("src/aarch64/ffitarget.h")
end
before_build(function (target)
io.replace("include/ffi.h", "!defined FFI_BUILDING", target:is_static() and "0" or "1", {plain = true})
end)

@ -13,12 +13,6 @@ package("libffi")
add_extsources("apt::libffi-dev")
end
on_load("windows", function (package)
if not package:config("shared") then
package:add("defines", "FFI_BUILDING")
end
end)
on_load("macosx", "linux", "iphoneos", function (package)
if package:gitref() then
package:add("deps", "autoconf", "automake", "libtool")

@ -23,6 +23,7 @@ option("vers")
set_showmenu(true)
option_end()
if has_config("vers") then
set_version(get_config("vers"))
set_configvar("VERSION", get_config("vers"))
set_configvar("PACKAGE_VERSION", get_config("vers"))
set_configvar("PACKAGE_STRING", "gettext-runtime " .. get_config("vers"))
@ -40,6 +41,7 @@ end
includes("check_cfuncs.lua")
includes("check_ctypes.lua")
includes("check_macros.lua")
includes("check_links.lua")
includes("check_cincludes.lua")
includes("check_csnippets.lua")
@ -222,11 +224,12 @@ configvar_check_csnippets("GNULIB_SIGPIPE", [[#include <signal.h>
configvar_check_csnippets("HAVE_LANGINFO_CODESET", [[#include <langinfo.h>
int test() { char* cs = nl_langinfo(CODESET); return !cs; }]])
configvar_check_csnippets("HAVE_ENVIRON_DECL=0", [[extern struct {int foo;} environ;
void test() {environ.foo = 1;}]], {includes = has_config("__HAVE_UNISTD_H") and "unistd.h" or "stdlib.h", default = 1})
void test() {environ.foo = 1;}]], {includes = is_plat("windows") and "stdlib.h" or "unistd.h", default = 1})
-- config.h variables
configvar_check_ctypes("HAVE_STDINT_H_WITH_UINTMAX", "uintmax_t", {includes = "stdint.h"})
configvar_check_ctypes("HAVE_UINTMAX_T", "uintmax_t", {includes = "stdint.h"})
configvar_check_links("HAVE_PTHREAD_API", "pthread")
configvar_check_csnippets("HAVE_ALLOCA", [[
#ifdef __GNUC__
# define alloca __builtin_alloca
@ -241,10 +244,14 @@ void test() { char *p = (char *)alloca(1); }
if is_plat("windows") and is_kind("shared") then
set_configvar("WOE32DLL", 1)
end
set_configvar("SETLOCALE_NULL_ALL_MTSAFE", is_plat("windows", "linux") and 1 or 0)
set_configvar("SETLOCALE_NULL_ONE_MTSAFE", 1)
set_configvar("NEED_SETLOCALE_IMPROVED", is_plat("mingw") and 1 or 0)
set_configvar("NEED_SETLOCALE_MTSAFE", is_plat("windows", "linux") and 0 or 1)
-- libgnuintl.h variables
set_configvar("HAVE_NAMELESS_LOCALES", 0)
configvar_check_cfuncs("HAVE_NEWLOCALE", "newlocale", {includes = "locale.h", default = 0})
configvar_check_cfuncs("HAVE_NEWLOCALE", "newlocale", {includes = (is_plat("macosx") and "xlocale.h" or "locale.h"), default = 0})
configvar_check_cfuncs("HAVE_POSIX_PRINTF", "printf", {includes = "stdio.h", default = 0})
configvar_check_cfuncs("HAVE_WPRINTF", "wprintf", {includes = "wchar.h", default = 0})
configvar_check_cfuncs("HAVE_SNPRINTF", "snprintf", {includes = "stdio.h", default = 0})
@ -283,6 +290,7 @@ target("intl")
"gettext-runtime/intl/loadmsgcat.c",
"gettext-runtime/intl/localealias.c",
"gettext-runtime/intl/localename.c",
"gettext-runtime/intl/localename-table.c",
"gettext-runtime/intl/localcharset.c",
"gettext-runtime/intl/lock.c",
"gettext-runtime/intl/log.c",
@ -292,8 +300,19 @@ target("intl")
"gettext-runtime/intl/plural-exp.c",
"gettext-runtime/intl/printf.c",
"gettext-runtime/intl/relocatable.c",
"gettext-runtime/intl/setlocale.c",
"gettext-runtime/intl/setlocale-lock.c",
"gettext-runtime/intl/setlocale_null.c",
"gettext-runtime/intl/threadlib.c",
"gettext-runtime/intl/textdomain.c",
"gettext-runtime/intl/version.c")
"gettext-runtime/intl/version.c",
"gettext-runtime/intl/xsize.c")
if is_plat("windows") then
add_files("gettext-runtime/intl/windows-mutex.c",
"gettext-runtime/intl/windows-rwlock.c",
"gettext-runtime/intl/windows-recmutex.c",
"gettext-runtime/intl/windows-once.c")
end
before_build(function (target)
os.cp("gettext-runtime/intl/libgnuintl.h", "gettext-runtime/intl/libintl.h")
local lines = io.readfile("gettext-runtime/export.h")

@ -2,9 +2,11 @@ package("libuv")
set_homepage("http://libuv.org/")
set_description("A multi-platform support library with a focus on asynchronous I/O.")
set_license("MIT")
set_urls("https://github.com/libuv/libuv/archive/$(version).zip",
"https://github.com/libuv/libuv.git")
add_versions("v1.42.0", "031130768b25ae18c4b9d4a94ba7734e2072b11c6fce3e554612c516c3241402")
add_versions("v1.41.0", "cb89a8b9f686c5ccf7ed09a9e0ece151a73ebebc17af3813159c335b02181794")
add_versions("v1.40.0", "61366e30d8484197dc9e4a94dbd98a0ba52fb55cb6c6d991af1f3701b10f322b")
add_versions("v1.28.0", "e7b3caea3388a02f2f99e61f9a71ed3e3cbb88bbb4b0b630d609544099b40674")

@ -6,12 +6,14 @@ package("opencv")
add_urls("https://github.com/opencv/opencv/archive/$(version).tar.gz",
"https://github.com/opencv/opencv.git")
add_versions("4.5.4", "c20bb83dd790fc69df9f105477e24267706715a9d3c705ca1e7f613c7b3bad3d")
add_versions("4.5.3", "77f616ae4bea416674d8c373984b20c8bd55e7db887fd38c6df73463a0647bab")
add_versions("4.5.2", "ae258ed50aa039279c3d36afdea5c6ecf762515836b27871a8957c610d0424f8")
add_versions("4.5.1", "e27fe5b168918ab60d58d7ace2bd82dd14a4d0bd1d3ae182952c2113f5637513")
add_versions("4.2.0", "9ccb2192d7e8c03c58fee07051364d94ed7599363f3b0dce1c5e6cc11c1bb0ec")
add_versions("3.4.9", "b7ea364de7273cfb3b771a0d9c111b8b8dfb42ff2bcd2d84681902fb8f49892a")
add_resources("4.5.4", "opencv_contrib", "https://github.com/opencv/opencv_contrib/archive/4.5.4.tar.gz", "ad74b440b4539619dc9b587995a16b691246023d45e34097c73e259f72de9f81")
add_resources("4.5.3", "opencv_contrib", "https://github.com/opencv/opencv_contrib/archive/4.5.3.tar.gz", "73da052fd10e73aaba2560eaff10cc5177e2dcc58b27f8aedf7c649e24c233bc")
add_resources("4.5.2", "opencv_contrib", "https://github.com/opencv/opencv_contrib/archive/4.5.2.tar.gz", "9f52fd3114ac464cb4c9a2a6a485c729a223afb57b9c24848484e55cef0b5c2a")
add_resources("4.5.1", "opencv_contrib", "https://github.com/opencv/opencv_contrib/archive/4.5.1.tar.gz", "12c3b1ddd0b8c1a7da5b743590a288df0934e5cef243e036ca290c2e45e425f5")

@ -1,4 +1,5 @@
package("pkgconf")
set_kind("binary")
set_homepage("http://pkgconf.org")
set_description("A program which helps to configure compiler and linker flags for development frameworks.")
@ -7,15 +8,15 @@ package("pkgconf")
add_versions("1.7.4", "d73f32c248a4591139a6b17777c80d4deab6b414ec2b3d21d0a24be348c476ab")
add_versions("1.8.0", "ef9c7e61822b7cb8356e6e9e1dca58d9556f3200d78acab35e4347e9d4c2bbaf")
if is_plat("windows") then
if is_host("windows") then
add_deps("meson", "ninja")
end
on_install("linux", "bsd", function(package)
on_install("@macosx", "@linux", "@bsd", function(package)
import("package.tools.autoconf").install(package)
end)
on_install("windows", function(package)
on_install("@windows", function(package)
import("package.tools.meson").install(package, {"-Dtests=false"})
end)

@ -4,15 +4,19 @@ package("x264")
set_description("A free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format.")
add_urls("http://git.videolan.org/git/x264.git")
add_versions("v2021.09.29", "66a5bc1bd1563d8227d5d18440b525a09bcf17ca")
add_versions("v2018.09.25", "545de2ffec6ae9a80738de1b2c8cf820249a2530")
add_deps("nasm")
add_syslinks("pthread", "dl")
on_install("linux", "macosx", function (package)
import("package.tools.autoconf").install(package, {"--disable-lsmash", "--enable-static", "--enable-strip"})
local configs = {"--disable-avs", "--disable-lsmash", "--disable-lavf", "--disable-bashcompletion"}
table.insert(configs, "--enable-" .. (package:configs("shared") and "shared" or "static"))
if package:config("pic") then
table.insert(configs, "--enable-pic")
end
import("package.tools.autoconf").install(package, configs)
end)
on_test(function (package)

Loading…
Cancel
Save