commit: ae88e595313b6160939a1b7e6f5955f7a7f8b0ee
parent: 411cd798ec6bdae562419d6a8749ca8beb5d9ff7
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Thu, 20 Dec 2018 03:14:20 +0100
net-misc/tinyssh: Add USE=libsodium
Diffstat:
2 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/net-misc/tinyssh/metadata.xml b/net-misc/tinyssh/metadata.xml
@@ -13,4 +13,7 @@
TinySSH is a minimalistic and secure SSH server which
implements only a subset of SSHv2 features.
</longdescription>
+ <use>
+ <flag name="sodium">Use <pkg>dev-libs/libsodium</pkg> for cryptography</flag>
+ </use>
</pkgmetadata>
diff --git a/net-misc/tinyssh/tinyssh-20181206.ebuild b/net-misc/tinyssh/tinyssh-20181206.ebuild
@@ -8,13 +8,20 @@ inherit systemd
DESCRIPTION="A small SSH server with state-of-the-art cryptography"
HOMEPAGE="https://tinyssh.org"
SRC_URI="https://github.com/janmojzis/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-RESTRICT="mirror"
LICENSE="public-domain"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-RDEPEND="sys-apps/ucspi-tcp"
+IUSE="+sodium"
+
+DEPEND="
+ sodium? ( dev-libs/libsodium )
+"
+RDEPEND="
+ ${DEPEND}
+ sys-apps/ucspi-tcp
+"
src_prepare() {
# Leave optimization level to user CFLAGS
@@ -28,7 +35,15 @@ src_prepare() {
}
src_compile() {
- emake compile
+ if use sodium
+ then
+ emake \
+ LIBS="-lsodium" \
+ CFLAGS="$CFLAGS -I/usr/include/sodium" \
+ LDFLAGS="-L/usr/lib"
+ else
+ emake
+ fi
}
src_install() {
@@ -45,8 +60,6 @@ src_install() {
}
pkg_postinst() {
- einfo
einfo "TinySSH is in beta stage, and ready for production use."
einfo "See https://tinyssh.org for more information."
- einfo
}