diff --git a/dev-libs/libsodium/libsodium-1.0.11.recipe b/dev-libs/libsodium/libsodium-1.0.11.recipe new file mode 100644 index 000000000..b890e0acf --- /dev/null +++ b/dev-libs/libsodium/libsodium-1.0.11.recipe @@ -0,0 +1,65 @@ +SUMMARY="A modern, easy-to-use software library for cryptographic standards" +DESCRIPTION="Sodium is a portable, cross-compilable, installable, packageable \ +fork of NaCl, with a compatible API, and an extended API to improve usability \ +even further. +Its goal is to provide all of the core operations needed to build higher-level \ +cryptographic tools. +The design choices emphasize security, and \"magic constants\" have clear rationales. +Despite the emphasis on high security, primitives are faster across-the-board \ +than most implementations of the NIST standards." +HOMEPAGE="https://github.com/jedisct1/libsodium" +COPYRIGHT="2013-2016 Frank Denis" +LICENSE="ISC" +REVISION="1" +SOURCE_URI="https://download.libsodium.org/libsodium/releases/libsodium-$portVersion.tar.gz" +CHECKSUM_SHA256="a14549db3c49f6ae2170cbbf4664bd48ace50681045e8dbea7c8d9fb96f9c765" +PATCHES="libsodium-$portVersion.patchset" + +ARCHITECTURES="x86_gcc2 x86" +SECONDARY_ARCHITECTURES="x86_gcc2 x86" + +PROVIDES=" + libsodium${secondaryArchSuffix} = $portVersion + cmd:libsodium = $portVersion + lib:libsodium${secondaryArchSuffix} = $portVersion + " +REQUIRES=" + haiku${secondaryArchSuffix} + " +PROVIDES_devel=" + libsodium${secondaryArchSuffix}_devel = $portVersion + devel:libsodium$secondaryArchSuffix = $portVersion + " +REQUIRES_devel=" + libsodium$secondaryArchSuffix == $portVersion base + " +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + " +BUILD_PREREQUIRES=" + cmd:automake + cmd:autoconf + cmd:libtool + cmd:make + cmd:awk + cmd:gcc$secondaryArchSuffix + " + +BUILD() +{ + runConfigure ./configure + make +} + +INSTALL() +{ + make install + prepareInstalledDevelLibs libsodium + fixPkgconfig + packageEntries devel $developDir +} + +TEST() +{ + make check +} diff --git a/dev-libs/libsodium/licenses/ISC b/dev-libs/libsodium/licenses/ISC new file mode 100644 index 000000000..ede96e780 --- /dev/null +++ b/dev-libs/libsodium/licenses/ISC @@ -0,0 +1,18 @@ +/* + * ISC License + * + * Copyright (c) 2013-2016 + * Frank Denis + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ diff --git a/dev-libs/libsodium/patches/libsodium-1.0.11.patchset b/dev-libs/libsodium/patches/libsodium-1.0.11.patchset new file mode 100644 index 000000000..8319c607b --- /dev/null +++ b/dev-libs/libsodium/patches/libsodium-1.0.11.patchset @@ -0,0 +1,22 @@ +From 7e3a455500f9accf9bf34377dada312690c27a1a Mon Sep 17 00:00:00 2001 +From: Winston Durand +Date: Wed, 30 Nov 2016 05:18:11 +0000 +Subject: removed double semicolon + + +diff --git a/src/libsodium/sodium/utils.c b/src/libsodium/sodium/utils.c +index c9f11ba..c41f929 100644 +--- a/src/libsodium/sodium/utils.c ++++ b/src/libsodium/sodium/utils.c +@@ -62,7 +62,7 @@ static unsigned char canary[CANARY_SIZE]; + __attribute__ ((weak)) void + _sodium_memzero_as_a_weak_symbol_to_prevent_lto(void * const pnt, const size_t len) + { +- unsigned char *pnt_ = (unsigned char *) pnt;; ++ unsigned char *pnt_ = (unsigned char *) pnt; + size_t i = (size_t) 0U; + + while (i < len) { +-- +2.7.0 +