Date: Sunday, January 8, 2023 @ 17:39:42 Author: freswa Revision: 1382031
upgpkg: zig 0.10.0-1 Modified: zig/trunk/PKGBUILD Deleted: zig/trunk/io_uring-timeout-remove-test.patch ------------------------------------+ PKGBUILD | 37 ++++++++++++++++------------------- io_uring-timeout-remove-test.patch | 36 ---------------------------------- 2 files changed, 17 insertions(+), 56 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2023-01-08 17:35:09 UTC (rev 1382030) +++ PKGBUILD 2023-01-08 17:39:42 UTC (rev 1382031) @@ -2,33 +2,26 @@ # Contributor: Marc Tiehuis <[email protected]> pkgname=zig -pkgver=0.9.1 -pkgrel=2 +pkgver=0.10.0 +pkgrel=1 pkgdesc='a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software' arch=('x86_64') url='https://ziglang.org/' license=('MIT') -options=('debug') -depends=('clang13' 'llvm13-libs') -makedepends=('cmake' 'llvm13' 'lld13') +options=('debug' '!lto') +depends=('clang' 'llvm-libs') +makedepends=('cmake' 'llvm' 'lld') checkdepends=('lib32-glibc') source=("https://ziglang.org/download/$pkgver/zig-$pkgver.tar.xz" - "$pkgname-io_uring-cancel-test.patch::https://github.com/ziglang/zig/commit/52651ae7a0de.patch" - "io_uring-timeout-remove-test.patch" - "resolve_DNS.patch") -sha256sums=('38cf4e84481f5facc766ba72783e7462e08d6d29a5d47e3b75c8ee3142485210' - '7cabeeb678a9acf8aecc765adc78b328baafe2f1e928518f40d97d0afaae8535' - '9ed66bbef9420c0628c7054e4f192ad6faaaacfffcf28c4b3f08462d62769748' + resolve_DNS.patch) +sha256sums=('d8409f7aafc624770dcd050c8fa7e62578be8e6a10956bca3c86e8531c64c136' 'c2b7e709dcc229f0e58e2529db900bcfb9a1cfb73da765c5c76ab1e6d0a333cc') prepare() { cd "$pkgname-$pkgver" # https://github.com/ziglang/zig/issues/6898 + # https://github.com/ziglang/zig/issues/14244 patch -p1 < ../resolve_DNS.patch - # https://github.com/ziglang/zig/issues/11382 - patch -p1 --no-backup-if-mismatch < ../$pkgname-io_uring-cancel-test.patch - # https://github.com/ziglang/zig/issues/11900 - patch -p1 --no-backup-if-mismatch < ../io_uring-timeout-remove-test.patch } build() { @@ -38,17 +31,21 @@ # override it back to None so makepkg env vars are respected cmake -B build \ -DCMAKE_BUILD_TYPE=None \ + -DZIG_SHARED_LLVM=ON \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_PREFIX_PATH=/usr/lib/llvm13 \ - -DZIG_PREFER_CLANG_CPP_DYLIB=ON \ . cmake --build build } check() { - cd "$pkgname-$pkgver/build" - - ./zig build test + cd "$pkgname-$pkgver" + # ugly workaround until test target is provided + # https://github.com/ziglang/zig/issues/14240 + DESTDIR="./testinstall" cmake --install build + ./testinstall/usr/bin/zig build test -Dconfig_h=build/config.h \ + -Dstatic-llvm=false \ + -Denable-llvm=true \ + -Dskip-non-native=true } package() { Deleted: io_uring-timeout-remove-test.patch =================================================================== --- io_uring-timeout-remove-test.patch 2023-01-08 17:35:09 UTC (rev 1382030) +++ io_uring-timeout-remove-test.patch 2023-01-08 17:39:42 UTC (rev 1382031) @@ -1,36 +0,0 @@ -diff -upr zig-0.9.1.orig/lib/std/os/linux/io_uring.zig zig-0.9.1/lib/std/os/linux/io_uring.zig ---- zig-0.9.1.orig/lib/std/os/linux/io_uring.zig 2022-02-14 22:03:19.000000000 +0200 -+++ zig-0.9.1/lib/std/os/linux/io_uring.zig 2022-06-25 02:02:53.701051414 +0300 -@@ -1994,7 +1994,7 @@ test "timeout_remove" { - - try testing.expectEqual(@as(u32, 2), try ring.submit()); - -- const cqe_timeout = try ring.copy_cqe(); -+ var cqe_timeout = try ring.copy_cqe(); - // IORING_OP_TIMEOUT_REMOVE is not supported by this kernel version: - // Timeout remove operations set the fd to -1, which results in EBADF before EINVAL. - // We use IORING_FEAT_RW_CUR_POS as a safety check here to make sure we are at least pre-5.6. -@@ -2005,13 +2005,22 @@ test "timeout_remove" { - { - return error.SkipZigTest; - } -+ -+ var cqe_timeout_remove = try ring.copy_cqe(); -+ -+ if (cqe_timeout.user_data == 0x99999999 and cqe_timeout_remove.user_data == 0x88888888) { -+ const a = cqe_timeout; -+ const b = cqe_timeout_remove; -+ cqe_timeout = b; -+ cqe_timeout_remove = a; -+ } -+ - try testing.expectEqual(linux.io_uring_cqe{ - .user_data = 0x88888888, - .res = -@as(i32, @enumToInt(linux.E.CANCELED)), - .flags = 0, - }, cqe_timeout); - -- const cqe_timeout_remove = try ring.copy_cqe(); - try testing.expectEqual(linux.io_uring_cqe{ - .user_data = 0x99999999, - .res = 0,
