git: ed8cebcadf44 - main - lang/ldc: Update to 1.39.0

From: Gleb Popov <arrowd_at_FreeBSD.org>
Date: Fri, 09 Aug 2024 20:32:20 UTC
The branch main has been updated by arrowd:

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

commit ed8cebcadf44475110624c6fba367dff84e6909d
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2024-08-09 16:40:34 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2024-08-09 20:32:08 +0000

    lang/ldc: Update to 1.39.0
    
    Sponsored by:   Serenity Cybersecurity, LLC
    
    Pull Request:   https://github.com/freebsd/freebsd-ports/pull/290
---
 lang/ldc/Makefile                                  |  5 +---
 lang/ldc/distinfo                                  | 10 +++----
 lang/ldc/files/patch-driver_targetmachine.cpp      | 13 ---------
 lang/ldc/files/patch-runtime_CMakeLists.txt        | 11 --------
 ...-runtime_druntime_src_core_sys_freebsd_config.d | 16 -----------
 ...runtime_druntime_src_rt_sections__elf__shared.d | 17 ++++++------
 lang/ldc/pkg-plist                                 | 32 +++++++++++++++-------
 7 files changed, 37 insertions(+), 67 deletions(-)

diff --git a/lang/ldc/Makefile b/lang/ldc/Makefile
index 5add870b1557..371dec52a9ac 100644
--- a/lang/ldc/Makefile
+++ b/lang/ldc/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	ldc
-PORTVERSION=	1.35.0
+PORTVERSION=	1.39.0
 DISTVERSIONSUFFIX=	-src
 CATEGORIES=	lang
 MASTER_SITES=	https://github.com/ldc-developers/${PORTNAME}/releases/download/v${DISTVERSION}/
@@ -33,9 +33,6 @@ CMAKE_ARGS+=	-DLDC_INSTALL_PREFIX="${PREFIX}" \
 		-DBUILD_SHARED_LIBS="BOTH" \
 		-DBUILD_LTO_LIBS=ON
 
-post-patch:
-	cd ${WRKDIR}/ldc2-${PORTVERSION}-freebsd-x86_64/import && ${PATCH} -p3 < ${PATCHDIR}/patch-runtime_druntime_src_core_sys_freebsd_config.d
-
 post-install:
 	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/ldc-build-runtime
 	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/ldc-profdata
diff --git a/lang/ldc/distinfo b/lang/ldc/distinfo
index fa4d383fd740..f9533a2a1883 100644
--- a/lang/ldc/distinfo
+++ b/lang/ldc/distinfo
@@ -1,5 +1,5 @@
-TIMESTAMP = 1697911474
-SHA256 (ldc-1.35.0-src.tar.gz) = 6e296993706c76c093e609139aa0b3f8704355fa0f3756f6758d78d44226dfa0
-SIZE (ldc-1.35.0-src.tar.gz) = 8241960
-SHA256 (ldc2-1.35.0-freebsd-x86_64.tar.xz) = fdfd34380eba7a28dc2c3855e5582b56d67e90e2d5a649b682219a92445a8434
-SIZE (ldc2-1.35.0-freebsd-x86_64.tar.xz) = 18701992
+TIMESTAMP = 1723214216
+SHA256 (ldc-1.39.0-src.tar.gz) = 839bac36f6073318e36f0b163767e03bdbd3f57d99256b97494ac439b59a4562
+SIZE (ldc-1.39.0-src.tar.gz) = 8554301
+SHA256 (ldc2-1.39.0-freebsd-x86_64.tar.xz) = 82a09a754e69d1afe5741291b9162895f17d85f96bcf7b9c9a1d9bc076aec614
+SIZE (ldc2-1.39.0-freebsd-x86_64.tar.xz) = 18142140
diff --git a/lang/ldc/files/patch-driver_targetmachine.cpp b/lang/ldc/files/patch-driver_targetmachine.cpp
deleted file mode 100644
index fe4b0af6193a..000000000000
--- a/lang/ldc/files/patch-driver_targetmachine.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
---- driver/targetmachine.cpp.orig	2022-07-20 17:05:27 UTC
-+++ driver/targetmachine.cpp
-@@ -431,6 +431,10 @@ createTargetMachine(const std::string targetTriple, co
-       // these OSes.
-       // On Android, PIC is default as well.
-       relocModel = llvm::Reloc::PIC_;
-+    } else if (triple.isOSFreeBSD()) {
-+      // We default to PIC code to avoid linking issues on FreeBSD, especially
-+      // on aarch64.
-+      relocModel = llvm::Reloc::PIC_;
-     } else {
-       // ARM for other than Darwin or Android defaults to static
-       switch (triple.getArch()) {
diff --git a/lang/ldc/files/patch-runtime_CMakeLists.txt b/lang/ldc/files/patch-runtime_CMakeLists.txt
deleted file mode 100644
index 7461ce6ca1af..000000000000
--- a/lang/ldc/files/patch-runtime_CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
---- runtime/CMakeLists.txt.orig	2022-07-20 17:05:27 UTC
-+++ runtime/CMakeLists.txt
-@@ -123,6 +123,8 @@ if("${C_SYSTEM_LIBS}" STREQUAL "AUTO")
-             set(C_SYSTEM_LIBS m c)
-         elseif("${TARGET_SYSTEM}" MATCHES "Linux")
-             set(C_SYSTEM_LIBS m pthread rt dl)
-+	elseif("${TARGET_SYSTEM}" MATCHES "FreeBSD")
-+            set(C_SYSTEM_LIBS m pthread execinfo z)
-         else()
-             set(C_SYSTEM_LIBS m pthread)
-         endif()
diff --git a/lang/ldc/files/patch-runtime_druntime_src_core_sys_freebsd_config.d b/lang/ldc/files/patch-runtime_druntime_src_core_sys_freebsd_config.d
deleted file mode 100644
index 9568b56292e6..000000000000
--- a/lang/ldc/files/patch-runtime_druntime_src_core_sys_freebsd_config.d
+++ /dev/null
@@ -1,16 +0,0 @@
---- runtime/druntime/src/core/sys/freebsd/config.d.orig	2023-10-15 11:24:58 UTC
-+++ runtime/druntime/src/core/sys/freebsd/config.d
-@@ -14,9 +14,10 @@ public import core.sys.posix.config;
- // NOTE: When adding newer versions of FreeBSD, verify all current versioned
- // bindings are still compatible with the release.
- 
--     version (FreeBSD_14) enum __FreeBSD_version = 1400000;
--else version (FreeBSD_13) enum __FreeBSD_version = 1301000;
--else version (FreeBSD_12) enum __FreeBSD_version = 1203000;
-+     version (FreeBSD_15) enum __FreeBSD_version = 1500000;
-+else version (FreeBSD_14) enum __FreeBSD_version = 1400000;
-+else version (FreeBSD_13) enum __FreeBSD_version = 1302000;
-+else version (FreeBSD_12) enum __FreeBSD_version = 1204000;
- else version (FreeBSD_11) enum __FreeBSD_version = 1104000;
- else version (FreeBSD_10) enum __FreeBSD_version = 1004000;
- else version (FreeBSD_9)  enum __FreeBSD_version = 903000;
diff --git a/lang/ldc/files/patch-runtime_druntime_src_rt_sections__elf__shared.d b/lang/ldc/files/patch-runtime_druntime_src_rt_sections__elf__shared.d
index d70a8e4a14cd..d9c507772afe 100644
--- a/lang/ldc/files/patch-runtime_druntime_src_rt_sections__elf__shared.d
+++ b/lang/ldc/files/patch-runtime_druntime_src_rt_sections__elf__shared.d
@@ -1,9 +1,9 @@
---- runtime/druntime/src/rt/sections_elf_shared.d.orig	2022-11-21 16:37:34 UTC
+--- runtime/druntime/src/rt/sections_elf_shared.d.orig	2024-07-04 10:32:30 UTC
 +++ runtime/druntime/src/rt/sections_elf_shared.d
-@@ -1150,17 +1150,6 @@ else
- 
- version (LDC)
+@@ -1174,17 +1174,7 @@ version (LDC)
  {
+     version (Android) version (X86) version = Android_X86;
+ 
 -    version (PPC)
 -    {
 -        extern(C) void* __tls_get_addr_opt(tls_index* ti) nothrow @nogc;
@@ -14,7 +14,8 @@
 -        extern(C) void* __tls_get_addr_opt(tls_index* ti) nothrow @nogc;
 -        alias __tls_get_addr = __tls_get_addr_opt;
 -    }
--    else
-         extern(C) void* __tls_get_addr(tls_index* ti) nothrow @nogc;
- }
- else
+-    else version (Android_X86) // extra underscore
++    version (Android_X86) // extra underscore
+     {
+         extern(C) void* ___tls_get_addr(tls_index* ti) nothrow @nogc;
+         alias __tls_get_addr = ___tls_get_addr;
diff --git a/lang/ldc/pkg-plist b/lang/ldc/pkg-plist
index 54bfc08c7cca..b16533d7b1fc 100644
--- a/lang/ldc/pkg-plist
+++ b/lang/ldc/pkg-plist
@@ -1,12 +1,13 @@
 bin/ldc-build-plugin
 bin/ldc-build-runtime
 bin/ldc-profdata
+bin/ldc-profgen
 bin/ldc-prune-cache
 bin/ldc2
 bin/ldmd2
 bin/timetrace2txt
 etc/ldc2.conf
-include/d/__builtins.di
+include/d/__importc_builtins.di
 include/d/core/atomic.d
 include/d/core/attribute.d
 include/d/core/bitop.d
@@ -36,7 +37,6 @@ include/d/core/internal/atomic.d
 include/d/core/internal/attributes.d
 include/d/core/internal/backtrace/dwarf.d
 include/d/core/internal/backtrace/elf.d
-include/d/core/internal/backtrace/handler.d
 include/d/core/internal/backtrace/libunwind.d
 include/d/core/internal/backtrace/macho.d
 include/d/core/internal/backtrace/unwind.d
@@ -61,6 +61,7 @@ include/d/core/internal/gc/proxy.d
 include/d/core/internal/hash.d
 include/d/core/internal/lifetime.d
 include/d/core/internal/moving.d
+include/d/core/internal/newaa.d
 include/d/core/internal/parseoptions.d
 include/d/core/internal/postblit.d
 include/d/core/internal/qsort.d
@@ -73,6 +74,7 @@ include/d/core/internal/util/array.d
 include/d/core/internal/util/math.d
 include/d/core/internal/vararg/aarch64.d
 include/d/core/internal/vararg/sysv_x64.d
+include/d/core/interpolation.d
 include/d/core/lifetime.d
 include/d/core/math.d
 include/d/core/memory.d
@@ -91,6 +93,7 @@ include/d/core/stdc/locale.d
 include/d/core/stdc/math.d
 include/d/core/stdc/signal.d
 include/d/core/stdc/stdarg.d
+include/d/core/stdc/stdatomic.d
 include/d/core/stdc/stddef.d
 include/d/core/stdc/stdint.d
 include/d/core/stdc/stdio.d
@@ -175,6 +178,10 @@ include/d/core/sys/freebsd/config.d
 include/d/core/sys/freebsd/dlfcn.d
 include/d/core/sys/freebsd/err.d
 include/d/core/sys/freebsd/execinfo.d
+include/d/core/sys/freebsd/ifaddrs.d
+include/d/core/sys/freebsd/mqueue.d
+include/d/core/sys/freebsd/net/if_.d
+include/d/core/sys/freebsd/net/if_dl.d
 include/d/core/sys/freebsd/netinet/in_.d
 include/d/core/sys/freebsd/pthread_np.d
 include/d/core/sys/freebsd/stdlib.d
@@ -190,7 +197,9 @@ include/d/core/sys/freebsd/sys/event.d
 include/d/core/sys/freebsd/sys/link_elf.d
 include/d/core/sys/freebsd/sys/mman.d
 include/d/core/sys/freebsd/sys/mount.d
+include/d/core/sys/freebsd/sys/socket.d
 include/d/core/sys/freebsd/sys/sysctl.d
+include/d/core/sys/freebsd/sys/types.d
 include/d/core/sys/freebsd/time.d
 include/d/core/sys/freebsd/unistd.d
 include/d/core/sys/linux/config.d
@@ -207,6 +216,8 @@ include/d/core/sys/linux/input.d
 include/d/core/sys/linux/input_event_codes.d
 include/d/core/sys/linux/io_uring.d
 include/d/core/sys/linux/link.d
+include/d/core/sys/linux/linux/if_arp.d
+include/d/core/sys/linux/linux/if_packet.d
 include/d/core/sys/linux/netinet/in_.d
 include/d/core/sys/linux/netinet/tcp.d
 include/d/core/sys/linux/perf_event.d
@@ -218,6 +229,7 @@ include/d/core/sys/linux/sys/eventfd.d
 include/d/core/sys/linux/sys/file.d
 include/d/core/sys/linux/sys/inotify.d
 include/d/core/sys/linux/sys/mman.d
+include/d/core/sys/linux/sys/mount.d
 include/d/core/sys/linux/sys/prctl.d
 include/d/core/sys/linux/sys/procfs.d
 include/d/core/sys/linux/sys/signalfd.d
@@ -710,22 +722,22 @@ include/d/std/zip.d
 include/d/std/zlib.d
 lib/ldc_rt.dso.o
 lib/libdruntime-ldc-debug-shared.so
-lib/libdruntime-ldc-debug-shared.so.105
-lib/libdruntime-ldc-debug-shared.so.105.2
+lib/libdruntime-ldc-debug-shared.so.109
+lib/libdruntime-ldc-debug-shared.so.109.1
 lib/libdruntime-ldc-debug.a
 lib/libdruntime-ldc-lto.a
 lib/libdruntime-ldc-shared.so
-lib/libdruntime-ldc-shared.so.105
-lib/libdruntime-ldc-shared.so.105.2
+lib/libdruntime-ldc-shared.so.109
+lib/libdruntime-ldc-shared.so.109.1
 lib/libdruntime-ldc.a
 lib/libphobos2-ldc-debug-shared.so
-lib/libphobos2-ldc-debug-shared.so.105
-lib/libphobos2-ldc-debug-shared.so.105.2
+lib/libphobos2-ldc-debug-shared.so.109
+lib/libphobos2-ldc-debug-shared.so.109.1
 lib/libphobos2-ldc-debug.a
 lib/libphobos2-ldc-lto.a
 lib/libphobos2-ldc-shared.so
-lib/libphobos2-ldc-shared.so.105
-lib/libphobos2-ldc-shared.so.105.2
+lib/libphobos2-ldc-shared.so.109
+lib/libphobos2-ldc-shared.so.109.1
 lib/libphobos2-ldc.a
 @dir include/d/etc/c/zlib/doc
 @dir include/d/etc/c/zlib/test