head 1.7; access; symbols pkgsrc-2026Q1:1.7.0.6 pkgsrc-2026Q1-base:1.7 pkgsrc-2025Q4:1.7.0.4 pkgsrc-2025Q4-base:1.7 pkgsrc-2025Q3:1.7.0.2 pkgsrc-2025Q3-base:1.7 pkgsrc-2025Q2:1.5.0.2 pkgsrc-2025Q2-base:1.5 pkgsrc-2020Q1:1.3.0.2 pkgsrc-2020Q1-base:1.3; locks; strict; comment @# @; 1.7 date 2025.08.05.13.33.19; author wiz; state Exp; branches; next 1.6; commitid KYXGJCiLuqE9Px5G; 1.6 date 2025.08.05.13.27.17; author ryoon; state Exp; branches; next 1.5; commitid NuyIg3Hh7c96Nx5G; 1.5 date 2025.06.09.18.07.33; author adam; state Exp; branches; next 1.4; commitid TFQlc5dtMqHRafYF; 1.4 date 2020.04.18.08.08.07; author adam; state dead; branches; next 1.3; commitid 9DQvWpsXcrpLdQ4C; 1.3 date 2020.03.25.22.27.20; author nia; state Exp; branches; next 1.2; commitid Uuaz9IKjBYLGJP1C; 1.2 date 2019.02.27.10.46.16; author maya; state dead; branches; next 1.1; commitid pNrruCXVZUXzsodB; 1.1 date 2019.02.17.12.33.40; author maya; state Exp; branches; next ; commitid 5Q2cRCzWHbjLn7cB; desc @@ 1.7 log @zig: fix typo in comment @ text @$NetBSD: patch-CMakeLists.txt,v 1.6 2025/08/05 13:27:17 ryoon Exp $ Do not append a buildlinked directory to ZIG_CMAKE_PREFIX_PATH to avoid WRKREF in bin/zig. Skip stage3 during build to: * speed up building * avoid work directory reference in zig's RUNPATH. --- CMakeLists.txt.orig 2025-05-23 04:31:41.000000000 +0000 +++ CMakeLists.txt @@@@ -18,13 +18,7 @@@@ endif() # cache variable. Furthermore, the environment variable follows the system path # separator, such as ':' on POSIX and ';' on Windows, but the cache variable # follows CMake's array behavior, i.e. always ';' for a separator. -list(APPEND ZIG_CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH}") -if(WIN32) - list(APPEND ZIG_CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH}) -else() - string(REGEX REPLACE ":" ";" ZIG_CMAKE_PREFIX_PATH_STRING "$ENV{CMAKE_PREFIX_PATH}") - list(APPEND ZIG_CMAKE_PREFIX_PATH "${ZIG_CMAKE_PREFIX_PATH_STRING}") -endif() +set(ZIG_CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH}") list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") @@@@ -978,18 +972,9 @@@@ if(MINGW AND "${ZIG_HOST_TARGET_ARCH}" S endif() -add_custom_target(stage3 ALL - DEPENDS "${PROJECT_BINARY_DIR}/stage3/bin/zig" -) set(ZIG2_WORKING_DIR "${PROJECT_SOURCE_DIR}") -add_custom_command( - OUTPUT "${PROJECT_BINARY_DIR}/stage3/bin/zig" - COMMAND zig2 build --prefix "${PROJECT_BINARY_DIR}/stage3" ${ZIG_BUILD_ARGS} - COMMENT "Building stage3" - WORKING_DIRECTORY "${ZIG2_WORKING_DIR}" -) set(ZIG_EXECUTABLE "$") @ 1.6 log @lang/zig: Remove WRKREF from bin/zig * RUNPATH under NetBSD/amd64 10.99.15 is PREFIX:PREFIX and it is still strange. * Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD: patch-CMakeLists.txt,v 1.5 2025/06/09 18:07:33 adam Exp $ d7 1 a7 1 * speed up buidling @ 1.5 log @zig: add missing patch @ text @d1 4 a4 1 $NetBSD$ d7 1 a7 1 * spedd up buidling d10 1 a10 1 --- CMakeLists.txt.orig 2025-03-04 22:35:21.000000000 +0000 d12 16 a27 1 @@@@ -971,18 +971,9 @@@@ if(MINGW AND "${ZIG_HOST_TARGET_ARCH}" S @ 1.4 log @zig: updated to 0.6.0 Language Changes in 0.6.0: Improved names of error sets when using merge error sets operator (||). pub syntax for container fields is removed. Type coercion from *[0]T to E![]const T is now allowed. This is an unambiguous, safe cast. asm now accepts comptime-known values, rather than requiring string literal syntax. Removed compile error for peer result ?comptime_int and null. Ability to pass comptime types and non comptime types to same parameter. @@typeOf is renamed to @@TypeOf. zig fmt automatically performs the conversion, and the next release of Zig after this one will remove the automatic conversion. Ability to switch on pointer types. Multiline strings in test and library names are disallowed. Zig language no longer requires the expression a else unreachable with comptime a to produce a comptime result. Timon Kruiper implemented casting between [*c]T and ?[*:0]T on fn parameter. Timon Kruiper improved @@typeInfo to lazily resolve declarations. This way all the declarations in a namespace won't be resolved until the user actually uses the declarations slice in the builtin TypeInfo union. @@ptrCast supports casting a slice to a pointer. LemonBoy implemented peer type resolution between ?[]T and *[N]T. There is now peer type resolution between mixed-const []T and *[N]T. @ text @d1 1 a1 1 $NetBSD: patch-CMakeLists.txt,v 1.3 2020/03/25 22:27:20 nia Exp $ d3 3 a5 1 Use DESTDIR... d7 1 a7 1 --- CMakeLists.txt.orig 2020-03-25 21:48:11.605064006 +0000 d9 19 a27 9 @@@@ -612,7 +612,7 @@@@ add_custom_target(zig_build_libuserland "-Doutput-dir=${CMAKE_BINARY_DIR}" "-Drelease=${LIBUSERLAND_RELEASE_MODE}" "-Dlib-files-only" - --prefix "${CMAKE_INSTALL_PREFIX}" + --prefix "${DESTDIR}${CMAKE_INSTALL_PREFIX}" DEPENDS zig0 BYPRODUCTS "${LIBUSERLAND}" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" @ 1.3 log @zig: Update to 0.5.0. Unbreak. This version of zig supports the current version of llvm in pkgsrc (9). Some patches from TheLemonMan were backported by me to fix NetBSD support. Release notes: https://ziglang.org/download/0.5.0/release-notes.html @ text @d1 1 a1 1 $NetBSD$ @ 1.2 log @zig: update to today's (2019-02-27) snapshot of master. Allows us to drop all the local patches that were merged upstream. lld is not a dependency, zig by default bundles lld and doesn't use an external one. comment it. Andrew Kelley (62): Merge pull request #1975 from BenoitJGirard/master Merge pull request #1963 from matthew-mcallister/dedup-compile-log-warning Merge pull request #1972 from coypoop/netbsd README: add NetBSD to support table pull request fixups Merge branch 'emekoi-fix-1711' export _mh_execute_header with weak linkage docs: note top level declarations are order-independent docs: shadowing zig fmt: fix infix operator before multiline string literal add test for 74bdc1d1f898705 Merge branch 'kristate-zig-backport-issue1944' remove --no-rosegment workaround now that valgrind bug is fixed valgrind client requests for undefined values Merge branch 'slice-deref-failure' of https://github.com/matthew-mcallister/zig into matthew-mcallister-slice-deref-failure pull request fixups Merge branch 'matthew-mcallister-slice-deref-failure' deduplicate compile errors for undeclared identifiers packed structs support comptime bitcasting extern structs support comptime bitcasting `@@sliceToBytes` works at comptime better handling of arrays in packed structs better field access of types which have one possible value fix `@@bitCast` when src/dest types have mismatched handle_is_ptr docs for packed structs add regression test for bitcast to array implement vector negation better libc detection (#1996) introduce std.debug.captureStackTrace fix `zig fmt` arg0 handled incorrectly add `zig cc` command to act like a C compiler zig cc: remove "polly" which was an undefined symbol on macos zig cc: work around clang calling GetCommandLine on Windows Merge pull request #2003 from ziglang/zig-cc first class support for compiling C code building DLLs on Windows works better `@@cImport` works with `--cache on` Merge pull request #2005 from ziglang/c-source zig build: 2 improvements fix infinite recursion in type_has_one_possible_value delete incorrect TODO comment add docs for zero bit types and pointers to zero bit types fix not finding libgcc_s when looking for native libc add a compile error note when C import fails and not linking libc better error message when forgetting to link against libc add a regression test for #704 fix incorrectly trying to memset at comptime fix the libc compile error tests to only run on linux use -nobuiltininc when compiling c code use -nostdinc++ when compiling C code use -nostdinc and sometimes -nolibc when compiling C code breaking changes to the way targets work in zig fix regressions on Windows introduce sys_include_dir for when sys/* files are not with stdlib.h add builder.addFmt API and use it to test stage1 zig fmt fix .gitignore file and add commit missing std lib file add test coverage for binary OR on error sets add test coverage for type used as switch case fix handling when there are multiple externs and fix stage1 zig fmt on macos improve docs for unions and switching on tagged unions windows returns EINVAL for fopen when there is an asterisk in the name Benoit Jauvin-Girard (1): Fix std.math.powi so powi(x, +-0) = 1 for any x. BenoitJGirard (2): Merge pull request #1 from ziglang/master Merge pull request #2 from ziglang/master Jimmi HC (1): Fixed std.testing.expectEqual John Schmidt (2): Some function doc tweaks (#1961) Add priority queue LemonBoy (4): Silence gcc8 class-memaccess warnings Add align attribute for params pointers Translate parameterless C functions (#1978) Prevent crash in tagged enums rendering (#1986) Matthew McAllister (3): Fix lvalue dereference type checking Deduplicate compile log statement warnings Check for duped error messages in compile tests Maya Rashish (3): Add NetBSD support Undo local, unneeded patch Don't provide a bogus definition of EVFILT_USER Quetzal Bradley (1): fix openWriteNoClobber and add test emekoi (1): make @@enumToInt work on union(enum) kristopher tate (1): src/analyze.cpp: default to using `param_node` upon callconv error; @ text @d1 1 a1 1 $NetBSD: patch-CMakeLists.txt,v 1.1 2019/02/17 12:33:40 maya Exp $ d3 3 a5 1 --- CMakeLists.txt.orig 2019-02-17 10:28:53.000000000 +0000 d7 9 a15 17 @@@@ -448,6 +448,7 @@@@ set(ZIG_STD_FILES "c/freebsd.zig" "c/index.zig" "c/linux.zig" + "c/netbsd.zig" "c/windows.zig" "coff.zig" "crypto/blake2.zig" @@@@ -588,6 +589,8 @@@@ set(ZIG_STD_FILES "os/linux/index.zig" "os/linux/vdso.zig" "os/linux/x86_64.zig" + "os/netbsd/errno.zig" + "os/netbsd/index.zig" "os/path.zig" "os/time.zig" "os/uefi.zig" @ 1.1 log @Add zig 0.3.0.20190217 Zig is an open-source programming language designed for robustness, optimality, and clarity. * Robust - behavior is correct even for edge cases such as out of memory. * Optimal - write programs the best way they can behave and perform. * Clear - precisely communicate your intent to the compiler and other programmers. The language imposes a low overhead to reading code. @ text @d1 1 a1 1 $NetBSD$ @