pkg/relic: Update to new upstream and remove patches
The removed patches have been applied upstream.
This commit is contained in:
parent
48c1c05297
commit
3288f7a5ae
@ -1,6 +1,6 @@
|
||||
PKG_NAME=relic
|
||||
PKG_URL=https://github.com/relic-toolkit/relic.git
|
||||
PKG_VERSION=cdcfaeef101d18c3231c3b46359c519dd72682e8
|
||||
PKG_VERSION=0b0442a8218df8d309266923f2dd5b9ae3b318ce
|
||||
PKG_LICENSE=LGPL-2.1
|
||||
|
||||
.PHONY: all
|
||||
@ -15,16 +15,12 @@ all: $(PKG_BUILDDIR)/Makefile
|
||||
|
||||
$(PKG_BUILDDIR)/Makefile: $(TOOLCHAIN_FILE)
|
||||
cd $(PKG_BUILDDIR) && \
|
||||
COMP="$(filter-out -Werror=old-style-definition -Werror=strict-prototypes, $(CFLAGS) ) " \
|
||||
COMP="$(filter-out -Werror -Werror=old-style-definition -Werror=strict-prototypes -std=gnu99, $(CFLAGS) ) " \
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=$(TOOLCHAIN_FILE) \
|
||||
-DCHECK=off -DTESTS=0 -DBENCH=0 -DSHLIB=off -Wno-dev $(RELIC_CONFIG_FLAGS) .
|
||||
|
||||
$(TOOLCHAIN_FILE): fix_source
|
||||
$(RIOTTOOLS)/cmake/generate-xcompile-toolchain.sh > $(TOOLCHAIN_FILE)
|
||||
|
||||
fix_source: git-download
|
||||
./fix-util_print_wo_args.sh $(PKG_BUILDDIR)
|
||||
./fix-old-style-definitions.sh $(PKG_BUILDDIR)
|
||||
$(TOOLCHAIN_FILE): git-download
|
||||
$(RIOTBASE)/dist/tools/cmake/generate-xcompile-toolchain.sh > $(TOOLCHAIN_FILE)
|
||||
|
||||
clean::
|
||||
@rm -rf $(BINDIR)/$(PKG_NAME).a
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
. ${RIOTBASE}/pkg/relic/os_util.sh
|
||||
find ${1} -type f -name "*.[ch]" -exec ${SEDBIN} 's/() {/(void) {/' {} +
|
||||
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
. ${RIOTBASE}/pkg/relic/os_util.sh
|
||||
find ${1} -type f -name "*.[ch]" -exec ${SEDBIN} 's/util_print("\(.*\)")/util_print("\1", NULL)/g' {} +
|
||||
@ -1,26 +0,0 @@
|
||||
From 96f92673ac7b719f745958738e6652491bff2c3b Mon Sep 17 00:00:00 2001
|
||||
From: Oleg Hahm <oleg@hobbykeller.org>
|
||||
Date: Sat, 28 Nov 2015 16:01:18 +0100
|
||||
Subject: fixed signedness of counter variable
|
||||
|
||||
---
|
||||
src/cp/relic_cp_bdpe.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/cp/relic_cp_bdpe.c b/src/cp/relic_cp_bdpe.c
|
||||
index c63621c..0a253a5 100644
|
||||
--- a/src/cp/relic_cp_bdpe.c
|
||||
+++ b/src/cp/relic_cp_bdpe.c
|
||||
@@ -160,7 +160,8 @@ int cp_bdpe_enc(uint8_t *out, int *out_len, dig_t in, bdpe_t pub) {
|
||||
|
||||
int cp_bdpe_dec(dig_t *out, uint8_t *in, int in_len, bdpe_t prv) {
|
||||
bn_t m, t, z;
|
||||
- int i, size, result = STS_OK;
|
||||
+ unsigned i;
|
||||
+ int size, result = STS_OK;
|
||||
|
||||
size = bn_size_bin(prv->n);
|
||||
|
||||
--
|
||||
2.6.2
|
||||
|
||||
@ -1,69 +0,0 @@
|
||||
From 381a12925143ba4f6910c15ccb1fabb2a7c8c614 Mon Sep 17 00:00:00 2001
|
||||
From: Oleg Hahm <oleg@hobbykeller.org>
|
||||
Date: Sat, 28 Nov 2015 15:54:24 +0100
|
||||
Subject: don't redefine ALIGN
|
||||
|
||||
---
|
||||
include/relic_types.h | 9 +++++++--
|
||||
src/md/blake2.h | 10 +++-------
|
||||
2 files changed, 10 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/include/relic_types.h b/include/relic_types.h
|
||||
index afc4870..d9ef4f5 100644
|
||||
--- a/include/relic_types.h
|
||||
+++ b/include/relic_types.h
|
||||
@@ -129,9 +129,14 @@ typedef unsigned long long ull_t;
|
||||
* Specification for aligned variables.
|
||||
*/
|
||||
#if ALIGN > 1
|
||||
-#define align __attribute__ ((aligned (ALIGN)))
|
||||
+# if defined(_MSC_VER)
|
||||
+# define ALIGNME(x) __declspec(align(x))
|
||||
+# else
|
||||
+# define ALIGNME(x) __attribute__((aligned(x)))
|
||||
+# endif
|
||||
#else
|
||||
-#define align /* empty*/
|
||||
+# define align /* empty*/
|
||||
+# define ALIGNME(x) /* empty*/
|
||||
#endif
|
||||
|
||||
/**
|
||||
diff --git a/src/md/blake2.h b/src/md/blake2.h
|
||||
index f8aba83..48e314f 100644
|
||||
--- a/src/md/blake2.h
|
||||
+++ b/src/md/blake2.h
|
||||
@@ -17,11 +17,7 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
-#if defined(_MSC_VER)
|
||||
-#define ALIGN(x) __declspec(align(x))
|
||||
-#else
|
||||
-#define ALIGN(x) __attribute__((aligned(x)))
|
||||
-#endif
|
||||
+#include "relic_types.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
@@ -61,7 +57,7 @@ extern "C" {
|
||||
uint8_t personal[BLAKE2S_PERSONALBYTES]; // 32
|
||||
} blake2s_param;
|
||||
|
||||
- ALIGN( 64 ) typedef struct __blake2s_state
|
||||
+ ALIGNME( 64 ) typedef struct __blake2s_state
|
||||
{
|
||||
uint32_t h[8];
|
||||
uint32_t t[2];
|
||||
@@ -86,7 +82,7 @@ extern "C" {
|
||||
uint8_t personal[BLAKE2B_PERSONALBYTES]; // 64
|
||||
} blake2b_param;
|
||||
|
||||
- ALIGN( 64 ) typedef struct __blake2b_state
|
||||
+ ALIGNME( 64 ) typedef struct __blake2b_state
|
||||
{
|
||||
uint64_t h[8];
|
||||
uint64_t t[2];
|
||||
--
|
||||
2.6.2
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
From 814aec72218b194bdff51702fcecd3a06222efbd Mon Sep 17 00:00:00 2001
|
||||
From: Oleg Hahm <oleg@hobbykeller.org>
|
||||
Date: Tue, 1 Dec 2015 17:42:16 +0100
|
||||
Subject: [PATCH 3/3] require only CMake version 2.8
|
||||
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 8a26feb..2ca537a 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,5 +1,5 @@
|
||||
project(RELIC C CXX)
|
||||
-cmake_minimum_required(VERSION 3.1)
|
||||
+cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set(PROJECT_VERSION_MAJOR "0")
|
||||
set(PROJECT_VERSION_MINOR "4")
|
||||
--
|
||||
2.6.2
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user