Index: head/editors/Makefile =================================================================== --- head/editors/Makefile (revision 557817) +++ head/editors/Makefile (revision 557818) @@ -1,270 +1,271 @@ # $FreeBSD$ # COMMENT = Editors SUBDIR += 2bsd-vi SUBDIR += abiword SUBDIR += abiword-docs SUBDIR += aee SUBDIR += aewan SUBDIR += apel SUBDIR += asedit SUBDIR += atom SUBDIR += beav SUBDIR += biew SUBDIR += bitedit SUBDIR += boiling-egg SUBDIR += bpatch SUBDIR += bvi SUBDIR += calligra SUBDIR += calligraplan SUBDIR += chexedit SUBDIR += codelite SUBDIR += cooledit SUBDIR += cpeditor SUBDIR += cream SUBDIR += cudatext SUBDIR += deforaos-editor SUBDIR += dhex SUBDIR += diakonos SUBDIR += dkns SUBDIR += drjava SUBDIR += dte SUBDIR += e3 SUBDIR += e93 SUBDIR += ecce SUBDIR += ecrire SUBDIR += edith SUBDIR += editorconfig-core-c SUBDIR += elementary-code SUBDIR += emacs SUBDIR += emacs-devel SUBDIR += encryptpad SUBDIR += featherpad SUBDIR += fileobj SUBDIR += flim SUBDIR += focuswriter SUBDIR += fpc-ide SUBDIR += fte SUBDIR += fxite SUBDIR += gate SUBDIR += gedit SUBDIR += gedit-plugins SUBDIR += ghex SUBDIR += ghostwriter SUBDIR += gmanedit SUBDIR += gnome-latex SUBDIR += gobby SUBDIR += gomate SUBDIR += heme SUBDIR += hexcurse SUBDIR += hexedit SUBDIR += hexer SUBDIR += hexpert SUBDIR += hnb SUBDIR += hte + SUBDIR += imhex SUBDIR += impress SUBDIR += jed SUBDIR += jedit SUBDIR += joe SUBDIR += jove SUBDIR += jucipp SUBDIR += jupp SUBDIR += kak-lsp SUBDIR += kakoune SUBDIR += kate SUBDIR += kibi SUBDIR += kile SUBDIR += komodo-edit SUBDIR += lazarus SUBDIR += lazarus-qt5 SUBDIR += le SUBDIR += leafpad SUBDIR += led SUBDIR += libreoffice SUBDIR += libreoffice-af SUBDIR += libreoffice-am SUBDIR += libreoffice-as SUBDIR += libreoffice-ast SUBDIR += libreoffice-be SUBDIR += libreoffice-bg SUBDIR += libreoffice-bn SUBDIR += libreoffice-bn_IN SUBDIR += libreoffice-bo SUBDIR += libreoffice-br SUBDIR += libreoffice-brx SUBDIR += libreoffice-bs SUBDIR += libreoffice-ca SUBDIR += libreoffice-ca_valencia SUBDIR += libreoffice-ckb SUBDIR += libreoffice-cs SUBDIR += libreoffice-cy SUBDIR += libreoffice-da SUBDIR += libreoffice-dgo SUBDIR += libreoffice-dsb SUBDIR += libreoffice-dz SUBDIR += libreoffice-el SUBDIR += libreoffice-en_GB SUBDIR += libreoffice-en_ZA SUBDIR += libreoffice-eo SUBDIR += libreoffice-es SUBDIR += libreoffice-et SUBDIR += libreoffice-eu SUBDIR += libreoffice-fa SUBDIR += libreoffice-fi SUBDIR += libreoffice-fur SUBDIR += libreoffice-fy SUBDIR += libreoffice-ga SUBDIR += libreoffice-gd SUBDIR += libreoffice-gl SUBDIR += libreoffice-gu SUBDIR += libreoffice-gug SUBDIR += libreoffice-hi SUBDIR += libreoffice-hr SUBDIR += libreoffice-hsb SUBDIR += libreoffice-i18n SUBDIR += libreoffice-id SUBDIR += libreoffice-is SUBDIR += libreoffice-it SUBDIR += libreoffice-ka SUBDIR += libreoffice-kab SUBDIR += libreoffice-kk SUBDIR += libreoffice-km SUBDIR += libreoffice-kmr_Latn SUBDIR += libreoffice-kn SUBDIR += libreoffice-kok SUBDIR += libreoffice-ks SUBDIR += libreoffice-lb SUBDIR += libreoffice-lo SUBDIR += libreoffice-lt SUBDIR += libreoffice-lv SUBDIR += libreoffice-mai SUBDIR += libreoffice-mk SUBDIR += libreoffice-ml SUBDIR += libreoffice-mn SUBDIR += libreoffice-mni SUBDIR += libreoffice-mr SUBDIR += libreoffice-my SUBDIR += libreoffice-nb SUBDIR += libreoffice-ne SUBDIR += libreoffice-nl SUBDIR += libreoffice-nn SUBDIR += libreoffice-nr SUBDIR += libreoffice-nso SUBDIR += libreoffice-oc SUBDIR += libreoffice-om SUBDIR += libreoffice-or SUBDIR += libreoffice-pa_IN SUBDIR += libreoffice-ro SUBDIR += libreoffice-rw SUBDIR += libreoffice-sa_IN SUBDIR += libreoffice-sat SUBDIR += libreoffice-sd SUBDIR += libreoffice-si SUBDIR += libreoffice-sid SUBDIR += libreoffice-sk SUBDIR += libreoffice-sl SUBDIR += libreoffice-sq SUBDIR += libreoffice-sr SUBDIR += libreoffice-sr_Latn SUBDIR += libreoffice-ss SUBDIR += libreoffice-st SUBDIR += libreoffice-sv SUBDIR += libreoffice-sw_TZ SUBDIR += libreoffice-szl SUBDIR += libreoffice-ta SUBDIR += libreoffice-te SUBDIR += libreoffice-tg SUBDIR += libreoffice-th SUBDIR += libreoffice-tn SUBDIR += libreoffice-tr SUBDIR += libreoffice-ts SUBDIR += libreoffice-tt SUBDIR += libreoffice-ug SUBDIR += libreoffice-uz SUBDIR += libreoffice-ve SUBDIR += libreoffice-vec SUBDIR += libreoffice-xh SUBDIR += libreoffice-zu SUBDIR += libreoffice6 SUBDIR += linux-sublime SUBDIR += linux-sublime3 SUBDIR += madedit SUBDIR += mg SUBDIR += mg-static SUBDIR += micro SUBDIR += mined SUBDIR += mle SUBDIR += morla SUBDIR += mousepad SUBDIR += mp SUBDIR += nano SUBDIR += ne SUBDIR += nedit SUBDIR += neovim SUBDIR += neovim-qt SUBDIR += nvi-m17n SUBDIR += nvi2 SUBDIR += o SUBDIR += openoffice-4 SUBDIR += openoffice-devel SUBDIR += p5-Proc-InvokeEditor SUBDIR += p5-Vimana SUBDIR += paredit-mode.el SUBDIR += parinfer-rust SUBDIR += pdfedit SUBDIR += pico-alpine SUBDIR += picpas SUBDIR += pluma SUBDIR += poedit SUBDIR += psgml SUBDIR += puff SUBDIR += py-editorconfig SUBDIR += py-pynvim SUBDIR += quilter SUBDIR += rubygem-neovim SUBDIR += scite SUBDIR += se SUBDIR += semi SUBDIR += setzer SUBDIR += shed SUBDIR += slime SUBDIR += ssed SUBDIR += sted SUBDIR += tamago SUBDIR += tea SUBDIR += teco SUBDIR += ted SUBDIR += tetradraw SUBDIR += texmacs SUBDIR += texmaker SUBDIR += texstudio SUBDIR += textadept SUBDIR += texworks SUBDIR += the SUBDIR += thoteditor SUBDIR += treeform SUBDIR += tweak SUBDIR += uemacs SUBDIR += uzap SUBDIR += vigor SUBDIR += vile SUBDIR += vim SUBDIR += vim-console SUBDIR += vim-tiny SUBDIR += vscode SUBDIR += web-mode SUBDIR += with-editor SUBDIR += wordgrinder SUBDIR += wxhexeditor SUBDIR += xcoral SUBDIR += xed SUBDIR += xi-core SUBDIR += xi-term SUBDIR += xmlcopyeditor SUBDIR += xvile SUBDIR += yudit SUBDIR += zile .include Index: head/editors/imhex/Makefile =================================================================== --- head/editors/imhex/Makefile (nonexistent) +++ head/editors/imhex/Makefile (revision 557818) @@ -0,0 +1,43 @@ +# $FreeBSD$ + +PORTNAME= imhex +PORTVERSION= 1.5.0 +CATEGORIES= editors + +MAINTAINER= nobutaka@FreeBSD.org +COMMENT= Hex editor for reverse engineers and programmers + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= c++10:lang/gcc10 \ + glm>0:math/glm \ + nlohmann-json>0:devel/nlohmann-json +LIB_DEPENDS= libcapstone.so:devel/capstone4 \ + 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 + +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 Property changes on: head/editors/imhex/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/editors/imhex/distinfo =================================================================== --- head/editors/imhex/distinfo (nonexistent) +++ head/editors/imhex/distinfo (revision 557818) @@ -0,0 +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 Property changes on: head/editors/imhex/distinfo ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +on \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/editors/imhex/files/patch-CMakeLists.txt =================================================================== --- head/editors/imhex/files/patch-CMakeLists.txt (nonexistent) +++ head/editors/imhex/files/patch-CMakeLists.txt (revision 557818) @@ -0,0 +1,55 @@ +--- CMakeLists.txt.orig 2020-12-06 20:40:57 UTC ++++ CMakeLists.txt +@@ -10,23 +10,21 @@ set(CMAKE_CXX_STANDARD 20) + find_package(PkgConfig REQUIRED) + pkg_search_module(GLFW REQUIRED glfw3) + pkg_search_module(GLM REQUIRED glm) +-pkg_search_module(CRYPTO REQUIRED libcrypto) + 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 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +on \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +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 (nonexistent) +++ head/editors/imhex/files/patch-include_helpers_utils.hpp (revision 557818) @@ -0,0 +1,10 @@ +--- 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 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +on \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +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 (nonexistent) +++ head/editors/imhex/files/patch-source_helpers_utils.cpp (revision 557818) @@ -0,0 +1,29 @@ +--- 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 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +on \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ 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 (nonexistent) +++ head/editors/imhex/files/patch-source_providers_file__provider.cpp (revision 557818) @@ -0,0 +1,11 @@ +--- 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 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +on \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ 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 (nonexistent) +++ head/editors/imhex/files/patch-source_views_view__hexeditor.cpp (revision 557818) @@ -0,0 +1,13 @@ +--- source/views/view_hexeditor.cpp.orig 2020-12-06 20:40:57 UTC ++++ source/views/view_hexeditor.cpp +@@ -13,6 +13,10 @@ + #undef __STRICT_ANSI__ + #include + ++#if defined(__APPLE__) || defined(__FreeBSD__) ++ #define ftello64 ftell ++#endif ++ + namespace hex { + + ViewHexEditor::ViewHexEditor(prv::Provider* &dataProvider, std::vector &patternData) Property changes on: head/editors/imhex/files/patch-source_views_view__hexeditor.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +on \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +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 (nonexistent) +++ head/editors/imhex/files/patch-source_views_view__strings.cpp (revision 557818) @@ -0,0 +1,20 @@ +--- 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 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +on \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +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 (nonexistent) +++ head/editors/imhex/files/patch-source_views_view__tools.cpp (revision 557818) @@ -0,0 +1,20 @@ +--- 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 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +on \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/editors/imhex/pkg-descr =================================================================== --- head/editors/imhex/pkg-descr (nonexistent) +++ head/editors/imhex/pkg-descr (revision 557818) @@ -0,0 +1,16 @@ +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 + +WWW: https://github.com/WerWolv/ImHex Property changes on: head/editors/imhex/pkg-descr ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +on \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property