crypto++: version bump to 8.2 (#3891)

This commit is contained in:
kikadf
2019-07-14 01:15:06 +02:00
committed by waddlesplash
parent a9e07db966
commit 60721da409
3 changed files with 98 additions and 42 deletions

View File

@@ -15,14 +15,13 @@ The library contains the following algorithms:
* Insecure or obsolescent algorithms: MD2, MD4, MD5
* And many more other algorithms."
HOMEPAGE="https://cryptopp.com/"
COPYRIGHT="2015-2017 Wei Dai"
COPYRIGHT="2015-2019 Wei Dai"
LICENSE="Boost v1.0"
REVISION="3"
SOURCE_URI="https://www.cryptopp.com/cryptopp565.zip"
CHECKSUM_SHA256="a75ef486fe3128008bbb201efee3dcdcffbe791120952910883b26337ec32c34"
SOURCE_DIR=""
# Upstream patch, might be obsolete in a later version
PATCHES="crypto++-$portVersion.patchset"
REVISION="1"
SOURCE_URI="https://github.com/weidai11/cryptopp/archive/CRYPTOPP_${portVersion//./_}.tar.gz"
CHECKSUM_SHA256="e3bcd48a62739ad179ad8064b523346abb53767bcbefc01fe37303412292343e"
PATCHES="crypto++-8.2.0.patchset"
SOURCE_DIR="cryptopp-CRYPTOPP_${portVersion//./_}"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
@@ -62,20 +61,19 @@ defineDebugInfoPackage crypto++$secondaryArchSuffix \
BUILD()
{
make HAS_SOLIB_VERSION=1 dynamic static $jobArgs
make all $jobArgs
}
INSTALL()
{
make \
HAS_SOLIB_VERSION=1 LDCONF=true \
BINDIR=$binDir LIBDIR=$libDir \
DATADIR=$dataDir INCLUDEDIR=$includeDir \
install
LDCONF=true \
BINDIR=$binDir \
LIBDIR=$libDir \
DATADIR=$dataDir \
INCLUDEDIR=$includeDir \
install-lib
# Yes, they created the link. But they forgot to install it...
ln -s libcryptopp.so.$libVersion \
$libDir/libcryptopp.so.${libVersionCompat##* }
prepareInstalledDevelLib libcryptopp
install -d -m 755 $developLibDir/pkgconfig
@@ -86,8 +84,7 @@ Version: $portVersion
Libs: -lcryptopp
EOF
packageEntries devel \
$relativeDevelopDir
packageEntries devel $developDir
}
TEST()

View File

@@ -1,25 +0,0 @@
From ec1e84e8ecefb81f7a233f047c75446eee9dfb54 Mon Sep 17 00:00:00 2001
From: Leorize <alaviss@users.noreply.github.com>
Date: Sat, 16 Dec 2017 15:06:42 +0700
Subject: Makefile: fix architecture detection
diff --git a/GNUmakefile b/GNUmakefile
index 2a0ff4c..ddd5422 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -15,9 +15,9 @@ LN ?= ln -sf
LDCONF ?= /sbin/ldconfig -n
UNAME := $(shell uname)
-IS_X86 := $(shell uname -m | $(EGREP) -v "x86_64" | $(EGREP) -i -c "i.86|x86|i86")
+IS_X86 := $(shell $(CXX) $(CXXFLAGS) -dumpmachine 2>/dev/null | $(EGREP) -v "64" | $(EGREP) -i -c "i.86|x86|i86")
IS_X32 ?= 0
-IS_X64 := $(shell uname -m | $(EGREP) -i -c "(_64|d64)")
+IS_X64 := $(shell $(CXX) $(CXXFLAGS) -dumpmachine 2>/dev/null | $(EGREP) -i -c "(_64|d64)")
IS_PPC := $(shell uname -m | $(EGREP) -i -c "ppc|power")
IS_ARM32 := $(shell uname -m | $(EGREP) -i -c "arm")
IS_ARM64 := $(shell uname -m | $(EGREP) -i -c "aarch64")
--
2.15.0

View File

@@ -0,0 +1,84 @@
From 24f6ed849feb13be03236c9bfbd42daca77f258a Mon Sep 17 00:00:00 2001
From: kikadf <kikadf.01@gmail.com>
Date: Fri, 31 May 2019 16:04:29 +0200
Subject: crypto++: add Haiku patchset
diff --git a/GNUmakefile b/GNUmakefile
index e7b7b3a..6123fd8 100755
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -65,6 +65,7 @@ IS_DARWIN := $(shell echo "$(SYSTEMX)" | $(GREP) -i -c "Darwin")
IS_NETBSD := $(shell echo "$(SYSTEMX)" | $(GREP) -i -c "NetBSD")
IS_AIX := $(shell echo "$(SYSTEMX)" | $(GREP) -i -c "aix")
IS_SUN := $(shell echo "$(SYSTEMX)" | $(GREP) -i -c -E "SunOS|Solaris")
+IS_HAIKU := $(shell echo "$(SYSTEMX)" | $(GREP) -i -c "haiku")
SUN_COMPILER := $(shell $(CXX) -V 2>&1 | $(GREP) -i -c -E 'CC: (Sun|Studio)')
GCC_COMPILER := $(shell $(CXX) --version 2>/dev/null | $(GREP) -v -E '(llvm|clang)' | $(GREP) -i -c -E '(gcc|g\+\+)')
@@ -83,7 +84,7 @@ endif
# Enable shared object versioning for Linux and Solaris
HAS_SOLIB_VERSION ?= 0
-ifneq ($(IS_LINUX)$(IS_HURD)$(IS_SUN),000)
+ifneq ($(IS_LINUX)$(IS_HURD)$(IS_SUN)$(IS_HAIKU),0000)
HAS_SOLIB_VERSION := 1
endif
@@ -1006,7 +1007,7 @@ ifeq ($(HAS_SOLIB_VERSION),1)
# Different patchlevels and minors are compatible since 6.1
SOLIB_COMPAT_SUFFIX=.$(LIB_MAJOR)
# Linux uses -Wl,-soname
-ifneq ($(IS_LINUX)$(IS_HURD),00)
+ifneq ($(IS_LINUX)$(IS_HURD)$(IS_HAIKU),000)
# Linux uses full version suffix for shared library
SOLIB_VERSION_SUFFIX=.$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)
SOLIB_FLAGS=-Wl,-soname,libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
--
2.21.0
From 50bd4a3d094758251a53fc87629dfb732b3bb5c9 Mon Sep 17 00:00:00 2001
From: kikadf <kikadf.01@gmail.com>
Date: Sat, 1 Jun 2019 09:38:34 +0200
Subject: crypto++: Fix linking of lib
diff --git a/GNUmakefile b/GNUmakefile
index 6123fd8..99a5dc0 100755
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1257,6 +1257,7 @@ ifneq ($(wildcard libcryptopp.so$(SOLIB_VERSION_SUFFIX)),)
$(CHMOD) 0755 $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_VERSION_SUFFIX)
ifeq ($(HAS_SOLIB_VERSION),1)
-$(LN) libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)/libcryptopp.so
+ -$(LN) libcryptopp.so$(SOLIB_VERSION_SUFFIX) $(DESTDIR)$(LIBDIR)/libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
$(LDCONF) $(DESTDIR)$(LIBDIR)
endif
endif
--
2.21.0
From e6f17eefec2ebcb51b5c791db1baa1cdc2d6bb60 Mon Sep 17 00:00:00 2001
From: kikadf <kikadf.01@gmail.com>
Date: Fri, 7 Jun 2019 15:00:26 +0200
Subject: Haiku fix 2 config.h
diff --git a/config.h b/config.h
index 283c409..60573ad 100644
--- a/config.h
+++ b/config.h
@@ -928,7 +928,7 @@ NAMESPACE_END
#define CRYPTOPP_WIN32_AVAILABLE
#endif
-#if defined(__unix__) || defined(__MACH__) || defined(__NetBSD__) || defined(__sun)
+#if defined(__unix__) || defined(__MACH__) || defined(__NetBSD__) || defined(__sun) || defined(__HAIKU__)
#define CRYPTOPP_UNIX_AVAILABLE
#endif
--
2.21.0