diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2019-02-13 13:52:53 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2019-02-13 13:52:53 +0000 |
commit | f10e2e66bc57213281f17a3f0920c6e8df6f4be9 (patch) | |
tree | 21523ecc802cdac215c4194d2378621165ece448 /editors | |
parent | c56adfd8f38f698d679563ad8989cfb4c568fde9 (diff) | |
download | ports-f10e2e66bc57213281f17a3f0920c6e8df6f4be9.tar.gz ports-f10e2e66bc57213281f17a3f0920c6e8df6f4be9.zip |
Notes
Diffstat (limited to 'editors')
-rw-r--r-- | editors/Makefile | 3 | ||||
-rw-r--r-- | editors/wxhexeditor/Makefile | 31 | ||||
-rw-r--r-- | editors/wxhexeditor/distinfo | 3 | ||||
-rw-r--r-- | editors/wxhexeditor/files/patch-Makefile | 60 | ||||
-rw-r--r-- | editors/wxhexeditor/files/patch-src_FAL.cpp | 53 | ||||
-rw-r--r-- | editors/wxhexeditor/files/patch-src_HexDialogs.cpp | 12 | ||||
-rw-r--r-- | editors/wxhexeditor/files/patch-src_HexEditor.h | 12 | ||||
-rw-r--r-- | editors/wxhexeditor/files/patch-src_HexEditorCtrl_wxHexCtrl_main.cpp | 11 | ||||
-rw-r--r-- | editors/wxhexeditor/files/patch-src_HexEditorCtrl_wxHexCtrl_wxHexCtrl.cpp | 20 | ||||
-rw-r--r-- | editors/wxhexeditor/files/patch-src_HexPanels.h | 11 | ||||
-rw-r--r-- | editors/wxhexeditor/pkg-descr | 4 | ||||
-rw-r--r-- | editors/wxhexeditor/pkg-plist | 18 |
12 files changed, 237 insertions, 1 deletions
diff --git a/editors/Makefile b/editors/Makefile index ab37ff56edc0..9a7103aecb90 100644 --- a/editors/Makefile +++ b/editors/Makefile @@ -38,7 +38,7 @@ SUBDIR += emacs SUBDIR += emacs-devel SUBDIR += encryptpad - SUBDIR += featherpad + SUBDIR += featherpad SUBDIR += fileobj SUBDIR += flim SUBDIR += focuswriter @@ -251,6 +251,7 @@ SUBDIR += web-mode SUBDIR += with-editor SUBDIR += wordgrinder + SUBDIR += wxhexeditor SUBDIR += xcoral SUBDIR += xed SUBDIR += xi-core diff --git a/editors/wxhexeditor/Makefile b/editors/wxhexeditor/Makefile new file mode 100644 index 000000000000..0c0f57872f7c --- /dev/null +++ b/editors/wxhexeditor/Makefile @@ -0,0 +1,31 @@ +# Created by: Alexey Dokuchaev <danfe@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= wxhexeditor +PORTVERSION= 0.24 +CATEGORIES= editors +MASTER_SITES= SF/${PORTNAME}/wxHexEditor/v${PORTVERSION}%20Beta/ +DISTNAME= wxHexEditor-v${PORTVERSION}-src + +MAINTAINER= danfe@FreeBSD.org +COMMENT= Graphical hex editor for big files with x86 disassembly support + +LICENSE= GPLv2 + +LIB_DEPENDS= libudis86.so:devel/udis86 \ + libmhash.so:security/mhash + +USES= gettext-tools gmake tar:xz +USE_WX= 3.0+ +MAKE_ARGS= WXCONFIG="${WX_CONFIG}" + +WRKSRC= ${WRKDIR}/wxHexEditor + +# Follow the ${MTREE_FILE} which specifies simple, unsuffixed names +# for these particular locales +post-patch: + @${MV} ${WRKSRC}/locale/hu_HU ${WRKSRC}/locale/hu + @${MV} ${WRKSRC}/locale/ja_JP ${WRKSRC}/locale/ja + @${MV} ${WRKSRC}/locale/nl_NL ${WRKSRC}/locale/nl + +.include <bsd.port.mk> diff --git a/editors/wxhexeditor/distinfo b/editors/wxhexeditor/distinfo new file mode 100644 index 000000000000..8e86b619dd23 --- /dev/null +++ b/editors/wxhexeditor/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1514687038 +SHA256 (wxHexEditor-v0.24-src.tar.xz) = a1b893fcc5b2a6e5e971b5fe4116b65f9fed6d317e8cdc6cb9219a0a609fd5ab +SIZE (wxHexEditor-v0.24-src.tar.xz) = 900868 diff --git a/editors/wxhexeditor/files/patch-Makefile b/editors/wxhexeditor/files/patch-Makefile new file mode 100644 index 000000000000..ae775255e314 --- /dev/null +++ b/editors/wxhexeditor/files/patch-Makefile @@ -0,0 +1,60 @@ +--- Makefile.orig 2017-12-31 02:15:18 UTC ++++ Makefile +@@ -1,9 +1,9 @@ + WXCONFIG ?= wx-config + HOST= +-WXCXXFLAGS= `$(WXCONFIG) --cxxflags` -Iudis86 -Imhash/include -MMD -fopenmp -Wall -O2 ++WXCXXFLAGS= `$(WXCONFIG) --cxxflags` -MMD -Wall -I$(LOCALBASE)/include + WXLDFLAGS = `$(WXCONFIG) --libs` `$(WXCONFIG) --libs aui` `$(WXCONFIG) --libs core` +-WXCXXFLAGS += -fopenmp +-LDFLAGS += -lgomp ++#WXCXXFLAGS += -fopenmp ++#LDFLAGS += -lgomp + #add this ldflags for WinConsole "-Wl,--subsystem,console -mconsole" for win-debug + #LDFLAGS += -Wl,--subsystem,console -mconsole + RC = `$(WXCONFIG) --rescomp` +@@ -22,7 +22,7 @@ SOURCES= src/HexEditorGui.cpp \ + src/HexEditorCtrl/wxHexCtrl/Tag.cpp\ + src/HexEditorCtrl/HexEditorCtrlGui.cpp\ + src/HexEditorFrame.cpp +-LIBS = udis86/libudis86/.libs/libudis86.a mhash/lib/.libs/libmhash.a ++LIBS = -ludis86 -lmhash + OBJECTS=$(SOURCES:.cpp=.o) + DEPENDS=$(OBJECTS:.o=.d) + LANGUAGEDIRS=`ls -l ./locale | grep ^d | sed s/.*\ //g;` +@@ -33,7 +33,7 @@ EXECUTABLE=wxHexEditor + EXECUTABLE_WIN=$(EXECUTABLE).exe + EXECUTABLE_DIR_MAC=$(EXECUTABLE).app + +-PREFIX = /usr ++PREFIX ?= /usr + BINDIR = $(PREFIX)/bin + DATADIR = $(PREFIX)/share + LOCALEDIR = $(DATADIR)/locale +@@ -47,7 +47,7 @@ clang: all + + all:$(EXECUTABLE) langs + +-$(OBJECTS): $(LIBS) $(SOURCES) ++$(OBJECTS): $(SOURCES) + + MOBJECTS=$(LANGUAGES:.po=.mo) + +@@ -169,12 +169,12 @@ prepmacdir: langs + cp locale/$$i/wxHexEditor.mo $(EXECUTABLE_DIR_MAC)/Contents/Resources/locale/$$i/; done + + install: +- install -D -m 755 $(EXECUTABLE) $(DESTDIR)/$(BINDIR)/$(EXECUTABLE) +- install -D -m 644 resources/wxHexEditor.png $(DESTDIR)/$(DATADIR)/pixmaps/wxHexEditor.png +- install -D -m 644 resources/wxHexEditor.desktop $(DESTDIR)/$(DATADIR)/applications/wxHexEditor.desktop ++ install -m 755 $(EXECUTABLE) $(DESTDIR)$(BINDIR)/$(EXECUTABLE) ++ install -m 644 resources/wxHexEditor.png $(DESTDIR)$(DATADIR)/pixmaps/wxHexEditor.png ++ install -m 644 resources/wxHexEditor.desktop $(DESTDIR)$(DATADIR)/applications/wxHexEditor.desktop + @for i in $(LANGUAGEDIRS); do \ +- echo "install -D -m 644 locale/$$i/wxHexEditor.mo $(DESTDIR)/$(LOCALEDIR)/$$i/LC_MESSAGES/wxHexEditor.mo"; \ +- install -D -m 644 locale/$$i/wxHexEditor.mo $(DESTDIR)/$(LOCALEDIR)/$$i/LC_MESSAGES/wxHexEditor.mo; done ++ echo "install -m 644 locale/$$i/wxHexEditor.mo $(DESTDIR)$(LOCALEDIR)/$$i/LC_MESSAGES/wxHexEditor.mo"; \ ++ install -m 644 locale/$$i/wxHexEditor.mo $(DESTDIR)$(LOCALEDIR)/$$i/LC_MESSAGES/wxHexEditor.mo; done + + uninstall: + rm -f $(DESTDIR)/$(BINDIR)/$(EXECUTABLE) diff --git a/editors/wxhexeditor/files/patch-src_FAL.cpp b/editors/wxhexeditor/files/patch-src_FAL.cpp new file mode 100644 index 000000000000..c949b829f05f --- /dev/null +++ b/editors/wxhexeditor/files/patch-src_FAL.cpp @@ -0,0 +1,53 @@ +--- src/FAL.cpp.orig 2017-12-31 02:15:18 UTC ++++ src/FAL.cpp +@@ -39,10 +39,10 @@ + #define PTRACE_POKETEXT PT_WRITE_I + #endif + +-//#if defined BSD +-// #define DKIOCGETBLOCKSIZE DIOCGSECTORSIZE /* Get the sector size of the device in bytes */ +-// #define DKIOCGETBLOCKCOUNT DIOCGMEDIASIZE /* Get media size in bytes */ +-//#endif ++#if defined BSD ++ #define DKIOCGETBLOCKSIZE DIOCGSECTORSIZE /* Get the sector size of the device in bytes */ ++ #define DKIOCGETBLOCKCOUNT DIOCGMEDIASIZE /* Get media size in bytes */ ++#endif + + + WX_DEFINE_OBJARRAY(ArrayOfNode); +@@ -208,7 +208,7 @@ bool FAL::OSDependedOpen(wxFileName& myfilename, FileA + myfilename.GetFullPath().Mid(5).ToLong(&a); + ProcessID=a; + RAMProcess=true; +- if((ptrace(PTRACE_ATTACH, ProcessID, NULL, NULL)) < 0 ){ ++ if((ptrace(PTRACE_ATTACH, ProcessID, NULL, 0)) < 0 ){ + wxMessageBox( _("Process cannot open."),_("Error"), wxOK|wxICON_ERROR ); + ProcessID=-1; + return false; +@@ -326,7 +326,7 @@ bool FAL::FALOpen(wxFileName& myfilename, FileAccessMo + bool FAL::Close(){ + #ifndef __WXMSW__ + if( ProcessID >=0 ) +- return ((ptrace(PTRACE_DETACH, ProcessID, NULL, NULL)) >= 0 ); ++ return ((ptrace(PTRACE_DETACH, ProcessID, NULL, 0)) >= 0 ); + #endif + #ifdef __WXMSW__ + if(IsWinDevice( the_file ) ){ +@@ -521,7 +521,7 @@ bool FAL::Apply( void ){ + long word=0; + //unsigned long *ptr = (unsigned long *) buffer; + while (rd < rd_size) { +- word = ptrace(PTRACE_PEEKTEXT, ProcessID, reinterpret_cast<char*>(StartSector*BlockRWSize+rd), NULL); ++ word = ptrace(PTRACE_PEEKTEXT, ProcessID, reinterpret_cast<char*>(StartSector*BlockRWSize+rd), 0); + memcpy( bfr+rd , &word, 4); + rd += 4; + } +@@ -803,7 +803,7 @@ long FAL::ReadR( unsigned char* buffer, unsigned size, + //unsigned long *ptr = (unsigned long *) buffer; + #ifndef __WXMSW__ + while (rd < rd_size) { +- word = ptrace(PTRACE_PEEKTEXT, ProcessID, reinterpret_cast<char*>(StartSector*BlockRWSize+rd), NULL); ++ word = ptrace(PTRACE_PEEKTEXT, ProcessID, reinterpret_cast<char*>(StartSector*BlockRWSize+rd), 0); + memcpy( bfr+rd , &word, 4); + rd += 4; + } diff --git a/editors/wxhexeditor/files/patch-src_HexDialogs.cpp b/editors/wxhexeditor/files/patch-src_HexDialogs.cpp new file mode 100644 index 000000000000..bcd3241611e3 --- /dev/null +++ b/editors/wxhexeditor/files/patch-src_HexDialogs.cpp @@ -0,0 +1,12 @@ +--- src/HexDialogs.cpp.orig 2017-12-31 02:15:18 UTC ++++ src/HexDialogs.cpp +@@ -24,7 +24,8 @@ + #define NANINT 0xFFFFFFFFFFFFFFFFLL + #include "HexDialogs.h" + #include <wx/progdlg.h> +-#include "../mhash/include/mhash.h" ++typedef bool _Bool; ++#include <mhash.h> + + #ifdef __SSE2__ + #include <emmintrin.h> diff --git a/editors/wxhexeditor/files/patch-src_HexEditor.h b/editors/wxhexeditor/files/patch-src_HexEditor.h new file mode 100644 index 000000000000..da2993645d2a --- /dev/null +++ b/editors/wxhexeditor/files/patch-src_HexEditor.h @@ -0,0 +1,12 @@ +--- src/HexEditor.h.orig 2017-12-31 02:15:18 UTC ++++ src/HexEditor.h +@@ -25,7 +25,8 @@ + #ifndef _wxHexEditor_h_ + #define _wxHexEditor_h_ + +-#include "../mhash/include/mhash.h" ++typedef bool _Bool; ++#include <mhash.h> + + #include <wx/ffile.h> + #include <wx/clipbrd.h> diff --git a/editors/wxhexeditor/files/patch-src_HexEditorCtrl_wxHexCtrl_main.cpp b/editors/wxhexeditor/files/patch-src_HexEditorCtrl_wxHexCtrl_main.cpp new file mode 100644 index 000000000000..5b628fb6bda6 --- /dev/null +++ b/editors/wxhexeditor/files/patch-src_HexEditorCtrl_wxHexCtrl_main.cpp @@ -0,0 +1,11 @@ +--- src/HexEditorCtrl/wxHexCtrl/main.cpp.orig 2017-12-31 02:15:18 UTC ++++ src/HexEditorCtrl/wxHexCtrl/main.cpp +@@ -60,7 +60,7 @@ MyFrame::MyFrame(wxFrame *frame, const wxString& title + #endif // wxUSE_STATUSBAR + + wxString ch; +- for(int j=0 ; j < 90 ; j++ ){ ++ for(char j=0 ; j < 90 ; j++ ){ + ch.Append(j); + hex_ctrl->SetBinValue( ch.char_str(),90,true ); + } diff --git a/editors/wxhexeditor/files/patch-src_HexEditorCtrl_wxHexCtrl_wxHexCtrl.cpp b/editors/wxhexeditor/files/patch-src_HexEditorCtrl_wxHexCtrl_wxHexCtrl.cpp new file mode 100644 index 000000000000..1fa7cc741a07 --- /dev/null +++ b/editors/wxhexeditor/files/patch-src_HexEditorCtrl_wxHexCtrl_wxHexCtrl.cpp @@ -0,0 +1,20 @@ +--- src/HexEditorCtrl/wxHexCtrl/wxHexCtrl.cpp.orig 2017-12-31 02:15:18 UTC ++++ src/HexEditorCtrl/wxHexCtrl/wxHexCtrl.cpp +@@ -557,7 +557,7 @@ inline wxDC* wxHexCtrl::UpdateDC(wxDC *xdc ){ + + //First half of byte + RenderedHexByte += CharAt(textLenghtLimit++); +- chr = RenderedHexByte.ToAscii()[0]; ++ chr = RenderedHexByte.ToAscii()[static_cast<size_t>(0)]; + chrC = atoh( chr ) << 4; + + //Space could be here +@@ -569,7 +569,7 @@ inline wxDC* wxHexCtrl::UpdateDC(wxDC *xdc ){ + + //Second half of byte. + RenderedHexByte += CharAt(textLenghtLimit++); +- chr = RenderedHexByte.ToAscii()[1]; ++ chr = RenderedHexByte.ToAscii()[static_cast<size_t>(1)]; + chrC |= atoh( chr ); + //chrC = (atoh( RenderedHexByte.ToAscii()[0] ) << 4) | atoh( RenderedHexByte.ToAscii()[1] ); + diff --git a/editors/wxhexeditor/files/patch-src_HexPanels.h b/editors/wxhexeditor/files/patch-src_HexPanels.h new file mode 100644 index 000000000000..10a65e2dc914 --- /dev/null +++ b/editors/wxhexeditor/files/patch-src_HexPanels.h @@ -0,0 +1,11 @@ +--- src/HexPanels.h.orig 2017-12-31 02:15:18 UTC ++++ src/HexPanels.h +@@ -27,7 +27,7 @@ + #include "HexEditorFrame.h" + #include "HexEditorCtrl/HexEditorCtrl.h" + #include "HexEditorCtrl/wxHexCtrl/wxHexCtrl.h" +-#include "../udis86/udis86.h" ++#include <udis86.h> + + #ifdef WX_GCH + #include <wx_pch.h> diff --git a/editors/wxhexeditor/pkg-descr b/editors/wxhexeditor/pkg-descr new file mode 100644 index 000000000000..4348b65eab68 --- /dev/null +++ b/editors/wxhexeditor/pkg-descr @@ -0,0 +1,4 @@ +Advanced graphical (wxWidgets) hex editor focused on editing of very large +files and with x86 disassembly support. + +WWW: http://www.wxhexeditor.org/ diff --git a/editors/wxhexeditor/pkg-plist b/editors/wxhexeditor/pkg-plist new file mode 100644 index 000000000000..cff06673b1a6 --- /dev/null +++ b/editors/wxhexeditor/pkg-plist @@ -0,0 +1,18 @@ +bin/wxHexEditor +share/applications/wxHexEditor.desktop +share/locale/ar/LC_MESSAGES/wxHexEditor.mo +share/locale/cs/LC_MESSAGES/wxHexEditor.mo +share/locale/de/LC_MESSAGES/wxHexEditor.mo +share/locale/es/LC_MESSAGES/wxHexEditor.mo +share/locale/fr/LC_MESSAGES/wxHexEditor.mo +share/locale/hu/LC_MESSAGES/wxHexEditor.mo +share/locale/it/LC_MESSAGES/wxHexEditor.mo +share/locale/ja/LC_MESSAGES/wxHexEditor.mo +share/locale/nl/LC_MESSAGES/wxHexEditor.mo +share/locale/pl/LC_MESSAGES/wxHexEditor.mo +share/locale/pt_BR/LC_MESSAGES/wxHexEditor.mo +share/locale/ro/LC_MESSAGES/wxHexEditor.mo +share/locale/ru/LC_MESSAGES/wxHexEditor.mo +share/locale/tr/LC_MESSAGES/wxHexEditor.mo +share/locale/zh_CN/LC_MESSAGES/wxHexEditor.mo +share/pixmaps/wxHexEditor.png |