Skip to content

Commit ff6fd49

Browse files
authored
zig-master: Bump version and import pre-config from zig-0.14.0
1 parent e8260f5 commit ff6fd49

File tree

4 files changed

+20
-17
lines changed

4 files changed

+20
-17
lines changed

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Packages here are named differently and installed in different directories. e.g.
2424

2525
In case you reached here check the following:
2626

27-
- Run `pkgin se zig` to see if the Zig version you want (e.g. 0.14.0) is available in NetBSD official repos. If it is available then probably it is not necessary to use this repo at all.
27+
- Run `pkgin se zig` to see if the Zig version you want (e.g. 0.15.0) is available in NetBSD official repos. If it is available then probably it is not necessary to use this repo at all.
2828
- If you want to skip building, you might [find releases](https://github.com/hellium6/zig-master-netbsd/releases) with binary packages which you can install in this order - llvm, lld, clang, zig-master - with something like: `doas pkg_add /path/to/some-package.tgz`
2929
- If you want to build from source, follow the instructions below.
3030
- Building from source might require some hours or days (depending on your hardware) to finish as some packages have big codebases. Megabytes of sources producing gigabytes of outputs.
@@ -59,7 +59,7 @@ ZIGF=$(curl -s https://ziglang.org/download/ | grep '\-dev' | head -n1 | sed -ne
5959
## put the fetched value in previous command as DISTNAME
6060
sed -i -e "s/^DISTNAME=.*/DISTNAME= $ZIGF/" Makefile
6161
## or enter manually
62-
#sed -i -e 's/^DISTNAME=.*/DISTNAME= zig-0.14.0-dev.3456+00a8742bb/' Makefile
62+
#sed -i -e 's/^DISTNAME=.*/DISTNAME= zig-0.15.0-dev.56+d0911786c/' Makefile
6363
## optionally change MASTER_SITES to use a mirror
6464
sed -i -e 's/^MASTER_SITES=.*/MASTER_SITES= https:\/\/zig.linus.dev\/zig\//' Makefile
6565
make makesum # update checksums according to new DISTNAME
@@ -103,9 +103,9 @@ Target: x86_64-unknown-netbsd10.0
103103
Thread model: posix
104104
InstalledDir: /usr/pkg/llvm19/bin
105105
$ zig-master version
106-
0.14.0
106+
0.15.0-dev.77+aa8aa6625
107107
$ pkg_info -a | grep ^zig
108-
zig-master-0.14.0-dev.3462+edabcf619 Programming language designed for robustness and clarity
108+
zig-master-0.15.0-dev.77+aa8aa6625 Programming language designed for robustness and clarity
109109
```
110110

111111
Example of working with both Zig and Zig master on the same system:
@@ -117,7 +117,7 @@ $ doas pkgin in zig
117117
$ zig version
118118
0.13.0
119119
$ zig-master version
120-
0.14.0
120+
0.15.0-dev.77+aa8aa6625
121121
### For lang/zig-0.14.0 you'd have to run zig-0.14.0 or
122122
### if you've changed DISTNAME, type "zig" and press tab twice for hint.
123123
### Example:
@@ -128,7 +128,7 @@ $ zig-master version
128128
$ alias zig=zig-master
129129
### above can be added in ~/.bashrc to do this automatically on startup
130130
$ zig version
131-
0.14.0
131+
0.15.0-dev.77+aa8aa6625
132132
$ cd `mktemp -d`
133133
$ zig init
134134
info: created build.zig
@@ -147,10 +147,10 @@ Example of uninstalling a package:
147147

148148
```sh
149149
$ pkg_info -a | grep ^zig
150-
zig-master-0.14.0-dev.3462+edabcf619 Programming language designed for robustness and clarity
150+
zig-master-0.15.0-dev.77+aa8aa6625 Programming language designed for robustness and clarity
151151
### For lang/zig-0.14.0 the output might be something like:
152152
### zig-isolated0140-0.14.0 Programming language designed for robustness and clarity (prefix isolated)
153-
$ doas pkg_delete zig-master-0.14.0-dev.3462+edabcf619
153+
$ doas pkg_delete zig-master-0.15.0-dev.77+aa8aa6625
154154
```
155155

156156
License: Anything added by me in this repo (not what is based on another project) is public domain or CC0 1.0 Universal. For things taken from other projects, refer to those projects, such as [pkgsrc](https://github.com/NetBSD/pkgsrc).

pkgsrc/lang/zig-master/Makefile

+8-6
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
## Update DISTNAME according to the latest master download URL and run
44
## "make makesum" after that.
55
## Example: If the URL is:
6-
## https://ziglang.org/builds/zig-0.14.0-dev.3462+edabcf619.tar.xz
7-
## then this value would be: zig-0.14.0-dev.3462+edabcf619
6+
## https://ziglang.org/builds/zig-0.15.0-dev.77+aa8aa6625.tar.xz
7+
## then this value would be: zig-0.15.0-dev.77+aa8aa6625
88
## Meaning, filename minus the .tar.xz extension
9-
DISTNAME= zig-0.14.0-dev.3462+edabcf619
9+
DISTNAME= zig-0.15.0-dev.77+aa8aa6625
1010
## To make this a separate package than lang/zig
1111
PKGNAME= ${DISTNAME:S/zig-/zig-master-/}
1212
CATEGORIES= lang
@@ -67,21 +67,23 @@ MKPIE_SUPPORTED= no
6767
# TODO: /usr/bin/env + /bin/env in lib/std/zig/system.zig
6868

6969
pre-configure:
70-
## Make zig build see LD_LIBRARY_PATH (e.g. path to
70+
## - Make zig build see LD_LIBRARY_PATH (e.g. path to
7171
## "libclang-cpp.so.xx.y")
72+
## - Set version string (esp. for dev builds)
73+
## - Make stage3 zig build process (build.zig) see the path
7274
${SED} -i'_orig' \
7375
-e '1{h;s,.*,set(ENV{LD_LIBRARY_PATH} "'${LLVM_ISOLATED_PREFIX}'/lib:/usr/pkg/lib:/usr/lib:$$\ENV{LD_LIBRARY_PATH}")\n,;G;}' \
7476
-e '1{h;s,.*,set(ENV{LIBRARY_PATH} "'${LLVM_ISOLATED_PREFIX}'/lib:/usr/pkg/lib:/usr/lib:$$\ENV{LIBRARY_PATH}")\n,;G;}' \
7577
-e '1{h;s,.*,set(ENV{LDFLAGS} "-Wl\,-R'${LLVM_ISOLATED_PREFIX}'/lib -L'${LLVM_ISOLATED_PREFIX}'/lib $$\ENV{LDFLAGS}")\n,;G;}' \
78+
-e '/set(ZIG_VERSION/ s,set(ZIG_VERSION "",set(ZIG_VERSION "${DISTNAME:S/zig-//}",' \
79+
-e '/$${CMAKE_PREFIX_PATH}/ s,^,list(APPEND ZIG_CMAKE_PREFIX_PATH "${LLVM_ISOLATED_PREFIX}")\n,' \
7680
${WRKDIR}/${DISTNAME}/CMakeLists.txt
7781
## Fix paths when lang/clang is already installed on system
7882
${SED} -i'_orig' \
7983
-e '1{h;s,.*,set(LLVM_INCLUDE_DIRS "'${LLVM_ISOLATED_PREFIX}'/include:$$\{LLVM_INCLUDE_DIRS}")\n,;G;}' \
8084
-e '1{h;s,.*,set(LLVM_LIBDIRS "'${LLVM_ISOLATED_PREFIX}'/lib:$$\{LLVM_LIBDIRS}")\n,;G;}' \
8185
-e '1{h;s,.*,set(CMAKE_PREFIX_PATH "'${LLVM_ISOLATED_PREFIX}'")\n,;G;}' \
8286
${WRKDIR}/${DISTNAME}/cmake/Findclang.cmake
83-
## Make stage3 zig build process (build.zig) see the path
84-
${SED} -i'_orig' -e '/$${CMAKE_PREFIX_PATH}/ s,^,list(APPEND ZIG_CMAKE_PREFIX_PATH "${LLVM_ISOLATED_PREFIX}")\n,' ${WRKDIR}/${DISTNAME}/CMakeLists.txt
8587

8688
post-configure:
8789
## Workaround for making CMake see the isolated prefix

pkgsrc/lang/zig-master/PLIST

+1
Original file line numberDiff line numberDiff line change
@@ -13925,6 +13925,7 @@ zig-master/lib/zig/std/c/freebsd.zig
1392513925
zig-master/lib/zig/std/c/haiku.zig
1392613926
zig-master/lib/zig/std/c/netbsd.zig
1392713927
zig-master/lib/zig/std/c/openbsd.zig
13928+
zig-master/lib/zig/std/c/serenity.zig
1392813929
zig-master/lib/zig/std/c/solaris.zig
1392913930
zig-master/lib/zig/std/coff.zig
1393013931
zig-master/lib/zig/std/compress.zig

pkgsrc/lang/zig-master/distinfo

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
$NetBSD$
22

3-
BLAKE2s (zig-0.14.0-dev.3462+edabcf619.tar.xz) = 8696b273e7947fe2f5e0130cd41c5916d63f23e68269a456936af353996157e4
4-
SHA512 (zig-0.14.0-dev.3462+edabcf619.tar.xz) = ee8e27307c38742b358ddebfd3990d4e3c595e7d3166497748388d89021123543b8147e92277feb18e993cbdece714f30886ea9765c7b4adc5211b7c03ee49a2
5-
Size (zig-0.14.0-dev.3462+edabcf619.tar.xz) = 17770376 bytes
3+
BLAKE2s (zig-0.15.0-dev.77+aa8aa6625.tar.xz) = 74f4b3b58c1ed16f47351c15f8667914e40ce21131ece577f9fd1a88ebdd6d39
4+
SHA512 (zig-0.15.0-dev.77+aa8aa6625.tar.xz) = db1ee716b5d14230da5871df09c0ac4ee80db8d540c7bd817d79bb353739455d8ecb2ad56615d8c682c1dfc9b90c7e0aca943fab63b931b12d7a1331a14f94f0
5+
Size (zig-0.15.0-dev.77+aa8aa6625.tar.xz) = 17783340 bytes

0 commit comments

Comments
 (0)