Package Details: zig-git 0.14.0.git+fd7aafdbd5-1

Git Clone URL: https://aur.archlinux.org/zig-git.git (read-only, click to copy)
Package Base: zig-git
Description: General-purpose programming language and toolchain
Upstream URL: https://ziglang.org/
Keywords: compiler language programming zig ziglang
Licenses: MIT
Conflicts: zig
Provides: zig
Replaces: zig
Submitter: PedroHLC
Maintainer: wgottwalt
Last Packager: wgottwalt
Votes: 13
Popularity: 0.77
First Submitted: 2016-08-09 17:43 (UTC)
Last Updated: 2025-04-22 08:53 (UTC)

Required by (96)

Sources (2)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 Next › Last »

jonathon commented on 2019-07-24 13:05 (UTC)

Andrew pushed a temporary fix upstream: https://github.com/ziglang/zig/commit/77c2ac3fcd27b114b0068d3b64b3d884aa71e4ef

Here's a diff to use it:

diff --git a/.SRCINFO b/.SRCINFO
index df25e51..ba5c46a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
 pkgbase = zig-git
    pkgdesc = a programming language prioritizing robustness, optimality, and clarity
-   pkgver = 0.4.0.r184.g40fe6afd
+   pkgver = 0.4.0.r933.g59850c1ce
    pkgrel = 1
    url = http://ziglang.org
    arch = i686
@@ -13,9 +13,7 @@ pkgbase = zig-git
    provides = zig
    conflicts = zig
    source = git://github.com/zig-lang/zig.git
-   source = force_dynamic_llvm.patch
    md5sums = SKIP
-   md5sums = 9a935ede50ab8f1a789349fc3b760c1c

 pkgname = zig-git

diff --git a/PKGBUILD b/PKGBUILD
index 98930fe..f396d22 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Marc Tiehuis <marctiehuis at gmail.com>

 pkgname=zig-git
-pkgver=0.4.0.r184.g40fe6afd
+pkgver=0.4.0.r933.g59850c1ce
 pkgrel=1
 pkgdesc="a programming language prioritizing robustness, optimality, and clarity"
 arch=('i686' 'x86_64')
@@ -11,13 +11,8 @@ depends=('clang' 'llvm')
 makedepends=('cmake' 'git')
 provides=(zig)
 conflicts=(zig)
-source=("git://github.com/zig-lang/zig.git" 'force_dynamic_llvm.patch')
-md5sums=('SKIP' '9a935ede50ab8f1a789349fc3b760c1c')
-
-prepare() {
-    cd "$srcdir/$provides"
-    patch -Np1 -i "$srcdir/force_dynamic_llvm.patch"
-}
+source=("git://github.com/zig-lang/zig.git")
+md5sums=('SKIP')

 pkgver() {
     cd "$srcdir/$provides"
@@ -29,7 +24,7 @@ build() {
     mkdir -p build
     cd build
     cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
-    make
+    make DESTDIR=.
 }

 check() {
diff --git a/force_dynamic_llvm.patch b/force_dynamic_llvm.patch
deleted file mode 100644
index c92f302..0000000
--- a/force_dynamic_llvm.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/cmake/Findllvm.cmake b/cmake/Findllvm.cmake
-index 021c3c6f..82b435af 100644
---- a/cmake/Findllvm.cmake
-+++ b/cmake/Findllvm.cmake
-@@ -15,7 +15,7 @@ find_program(LLVM_CONFIG_EXE
-         "c:/msys64/mingw64/bin"
-         "C:/Libraries/llvm-6.0.0/bin")
- 
--if(NOT(CMAKE_BUILD_TYPE STREQUAL "Debug") OR ZIG_STATIC)
-+if(false)
-   execute_process(
-       COMMAND ${LLVM_CONFIG_EXE} --libfiles --link-static
-       OUTPUT_VARIABLE LLVM_LIBRARIES_SPACES

tiehuis commented on 2019-07-23 00:21 (UTC)

Thanks for filing that issue. I'll check today if the currently changed behavior is sufficient to package and update on progress.

jonathon commented on 2019-07-21 20:59 (UTC)

I've reported a build failure here: https://github.com/ziglang/zig/issues/2928

I don't know if this is related to the new ZIG_STATIC configuration (https://github.com/ziglang/zig/pull/2858) or if it's just coincidence.

tiehuis commented on 2019-04-20 08:29 (UTC)

Updated the patch. I've used git describe in the pkgver() as per your patch. Thanks for that. This patch will be removed fairly soon when I update upstream to fix the root issue.

jonathon commented on 2019-04-17 11:52 (UTC) (edited on 2019-04-18 17:30 (UTC) by jonathon)

Patch no_stage2_artifacts.patch fails to apply after around bc2d60c1.

Here's a diff to update both patch files:

diff --git a/PKGBUILD b/PKGBUILD
index 2a16f18..82f8dfd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Marc Tiehuis <marctiehuis at gmail.com>

 pkgname=zig-git
-pkgver=0.3.0r3806.3f13a59c
+pkgver=0.4.0.r77.gbc2d60c1
 pkgrel=1
 pkgdesc="a programming language prioritizing robustness, optimality, and clarity"
 arch=('i686' 'x86_64')
@@ -12,7 +12,9 @@ makedepends=('cmake' 'git')
 provides=(zig)
 conflicts=(zig)
 source=("git://github.com/zig-lang/zig.git" 'force_dynamic_llvm.patch' 'no_stage2_artifacts.patch')
-md5sums=('SKIP' '9a935ede50ab8f1a789349fc3b760c1c' 'cb0bbf9c19971a48eff41e8c764ac990')
+md5sums=('SKIP'
+         '742f8c08b999afb7895675ca63649aec'
+         '5e28035a8ce415a9d1589558a8d636cb')

 prepare() {
     cd "$srcdir/$provides"
@@ -22,7 +24,7 @@ prepare() {

 pkgver() {
     cd "$srcdir/$provides"
-    printf "0.3.0r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+    git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
 }

 build() {
diff --git a/force_dynamic_llvm.patch b/force_dynamic_llvm.patch
index c92f302..bcf1242 100644
--- a/force_dynamic_llvm.patch
+++ b/force_dynamic_llvm.patch
@@ -2,10 +2,10 @@ diff --git a/cmake/Findllvm.cmake b/cmake/Findllvm.cmake
 index 021c3c6f..82b435af 100644
 --- a/cmake/Findllvm.cmake
 +++ b/cmake/Findllvm.cmake
-@@ -15,7 +15,7 @@ find_program(LLVM_CONFIG_EXE
-         "c:/msys64/mingw64/bin"
-         "C:/Libraries/llvm-6.0.0/bin")
- 
+@@ -65,7 +65,7 @@ find_program(LLVM_CONFIG_EXE
+ NEED_TARGET("X86")
+ NEED_TARGET("XCore")
+
 -if(NOT(CMAKE_BUILD_TYPE STREQUAL "Debug") OR ZIG_STATIC)
 +if(false)
    execute_process(
diff --git a/no_stage2_artifacts.patch b/no_stage2_artifacts.patch
index a89edcc..fef4b3f 100644
--- a/no_stage2_artifacts.patch
+++ b/no_stage2_artifacts.patch
@@ -2,7 +2,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
 index bda57634..52599838 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -254,7 +254,6 @@ else()
+@@ -257,7 +257,6 @@ else()
          embedded_lld_wasm
          embedded_lld_lib
      )
@@ -10,11 +10,11 @@ index bda57634..52599838 100644
  endif()

  # No patches have been applied to SoftFloat-3e
-@@ -775,7 +774,6 @@ if(MSVC OR MINGW)
-     target_link_libraries(zig LINK_PUBLIC version)
- endif()
- install(TARGETS zig DESTINATION bin)
+@@ -6640,7 +6640,6 @@ if(MSVC OR MINGW)
+ set_target_properties(zig_cpp PROPERTIES
+     COMPILE_FLAGS ${EXE_CFLAGS}
+ )
 -install(TARGETS zig_cpp DESTINATION "${ZIG_CPP_LIB_DIR}")
- 
- foreach(file ${ZIG_C_HEADER_FILES})
-     get_filename_component(file_dir "${C_HEADERS_DEST}/${file}" DIRECTORY)
+ 
+ add_library(opt_c_util STATIC ${OPTIMIZED_C_SOURCES})
+ set_target_properties(opt_c_util PROPERTIES

(Watch out for missing whitespace if you copy-and-paste, there's a full-text version here: https://bpaste.net/show/0c103164d943)

jonathon commented on 2019-04-09 14:41 (UTC)

The upstream tag of 0.4.0 might be a good opportunity to switch to a fully generated pkgver. ;)

jonathon commented on 2018-10-02 18:07 (UTC) (edited on 2019-04-10 12:11 (UTC) by jonathon)

Something to consider, the wiki has some examples of pkgver() functions which don't require hard-coding a version number, e.g.:

pkgver() {
  cd "${pkgname/-git/}"
  git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

->

0.3.0.r19.g364bc669

tiehuis commented on 2018-09-23 10:10 (UTC) (edited on 2018-09-23 10:11 (UTC) by tiehuis)

This is outdated and will not build until the system LLVM is updated to LLVM-7.0 [1]. For the mean time, if you require a master build, see the auto-built static binaries on the website [2].

[1] https://www.archlinux.org/todo/llvm-7/

[2] https://ziglang.org/builds/zig-linux-x86_64-master.tar.xz

tiehuis commented on 2018-04-30 05:35 (UTC)

Should be fixed now.