diff --git a/packages/b/bison/xmake.lua b/packages/b/bison/xmake.lua index 5ec2d1200..31e84ed36 100644 --- a/packages/b/bison/xmake.lua +++ b/packages/b/bison/xmake.lua @@ -1,5 +1,6 @@ package("bison") + set_kind("binary") set_homepage("https://www.gnu.org/software/bison/") set_description("A general-purpose parser generator.") set_license("GPL-3.0") @@ -7,7 +8,10 @@ package("bison") add_urls("http://ftp.gnu.org/gnu/bison/bison-$(version).tar.gz") add_versions("3.7.4", "fbabc7359ccd8b4b36d47bfe37ebbce44805c052526d5558b95eda125d1677e2") - set_kind("binary") + if is_plat("linux") then + add_deps("m4") + end + on_install("macosx", "linux", function (package) import("package.tools.autoconf").install(package) os.rm(package:installdir("share", "doc")) diff --git a/packages/f/fmt/xmake.lua b/packages/f/fmt/xmake.lua index a55aea62c..f5f17638f 100644 --- a/packages/f/fmt/xmake.lua +++ b/packages/f/fmt/xmake.lua @@ -11,6 +11,8 @@ package("fmt") add_configs("header_only", {description = "Use header only version.", default = false, type = "boolean"}) + add_extsources("brew::fmt") + on_load(function (package) if package:config("header_only") then package:add("defines", "FMT_HEADER_ONLY=1") diff --git a/packages/g/glib/xmake.lua b/packages/g/glib/xmake.lua index 8c47bfe4f..d340ed73b 100644 --- a/packages/g/glib/xmake.lua +++ b/packages/g/glib/xmake.lua @@ -30,13 +30,11 @@ package("glib") "-Ddefault_library=static", "-Dlibmount=false", "-Dinstalled_tests=false"} - if is_plat("macosx") then + if package:is_plat("macosx") then table.insert(configs, "-Diconv=native") end table.insert(configs, "-Dgio_module_dir=" .. path.join(package:installdir(), "lib/gio/modules")) - if is_plat("linux") then - table.insert(configs, "--libdir=" .. package:installdir("lib")) - end + table.insert(configs, "--libdir=lib") io.gsub("meson.build", "subdir%('tests'%)", "") io.gsub("meson.build", "subdir%('fuzzing'%)", "") io.gsub("gio/meson.build", "subdir%('tests'%)", "") diff --git a/packages/l/libmpdclient/xmake.lua b/packages/l/libmpdclient/xmake.lua index c008fb2a7..194006330 100644 --- a/packages/l/libmpdclient/xmake.lua +++ b/packages/l/libmpdclient/xmake.lua @@ -7,19 +7,12 @@ package("libmpdclient") on_install("linux", function (package) local configs = {} + table.insert(configs, "--libdir=lib") table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static")) import("package.tools.meson").install(package, configs) os.cp("include", package:installdir()) os.cp("build_*/version.h", package:installdir() .. "/include/mpd") os.rm(package:installdir() .. "/include/mpd/version.h.in") - if package:is_plat("linux") and package:is_arch("x86_64") then - if os.isdir(path.join(package:installdir(), "lib", "x86_64-linux-gnu")) then - package:add("linkdirs", "lib/x86_64-linux-gnu") - elseif os.isdir(path.join(package:installdir(), "lib64")) then - package:add("linkdirs", "lib64") - end - package:add("links", "mpdclient") - end end) on_test(function (package) diff --git a/packages/l/libxkbcommon/xmake.lua b/packages/l/libxkbcommon/xmake.lua index 49054399b..1174c9cc4 100644 --- a/packages/l/libxkbcommon/xmake.lua +++ b/packages/l/libxkbcommon/xmake.lua @@ -20,15 +20,8 @@ package("libxkbcommon") add_deps("meson") on_install("linux", function (package) package:addenv("PATH", "bin") - - -- add links - local arch = package:is_arch("x86_64", "x64") and "x86_64" or "x86" - package:add("linkdirs", path.join("lib", arch .. "-linux-gnu")) - package:add("links", "xkbregistry", "xkbcommon") - os.mv(package:installdir("lib", arch .. "-linux-gnu", "pkgconfig"), package:installdir("lib")) - - -- build local configs = {"-Denable-docs=false", "-Dc_link_args=-lm"} + table.insert(configs, "--libdir=lib") if package:config("x11") then table.join2(configs, {"-Denable-wayland=false", "-Dxkb-config-root=/usr/share/X11/xkb", "-Dx-locale-root=/usr/share/X11/locale"}) else diff --git a/packages/w/wayland/xmake.lua b/packages/w/wayland/xmake.lua index a2dadeb3b..329aba0a1 100644 --- a/packages/w/wayland/xmake.lua +++ b/packages/w/wayland/xmake.lua @@ -9,7 +9,7 @@ package("wayland") add_resources("1.x", "protocols", "https://wayland.freedesktop.org/releases/wayland-protocols-1.20.tar.xz", "9782b7a1a863d82d7c92478497d13c758f52e7da4f197aa16443f73de77e4de7") - add_deps("meson", "libxml2", "libffi", "expat") + add_deps("meson", "libxml2", "libffi", "expat", "bison") on_install("linux", function (package) -- imports @@ -27,6 +27,7 @@ package("wayland") -- build wayland local configs = {"-Ddocumentation=false", "-Dc_link_args=-lm"} + table.insert(configs, "--libdir=lib") local envs = meson.buildenvs(package) envs.LD_LIBRARY_PATH = path.joinenv(table.join(LD_LIBRARY_PATH, envs.LD_LIBRARY_PATH)) envs.PKG_CONFIG_PATH = path.joinenv(table.join(PKG_CONFIG_PATH, envs.PKG_CONFIG_PATH)) @@ -35,10 +36,7 @@ package("wayland") meson.install(package, configs, {envs = envs}) -- add links - local arch = package:is_arch("x86_64", "x64") and "x86_64" or "x86" - package:add("linkdirs", path.join("lib", arch .. "-linux-gnu")) package:add("links", "wayland-client", "wayland-server", "wayland-cursor", "wayland-egl") - os.mv(package:installdir("lib", arch .. "-linux-gnu", "pkgconfig"), package:installdir("lib")) -- install wayland-protocols local protocol = assert(package:resourcedir("protocols"), "wayland-protocols not found!")