Skip to content

Commit

Permalink
devel/xpeviewer: new port had been added (+)
Browse files Browse the repository at this point in the history
This is versatile graphical viewer and editor for PE files,
based on the stock Qt libraries and a few custom components.

WWW: https://github.com/horsicq/XPEViewer
  • Loading branch information
Alexey Dokuchaev authored and Alexey Dokuchaev committed Jan 7, 2022
1 parent 4510216 commit c1ea9f0
Show file tree
Hide file tree
Showing 7 changed files with 172 additions and 1 deletion.
3 changes: 2 additions & 1 deletion devel/Makefile
Expand Up @@ -5111,8 +5111,8 @@
SUBDIR += py-python-application
SUBDIR += py-python-bugzilla
SUBDIR += py-python-dbusmock
SUBDIR += py-python-distutils-extra
SUBDIR += py-python-decouple
SUBDIR += py-python-distutils-extra
SUBDIR += py-python-dtrace
SUBDIR += py-python-easyconfig
SUBDIR += py-python-editor
Expand Down Expand Up @@ -7206,6 +7206,7 @@
SUBDIR += xopcodecalc
SUBDIR += xorg-macros
SUBDIR += xparam
SUBDIR += xpeviewer
SUBDIR += xsd
SUBDIR += xsimd
SUBDIR += xtensa-esp32-elf
Expand Down
56 changes: 56 additions & 0 deletions devel/xpeviewer/Makefile
@@ -0,0 +1,56 @@
# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>

PORTNAME= ${GH_PROJECT:[1]:tl}
PORTVERSION= 0.02
CATEGORIES= devel

MAINTAINER= danfe@FreeBSD.org
COMMENT= Cross-platform graphical PE file viewer/editor

LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE

USES= desktop-file-utils pkgconfig qt:5
GNU_CONFIGURE= yes
USE_QT= buildtools_build linguisttools_build qmake_build \
concurrent core gui opengl printsupport widgets
USE_GITHUB= yes
GH_ACCOUNT= horsicq
GH_PROJECT= XPEViewer ${GH_SUBDIR}
GH_TAGNAME= 9f28798:c 04ad3bd:fd 4c280e7:fw 31f30d3:f 827056a:sa \
4e10b78:ss 262acc3:xa 7b01fc0:xc 9a471e5:xcf 0eee644:xdex \
c1f16dc:xd 0651e63:xdw 5e289ac:xdv 59db94d:xew 149d635:xhw \
61378c6:xhv 9b0103f:xmmw 0e9e3e5:xo b0ffc17:xq a58955c:xs \
1d23cca:xst 9fcacfa:s
GH_SUBDIR= Controls:c FormatDialogs:fd FormatWidgets:fw Formats:f \
SpecAbstract:sa StaticScan:ss XArchive:xa XCapstone:xc \
XCppfilt:xcf XDEX:xdex XDemangle:xd XDemangleWidget:xdw \
XDisasmView:xdv XEntropyWidget:xew XHashWidget:xhw \
XHexView:xhv XMemoryMapWidget:xmmw XOptions:xo XQwt:xq \
XShortcuts:xs XStyles:xst signatures:s

post-extract:
@${CHMOD} +x ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}

post-build:
@cd ${WRKSRC}/gui_source && ${LUPDATE} gui_source_tr.pro
@${LRELEASE} ${WRKSRC}/gui_source/translation/*.ts

do-install:
${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/build/release/${PORTNAME} \
${STAGEDIR}${PREFIX}/bin
cd ${INSTALL_WRKSRC}/DEBIAN && ${COPYTREE_SHARE} hicolor \
${STAGEDIR}${PREFIX}/share/icons
${SED} -e 's,#VERSION#,${PORTVERSION},' \
${WRKSRC}/DEBIAN/${PORTNAME}.desktop > \
${STAGEDIR}${PREFIX}/share/applications/${PORTNAME}.desktop
cd ${WRKSRC_xst} && ${COPYTREE_SHARE} qss ${STAGEDIR}${DATADIR}
@${MKDIR} ${STAGEDIR}${DATADIR}/lang
${INSTALL_DATA} ${INSTALL_WRKSRC}/gui_source/translation/*.qm \
${STAGEDIR}${DATADIR}/lang
@${MKDIR} ${STAGEDIR}${DATADIR}/signatures
${INSTALL_DATA} ${WRKSRC_s}/crypto.db ${STAGEDIR}${DATADIR}/signatures

.include <bsd.port.mk>

PATCH_ARGS+= -l
47 changes: 47 additions & 0 deletions devel/xpeviewer/distinfo
@@ -0,0 +1,47 @@
TIMESTAMP = 1632091032
SHA256 (horsicq-XPEViewer-0.02_GH0.tar.gz) = db8e30fe97fe4e86715a71500c05937a39c26209011c4e171c25365a5b3d96f9
SIZE (horsicq-XPEViewer-0.02_GH0.tar.gz) = 1619867
SHA256 (horsicq-Controls-9f28798_GH0.tar.gz) = e75bd4c1041710b20c4e5c7bd13879fa2fad5cdde0c9bcf1f2cacaf0200ecdb4
SIZE (horsicq-Controls-9f28798_GH0.tar.gz) = 12905
SHA256 (horsicq-FormatDialogs-04ad3bd_GH0.tar.gz) = c14265e275ac7b6ce2483023d99e23274adf9ad6305f9aedf79d91f6151c9aca
SIZE (horsicq-FormatDialogs-04ad3bd_GH0.tar.gz) = 11242
SHA256 (horsicq-FormatWidgets-4c280e7_GH0.tar.gz) = dac3e09e66804986657e1e2da85ce3ccd4868b9e6779ef7de8db27273bf08cb0
SIZE (horsicq-FormatWidgets-4c280e7_GH0.tar.gz) = 187327
SHA256 (horsicq-Formats-31f30d3_GH0.tar.gz) = ffb7b409da9abf0a2447c281e1bc28b5326ee3a6c381e319a0091737f0c7c0ee
SIZE (horsicq-Formats-31f30d3_GH0.tar.gz) = 156961
SHA256 (horsicq-SpecAbstract-827056a_GH0.tar.gz) = 56cb724b8a8688a33e095a959472655b35e9a9325bfdde6b137f214936a8a0a9
SIZE (horsicq-SpecAbstract-827056a_GH0.tar.gz) = 163936
SHA256 (horsicq-StaticScan-4e10b78_GH0.tar.gz) = 028fed0b8df5dc8ca578912a106e490a4c3f8f843917302b1daf6d02207cb6d6
SIZE (horsicq-StaticScan-4e10b78_GH0.tar.gz) = 11869
SHA256 (horsicq-XArchive-262acc3_GH0.tar.gz) = c9c8cfe010ee46d829986469586f7a673033cd3aa1843e851418ea67b01b81db
SIZE (horsicq-XArchive-262acc3_GH0.tar.gz) = 935105
SHA256 (horsicq-XCapstone-7b01fc0_GH0.tar.gz) = c0210198fb933c000af7fdd28d8afae78413f6d68fbd654cc83b94add0c9d316
SIZE (horsicq-XCapstone-7b01fc0_GH0.tar.gz) = 10308874
SHA256 (horsicq-XCppfilt-9a471e5_GH0.tar.gz) = cc199377fc20453251b2f26ffb8783f663b847188115c0fe08e79e2e9a5a0459
SIZE (horsicq-XCppfilt-9a471e5_GH0.tar.gz) = 373417
SHA256 (horsicq-XDEX-0eee644_GH0.tar.gz) = aceb8f504713718d42e581fdd5f03adc141c95ae4ab17d8613de2d3c17e6b7c1
SIZE (horsicq-XDEX-0eee644_GH0.tar.gz) = 10560
SHA256 (horsicq-XDemangle-c1f16dc_GH0.tar.gz) = 5d85809db7096902c78c0d27fb39a0e7e90d277a6b33dbff9ff3d91987f97cbd
SIZE (horsicq-XDemangle-c1f16dc_GH0.tar.gz) = 22309
SHA256 (horsicq-XDemangleWidget-0651e63_GH0.tar.gz) = 7541cf96c3228beb47ea5c359532ea37a50c3968812f06263c0e64fed5edd7f1
SIZE (horsicq-XDemangleWidget-0651e63_GH0.tar.gz) = 3235
SHA256 (horsicq-XDisasmView-5e289ac_GH0.tar.gz) = 847a098f61de84811d23ec6c22bdc2ef691c17970f64e48b3fee9d607f38bb9a
SIZE (horsicq-XDisasmView-5e289ac_GH0.tar.gz) = 13742
SHA256 (horsicq-XEntropyWidget-59db94d_GH0.tar.gz) = 1318b7d90fa1e5d0a1c16ef05fac4d698753ff58b6014f1fe5d5528f438873b3
SIZE (horsicq-XEntropyWidget-59db94d_GH0.tar.gz) = 10097
SHA256 (horsicq-XHashWidget-149d635_GH0.tar.gz) = 84aa8649374dc7a84079af8dd6403b7b917d2778adddc7244a722641ccd74d4f
SIZE (horsicq-XHashWidget-149d635_GH0.tar.gz) = 6646
SHA256 (horsicq-XHexView-61378c6_GH0.tar.gz) = c3d182b0fb51acf0186f090c21480afc2bc8891d413b52d881d1b8ef13a244c0
SIZE (horsicq-XHexView-61378c6_GH0.tar.gz) = 8599
SHA256 (horsicq-XMemoryMapWidget-9b0103f_GH0.tar.gz) = da822b9efba2f141f50b4a35c3be2760b070c47d2dcdf806c6e8e8cc167f7d8e
SIZE (horsicq-XMemoryMapWidget-9b0103f_GH0.tar.gz) = 6492
SHA256 (horsicq-XOptions-0e9e3e5_GH0.tar.gz) = ebea42c2ffcf93304a763e8738cefaed905da07369a61e24ee07f9d8e5477acb
SIZE (horsicq-XOptions-0e9e3e5_GH0.tar.gz) = 6834
SHA256 (horsicq-XQwt-b0ffc17_GH0.tar.gz) = 5990bf9751b67f80e503a3ced4af525953b2d4235d151b319238fafbd0a3630f
SIZE (horsicq-XQwt-b0ffc17_GH0.tar.gz) = 343304
SHA256 (horsicq-XShortcuts-a58955c_GH0.tar.gz) = d55f263aad280561d96146487a46840d7944f6a10e47f1d0c9bfac4b90cc808a
SIZE (horsicq-XShortcuts-a58955c_GH0.tar.gz) = 10451
SHA256 (horsicq-XStyles-1d23cca_GH0.tar.gz) = 48eb8cb592a5e92aae307752828289b53909859435daaf1d344df5959d42a1bb
SIZE (horsicq-XStyles-1d23cca_GH0.tar.gz) = 4441
SHA256 (horsicq-signatures-9fcacfa_GH0.tar.gz) = 71f91eadeb56939d88dd6016a21df98cc45da2bc326c45073b4511378d9057d2
SIZE (horsicq-signatures-9fcacfa_GH0.tar.gz) = 1170391
22 changes: 22 additions & 0 deletions devel/xpeviewer/files/patch-XOptions_xoptions.cpp
@@ -0,0 +1,22 @@
--- XOptions/xoptions.cpp.orig 2021-08-30 16:51:52 UTC
+++ XOptions/xoptions.cpp
@@ -742,7 +742,7 @@ QList<QString> XOptions::getAllFilesFromDirectory(QStr
bool XOptions::checkNative()
{
bool bResult=false;
-#ifdef Q_OS_MAC
+#if defined(Q_OS_MAC) || defined(Q_OS_FREEBSD)
bResult=true;
#elif defined(Q_OS_LINUX)
QString sApplicationDirPath=qApp->applicationDirPath();
@@ -792,6 +792,10 @@ QString XOptions::getApplicationDataPath()
{
sResult=sApplicationDirPath;
}
+#elif defined(Q_OS_FREEBSD)
+ sResult = QStandardPaths::standardLocations(
+ QStandardPaths::GenericDataLocation).at(1)
+ + QDir::separator() + qApp->applicationName();
#else
sResult=sApplicationDirPath;
#endif
12 changes: 12 additions & 0 deletions devel/xpeviewer/files/patch-XOptions_xoptions.h
@@ -0,0 +1,12 @@
--- XOptions/xoptions.h.orig 2021-08-30 16:51:52 UTC
+++ XOptions/xoptions.h
@@ -35,6 +35,9 @@
#else
#include <QCoreApplication> // TODO Check
#endif
+#if defined(Q_OS_FREEBSD)
+#include <QStandardPaths>
+#endif

class XOptions : public QObject
{
4 changes: 4 additions & 0 deletions devel/xpeviewer/pkg-descr
@@ -0,0 +1,4 @@
This is versatile graphical viewer and editor for PE files,
based on the stock Qt libraries and a few custom components.

WWW: https://github.com/horsicq/XPEViewer
29 changes: 29 additions & 0 deletions devel/xpeviewer/pkg-plist
@@ -0,0 +1,29 @@
bin/xpeviewer
share/applications/xpeviewer.desktop
share/icons/hicolor/16x16/apps/xpeviewer.png
share/icons/hicolor/20x20/apps/xpeviewer.png
share/icons/hicolor/24x24/apps/xpeviewer.png
share/icons/hicolor/256x256/apps/xpeviewer.png
share/icons/hicolor/32x32/apps/xpeviewer.png
share/icons/hicolor/48x48/apps/xpeviewer.png
%%DATADIR%%/lang/xpeviewer_ar.qm
%%DATADIR%%/lang/xpeviewer_de.qm
%%DATADIR%%/lang/xpeviewer_es.qm
%%DATADIR%%/lang/xpeviewer_fr.qm
%%DATADIR%%/lang/xpeviewer_he.qm
%%DATADIR%%/lang/xpeviewer_id.qm
%%DATADIR%%/lang/xpeviewer_it.qm
%%DATADIR%%/lang/xpeviewer_ja.qm
%%DATADIR%%/lang/xpeviewer_ko.qm
%%DATADIR%%/lang/xpeviewer_pl.qm
%%DATADIR%%/lang/xpeviewer_pt_BR.qm
%%DATADIR%%/lang/xpeviewer_ru.qm
%%DATADIR%%/lang/xpeviewer_tr.qm
%%DATADIR%%/lang/xpeviewer_vi.qm
%%DATADIR%%/lang/xpeviewer_zh.qm
%%DATADIR%%/lang/xpeviewer_zh_TW.qm
%%DATADIR%%/qss/console.qss
%%DATADIR%%/qss/orange.qss
%%DATADIR%%/qss/orange_fix.qss
%%DATADIR%%/qss/veles.qss
%%DATADIR%%/signatures/crypto.db

0 comments on commit c1ea9f0

Please sign in to comment.