diff --git a/editors/imhex/Makefile b/editors/imhex/Makefile index 9fd3f62c983fa..5b24f85eada97 100644 --- a/editors/imhex/Makefile +++ b/editors/imhex/Makefile @@ -86,20 +86,34 @@ PORTDOCS= README.md OPTIONS_DEFINE= DOCS NLS NLS_USES= gettext +.include + +# Before LLVM 18 import into the base system +.if (${OSVERSION} < 1500018) +EXTRA_PATCHES= ${PATCHDIR}/extra-patch-lib_external_libwolv_libs_io_include_wolv_io_file.hpp \ + ${PATCHDIR}/extra-patch-plugins_windows_include_views_view__tty__console.hpp \ + ${PATCHDIR}/extra-patch-lib_libimhex_include_hex_api_task.hpp \ + ${PATCHDIR}/extra-patch-lib_libimhex_include_hex_api_content__registry.hpp +.else +CXXFLAGS+= -fexperimental-library -D_LIBCPP_ENABLE_EXPERIMENTAL +.endif + post-extract: ${CP} ${DISTDIR}/${DIST_SUBDIR}/xdg.hpp ${WRKSRC}/lib/external/xdgpp ${CP} -R ${WRKSRC_capstone}/* ${WRKSRC}/lib/external/capstone ${CP} -R ${WRKSRC_fmt}/* ${WRKSRC}/lib/external/fmt - ${CP} -R ${WRKSRC_jthread}/source/*.hpp ${WRKSRC}/lib/libimhex/include ${CP} -R ${WRKSRC_libromfs}/* ${WRKSRC}/lib/external/libromfs ${CP} -R ${WRKSRC_libwolv}/* ${WRKSRC}/lib/external/libwolv - ${CP} -R ${WRKSRC_jthread}/source/*.hpp ${WRKSRC}/lib/external/libwolv/libs/io/include/wolv/io ${CP} -R ${WRKSRC_nativefiledialog}/* ${WRKSRC}/lib/external/nativefiledialog ${CP} -R ${WRKSRC_pattern_language}/* ${WRKSRC}/lib/external/pattern_language ${CP} -R ${WRKSRC_cli11}/* ${WRKSRC}/lib/external/pattern_language/external/cli11 ${CP} -R ${WRKSRC_yara}/* ${WRKSRC}/lib/external/yara/yara ${MKDIR} ${WRKDIR}/.build/_deps/imhex_patterns_src ${CP} -R ${WRKSRC_imhex_patterns}/* ${WRKDIR}/.build/_deps/imhex_patterns_src +.if (${OSVERSION} < 1500018) + ${CP} -R ${WRKSRC_jthread}/source/*.hpp ${WRKSRC}/lib/libimhex/include + ${CP} -R ${WRKSRC_jthread}/source/*.hpp ${WRKSRC}/lib/external/libwolv/libs/io/include/wolv/io +.endif post-patch: ${CP} -R ${WRKSRC}/lib/external/libwolv/* ${WRKSRC}/lib/external/pattern_language/external/libwolv @@ -108,4 +122,4 @@ post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} -.include +.include diff --git a/editors/imhex/files/patch-lib_external_libwolv_libs_io_include_wolv_io_file.hpp b/editors/imhex/files/extra-patch-lib_external_libwolv_libs_io_include_wolv_io_file.hpp similarity index 100% rename from editors/imhex/files/patch-lib_external_libwolv_libs_io_include_wolv_io_file.hpp rename to editors/imhex/files/extra-patch-lib_external_libwolv_libs_io_include_wolv_io_file.hpp diff --git a/editors/imhex/files/patch-lib_libimhex_include_hex_api_content__registry.hpp b/editors/imhex/files/extra-patch-lib_libimhex_include_hex_api_content__registry.hpp similarity index 100% rename from editors/imhex/files/patch-lib_libimhex_include_hex_api_content__registry.hpp rename to editors/imhex/files/extra-patch-lib_libimhex_include_hex_api_content__registry.hpp diff --git a/editors/imhex/files/patch-lib_libimhex_include_hex_api_task.hpp b/editors/imhex/files/extra-patch-lib_libimhex_include_hex_api_task.hpp similarity index 100% rename from editors/imhex/files/patch-lib_libimhex_include_hex_api_task.hpp rename to editors/imhex/files/extra-patch-lib_libimhex_include_hex_api_task.hpp diff --git a/editors/imhex/files/patch-plugins_windows_include_views_view__tty__console.hpp b/editors/imhex/files/extra-patch-plugins_windows_include_views_view__tty__console.hpp similarity index 100% rename from editors/imhex/files/patch-plugins_windows_include_views_view__tty__console.hpp rename to editors/imhex/files/extra-patch-plugins_windows_include_views_view__tty__console.hpp