mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-11 06:10:06 +02:00
fixed secondary arch added debug package install pkg-config file install & build versioned version of the library
97 lines
2.7 KiB
Bash
97 lines
2.7 KiB
Bash
SUMMARY="A free C++ class library of cryptographic schemes"
|
|
DESCRIPTION="Crypto++ is a C++ Class Library of Cryptographic Schemes \
|
|
The library contains the following algorithms:
|
|
* Authenticated encryption schemes: (GCM, CCM, EAX)
|
|
* High speed stream ciphers: ChaCha (ChaCha8/12/20), Panama
|
|
* AES and AES candidates: AES (Rijndael), RC6, MARS, Twofish, Serpent
|
|
* Other block ciphers: IDEA, DES, Camellia, SEED, RC5, Blowfish,
|
|
* Block cipher modes of operation: ECB, CBC, CBC (CTS), CFB, OFB
|
|
* Message authentication codes: VMAC, HMAC, GMAC, CMAC, CBC-MAC, DMAC
|
|
* Hash functions: BLAKE2 (BLAKE2b, BLAKE2s), SHA-1, SHA-2, SHA-3
|
|
* Public-key cryptography: RSA, DSA, ElGamal, Nyberg-Rueppel (NR)
|
|
* Padding schemes for public-key systems: PKCS#1 v2.0, OAEP, PSS,
|
|
* Key agreement schemes: Diffie-Hellman (DH), Unified Diffie-Hellman (DH2),
|
|
* Elliptic curve cryptography: ECDSA, ECNR, ECIES, ECDH, ECMQV
|
|
* Insecure or obsolescent algorithms: MD2, MD4, MD5
|
|
* And many more other algorithms."
|
|
HOMEPAGE="https://cryptopp.com/"
|
|
COPYRIGHT="2015-2017 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"
|
|
|
|
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
libVersion=$portVersion
|
|
libVersionCompat="$libVersion compat >= ${libVersion%.*}"
|
|
|
|
PROVIDES="
|
|
crypto++$secondaryArchSuffix = $portVersion
|
|
lib:libcryptopp$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
crypto++${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libcryptopp$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES_devel="
|
|
crypto++$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:ld
|
|
cmd:make
|
|
cmd:nasm
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
"
|
|
|
|
defineDebugInfoPackage crypto++$secondaryArchSuffix \
|
|
$libDir/libcryptopp.so.$libVersion
|
|
|
|
BUILD()
|
|
{
|
|
make HAS_SOLIB_VERSION=1 dynamic static $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make \
|
|
HAS_SOLIB_VERSION=1 LDCONF=true \
|
|
BINDIR=$binDir LIBDIR=$libDir \
|
|
DATADIR=$dataDir INCLUDEDIR=$includeDir \
|
|
install
|
|
|
|
# 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
|
|
cat > $developLibDir/pkgconfig/libcrypto++.pc << EOF
|
|
Name: libcrypto++
|
|
Description: Class library of cryptographic schemes
|
|
Version: $portVersion
|
|
Libs: -lcryptopp
|
|
EOF
|
|
|
|
packageEntries devel \
|
|
$relativeDevelopDir
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
make test
|
|
}
|