[gentoo-commits] repo/gentoo:master commit in: dev-lang/zig/files/, dev-lang/zig-bin/files/
commit: 08419414eebb1bb26e9e72cffb66ce81a0e64751 Author: Eric Joldasov getgoogleoff me> AuthorDate: Fri Nov 17 14:24:26 2023 + Commit: Sam James gentoo org> CommitDate: Wed Nov 22 11:36:22 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08419414 dev-lang/zig{,-bin}: fix getconf patch for instances with whitespaces in between outputs Fixes: 42ac667416fe133255c3baca620e9af61315cb3b Fixes: 69c2497bbaf42a517fe3449f749609b4449b7952 Signed-off-by: Eric Joldasov getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/33871 Signed-off-by: Sam James gentoo.org> .../files/zig-0.11.0-first-try-getconf.patch | 38 -- .../zig/files/zig-0.11.0-first-try-getconf.patch | 38 -- 2 files changed, 42 insertions(+), 34 deletions(-) diff --git a/dev-lang/zig-bin/files/zig-0.11.0-first-try-getconf.patch b/dev-lang/zig-bin/files/zig-0.11.0-first-try-getconf.patch index 6d1b3ca7e5b7..5a63e9e74ad9 100644 --- a/dev-lang/zig-bin/files/zig-0.11.0-first-try-getconf.patch +++ b/dev-lang/zig-bin/files/zig-0.11.0-first-try-getconf.patch @@ -17,14 +17,14 @@ Bug: https://bugs.gentoo.org/914731 Bug: https://bugs.gentoo.org/914101 diff --git a/lib/std/zig/system/NativeTargetInfo.zig b/lib/std/zig/system/NativeTargetInfo.zig -index 99a1a8f2e..d1032a716 100644 +index 99a1a8f2e..0250db968 100644 --- a/lib/std/zig/system/NativeTargetInfo.zig +++ b/lib/std/zig/system/NativeTargetInfo.zig @@ -19,6 +19,32 @@ dynamic_linker: DynamicLinker = DynamicLinker{}, - + pub const DynamicLinker = Target.DynamicLinker; - -+// Copy-pasted from `std.zig.CrossTarget.parse` to avoid changing visibility of mentioned function. + ++// Copy-pasted from `std.zig.CrossTarget.parse` to avoid introducing unexpected new public function as part of standard library. +/// Parses a version with an omitted patch component, such as "1.0", +/// which SemanticVersion.parse is not capable of. +fn parseWithOptionalPatchField(ver: []const u8) error{ InvalidVersion, Overflow }!std.SemanticVersion { @@ -38,7 +38,7 @@ index 99a1a8f2e..d1032a716 100644 +}; +} +}.parseVersionComponent; -+var version_components = mem.split(u8, ver, "."); ++var version_components = mem.splitScalar(u8, ver, '.'); +const major = version_components.first(); +const minor = version_components.next() orelse return error.InvalidVersion; +const patch = version_components.next() orelse "0"; @@ -53,10 +53,10 @@ index 99a1a8f2e..d1032a716 100644 pub const DetectError = error{ FileSystem, SystemResources, -@@ -307,6 +333,35 @@ fn detectAbiAndDynamicLinker( +@@ -307,6 +333,39 @@ fn detectAbiAndDynamicLinker( } const ld_info_list = ld_info_list_buffer[0..ld_info_list_len]; - + +if (is_linux and !os_is_non_native and cross_target.glibc_version == null) try_getconf: { +var buf: [4096]u8 = undefined; +var fba = std.heap.FixedBufferAllocator.init(); @@ -68,20 +68,24 @@ index 99a1a8f2e..d1032a716 100644 +.max_output_bytes = 1024, +}) catch break :try_getconf; +if (!std.mem.startsWith(u8, getconf.stdout, "glibc ")) break :try_getconf; -+const version_string = getconf.stdout["glibc ".len..]; ++const version_string = std.mem.trim(u8, getconf.stdout["glibc ".len..], ); +const glibc_version = parseWithOptionalPatchField(version_string) catch break :try_getconf; + +var os_with_glibc = os; +os_with_glibc.version_range.linux.glibc = glibc_version; + ++const target: Target = .{ ++.cpu = cpu, ++.os = os_with_glibc, ++.abi = .gnu, ++.ofmt = cross_target.ofmt orelse Target.ObjectFormat.default(os_with_glibc.tag, cpu.arch), ++}; +const result: NativeTargetInfo = .{ -+.target = .{ -+.cpu = cpu, -+.os = os_with_glibc, -+.abi = cross_target.abi orelse Target.Abi.default(cpu.arch, os_with_glibc), -+.ofmt = cross_target.ofmt orelse Target.ObjectFormat.default(os_with_glibc.tag, cpu.arch), -+}, -+.dynamic_linker = cross_target.dynamic_linker, ++.target = target, ++.dynamic_linker = if (cross_target.dynamic_linker.get() == null) ++target.standardDynamicLinkerPath() ++else ++cross_target.dynamic_linker, +}; +return result; +} @@ -89,7 +93,7 @@ index 99a1a8f2e..d1032a716 100644 // Best case scenario: the executable is dynamically linked, and we can iterate // over our own shared objects and find a dynamic linker. const elf_file = blk: { -@@ -563,7 +618,7 @@ fn glibcVerFromSoFile(file: fs.File) !std.SemanticVersion { +@@ -563,7 +622,7 @@ fn glibcVerFromSoFile(file: fs.File) !std.SemanticVersion { while (it.next()) |s| { if (mem.startsWith(u8, s,
[gentoo-commits] repo/gentoo:master commit in: dev-lang/zig/files/, dev-lang/zig/
commit: 8f377950b088ae4240db530fee28ddb3a23c2013 Author: Violet Purcell inventati org> AuthorDate: Fri Jul 7 19:17:09 2023 + Commit: Sam James gentoo org> CommitDate: Sun Jul 9 02:02:27 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f377950 dev-lang/zig: Backport fix for musl 1.2.4 Signed-off-by: Violet Purcell inventati.org> Signed-off-by: Sam James gentoo.org> .../zig/files/zig-0.10.1-musl-1.2.4-lfs64.patch| 220 + .../{zig-0.10.1-r2.ebuild => zig-0.10.1-r3.ebuild} | 1 + 2 files changed, 221 insertions(+) diff --git a/dev-lang/zig/files/zig-0.10.1-musl-1.2.4-lfs64.patch b/dev-lang/zig/files/zig-0.10.1-musl-1.2.4-lfs64.patch new file mode 100644 index ..05a550a7920e --- /dev/null +++ b/dev-lang/zig/files/zig-0.10.1-musl-1.2.4-lfs64.patch @@ -0,0 +1,220 @@ +From https://github.com/ziglang/zig/commit/b20ccff515364cdb8f3e733cc950e53ab77656db Mon Sep 17 00:00:00 2001 +From: Andrew Kelley +Date: Mon, 19 Jun 2023 15:17:01 -0700 +Subject: [PATCH] std.os: update logic for 64-bit symbol choice + +musl v1.2.4 dropped the "64"-suffixed aliases for legacy "LFS64" ("large +file support") interfaces, so this commit changes the corresponding Zig +logic to call the correct names. +--- a/lib/std/os.zig b/lib/std/os.zig +@@ -890,10 +890,7 @@ pub fn pread(fd: fd_t, buf: []u8, offset: u64) PReadError!usize { + }; + const adjusted_len = @min(max_count, buf.len); + +-const pread_sym = if (builtin.os.tag == .linux and builtin.link_libc) +-system.pread64 +-else +-system.pread; ++const pread_sym = if (lfs64_abi) system.pread64 else system.pread; + + const ioffset = @bitCast(i64, offset); // the OS treats this as unsigned + while (true) { +@@ -966,10 +963,7 @@ pub fn ftruncate(fd: fd_t, length: u64) TruncateError!void { + } + + while (true) { +-const ftruncate_sym = if (builtin.os.tag == .linux and builtin.link_libc) +-system.ftruncate64 +-else +-system.ftruncate; ++const ftruncate_sym = if (lfs64_abi) system.ftruncate64 else system.ftruncate; + + const ilen = @bitCast(i64, length); // the OS treats this as unsigned + switch (errno(ftruncate_sym(fd, ilen))) { +@@ -1034,10 +1028,7 @@ pub fn preadv(fd: fd_t, iov: []const iovec, offset: u64) PReadError!usize { + + const iov_count = math.cast(u31, iov.len) orelse math.maxInt(u31); + +-const preadv_sym = if (builtin.os.tag == .linux and builtin.link_libc) +-system.preadv64 +-else +-system.preadv; ++const preadv_sym = if (lfs64_abi) system.preadv64 else system.preadv; + + const ioffset = @bitCast(i64, offset); // the OS treats this as unsigned + while (true) { +@@ -1311,10 +1302,7 @@ pub fn pwrite(fd: fd_t, bytes: []const u8, offset: u64) PWriteError!usize { + }; + const adjusted_len = @min(max_count, bytes.len); + +-const pwrite_sym = if (builtin.os.tag == .linux and builtin.link_libc) +-system.pwrite64 +-else +-system.pwrite; ++const pwrite_sym = if (lfs64_abi) system.pwrite64 else system.pwrite; + + const ioffset = @bitCast(i64, offset); // the OS treats this as unsigned + while (true) { +@@ -1400,10 +1388,7 @@ pub fn pwritev(fd: fd_t, iov: []const iovec_const, offset: u64) PWriteError!usiz + } + } + +-const pwritev_sym = if (builtin.os.tag == .linux and builtin.link_libc) +-system.pwritev64 +-else +-system.pwritev; ++const pwritev_sym = if (lfs64_abi) system.pwritev64 else system.pwritev; + + const iov_count = if (iov.len > IOV_MAX) IOV_MAX else @intCast(u31, iov.len); + const ioffset = @bitCast(i64, offset); // the OS treats this as unsigned +@@ -1514,10 +1499,7 @@ pub fn openZ(file_path: [*:0]const u8, flags: u32, perm: mode_t) OpenError!fd_t + return open(mem.sliceTo(file_path, 0), flags, perm); + } + +-const open_sym = if (builtin.os.tag == .linux and builtin.link_libc) +-system.open64 +-else +-system.open; ++const open_sym = if (lfs64_abi) system.open64 else system.open; + + while (true) { + const rc = open_sym(file_path, flags, perm); +@@ -1730,10 +1712,7 @@ pub fn openatZ(dir_fd: fd_t, file_path: [*:0]const u8, flags: u32, mode: mode_t) + return openat(dir_fd, mem.sliceTo(file_path, 0), flags, mode); + } + +-const openat_sym = if (builtin.os.tag == .linux and builtin.link_libc) +-system.openat64 +-else +-system.openat; ++const openat_sym = if (lfs64_abi) system.openat64 else system.openat; + + while (true) { + const rc = openat_sym(dir_fd, file_path, flags, mode); +@@ -4117,10 +4096,7 @@ pub fn fstat(fd: fd_t) FStatError!Stat { + @compileError("fstat is not yet implemented on Windows"); + } + +-const fstat_sym = if (builtin.os.tag == .linux and builtin.link_libc) +-
[gentoo-commits] repo/gentoo:master commit in: dev-lang/zig/files/, dev-lang/zig/
commit: 766ffdacc8e269ad975a010bb9124024e7272fd7 Author: Eric Joldasov getgoogleoff me> AuthorDate: Fri Jan 13 11:47:46 2023 + Commit: Sam James gentoo org> CommitDate: Sat Jan 14 19:14:51 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=766ffdac dev-lang/zig: fix patch from previous commit I'm sorry for possible incovenience caused by this (I hope that it was, since it didn't look SO bad). Explained in and rebased upstream PR too. Fixes: 28fcae31f91eb30b62c8d55b39207238d377f0c2 Closes: https://bugs.gentoo.org/890457 Closes: https://bugs.gentoo.org/890459 Signed-off-by: Eric Joldasov getgoogleoff.me> Signed-off-by: Sam James gentoo.org> .../zig-0.10.0-build-dir-install-stage3.patch | 24 +- .../{zig-0.10.0.ebuild => zig-0.10.0-r1.ebuild}| 0 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/dev-lang/zig/files/zig-0.10.0-build-dir-install-stage3.patch b/dev-lang/zig/files/zig-0.10.0-build-dir-install-stage3.patch index c44632f5111e..5704e4ba7921 100644 --- a/dev-lang/zig/files/zig-0.10.0-build-dir-install-stage3.patch +++ b/dev-lang/zig/files/zig-0.10.0-build-dir-install-stage3.patch @@ -1,18 +1,32 @@ From: Eric Joldasov Install 'zig' binary in 'build_dir/stage3' directory so that we can find it and use for testing. +Also split "add_custom_target(stage3 ALL" and command that it invokes, so that it won't retry it during installation, +as target will be considered not out-of-date. (Bug https://bugs.gentoo.org/890457 and https://bugs.gentoo.org/890459). Upstream PR https://github.com/ziglang/zig/pull/14255. + --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -1094,7 +1094,7 @@ set(ZIG_BUILD_ARGS +@@ -1094,10 +1094,14 @@ set(ZIG_BUILD_ARGS ) add_custom_target(stage3 ALL -COMMAND zig2 build compile ${ZIG_BUILD_ARGS} -+COMMAND zig2 build --prefix "${CMAKE_BINARY_DIR}/stage3" ${ZIG_BUILD_ARGS} - DEPENDS zig2 - COMMENT STATUS "Building stage3" - WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" +-DEPENDS zig2 +-COMMENT STATUS "Building stage3" +-WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" ++ DEPENDS "${CMAKE_BINARY_DIR}/stage3/bin/zig" ++) ++ ++add_custom_command( ++ OUTPUT "${CMAKE_BINARY_DIR}/stage3/bin/zig" ++ COMMAND zig2 build --prefix "${CMAKE_BINARY_DIR}/stage3" ${ZIG_BUILD_ARGS} ++ COMMENT STATUS "Building stage3" ++ WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + ) + + install(CODE "set(ZIG_EXECUTABLE \"${ZIG_EXECUTABLE}\")") + --- a/build.zig +++ b/build.zig @@ -148,10 +148,6 @@ pub fn build(b: *Builder) !void { diff --git a/dev-lang/zig/zig-0.10.0.ebuild b/dev-lang/zig/zig-0.10.0-r1.ebuild similarity index 100% rename from dev-lang/zig/zig-0.10.0.ebuild rename to dev-lang/zig/zig-0.10.0-r1.ebuild
[gentoo-commits] repo/gentoo:master commit in: dev-lang/zig/files/, dev-lang/zig/
commit: b15d873b0f867c6b2fe6c763bf859ea79ea41074 Author: Eric Joldasov getgoogleoff me> AuthorDate: Mon Oct 10 03:16:41 2022 + Commit: Michał Górny gentoo org> CommitDate: Tue Oct 18 15:00:45 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b15d873b dev-lang/zig: fix building with Clang 16, fix searching LLD Upstream PR https://github.com/ziglang/zig/pull/13121 Closes: https://bugs.gentoo.org/877231 Signed-off-by: Eric Joldasov getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/27718 Signed-off-by: Michał Górny gentoo.org> dev-lang/zig/files/zig-0.9.1-fix-clang16.patch | 23 ++ .../{zig-0.9.1-r2.ebuild => zig-0.9.1-r3.ebuild} | 2 ++ 2 files changed, 25 insertions(+) diff --git a/dev-lang/zig/files/zig-0.9.1-fix-clang16.patch b/dev-lang/zig/files/zig-0.9.1-fix-clang16.patch new file mode 100644 index ..deb563378d76 --- /dev/null +++ b/dev-lang/zig/files/zig-0.9.1-fix-clang16.patch @@ -0,0 +1,23 @@ +From: Eric Joldasov +Fix building with Clang 16 +Upstream PR https://github.com/ziglang/zig/pull/13121 + +--- a/src/stage1/parse_f128.c b/src/stage1/parse_f128.c +@@ -983,14 +983,14 @@ static int isspace(int c) + return c == ' ' || (unsigned)c-'\t' < 5; + } + +-static inline float128_t makeInf128() { ++static inline float128_t makeInf128(void) { + union ldshape ux; + ux.i2.hi = 0x7fffUL; + ux.i2.lo = 0x0UL; + return ux.f; + } + +-static inline float128_t makeNaN128() { ++static inline float128_t makeNaN128(void) { + uint64_t rand = 0UL; + union ldshape ux; + ux.i2.hi = 0x7fffUL | (rand & 0xUL); diff --git a/dev-lang/zig/zig-0.9.1-r2.ebuild b/dev-lang/zig/zig-0.9.1-r3.ebuild similarity index 94% rename from dev-lang/zig/zig-0.9.1-r2.ebuild rename to dev-lang/zig/zig-0.9.1-r3.ebuild index 4adbe994a8f3..463cead06e2d 100644 --- a/dev-lang/zig/zig-0.9.1-r2.ebuild +++ b/dev-lang/zig/zig-0.9.1-r3.ebuild @@ -23,6 +23,7 @@ IUSE="test +threads" RESTRICT="!test? ( test )" PATCHES=( + "${FILESDIR}/${P}-fix-clang16.patch" "${FILESDIR}/${P}-fix-single-threaded.patch" "${FILESDIR}/${P}-fix-riscv.patch" "${FILESDIR}/${P}-fix-bad-hostname-segfault.patch" @@ -59,6 +60,7 @@ src_configure() { -DZIG_USE_CCACHE=OFF -DZIG_PREFER_CLANG_CPP_DYLIB=ON -DZIG_SINGLE_THREADED="$(usex !threads)" + -DCMAKE_PREFIX_PATH=$(get_llvm_prefix ${LLVM_MAX_SLOT}) ) cmake_src_configure
[gentoo-commits] repo/gentoo:master commit in: dev-lang/zig/files/, dev-lang/zig/
commit: 2647a868c09f98a97fad19e0070a4abab851376c Author: BratishkaErik getgoogleoff me> AuthorDate: Tue Apr 19 13:44:23 2022 + Commit: Joonas Niilola gentoo org> CommitDate: Sat Apr 30 08:13:20 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2647a868 dev-lang/zig: add stage2 support (on -) Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: BratishkaErik getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/25085 Signed-off-by: Joonas Niilola gentoo.org> dev-lang/zig/files/zig--stage2-fix.patch | 12 dev-lang/zig/metadata.xml| 3 +++ dev-lang/zig/zig-.ebuild | 28 +++- 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/dev-lang/zig/files/zig--stage2-fix.patch b/dev-lang/zig/files/zig--stage2-fix.patch new file mode 100644 index ..520be382c562 --- /dev/null +++ b/dev-lang/zig/files/zig--stage2-fix.patch @@ -0,0 +1,12 @@ +diff --git a/build.zig b/build.zig +index 4d3cf49..4601935 100644 +--- a/build.zig b/build.zig +@@ -550,6 +550,7 @@ fn addCmakeCfgOptionsToExe( + else => |e| return e, + }; + exe.linkSystemLibrary("unwind"); ++exe.linkSystemLibrary("c_nonshared"); + } else if (exe.target.isFreeBSD()) { + try addCxxKnownPath(b, cfg, exe, "libc++.a", null, need_cpp_includes); + exe.linkSystemLibrary("pthread"); diff --git a/dev-lang/zig/metadata.xml b/dev-lang/zig/metadata.xml index 9a74b67c8634..6555f4c1c940 100644 --- a/dev-lang/zig/metadata.xml +++ b/dev-lang/zig/metadata.xml @@ -2,6 +2,9 @@ https://www.gentoo.org/dtd/metadata.dtd;> + + Install stage2 alongside stage1 + ziglang/zig diff --git a/dev-lang/zig/zig-.ebuild b/dev-lang/zig/zig-.ebuild index a0e3522a22a0..cdac1427ee7e 100644 --- a/dev-lang/zig/zig-.ebuild +++ b/dev-lang/zig/zig-.ebuild @@ -18,7 +18,7 @@ fi LICENSE="MIT" SLOT="0" -IUSE="test" +IUSE="test +stage2" RESTRICT="!test? ( test )" BUILD_DIR="${S}/build" @@ -47,6 +47,9 @@ llvm_check_deps() { # see https://github.com/ziglang/zig/wiki/Troubleshooting-Build-Issues#high-memory-requirements CHECKREQS_MEMORY="10G" +# see https://github.com/ziglang/zig/issues/11137 +PATCHES=( "${FILESDIR}/${P}-stage2-fix.patch" ) + pkg_setup() { llvm_pkg_setup check-reqs_pkg_setup @@ -61,7 +64,30 @@ src_configure() { cmake_src_configure } +src_compile() { + cmake_src_compile + + if use stage2 ; then + cd "${BUILD_DIR}" || die + ./zig build -p stage2 -Dstatic-llvm=false -Denable-llvm=true || die + fi +} + src_test() { cd "${BUILD_DIR}" || die ./zig build test || die } + +src_install() { + cmake_src_install + + if use stage2 ; then + cd "${BUILD_DIR}" || die + mv ./stage2/bin/zig zig-stage2 || die + dobin zig-stage2 + fi +} + +pkg_postinst() { + use stage2 && elog "You enabled stage2 USE flag, Zig stage1 was installed as /usr/bin/zig, Zig stage2 was installed as /usr/bin/zig-stage2" +}
[gentoo-commits] repo/gentoo:master commit in: dev-lang/zig/files/, dev-lang/zig/
commit: fe45fe353d86f7b7990f38998cd176ca6dec9d1d Author: Michał Górny gentoo org> AuthorDate: Wed Jul 29 11:41:17 2020 + Commit: Michał Górny gentoo org> CommitDate: Thu Jul 30 22:09:49 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe45fe35 dev-lang/zig: Remove old (LLVM 8) Signed-off-by: Michał Górny gentoo.org> dev-lang/zig/Manifest | 1 - .../zig/files/zig-0.4.0-r1-build-artifacts.patch | 61 -- .../zig/files/zig-0.4.0-r1-suppress-warnings.patch | 31 --- dev-lang/zig/zig-0.4.0-r1.ebuild | 49 - 4 files changed, 142 deletions(-) diff --git a/dev-lang/zig/Manifest b/dev-lang/zig/Manifest index a3f8c62566b..681529cf54a 100644 --- a/dev-lang/zig/Manifest +++ b/dev-lang/zig/Manifest @@ -1,2 +1 @@ -DIST zig-0.4.0.tar.gz 8924757 BLAKE2B 5ca3377f205694ff02360900b49eee7347cdf1cdaef90f1be071eff2610425ed453dfb35928fbe65b25f151b7153ab838c887d362ed3cd746f07833ae42510fd SHA512 423915730bc4ae9a67db3731a96471467826d16e59b87b3541f3e8ed2436f941939f22ccbebdb9a958a195b05360eb65f5be1658b32a01cc8db55c6e581eb039 DIST zig-0.5.0.tar.gz 15743912 BLAKE2B 1a28dffebc24200cf51e1d94ff7203c8de5641e1a299eff58e808a5a8f3257fc8ff771699a0f90733702b90e5536990adc5bf41b973b4ea642081ef788f7a83d SHA512 9fc2ef827421e54e8db98ce3474ba3bbe9119b0b9aa30b4edd78d73277d2384067b5c78f4ebbca350a97ac230131e7f71e6d54c1e75fc74e1833ce6c51c402df diff --git a/dev-lang/zig/files/zig-0.4.0-r1-build-artifacts.patch b/dev-lang/zig/files/zig-0.4.0-r1-build-artifacts.patch deleted file mode 100644 index 11868e93a8a..000 --- a/dev-lang/zig/files/zig-0.4.0-r1-build-artifacts.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 81767a658d07219a402384f98a7553abcbbd2e70 Mon Sep 17 00:00:00 2001 -From: Marc Tiehuis -Date: Thu, 18 Apr 2019 18:58:12 +1200 -Subject: [PATCH] Don't install stage2 artifacts - -Fixes #2220. - CMakeLists.txt | 11 ++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1b017a881..047d538e8 100644 a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -58,6 +58,16 @@ endif() - - set(ZIG_CPP_LIB_DIR "${CMAKE_BINARY_DIR}/zig_cpp") - -+# Handle multi-config builds and place each into a common lib. The VS generator -+# for example will append a Debug folder by default if not explicitly specified. -+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${ZIG_CPP_LIB_DIR}) -+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${ZIG_CPP_LIB_DIR}) -+foreach(CONFIG_TYPE ${CMAKE_CONFIGURATION_TYPES}) -+string(TOUPPER ${CONFIG_TYPE} CONFIG_TYPE) -+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONFIG_TYPE} ${ZIG_CPP_LIB_DIR}) -+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONFIG_TYPE} ${ZIG_CPP_LIB_DIR}) -+endforeach(CONFIG_TYPE CMAKE_CONFIGURATION_TYPES) -+ - if(ZIG_FORCE_EXTERNAL_LLD) - find_package(lld) - include_directories(${LLVM_INCLUDE_DIRS}) -@@ -253,7 +263,6 @@ else() - embedded_lld_wasm - embedded_lld_lib - ) --install(TARGETS embedded_lld_elf embedded_lld_coff embedded_lld_mingw embedded_lld_wasm embedded_lld_lib DESTINATION "${ZIG_CPP_LIB_DIR}") - endif() - - # No patches have been applied to SoftFloat-3e - -From 40fe6afdad1a8676b5d3a5dd23d6d50d6ea9f059 Mon Sep 17 00:00:00 2001 -From: Marc Tiehuis -Date: Wed, 1 May 2019 17:39:23 +1200 -Subject: [PATCH] Don't install zig_cpp lib for stage2 target - -Missed in last commit. See #2220. - CMakeLists.txt | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 047d538e8..9881ce1de 100644 a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -6671,6 +6681,5 @@ - endif() - install(TARGETS zig DESTINATION bin) --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) diff --git a/dev-lang/zig/files/zig-0.4.0-r1-suppress-warnings.patch b/dev-lang/zig/files/zig-0.4.0-r1-suppress-warnings.patch deleted file mode 100644 index 1dc92f88ecb..000 --- a/dev-lang/zig/files/zig-0.4.0-r1-suppress-warnings.patch +++ /dev/null @@ -1,31 +0,0 @@ -Don't attempt to look for static libraries that we're not going to use. -The warnings are only triggered when building with portage. - a/cmake/Findllvm.cmake -+++ b/cmake/Findllvm.cmake -@@ -50,25 +50,6 @@ - endif() - endfunction(NEED_TARGET) - --if(NOT(CMAKE_BUILD_TYPE STREQUAL "Debug") OR ZIG_STATIC) -- execute_process( -- COMMAND ${LLVM_CONFIG_EXE} --libfiles --link-static -- OUTPUT_VARIABLE LLVM_LIBRARIES_SPACES -- OUTPUT_STRIP_TRAILING_WHITESPACE) -- string(REPLACE " " ";" LLVM_LIBRARIES "${LLVM_LIBRARIES_SPACES}") -- -- execute_process( -- COMMAND ${LLVM_CONFIG_EXE} --system-libs --link-static -- OUTPUT_VARIABLE LLVM_SYSTEM_LIBS_SPACES -- OUTPUT_STRIP_TRAILING_WHITESPACE) -- string(REPLACE " " ";" LLVM_SYSTEM_LIBS "${LLVM_SYSTEM_LIBS_SPACES}") -- --
[gentoo-commits] repo/gentoo:master commit in: dev-lang/zig/files/, dev-lang/zig/
commit: d71767d8b9454f990c4f220aacc316e2914b7af6 Author: Nick Erdmann nirf de> AuthorDate: Sat Aug 3 15:05:42 2019 + Commit: Joonas Niilola gentoo org> CommitDate: Wed Aug 7 18:27:26 2019 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d71767d8 dev-lang/zig: switch to EAPI=6, use patch files Signed-off-by: Nick Erdmann nirf.de> Signed-off-by: Joonas Niilola gentoo.org> .../zig/files/zig-0.4.0-r1-build-artifacts.patch | 61 ++ .../zig/files/zig-0.4.0-r1-suppress-warnings.patch | 31 +++ dev-lang/zig/zig-0.4.0-r1.ebuild | 47 + 3 files changed, 139 insertions(+) diff --git a/dev-lang/zig/files/zig-0.4.0-r1-build-artifacts.patch b/dev-lang/zig/files/zig-0.4.0-r1-build-artifacts.patch new file mode 100644 index 000..11868e93a8a --- /dev/null +++ b/dev-lang/zig/files/zig-0.4.0-r1-build-artifacts.patch @@ -0,0 +1,61 @@ +From 81767a658d07219a402384f98a7553abcbbd2e70 Mon Sep 17 00:00:00 2001 +From: Marc Tiehuis +Date: Thu, 18 Apr 2019 18:58:12 +1200 +Subject: [PATCH] Don't install stage2 artifacts + +Fixes #2220. +--- + CMakeLists.txt | 11 ++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1b017a881..047d538e8 100644 +--- a/CMakeLists.txt b/CMakeLists.txt +@@ -58,6 +58,16 @@ endif() + + set(ZIG_CPP_LIB_DIR "${CMAKE_BINARY_DIR}/zig_cpp") + ++# Handle multi-config builds and place each into a common lib. The VS generator ++# for example will append a Debug folder by default if not explicitly specified. ++set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${ZIG_CPP_LIB_DIR}) ++set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${ZIG_CPP_LIB_DIR}) ++foreach(CONFIG_TYPE ${CMAKE_CONFIGURATION_TYPES}) ++string(TOUPPER ${CONFIG_TYPE} CONFIG_TYPE) ++set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONFIG_TYPE} ${ZIG_CPP_LIB_DIR}) ++set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONFIG_TYPE} ${ZIG_CPP_LIB_DIR}) ++endforeach(CONFIG_TYPE CMAKE_CONFIGURATION_TYPES) ++ + if(ZIG_FORCE_EXTERNAL_LLD) + find_package(lld) + include_directories(${LLVM_INCLUDE_DIRS}) +@@ -253,7 +263,6 @@ else() + embedded_lld_wasm + embedded_lld_lib + ) +-install(TARGETS embedded_lld_elf embedded_lld_coff embedded_lld_mingw embedded_lld_wasm embedded_lld_lib DESTINATION "${ZIG_CPP_LIB_DIR}") + endif() + + # No patches have been applied to SoftFloat-3e + +From 40fe6afdad1a8676b5d3a5dd23d6d50d6ea9f059 Mon Sep 17 00:00:00 2001 +From: Marc Tiehuis +Date: Wed, 1 May 2019 17:39:23 +1200 +Subject: [PATCH] Don't install zig_cpp lib for stage2 target + +Missed in last commit. See #2220. +--- + CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 047d538e8..9881ce1de 100644 +--- a/CMakeLists.txt b/CMakeLists.txt +@@ -6671,6 +6681,5 @@ + endif() + install(TARGETS zig DESTINATION bin) +-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) diff --git a/dev-lang/zig/files/zig-0.4.0-r1-suppress-warnings.patch b/dev-lang/zig/files/zig-0.4.0-r1-suppress-warnings.patch new file mode 100644 index 000..1dc92f88ecb --- /dev/null +++ b/dev-lang/zig/files/zig-0.4.0-r1-suppress-warnings.patch @@ -0,0 +1,31 @@ +Don't attempt to look for static libraries that we're not going to use. +The warnings are only triggered when building with portage. + +--- a/cmake/Findllvm.cmake b/cmake/Findllvm.cmake +@@ -50,25 +50,6 @@ + endif() + endfunction(NEED_TARGET) + +-if(NOT(CMAKE_BUILD_TYPE STREQUAL "Debug") OR ZIG_STATIC) +- execute_process( +- COMMAND ${LLVM_CONFIG_EXE} --libfiles --link-static +- OUTPUT_VARIABLE LLVM_LIBRARIES_SPACES +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- string(REPLACE " " ";" LLVM_LIBRARIES "${LLVM_LIBRARIES_SPACES}") +- +- execute_process( +- COMMAND ${LLVM_CONFIG_EXE} --system-libs --link-static +- OUTPUT_VARIABLE LLVM_SYSTEM_LIBS_SPACES +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- string(REPLACE " " ";" LLVM_SYSTEM_LIBS "${LLVM_SYSTEM_LIBS_SPACES}") +- +- execute_process( +- COMMAND ${LLVM_CONFIG_EXE} --libdir --link-static +- OUTPUT_VARIABLE LLVM_LIBDIRS_SPACES +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- string(REPLACE " " ";" LLVM_LIBDIRS "${LLVM_LIBDIRS_SPACES}") +-endif() + if(NOT LLVM_LIBRARIES) + execute_process( + COMMAND ${LLVM_CONFIG_EXE} --libs diff --git a/dev-lang/zig/zig-0.4.0-r1.ebuild b/dev-lang/zig/zig-0.4.0-r1.ebuild new file mode 100644 index 000..de7dd259a3d --- /dev/null +++ b/dev-lang/zig/zig-0.4.0-r1.ebuild @@ -0,0 +1,47 @@ +# Copyright 2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cmake-utils llvm + +DESCRIPTION="A robust, optimal, and maintainable programming language" +HOMEPAGE="https://ziglang.org/; +LICENSE="MIT"