git: 026cc85b519d - main - devel/xelfviewer: new port had been added (+)

From: Alexey Dokuchaev <danfe_at_FreeBSD.org>
Date: Thu, 18 Nov 2021 11:24:41 UTC
The branch main has been updated by danfe:

URL: https://cgit.FreeBSD.org/ports/commit/?id=026cc85b519d1a6b852894d01ac68a2a8a666ff2

commit 026cc85b519d1a6b852894d01ac68a2a8a666ff2
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2021-11-18 11:23:08 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2021-11-18 11:23:08 +0000

    devel/xelfviewer: new port had been added (+)
    
    This is versatile graphical viewer and editor for ELF files,
    based on the stock Qt libraries and a few custom components.
    
    WWW: https://github.com/horsicq/XELFViewer
---
 devel/Makefile                                     |  1 +
 devel/xelfviewer/Makefile                          | 56 ++++++++++++++++++++++
 devel/xelfviewer/distinfo                          | 47 ++++++++++++++++++
 devel/xelfviewer/files/patch-XOptions_xoptions.cpp | 22 +++++++++
 devel/xelfviewer/files/patch-XOptions_xoptions.h   | 12 +++++
 devel/xelfviewer/pkg-descr                         |  4 ++
 devel/xelfviewer/pkg-plist                         | 29 +++++++++++
 7 files changed, 171 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index cb27a45d097e..dd9d7395105f 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -7181,6 +7181,7 @@
     SUBDIR += xdg-user-dirs
     SUBDIR += xdg-utils
     SUBDIR += xdgpaths
+    SUBDIR += xelfviewer
     SUBDIR += xeus
     SUBDIR += xeus-cling
     SUBDIR += xfce4-dev-tools
diff --git a/devel/xelfviewer/Makefile b/devel/xelfviewer/Makefile
new file mode 100644
index 000000000000..151affd00b4c
--- /dev/null
+++ b/devel/xelfviewer/Makefile
@@ -0,0 +1,56 @@
+# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
+
+PORTNAME=	${GH_PROJECT:[1]:tl}
+PORTVERSION=	0.03
+CATEGORIES=	devel
+
+MAINTAINER=	danfe@FreeBSD.org
+COMMENT=	Cross-platform graphical ELF file viewer/editor
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		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=	XELFViewer ${GH_SUBDIR}
+GH_TAGNAME=	1ae8d31:c ed0fba7:fd 65ef8ae:fw 0fbdbfb:f 0378c3d:sa \
+		a0980b6:sc d5f5ce4:xa a9da5dd:xc 76405a6:xcf fa28140:xdex \
+		c540d31:xd 10bc917:xdw 1a54d75:xdv 83db895:xew c4c41b8:xhw \
+		c711a41:xhv 1f3f4c3:xmmw e0d2b0d:xo b0ffc17:xq 5d9d990:xs \
+		1d23cca:xst 9fcacfa:s
+GH_SUBDIR=	Controls:c FormatDialogs:fd FormatWidgets:fw Formats:f \
+		SpecAbstract:sa StaticScan:sc 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
diff --git a/devel/xelfviewer/distinfo b/devel/xelfviewer/distinfo
new file mode 100644
index 000000000000..7e4aebb98e6f
--- /dev/null
+++ b/devel/xelfviewer/distinfo
@@ -0,0 +1,47 @@
+TIMESTAMP = 1630527037
+SHA256 (horsicq-XELFViewer-0.03_GH0.tar.gz) = f07aad9f5b157a8d8225cfef3697c6e7dc81bdd9a99c7538528679ab69a85e7e
+SIZE (horsicq-XELFViewer-0.03_GH0.tar.gz) = 1226769
+SHA256 (horsicq-Controls-1ae8d31_GH0.tar.gz) = beac697b32e01a92dc31eb93d7fe445ddf76bc82e2c6bf053a9b2447d91a1309
+SIZE (horsicq-Controls-1ae8d31_GH0.tar.gz) = 12876
+SHA256 (horsicq-FormatDialogs-ed0fba7_GH0.tar.gz) = d469207f71b333c96dbafda72f2286889c6592f6144a9a0306ad66ab5c5ae555
+SIZE (horsicq-FormatDialogs-ed0fba7_GH0.tar.gz) = 11238
+SHA256 (horsicq-FormatWidgets-65ef8ae_GH0.tar.gz) = d49bd697ad80d0f46b6d5e84fa80bcd57ea68e4a5d31f801ce1e1e08753bc1a9
+SIZE (horsicq-FormatWidgets-65ef8ae_GH0.tar.gz) = 184601
+SHA256 (horsicq-Formats-0fbdbfb_GH0.tar.gz) = 4406e60e7d3151ef5ab18db96ac5e1c0160d98cb3c7c3d4116933ca4201e0c07
+SIZE (horsicq-Formats-0fbdbfb_GH0.tar.gz) = 153105
+SHA256 (horsicq-SpecAbstract-0378c3d_GH0.tar.gz) = f76b3a12546c53249ae82a6cee62a941e3dbcd0f102fad18b645d820bc57ffc6
+SIZE (horsicq-SpecAbstract-0378c3d_GH0.tar.gz) = 163871
+SHA256 (horsicq-StaticScan-a0980b6_GH0.tar.gz) = ad1b42ffc75ba51847aeb21cdcaecd78be4908c1e4c738c5c73fc738b1e88523
+SIZE (horsicq-StaticScan-a0980b6_GH0.tar.gz) = 11810
+SHA256 (horsicq-XArchive-d5f5ce4_GH0.tar.gz) = 9a4c82963e0506d175a5f1ea8cc2758450839159ae24b7666718fe4f13e12a9d
+SIZE (horsicq-XArchive-d5f5ce4_GH0.tar.gz) = 933774
+SHA256 (horsicq-XCapstone-a9da5dd_GH0.tar.gz) = f9f5dc3bd8feb128e1e7a7837eaf362135ea54e945b5912c1c5023a0463c6172
+SIZE (horsicq-XCapstone-a9da5dd_GH0.tar.gz) = 8617973
+SHA256 (horsicq-XCppfilt-76405a6_GH0.tar.gz) = cb5a463a845e1e884956976ee2f0999f2487c6e11c20b79f9fd177352b9ae918
+SIZE (horsicq-XCppfilt-76405a6_GH0.tar.gz) = 373083
+SHA256 (horsicq-XDEX-fa28140_GH0.tar.gz) = 53e564737cf3f826efc867cd8e67c12deffb84a02c17470045aac9e162c80f0e
+SIZE (horsicq-XDEX-fa28140_GH0.tar.gz) = 10569
+SHA256 (horsicq-XDemangle-c540d31_GH0.tar.gz) = e7d74862b7a86adc7a65cf74c68f6a54a193b0ade99fb7e5c86793474137d443
+SIZE (horsicq-XDemangle-c540d31_GH0.tar.gz) = 22273
+SHA256 (horsicq-XDemangleWidget-10bc917_GH0.tar.gz) = 7b0051f061d5af1576676abfdc95864d490cff3b9e333e3f2aaa58e6dab09b85
+SIZE (horsicq-XDemangleWidget-10bc917_GH0.tar.gz) = 3229
+SHA256 (horsicq-XDisasmView-1a54d75_GH0.tar.gz) = b38970d8b5ad6fd6f037970771e43b07275ba533f66f003ad69db0c40881bfff
+SIZE (horsicq-XDisasmView-1a54d75_GH0.tar.gz) = 13400
+SHA256 (horsicq-XEntropyWidget-83db895_GH0.tar.gz) = 7b13ce4e0be0b9b4e6a6675dde4bc52848c7ed8c321f1b3da29533e9868b9cc2
+SIZE (horsicq-XEntropyWidget-83db895_GH0.tar.gz) = 10086
+SHA256 (horsicq-XHashWidget-c4c41b8_GH0.tar.gz) = 66d6a27c2d3aaaa74c44d170a975907dd67b76da08603e1909633986702a98b5
+SIZE (horsicq-XHashWidget-c4c41b8_GH0.tar.gz) = 6639
+SHA256 (horsicq-XHexView-c711a41_GH0.tar.gz) = 617d3e61c02a7a2a0d7b4b70b2d9457bb0f482aae9b5b5b1873e30967ff6c6cc
+SIZE (horsicq-XHexView-c711a41_GH0.tar.gz) = 8560
+SHA256 (horsicq-XMemoryMapWidget-1f3f4c3_GH0.tar.gz) = 58e77b0bbbd025390d64044af7e2e5efecc4c817cd9b79ec71062d4778ee0483
+SIZE (horsicq-XMemoryMapWidget-1f3f4c3_GH0.tar.gz) = 6151
+SHA256 (horsicq-XOptions-e0d2b0d_GH0.tar.gz) = 0ca8ca691d3d9a69ccbe6fa0d7aa0654287e8c5a345b10859c65e523e72f27dd
+SIZE (horsicq-XOptions-e0d2b0d_GH0.tar.gz) = 6235
+SHA256 (horsicq-XQwt-b0ffc17_GH0.tar.gz) = 5990bf9751b67f80e503a3ced4af525953b2d4235d151b319238fafbd0a3630f
+SIZE (horsicq-XQwt-b0ffc17_GH0.tar.gz) = 343304
+SHA256 (horsicq-XShortcuts-5d9d990_GH0.tar.gz) = fea0ab3fa73e548c37ad5430aded7e1b15b22991138d686aceb21d4324bd58da
+SIZE (horsicq-XShortcuts-5d9d990_GH0.tar.gz) = 9185
+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
diff --git a/devel/xelfviewer/files/patch-XOptions_xoptions.cpp b/devel/xelfviewer/files/patch-XOptions_xoptions.cpp
new file mode 100644
index 000000000000..78bd770151f7
--- /dev/null
+++ b/devel/xelfviewer/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
diff --git a/devel/xelfviewer/files/patch-XOptions_xoptions.h b/devel/xelfviewer/files/patch-XOptions_xoptions.h
new file mode 100644
index 000000000000..e3b7098117bd
--- /dev/null
+++ b/devel/xelfviewer/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
+ {
diff --git a/devel/xelfviewer/pkg-descr b/devel/xelfviewer/pkg-descr
new file mode 100644
index 000000000000..e5a6d6bab4fb
--- /dev/null
+++ b/devel/xelfviewer/pkg-descr
@@ -0,0 +1,4 @@
+This is versatile graphical viewer and editor for ELF files,
+based on the stock Qt libraries and a few custom components.
+
+WWW: https://github.com/horsicq/XELFViewer
diff --git a/devel/xelfviewer/pkg-plist b/devel/xelfviewer/pkg-plist
new file mode 100644
index 000000000000..cd4990efe85d
--- /dev/null
+++ b/devel/xelfviewer/pkg-plist
@@ -0,0 +1,29 @@
+bin/xelfviewer
+share/applications/xelfviewer.desktop
+share/icons/hicolor/16x16/apps/xelfviewer.png
+share/icons/hicolor/20x20/apps/xelfviewer.png
+share/icons/hicolor/24x24/apps/xelfviewer.png
+share/icons/hicolor/32x32/apps/xelfviewer.png
+share/icons/hicolor/48x48/apps/xelfviewer.png
+share/icons/hicolor/256x256/apps/xelfviewer.png
+%%DATADIR%%/lang/xelfviewer_ar.qm
+%%DATADIR%%/lang/xelfviewer_de.qm
+%%DATADIR%%/lang/xelfviewer_es.qm
+%%DATADIR%%/lang/xelfviewer_fr.qm
+%%DATADIR%%/lang/xelfviewer_he.qm
+%%DATADIR%%/lang/xelfviewer_id.qm
+%%DATADIR%%/lang/xelfviewer_it.qm
+%%DATADIR%%/lang/xelfviewer_ja.qm
+%%DATADIR%%/lang/xelfviewer_ko.qm
+%%DATADIR%%/lang/xelfviewer_pl.qm
+%%DATADIR%%/lang/xelfviewer_pt_BR.qm
+%%DATADIR%%/lang/xelfviewer_ru.qm
+%%DATADIR%%/lang/xelfviewer_tr.qm
+%%DATADIR%%/lang/xelfviewer_vi.qm
+%%DATADIR%%/lang/xelfviewer_zh.qm
+%%DATADIR%%/lang/xelfviewer_zh_TW.qm
+%%DATADIR%%/qss/console.qss
+%%DATADIR%%/qss/orange.qss
+%%DATADIR%%/qss/orange_fix.qss
+%%DATADIR%%/qss/veles.qss
+%%DATADIR%%/signatures/crypto.db