diff options
author | Peter Alfredsen <crabbedhaloablution@icloud.com> | 2020-12-15 21:11:49 +0100 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2021-01-05 10:32:42 +0200 |
commit | 70d345eb10ba4285c0c198ddb6ef3ac3d7365eb5 (patch) | |
tree | 53f30429db006c01298d6dfd9299c6b20991e5ff /app-crypt/aescrypt | |
parent | dev-util/clion: remove old version (diff) | |
download | gentoo-70d345eb10ba4285c0c198ddb6ef3ac3d7365eb5.tar.gz gentoo-70d345eb10ba4285c0c198ddb6ef3ac3d7365eb5.tar.bz2 gentoo-70d345eb10ba4285c0c198ddb6ef3ac3d7365eb5.zip |
app-crypt/aescrypt: bump to 3.14
Closes: https://bugs.gentoo.org/702736
Closes: https://bugs.gentoo.org/722028
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Peter Alfredsen <crabbedhaloablution@icloud.com>
Closes: https://github.com/gentoo/gentoo/pull/18670
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'app-crypt/aescrypt')
-rw-r--r-- | app-crypt/aescrypt/Manifest | 1 | ||||
-rw-r--r-- | app-crypt/aescrypt/aescrypt-3.14.ebuild | 69 | ||||
-rw-r--r-- | app-crypt/aescrypt/files/aescrypt-3.14-iconv.patch | 40 |
3 files changed, 110 insertions, 0 deletions
diff --git a/app-crypt/aescrypt/Manifest b/app-crypt/aescrypt/Manifest index fea2cb864777..1980050f678a 100644 --- a/app-crypt/aescrypt/Manifest +++ b/app-crypt/aescrypt/Manifest @@ -1 +1,2 @@ DIST aescrypt-3.0.6b.tar.gz 28272 BLAKE2B ce5347b77d974c76dadaa820b5b90a56015019f846bbc61560c33032adad08576d5e5ddd7d9e1020878e35b40173a2c5e29578e2f6e98631725442beac6f19ac SHA512 4c88abc9bff50ae5d310be7dad8f29843941843f9b484d9846b08dc76c605940adbb375f7e8ffefd6e8236f35ff860a745f89226e9c171bfa70c28c16aa6626a +DIST aescrypt-3.14.tgz 38742 BLAKE2B 7122cb0246e28fd1301c58c13145c47ea3e20c8af61efc4115eec8a7ade720ecf2093f2e0156c05eb6cbb6e403bbeb3624745609f0ec1f2fd477edbd876e3373 SHA512 ac06604e2121f0c0f098e87d43c493b7285c58ac7419c284e6a93218dfa7381d4ca69ee775842fde89226092e05978d662eddefe734afe38f67b28df68d87b68 diff --git a/app-crypt/aescrypt/aescrypt-3.14.ebuild b/app-crypt/aescrypt/aescrypt-3.14.ebuild new file mode 100644 index 000000000000..2349542d05ce --- /dev/null +++ b/app-crypt/aescrypt/aescrypt-3.14.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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" +IUSE="static X" +RDEPEND="X? ( + || ( gnome-extra/zenity kde-apps/kdialog ) + dev-lang/perl + ) + " + +PATCHES=( "${FILESDIR}/${P}-iconv.patch" ) +S="${WORKDIR}/${P}" + +src_prepare() { + xdg_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 +} + +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.14-iconv.patch b/app-crypt/aescrypt/files/aescrypt-3.14-iconv.patch new file mode 100644 index 000000000000..8232f80aebbc --- /dev/null +++ b/app-crypt/aescrypt/files/aescrypt-3.14-iconv.patch @@ -0,0 +1,40 @@ +From 337cc9367a3cb4450eee245c6ceb615d0f05499d Mon Sep 17 00:00:00 2001 +From: Alon Bar-Lev <alon.barlev@gmail.com> +Date: Sat, 2 Feb 2013 01:18:08 +0200 +Subject: [PATCH 2/2] build: support disable iconv for static build + +Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> +--- + password.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/password.c b/password.c +index 9a2c1f8..dee79da 100644 +--- a/src/password.c ++++ b/src/password.c +@@ -232,6 +232,15 @@ int passwd_to_utf16(unsigned char *in_passwd, + 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. +@@ -273,5 +282,6 @@ int passwd_to_utf16(unsigned char *in_passwd, + } + iconv_close(condesc); + return (max_length - ic_outbytesleft); ++#endif + } + +-- +1.7.12.4 + |