argon2, bump git checkout (#3925)

This commit is contained in:
Schrijvers Luc
2019-06-16 04:52:09 +02:00
committed by waddlesplash
parent a4d480b182
commit 88b8fc50db
5 changed files with 141 additions and 101 deletions

View File

@@ -11,9 +11,9 @@ COPYRIGHT="2015-2017 Daniel Dinu
LICENSE="Apache v2
Public Domain"
REVISION="1"
srcGitRev="6c8653c3b6859a2d21850fa5979327feee8ca3ee"
srcGitRev="62358ba2123abd17fccf2a108a301d4b52c01a7c"
SOURCE_URI="https://github.com/P-H-C/phc-winner-argon2/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="d33275eea770ce93c678e4d512cf171f878f65219bc3ffcee9f2a6cbac258853"
CHECKSUM_SHA256="d177732879114c07a5ab7e6533e61d2c9dff204044335537c89ed16e7d3e4e2f"
SOURCE_FILENAME="argon2-$srcGitRev.tar.gz"
SOURCE_DIR="phc-winner-argon2-$srcGitRev"
PATCHES="argon2-$portVersion.patchset"
@@ -62,39 +62,30 @@ TEST_REQUIRES="
defineDebugInfoPackage argon2$secondaryArchSuffix \
$libDir/libargon2.so.1
PATCH()
{
if [ -n "$secondaryArchSuffix" ]; then
sed -i 's,develop/headers,develop/headers/x86,g' Makefile
sed -i 's,LIBRARY_REL ?= lib,LIBRARY_REL ?= lib/x86,g' Makefile
fi
}
BUILD()
{
export ARGON2_VERSION=$portVersion
make PREFIX=$prefix
}
INSTALL()
{
make install PREFIX=$prefix \
INST_INCLUDE=$includeDir \
INST_LIBRARY=$libDir
install -d -m 755 $manDir/man1
install -m 644 -t $manDir/man1 ./man/argon2.1
make install PREFIX=$prefix
if [ -n "$secondaryArchSuffix" ]; then
rm -rf $prefix/bin
rm -rf $prefix/bin
rm -rf $manDir
fi
mkdir -p $developLibDir/pkgconfig
cat > $developLibDir/pkgconfig/libargon2.pc << EOF
bindir=$prefix/bin
exec_prefix=$prefix
libdir=$libDir
includedir=$includeDir
Name: libargon2
Description: $SUMMARY
Version: $portVersion
Libs: -L$developLibDir -largon2
Cflags: -I$includeDir
EOF
prepareInstalledDevelLibs libargon2
prepareInstalledDevelLib libargon2
fixPkgconfig
packageEntries devel \

View File

@@ -1,22 +0,0 @@
From 9813da17f3570a093873b6c78dc4d3700b54a429 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Fri, 21 Dec 2018 12:05:48 +0100
Subject: remove -Wextra -Wno-type-limits for the tests (gcc2)
diff --git a/Makefile b/Makefile
index 5a1f551..a040609 100644
--- a/Makefile
+++ b/Makefile
@@ -162,7 +162,7 @@ dist:
tar -c --exclude='.??*' -z -f $(DIST)-`date "+%Y%m%d"`.tgz $(DIST)/*
test: $(SRC) src/test.c
- $(CC) $(CFLAGS) -Wextra -Wno-type-limits $^ -o testcase
+ $(CC) $(CFLAGS) $^ -o testcase
@sh kats/test.sh
./testcase
--
2.19.1

View File

@@ -1,55 +0,0 @@
From 2e078b7a9903f96377a1f7c59f95182518204895 Mon Sep 17 00:00:00 2001
From: Deposite Pirate <dpirate@metalpunks.info>
Date: Thu, 13 Sep 2018 21:33:03 +0200
Subject: Fix building on Haiku
diff --git a/Makefile b/Makefile
index 1e1129f..ea97411 100644
--- a/Makefile
+++ b/Makefile
@@ -30,13 +30,18 @@ SRC_BENCH = src/bench.c
SRC_GENKAT = src/genkat.c
OBJ = $(SRC:.c=.o)
+BUILD_PATH := $(shell pwd)
+KERNEL_NAME := $(shell uname -s)
+
CFLAGS += -std=c89 -O3 -Wall -g -Iinclude -Isrc
ifeq ($(NO_THREADS), 1)
CFLAGS += -DARGON2_NO_THREADS
else
+ifneq ($(KERNEL_NAME), Haiku)
CFLAGS += -pthread
endif
+endif
CI_CFLAGS := $(CFLAGS) -Werror=declaration-after-statement -D_FORTIFY_SOURCE=2 \
-Wextra -Wno-type-limits -Werror -coverage -DTEST_LARGE_RAM
@@ -54,9 +59,6 @@ $(info Building with optimizations for $(OPTTARGET))
SRC += src/opt.c
endif
-BUILD_PATH := $(shell pwd)
-KERNEL_NAME := $(shell uname -s)
-
LIB_NAME=argon2
ifeq ($(KERNEL_NAME), Linux)
LIB_EXT := so.$(ABI_VERSION)
@@ -91,6 +93,12 @@ ifeq ($(KERNEL_NAME), SunOS)
LIB_EXT := so
LIB_CFLAGS := -shared -fPIC
endif
+ifeq ($(KERNEL_NAME), Haiku)
+ LIB_EXT := so.$(ABI_VERSION)
+ LIB_CFLAGS := -shared -fPIC -DA2_VISCTL=1
+ SO_LDFLAGS := -Wl,-soname,lib$(LIB_NAME).$(LIB_EXT)
+ LINKED_LIB_EXT := so
+endif
ifeq ($(KERNEL_NAME), Linux)
ifeq ($(CC), clang)
--
2.19.1

View File

@@ -0,0 +1,22 @@
From b4d810e569d731e8e704b07906339ca1dc5fc4e8 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sat, 15 Jun 2019 08:19:58 +0200
Subject: Fix test, remove -Wextra -Wno-type-limits for gcc2
diff --git a/Makefile b/Makefile
index d973681..430af8b 100644
--- a/Makefile
+++ b/Makefile
@@ -238,7 +238,7 @@ dist:
.PHONY: test
test: $(SRC) src/test.c
- $(CC) $(CFLAGS) -Wextra -Wno-type-limits $^ -o testcase
+ $(CC) $(CFLAGS) $^ -o testcase
@sh kats/test.sh
./testcase
--
2.21.0

View File

@@ -0,0 +1,104 @@
From ebfc13ea80b4797a8dd80e58e181d3fb80874e2a Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sat, 15 Jun 2019 08:04:54 +0200
Subject: Add manpage install, add Haiku to the platform
diff --git a/Makefile b/Makefile
index 837e7f7..d973681 100644
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,7 @@ RUN = argon2
BENCH = bench
GENKAT = genkat
ARGON2_VERSION ?= ZERO
+MAN = man/argon2.1
# installation parameters for staging area and final installation path
# Note; if Linux and not Debian/Ubuntu version also add lib override to make command-line
@@ -40,10 +41,12 @@ OBJ = $(SRC:.c=.o)
CFLAGS += -std=c89 -O3 -Wall -g -Iinclude -Isrc
ifeq ($(NO_THREADS), 1)
+ifeq ($(KERNEL_NAME), Haiku)
CFLAGS += -DARGON2_NO_THREADS
else
CFLAGS += -pthread
endif
+endif
CI_CFLAGS := $(CFLAGS) -Werror=declaration-after-statement -D_FORTIFY_SOURCE=2 \
-Wextra -Wno-type-limits -Werror -coverage -DTEST_LARGE_RAM
@@ -109,6 +112,13 @@ ifeq ($(KERNEL_NAME), SunOS)
LIB_CFLAGS := -shared -fPIC
PC_EXTRA_LIBS ?=
endif
+ifeq ($(KERNEL_NAME), Haiku)
+ LIB_EXT := so.$(ABI_VERSION)
+ LIB_CFLAGS := -shared -fPIC -DA2_VISCTL=1
+ SO_LDFLAGS := -Wl,-soname,lib$(LIB_NAME).$(LIB_EXT)
+ LINKED_LIB_EXT := so
+ PC_EXTRA_LIBS ?=
+endif
ifeq ($(KERNEL_NAME), Linux)
ifeq ($(CC), clang)
@@ -136,6 +146,7 @@ ifeq ($(KERNEL_NAME), $(filter $(KERNEL_NAME),DragonFly FreeBSD))
BINARY_REL ?= bin
INCLUDE_REL ?= include
LIBRARY_REL ?= lib
+MAN_REL ?= man/man1
PKGCONFIG_REL ?= libdata
else ifeq ($(KERNEL_NAME)-$(MACHINE_NAME), Linux-x86_64)
@@ -144,6 +155,16 @@ else ifeq ($(KERNEL_NAME)-$(MACHINE_NAME), Linux-x86_64)
BINARY_REL ?= bin
INCLUDE_REL ?= include
LIBRARY_REL ?= lib/x86_64-linux-gnu
+MAN_REL ?= man/man1
+PKGCONFIG_REL ?= $(LIBRARY_REL)
+
+else ifeq ($(KERNEL_NAME)-$(MACHINE_NAME), Haiku-BePC)
+
+# default for Haiku
+BINARY_REL ?= bin
+INCLUDE_REL ?= develop/headers
+LIBRARY_REL ?= lib
+MAN_REL ?= documentation/man/man1
PKGCONFIG_REL ?= $(LIBRARY_REL)
else
@@ -152,6 +173,7 @@ else
BINARY_REL ?= bin
INCLUDE_REL ?= include
LIBRARY_REL ?= lib
+MAN_REL ?= man/man1
PKGCONFIG_REL ?= $(LIBRARY_REL)
endif
@@ -160,6 +182,7 @@ endif
INST_INCLUDE = $(DESTDIR)$(PREFIX)/$(INCLUDE_REL)
INST_LIBRARY = $(DESTDIR)$(PREFIX)/$(LIBRARY_REL)
INST_BINARY = $(DESTDIR)$(PREFIX)/$(BINARY_REL)
+INST_MAN = $(DESTDIR)$(PREFIX)/$(MAN_REL)
INST_PKGCONFIG = $(DESTDIR)$(PREFIX)/$(PKGCONFIG_REL)/pkgconfig
# main target
@@ -242,6 +265,8 @@ ifdef LINKED_LIB_SH
endif
$(INSTALL) -d $(INST_BINARY)
$(INSTALL) $(RUN) $(INST_BINARY)
+ $(INSTALL) -d $(INST_MAN)
+ $(INSTALL) -m 0644 $(MAN) $(INST_MAN)
$(INSTALL) -d $(INST_PKGCONFIG)
$(INSTALL) -m 0644 $(PC_NAME) $(INST_PKGCONFIG)
@@ -250,4 +275,5 @@ uninstall:
cd $(INST_INCLUDE) && rm -f $(notdir $(HEADERS))
cd $(INST_LIBRARY) && rm -f $(notdir $(LIBRARIES) $(LINKED_LIB_SH))
cd $(INST_BINARY) && rm -f $(notdir $(RUN))
+ cd $(INST_MAN) && rm -f $(notdir $(MAN))
cd $(INST_PKG_CONFIG) && rm -f $(notdir $(PC_NAME))
--
2.21.0