Skip to content

Commit

Permalink
app-crypt/veracrypt: Port to EAPI 7
Browse files Browse the repository at this point in the history
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: David Seifert <[email protected]>
  • Loading branch information
SoapGentoo committed Apr 17, 2021
1 parent c822024 commit 61e89d8
Showing 1 changed file with 16 additions and 20 deletions.
36 changes: 16 additions & 20 deletions app-crypt/veracrypt/veracrypt-1.24_p8.ebuild
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6
EAPI=7

WX_GTK_VER="3.0-gtk3"
inherit desktop eapi7-ver linux-info pax-utils toolchain-funcs wxwidgets
inherit desktop linux-info pax-utils toolchain-funcs wxwidgets

MY_PV="$(ver_cut 1-2)-Update$(ver_cut 4)_MacOSX"

DESCRIPTION="Disk encryption with strong security based on TrueCrypt"
HOMEPAGE="https://www.veracrypt.fr/en/Home.html"
SRC_URI="https://github.com/${PN}/VeraCrypt/archive/VeraCrypt_${MY_PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/VeraCrypt-VeraCrypt_${MY_PV}/src"

# The modules not linked against in Linux include (but not limited to):
# libzip, chacha-xmm, chacha256, chachaRng, rdrand, t1ha2
Expand All @@ -26,20 +28,15 @@ RDEPEND="
sys-fs/fuse:0
x11-libs/wxGTK:${WX_GTK_VER}[X?]
app-admin/sudo
dev-libs/pkcs11-helper
"
DEPEND="
${RDEPEND}
dev-libs/pkcs11-helper"
DEPEND="${RDEPEND}"
BDEPEND="
virtual/pkgconfig
asm? ( dev-lang/yasm )
"

S="${WORKDIR}/VeraCrypt-VeraCrypt_${MY_PV}/src"
asm? ( dev-lang/yasm )"

pkg_setup() {
local CONFIG_CHECK="~BLK_DEV_DM ~CRYPTO ~CRYPTO_XTS ~DM_CRYPT ~FUSE_FS"
linux-info_pkg_setup
CONFIG_CHECK="~BLK_DEV_DM ~CRYPTO ~CRYPTO_XTS ~DM_CRYPT ~FUSE_FS"

src_configure() {
setup-wxwidgets
}

Expand Down Expand Up @@ -67,32 +64,31 @@ src_compile() {
}

src_test() {
"${S}/Main/veracrypt" --text --test || die "tests failed"
./Main/veracrypt --text --test || die "tests failed"
}

src_install() {
local DOCS=( Readme.txt )
local HTML_DOCS=( )

dobin Main/veracrypt
if use doc; then
DOCS+=( "${S}"/../doc/EFI-DCS )
docompress -x "/usr/share/doc/${PF}/EFI-DCS"
HTML_DOCS+=( "${S}"/../doc/html/. )
docompress -x /usr/share/doc/${PF}/EFI-DCS
HTML_DOCS=( "${S}"/../doc/html/. )
fi
einstalldocs

newinitd "${FILESDIR}/${PN}.init" ${PN}
newinitd "${FILESDIR}"/veracrypt.init veracrypt

if use X; then
local s
for s in 16 48 128 256; do
newicon -s ${s} Resources/Icons/VeraCrypt-${s}x${s}.xpm veracrypt.xpm
done
make_desktop_entry ${PN} "VeraCrypt" ${PN} "Utility;Security"
make_desktop_entry veracrypt "VeraCrypt" veracrypt "Utility;Security"
fi

pax-mark -m "${D%/}/usr/bin/veracrypt"
pax-mark -m "${ED}"/usr/bin/veracrypt
}

pkg_postinst() {
Expand Down

0 comments on commit 61e89d8

Please sign in to comment.