editors/imhex: Update to 1.36.2

- editors/imhex port is updated to the latest version. FreeBSD 13.3 came
  to EOL, and there is no need to keep the old version of ImHex due to
  the build issue caused by the old LLVM in the base system.
- The dependency on security/mbedtls is changed to security/mbedtls3 and
  the DEPRECATED mark is removed.
- editors/imhex-current port is removed because it is no longer needed.
This commit is contained in:
MANTANI Nobutaka 2025-01-02 21:25:55 +09:00
parent 7e91948bf2
commit 8f5997797f
50 changed files with 1462 additions and 2529 deletions

1
MOVED
View file

@ -3854,3 +3854,4 @@ comms/libconcord||2025-01-01|Has expired: Logitech Harmony were officially disco
japanese/onew||2025-01-01|Has expired: Unfetchabled and listed BROKEN for over year
lang/twelf||2025-01-01|Has expired: Dead upstream and fails to build
devel/py-codecov||2025-01-01|Has expired: Deprecated by upstream. On February 1, 2022 this uploader will be completely deprecated and will no longer be able to upload coverage to Codecov
editors/imhex-current||2025-01-02||Replaced with editors/imhex

View file

@ -65,7 +65,6 @@
SUBDIR += hnb
SUBDIR += hte
SUBDIR += imhex
SUBDIR += imhex-current
SUBDIR += jed
SUBDIR += jedit
SUBDIR += joe

View file

@ -1,154 +0,0 @@
PORTNAME= imhex
PORTVERSION= 1.35.4
DISTVERSIONPREFIX= v
CATEGORIES= editors
MASTER_SITES= https://git.sr.ht/~danyspin97/xdgpp/blob/f01f810714443d0f10c333d4d1d9c0383be41375/:xdg \
https://gitlab.com/EvelynTSMG/imhex-bastion-pats/-/archive/${GL_TAG_IMHEX_BASTION_PATS}/:bastion \
https://gitlab.com/EvelynTSMG/imhex-ffx-pats/-/archive/${GL_TAG_IMHEX_FFX_PATS}/:ffx
PKGNAMESUFFIX= -current
DISTFILES= xdg.hpp:xdg \
imhex-bastion-pats-${GL_TAG_IMHEX_BASTION_PATS}.tar.bz2:bastion \
imhex-ffx-pats-${GL_TAG_IMHEX_FFX_PATS}.tar.bz2:ffx
DIST_SUBDIR= imhex
MAINTAINER= nobutaka@FreeBSD.org
COMMENT= Hex editor for reverse engineers and programmers (current version)
WWW= https://github.com/WerWolv/ImHex
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/LICENSE
DEPRECATED= Depends on expired security/mbedtls
EXPIRATION_DATE=2025-03-31
NOT_FOR_ARCHS= i386 powerpc
NOT_FOR_ARCHS_REASON= __uint128_t and __int128_t are not supported
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} \
btzy-nativefiledialog-extended-${GH_TAG_NATIVEFILEDIALOG}_GH0${EXTRACT_SUFX} \
capstone-engine-capstone-${GH_TAG_CAPSTONE}_GH0${EXTRACT_SUFX} \
CLIUtils-CLI11-${GH_TAG_CLI11}_GH0${EXTRACT_SUFX} \
Martinsos-edlib-${GH_TAG_EDLIB}_GH0${EXTRACT_SUFX} \
fmtlib-fmt-${GH_TAG_FMT}_GH0${EXTRACT_SUFX} \
josuttis-jthread-${GH_TAG_JTHREAD}_GH0${EXTRACT_SUFX} \
rockdreamer-throwing_ptr-${GH_TAG_THROWING_PTR}_GH0${EXTRACT_SUFX} \
sammycage-lunasvg-${GH_TAG_LUNASVG}_GH0${EXTRACT_SUFX} \
VirusTotal-yara-${GH_TAG_YARA}_GH0${EXTRACT_SUFX} \
WerWolv-HashLibPlus-${GH_TAG_HASHLIBPLUS}_GH0${EXTRACT_SUFX} \
WerWolv-ImHex-Patterns-${GH_TAG_IMHEX_PATTERNS}_GH0${EXTRACT_SUFX} \
WerWolv-PatternLanguage-${GH_TAG_PATTERN_LANGUAGE}_GH0${EXTRACT_SUFX} \
WerWolv-libromfs-${GH_TAG_LIBROMFS}_GH0${EXTRACT_SUFX} \
WerWolv-libwolv-${GH_TAG_LIBWOLV}_GH0${EXTRACT_SUFX} \
imhex-bastion-pats-${GL_TAG_IMHEX_BASTION_PATS}.tar.bz2 \
imhex-ffx-pats-${GL_TAG_IMHEX_FFX_PATS}.tar.bz2
BUILD_DEPENDS= glm>0:math/glm
LIB_DEPENDS= libcurl.so:ftp/curl \
libglfw.so:graphics/glfw \
libfreetype.so:print/freetype2 \
libharfbuzz.so:print/harfbuzz \
libinotify.so:devel/libinotify \
libmbedtls.so:security/mbedtls \
libzstd.so:archivers/zstd
USES= cmake desktop-file-utils gl gnome pkgconfig python xorg
USE_GL= gl glu opengl
USE_GNOME= cairo gdkpixbuf2 gtk30
USE_XORG= x11 xcb xau xdmcp
USE_GITHUB= yes
CONFLICTS_INSTALL= imhex-1.30.*
GH_ACCOUNT= WerWolv
GH_PROJECT= ImHex
GH_TUPLE= btzy:nativefiledialog-extended:${GH_TAG_NATIVEFILEDIALOG}:nativefiledialog \
capstone-engine:capstone:${GH_TAG_CAPSTONE}:capstone \
CLIUtils:CLI11:${GH_TAG_CLI11}:cli11 \
Martinsos:edlib:${GH_TAG_EDLIB}:edlib \
fmtlib:fmt:${GH_TAG_FMT}:fmt \
josuttis:jthread:${GH_TAG_JTHREAD}:jthread \
rockdreamer:throwing_ptr:${GH_TAG_THROWING_PTR}:throwing_ptr \
sammycage:lunasvg:${GH_TAG_LUNASVG}:lunasvg \
VirusTotal:yara:${GH_TAG_YARA}:yara \
WerWolv:HashLibPlus:${GH_TAG_HASHLIBPLUS}:hashlibplus \
WerWolv:ImHex-Patterns:${GH_TAG_IMHEX_PATTERNS}:imhex_patterns \
WerWolv:PatternLanguage:${GH_TAG_PATTERN_LANGUAGE}:pattern_language \
WerWolv:libromfs:${GH_TAG_LIBROMFS}:libromfs \
WerWolv:libwolv:${GH_TAG_LIBWOLV}:libwolv \
GH_TAG_CAPSTONE= 097c04d
GH_TAG_CLI11= 6c7b07a
GH_TAG_EDLIB= 931be2b
GH_TAG_FMT= 0041a40
GH_TAG_HASHLIBPLUS= 1823dd1
GH_TAG_IMHEX_PATTERNS= ImHex-v1.35.4
GH_TAG_JTHREAD= 0fa8d39
GH_TAG_LIBROMFS= 03adcfd
GH_TAG_LIBWOLV= 0e3ba3a
GH_TAG_LUNASVG= 17b595a
GH_TAG_NATIVEFILEDIALOG= c099aae
GH_TAG_PATTERN_LANGUAGE= ImHex-v1.35.4
GH_TAG_THROWING_PTR= cd28490
GH_TAG_YARA= 0e5b6bb
GL_TAG_IMHEX_BASTION_PATS= e6deed4
GL_TAG_IMHEX_FFX_PATS= 199879e
CFLAGS+= -I${LOCALBASE}/include
CXXFLAGS+= -I${LOCALBASE}/include
CMAKE_ARGS= -DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_NLOHMANN_JSON=OFF \
-DIMHEX_STRIP_RELEASE=OFF -DIMHEX_PLUGINS_IN_SHARE=ON \
-DIMHEX_OFFLINE_BUILD=ON -DIMHEX_USE_GTK_FILE_PICKER=ON \
-DIMHEX_IGNORE_BAD_CLONE=ON -DIMHEX_IGNORE_BAD_COMPILER=ON
PORTDOCS= README.md
OPTIONS_DEFINE= DOCS NLS
NLS_USES= gettext
.include <bsd.port.pre.mk>
# Before LLVM 17 import into the base system
.if (${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 ((${OSREL:R} == 15 && ${OSVERSION} >= 1500018) \
|| (${OSREL:R} == 14 && ${OSVERSION} >= 1400511) \
|| (${OSREL:R} == 13 && ${OSVERSION} >= 1303503))
CXXFLAGS+= -fexperimental-library -D_LIBCPP_ENABLE_EXPERIMENTAL
.endif
post-extract:
${CP} -R ${WRKSRC_libromfs}/* ${WRKSRC}/lib/external/libromfs
${CP} -R ${WRKSRC_libwolv}/* ${WRKSRC}/lib/external/libwolv
${CP} -R ${WRKSRC_pattern_language}/* ${WRKSRC}/lib/external/pattern_language
${CP} -R ${WRKSRC_cli11}/* ${WRKSRC}/lib/external/pattern_language/external/cli11
${CP} -R ${WRKSRC_fmt}/* ${WRKSRC}/lib/external/pattern_language/external/fmt
${CP} -R ${WRKSRC_throwing_ptr}/* ${WRKSRC}/lib/external/pattern_language/external/throwing_ptr
${CP} ${DISTDIR}/${DIST_SUBDIR}/xdg.hpp ${WRKSRC}/lib/third_party/xdgpp
${CP} -R ${WRKSRC_capstone}/* ${WRKSRC}/lib/third_party/capstone
${CP} -R ${WRKSRC_edlib}/* ${WRKSRC}/lib/third_party/edlib
${CP} -R ${WRKSRC_fmt}/* ${WRKSRC}/lib/third_party/fmt
${CP} -R ${WRKSRC_hashlibplus}/* ${WRKSRC}/lib/third_party/HashLibPlus
${CP} -R ${WRKSRC_lunasvg}/* ${WRKSRC}/lib/third_party/lunasvg
${CP} -R ${WRKSRC_nativefiledialog}/* ${WRKSRC}/lib/third_party/nativefiledialog
${CP} -R ${WRKSRC_yara}/* ${WRKSRC}/lib/third_party/yara/yara
${MKDIR} ${WRKDIR}/.build/_deps/imhex_patterns_src
${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
# Before LLVM 18 import into the base system
.if ${OSREL:R} == 15 && ${OSVERSION} < 1500018
${CP} -R ${WRKSRC_jthread}/* ${WRKSRC}/lib/third_party/jthread
.endif
post-patch:
${CP} -R ${WRKSRC}/lib/external/libwolv/* ${WRKSRC}/lib/external/pattern_language/external/libwolv
post-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
.include <bsd.port.post.mk>

View file

@ -1,37 +0,0 @@
TIMESTAMP = 1720865428
SHA256 (imhex/xdg.hpp) = 2e08ce74adb71ff9b9aa9e1c999733fccd4b00967b9cf0c0e51dbf049392a9ec
SIZE (imhex/xdg.hpp) = 7674
SHA256 (imhex/imhex-bastion-pats-e6deed4.tar.bz2) = 841fe3fbaeb793dd1cab9f8f89221fb0458d50e0c3ebe304bc2f8da848a9857b
SIZE (imhex/imhex-bastion-pats-e6deed4.tar.bz2) = 3082
SHA256 (imhex/imhex-ffx-pats-199879e.tar.bz2) = 5aae96da3a37178edb66d9a9d414682a7409720d411bbc61490b63478313dd8c
SIZE (imhex/imhex-ffx-pats-199879e.tar.bz2) = 14884
SHA256 (imhex/WerWolv-ImHex-v1.35.4_GH0.tar.gz) = a768520d5acc2463da2b0153aeacfd73993923862949b3cd82dd463e948c4637
SIZE (imhex/WerWolv-ImHex-v1.35.4_GH0.tar.gz) = 9741848
SHA256 (imhex/btzy-nativefiledialog-extended-c099aae_GH0.tar.gz) = f1bca117f3c81dd38a67ad38056c4cc44be24da4bca5a2ac368906d99822b183
SIZE (imhex/btzy-nativefiledialog-extended-c099aae_GH0.tar.gz) = 426282
SHA256 (imhex/capstone-engine-capstone-097c04d_GH0.tar.gz) = b45d16ee7f0dc68b818a1f44005953f89f728736ef20beca4a7dd19d8a91056e
SIZE (imhex/capstone-engine-capstone-097c04d_GH0.tar.gz) = 7653892
SHA256 (imhex/CLIUtils-CLI11-6c7b07a_GH0.tar.gz) = a960d8d7ffec091d8ab129d64d2f80f2f5a95bb96bc086cbe0dd7897263d4a8b
SIZE (imhex/CLIUtils-CLI11-6c7b07a_GH0.tar.gz) = 343518
SHA256 (imhex/Martinsos-edlib-931be2b_GH0.tar.gz) = a854584bf06ac11d4166caea8112f0f188df3d7c86fc82d145ab50a2d16c84a8
SIZE (imhex/Martinsos-edlib-931be2b_GH0.tar.gz) = 4319124
SHA256 (imhex/fmtlib-fmt-0041a40_GH0.tar.gz) = a75dfc25d564638710009c3ef17e76e9c122f9cc56ffd22238059592753dc40f
SIZE (imhex/fmtlib-fmt-0041a40_GH0.tar.gz) = 698204
SHA256 (imhex/josuttis-jthread-0fa8d39_GH0.tar.gz) = ccd9c871dc2da9611e6d0cba5fc859cec9b233541be7501e5cef9eaa367e1280
SIZE (imhex/josuttis-jthread-0fa8d39_GH0.tar.gz) = 4450456
SHA256 (imhex/rockdreamer-throwing_ptr-cd28490_GH0.tar.gz) = acd6dd35d6f588d8fc036edb205e5abc577998be5481afcda7f24f80bd23451d
SIZE (imhex/rockdreamer-throwing_ptr-cd28490_GH0.tar.gz) = 60612
SHA256 (imhex/sammycage-lunasvg-17b595a_GH0.tar.gz) = 9395dcbf07e3ac4f1186008c49cbb2e5ebd3bdf91242bf3089ea1d7bf88cade1
SIZE (imhex/sammycage-lunasvg-17b595a_GH0.tar.gz) = 135795
SHA256 (imhex/VirusTotal-yara-0e5b6bb_GH0.tar.gz) = 1e4fb28aa0d4c713a394e605729d893906500c16528cf5f8cccc9b2af3054467
SIZE (imhex/VirusTotal-yara-0e5b6bb_GH0.tar.gz) = 2207527
SHA256 (imhex/WerWolv-HashLibPlus-1823dd1_GH0.tar.gz) = 885567a954b40421ab437fe7daa7bf9a09d87e76eed53ee2dd1c76e3ee90e8fb
SIZE (imhex/WerWolv-HashLibPlus-1823dd1_GH0.tar.gz) = 1200573
SHA256 (imhex/WerWolv-ImHex-Patterns-ImHex-v1.35.4_GH0.tar.gz) = 10df85b64b4c14945e43ad14b3ff95cda9ba23e47f4559b5429c2dc733fe23ed
SIZE (imhex/WerWolv-ImHex-Patterns-ImHex-v1.35.4_GH0.tar.gz) = 8212739
SHA256 (imhex/WerWolv-PatternLanguage-ImHex-v1.35.4_GH0.tar.gz) = b34d40966c37262a418bdae4a95f5ff768c322fa1609bc35d24a34a62358a533
SIZE (imhex/WerWolv-PatternLanguage-ImHex-v1.35.4_GH0.tar.gz) = 539032
SHA256 (imhex/WerWolv-libromfs-03adcfd_GH0.tar.gz) = a4a3612595eec04f29de86213a1feee92d369e973f7c4aa25b1274e5c134dc9e
SIZE (imhex/WerWolv-libromfs-03adcfd_GH0.tar.gz) = 5174
SHA256 (imhex/WerWolv-libwolv-0e3ba3a_GH0.tar.gz) = 6e70ff29c92bdbf97a48b620fca5c2eeab7bf52f463b70cd7c37d49ce0e65333
SIZE (imhex/WerWolv-libwolv-0e3ba3a_GH0.tar.gz) = 42435

View file

@ -1,28 +0,0 @@
--- cmake/build_helpers.cmake.orig 2024-06-03 20:22:33 UTC
+++ cmake/build_helpers.cmake
@@ -496,7 +496,11 @@ function(downloadImHexPatternsFiles dest)
# Maybe patterns are cloned to a subdirectory
if (NOT EXISTS ${imhex_patterns_SOURCE_DIR})
- set(imhex_patterns_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ImHex-Patterns")
+ if (BSD AND BSD STREQUAL "FreeBSD")
+ set(imhex_patterns_SOURCE_DIR "${CMAKE_BINARY_DIR}/_deps/imhex_patterns_src")
+ else()
+ set(imhex_patterns_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ImHex-Patterns")
+ endif()
endif()
# Or a sibling directory
@@ -525,7 +529,11 @@ function(downloadImHexPatternsFiles dest)
else()
set(PATTERNS_FOLDERS_TO_INSTALL constants encodings includes patterns magic nodes)
foreach (FOLDER ${PATTERNS_FOLDERS_TO_INSTALL})
- install(DIRECTORY "${imhex_patterns_SOURCE_DIR}/${FOLDER}" DESTINATION "${dest}" PATTERN "**/_schema.json" EXCLUDE)
+ if (BSD AND BSD STREQUAL "FreeBSD")
+ install(DIRECTORY "${imhex_patterns_SOURCE_DIR}/${FOLDER}" DESTINATION "share/imhex/" PATTERN "**/_schema.json" EXCLUDE)
+ else()
+ install(DIRECTORY "${imhex_patterns_SOURCE_DIR}/${FOLDER}" DESTINATION "${dest}" PATTERN "**/_schema.json" EXCLUDE)
+ endif()
endforeach ()
endif ()

View file

@ -1,14 +0,0 @@
ImHex is a hex editor for reverse engineers, programmers and people that value
their eye sight when working at 3 AM.
ImHex has many features including the following:
- Byte patching
- String and hex search
- Colorful highlighting
- Custom C++-like pattern language for parsing highlighting a file's content
- Data inspector allowing interpretation of data as many different types
(little and big endian)
- File hashing support
- Disassembler supporting many different architectures
- Bookmarks
- Data Analyzer

File diff suppressed because it is too large Load diff

View file

@ -1,10 +1,13 @@
PORTNAME= imhex
PORTVERSION= 1.30.1
PORTVERSION= 1.36.2
DISTVERSIONPREFIX= v
PORTREVISION= 2
CATEGORIES= editors
MASTER_SITES= https://git.sr.ht/~danyspin97/xdgpp/blob/f01f810714443d0f10c333d4d1d9c0383be41375/:xdg
DISTFILES= xdg.hpp:xdg
MASTER_SITES= https://git.sr.ht/~danyspin97/xdgpp/blob/f01f810714443d0f10c333d4d1d9c0383be41375/:xdg \
https://gitlab.com/EvelynTSMG/imhex-bastion-pats/-/archive/${GL_TAG_IMHEX_BASTION_PATS}/:bastion \
https://gitlab.com/EvelynTSMG/imhex-ffx-pats/-/archive/${GL_TAG_IMHEX_FFX_PATS}/:ffx
DISTFILES= xdg.hpp:xdg \
imhex-bastion-pats-${GL_TAG_IMHEX_BASTION_PATS}.tar.bz2:bastion \
imhex-ffx-pats-${GL_TAG_IMHEX_FFX_PATS}.tar.bz2:ffx
DIST_SUBDIR= imhex
MAINTAINER= nobutaka@FreeBSD.org
@ -14,75 +17,87 @@ WWW= https://github.com/WerWolv/ImHex
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/LICENSE
DEPRECATED= Depends on expired security/mbedtls
EXPIRATION_DATE=2025-03-31
NOT_FOR_ARCHS= i386 powerpc
NOT_FOR_ARCHS_REASON= __uint128_t and __int128_t are not supported
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} \
btzy-nativefiledialog-extended-${GH_TAG_NATIVEFILEDIALOG}_GH0${EXTRACT_SUFX} \
capstone-engine-capstone-${GH_TAG_CAPSTONE}_GH0${EXTRACT_SUFX} \
CLIUtils-CLI11-${GH_TAG_CLI11}_GH0${EXTRACT_SUFX} \
Martinsos-edlib-${GH_TAG_EDLIB}_GH0${EXTRACT_SUFX} \
fmtlib-fmt-${GH_TAG_FMT}_GH0${EXTRACT_SUFX} \
josuttis-jthread-${GH_TAG_JTHREAD}_GH0${EXTRACT_SUFX} \
rockdreamer-throwing_ptr-${GH_TAG_THROWING_PTR}_GH0${EXTRACT_SUFX} \
sammycage-plutovg-${GH_TAG_PLUTOVG}_GH0${EXTRACT_SUFX} \
VirusTotal-yara-${GH_TAG_YARA}_GH0${EXTRACT_SUFX} \
WerWolv-HashLibPlus-${GH_TAG_HASHLIBPLUS}_GH0${EXTRACT_SUFX} \
WerWolv-ImHex-Patterns-${GH_TAG_IMHEX_PATTERNS}_GH0${EXTRACT_SUFX} \
WerWolv-PatternLanguage-${GH_TAG_PATTERN_LANGUAGE}_GH0${EXTRACT_SUFX} \
WerWolv-libromfs-${GH_TAG_LIBROMFS}_GH0${EXTRACT_SUFX} \
WerWolv-libwolv-${GH_TAG_LIBWOLV}_GH0${EXTRACT_SUFX} \
WerWolv-ImHex-Patterns-${GH_TAG_IMHEX_PATTERNS}_GH0${EXTRACT_SUFX} \
WerWolv-PatternLanguage-${GH_TAG_PATTERN_LANGUAGE}_GH0${EXTRACT_SUFX}
WerWolv-lunasvg-${GH_TAG_LUNASVG}_GH0${EXTRACT_SUFX} \
imhex-bastion-pats-${GL_TAG_IMHEX_BASTION_PATS}.tar.bz2 \
imhex-ffx-pats-${GL_TAG_IMHEX_FFX_PATS}.tar.bz2
BUILD_DEPENDS= glm>0:math/glm \
nlohmann-json>0:devel/nlohmann-json \
${LOCALBASE}/include/hpx/functional.hpp:devel/hpx \
${LOCALBASE}/include/range/v3/range.hpp:devel/range-v3 \
${LOCALBASE}/include/tl/expected.hpp:devel/tl-expected
BUILD_DEPENDS= glm>0:math/glm
LIB_DEPENDS= libcurl.so:ftp/curl \
libglfw.so:graphics/glfw \
libfreetype.so:print/freetype2 \
libharfbuzz.so:print/harfbuzz \
libinotify.so:devel/libinotify \
libmbedtls.so:security/mbedtls \
libtre.so:textproc/libtre
liblz4.so:archivers/liblz4 \
libmbedtls.so:security/mbedtls3 \
libzstd.so:archivers/zstd
USES= cmake desktop-file-utils gl gnome llvm:min=16,build localbase pkgconfig python xorg
USE_GL= gl glu
USES= cmake desktop-file-utils gl gnome pkgconfig python xorg
USE_GL= gl glu opengl
USE_GNOME= cairo gdkpixbuf2 gtk30
USE_XORG= x11 xcb xau xdmcp
USE_GITHUB= yes
CONFLICTS_INSTALL= imhex-current-*
GH_ACCOUNT= WerWolv
GH_PROJECT= ImHex
GH_TUPLE= btzy:nativefiledialog-extended:${GH_TAG_NATIVEFILEDIALOG}:nativefiledialog \
capstone-engine:capstone:${GH_TAG_CAPSTONE}:capstone \
CLIUtils:CLI11:${GH_TAG_CLI11}:cli11 \
Martinsos:edlib:${GH_TAG_EDLIB}:edlib \
fmtlib:fmt:${GH_TAG_FMT}:fmt \
josuttis:jthread:${GH_TAG_JTHREAD}:jthread \
rockdreamer:throwing_ptr:${GH_TAG_THROWING_PTR}:throwing_ptr \
sammycage:plutovg:${GH_TAG_PLUTOVG}:plutovg \
VirusTotal:yara:${GH_TAG_YARA}:yara \
WerWolv:HashLibPlus:${GH_TAG_HASHLIBPLUS}:hashlibplus \
WerWolv:ImHex-Patterns:${GH_TAG_IMHEX_PATTERNS}:imhex_patterns \
WerWolv:PatternLanguage:${GH_TAG_PATTERN_LANGUAGE}:pattern_language \
WerWolv:libromfs:${GH_TAG_LIBROMFS}:libromfs \
WerWolv:libwolv:${GH_TAG_LIBWOLV}:libwolv \
WerWolv:lunasvg:${GH_TAG_LUNASVG}:lunasvg
GH_TAG_CAPSTONE= d5141c0
GH_TAG_CLI11= faea921
GH_TAG_FMT= a0b8a92
GH_TAG_IMHEX_PATTERNS= 759708d
GH_TAG_CAPSTONE= 5cca005
GH_TAG_CLI11= 6c7b07a
GH_TAG_EDLIB= 931be2b
GH_TAG_FMT= 0c9fce2
GH_TAG_HASHLIBPLUS= 1823dd1
GH_TAG_IMHEX_PATTERNS= ImHex-v${PORTVERSION}
GH_TAG_JTHREAD= 0fa8d39
GH_TAG_LIBROMFS= 80b9ade
GH_TAG_LIBWOLV= 128bed6
GH_TAG_NATIVEFILEDIALOG= 7909f55
GH_TAG_PATTERN_LANGUAGE= 57dc02b
GH_TAG_YARA= 96790e5
GH_TAG_LIBROMFS= 03adcfd
GH_TAG_LIBWOLV= b9d7f4a
GH_TAG_LUNASVG= 14df481
GH_TAG_NATIVEFILEDIALOG= 86d5f20
GH_TAG_PATTERN_LANGUAGE= ImHex-v${PORTVERSION}
GH_TAG_PLUTOVG= 9ef8e78
GH_TAG_THROWING_PTR= cd28490
GH_TAG_YARA= 688268d
CXXFLAGS+= -I${WRKSRC}/lib/external/pattern_language/generators/include \
-Wno-error=deprecated-declarations \
-Wno-error=literal-conversion
GL_TAG_IMHEX_BASTION_PATS= e6deed4
GL_TAG_IMHEX_FFX_PATS= 199879e
CMAKE_ARGS= -DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_NLOHMANN_JSON=ON \
CFLAGS+= -I${LOCALBASE}/include
CXXFLAGS+= -I${LOCALBASE}/include
CMAKE_ARGS= -DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_NLOHMANN_JSON=OFF \
-DIMHEX_STRIP_RELEASE=OFF -DIMHEX_PLUGINS_IN_SHARE=ON \
-DIMHEX_OFFLINE_BUILD=ON -DIMHEX_USE_GTK_FILE_PICKER=ON
-DIMHEX_OFFLINE_BUILD=ON -DIMHEX_USE_GTK_FILE_PICKER=ON \
-DIMHEX_IGNORE_BAD_CLONE=ON -DIMHEX_IGNORE_BAD_COMPILER=ON
PORTDOCS= README.md
@ -91,31 +106,41 @@ NLS_USES= gettext
.include <bsd.port.pre.mk>
# Before LLVM 18 import into the base system
.if ${OSREL:R} == 15 && ${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
# Before LLVM 17 import into the base system
.if (${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 ((${OSREL:R} == 15 && ${OSVERSION} >= 1500018) \
|| (${OSREL:R} == 14 && ${OSVERSION} >= 1400511) \
|| (${OSREL:R} == 13 && ${OSVERSION} >= 1303503))
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_libromfs}/* ${WRKSRC}/lib/external/libromfs
${CP} -R ${WRKSRC_libwolv}/* ${WRKSRC}/lib/external/libwolv
${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
${CP} -R ${WRKSRC_fmt}/* ${WRKSRC}/lib/external/pattern_language/external/fmt
${CP} -R ${WRKSRC_throwing_ptr}/* ${WRKSRC}/lib/external/pattern_language/external/throwing_ptr
${CP} ${DISTDIR}/${DIST_SUBDIR}/xdg.hpp ${WRKSRC}/lib/third_party/xdgpp
${CP} -R ${WRKSRC_capstone}/* ${WRKSRC}/lib/third_party/capstone
${CP} -R ${WRKSRC_edlib}/* ${WRKSRC}/lib/third_party/edlib
${CP} -R ${WRKSRC_fmt}/* ${WRKSRC}/lib/third_party/fmt
${CP} -R ${WRKSRC_hashlibplus}/* ${WRKSRC}/lib/third_party/HashLibPlus
${CP} -R ${WRKSRC_lunasvg}/* ${WRKSRC}/lib/third_party/lunasvg
${CP} -R ${WRKSRC_plutovg}/* ${WRKSRC}/lib/third_party/lunasvg/plutovg
${CP} -R ${WRKSRC_nativefiledialog}/* ${WRKSRC}/lib/third_party/nativefiledialog
${CP} -R ${WRKSRC_yara}/* ${WRKSRC}/lib/third_party/yara/yara
${MKDIR} ${WRKDIR}/.build/_deps/imhex_patterns_src
${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
# Before LLVM 18 import into the base system
.if ${OSREL:R} == 15 && ${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
${CP} -R ${WRKSRC_jthread}/* ${WRKSRC}/lib/third_party/jthread
.endif
post-patch:

View file

@ -1,25 +1,39 @@
TIMESTAMP = 1688829700
TIMESTAMP = 1735475156
SHA256 (imhex/xdg.hpp) = 2e08ce74adb71ff9b9aa9e1c999733fccd4b00967b9cf0c0e51dbf049392a9ec
SIZE (imhex/xdg.hpp) = 7674
SHA256 (imhex/WerWolv-ImHex-v1.30.1_GH0.tar.gz) = 8dee5bec767e96031a6949286107222716455fa4ece90e1276f2734bfc6f41ea
SIZE (imhex/WerWolv-ImHex-v1.30.1_GH0.tar.gz) = 11802597
SHA256 (imhex/btzy-nativefiledialog-extended-7909f55_GH0.tar.gz) = eb6c9376ab32dfa1b3f40f197f04d2d3dbe07c8555d57df3945121e843c98a97
SIZE (imhex/btzy-nativefiledialog-extended-7909f55_GH0.tar.gz) = 412738
SHA256 (imhex/capstone-engine-capstone-d5141c0_GH0.tar.gz) = 435d40757928fa73dec19c6d0fbf171bd76341391c8525ce1286927dab44c3e7
SIZE (imhex/capstone-engine-capstone-d5141c0_GH0.tar.gz) = 5761632
SHA256 (imhex/CLIUtils-CLI11-faea921_GH0.tar.gz) = 84773ee9577e6b719e5a84ad62cc381cf3027756690e1db839eaa50bcafc6c78
SIZE (imhex/CLIUtils-CLI11-faea921_GH0.tar.gz) = 299718
SHA256 (imhex/fmtlib-fmt-a0b8a92_GH0.tar.gz) = 370d03ac94a7ad90d3924667f83bd2bb08e3dc60df6263dc04492b4081a4b7e1
SIZE (imhex/fmtlib-fmt-a0b8a92_GH0.tar.gz) = 851621
SHA256 (imhex/imhex-bastion-pats-e6deed4.tar.bz2) = 841fe3fbaeb793dd1cab9f8f89221fb0458d50e0c3ebe304bc2f8da848a9857b
SIZE (imhex/imhex-bastion-pats-e6deed4.tar.bz2) = 3082
SHA256 (imhex/imhex-ffx-pats-199879e.tar.bz2) = 5aae96da3a37178edb66d9a9d414682a7409720d411bbc61490b63478313dd8c
SIZE (imhex/imhex-ffx-pats-199879e.tar.bz2) = 14884
SHA256 (imhex/WerWolv-ImHex-v1.36.2_GH0.tar.gz) = e9f567eab50b35f5324f9ce407c3d6607f9530c2af74313c014a0203eec14b76
SIZE (imhex/WerWolv-ImHex-v1.36.2_GH0.tar.gz) = 10054633
SHA256 (imhex/btzy-nativefiledialog-extended-86d5f20_GH0.tar.gz) = 4e5d8c35aca4f62d749674636ab488d55b90da009f80dbdbbde5cf9e048d82c0
SIZE (imhex/btzy-nativefiledialog-extended-86d5f20_GH0.tar.gz) = 426204
SHA256 (imhex/capstone-engine-capstone-5cca005_GH0.tar.gz) = 9ceb7806bf090518d2cbbcf85b1bc2c0488ea0729eb8cbf321427fd6816f8d0e
SIZE (imhex/capstone-engine-capstone-5cca005_GH0.tar.gz) = 7650652
SHA256 (imhex/CLIUtils-CLI11-6c7b07a_GH0.tar.gz) = a960d8d7ffec091d8ab129d64d2f80f2f5a95bb96bc086cbe0dd7897263d4a8b
SIZE (imhex/CLIUtils-CLI11-6c7b07a_GH0.tar.gz) = 343518
SHA256 (imhex/Martinsos-edlib-931be2b_GH0.tar.gz) = a854584bf06ac11d4166caea8112f0f188df3d7c86fc82d145ab50a2d16c84a8
SIZE (imhex/Martinsos-edlib-931be2b_GH0.tar.gz) = 4319124
SHA256 (imhex/fmtlib-fmt-0c9fce2_GH0.tar.gz) = dd7dd5ef9e4677e8466a3f939613d1f73876c511a9a1be4857fb62590c110ca3
SIZE (imhex/fmtlib-fmt-0c9fce2_GH0.tar.gz) = 701040
SHA256 (imhex/josuttis-jthread-0fa8d39_GH0.tar.gz) = ccd9c871dc2da9611e6d0cba5fc859cec9b233541be7501e5cef9eaa367e1280
SIZE (imhex/josuttis-jthread-0fa8d39_GH0.tar.gz) = 4450456
SHA256 (imhex/VirusTotal-yara-96790e5_GH0.tar.gz) = f58a3e8e7fa6bec3b5d8631d4bfbd48da801ebf4b5f8e1b26fea4a1115708a1c
SIZE (imhex/VirusTotal-yara-96790e5_GH0.tar.gz) = 2179144
SHA256 (imhex/WerWolv-ImHex-Patterns-759708d_GH0.tar.gz) = abc623f6441910bcfe05b6aadedbb8c82d2c192bd8706b5523a352e36f7ca6bd
SIZE (imhex/WerWolv-ImHex-Patterns-759708d_GH0.tar.gz) = 3377254
SHA256 (imhex/WerWolv-PatternLanguage-57dc02b_GH0.tar.gz) = 55d93dd36d776dc7a3d8085904ebe9fc3c2802d904616c4e8f1e79da3f8c49ae
SIZE (imhex/WerWolv-PatternLanguage-57dc02b_GH0.tar.gz) = 228358
SHA256 (imhex/WerWolv-libromfs-80b9ade_GH0.tar.gz) = 0825f9f80f62bc3c20e1b35efde0f224779402b313d31362537d5273fdee84a7
SIZE (imhex/WerWolv-libromfs-80b9ade_GH0.tar.gz) = 4527
SHA256 (imhex/WerWolv-libwolv-128bed6_GH0.tar.gz) = b1e023d17707d95feb01f2f161b18b95adbdf6f4cddf4d9be92dd481e0f96553
SIZE (imhex/WerWolv-libwolv-128bed6_GH0.tar.gz) = 29336
SHA256 (imhex/rockdreamer-throwing_ptr-cd28490_GH0.tar.gz) = acd6dd35d6f588d8fc036edb205e5abc577998be5481afcda7f24f80bd23451d
SIZE (imhex/rockdreamer-throwing_ptr-cd28490_GH0.tar.gz) = 60612
SHA256 (imhex/sammycage-plutovg-9ef8e78_GH0.tar.gz) = 84d4d24f2d0086a884b2a3c522601393f50c9ca4667abd8fa6e59f989b52bbd6
SIZE (imhex/sammycage-plutovg-9ef8e78_GH0.tar.gz) = 227976
SHA256 (imhex/VirusTotal-yara-688268d_GH0.tar.gz) = fa1b9596fca743e1576615477890705747269e36b9b6326d8ed245c2e5fb417c
SIZE (imhex/VirusTotal-yara-688268d_GH0.tar.gz) = 2208403
SHA256 (imhex/WerWolv-HashLibPlus-1823dd1_GH0.tar.gz) = 885567a954b40421ab437fe7daa7bf9a09d87e76eed53ee2dd1c76e3ee90e8fb
SIZE (imhex/WerWolv-HashLibPlus-1823dd1_GH0.tar.gz) = 1200573
SHA256 (imhex/WerWolv-ImHex-Patterns-ImHex-v1.36.2_GH0.tar.gz) = d1555d142347ddf576e5c0b1a19050ae168e8d174b206d269a9e84e07d2515c9
SIZE (imhex/WerWolv-ImHex-Patterns-ImHex-v1.36.2_GH0.tar.gz) = 13564417
SHA256 (imhex/WerWolv-PatternLanguage-ImHex-v1.36.2_GH0.tar.gz) = 560b2637767336f14321ade68ddb92b63cdd880b37a9e799b0e77b7aff580f1a
SIZE (imhex/WerWolv-PatternLanguage-ImHex-v1.36.2_GH0.tar.gz) = 548361
SHA256 (imhex/WerWolv-libromfs-03adcfd_GH0.tar.gz) = a4a3612595eec04f29de86213a1feee92d369e973f7c4aa25b1274e5c134dc9e
SIZE (imhex/WerWolv-libromfs-03adcfd_GH0.tar.gz) = 5174
SHA256 (imhex/WerWolv-libwolv-b9d7f4a_GH0.tar.gz) = bbc51ac3fcb579353f0da21254a7da9abd0651fb42577c10a9cfe8797b5a142d
SIZE (imhex/WerWolv-libwolv-b9d7f4a_GH0.tar.gz) = 43110
SHA256 (imhex/WerWolv-lunasvg-14df481_GH0.tar.gz) = 07eb4904de61e65f6b51ee229bc3ee622ebebbdb2652ea62c518fbbfccc4dffa
SIZE (imhex/WerWolv-lunasvg-14df481_GH0.tar.gz) = 53807

View file

@ -1,10 +0,0 @@
--- lib/external/libwolv/libs/io/include/wolv/io/file.hpp.orig 2023-05-21 12:25:30 UTC
+++ lib/external/libwolv/libs/io/include/wolv/io/file.hpp
@@ -10,6 +10,7 @@
#include <vector>
#include <sys/stat.h>
+#include "jthread.hpp"
#if defined(OS_MACOS)

View file

@ -1,10 +0,0 @@
--- lib/libimhex/include/hex/api/content_registry.hpp.orig 2023-05-21 12:30:36 UTC
+++ lib/libimhex/include/hex/api/content_registry.hpp
@@ -17,6 +17,7 @@
#include <vector>
#include <nlohmann/json_fwd.hpp>
+#include <jthread.hpp>
using ImGuiDataType = int;
using ImGuiInputTextFlags = int;

View file

@ -1,18 +0,0 @@
--- lib/libimhex/include/hex/api/task.hpp.orig 2022-10-08 08:03:47 UTC
+++ lib/libimhex/include/hex/api/task.hpp
@@ -1,6 +1,7 @@
#pragma once
#include <hex.hpp>
+#include <jthread.hpp>
#include <cstdio>
#include <thread>
@@ -11,6 +12,7 @@
#include <memory>
#include <list>
#include <condition_variable>
+#include <vector>
namespace hex {

View file

@ -1,10 +0,0 @@
--- plugins/windows/include/views/view_tty_console.hpp.orig 2022-10-15 14:50:11 UTC
+++ plugins/windows/include/views/view_tty_console.hpp
@@ -1,6 +1,7 @@
#pragma once
#include <hex/ui/view.hpp>
+#include <jthread.hpp>
#include <windows.h>

View file

@ -1,11 +0,0 @@
--- CMakeLists.txt.orig 2023-06-24 10:07:39 UTC
+++ CMakeLists.txt
@@ -29,8 +29,6 @@ project(imhex
# Make sure project is configured correctly
setDefaultBuiltTypeIfUnset()
-detectBadClone()
-verifyCompiler()
# List plugin names here. Project name must match folder name
set(PLUGINS

View file

@ -1,18 +1,28 @@
--- cmake/build_helpers.cmake.orig 2023-06-24 10:07:39 UTC
--- cmake/build_helpers.cmake.orig 2024-12-28 15:09:51 UTC
+++ cmake/build_helpers.cmake
@@ -392,13 +392,13 @@ function(downloadImHexPatternsFiles dest)
@@ -501,7 +501,11 @@ function(downloadImHexPatternsFiles dest)
else ()
# Maybe patterns are cloned to a subdirectory
if (NOT EXISTS ${imhex_patterns_SOURCE_DIR})
- set(imhex_patterns_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ImHex-Patterns")
+ if (BSD AND BSD STREQUAL "FreeBSD")
+ set(imhex_patterns_SOURCE_DIR "${CMAKE_BINARY_DIR}/_deps/imhex_patterns_src")
endif ()
+ else()
+ set(imhex_patterns_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ImHex-Patterns")
+ endif()
endif()
if (EXISTS ${imhex_patterns_SOURCE_DIR})
set(PATTERNS_FOLDERS_TO_INSTALL constants encodings includes patterns magic)
# Or a sibling directory
@@ -530,7 +534,11 @@ function(downloadImHexPatternsFiles dest)
else()
set(PATTERNS_FOLDERS_TO_INSTALL constants encodings includes patterns magic nodes)
foreach (FOLDER ${PATTERNS_FOLDERS_TO_INSTALL})
- install(DIRECTORY "${imhex_patterns_SOURCE_DIR}/${FOLDER}" DESTINATION ${dest} PATTERN "**/_schema.json" EXCLUDE)
- install(DIRECTORY "${imhex_patterns_SOURCE_DIR}/${FOLDER}" DESTINATION "${dest}" PATTERN "**/_schema.json" EXCLUDE)
+ if (BSD AND BSD STREQUAL "FreeBSD")
+ install(DIRECTORY "${imhex_patterns_SOURCE_DIR}/${FOLDER}" DESTINATION "share/imhex/" PATTERN "**/_schema.json" EXCLUDE)
+ else()
+ install(DIRECTORY "${imhex_patterns_SOURCE_DIR}/${FOLDER}" DESTINATION "${dest}" PATTERN "**/_schema.json" EXCLUDE)
+ endif()
endforeach ()
endif ()

View file

@ -1,21 +0,0 @@
--- lib/external/libwolv/libs/hash/include/wolv/hash/uuid.hpp.orig 2023-06-24 12:12:43 UTC
+++ lib/external/libwolv/libs/hash/include/wolv/hash/uuid.hpp
@@ -11,15 +11,15 @@ namespace wolv::hash {
std::random_device randomDevice;
std::mt19937 generator(randomDevice());
- std::uniform_int_distribution<char> distribution(0, 15);
+ std::uniform_int_distribution<int> distribution(0, 15);
std::string uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";
for (char &c : uuid) {
if (c == 'x') {
- c = distribution(generator);
+ c = static_cast<char>(distribution(generator));
c = c < 10 ? char('0' + c) : char('a' + c - 10);
} else if (c == 'y') {
- c = distribution(generator);
+ c = static_cast<char>(distribution(generator));
c = char(char(c & u8(0x03)) | char(0x08));
c = c < 10 ? char('0' + c) : char('a' + c - 10);
}

View file

@ -1,61 +0,0 @@
--- lib/external/libwolv/libs/io/source/io/file.cpp.orig 2023-07-09 11:32:49 UTC
+++ lib/external/libwolv/libs/io/source/io/file.cpp
@@ -39,12 +39,12 @@ namespace wolv::io {
#else
if (mode == File::Mode::Read)
- this->m_file = fopen64(util::toUTF8String(path).c_str(), "rb");
+ this->m_file = fopen(util::toUTF8String(path).c_str(), "rb");
else if (mode == File::Mode::Write)
- this->m_file = fopen64(util::toUTF8String(path).c_str(), "r+b");
+ this->m_file = fopen(util::toUTF8String(path).c_str(), "r+b");
if (mode == File::Mode::Create || (mode == File::Mode::Write && this->m_file == nullptr))
- this->m_file = fopen64(util::toUTF8String(path).c_str(), "w+b");
+ this->m_file = fopen(util::toUTF8String(path).c_str(), "w+b");
#endif
@@ -82,7 +82,7 @@ namespace wolv::io {
}
void File::seek(u64 offset) {
- fseeko64(this->m_file, offset, SEEK_SET);
+ fseeko(this->m_file, offset, SEEK_SET);
}
void File::close() {
@@ -114,8 +114,7 @@ namespace wolv::io {
auto fd = fileno(this->m_file);
auto size = getSize();
- this->m_map = reinterpret_cast<u8*>(mmap(nullptr, size, this->m_mode == Mode::Read ? PROT_READ : PROT_WRITE, MAP_SHARED, fd, 0));
-
+ this->m_map = reinterpret_cast<u8*>(mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0));
#endif
}
@@ -214,7 +213,7 @@ namespace wolv::io {
void File::setSize(u64 size) {
if (!isValid()) return;
- auto result = ftruncate64(fileno(this->m_file), size);
+ auto result = ftruncate(fileno(this->m_file), size);
util::unused(result);
this->updateSize();
}
@@ -225,10 +224,10 @@ namespace wolv::io {
return;
}
- auto startPos = ftello64(this->m_file);
- fseeko64(this->m_file, 0, SEEK_END);
- auto size = ftello64(this->m_file);
- fseeko64(this->m_file, startPos, SEEK_SET);
+ auto startPos = ftello(this->m_file);
+ fseeko(this->m_file, 0, SEEK_END);
+ auto size = ftello(this->m_file);
+ fseeko(this->m_file, startPos, SEEK_SET);
if (this->m_map != nullptr && size != this->m_fileSize) {
this->unmap();

View file

@ -1,4 +1,4 @@
--- lib/external/libwolv/libs/io/source/io/file_unix.cpp.orig 2024-06-15 11:20:54 UTC
--- lib/external/libwolv/libs/io/source/io/file_unix.cpp.orig 2024-12-29 08:49:46 UTC
+++ lib/external/libwolv/libs/io/source/io/file_unix.cpp
@@ -5,7 +5,7 @@
#include <unistd.h>
@ -9,7 +9,7 @@
#include <sys/types.h>
#include <sys/event.h>
#elif defined(OS_LINUX)
@@ -85,7 +85,11 @@ namespace wolv::io {
@@ -95,7 +95,11 @@ namespace wolv::io {
if (!isValid())
return false;
@ -18,10 +18,10 @@
+ #else
m_map = static_cast<u8*>(mmap(nullptr, m_fileSize, m_mode == Mode::Read ? PROT_READ : PROT_READ | PROT_WRITE, MAP_SHARED, m_handle, 0));
+ #endif
return true;
if (m_map == reinterpret_cast<void*>(-1)) {
m_openError = errno;
}
@@ -182,7 +186,7 @@ namespace wolv::io {
@@ -194,7 +198,7 @@ namespace wolv::io {
}

View file

@ -1,11 +0,0 @@
--- lib/external/libwolv/libs/io/source/io/fs.cpp.orig 2023-04-08 15:52:49 UTC
+++ lib/external/libwolv/libs/io/source/io/fs.cpp
@@ -15,7 +15,7 @@
#elif defined(OS_LINUX)
#include <unistd.h>
- #include <linux/limits.h>
+ #include <limits.h>
#endif

View file

@ -1,11 +0,0 @@
--- lib/external/libwolv/libs/net/include/wolv/net/common.hpp.orig 2023-07-09 14:37:57 UTC
+++ lib/external/libwolv/libs/net/include/wolv/net/common.hpp
@@ -16,6 +16,8 @@
#endif
+#include <iterator>
+
namespace wolv::net {
#if defined(OS_WINDOWS)

View file

@ -1,11 +0,0 @@
--- lib/external/pattern_language/lib/CMakeLists.txt.orig 2023-06-20 14:11:25 UTC
+++ lib/external/pattern_language/lib/CMakeLists.txt
@@ -69,7 +69,7 @@ add_library(libpl ${LIBRARY_TYPE}
)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
- target_compile_options(libpl PRIVATE -Wall -Wextra -Werror -Wpedantic -Wno-unknown-pragmas -Wno-array-bounds)
+ target_compile_options(libpl PRIVATE -Wall -Wextra -Werror -Wpedantic -Wno-unknown-pragmas -Wno-array-bounds -Wno-error=deprecated-declarations)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
target_compile_options(libpl PRIVATE -Wno-stringop-overflow)
endif()

View file

@ -1,15 +0,0 @@
--- lib/external/pattern_language/lib/include/pl/core/ast/ast_node.hpp.orig 2023-06-20 14:11:25 UTC
+++ lib/external/pattern_language/lib/include/pl/core/ast/ast_node.hpp
@@ -18,9 +18,9 @@ namespace pl::core::ast {
public:
using FunctionResult = std::optional<Token::Literal>;
- constexpr ASTNode() = default;
- constexpr virtual ~ASTNode() = default;
- constexpr ASTNode(const ASTNode &) = default;
+ ASTNode() = default;
+ virtual ~ASTNode() = default;
+ ASTNode(const ASTNode &) = default;
[[nodiscard]] u32 getLine() const;
[[nodiscard]] u32 getColumn() const;

View file

@ -1,10 +0,0 @@
--- lib/external/pattern_language/lib/include/pl/core/ast/ast_node_bitfield_field.hpp.orig 2023-07-09 14:52:20 UTC
+++ lib/external/pattern_language/lib/include/pl/core/ast/ast_node_bitfield_field.hpp
@@ -2,6 +2,7 @@
#include <pl/core/ast/ast_node.hpp>
#include <pl/core/ast/ast_node_attribute.hpp>
+#include <pl/core/ast/ast_node_type_decl.hpp>
#include <pl/patterns/pattern_bitfield.hpp>

View file

@ -1,38 +0,0 @@
--- lib/external/pattern_language/lib/include/pl/core/parser.hpp.orig 2023-05-21 11:04:34 UTC
+++ lib/external/pattern_language/lib/include/pl/core/parser.hpp
@@ -234,7 +234,7 @@ namespace pl::core {
else if constexpr (S == Not)
return false;
else
- std::unreachable();
+ __builtin_unreachable();
}
template<Setting S = Normal>
@@ -265,7 +265,7 @@ namespace pl::core {
partReset();
return false;
} else
- std::unreachable();
+ __builtin_unreachable();
}
template<Setting S = Normal>
@@ -280,7 +280,7 @@ namespace pl::core {
else if constexpr (S == Not)
return true;
else
- std::unreachable();
+ __builtin_unreachable();
}
template<Setting S = Normal>
@@ -290,7 +290,7 @@ namespace pl::core {
else if constexpr (S == Not)
return sequenceImpl<Not>(token) && oneOfImpl(args...);
else
- std::unreachable();
+ __builtin_unreachable();
}
template<Setting S = Normal>

View file

@ -1,20 +0,0 @@
--- lib/external/pattern_language/lib/include/pl/core/token.hpp.orig 2023-06-24 11:43:14 UTC
+++ lib/external/pattern_language/lib/include/pl/core/token.hpp
@@ -161,7 +161,7 @@ namespace pl::core {
bool global;
std::string comment;
- constexpr bool operator==(const DocComment &) const = default;
+ bool operator==(const DocComment &) const = default;
};
struct Literal : public std::variant<char, bool, u128, i128, double, std::string, std::shared_ptr<ptrn::Pattern>> {
@@ -189,7 +189,7 @@ namespace pl::core {
using ValueTypes = std::variant<Keyword, Identifier, Operator, Literal, ValueType, Separator, DocComment>;
- constexpr Token(Type type, auto value, u32 line, u32 column) : type(type), value(std::move(value)), line(line), column(column) {}
+ inline Token(Type type, auto value, u32 line, u32 column) : type(type), value(std::move(value)), line(line), column(column) {}
[[nodiscard]] constexpr static inline bool isInteger(const ValueType &type) {
return isUnsigned(type) || isSigned(type);

View file

@ -1,11 +0,0 @@
--- lib/external/pattern_language/lib/source/pl/lib/std/string.cpp.orig 2023-04-08 15:36:28 UTC
+++ lib/external/pattern_language/lib/source/pl/lib/std/string.cpp
@@ -35,7 +35,7 @@ namespace pl::lib::libstd::string {
const auto signIndex = index >> (sizeof(index) * 8 - 1);
const auto absIndex = (index ^ signIndex) - signIndex;
#else
- const auto absIndex = std::abs(index);
+ const auto absIndex = (unsigned long)std::abs((long)index);
#endif
if (absIndex > string.length())

View file

@ -1,8 +0,0 @@
--- lib/libimhex/CMakeLists.txt.orig 2023-06-24 10:07:39 UTC
+++ lib/libimhex/CMakeLists.txt
@@ -70,4 +70,4 @@ elseif (APPLE)
endif ()
target_link_libraries(libimhex PRIVATE ${FMT_LIBRARIES})
-target_link_libraries(libimhex PUBLIC dl imgui ${NFD_LIBRARIES} magic ${CAPSTONE_LIBRARIES} LLVMDemangle microtar ${NLOHMANN_JSON_LIBRARIES} ${YARA_LIBRARIES} ${LIBCURL_LIBRARIES} ${MBEDTLS_LIBRARIES} ${LIBBACKTRACE_LIBRARIES} libpl libpl-gen ${MINIAUDIO_LIBRARIES} libwolv-utils libwolv-io libwolv-hash libwolv-net libwolv-containers)
+target_link_libraries(libimhex PUBLIC dl imgui ${NFD_LIBRARIES} magic ${CAPSTONE_LIBRARIES} LLVMDemangle microtar ${NLOHMANN_JSON_LIBRARIES} ${YARA_LIBRARIES} ${LIBCURL_LIBRARIES} ${MBEDTLS_LIBRARIES} ${LIBBACKTRACE_LIBRARIES} libpl ${MINIAUDIO_LIBRARIES} libwolv-utils libwolv-io libwolv-hash libwolv-net libwolv-containers inotify)

View file

@ -1,10 +0,0 @@
--- lib/libimhex/include/hex/data_processor/node.hpp.orig 2023-04-04 10:04:22 UTC
+++ lib/libimhex/include/hex/data_processor/node.hpp
@@ -50,6 +50,7 @@ namespace hex::dp {
struct NodeError {
Node *node;
std::string message;
+ NodeError(Node *n, std::string m) : node(n), message(m) {};
};
void resetOutputData() {

View file

@ -1,26 +0,0 @@
--- lib/libimhex/include/hex/helpers/patches.hpp.orig 2023-02-13 15:24:10 UTC
+++ lib/libimhex/include/hex/helpers/patches.hpp
@@ -4,7 +4,7 @@
#include <map>
#include <vector>
-#include <expected>
+#include <tl/expected.hpp>
namespace hex {
@@ -18,9 +18,9 @@ namespace hex {
MissingEOF
};
- std::expected<std::vector<u8>, IPSError> generateIPSPatch(const Patches &patches);
- std::expected<std::vector<u8>, IPSError> generateIPS32Patch(const Patches &patches);
+ tl::expected<std::vector<u8>, IPSError> generateIPSPatch(const Patches &patches);
+ tl::expected<std::vector<u8>, IPSError> generateIPS32Patch(const Patches &patches);
- std::expected<Patches, IPSError> loadIPSPatch(const std::vector<u8> &ipsPatch);
- std::expected<Patches, IPSError> loadIPS32Patch(const std::vector<u8> &ipsPatch);
+ tl::expected<Patches, IPSError> loadIPSPatch(const std::vector<u8> &ipsPatch);
+ tl::expected<Patches, IPSError> loadIPS32Patch(const std::vector<u8> &ipsPatch);
}
\ No newline at end of file

View file

@ -1,19 +0,0 @@
--- lib/libimhex/source/api/imhex_api.cpp.orig 2023-06-24 10:07:39 UTC
+++ lib/libimhex/source/api/imhex_api.cpp
@@ -8,6 +8,7 @@
#include <wolv/io/file.hpp>
+#include <range/v3/algorithm.hpp>
#include <utility>
#include <unistd.h>
@@ -269,7 +270,7 @@ namespace hex {
}
bool isDirty() {
- return std::ranges::any_of(s_providers, [](const auto &provider) {
+ return ranges::any_of(s_providers, [](const auto &provider) {
return provider->isDirty();
});
}

View file

@ -1,27 +0,0 @@
--- lib/libimhex/source/helpers/fs.cpp.orig 2023-06-24 10:07:39 UTC
+++ lib/libimhex/source/helpers/fs.cpp
@@ -12,10 +12,15 @@
#include <shlobj.h>
#elif defined(OS_LINUX)
#include <xdg.hpp>
+# if defined(__FreeBSD__)
+ #include <sys/syslimits.h>
+# else
#include <linux/limits.h>
+# endif
#endif
#include <algorithm>
+#include <array>
#include <filesystem>
#include <wolv/io/file.hpp>
@@ -120,7 +125,7 @@ namespace hex::fs {
result = NFD::PickFolder(outPath, defaultPath.empty() ? nullptr : defaultPath.c_str());
break;
default:
- std::unreachable();
+ __builtin_unreachable();
}
if (result == NFD_OKAY){

View file

@ -1,126 +0,0 @@
--- lib/libimhex/source/helpers/patches.cpp.orig 2023-02-13 15:36:19 UTC
+++ lib/libimhex/source/helpers/patches.cpp
@@ -18,7 +18,7 @@ namespace hex {
std::memcpy((&buffer.back() - sizeof(T)) + 1, &bytes, sizeof(T));
}
- std::expected<std::vector<u8>, IPSError> generateIPSPatch(const Patches &patches) {
+ tl::expected<std::vector<u8>, IPSError> generateIPSPatch(const Patches &patches) {
std::vector<u8> result;
pushStringBack(result, "PATCH");
@@ -43,9 +43,9 @@ namespace hex {
bytes.push_back(values[i]);
if (bytes.size() > 0xFFFF)
- return std::unexpected(IPSError::PatchTooLarge);
+ return tl::unexpected(IPSError::PatchTooLarge);
if (startAddress > 0xFFFF'FFFF)
- return std::unexpected(IPSError::AddressOutOfRange);
+ return tl::unexpected(IPSError::AddressOutOfRange);
u32 address = startAddress.value();
auto addressBytes = reinterpret_cast<u8 *>(&address);
@@ -68,7 +68,7 @@ namespace hex {
return result;
}
- std::expected<std::vector<u8>, IPSError> generateIPS32Patch(const Patches &patches) {
+ tl::expected<std::vector<u8>, IPSError> generateIPS32Patch(const Patches &patches) {
std::vector<u8> result;
pushStringBack(result, "IPS32");
@@ -93,9 +93,9 @@ namespace hex {
bytes.push_back(values[i]);
if (bytes.size() > 0xFFFF)
- return std::unexpected(IPSError::PatchTooLarge);
+ return tl::unexpected(IPSError::PatchTooLarge);
if (startAddress > 0xFFFF'FFFF)
- return std::unexpected(IPSError::AddressOutOfRange);
+ return tl::unexpected(IPSError::AddressOutOfRange);
u32 address = startAddress.value();
auto addressBytes = reinterpret_cast<u8 *>(&address);
@@ -119,12 +119,12 @@ namespace hex {
return result;
}
- std::expected<Patches, IPSError> loadIPSPatch(const std::vector<u8> &ipsPatch) {
+ tl::expected<Patches, IPSError> loadIPSPatch(const std::vector<u8> &ipsPatch) {
if (ipsPatch.size() < (5 + 3))
- return std::unexpected(IPSError::InvalidPatchHeader);
+ return tl::unexpected(IPSError::InvalidPatchHeader);
if (std::memcmp(ipsPatch.data(), "PATCH", 5) != 0)
- return std::unexpected(IPSError::InvalidPatchHeader);
+ return tl::unexpected(IPSError::InvalidPatchHeader);
Patches result;
bool foundEOF = false;
@@ -139,7 +139,7 @@ namespace hex {
// Handle normal record
if (size > 0x0000) {
if (ipsOffset + size > ipsPatch.size() - 3)
- return std::unexpected(IPSError::InvalidPatchFormat);
+ return tl::unexpected(IPSError::InvalidPatchFormat);
for (u16 i = 0; i < size; i++)
result[offset + i] = ipsPatch[ipsOffset + i];
@@ -148,7 +148,7 @@ namespace hex {
// Handle RLE record
else {
if (ipsOffset + 3 > ipsPatch.size() - 3)
- return std::unexpected(IPSError::InvalidPatchFormat);
+ return tl::unexpected(IPSError::InvalidPatchFormat);
u16 rleSize = ipsPatch[ipsOffset + 0] | (ipsPatch[ipsOffset + 1] << 8);
@@ -167,15 +167,15 @@ namespace hex {
if (foundEOF)
return result;
else
- return std::unexpected(IPSError::MissingEOF);
+ return tl::unexpected(IPSError::MissingEOF);
}
- std::expected<Patches, IPSError> loadIPS32Patch(const std::vector<u8> &ipsPatch) {
+ tl::expected<Patches, IPSError> loadIPS32Patch(const std::vector<u8> &ipsPatch) {
if (ipsPatch.size() < (5 + 4))
- return std::unexpected(IPSError::InvalidPatchHeader);
+ return tl::unexpected(IPSError::InvalidPatchHeader);
if (std::memcmp(ipsPatch.data(), "IPS32", 5) != 0)
- return std::unexpected(IPSError::InvalidPatchHeader);
+ return tl::unexpected(IPSError::InvalidPatchHeader);
Patches result;
bool foundEEOF = false;
@@ -190,7 +190,7 @@ namespace hex {
// Handle normal record
if (size > 0x0000) {
if (ipsOffset + size > ipsPatch.size() - 3)
- return std::unexpected(IPSError::InvalidPatchFormat);
+ return tl::unexpected(IPSError::InvalidPatchFormat);
for (u16 i = 0; i < size; i++)
result[offset + i] = ipsPatch[ipsOffset + i];
@@ -199,7 +199,7 @@ namespace hex {
// Handle RLE record
else {
if (ipsOffset + 3 > ipsPatch.size() - 3)
- return std::unexpected(IPSError::InvalidPatchFormat);
+ return tl::unexpected(IPSError::InvalidPatchFormat);
u16 rleSize = ipsPatch[ipsOffset + 0] | (ipsPatch[ipsOffset + 1] << 8);
@@ -218,7 +218,7 @@ namespace hex {
if (foundEEOF)
return result;
else
- return std::unexpected(IPSError::MissingEOF);
+ return tl::unexpected(IPSError::MissingEOF);
}
}
\ No newline at end of file

View file

@ -1,11 +0,0 @@
--- lib/libimhex/source/helpers/stacktrace.cpp.orig 2023-06-24 11:58:12 UTC
+++ lib/libimhex/source/helpers/stacktrace.cpp
@@ -119,7 +119,7 @@
auto count = backtrace(addresses.data(), addresses.size());
auto functions = backtrace_symbols(addresses.data(), count);
- for (i32 i = 0; i < count; i++)
+ for (size_t i = 0; i < count; i++)
result.push_back(StackFrame { "", functions[i], 0 });
return result;

View file

@ -1,4 +1,4 @@
--- lib/third_party/jthread/includes/jthread.hpp.orig 2024-03-23 09:15:12 UTC
--- lib/third_party/jthread/includes/jthread.hpp.orig 2024-12-28 15:09:51 UTC
+++ lib/third_party/jthread/includes/jthread.hpp
@@ -1,6 +1,11 @@
#pragma once
@ -12,4 +12,4 @@
+ || (__FreeBSD_version >= 1300000 && __FreeBSD_version >= 1303503)
#include <thread>
#else
#include "../jthread/source/jthread.hpp"
#define __stop_callback_base __stop_callback_base_j

View file

@ -1,11 +0,0 @@
--- main/CMakeLists.txt.orig 2023-06-24 10:07:39 UTC
+++ main/CMakeLists.txt
@@ -31,7 +31,7 @@ set_target_properties(main PROPERTIES
add_compile_definitions(IMHEX_PROJECT_NAME="${PROJECT_NAME}")
-target_link_libraries(main PRIVATE libromfs-imhex libimhex ${FMT_LIBRARIES})
+target_link_libraries(main PRIVATE libromfs-imhex libimhex ${FMT_LIBRARIES} execinfo)
if (WIN32)
target_link_libraries(main PRIVATE usp10 wsock32 ws2_32 Dwmapi.lib)
else ()

View file

@ -1,38 +0,0 @@
--- main/source/window/linux_window.cpp.orig 2023-07-08 16:57:04 UTC
+++ main/source/window/linux_window.cpp
@@ -19,8 +19,26 @@
#include <imgui_impl_glfw.h>
#include <string.h>
#include <ranges>
+ #include <string_view>
+ #include <sstream>
namespace hex {
+ // Brought from lib/external/pattern_language/external/cli11/include/CLI/impl/StringTools_inl.hpp
+ std::vector<std::string> split(const std::string &s, char delim) {
+ std::vector<std::string> elems;
+ // Check to see if empty string, give consistent result
+ if(s.empty()) {
+ elems.emplace_back();
+ } else {
+ std::stringstream ss;
+ ss.str(s);
+ std::string item;
+ while(std::getline(ss, item, delim)) {
+ elems.push_back(item);
+ }
+ }
+ return elems;
+ }
bool isFileInPath(const std::fs::path &filename) {
auto optPathVar = hex::getEnvironmentVariable("PATH");
@@ -29,7 +47,7 @@ namespace hex {
return false;
}
- for (auto dir : std::views::split(optPathVar.value(), ':')) {
+ for (auto dir : split(optPathVar.value(), ':')) {
if (std::fs::exists(std::fs::path(std::string_view(dir)) / filename)) {
return true;
}

View file

@ -1,11 +0,0 @@
--- main/source/window/window.cpp.orig 2023-06-24 10:07:39 UTC
+++ main/source/window/window.cpp
@@ -220,7 +220,7 @@ namespace hex {
}
}
- static void createNestedMenu(std::span<const std::string> menuItems, const Shortcut &shortcut, const std::function<void()> &callback, const std::function<bool()> &enabledCallback) {
+ static void createNestedMenu(const std::vector<std::string> &menuItems, const Shortcut &shortcut, const std::function<void()> &callback, const std::function<bool()> &enabledCallback) {
const auto &name = menuItems.front();
if (name == ContentRegistry::Interface::impl::SeparatorValue) {

View file

@ -1,19 +0,0 @@
--- plugins/builtin/include/content/views/view_pattern_editor.hpp.orig 2023-06-24 14:40:57 UTC
+++ plugins/builtin/include/content/views/view_pattern_editor.hpp
@@ -19,6 +19,7 @@
#include <thread>
#include <vector>
#include <functional>
+#include <hpx/functional.hpp>
#include <TextEditor.h>
@@ -151,7 +152,7 @@ namespace hex::plugin::builtin {
bool m_syncPatternSourceCode = false;
bool m_autoLoadPatterns = true;
- std::map<prv::Provider*, std::move_only_function<void()>> m_sectionWindowDrawer;
+ std::map<prv::Provider*, hpx::move_only_function<void()>> m_sectionWindowDrawer;
ui::HexEditor m_sectionHexEditor;

View file

@ -1,11 +0,0 @@
--- plugins/builtin/source/content/command_palette_commands.cpp.orig 2023-04-08 16:49:33 UTC
+++ plugins/builtin/source/content/command_palette_commands.cpp
@@ -69,7 +69,7 @@ namespace hex::plugin::builtin {
if (auto combined = wolv::util::combineStrings(names, " -> "); hex::containsIgnoreCase(combined, input) && !combined.contains(ContentRegistry::Interface::impl::SeparatorValue) && !combined.contains(ContentRegistry::Interface::impl::SubMenuValue)) {
result.emplace_back(ContentRegistry::CommandPaletteCommands::impl::QueryResult {
std::move(combined),
- [entry](const auto&) { entry.callback(); }
+ [entry=entry](const auto&) { entry.callback(); }
});
}
}

View file

@ -1,20 +0,0 @@
--- plugins/builtin/source/content/data_inspector.cpp.orig 2023-04-04 10:04:22 UTC
+++ plugins/builtin/source/content/data_inspector.cpp
@@ -105,7 +105,7 @@ namespace hex::plugin::builtin {
bool negative = number < 0;
- return hex::format(format, negative ? "-" : "", std::abs(number));
+ return hex::format(format, negative ? "-" : "", std::abs((long)number));
}
template<std::integral T, size_t Size = sizeof(T)>
@@ -277,7 +277,7 @@ namespace hex::plugin::builtin {
auto number = hex::crypt::decodeSleb128(buffer);
bool negative = number < 0;
- auto value = hex::format(format, negative ? "-" : "", std::abs(number));
+ auto value = hex::format(format, negative ? "-" : "", std::abs((long)number));
return [value] { ImGui::TextUnformatted(value.c_str()); return value; };
},

View file

@ -1,15 +0,0 @@
--- plugins/builtin/source/content/helpers/math_evaluator.cpp.orig 2022-10-12 10:48:50 UTC
+++ plugins/builtin/source/content/helpers/math_evaluator.cpp
@@ -434,9 +434,9 @@ namespace hex {
template<typename T>
void MathEvaluator<T>::registerStandardVariables() {
this->setVariable("ans", 0);
- this->setVariable("pi", std::numbers::pi, true);
- this->setVariable("e", std::numbers::e, true);
- this->setVariable("phi", std::numbers::phi, true);
+ this->setVariable("pi", 3.141592653589793238462643383279502884L, true);
+ this->setVariable("e", 2.718281828459045235360287471352662498L, true);
+ this->setVariable("phi", 1.618033988749894848204586834365638117L, true);
}
template<typename T>

View file

@ -1,31 +0,0 @@
--- plugins/builtin/source/content/pl_visualizers.cpp.orig 2023-06-24 10:07:39 UTC
+++ plugins/builtin/source/content/pl_visualizers.cpp
@@ -307,11 +307,11 @@ namespace hex::plugin::builtin {
ImGui::TableNextColumn();
ImGui::TextUnformatted("hex.builtin.pl_visualizer.3d.rotation"_lang);
- ImGui::VSliderFloat("##X", ImVec2(18_scaled, textureSize.y), &rotation.data()[0], 0, std::numbers::pi * 2, "", ImGuiSliderFlags_AlwaysClamp);
+ ImGui::VSliderFloat("##X", ImVec2(18_scaled, textureSize.y), &rotation.data()[0], 0, 3.141592653589793238462643383279502884L * 2, "", ImGuiSliderFlags_AlwaysClamp);
ImGui::SameLine();
- ImGui::VSliderFloat("##Y", ImVec2(18_scaled, textureSize.y), &rotation.data()[1], 0, std::numbers::pi * 2, "", ImGuiSliderFlags_AlwaysClamp);
+ ImGui::VSliderFloat("##Y", ImVec2(18_scaled, textureSize.y), &rotation.data()[1], 0, 3.141592653589793238462643383279502884L * 2, "", ImGuiSliderFlags_AlwaysClamp);
ImGui::SameLine();
- ImGui::VSliderFloat("##Z", ImVec2(18_scaled, textureSize.y), &rotation.data()[2], 0, std::numbers::pi * 2, "", ImGuiSliderFlags_AlwaysClamp);
+ ImGui::VSliderFloat("##Z", ImVec2(18_scaled, textureSize.y), &rotation.data()[2], 0, 3.141592653589793238462643383279502884L * 2, "", ImGuiSliderFlags_AlwaysClamp);
ImGui::TableNextRow();
ImGui::TableNextColumn();
@@ -323,10 +323,10 @@ namespace hex::plugin::builtin {
ImGui::PopItemWidth();
for (u8 i = 0; i < 3; i++) {
- while (rotation.data()[i] > std::numbers::pi * 2)
- rotation.data()[i] -= std::numbers::pi * 2;
+ while (rotation.data()[i] > 3.141592653589793238462643383279502884L * 2)
+ rotation.data()[i] -= 3.141592653589793238462643383279502884L * 2;
while (rotation.data()[i] < 0)
- rotation.data()[i] += std::numbers::pi * 2;
+ rotation.data()[i] += 3.141592653589793238462643383279502884L * 2;
}
ImGui::TableNextColumn();

View file

@ -1,11 +0,0 @@
--- plugins/builtin/source/content/providers/disk_provider.cpp.orig 2023-04-04 10:04:22 UTC
+++ plugins/builtin/source/content/providers/disk_provider.cpp
@@ -24,7 +24,7 @@
#include <sys/types.h>
#endif
-#if defined(OS_LINUX)
+#if !defined(__FreeBSD__)
#define lseek lseek64
#endif

View file

@ -1,25 +0,0 @@
--- plugins/builtin/source/content/tools_entries.cpp.orig 2023-05-21 08:44:41 UTC
+++ plugins/builtin/source/content/tools_entries.cpp
@@ -1501,9 +1501,6 @@ namespace hex::plugin::builtin {
enum class InputType { infinity, notANumber, quietNotANumber, signalingNotANumber, regular, invalid };
std::string specialNumbers[] = {"inf", "Inf", "INF", "nan", "Nan", "NAN", "qnan", "Qnan", "QNAN", "snan", "Snan", "SNAN"};
- // We allow any input in order to accept infinities and NaNs, all invalid entries
- // are detected by from_chars. You can also enter -0 or -inf.
- std::from_chars_result res;
if (ImGui::InputText("##resultFloat", decimalFloatingPointNumberString, flags)) {
// Always obtain sign first.
if (decimalFloatingPointNumberString[0] == '-') {
@@ -1531,11 +1528,7 @@ namespace hex::plugin::builtin {
if (inputType == InputType::regular) {
decimalStrView = decimalFloatingPointNumberString;
- res = std::from_chars(decimalStrView.data(), decimalStrView.data() + decimalStrView.size(), resultFloat);
- // this is why we use from_chars
- if (res.ec != std::errc()) {
- inputType = InputType::invalid;
- }
+ resultFloat = std::strtold(decimalStrView.data(), nullptr);
} else if (inputType == InputType::infinity) {
resultFloat = std::numeric_limits<long double>::infinity();
resultFloat *= (signBits == 1 ? -1 : 1);

View file

@ -1,20 +0,0 @@
--- plugins/builtin/source/content/views/view_find.cpp.orig 2023-06-24 10:07:39 UTC
+++ plugins/builtin/source/content/views/view_find.cpp
@@ -265,7 +265,7 @@ namespace hex::plugin::builtin {
while (true) {
task.update(progress);
- occurrence = std::search(reader.begin(), reader.end(), std::boyer_moore_horspool_searcher(bytes.begin(), bytes.end()));
+ occurrence = std::search(reader.begin(), reader.end(), bytes.begin(), bytes.end());
if (occurrence == reader.end())
break;
@@ -391,7 +391,7 @@ namespace hex::plugin::builtin {
for (u64 address = searchRegion.getStartAddress(); address < searchRegion.getEndAddress(); address += advance) {
task.update(address);
- auto result = std::visit([&](auto tag) {
+ auto result = std::visit([&, min=min, max=max](auto tag) {
using T = std::remove_cvref_t<std::decay_t<decltype(tag)>>;
auto minValue = std::get<T>(min);

View file

@ -1,11 +0,0 @@
--- plugins/builtin/source/content/views/view_hex_editor.cpp.orig 2023-06-24 10:07:39 UTC
+++ plugins/builtin/source/content/views/view_hex_editor.cpp
@@ -300,7 +300,7 @@ namespace hex::plugin::builtin {
reader.seek(this->m_searchPosition.value_or(provider->getBaseAddress()));
constexpr static auto searchFunction = [](const auto &haystackBegin, const auto &haystackEnd, const auto &needleBegin, const auto &needleEnd) {
- return std::search(haystackBegin, haystackEnd, std::boyer_moore_horspool_searcher(needleBegin, needleEnd));
+ return std::search(haystackBegin, haystackEnd, needleBegin, needleEnd);
};
if (!backwards) {

View file

@ -1,32 +0,0 @@
--- plugins/builtin/source/content/views/view_pattern_editor.cpp.orig 2023-06-24 10:07:39 UTC
+++ plugins/builtin/source/content/views/view_pattern_editor.cpp
@@ -494,9 +494,9 @@ namespace hex::plugin::builtin {
dataProvider->writeRaw(0x00, section.data.data(), section.data.size());
dataProvider->setReadOnly(true);
- auto hexEditor = auto(this->m_sectionHexEditor);
+ auto hexEditor = this->m_sectionHexEditor;
- hexEditor.setBackgroundHighlightCallback([this, id, &runtime](u64 address, const u8 *, size_t) -> std::optional<color_t> {
+ hexEditor.setBackgroundHighlightCallback([this, id=id, &runtime](u64 address, const u8 *, size_t) -> std::optional<color_t> {
if (this->m_runningEvaluators != 0)
return std::nullopt;
if (!ImHexApi::Provider::isValid())
@@ -519,7 +519,7 @@ namespace hex::plugin::builtin {
auto patternProvider = ImHexApi::Provider::get();
- this->m_sectionWindowDrawer[patternProvider] = [this, id, patternProvider, dataProvider = std::move(dataProvider), hexEditor, patternDrawer = ui::PatternDrawer(), &runtime] mutable {
+ this->m_sectionWindowDrawer[patternProvider] = [this, id=id, patternProvider, dataProvider = std::move(dataProvider), hexEditor, patternDrawer = ui::PatternDrawer(), &runtime] mutable {
hexEditor.setProvider(dataProvider.get());
hexEditor.draw(480_scaled);
patternDrawer.setSelectionCallback([&](const auto &region) {
@@ -1138,7 +1138,7 @@ namespace hex::plugin::builtin {
if (type->isTemplateType())
continue;
- createNestedMenu(hex::splitString(typeName, "::"), [&, this] {
+ createNestedMenu(hex::splitString(typeName, "::"), [&, this, typeName=typeName] {
std::string variableName;
for (char &c : hex::replaceStrings(typeName, "::", "_"))
variableName += static_cast<char>(std::tolower(c));

View file

@ -1,12 +0,0 @@
--- plugins/builtin/source/ui/pattern_drawer.cpp.orig 2023-06-24 14:40:57 UTC
+++ plugins/builtin/source/ui/pattern_drawer.cpp
@@ -234,7 +234,8 @@ namespace hex::plugin::builtin::ui {
ImGui::TextUnformatted("hex.builtin.pattern_drawer.visualizer.invalid_parameter_count"_lang);
} else {
try {
- visualizer.callback(pattern, iterable, reset, { arguments.begin() + 1, arguments.end() });
+ const std::vector<pl::core::Token::Literal> args = { arguments.begin() + 1, arguments.end() };
+ visualizer.callback(pattern, iterable, reset, args);
} catch (std::exception &e) {
this->m_lastVisualizerError = e.what();
}

File diff suppressed because it is too large Load diff