git: 8bcabf4357e6 - main - lang/crystal: update to 1.10.1

From: Dave Cottlehuber <dch_at_FreeBSD.org>
Date: Wed, 10 Jan 2024 15:38:09 UTC
The branch main has been updated by dch:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8bcabf4357e6d87b3d2904261fec4fe82c774d94

commit 8bcabf4357e6d87b3d2904261fec4fe82c774d94
Author:     Dave Cottlehuber <dch@FreeBSD.org>
AuthorDate: 2024-01-10 15:37:11 +0000
Commit:     Dave Cottlehuber <dch@FreeBSD.org>
CommitDate: 2024-01-10 15:37:12 +0000

    lang/crystal: update to 1.10.1
    
    - fix build for 14.0+ with base OpenSSL 3.x
    
    Differential Revision: https://reviews.freebsd.org/D41746
    PR:     275427
---
 lang/crystal/Makefile  | 20 ++++++++++-----
 lang/crystal/distinfo  |  6 ++---
 lang/crystal/pkg-plist | 67 +++++++++++++++++++++++++++++++++++++++++++++-----
 3 files changed, 78 insertions(+), 15 deletions(-)

diff --git a/lang/crystal/Makefile b/lang/crystal/Makefile
index 56cb6055c853..989bd3f0f998 100644
--- a/lang/crystal/Makefile
+++ b/lang/crystal/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	crystal
-DISTVERSION=	1.7.3
+DISTVERSION=	1.10.1
 CATEGORIES=	lang
 MASTER_SITES=	https://github.com/dmgk/crystal-bootstrap/releases/download/${BOOTSTRAP_VERSION}/:bootstrap \
 		LOCAL/dmgk/crystal:bootstrap
@@ -16,7 +16,7 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 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} \
+BUILD_DEPENDS=	${LOCALBASE}/bin/llvm-config${BOOTSTRAP_LLVM_VERSION}:devel/llvm${BOOTSTRAP_LLVM_VERSION} \
 		git:devel/git
 LIB_DEPENDS=	libLLVM-${LLVM_VERSION}.so:devel/llvm${LLVM_VERSION} \
 		libevent.so:devel/libevent \
@@ -24,6 +24,7 @@ LIB_DEPENDS=	libLLVM-${LLVM_VERSION}.so:devel/llvm${LLVM_VERSION} \
 		libgc-threaded.so:devel/boehm-gc-threaded \
 		libgmp.so:math/gmp \
 		libpcre.so:devel/pcre \
+		libpcre2-8.so:devel/pcre2 \
 		libxml2.so:textproc/libxml2 \
 		libyaml.so:textproc/libyaml
 RUN_DEPENDS=	pkg-config:devel/pkgconf
@@ -33,8 +34,8 @@ USES=		compiler gmake pkgconfig ssl
 USE_GITHUB=	yes
 GH_ACCOUNT=	crystal-lang
 
-COMMIT_ID=		879691b2e326
-LLVM_VERSION?=		14
+COMMIT_ID=		84f389ac5424
+LLVM_VERSION?=		16
 BOOTSTRAP_LLVM_VERSION=	14
 BOOTSTRAP_VERSION=	1.5.1
 BOOTSTRAP_NAME=		crystal-${BOOTSTRAP_VERSION}-${ARCH}-llvm${BOOTSTRAP_LLVM_VERSION}
@@ -71,7 +72,7 @@ IGNORE=		not supported on anything but FreeBSD
 # present in FreeBSD base. We splice in the correct info based on
 # FreeBSD version and hope it doesn't change during minor releases.
 # See post-patch for the substitutions of these patches.
-.if ${SSL_DEFAULT} == "base"
+.if ${SSL_DEFAULT} == "base" && ${OSREL:R} < 13
 EXTRA_PATCHES=	${PATCHDIR}/extra-patch-src_openssl_lib__crypto.cr \
 		${PATCHDIR}/extra-patch-src_openssl_lib__ssl.cr
 .endif
@@ -83,13 +84,20 @@ post-extract:
 	@${RLN} x86_64-freebsd ${WRKSRC}/src/lib_c/aarch64-unknown-freebsd
 
 post-patch:
-.if ${SSL_DEFAULT} == "base" && ${OSREL:R} < 15
+.if ${SSL_DEFAULT} == "base" && ${OSREL:R} <= 13
 	@${REINPLACE_CMD} -i '' \
 		-e 's|CRYSTAL_SSL_VERSION|1.1.1|g' \
 		-e 's|CRYSTAL_SSL_LDFLAGS|${OPENSSLLIB}|g' \
 		${WRKSRC}/src/openssl/lib_ssl.cr \
 		${WRKSRC}/src/openssl/lib_crypto.cr
 .endif
+.if ${SSL_DEFAULT} == "base" && ${OSREL:R} >= 14
+	@${REINPLACE_CMD} -i '' \
+		-e 's|CRYSTAL_SSL_VERSION|3.0.10|g' \
+		-e 's|CRYSTAL_SSL_LDFLAGS|${OPENSSLLIB}|g' \
+		${WRKSRC}/src/openssl/lib_ssl.cr \
+		${WRKSRC}/src/openssl/lib_crypto.cr
+.endif
 
 pre-test:
 	@${CHMOD} +x ${WRKSRC}/src/llvm/ext/find-llvm-config
diff --git a/lang/crystal/distinfo b/lang/crystal/distinfo
index ebe70c83cce7..f58b74f692a3 100644
--- a/lang/crystal/distinfo
+++ b/lang/crystal/distinfo
@@ -1,7 +1,7 @@
-TIMESTAMP = 1678454903
+TIMESTAMP = 1702909351
 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.7.3_GH0.tar.gz) = 3ad94dd2835a58af8dabf18d6cdf3791eb49cdfc6fdc6fd6a4e59abf0e860a6f
-SIZE (crystal/crystal-lang-crystal-1.7.3_GH0.tar.gz) = 3122395
+SHA256 (crystal/crystal-lang-crystal-1.10.1_GH0.tar.gz) = f6449ffff519c86383f5e845455f3e6f6b10d6090effab09568f4c7414a8a51b
+SIZE (crystal/crystal-lang-crystal-1.10.1_GH0.tar.gz) = 3305965
 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-plist b/lang/crystal/pkg-plist
index 186cb20f1514..e57d3238ed73 100644
--- a/lang/crystal/pkg-plist
+++ b/lang/crystal/pkg-plist
@@ -56,6 +56,7 @@ lib/crystal/compiler/crystal/codegen/type_id.cr
 lib/crystal/compiler/crystal/codegen/types.cr
 lib/crystal/compiler/crystal/codegen/unions.cr
 lib/crystal/compiler/crystal/command.cr
+lib/crystal/compiler/crystal/command/clear_cache.cr
 lib/crystal/compiler/crystal/command/cursor.cr
 lib/crystal/compiler/crystal/command/docs.cr
 lib/crystal/compiler/crystal/command/env.cr
@@ -200,6 +201,8 @@ lib/crystal/compiler/crystal/tools/doc/project_info.cr
 lib/crystal/compiler/crystal/tools/doc/relative_location.cr
 lib/crystal/compiler/crystal/tools/doc/templates.cr
 lib/crystal/compiler/crystal/tools/doc/to_json.cr
+lib/crystal/compiler/crystal/tools/dependencies.cr
+lib/crystal/compiler/crystal/tools/unreachable.cr
 lib/crystal/compiler/crystal/tools/doc/type.cr
 lib/crystal/compiler/crystal/tools/expand.cr
 lib/crystal/compiler/crystal/tools/formatter.cr
@@ -233,11 +236,8 @@ lib/crystal/compiler/crystal/tools/playground/public/vendor/codemirror-5.38.0/th
 lib/crystal/compiler/crystal/tools/playground/public/vendor/jquery-2.2.1.min.js
 lib/crystal/compiler/crystal/tools/playground/public/vendor/materialize-v0.97.5/css/materialize.min.css
 lib/crystal/compiler/crystal/tools/playground/public/vendor/materialize-v0.97.5/js/materialize.min.js
-lib/crystal/compiler/crystal/tools/playground/public/vendor/octicons-3.5.0/octicons.css
-lib/crystal/compiler/crystal/tools/playground/public/vendor/octicons-3.5.0/octicons.eot
-lib/crystal/compiler/crystal/tools/playground/public/vendor/octicons-3.5.0/octicons.svg
-lib/crystal/compiler/crystal/tools/playground/public/vendor/octicons-3.5.0/octicons.ttf
-lib/crystal/compiler/crystal/tools/playground/public/vendor/octicons-3.5.0/octicons.woff
+lib/crystal/compiler/crystal/tools/playground/public/vendor/octicons-19.5.0/octicons.css
+lib/crystal/compiler/crystal/tools/playground/public/vendor/octicons-19.5.0/octicons.svg
 lib/crystal/compiler/crystal/tools/playground/server.cr
 lib/crystal/compiler/crystal/tools/playground/views/_about.html
 lib/crystal/compiler/crystal/tools/playground/views/_index.html
@@ -279,6 +279,7 @@ lib/crystal/crypto/bcrypt/password.cr
 lib/crystal/crypto/blowfish.cr
 lib/crystal/crypto/subtle.cr
 lib/crystal/crystal/at_exit_handlers.cr
+lib/crystal/crystal/atomic_semaphore.cr
 lib/crystal/crystal/compiler_rt.cr
 lib/crystal/crystal/compiler_rt/divmod128.cr
 lib/crystal/crystal/compiler_rt/fixint.cr
@@ -307,6 +308,7 @@ lib/crystal/crystal/once.cr
 lib/crystal/crystal/pointer_linked_list.cr
 lib/crystal/crystal/rw_lock.cr
 lib/crystal/crystal/scheduler.cr
+lib/crystal/crystal/small_deque.cr
 lib/crystal/crystal/spin_lock.cr
 lib/crystal/crystal/syntax_highlighter.cr
 lib/crystal/crystal/syntax_highlighter/colorize.cr
@@ -325,6 +327,7 @@ lib/crystal/crystal/system/path.cr
 lib/crystal/crystal/system/print_error.cr
 lib/crystal/crystal/system/process.cr
 lib/crystal/crystal/system/random.cr
+lib/crystal/crystal/system/signal.cr
 lib/crystal/crystal/system/socket.cr
 lib/crystal/crystal/system/thread.cr
 lib/crystal/crystal/system/thread_condition_variable.cr
@@ -351,6 +354,7 @@ lib/crystal/crystal/system/unix/process.cr
 lib/crystal/crystal/system/unix/pthread.cr
 lib/crystal/crystal/system/unix/pthread_condition_variable.cr
 lib/crystal/crystal/system/unix/pthread_mutex.cr
+lib/crystal/crystal/system/unix/signal.cr
 lib/crystal/crystal/system/unix/socket.cr
 lib/crystal/crystal/system/unix/syscall.cr
 lib/crystal/crystal/system/unix/sysconf_cpucount.cr
@@ -372,6 +376,7 @@ lib/crystal/crystal/system/wasi/main.cr
 lib/crystal/crystal/system/wasi/path.cr
 lib/crystal/crystal/system/wasi/process.cr
 lib/crystal/crystal/system/wasi/random.cr
+lib/crystal/crystal/system/wasi/signal.cr
 lib/crystal/crystal/system/wasi/socket.cr
 lib/crystal/crystal/system/wasi/thread.cr
 lib/crystal/crystal/system/wasi/thread_condition_variable.cr
@@ -379,6 +384,8 @@ lib/crystal/crystal/system/wasi/thread_mutex.cr
 lib/crystal/crystal/system/wasi/user.cr
 lib/crystal/crystal/system/wasi/wasi.cr
 lib/crystal/crystal/system/win32/cpucount.cr
+lib/crystal/crystal/system/win32/crypto.cr
+lib/crystal/crystal/system/win32/delay_load.cr
 lib/crystal/crystal/system/win32/dir.cr
 lib/crystal/crystal/system/win32/env.cr
 lib/crystal/crystal/system/win32/event_loop_iocp.cr
@@ -392,6 +399,7 @@ lib/crystal/crystal/system/win32/mime.cr
 lib/crystal/crystal/system/win32/path.cr
 lib/crystal/crystal/system/win32/process.cr
 lib/crystal/crystal/system/win32/random.cr
+lib/crystal/crystal/system/win32/signal.cr
 lib/crystal/crystal/system/win32/socket.cr
 lib/crystal/crystal/system/win32/thread.cr
 lib/crystal/crystal/system/win32/thread_condition_variable.cr
@@ -545,6 +553,44 @@ lib/crystal/json/token.cr
 lib/crystal/kernel.cr
 lib/crystal/levenshtein.cr
 lib/crystal/lib_c.cr
+lib/crystal/lib_c/aarch64-android/c/arpa/inet.cr
+lib/crystal/lib_c/aarch64-android/c/dirent.cr
+lib/crystal/lib_c/aarch64-android/c/dlfcn.cr
+lib/crystal/lib_c/aarch64-android/c/elf.cr
+lib/crystal/lib_c/aarch64-android/c/errno.cr
+lib/crystal/lib_c/aarch64-android/c/fcntl.cr
+lib/crystal/lib_c/aarch64-android/c/grp.cr
+lib/crystal/lib_c/aarch64-android/c/iconv.cr
+lib/crystal/lib_c/aarch64-android/c/link.cr
+lib/crystal/lib_c/aarch64-android/c/netdb.cr
+lib/crystal/lib_c/aarch64-android/c/netinet/in.cr
+lib/crystal/lib_c/aarch64-android/c/netinet/tcp.cr
+lib/crystal/lib_c/aarch64-android/c/pthread.cr
+lib/crystal/lib_c/aarch64-android/c/pwd.cr
+lib/crystal/lib_c/aarch64-android/c/sched.cr
+lib/crystal/lib_c/aarch64-android/c/signal.cr
+lib/crystal/lib_c/aarch64-android/c/stdarg.cr
+lib/crystal/lib_c/aarch64-android/c/stddef.cr
+lib/crystal/lib_c/aarch64-android/c/stdint.cr
+lib/crystal/lib_c/aarch64-android/c/stdio.cr
+lib/crystal/lib_c/aarch64-android/c/stdlib.cr
+lib/crystal/lib_c/aarch64-android/c/string.cr
+lib/crystal/lib_c/aarch64-android/c/sys/file.cr
+lib/crystal/lib_c/aarch64-android/c/sys/ioctl.cr
+lib/crystal/lib_c/aarch64-android/c/sys/mman.cr
+lib/crystal/lib_c/aarch64-android/c/sys/resource.cr
+lib/crystal/lib_c/aarch64-android/c/sys/select.cr
+lib/crystal/lib_c/aarch64-android/c/sys/socket.cr
+lib/crystal/lib_c/aarch64-android/c/sys/stat.cr
+lib/crystal/lib_c/aarch64-android/c/sys/syscall.cr
+lib/crystal/lib_c/aarch64-android/c/sys/system_properties.cr
+lib/crystal/lib_c/aarch64-android/c/sys/time.cr
+lib/crystal/lib_c/aarch64-android/c/sys/types.cr
+lib/crystal/lib_c/aarch64-android/c/sys/un.cr
+lib/crystal/lib_c/aarch64-android/c/sys/wait.cr
+lib/crystal/lib_c/aarch64-android/c/termios.cr
+lib/crystal/lib_c/aarch64-android/c/time.cr
+lib/crystal/lib_c/aarch64-android/c/unistd.cr
 lib/crystal/lib_c/aarch64-darwin/c/arpa/inet.cr
 lib/crystal/lib_c/aarch64-darwin/c/dirent.cr
 lib/crystal/lib_c/aarch64-darwin/c/dlfcn.cr
@@ -1043,6 +1089,7 @@ lib/crystal/lib_c/x86_64-windows-msvc/c/consoleapi.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/consoleapi2.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/corecrt.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/dbghelp.cr
+lib/crystal/lib_c/x86_64-windows-msvc/c/delayimp.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/direct.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/errhandlingapi.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/errno.cr
@@ -1050,6 +1097,7 @@ lib/crystal/lib_c/x86_64-windows-msvc/c/fcntl.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/fileapi.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/guiddef.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/handleapi.cr
+lib/crystal/lib_c/x86_64-windows-msvc/c/heapapi.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/in6addr.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/inaddr.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/int_safe.cr
@@ -1061,13 +1109,17 @@ lib/crystal/lib_c/x86_64-windows-msvc/c/malloc.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/memoryapi.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/minwinbase.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/mswsock.cr
+lib/crystal/lib_c/x86_64-windows-msvc/c/ntifs.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/ntsecapi.cr
+lib/crystal/lib_c/x86_64-windows-msvc/c/ntstatus.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/process.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/processenv.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/processthreadsapi.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/profileapi.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/regapix.cr
+lib/crystal/lib_c/x86_64-windows-msvc/c/sdkddkver.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/shlobj_core.cr
+lib/crystal/lib_c/x86_64-windows-msvc/c/signal.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/stdarg.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/stddef.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/stdint.cr
@@ -1081,9 +1133,12 @@ lib/crystal/lib_c/x86_64-windows-msvc/c/sys/types.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/sys/utime.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/sysinfoapi.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/timezoneapi.cr
+lib/crystal/lib_c/x86_64-windows-msvc/c/tlhelp32.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/win_def.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/winbase.cr
+lib/crystal/lib_c/x86_64-windows-msvc/c/wincrypt.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/windows.cr
+lib/crystal/lib_c/x86_64-windows-msvc/c/winioctl.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/winnls.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/winnt.cr
 lib/crystal/lib_c/x86_64-windows-msvc/c/winreg.cr
@@ -1257,6 +1312,7 @@ lib/crystal/spec/expectations.cr
 lib/crystal/spec/filters.cr
 lib/crystal/spec/formatter.cr
 lib/crystal/spec/helpers/iterate.cr
+lib/crystal/spec/helpers/string.cr
 lib/crystal/spec/item.cr
 lib/crystal/spec/junit_formatter.cr
 lib/crystal/spec/methods.cr
@@ -1316,7 +1372,6 @@ lib/crystal/va_list.cr
 lib/crystal/value.cr
 lib/crystal/wasi_error.cr
 lib/crystal/weak_ref.cr
-lib/crystal/windows_stubs.cr
 lib/crystal/winerror.cr
 lib/crystal/xml.cr
 lib/crystal/xml/attribute_type.cr