diff --git a/.github/workflows/Linux.yml b/.github/workflows/Linux.yml index caa7d318..3cf0d6e8 100644 --- a/.github/workflows/Linux.yml +++ b/.github/workflows/Linux.yml @@ -85,12 +85,12 @@ jobs: - name: Install LLVM and Clang uses: awalsh128/cache-apt-pkgs-action@latest with: - packages: clang libc++-dev libc++1 libc++abi-dev libc++abi1 mold llvm-runtime llvm libxkbcommon-x11-dev libxkbcommon-x11 libktx-dev libktx xutils-dev x11proto-dev libxau-dev libxdmcp-dev libxcb1-dev libxcb-damage0-dev libxcb-render0-dev libxcb-randr0-dev libxcb-xrm-dev libxcb-xinput-dev libxcb-dpms0-dev libxcb-xvmc0-dev libxcb-xv0-dev libxcb-xtest0-dev libxcb-xfreedri0-dev libxcb-dri3-dev libxcb-glx0-dev libxcb-shape0-dev libxcb-present-dev libxcb-xkb-dev libxcb-xfixes0-dev libxcb-xevie0-dev libxcb-shm0-dev libxcb-dri2-0-dev libxcb-sync0-dev libxcb-composite0-dev libxcb-xinerama0-dev libxcb-screensaver-dev libxcb-record0-dev libxau-dev build-essential cmake libzstd-dev ninja-build doxygen graphviz opencl-c-headers mesa-opencl-icd + packages: clang libc++-dev libc++1 libc++abi-dev libc++abi1 mold llvm-runtime llvm libxkbcommon-x11-dev libxkbcommon-x11 libktx-dev libktx xutils-dev x11proto-dev libxau6 libxdmcp-dev libxcb1-dev libxcb-damage0-dev libxcb-render0-dev libxcb-randr0-dev libxcb-xrm-dev libxcb-xinput-dev libxcb-dpms0-dev libxcb-xvmc0-dev libxcb-xv0-dev libxcb-xtest0-dev libxcb-xfreedri0-dev libxcb-dri3-dev libxcb-glx0-dev libxcb-shape0-dev libxcb-present-dev libxcb-xkb-dev libxcb-xfixes0-dev libxcb-xevie0-dev libxcb-shm0-dev libxcb-dri2-0-dev libxcb-sync0-dev libxcb-composite0-dev libxcb-xinerama0-dev libxcb-screensaver-dev libxcb-record0-dev libxau-dev build-essential cmake libzstd-dev ninja-build doxygen graphviz opencl-c-headers mesa-opencl-icd - name: Configure & Build id: build run: | - xmake f -v -a ${{ (matrix.arch == 'x64') && 'x86_64' || (matrix.arch == 'arm64') && 'aarch64' || matrix.arch }} --yes -m ${{ (matrix.mode == 'release' || matrix.mode == 'debug') && matrix.mode || 'releasedbg' }} -k ${{ matrix.kind }} --sanitizers=${{ matrix.mode == 'debug' && 'y' || 'n' }} --examples=y --tests=y --toolchain=llvm --mold=y --runtimes="c++_shared" + xmake f -vD -a ${{ (matrix.arch == 'x64') && 'x86_64' || (matrix.arch == 'arm64') && 'aarch64' || matrix.arch }} --yes -m ${{ (matrix.mode == 'release' || matrix.mode == 'debug') && matrix.mode || 'releasedbg' }} -k ${{ matrix.kind }} --sanitizers=${{ matrix.mode == 'debug' && 'y' || 'n' }} --examples=y --tests=y --toolchain=llvm --mold=y --runtimes="c++_shared" xmake b -v - name: Tests diff --git a/xmake/ktx.lua b/xmake/ktx.lua index 4a04b84a..d0afd22a 100644 --- a/xmake/ktx.lua +++ b/xmake/ktx.lua @@ -23,7 +23,7 @@ package("libktx", function() table.insert(configs, "-DKTX_FEATURE_GL_UPLOAD=" .. (package:config("opengl") and "ON" or "OFF")) table.insert(configs, "-DKTX_FEATURE_TESTS=OFF") table.insert(configs, "-DKTX_FEATURE_TOOLS=OFF") - io.replace(" $<${is_gnu_fe}:-ffp-contract=off>", "", "CMakeLists.txt") + io.replace("CMakeLists.txt", "$<${is_gnu_fe}:-ffp-contract=off>", "") import("package.tools.cmake").install(package, configs) end) diff --git a/xmake/libxau.lua b/xmake/libxau.lua new file mode 100644 index 00000000..ef5bc1ad --- /dev/null +++ b/xmake/libxau.lua @@ -0,0 +1,33 @@ +package("libxau") + + set_homepage("https://www.x.org/") + set_description("X.Org: A Sample Authorization Protocol for X") + + set_urls("https://www.x.org/archive/individual/lib/libXau-$(version).tar.gz") + add_versions("1.0.10", "51a54da42475d4572a0b59979ec107c27dacf6c687c2b7b04e5cf989a7c7e60c") + add_versions("1.0.11", "3a321aaceb803577a4776a5efe78836eb095a9e44bbc7a465d29463e1a14f189") + + if is_plat("linux") then + add_extsources("apt::libxau-dev", "pacman::libxau", "pkgconfig::xau") + end + + if is_plat("macosx", "linux", "bsd") then + add_deps("pkg-config", "util-macros", "xorgproto") + end + + on_install("macosx", "linux", "bsd", function (package) + local configs = {"--sysconfdir=" .. package:installdir("etc"), + "--localstatedir=" .. package:installdir("var"), + "--disable-dependency-tracking", + "--disable-silent-rules"} + table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes")) + table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no")) + if package:config("pic") then + table.insert(configs, "--with-pic") + end + import("package.tools.autoconf").install(package, configs) + end) + + on_test(function (package) + assert(package:has_ctypes("Xauth", {includes = "X11/Xauth.h"})) + end)