app-forensics/magicrescue: use upstream path fixes

In 000ecf84a6, 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@gentoo.org>
This commit is contained in:
Sam James
2022-10-05 16:52:31 +01:00
parent 54ca921461
commit 2325b51c13
2 changed files with 100 additions and 0 deletions

View File

@@ -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 <jbj@knef.dk>
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 <eriberto@debian.org>
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

View File

@@ -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
}