app-crypt/tomb: add 2.13

* EAPI 8
* Migrate to Qt6
* Remove unusual/unheard of files that don't seem to integrate with
  other tools
  - /etc/menu/tomb
  - /usr/lib/mime/packages/tomb
* Wire up tests where possible

Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
This commit is contained in:
Lucio Sauer
2025-12-02 12:54:09 +01:00
parent 3e1e7cb350
commit a9cf0836b0
4 changed files with 172 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST Tomb-2.13.tar.gz 4883377 BLAKE2B e8c2b4185c8142e54cc3de6757753c2ef431759f10de3841424a1fda488729bcba39fd356d151c0605b6374abff5a32fc8a9455fcc556ffd776308aeabf46339 SHA512 0b9e7502341df5985c9202b068b64ccf20328f1aedba19b692d40af8aa3970cd6de9ecacb832100c09212c08fca740566f92e7c7a8dab8ff0093da4756f0d76d
DIST Tomb-2.9.tar.gz 4742346 BLAKE2B 16e287295c11f711a1fbe0f6658ed9b669de52d3766f633a1d94c3cb7d08472bbd2f03e2e3bffe1076b9c182e2441a906bebcd158f547146a94b9b96daf9b5e4 SHA512 425ee50130cf8b8c60488ec53aa17381f54371e624ae0211a079b7148741c28d5b7c9b6623eebe987079df890ef0fad0aa8c1daa1c7fbb79dbb502e511be20b6

View File

@@ -0,0 +1,11 @@
--- a/extras/gtomb/gtomb
+++ b/extras/gtomb/gtomb
@@ -20,7 +20,7 @@
# {{{ SETTINGS
ver="0.9.1"
-KDFPATH="/usr/libexec/tomb" # Path of your KDF binaries (if you're using them).
+KDFPATH="/usr/bin" # Path of your KDF binaries (if you're using them).
SWAPOFF="false" # Set to "true" to swapoff, or "false" to use -f (force) flag.
# The ones below should not need changing
TOMBPATH="$(which tomb)" # Tomb executable's path

View File

@@ -0,0 +1,15 @@
Fix file system location of localization file.
From: Lucio Sauer <watermanpaint@posteo.net>
--- a/extras/qt-tray/main.cpp
+++ b/extras/qt-tray/main.cpp
@@ -30,7 +30,8 @@ int main(int argc, char *argv[])
QTranslator translator(0);
- translator.load( QString("./i18n/tomb-qt-tray_") + QLocale::system().name() );
+ translator.load( QString("tomb-qt-tray_it"),
+ "@GENTOO_PORTAGE_EPREFIX@/usr/share/locale/it_IT/LC_MESSAGES");
a.installTranslator( &translator );
//w.show();

View File

@@ -0,0 +1,145 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop optfeature prefix qmake-utils toolchain-funcs xdg
DESCRIPTION="The Linux Crypto Undertaker"
HOMEPAGE="
https://dyne.org/software/tomb/
https://github.com/dyne/Tomb
"
SRC_URI="https://files.dyne.org/tomb/releases/Tomb-${PV}.tar.gz"
S="${WORKDIR}/${P^}"
# doc/literate/shocco - MIT
LICENSE="GPL-3 MIT gui? ( GPL-3+ )"
SLOT="0"
KEYWORDS="~amd64"
IUSE="gui tray"
PATCHES=(
"${FILESDIR}/${P}-gtomb.patch"
"${FILESDIR}/${P}-qt-tray.patch"
"${FILESDIR}/${PN}-2.9-respect-ldflags.patch"
)
DEPEND="
dev-libs/libgcrypt:=
tray? (
dev-qt/qtbase:6[gui,network,widgets]
dev-qt/qtdeclarative:6
)
"
RDEPEND="
${DEPEND}
app-crypt/gnupg
app-crypt/pinentry
app-shells/zsh
sys-fs/cryptsetup
sys-fs/e2fsprogs[tools]
gui? ( gnome-extra/zenity )
"
BDEPEND="
dev-python/markdown
dev-python/pygments
sys-devel/gettext
"
src_prepare() {
default
hprefixify tomb extras/gtomb
eprefixify extras/qt-tray/main.cpp
}
src_compile() {
export CFLAGS LDFLAGS PREFIX="${EPREFIX}/usr"
tc-export CC
emake all -C extras/kdf-keys
emake all -C doc/literate
if use tray ; then
pushd extras/qt-tray > /dev/null || die
eqmake6
emake all
popd > /dev/null || die
fi
}
src_test() {
# test require sudo, can't be done non interactively
# emake TEST_OPTS="--verbose --immediate --root="${T}"/tomb/sharness" test
emake test -C extras/kdf-keys
}
src_install() {
local -x DESTDIR="${D}"
default
emake install -C extras/translations
emake install -C extras/kdf-keys
if use gui ; then
pushd extras/gtomb > /dev/null || die
dobin gtomb
newdoc README.md README-gtomb
popd > /dev/null || die
fi
if use tray ; then
pushd extras/qt-tray > /dev/null || die
dobin tomb-qt-tray
doicon pixmaps/tomb_icon.png
insinto /usr/share/locale/it_IT/LC_MESSAGES
doins i18n/tomb-qt-tray_it.qm
popd > /dev/null || die
fi
pushd extras/gtk-tray > /dev/null || die
doicon monmort.xpm
newicon --context mimetypes --size 32 monmort.xpm monmort
newicon --size 32 monmort.xpm dyne-monmort
popd > /dev/null || die
pushd extras/desktop > /dev/null || die
insinto /usr/share/mime/packages
doins dyne-tomb.xml
domenu tomb.desktop
insinto /usr/share/mime-info
doins tomb.mime
doins tomb.keys
insinto /usr/share/application-registry
doins tomb.applications
popd > /dev/null || die
local DOCS=(
AUTHORS.txt
ChangeLog.txt
KNOWN_BUGS.txt
README.txt
doc/bertini_thesis.pdf
doc/HACKING.txt
doc/KEY_SPECIFICATIONS.txt
doc/LinuxHDEncSettings.txt
doc/Luks_on_disk_format.pdf
doc/New_methods_in_HD_encryption.pdf
doc/TKS1-draft.pdf
doc/tomb_manpage.pdf
)
einstalldocs
cd doc/literate || die
docinto html
dodoc -r *.html *.css public
}
pkg_postinst() {
xdg_pkg_postinst
optfeature "Argon2 KDF" app-crypt/argon2
optfeature "ACL" sys-apps/acl
optfeature "privilege escalation to superuser" app-admin/doas app-admin/sudo sys-auth/polkit
optfeature "fancy dd output" sys-apps/dcfldd
optfeature "tomb index/search file contents" app-misc/recoll
optfeature "tomb index/search file names" sys-apps/mlocate sys-apps/plocate
optfeature "tomb engrave" "media-gfx/qrencode[png]"
optfeature "tomb slam" sys-process/lsof
}