summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-crypt')
-rw-r--r--app-crypt/tc-play/Manifest1
-rw-r--r--app-crypt/tc-play/files/tc-play-3.3-ldflags.patch11
-rw-r--r--app-crypt/tc-play/tc-play-3.3.ebuild60
3 files changed, 72 insertions, 0 deletions
diff --git a/app-crypt/tc-play/Manifest b/app-crypt/tc-play/Manifest
index 429e10a5c039..4cbb6d555306 100644
--- a/app-crypt/tc-play/Manifest
+++ b/app-crypt/tc-play/Manifest
@@ -1 +1,2 @@
DIST tc-play-2.0.tar.gz 1015525 BLAKE2B 1481eecc8aaf2cb9698eed96a9cdabaa2b74daf11865dd29a6fab7e66fb76aa2f6e544fe7ac53a2510415ee6ddf3c5732c774a26708fe354113eb9de6a9b62d9 SHA512 17408b2a664eb6822c77ede4f38ca67cdf643512014619d830a2c024bb8971811eded4edd65f6398d6112a3b57cd11a5b414357878c817c9cc2aac9d851946d7
+DIST tc-play-3.3.tar.gz 2591752 BLAKE2B c02489d6e291dfc1425745af86506e72fda7f67dba0668b9250a85604ba301761b5bbbad6927238042a0f89da1035d9e3275006e34e895835a53cdc24974f419 SHA512 78cc84b1ca333e6760b87dfd22035a027bea8d562201c028247e9cfc4377260490cdc42236ef1eeb1c263a49ca1654d8ae637abdf1b4e507f958bc780fc85d94
diff --git a/app-crypt/tc-play/files/tc-play-3.3-ldflags.patch b/app-crypt/tc-play/files/tc-play-3.3-ldflags.patch
new file mode 100644
index 000000000000..5976ecdd4d81
--- /dev/null
+++ b/app-crypt/tc-play/files/tc-play-3.3-ldflags.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.classic
++++ b/Makefile.classic
+@@ -84,7 +84,7 @@ all: tcplay libtcplay.so libtcplay.a
+ $(CC) $(COMMON_CFLAGS) $(CFLAGS) -c -o $@ $<
+
+ tcplay: $(OBJS_PROG)
+- $(CC) $(COMMON_CFLAGS) $(CFLAGS) -o tcplay $(OBJS_PROG) $(LIBS)
++ $(CC) $(COMMON_CFLAGS) $(CFLAGS) -o tcplay $(LDFLAGS) $(OBJS_PROG) $(LIBS)
+
+ libtcplay.so.$(MAJ_VER).$(MIN_VER): $(OBJS_LIB)
+ $(CC) -shared -Wl,-version-script=tcplay.map -Wl,-soname=libtcplay.so.$(MAJ_VER).$(MIN_VER) $(LDFLAGS) \
diff --git a/app-crypt/tc-play/tc-play-3.3.ebuild b/app-crypt/tc-play/tc-play-3.3.ebuild
new file mode 100644
index 000000000000..bb69d8e37d7b
--- /dev/null
+++ b/app-crypt/tc-play/tc-play-3.3.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="A free, pretty much fully featured and stable TrueCrypt implementation"
+HOMEPAGE="https://github.com/bwalex/tc-play"
+SRC_URI="https://github.com/bwalex/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="gnutls"
+
+DEPEND="
+ dev-libs/libgcrypt:=
+ dev-libs/libgpg-error
+ sys-apps/util-linux
+ sys-fs/lvm2
+ gnutls? ( net-libs/gnutls )
+ !gnutls? (
+ dev-libs/openssl:=
+ )
+"
+RDEPEND="${DEPEND}"
+
+DOCS=( README.md )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.3-ldflags.patch
+)
+
+src_configure() {
+ local backend="openssl"
+ use gnutls && local backend="gcrypt"
+
+ EXTRA_MAKE_FLAGS=(
+ PBKDF_BACKEND="${backend}"
+ WARNFLAGS=""
+ CC="$(tc-getCC)"
+ AR="$(tc-getAR)"
+ PREFIX=/usr
+ LIBDIR=/usr/$(get_libdir)
+ )
+}
+
+src_compile() {
+ emake -f Makefile.classic \
+ tcplay \
+ "${EXTRA_MAKE_FLAGS[@]}"
+}
+
+src_install() {
+ emake -f Makefile.classic \
+ "${EXTRA_MAKE_FLAGS[@]}" \
+ install_program \
+ DESTDIR="${ED}"
+}