Browse Source

split wayland-protocols from wayland (#6274)

* split wayland-protocols from wayland

* restrict wayland to native
Inari0 7 months ago
parent
commit
a81e99d138

+ 1 - 1
packages/g/glfw/xmake.lua

@@ -44,7 +44,7 @@ package("glfw")
             package:add("deps", "libx11", "libxrandr", "libxrender", "libxinerama", "libxfixes", "libxcursor", "libxi", "libxext")
             package:add("deps", "libx11", "libxrandr", "libxrender", "libxinerama", "libxfixes", "libxcursor", "libxi", "libxext")
         end
         end
         if package:config("wayland") then
         if package:config("wayland") then
-            package:add("deps", "wayland")
+            package:add("deps", "wayland", "wayland-protocols")
         end
         end
     end)
     end)
 
 

+ 4 - 3
packages/w/wayland-protocols/xmake.lua

@@ -3,8 +3,8 @@ package("wayland-protocols")
     set_description("Additional Wayland protocols")
     set_description("Additional Wayland protocols")
     set_license("MIT")
     set_license("MIT")
 
 
-    add_urls("https://wayland.freedesktop.org/releases/wayland-protocols-$(version).tar.xz")
     add_urls("https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/$(version)/downloads/wayland-protocols-$(version).tar.xz")
     add_urls("https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/$(version)/downloads/wayland-protocols-$(version).tar.xz")
+    add_urls("https://wayland.freedesktop.org/releases/wayland-protocols-$(version).tar.xz")
     add_versions("1.24", "bff0d8cffeeceb35159d6f4aa6bab18c807b80642c9d50f66cba52ecf7338bc2")
     add_versions("1.24", "bff0d8cffeeceb35159d6f4aa6bab18c807b80642c9d50f66cba52ecf7338bc2")
     add_versions("1.25", "f1ff0f7199d0a0da337217dd8c99979967808dc37731a1e759e822b75b571460")
     add_versions("1.25", "f1ff0f7199d0a0da337217dd8c99979967808dc37731a1e759e822b75b571460")
     add_versions("1.26", "c553384c1c68afd762fa537a2569cc9074fe7600da12d3472761e77a2ba56f13")
     add_versions("1.26", "c553384c1c68afd762fa537a2569cc9074fe7600da12d3472761e77a2ba56f13")
@@ -14,14 +14,15 @@ package("wayland-protocols")
     add_versions("1.30", "3c1498fb65fd2b80b0376d7e87cf215e6ae957b2ccdba5da45a448718831bc60")
     add_versions("1.30", "3c1498fb65fd2b80b0376d7e87cf215e6ae957b2ccdba5da45a448718831bc60")
     add_versions("1.31", "a07fa722ed87676ec020d867714bc9a2f24c464da73912f39706eeef5219e238")
     add_versions("1.31", "a07fa722ed87676ec020d867714bc9a2f24c464da73912f39706eeef5219e238")
     add_versions("1.32", "7459799d340c8296b695ef857c07ddef24c5a09b09ab6a74f7b92640d2b1ba11")
     add_versions("1.32", "7459799d340c8296b695ef857c07ddef24c5a09b09ab6a74f7b92640d2b1ba11")
+    add_versions("1.39", "e1dcdcbbf08e2e0a8a02ee5d9a0be3a6aafc39a4b51fa7e0d2f1a16411cb72fa")
 
 
     add_deps("meson", "ninja", "wayland", "pkg-config")
     add_deps("meson", "ninja", "wayland", "pkg-config")
 
 
-    if is_plat("linux") then 
+    if is_plat("linux") then
         add_extsources("apt::wayland-protocols", "pacman::wayland-protocols")
         add_extsources("apt::wayland-protocols", "pacman::wayland-protocols")
     end
     end
 
 
-    on_install("linux", function (package)
+    on_install("linux|native", function (package)
         local configs = {"-Dtests=false"}
         local configs = {"-Dtests=false"}
         import("package.tools.meson").install(package, configs)
         import("package.tools.meson").install(package, configs)
     end)
     end)

+ 2 - 27
packages/w/wayland/xmake.lua

@@ -7,10 +7,7 @@ package("wayland")
     add_versions("1.18.0", "4675a79f091020817a98fd0484e7208c8762242266967f55a67776936c2e294d")
     add_versions("1.18.0", "4675a79f091020817a98fd0484e7208c8762242266967f55a67776936c2e294d")
     add_versions("1.19.0", "baccd902300d354581cd5ad3cc49daa4921d55fb416a5883e218750fef166d15")
     add_versions("1.19.0", "baccd902300d354581cd5ad3cc49daa4921d55fb416a5883e218750fef166d15")
     add_versions("1.23.0", "05b3e1574d3e67626b5974f862f36b5b427c7ceeb965cb36a4e6c2d342e45ab2")
     add_versions("1.23.0", "05b3e1574d3e67626b5974f862f36b5b427c7ceeb965cb36a4e6c2d342e45ab2")
-
-    add_resources("1.18.0", "protocols", "https://wayland.freedesktop.org/releases/wayland-protocols-1.20.tar.xz", "9782b7a1a863d82d7c92478497d13c758f52e7da4f197aa16443f73de77e4de7")
-    add_resources("1.19.0", "protocols", "https://wayland.freedesktop.org/releases/wayland-protocols-1.21.tar.xz", "b99945842d8be18817c26ee77dafa157883af89268e15f4a5a1a1ff3ffa4cde5")
-    add_resources("1.23.0", "protocols", "https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/1.36/downloads/wayland-protocols-1.36.tar.xz", "71fd4de05e79f9a1ca559fac30c1f8365fa10346422f9fe795f74d77b9ef7e92")
+    add_versions("1.23.1", "864fb2a8399e2d0ec39d56e9d9b753c093775beadc6022ce81f441929a81e5ed")
 
 
     if is_plat("linux") then
     if is_plat("linux") then
         add_extsources("apt::libwayland-dev", "pacman::wayland")
         add_extsources("apt::libwayland-dev", "pacman::wayland")
@@ -22,10 +19,8 @@ package("wayland")
         add_deps("epoll-shim")
         add_deps("epoll-shim")
     end
     end
 
 
-    on_install("linux", "bsd", function (package)
-        -- imports
+    on_install("linux|native", "bsd", function (package)
         import("package.tools.meson")
         import("package.tools.meson")
-        import("lib.detect.find_file")
 
 
         -- set environment variables
         -- set environment variables
         package:addenv("PATH", "bin")
         package:addenv("PATH", "bin")
@@ -44,26 +39,6 @@ package("wayland")
         envs.ACLOCAL_PATH    = path.joinenv(table.join(ACLOCAL_PATH, envs.ACLOCAL_PATH))
         envs.ACLOCAL_PATH    = path.joinenv(table.join(ACLOCAL_PATH, envs.ACLOCAL_PATH))
         envs.ACLOCAL         = ACLOCAL
         envs.ACLOCAL         = ACLOCAL
         meson.install(package, configs, {envs = envs})
         meson.install(package, configs, {envs = envs})
-
-        -- install wayland-protocols
-        local protocol = assert(package:resourcedir("protocols"), "wayland-protocols not found!")
-        local buildfile = find_file("meson.build", path.join(protocol, "*"))
-        if buildfile then
-            os.cd(path.directory(buildfile))
-            meson.install(package, {"-Dtests=false"}, {envs = envs})
-        else
-            import("package.tools.autoconf")
-            
-            local configfile = assert(find_file("configure.ac", path.join(protocol, "**")))
-            os.cd(path.directory(configfile))
-
-            envs = autoconf.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))
-            envs.ACLOCAL_PATH    = path.joinenv(table.join(ACLOCAL_PATH, envs.ACLOCAL_PATH))
-            envs.ACLOCAL         = ACLOCAL
-            autoconf.install(package, {}, {envs = envs})
-        end
     end)
     end)
 
 
     on_test(function (package)
     on_test(function (package)