git: 026e79b6060c - main - lang/crystal: Update to 1.6.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 12 Oct 2022 11:35:58 UTC
The branch main has been updated by dmgk: URL: https://cgit.FreeBSD.org/ports/commit/?id=026e79b6060ca2fe997c267ca886bfb0860a9457 commit 026e79b6060ca2fe997c267ca886bfb0860a9457 Author: Dmitri Goutnik <dmgk@FreeBSD.org> AuthorDate: 2022-10-12 11:13:31 +0000 Commit: Dmitri Goutnik <dmgk@FreeBSD.org> CommitDate: 2022-10-12 11:23:48 +0000 lang/crystal: Update to 1.6.0 Changes: https://github.com/crystal-lang/crystal/releases/tag/1.6.0 While here, also: - switch to llvm 14 - upgrade bootstrap compiler to 1.5.1 - add INTERPRETER and STATIC knobs --- lang/crystal/Makefile | 88 ++++++++++++++++++++++++++---------------------- lang/crystal/distinfo | 14 ++++---- lang/crystal/pkg-message | 8 ----- lang/crystal/pkg-plist | 10 ++++-- 4 files changed, 62 insertions(+), 58 deletions(-) diff --git a/lang/crystal/Makefile b/lang/crystal/Makefile index 4daf2cdbc77f..ceb792c6838b 100644 --- a/lang/crystal/Makefile +++ b/lang/crystal/Makefile @@ -1,26 +1,31 @@ -PORTNAME= crystal -DISTVERSION= 1.5.1 -CATEGORIES= lang -MASTER_SITES= https://dl.unrelenting.technology/crystal/:bootstrap -DISTFILES= ${BOOTSTRAP_PATH}:bootstrap -DIST_SUBDIR= ${PORTNAME} -EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} +PORTNAME= crystal +DISTVERSION= 1.6.0 +CATEGORIES= lang +MASTER_SITES= https://github.com/dmgk/crystal-bootstrap/releases/download/${BOOTSTRAP_VERSION}/:bootstrap \ + LOCAL/dmgk/crystal:bootstrap +DISTFILES= ${BOOTSTRAP_NAME}.tar.xz:bootstrap +DIST_SUBDIR= ${PORTNAME} MAINTAINER= dmgk@FreeBSD.org COMMENT= Language with Ruby-like syntax and static type checking WWW= https://crystal-lang.org LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE -ONLY_FOR_ARCHS= aarch64 amd64 -ONLY_FOR_ARCHS_REASON= requires prebuilt bootstrap compiler +ONLY_FOR_ARCHS= aarch64 amd64 +ONLY_FOR_ARCHS_REASON= requires prebuilt bootstrap compiler BUILD_DEPENDS= ${LOCALBASE}/bin/llvm-config${LLVM_VERSION}:devel/llvm${BOOTSTRAP_LLVM_VERSION} \ git:devel/git -LIB_DEPENDS= libgc-threaded.so:devel/boehm-gc-threaded \ +LIB_DEPENDS= libLLVM-${LLVM_VERSION}.so:devel/llvm${LLVM_VERSION} \ libevent.so:devel/libevent \ + libffi.so:devel/libffi \ + libgc-threaded.so:devel/boehm-gc-threaded \ + libgmp.so:math/gmp \ libpcre.so:devel/pcre \ - libLLVM-${LLVM_VERSION:C/^([6-9])0/\1/:S/-devel/15/}.so:devel/llvm${LLVM_VERSION} + libxml2.so:textproc/libxml2 \ + libyaml.so:textproc/libyaml RUN_DEPENDS= pkg-config:devel/pkgconf USES= compiler gmake pkgconfig ssl @@ -28,26 +33,30 @@ USES= compiler gmake pkgconfig ssl USE_GITHUB= yes GH_ACCOUNT= crystal-lang -LLVM_VERSION?= 10 -BOOTSTRAP_LLVM_VERSION= 10 -BOOTSTRAP_PATH= crystal-${BOOTSTRAP_VER}-freebsd12-${ARCH}-llvm${BOOTSTRAP_LLVM_VERSION} -BOOTSTRAP_VER?= 1.1.1 +LLVM_VERSION?= 14 +BOOTSTRAP_LLVM_VERSION= 14 +BOOTSTRAP_VERSION= 1.5.1 +BOOTSTRAP_NAME= crystal-${BOOTSTRAP_VERSION}-${ARCH}-llvm${BOOTSTRAP_LLVM_VERSION} -MAKE_ARGS= SHELL=sh \ - LLVM_CONFIG="${LOCALBASE}/bin/llvm-config${LLVM_VERSION}" \ - FLAGS="--release --no-debug --progress --threads=${MAKE_JOBS_NUMBER}" \ - EXPORTS='CRYSTAL_CONFIG_PATH="lib:${PREFIX}/lib/${PORTNAME}"' \ +MAKE_ARGS= LLVM_CONFIG="${LOCALBASE}/bin/llvm-config${LLVM_VERSION}" \ + CRYSTAL_CONFIG_PATH="lib:${PREFIX}/lib/${PORTNAME}" \ CRYSTAL_CACHE_DIR="${WRKDIR}/cache" \ - CRYSTAL_CONFIG_VERSION="${DISTVERSION}" + FLAGS="--progress --stats --threads ${MAKE_JOBS_NUMBER} ${OPT_FLAGS}" +TEST_ARGS= ${MAKE_ARGS:S/release=1//} TEST_TARGET= spec PORTDOCS= * PORTEXAMPLES= * -OPTIONS_DEFINE= DOCS EXAMPLES BASH ZSH -OPTIONS_DEFAULT= BASH ZSH -OPTIONS_SUB= yes +OPTIONS_DEFINE= DEBUG DOCS EXAMPLES INTERPRETER STATIC + +INTERPRETER_DESC= Enable interpreter (experimental) + +DEBUG_VARS= opt_flags+="--debug" +DEBUG_VARS_OFF= opt_flags+="--release --no-debug" +INTERPRETER_MAKE_ARGS= interpreter=1 +STATIC_MAKE_ARGS= static=1 .include <bsd.port.options.mk> @@ -65,11 +74,10 @@ EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src_openssl_lib__crypto.cr \ .endif post-extract: - ${MKDIR} ${WRKSRC}/.build - ${CP} ${DISTDIR}/${DIST_SUBDIR}/${BOOTSTRAP_PATH} ${WRKSRC}/.build/crystal - ${CHMOD} +x ${WRKSRC}/.build/crystal - ${LN} -s x86_64-freebsd ${WRKSRC}/src/lib_c/aarch64-portbld-freebsd - ${LN} -s x86_64-freebsd ${WRKSRC}/src/lib_c/aarch64-freebsd + @${RLN} ${WRKDIR}/.build ${WRKSRC} + @${RLN} x86_64-freebsd ${WRKSRC}/src/lib_c/aarch64-freebsd + @${RLN} x86_64-freebsd ${WRKSRC}/src/lib_c/aarch64-portbld-freebsd + @${RLN} x86_64-freebsd ${WRKSRC}/src/lib_c/aarch64-unknown-freebsd post-patch: .if ${SSL_DEFAULT} == "base" && ${OSREL:R} < 15 @@ -80,14 +88,22 @@ post-patch: ${WRKSRC}/src/openssl/lib_crypto.cr .endif -do-build-DOCS-on: - cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} docs \ - CRYSTAL_CACHE_DIR="${WRKDIR}/cache" +pre-test: + @${CHMOD} +x ${WRKSRC}/src/llvm/ext/find-llvm-config + +post-build-DOCS-on: + (cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} docs) do-install: ${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/.build/crystal ${STAGEDIR}${PREFIX}/bin/ ${INSTALL_MAN} ${INSTALL_WRKSRC}/man/crystal.1 ${STAGEDIR}${MANPREFIX}/man/man1/ (cd ${INSTALL_WRKSRC}/src && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/${PORTNAME}) + ${MKDIR} ${STAGEDIR}${LOCALBASE}/etc/bash_completion.d + ${MKDIR} ${STAGEDIR}${LOCALBASE}/share/zsh/site-functions + ${INSTALL_DATA} ${INSTALL_WRKSRC}/etc/completion.bash \ + ${STAGEDIR}${LOCALBASE}/etc/bash_completion.d/_crystal.bash + ${INSTALL_DATA} ${INSTALL_WRKSRC}/etc/completion.zsh \ + ${STAGEDIR}${LOCALBASE}/share/zsh/site-functions/_crystal do-install-DOCS-on: (cd ${INSTALL_WRKSRC}/docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}) @@ -95,16 +111,6 @@ do-install-DOCS-on: do-install-EXAMPLES-on: (cd ${INSTALL_WRKSRC}/samples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}) -do-install-BASH-on: - ${MKDIR} ${STAGEDIR}${LOCALBASE}/etc/bash_completion.d - ${INSTALL_DATA} ${INSTALL_WRKSRC}/etc/completion.bash \ - ${STAGEDIR}${LOCALBASE}/etc/bash_completion.d/_crystal.bash - -do-install-ZSH-on: - ${MKDIR} ${STAGEDIR}${LOCALBASE}/share/zsh/site-functions - ${INSTALL_DATA} ${INSTALL_WRKSRC}/etc/completion.zsh \ - ${STAGEDIR}${LOCALBASE}/share/zsh/site-functions/_crystal - .if !defined(_CRYSTAL_MAKESUM_GUARD) makesum: ${MAKE} -D_CRYSTAL_MAKESUM_GUARD makesum ARCH=${ONLY_FOR_ARCHS:O:[1]} DISTINFO_FILE=${DISTINFO_FILE}.tmp diff --git a/lang/crystal/distinfo b/lang/crystal/distinfo index 1061faef0691..34ce7a216602 100644 --- a/lang/crystal/distinfo +++ b/lang/crystal/distinfo @@ -1,7 +1,7 @@ -TIMESTAMP = 1663684430 -SHA256 (crystal/crystal-1.1.1-freebsd12-aarch64-llvm10) = 51433c9cff796da1423e2a6d77c87891cd7ba4cee37ef25322b2e801aba2b53b -SIZE (crystal/crystal-1.1.1-freebsd12-aarch64-llvm10) = 11093864 -SHA256 (crystal/crystal-lang-crystal-1.5.1_GH0.tar.gz) = d6d2ed257c688a81c68bad63a9796d34aab3a5667f7e3a86d22f9fce2f8c56fc -SIZE (crystal/crystal-lang-crystal-1.5.1_GH0.tar.gz) = 2911644 -SHA256 (crystal/crystal-1.1.1-freebsd12-amd64-llvm10) = bceb45f9d886cfbfac866761dcb954788156908d3a54e35f58c9e3f716cf91ed -SIZE (crystal/crystal-1.1.1-freebsd12-amd64-llvm10) = 11997032 +TIMESTAMP = 1665444750 +SHA256 (crystal/crystal-1.5.1-aarch64-llvm14.tar.xz) = 62617bf7a6d38d5a980672559b680818bf35803252f69bb6ecfb33377c3b2a88 +SIZE (crystal/crystal-1.5.1-aarch64-llvm14.tar.xz) = 2085460 +SHA256 (crystal/crystal-lang-crystal-1.6.0_GH0.tar.gz) = 8119bc099d898be0d2e5055f783d41325a10e4b7824240272eb6ecb30c8c9a2e +SIZE (crystal/crystal-lang-crystal-1.6.0_GH0.tar.gz) = 3058366 +SHA256 (crystal/crystal-1.5.1-amd64-llvm14.tar.xz) = abd7cd2a798b9184d6cbb600fde29a55e196a03974c164ceac1713be264fb7ac +SIZE (crystal/crystal-1.5.1-amd64-llvm14.tar.xz) = 2608988 diff --git a/lang/crystal/pkg-message b/lang/crystal/pkg-message deleted file mode 100644 index 4ac14ab9753f..000000000000 --- a/lang/crystal/pkg-message +++ /dev/null @@ -1,8 +0,0 @@ -[ -{ type: install - message: <<EOM -Install textproc/libyaml for YAML support, math/gmp for BigInt support, -textproc/libxml2 for XML support. -EOM -} -] diff --git a/lang/crystal/pkg-plist b/lang/crystal/pkg-plist index 4b6db28dd2ef..887142f1cbdc 100644 --- a/lang/crystal/pkg-plist +++ b/lang/crystal/pkg-plist @@ -1,5 +1,5 @@ bin/crystal -%%BASH%%etc/bash_completion.d/_crystal.bash +etc/bash_completion.d/_crystal.bash lib/crystal/VERSION lib/crystal/annotations.cr lib/crystal/array.cr @@ -100,6 +100,7 @@ lib/crystal/compiler/crystal/interpreter/local_vars_gatherer.cr lib/crystal/compiler/crystal/interpreter/multidispatch.cr lib/crystal/compiler/crystal/interpreter/op_code.cr lib/crystal/compiler/crystal/interpreter/primitives.cr +lib/crystal/compiler/crystal/interpreter/prompt.cr lib/crystal/compiler/crystal/interpreter/repl.cr lib/crystal/compiler/crystal/interpreter/to_bool.cr lib/crystal/compiler/crystal/interpreter/value.cr @@ -248,6 +249,8 @@ lib/crystal/compiler/crystal/tools/table_print.cr lib/crystal/compiler/crystal/tools/typed_def_processor.cr lib/crystal/compiler/crystal/types.cr lib/crystal/compiler/crystal/util.cr +lib/crystal/compiler/crystal/warnings.cr +lib/crystal/compiler/crystal/zero_one_or_many.cr lib/crystal/compiler/requires.cr lib/crystal/complex.cr lib/crystal/compress/deflate/deflate.cr @@ -459,6 +462,8 @@ lib/crystal/float.cr lib/crystal/float/printer.cr lib/crystal/float/printer/cached_powers.cr lib/crystal/float/printer/diy_fp.cr +lib/crystal/float/printer/dragonbox.cr +lib/crystal/float/printer/dragonbox_cache.cr lib/crystal/float/printer/grisu3.cr lib/crystal/float/printer/ieee.cr lib/crystal/gc.cr @@ -642,6 +647,7 @@ lib/crystal/lib_c/aarch64-linux-musl/c/termios.cr lib/crystal/lib_c/aarch64-linux-musl/c/time.cr lib/crystal/lib_c/aarch64-linux-musl/c/unistd.cr lib/crystal/lib_c/aarch64-portbld-freebsd +lib/crystal/lib_c/aarch64-unknown-freebsd lib/crystal/lib_c/amd64-unknown-openbsd lib/crystal/lib_c/arm-linux-gnueabihf/c/arpa/inet.cr lib/crystal/lib_c/arm-linux-gnueabihf/c/dirent.cr @@ -1338,4 +1344,4 @@ lib/crystal/yaml/schema/fail_safe.cr lib/crystal/yaml/serialization.cr lib/crystal/yaml/to_yaml.cr man/man1/crystal.1.gz -%%ZSH%%share/zsh/site-functions/_crystal +share/zsh/site-functions/_crystal