tc-play-2.0-r1.ebuild 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit toolchain-funcs multilib-minimal
  5. DESCRIPTION="a free, pretty much fully featured and stable TrueCrypt implementation"
  6. HOMEPAGE="https://github.com/bwalex/tc-play"
  7. SRC_URI="https://github.com/bwalex/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="BSD"
  9. SLOT="0"
  10. KEYWORDS="~amd64"
  11. IUSE="gnutls libressl"
  12. DEPEND="
  13. dev-libs/libgpg-error
  14. sys-fs/lvm2
  15. sys-apps/util-linux
  16. dev-libs/libgcrypt:0
  17. gnutls? ( net-libs/gnutls )
  18. !gnutls? (
  19. !libressl? ( dev-libs/openssl:0= )
  20. libressl? ( dev-libs/libressl:0= )
  21. )"
  22. RDEPEND="${DEPEND}"
  23. DOCS=(
  24. README.md
  25. )
  26. pkg_setup() {
  27. local backend="openssl"
  28. use gnutls && local backend="gcrypt"
  29. EXTRA_MAKE_FLAGS=(
  30. PBKDF_BACKEND="${backend}"
  31. WARNFLAGS=""
  32. CC=$(tc-getCC)
  33. AR=$(tc-getAR)
  34. PREFIX=/usr \
  35. LIBDIR=/usr/$(get_libdir)
  36. )
  37. }
  38. src_compile() {
  39. emake -f Makefile.classic \
  40. tcplay \
  41. "${EXTRA_MAKE_FLAGS[@]}"
  42. }
  43. src_install() {
  44. emake -f Makefile.classic \
  45. "${EXTRA_MAKE_FLAGS[@]}" \
  46. install_program \
  47. DESTDIR="${ED}"
  48. }