mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-20 00:21:35 +00:00
New port: lang/zig
Zig is a general purpose programming language designed for robustness, optimality, and maintainability. WWW: https://ziglang.org/
This commit is contained in:
parent
93222f7d20
commit
63b3cecfeb
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=512489
@ -387,5 +387,6 @@
|
||||
SUBDIR += yap-devel
|
||||
SUBDIR += yorick
|
||||
SUBDIR += ypsilon
|
||||
SUBDIR += zig
|
||||
|
||||
.include <bsd.port.subdir.mk>
|
||||
|
27
lang/zig/Makefile
Normal file
27
lang/zig/Makefile
Normal file
@ -0,0 +1,27 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= zig
|
||||
DISTVERSION= 0.4.0
|
||||
CATEGORIES= lang
|
||||
MASTER_SITES= https://ziglang.org/download/${DISTVERSION}/
|
||||
|
||||
MAINTAINER= tobik@FreeBSD.org
|
||||
COMMENT= Language designed for robustness, optimality, and maintainability
|
||||
|
||||
LICENSE= MIT
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
_LLVM_VER= 80
|
||||
BUILD_DEPENDS= llvm${_LLVM_VER}>=0:devel/llvm${_LLVM_VER}
|
||||
|
||||
USES= cmake compiler:c++11-lang tar:xz
|
||||
BINARY_ALIAS= llvm-config=${LOCALBASE}/bin/llvm-config${_LLVM_VER}
|
||||
|
||||
OPTIONS_DEFINE= STATIC
|
||||
OPTIONS_DEFAULT= STATIC
|
||||
|
||||
STATIC_RUN_DEPENDS_OFF= llvm${_LLVM_VER}>=0:devel/llvm${_LLVM_VER}
|
||||
STATIC_CMAKE_BOOL= CMAKE_SKIP_INSTALL_RPATH \
|
||||
ZIG_STATIC
|
||||
|
||||
.include <bsd.port.mk>
|
3
lang/zig/distinfo
Normal file
3
lang/zig/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1569067124
|
||||
SHA256 (zig-0.4.0.tar.xz) = fec1f3f6b359a3d942e0a7f9157b3b30cde83927627a0e1ea95c54de3c526cfc
|
||||
SIZE (zig-0.4.0.tar.xz) = 5348776
|
38
lang/zig/files/patch-CMakeLists.txt
Normal file
38
lang/zig/files/patch-CMakeLists.txt
Normal file
@ -0,0 +1,38 @@
|
||||
https://github.com/ziglang/zig/commit/81767a658d07219a402384f98a7553abcbbd2e70
|
||||
https://github.com/ziglang/zig/commit/40fe6afdad1a8676b5d3a5dd23d6d50d6ea9f059
|
||||
|
||||
--- CMakeLists.txt.orig 2019-04-08 19:41:41 UTC
|
||||
+++ CMakeLists.txt
|
||||
@@ -62,6 +62,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})
|
||||
@@ -257,7 +267,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
|
||||
@@ -6670,7 +6679,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)
|
4
lang/zig/pkg-descr
Normal file
4
lang/zig/pkg-descr
Normal file
@ -0,0 +1,4 @@
|
||||
Zig is a general purpose programming language designed for robustness,
|
||||
optimality, and maintainability.
|
||||
|
||||
WWW: https://ziglang.org/
|
6092
lang/zig/pkg-plist
Normal file
6092
lang/zig/pkg-plist
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user