commit:     2325b51c13b971cb6ac9de1702f8a1ece03ceb54
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Oct  5 15:52:31 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct  5 15:52:43 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2325b51c

app-forensics/magicrescue: use upstream path fixes

In 000ecf84a67fc8a38b223e471246f8f341a0954f, we drop the docdir sed
for recipes to get a quick fix so things start working again, but
let's import the upstream commit for using FHS paths in a new
revision to ~arch (as opposed to the new revision straight-to-stable
earlier to get things working ASAP) adn drop one of our own
patches moving some internal tools into /usr/bin as well.

Closes: https://bugs.gentoo.org/875383
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/magicrescue-1.1.10-fhs-paths.patch       | 67 ++++++++++++++++++++++
 .../magicrescue/magicrescue-1.1.10-r4.ebuild       | 33 +++++++++++
 2 files changed, 100 insertions(+)

diff --git a/app-forensics/magicrescue/files/magicrescue-1.1.10-fhs-paths.patch 
b/app-forensics/magicrescue/files/magicrescue-1.1.10-fhs-paths.patch
new file mode 100644
index 000000000000..e249f67f280d
--- /dev/null
+++ b/app-forensics/magicrescue/files/magicrescue-1.1.10-fhs-paths.patch
@@ -0,0 +1,67 @@
+https://github.com/jbj/magicrescue/commit/0426af2a23918d7064d58ac5f9a2a752eb329501
+https://bugs.gentoo.org/875383
+
+From 0426af2a23918d7064d58ac5f9a2a752eb329501 Mon Sep 17 00:00:00 2001
+From: Jonas Jensen <[email protected]>
+Date: Sun, 29 Aug 2021 20:14:33 +0200
+Subject: [PATCH] Debian's 040_fix-install.patch
+
+Description: fix and modernize install, in accordance with FHS 3.0
+Author: Joao Eriberto Mota Filho <[email protected]>
+Last-Update: 2020-04-06
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -56,32 +56,32 @@ docs-clean:
+ maintainer-clean: distclean docs-clean
+ 
+ install: all
+-      mkdir -p $(INSTALLDIR)/share/magicrescue/tools \
++      mkdir -p $(INSTALLDIR)/libexec/magicrescue/tools \
+           $(INSTALLDIR)/share/magicrescue/recipes \
+-          $(INSTALLDIR)/man/man1 \
++          $(INSTALLDIR)/share/man/man1 \
+           $(INSTALLDIR)/bin
+       
+       cp magicrescue$(EXE) dupemap$(EXE) magicsort $(INSTALLDIR)/bin/
+       cp recipes/* $(INSTALLDIR)/share/magicrescue/recipes/
+-      cp $(DOCS) $(INSTALLDIR)/man/man1
++      cp $(DOCS) $(INSTALLDIR)/share/man/man1
+       
+       for f in tools/*; do \
+         if [ -x "$$f" ]; then \
+-          cp -f "$$f" $(INSTALLDIR)/share/magicrescue/tools/; \
++          cp -f "$$f" $(INSTALLDIR)/libexec/magicrescue/tools/; \
+         fi; \
+       done
+-      cp -f tools/laola.pl $(INSTALLDIR)/share/magicrescue/tools/
++      cp -f tools/laola.pl $(INSTALLDIR)/libexec/magicrescue/tools/
++      chmod 755 $(INSTALLDIR)/libexec/magicrescue/tools/laola.pl
+ 
+ uninstall:
+       rm -f $(INSTALLDIR)/bin/magicrescue$(EXE)
+       rm -f $(INSTALLDIR)/bin/dupemap$(EXE)
+       rm -f $(INSTALLDIR)/bin/magicsort
+       for f in $(DOCS); do \
+-         rm -f "$(INSTALLDIR)/man/man1/`basename $$f`"; \
++         rm -f "$(INSTALLDIR)/share/man/man1/`basename $$f`"; \
+       done
+-      rm -rf $(INSTALLDIR)/share/magicrescue/tools
+-      rm -rf $(INSTALLDIR)/share/magicrescue/recipes
+-      -rmdir $(INSTALLDIR)/share/magicrescue
++      rm -rf $(INSTALLDIR)/libexec/magicrescue/
++      rm -rf $(INSTALLDIR)/share/magicrescue/
+ 
+ .PHONY: all clean distclean docs-clean maintainer-clean install uninstall docs
+ 
+--- a/config.d/80magicrescue_defs
++++ b/config.d/80magicrescue_defs
+@@ -1,7 +1,7 @@
+ #!/bin/sh
+ 
+ cat >> config.h << EOF
+-#define COMMAND_PATH "$prefix/share/magicrescue/tools"
++#define COMMAND_PATH "$prefix/libexec/magicrescue/tools"
+ #define RECIPE_PATH  "$prefix/share/magicrescue/recipes"
+ #include "largefile.h"
+ EOF
+

diff --git a/app-forensics/magicrescue/magicrescue-1.1.10-r4.ebuild 
b/app-forensics/magicrescue/magicrescue-1.1.10-r4.ebuild
new file mode 100644
index 000000000000..ee0ae748835b
--- /dev/null
+++ b/app-forensics/magicrescue/magicrescue-1.1.10-r4.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Find deleted files in block devices"
+HOMEPAGE="https://github.com/jbj/magicrescue";
+SRC_URI="https://github.com/jbj/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+# - File collision with net-mail/safecat, bug #702004
+# - BDEPEND on perl for pod2man, bug #852671
+DEPEND="sys-libs/gdbm:="
+RDEPEND="${DEPEND}
+       !net-mail/safecat"
+BDEPEND="dev-lang/perl"
+
+PATCHES=(
+       "${FILESDIR}/${P}-ldflags.patch"
+       "${FILESDIR}/${P}-fhs-paths.patch"
+)
+
+src_configure() {
+       tc-export CC
+
+       # Not autotools, just looks like it sometimes
+       ./configure --prefix=/usr || die
+}

Reply via email to