Added libsodium package. (#890)

* added in libsodium
* created patch for double semicolons
This commit is contained in:
Winston Durand
2016-11-29 22:27:23 -08:00
committed by Adrien Destugues
parent 59a4eb2d61
commit 036c31a964
3 changed files with 105 additions and 0 deletions

View File

@@ -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
}

View File

@@ -0,0 +1,18 @@
/*
* ISC License
*
* Copyright (c) 2013-2016
* Frank Denis <j at pureftpd dot org>
*
* 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.
*/

View File

@@ -0,0 +1,22 @@
From 7e3a455500f9accf9bf34377dada312690c27a1a Mon Sep 17 00:00:00 2001
From: Winston Durand <me@winstondurand.com>
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