summaryrefslogtreecommitdiff
path: root/app-crypt/aescrypt
diff options
context:
space:
mode:
Diffstat (limited to 'app-crypt/aescrypt')
-rw-r--r--app-crypt/aescrypt/Manifest3
-rw-r--r--app-crypt/aescrypt/aescrypt-3.14.ebuild68
-rw-r--r--app-crypt/aescrypt/files/aescrypt-3.14-iconv.patch40
3 files changed, 111 insertions, 0 deletions
diff --git a/app-crypt/aescrypt/Manifest b/app-crypt/aescrypt/Manifest
index 59cc5ba3fdd5..765f4d57d6e6 100644
--- a/app-crypt/aescrypt/Manifest
+++ b/app-crypt/aescrypt/Manifest
@@ -1,5 +1,8 @@
AUX aescrypt-3.0.6b-build.patch 1711 BLAKE2B df5eccdc516e0314a137b1c51e5ae05fe5e66c8defe892599b295d5720e26b3a5cde9e262b7f09faf9db0a57bc0479f3be1481b65c0f62ffcdb404db90051e5e SHA512 b19e4eba11753bb8929d14eddc4ef391c8ec62b2bb57cf63b1a74b9a27250b4719ece8f1a6b790c1f662738b92bb37da96c973dd38cdf059c7482edb3dbd0f0e
AUX aescrypt-3.0.6b-iconv.patch 1096 BLAKE2B 91d6e74ea8b760e81887a799ee5e8709ea7afc7f499842879091dcffdca76f24cc9191ac438c03b9f7f4970f55beca1586d56f3262e5d0f1de53366464141c2e SHA512 bf8d564493ae9396f024c1e33a775a53833da9d984ff059f714362a2cc112c3e6bd575c5d64fc0f7118fd578af645f386d649483ab56c2a0cb8d9b0795161409
+AUX aescrypt-3.14-iconv.patch 1104 BLAKE2B a6b9a8f41e86c9ac6fe16427752ae20da7177e5c1aec9f42373f94606954732632d84dc06a1425508115b3fc94f54f895c671eca691442c4d3d3b9163a27934e SHA512 fb3dd6a459e1378c44ffcd6a5b109f4bd178ee2e3190eed334bbfa4387fb11c4d070105598b4f0b989428f00a28f2064cf5f5064b71c49db269f4f4b55283960
DIST aescrypt-3.0.6b.tar.gz 28272 BLAKE2B ce5347b77d974c76dadaa820b5b90a56015019f846bbc61560c33032adad08576d5e5ddd7d9e1020878e35b40173a2c5e29578e2f6e98631725442beac6f19ac SHA512 4c88abc9bff50ae5d310be7dad8f29843941843f9b484d9846b08dc76c605940adbb375f7e8ffefd6e8236f35ff860a745f89226e9c171bfa70c28c16aa6626a
+DIST aescrypt-3.14.tgz 38742 BLAKE2B 7122cb0246e28fd1301c58c13145c47ea3e20c8af61efc4115eec8a7ade720ecf2093f2e0156c05eb6cbb6e403bbeb3624745609f0ec1f2fd477edbd876e3373 SHA512 ac06604e2121f0c0f098e87d43c493b7285c58ac7419c284e6a93218dfa7381d4ca69ee775842fde89226092e05978d662eddefe734afe38f67b28df68d87b68
EBUILD aescrypt-3.0.6b.ebuild 607 BLAKE2B 1a411ecfc29f0de364a6d16ff86c8e9ad486cdb42d1a8137c3391bb14549a76df170140eea42d317b1d16301bbcd38a5076f8447c403a4f01d149debc3641fe4 SHA512 0fdc84b108ec79790601d14444543b5e3821e64fb02dc8bac46ef4e763d11c09f2f2181a38b2da255935ad068b86206a0e0214db98f836a48c1b999bae2201ea
+EBUILD aescrypt-3.14.ebuild 1598 BLAKE2B b6067d5911f838081f86cffbc382818151f9811aead73403c06bcd1c23295b0529ad26848a61fffc5b3ffe44203e6fd4d445bd39f38d555c0785bc5a517885ed SHA512 fca32c9baf3264ee15dafebd30d3ec9e9f737819ec0d7ba14cc9c85ce528acfd99bc972795508c4543eeb613bad4a5b975ffc3a0c512b0f8f1481aca52b45047
MISC metadata.xml 167 BLAKE2B e4dadf27fd344484f2bccb5b904909c89aac568c32e5b3c44bdf139eacefd4b4fae74419f503d2b7da0dccc1b68ba05d777d11292c0f89270d1ac5c9c703e8ca SHA512 7c8decb24ee3a850e38186cf3c7f8933a28017426806870ad6ef9ceb2533be147a2681fc789b535a81cb528af8c29d90d3006e4f250aee23bd7dea4561294e33
diff --git a/app-crypt/aescrypt/aescrypt-3.14.ebuild b/app-crypt/aescrypt/aescrypt-3.14.ebuild
new file mode 100644
index 000000000000..78142e9a9dcb
--- /dev/null
+++ b/app-crypt/aescrypt/aescrypt-3.14.ebuild
@@ -0,0 +1,68 @@
+# 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" )
+
+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
+