git: ffecc90317e8 - main - sysutils/ddrescueview: Add new port

From: Rainer Hurling <rhurlin_at_FreeBSD.org>
Date: Sun, 12 May 2024 16:52:26 UTC
The branch main has been updated by rhurlin:

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

commit ffecc90317e88d84479e8b0eedcad0405b0dbfb1
Author:     Rainer Hurling <rhurlin@FreeBSD.org>
AuthorDate: 2024-05-12 16:39:00 +0000
Commit:     Rainer Hurling <rhurlin@FreeBSD.org>
CommitDate: 2024-05-12 16:48:58 +0000

    sysutils/ddrescueview: Add new port
    
    Small tool that allows the user to graphically examine ddrescue's
    mapfiles in a user friendly GUI application.
    
    Features:
    - Display ddrescue mapfile in a colored block graphic
    - Examine each block in the image with a detailed list of map
      entries inside
    - Zoom inside the mapfile, down to sector level
    - To keep track of the rescue process, ddrescueview can automatically
      re-read the mapfile
    - Overlay a domain mapfile, if you use one with ddrescue
    - Units can be displayed with decimal (KB, MB...) or binary
      (KiB, MiB...) prefixes
    
    WIKI: https://sourceforge.net/p/ddrescueview/wiki/Manual-0.4.5/
---
 sysutils/Makefile               |  1 +
 sysutils/ddrescueview/Makefile  | 49 +++++++++++++++++++++++++++++++++++++++++
 sysutils/ddrescueview/distinfo  |  3 +++
 sysutils/ddrescueview/pkg-descr |  7 ++++++
 sysutils/ddrescueview/pkg-plist | 13 +++++++++++
 5 files changed, 73 insertions(+)

diff --git a/sysutils/Makefile b/sysutils/Makefile
index 4895382f1348..719c74d68994 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -287,6 +287,7 @@
     SUBDIR += ddh
     SUBDIR += ddpt
     SUBDIR += ddrescue
+    SUBDIR += ddrescueview
     SUBDIR += debhelper
     SUBDIR += debootstrap
     SUBDIR += deltarpm
diff --git a/sysutils/ddrescueview/Makefile b/sysutils/ddrescueview/Makefile
new file mode 100644
index 000000000000..8545722c8cce
--- /dev/null
+++ b/sysutils/ddrescueview/Makefile
@@ -0,0 +1,49 @@
+PORTNAME=	ddrescueview
+PORTVERSION=	0.4.5
+CATEGORIES=	sysutils
+MASTER_SITES=	https://sourceforge.net/projects/${PORTNAME}/files/Test%20builds/v${PORTVERSION}/
+PKGNAMESUFFIX=	${LAZARUS_PKGNAMESUFFIX}
+DISTNAME=	${PORTNAME}-source-${PORTVERSION}
+
+MAINTAINER=	rhurlin@FreeBSD.org
+COMMENT=	Graphical viewer for GNU ddrescue mapfiles
+WWW=		https://sourceforge.net/projects/ddrescueview/
+
+LICENSE=	GPLv3
+
+gtk2_CONFLICTS_INSTALL=	${PORTNAME}-qt5 ${PORTNAME}-qt6
+qt5_CONFLICTS_INSTALL=	${PORTNAME}-gtk2 ${PORTNAME}-qt6
+qt6_CONFLICTS_INSTALL=	${PORTNAME}-gtk2 ${PORTNAME}-qt5
+
+USES=		desktop-file-utils dos2unix fpc gnome lazarus:flavors tar:xz xorg
+DOS2UNIX_REGEX=	.*\.([txt]|pas|lpi|lpr|txt)
+USE_GNOME_gtk2=	cairo gdkpixbuf2 glib20 pango
+USE_GNOME+=	${USE_GNOME_${FLAVOR}}
+USE_XORG=	x11
+
+LAZARUS_PROJECT_FILES=	source/ddrescueview.lpi
+LAZARUS_PROJECT_FILES+=	source/ddrescueview.lpr
+LAZBUILD_ARGS=		-d
+
+OPTIONS_DEFINE=	DOCS
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/source/${PORTNAME} \
+		${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+	${INSTALL_MAN} ${WRKSRC}/resources/linux/man/man1/ddrescueview.1 \
+		${STAGEDIR}${PREFIX}/share/man/man1
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/48x48/apps
+.for i in 16 22 24 32 48 64 128 256
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${i}x${i}/apps/
+	${INSTALL_DATA} ${WRKSRC}/resources/linux/icons/hicolor/${i}x${i}/apps/${PORTNAME}.png \
+		${STAGEDIR}${PREFIX}/share/icons/hicolor/${i}x${i}/apps/
+.endfor
+	${INSTALL_DATA} ${WRKSRC}/resources/linux/applications/ddrescueview.desktop \
+		${STAGEDIR}${PREFIX}/share/applications
+
+do-install-DOCS-on:
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/changelog.txt ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/readme.txt ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
diff --git a/sysutils/ddrescueview/distinfo b/sysutils/ddrescueview/distinfo
new file mode 100644
index 000000000000..714de6f58a8d
--- /dev/null
+++ b/sysutils/ddrescueview/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1715502796
+SHA256 (ddrescueview-source-0.4.5.tar.xz) = 57383c394e62612ce2a799438b00c6e3c465c31f9ba940e077f624e2e7028465
+SIZE (ddrescueview-source-0.4.5.tar.xz) = 211184
diff --git a/sysutils/ddrescueview/pkg-descr b/sysutils/ddrescueview/pkg-descr
new file mode 100644
index 000000000000..085083eb3b02
--- /dev/null
+++ b/sysutils/ddrescueview/pkg-descr
@@ -0,0 +1,7 @@
+This small tool allows the user to graphically examine ddrescue's
+mapfiles in a user friendly GUI application. The Main window displays
+a block grid with each block's color representing the block types it
+contains. Many people know this type of view from defragmentation
+programs.
+
+WIKI: https://sourceforge.net/p/ddrescueview/wiki/Manual-0.4.5/
diff --git a/sysutils/ddrescueview/pkg-plist b/sysutils/ddrescueview/pkg-plist
new file mode 100644
index 000000000000..35afd40f0071
--- /dev/null
+++ b/sysutils/ddrescueview/pkg-plist
@@ -0,0 +1,13 @@
+bin/ddrescueview
+share/applications/ddrescueview.desktop
+%%DOCSDIR%%/changelog.txt
+%%DOCSDIR%%/readme.txt
+share/icons/hicolor/128x128/apps/ddrescueview.png
+share/icons/hicolor/16x16/apps/ddrescueview.png
+share/icons/hicolor/22x22/apps/ddrescueview.png
+share/icons/hicolor/24x24/apps/ddrescueview.png
+share/icons/hicolor/256x256/apps/ddrescueview.png
+share/icons/hicolor/32x32/apps/ddrescueview.png
+share/icons/hicolor/48x48/apps/ddrescueview.png
+share/icons/hicolor/64x64/apps/ddrescueview.png
+share/man/man1/ddrescueview.1.gz