[arch-commits] Commit in zig/repos (4 files)
Daurnimator
daurnimator at archlinux.org
Tue Apr 9 10:32:21 UTC 2019
Date: Tuesday, April 9, 2019 @ 10:32:20
Author: daurnimator
Revision: 450585
archrelease: copy trunk to community-x86_64
Added:
zig/repos/community-x86_64/
zig/repos/community-x86_64/PKGBUILD
(from rev 450584, zig/trunk/PKGBUILD)
zig/repos/community-x86_64/force_dynamic_llvm.patch
(from rev 450584, zig/trunk/force_dynamic_llvm.patch)
zig/repos/community-x86_64/no_stage2_artifacts.patch
(from rev 450584, zig/trunk/no_stage2_artifacts.patch)
---------------------------+
PKGBUILD | 59 ++++++++++++++++++++++++++++++++++++++++++++
force_dynamic_llvm.patch | 16 +++++++++++
no_stage2_artifacts.patch | 20 ++++++++++++++
3 files changed, 95 insertions(+)
Copied: zig/repos/community-x86_64/PKGBUILD (from rev 450584, zig/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD (rev 0)
+++ community-x86_64/PKGBUILD 2019-04-09 10:32:20 UTC (rev 450585)
@@ -0,0 +1,59 @@
+# Maintainer: Daurnimator <daurnimator at archlinux.org>
+# Contributor: Marc Tiehuis <marctiehuis at gmail.com>
+
+pkgname=zig
+pkgver=0.4.0
+pkgrel=1
+pkgdesc='a programming language prioritizing robustness, optimality, and maintainability'
+arch=('x86_64')
+url='https://ziglang.org/'
+license=('MIT')
+depends=('clang' 'llvm-libs' 'lld')
+makedepends=('cmake' 'llvm')
+source=("https://ziglang.org/download/$pkgver/zig-$pkgver.tar.xz"
+ 'force_dynamic_llvm.patch'
+ 'no_stage2_artifacts.patch')
+sha256sums=('fec1f3f6b359a3d942e0a7f9157b3b30cde83927627a0e1ea95c54de3c526cfc'
+ '986ffeb8f53c4b1651dcf8d252e5a5ffe85243b2dccc211c4ca972522eabd015'
+ '487546991703485d688413546ad36f334019c51c5a4a20f7ab750a521cb03f9b')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+ patch -Np1 -i "../force_dynamic_llvm.patch"
+ patch -Np1 -i "../no_stage2_artifacts.patch"
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+ mkdir -p build
+ cd build
+ # The zig CMakeLists uses build type Debug if not set
+ # override it back to None so makepkg env vars are respected
+ # Zig vendors LLD as a workaround for an upstream bug when targetting OSX
+ # - https://github.com/ziglang/zig/issues/662
+ # - https://bugs.llvm.org/show_bug.cgi?id=32254
+ # - http://lists.llvm.org/pipermail/llvm-dev/2017-August/116904.html
+ cmake \
+ -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DZIG_FORCE_EXTERNAL_LLD=ON \
+ ..
+ make
+}
+
+check() {
+ cd "$pkgname-$pkgver/build"
+
+ # test suite requires zig to be installed first
+ # https://github.com/ziglang/zig/issues/2221
+
+ # For now, just check the version subcommand works
+ ./zig version
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ make -C build DESTDIR="$pkgdir" install
+}
Copied: zig/repos/community-x86_64/force_dynamic_llvm.patch (from rev 450584, zig/trunk/force_dynamic_llvm.patch)
===================================================================
--- community-x86_64/force_dynamic_llvm.patch (rev 0)
+++ community-x86_64/force_dynamic_llvm.patch 2019-04-09 10:32:20 UTC (rev 450585)
@@ -0,0 +1,16 @@
+ cmake/Findllvm.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/Findllvm.cmake b/cmake/Findllvm.cmake
+index 9a4fa3f3..64e31fc0 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-7.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
Copied: zig/repos/community-x86_64/no_stage2_artifacts.patch (from rev 450584, zig/trunk/no_stage2_artifacts.patch)
===================================================================
--- community-x86_64/no_stage2_artifacts.patch (rev 0)
+++ community-x86_64/no_stage2_artifacts.patch 2019-04-09 10:32:20 UTC (rev 450585)
@@ -0,0 +1,20 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index bda57634..52599838 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -254,7 +254,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
+@@ -775,7 +774,6 @@ if(MSVC OR MINGW)
+ target_link_libraries(zig LINK_PUBLIC version)
+ 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)
More information about the arch-commits
mailing list