diff options
author | Michael Mair-Keimberger <mmk@levelnine.at> | 2024-06-04 19:51:40 +0200 |
---|---|---|
committer | Conrad Kostecki <conikost@gentoo.org> | 2024-06-22 20:46:18 +0200 |
commit | b3d9b57e96ef096032758f82a4edbd8e289f13cb (patch) | |
tree | c8fabac0454c196626e69bcfe1f1c15951be6596 /app-crypt/aescrypt | |
parent | app-cdr/extract-xiso: add 2.7.1_p202303040307 (diff) | |
download | gentoo-b3d9b57e96ef096032758f82a4edbd8e289f13cb.tar.gz gentoo-b3d9b57e96ef096032758f82a4edbd8e289f13cb.tar.bz2 gentoo-b3d9b57e96ef096032758f82a4edbd8e289f13cb.zip |
app-crypt/aescrypt: add 3.16
Signed-off-by: Michael Mair-Keimberger <mmk@levelnine.at>
Closes: https://bugs.gentoo.org/832779
Closes: https://github.com/gentoo/gentoo/pull/37024
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'app-crypt/aescrypt')
-rw-r--r-- | app-crypt/aescrypt/Manifest | 1 | ||||
-rw-r--r-- | app-crypt/aescrypt/aescrypt-3.16.ebuild | 74 | ||||
-rw-r--r-- | app-crypt/aescrypt/files/aescrypt-3.16-iconv.patch | 24 |
3 files changed, 99 insertions, 0 deletions
diff --git a/app-crypt/aescrypt/Manifest b/app-crypt/aescrypt/Manifest index bb3e8f0201d3..b75e3dd1293c 100644 --- a/app-crypt/aescrypt/Manifest +++ b/app-crypt/aescrypt/Manifest @@ -1 +1,2 @@ DIST aescrypt-3.14.tgz 38742 BLAKE2B 7122cb0246e28fd1301c58c13145c47ea3e20c8af61efc4115eec8a7ade720ecf2093f2e0156c05eb6cbb6e403bbeb3624745609f0ec1f2fd477edbd876e3373 SHA512 ac06604e2121f0c0f098e87d43c493b7285c58ac7419c284e6a93218dfa7381d4ca69ee775842fde89226092e05978d662eddefe734afe38f67b28df68d87b68 +DIST aescrypt-3.16.tgz 39167 BLAKE2B 622976f55e33e98ede6488ee874d2f3371f928a8827d7973d967ddf253112eeb96036d2a7d4f8df7c1c9013e104d39fa5df9c28a7fce121cd11590a98e960c3a SHA512 b6d4fda92bb465c36a9930de0d86777111d2da67f2aa274fb98fcd99629c7ff2d88d8faffdbeeae25c44dc99f0f29b2872867128b7e3a384deada744ce21cdd0 diff --git a/app-crypt/aescrypt/aescrypt-3.16.ebuild b/app-crypt/aescrypt/aescrypt-3.16.ebuild new file mode 100644 index 000000000000..8c924a8ec2b4 --- /dev/null +++ b/app-crypt/aescrypt/aescrypt-3.16.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs flag-o-matic desktop xdg + +DESCRIPTION="Advanced file encryption using AES" +HOMEPAGE="https://www.aescrypt.com/" +SRC_URI="https://www.aescrypt.com/download/v$(ver_cut 1)/linux/${P}.tgz" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm64" +IUSE="static X" + +RDEPEND=" + X? ( + || ( gnome-extra/zenity kde-apps/kdialog ) + dev-lang/perl + ) + " + +PATCHES=( + "${FILESDIR}/${P}-iconv.patch" +) + +src_prepare() { + sed -i \ + -e 's:Icon=/usr/share/aescrypt/SmallLock.png:Icon=SmallLock:' \ + -e 's|Categories=Application;Utility;TextEditor;|Categories=Utility;TextEditor;|' \ + gui/AESCrypt.desktop || die + + default +} + +src_compile() { + if use static; then + append-cflags "-DDISABLE_ICONV" + append-ldflags "-static" + fi + cd src || die + emake \ + CFLAGS="${CFLAGS} -Wall -Wextra -pedantic -std=c99 -D_FILE_OFFSET_BITS=64" \ + LDFLAGS="${LDFLAGS}" \ + CC="$(tc-getCC)" +} + +src_test() { + cd src || die + emake -j1 test \ + CFLAGS="${CFLAGS} -Wall -Wextra -pedantic -std=c99 -D_FILE_OFFSET_BITS=64" \ + LDFLAGS="${LDFLAGS}" \ + CC="$(tc-getCC)" +} + +src_install() { + dobin src/{aescrypt,aescrypt_keygen} + doman man/* + doicon gui/SmallLock.png + domenu gui/AESCrypt.desktop + dobin gui/aescrypt-gui +} + +pkg_postinst() { + xdg_pkg_postinst + if use X; then + einfo 'The .desktop file for aescrypt is only supposed to be used with "Open With"' + einfo 'to encrypt and decrypt files.' + einfo 'See:' + einfo ' https://www.aescrypt.com/linux_aes_crypt.html' + einfo 'for more information' + fi +} diff --git a/app-crypt/aescrypt/files/aescrypt-3.16-iconv.patch b/app-crypt/aescrypt/files/aescrypt-3.16-iconv.patch new file mode 100644 index 000000000000..1993e1133e1b --- /dev/null +++ b/app-crypt/aescrypt/files/aescrypt-3.16-iconv.patch @@ -0,0 +1,24 @@ +--- a/src/password.c ++++ b/src/password.c +@@ -300,6 +300,15 @@ + size_t ic_inbytesleft, + ic_outbytesleft; + ++#ifdef DISABLE_ICONV ++ /* support only latin */ ++ int i; ++ for (i=0;i<length+1;i++) { ++ out_passwd[i*2] = in_passwd[i]; ++ out_passwd[i*2+1] = 0; ++ } ++ return length*2; ++#else + // Max length is specified in character, but this function deals + // with bytes. So, multiply by two since we are going to create a + // UTF-16 string. +@@ -349,4 +358,5 @@ + iconv_close(condesc); + + return (max_length - ic_outbytesleft); ++#endif + } |