1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

editors/imhex-current: Support {13,14}-stable after LLVM 18 import

This commit is contained in:
MANTANI Nobutaka 2024-04-21 14:07:51 +09:00
parent df78b322fb
commit 531219a012
2 changed files with 17 additions and 7 deletions

View File

@ -99,13 +99,17 @@ NLS_USES= gettext
.include <bsd.port.pre.mk>
.if (${OSVERSION} < 1302510) \
|| (${OSVERSION} >= 1400000 && ${OSVERSION} < 1400504)
# Before LLVM 17 import into the base system
.if (${OSVERSION} < 1302510 \
|| (${OSREL:R} == 14 && ${OSVERSION} < 1400504) \
|| (${OSREL:R} == 15 && ${OSVERSION} < 1500006))
IGNORE= requires libc++ of LLVM 17 on the base system
.endif
# After LLVM 18 import into the base system
.if (${OSVERSION} <= 1500018)
.if ((${OSREL:R} == 15 && ${OSVERSION} >= 1500018) \
|| (${OSREL:R} == 14 && ${OSVERSION} >= 1400511) \
|| (${OSREL:R} == 13 && ${OSVERSION} >= 1303503))
CXXFLAGS+= -fexperimental-library -D_LIBCPP_ENABLE_EXPERIMENTAL
.endif
@ -126,7 +130,10 @@ post-extract:
${CP} -R ${WRKSRC_imhex_patterns}/* ${WRKDIR}/.build/_deps/imhex_patterns_src
${CP} -R ${WRKDIR}/imhex-bastion-pats-${GL_TAG_IMHEX_BASTION_PATS}/* ${WRKDIR}/.build/_deps/imhex_patterns_src/patterns/bastion
${CP} -R ${WRKDIR}/imhex-ffx-pats-${GL_TAG_IMHEX_FFX_PATS}/* ${WRKDIR}/.build/_deps/imhex_patterns_src/patterns/ffx
.if (${OSVERSION} < 1500018)
# Before LLVM 18 import into the base system
.if ((${OSREL:R} == 15 && ${OSVERSION} < 1500018) \
|| (${OSREL:R} == 14 && ${OSVERSION} < 1400511) \
|| (${OSREL:R} == 13 && ${OSVERSION} < 1303503))
${CP} -R ${WRKSRC_jthread}/* ${WRKSRC}/lib/third_party/jthread
.endif

View File

@ -1,12 +1,15 @@
--- lib/third_party/jthread/includes/jthread.hpp.orig 2024-04-13 11:34:49 UTC
--- lib/third_party/jthread/includes/jthread.hpp.orig 2024-03-23 09:15:12 UTC
+++ lib/third_party/jthread/includes/jthread.hpp
@@ -1,6 +1,8 @@
@@ -1,6 +1,11 @@
#pragma once
-#if __cpp_lib_jthread >= 201911L
+#include <osreldate.h>
+
+#if __cpp_lib_jthread >= 201911L || __FreeBSD_version >= 1500018
+#if __cpp_lib_jthread >= 201911L \
+ || (__FreeBSD_version >= 1500000 && __FreeBSD_version >= 1500018) \
+ || (__FreeBSD_version >= 1400000 && __FreeBSD_version >= 1400511) \
+ || (__FreeBSD_version >= 1300000 && __FreeBSD_version >= 1303503)
#include <thread>
#else
#include "../jthread/source/jthread.hpp"