commit: ee527876689ebf9b62f790ef133c170afacc4f8b parent: beb1315ff315dd03ac65a761c2674c7d683def53 Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me> Date: Wed, 31 Oct 2018 07:08:26 +0100 dev-libs/libtomcrypt: New packageDiffstat:
A | dev-libs/libtomcrypt/Manifest | 1 | + |
A | dev-libs/libtomcrypt/libtomcrypt-1.18.2.ebuild | 39 | +++++++++++++++++++++++++++++++++++++++ |
2 files changed, 40 insertions(+), 0 deletions(-)
diff --git a/dev-libs/libtomcrypt/Manifest b/dev-libs/libtomcrypt/Manifest @@ -0,0 +1 @@ +DIST crypt-1.18.2.tar.xz 2638064 BLAKE2B fad67e9e2a2002425488db9987a853bda631d6638c2cb1052a1d0d1f393945e38037cc75c54cd3a4bf87bb2e13b1e868e81da054a84bbdb393519ddef5e27300 SHA512 f6117a12a42b07f8de4a8aedbccf6ff4ee94b4b81cb7263af99627c32eae646ca8ead7d3063737918db4aa118673001fcf2cfa8e4ca8b528fb00045fda7cc893 diff --git a/dev-libs/libtomcrypt/libtomcrypt-1.18.2.ebuild b/dev-libs/libtomcrypt/libtomcrypt-1.18.2.ebuild @@ -0,0 +1,39 @@ +# Copyright 2018 Haelwenn (lanodan) Monnier <contact@hacktivis.me> +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="modular and portable cryptographic toolkit" +HOMEPAGE="https://www.libtom.net/LibTomCrypt/" +SRC_URI="https://github.com/libtom/libtomcrypt/releases/download/v${PV}/crypt-${PV}.tar.xz" + +LICENSE="WTFPL-2" +SLOT="0" +KEYWORDS="~amd64" +IUSE="doc libtommath tomsfastmath" + +RDEPEND="libtommath? ( dev-libs/libtommath ) + tomsfastmath? ( >=dev-libs/tomsfastmath-0.12 ) + !libtommath? ( !tomsfastmath? ( dev-libs/libtommath ) )" +DEPEND="${RDEPEND} + doc? ( virtual/latex-base app-text/ghostscript-gpl )" + +src_compile() { + local extraflags="" + use libtommath && append-flags "-DUSE_LTM -DLTM_DESC" && extraflags="-ltommath" + use tomsfastmath && append-flags "-DUSE_TFM -DTFM_DESC" && extraflags="${extraflags} -ltfm" + EXTRALIBS="${extraflags}" \ + CC=$(tc-getCC) \ + IGNORE_SPEED=1 \ + emake -f makefile.shared \ + || die "emake failed" + + use doc && emake emake -f makefile.shared docs +} + +src_install() { + emake -f makefile.shared install PREFIX="/usr" DESTDIR="${D}" LIBPATH="/usr/$(get_libdir)" + use doc && emake -f makefile.shared install_docs PREFIX="/usr" DESTDIR="${D}" +}