Index: head/editors/imhex/Makefile =================================================================== --- head/editors/imhex/Makefile (revision 560831) +++ head/editors/imhex/Makefile (revision 560832) @@ -1,46 +1,48 @@ # $FreeBSD$ PORTNAME= imhex -PORTVERSION= 1.5.0 +PORTVERSION= 1.6.0 CATEGORIES= editors MAINTAINER= nobutaka@FreeBSD.org COMMENT= Hex editor for reverse engineers and programmers LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE NOT_FOR_ARCHS= i386 NOT_FOR_ARCHS_REASON= __uint128_t and __int128_t are not supported BUILD_DEPENDS= c++10:lang/gcc10 \ glm>0:math/glm \ nlohmann-json>0:devel/nlohmann-json LIB_DEPENDS= libcapstone.so:devel/capstone4 \ + libfreetype.so:print/freetype2 \ libglfw.so:graphics/glfw \ libstdc++.so:lang/gcc10 \ libtre.so:textproc/libtre USES= cmake pkgconfig python:3.8+ ssl xorg USE_XORG= x11 xcb xau xdmcp USE_GITHUB= yes GH_ACCOUNT= WerWolv GH_PROJECT= ImHex -GH_TAGNAME= v1.5.0 +GH_TAGNAME= v${PORTVERSION} +CC= ${LOCALBASE}/bin/gcc10 CXX= ${LOCALBASE}/bin/c++10 PLIST_FILES= bin/imhex PORTDOCS= README.md OPTIONS_DEFINE= DOCS NLS NLS_USES= gettext do-install: ${INSTALL_PROGRAM} ${WRKDIR}/.build/imhex ${STAGEDIR}${PREFIX}/bin post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} .include Index: head/editors/imhex/distinfo =================================================================== --- head/editors/imhex/distinfo (revision 560831) +++ head/editors/imhex/distinfo (revision 560832) @@ -1,3 +1,3 @@ -TIMESTAMP = 1607336763 -SHA256 (WerWolv-ImHex-1.5.0-v1.5.0_GH0.tar.gz) = 211cca3a22d9c0d8a7a3bfa2a3aa7c29cd954c207979632fe9b9a08cf9b8444b -SIZE (WerWolv-ImHex-1.5.0-v1.5.0_GH0.tar.gz) = 848041 +TIMESTAMP = 1610164429 +SHA256 (WerWolv-ImHex-1.6.0-v1.6.0_GH0.tar.gz) = c096c01dc0a90b4691ddf3305763f0477bc79a96c0144cba865e6b7fa59f2043 +SIZE (WerWolv-ImHex-1.6.0-v1.6.0_GH0.tar.gz) = 952054 Property changes on: head/editors/imhex/distinfo ___________________________________________________________________ Modified: fbsd:nokeywords ## -1 +1 ## -on \ No newline at end of property +yes \ No newline at end of property Index: head/editors/imhex/files/patch-source_providers_file__provider.cpp =================================================================== --- head/editors/imhex/files/patch-source_providers_file__provider.cpp (revision 560831) +++ head/editors/imhex/files/patch-source_providers_file__provider.cpp (nonexistent) @@ -1,11 +0,0 @@ ---- source/providers/file_provider.cpp.orig 2020-12-06 20:40:57 UTC -+++ source/providers/file_provider.cpp -@@ -10,7 +10,7 @@ - #include "helpers/project_file_handler.hpp" - - --#ifdef __APPLE__ -+#if defined(__APPLE__) || defined(__FreeBSD__) - #define off64_t off_t - #define fopen64 fopen - #define fseeko64 fseek Property changes on: head/editors/imhex/files/patch-source_providers_file__provider.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -on \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/editors/imhex/files/patch-include_helpers_utils.hpp =================================================================== --- head/editors/imhex/files/patch-include_helpers_utils.hpp (revision 560831) +++ head/editors/imhex/files/patch-include_helpers_utils.hpp (nonexistent) @@ -1,10 +0,0 @@ ---- include/helpers/utils.hpp.orig 2020-12-06 20:40:57 UTC -+++ include/helpers/utils.hpp -@@ -61,6 +61,7 @@ namespace hex { - - std::string toByteString(u64 bytes); - std::string makePrintable(char c); -+ std::string demangle(const std::string &mangled_name); - - template - struct always_false : std::false_type {}; Property changes on: head/editors/imhex/files/patch-include_helpers_utils.hpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -on \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/editors/imhex/files/patch-source_helpers_utils.cpp =================================================================== --- head/editors/imhex/files/patch-source_helpers_utils.cpp (revision 560831) +++ head/editors/imhex/files/patch-source_helpers_utils.cpp (nonexistent) @@ -1,29 +0,0 @@ ---- source/helpers/utils.cpp.orig 2020-12-06 20:40:57 UTC -+++ source/helpers/utils.cpp -@@ -3,6 +3,8 @@ - #include - #include - #include -+#include -+#include - - namespace hex { - -@@ -90,4 +92,16 @@ namespace hex { - return result; - } - -+ std::string demangle(const std::string &mangled_name) { -+ int status = 0; -+ int skip_underscore = mangled_name.find("__") == 0; -+ char *realname = abi::__cxa_demangle(mangled_name.c_str() + skip_underscore, -+ 0, 0, &status); -+ std::string result{mangled_name}; -+ if (status == 0 && realname) { -+ result = realname; -+ std::free(realname); -+ } -+ return result; -+ } - } -\ No newline at end of file Property changes on: head/editors/imhex/files/patch-source_helpers_utils.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -on \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/editors/imhex/files/patch-source_views_view__tools.cpp =================================================================== --- head/editors/imhex/files/patch-source_views_view__tools.cpp (revision 560831) +++ head/editors/imhex/files/patch-source_views_view__tools.cpp (nonexistent) @@ -1,20 +0,0 @@ ---- source/views/view_tools.cpp.orig 2020-12-06 20:40:57 UTC -+++ source/views/view_tools.cpp -@@ -7,8 +7,6 @@ - #include "providers/provider.hpp" - #include "helpers/utils.hpp" - --#include -- - namespace hex { - - ViewTools::ViewTools(hex::prv::Provider* &provider) : View("Tools"), m_dataProvider(provider) { -@@ -76,7 +74,7 @@ namespace hex { - void ViewTools::drawDemangler() { - if (ImGui::CollapsingHeader("Itanium/MSVC demangler")) { - if (ImGui::InputText("Mangled name", this->m_mangledBuffer, 0xF'FFFF)) { -- this->m_demangledName = llvm::demangle(this->m_mangledBuffer); -+ this->m_demangledName = demangle(this->m_mangledBuffer); - } - - ImGui::InputText("Demangled name", this->m_demangledName.data(), this->m_demangledName.size(), ImGuiInputTextFlags_ReadOnly); Property changes on: head/editors/imhex/files/patch-source_views_view__tools.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -on \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/editors/imhex/files/patch-source_views_view__strings.cpp =================================================================== --- head/editors/imhex/files/patch-source_views_view__strings.cpp (revision 560831) +++ head/editors/imhex/files/patch-source_views_view__strings.cpp (nonexistent) @@ -1,20 +0,0 @@ ---- source/views/view_strings.cpp.orig 2020-12-06 20:40:57 UTC -+++ source/views/view_strings.cpp -@@ -5,8 +5,6 @@ - - #include - --#include -- - using namespace std::literals::string_literals; - - namespace hex { -@@ -37,7 +35,7 @@ namespace hex { - } - ImGui::Separator(); - if (ImGui::MenuItem("Demangle")) { -- this->m_demangledName = llvm::demangle(this->m_selectedString); -+ this->m_demangledName = demangle(this->m_selectedString); - if (!this->m_demangledName.empty()) - View::doLater([]{ ImGui::OpenPopup("Demangled Name"); }); - } Property changes on: head/editors/imhex/files/patch-source_views_view__strings.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -on \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/editors/imhex/files/patch-CMakeLists.txt =================================================================== --- head/editors/imhex/files/patch-CMakeLists.txt (revision 560831) +++ head/editors/imhex/files/patch-CMakeLists.txt (revision 560832) @@ -1,55 +1,15 @@ ---- CMakeLists.txt.orig 2020-12-06 20:40:57 UTC +--- CMakeLists.txt.orig 2021-01-08 19:12:16 UTC +++ CMakeLists.txt -@@ -10,23 +10,21 @@ set(CMAKE_CXX_STANDARD 20) +@@ -23,7 +23,11 @@ set(Python_FIND_FRAMEWORK NEVER) + + # Find packages find_package(PkgConfig REQUIRED) - pkg_search_module(GLFW REQUIRED glfw3) - pkg_search_module(GLM REQUIRED glm) -pkg_search_module(CRYPTO REQUIRED libcrypto) ++if (CMAKE_SYSTEM_NAME MATCHES FreeBSD) ++ find_library(CRYPTO crypto REQUIRED) ++else() ++ pkg_search_module(CRYPTO REQUIRED libcrypto) ++endif() pkg_search_module(CAPSTONE REQUIRED capstone) find_package(OpenGL REQUIRED) --find_package(LLVM REQUIRED CONFIG) find_package(nlohmann_json REQUIRED) - find_package(Python COMPONENTS Interpreter Development) - -+include(CheckCXXSymbolExists) -+check_cxx_symbol_exists(abi::__cxa_demangle "cxxabi.h" HAVE_CXXABI) -+ - if(Python_VERSION LESS 3) - message(STATUS ${PYTHON_VERSION_MAJOR_MINOR}) - message(FATAL_ERROR "No valid version of Python 3 was found.") - endif() - --llvm_map_components_to_libnames(_llvm_libs demangle) --llvm_expand_dependencies(llvm_libs ${_llvm_libs}) -+include_directories(include ${GLFW_INCLUDE_DIRS} ${CAPSTONE_INCLUDE_DIRS} libs/ImGui/include libs/glad/include ${Python_INCLUDE_DIRS}) - --include_directories(include ${GLFW_INCLUDE_DIRS} ${CAPSTONE_INCLUDE_DIRS} ${LLVM_INCLUDE_DIRS} libs/ImGui/include libs/glad/include ${Python_INCLUDE_DIRS}) -- - # Get Python major and minor - string(REPLACE "." ";" PYTHON_VERSION_MAJOR_MINOR ${Python_VERSION}) - list(REMOVE_AT PYTHON_VERSION_MAJOR_MINOR 2) -@@ -42,7 +40,7 @@ endif (WIN32) - SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DRELEASE") - SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") - --add_executable(ImHex -+add_executable(imhex - source/main.cpp - source/window.cpp - -@@ -88,12 +86,10 @@ add_executable(ImHex - resource.rc - ) - --target_link_directories(ImHex PRIVATE ${LLVM_LIBRARY_DIR}) -- - if (WIN32) - target_link_libraries(ImHex libglfw3.a libgcc.a libstdc++.a libmagic.a libgnurx.a libtre.a libintl.a libiconv.a shlwapi.lib libcrypto.a libwinpthread.a libcapstone.a ${llvm_libs} ${Python_LIBRARIES} nlohmann_json::nlohmann_json) - endif (WIN32) - - if (UNIX) -- target_link_libraries(ImHex libglfw.so libmagic.so libcrypto.so libdl.so libcapstone.so ${llvm_libs} ${Python_LIBRARIES} nlohmann_json::nlohmann_json) --endif (UNIX) -\ No newline at end of file -+ target_link_libraries(imhex libglfw.so libmagic.so libcrypto.so libdl.so libcapstone.so ${Python_LIBRARIES} nlohmann_json::nlohmann_json) -+endif (UNIX) Property changes on: head/editors/imhex/files/patch-CMakeLists.txt ___________________________________________________________________ Modified: fbsd:nokeywords ## -1 +1 ## -on \ No newline at end of property +yes \ No newline at end of property Index: head/editors/imhex/files/patch-source_views_view__hexeditor.cpp =================================================================== --- head/editors/imhex/files/patch-source_views_view__hexeditor.cpp (revision 560831) +++ head/editors/imhex/files/patch-source_views_view__hexeditor.cpp (revision 560832) @@ -1,13 +1,13 @@ ---- source/views/view_hexeditor.cpp.orig 2020-12-06 20:40:57 UTC +--- source/views/view_hexeditor.cpp.orig 2021-01-08 19:12:16 UTC +++ source/views/view_hexeditor.cpp @@ -13,6 +13,10 @@ #undef __STRICT_ANSI__ #include -+#if defined(__APPLE__) || defined(__FreeBSD__) ++#if defined(__FreeBSD__) + #define ftello64 ftell +#endif + namespace hex { - ViewHexEditor::ViewHexEditor(prv::Provider* &dataProvider, std::vector &patternData) + ViewHexEditor::ViewHexEditor(std::vector &patternData) Property changes on: head/editors/imhex/files/patch-source_views_view__hexeditor.cpp ___________________________________________________________________ Modified: fbsd:nokeywords ## -1 +1 ## -on \ No newline at end of property +yes \ No newline at end of property