2011-09-23 23:23:12 +10:00
|
|
|
# Description: C++ class library of cryptographic schemes.
|
2019-09-20 23:42:12 +10:00
|
|
|
# URL: https://www.cryptopp.com/
|
2014-11-10 23:28:07 +11:00
|
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
2011-09-23 23:23:12 +10:00
|
|
|
|
|
|
|
name=crypto++
|
2019-09-20 23:42:12 +10:00
|
|
|
version=8.2.0
|
2011-09-23 23:23:12 +10:00
|
|
|
release=1
|
2020-05-25 19:20:35 +00:00
|
|
|
source=(https://github.com/weidai11/cryptopp/archive/CRYPTOPP_${version//./_}/$name-$version.tar.gz
|
2014-10-21 19:50:30 +11:00
|
|
|
libcrypto++.pc.in)
|
2011-09-23 23:23:12 +10:00
|
|
|
|
|
|
|
build() {
|
2020-05-25 19:20:35 +00:00
|
|
|
cd ${name//++/pp}-CRYPTOPP_${version//./_}
|
2014-10-21 19:50:30 +11:00
|
|
|
sed -i -e 's/^CXXFLAGS/#CXXFLAGS/' GNUmakefile
|
|
|
|
export CXXFLAGS="$CXXFLAGS -DNDEBUG -fPIC"
|
|
|
|
|
2016-09-22 08:54:40 +10:00
|
|
|
# http://www.openwall.com/lists/oss-security/2016/09/19/6
|
|
|
|
echo "#define CRYPTOPP_UNUSED(x) ((void)(x))" >> config.h
|
|
|
|
sed -i -e 's|assert[[:space:]]*(|CRYPTOPP_UNUSED(|g' *.h *.cpp
|
|
|
|
|
2014-10-21 19:50:30 +11:00
|
|
|
make -f GNUmakefile
|
|
|
|
make libcryptopp.so
|
|
|
|
|
|
|
|
install -d $PKG/usr/{lib/pkgconfig,include/cryptopp}
|
|
|
|
install -m 0644 *.h $PKG/usr/include/cryptopp/
|
|
|
|
install -m 0644 libcryptopp.so $PKG/usr/lib/libcryptopp.so
|
|
|
|
|
|
|
|
sed -e "s/@VERSION@/$version/g" \
|
|
|
|
$SRC/libcrypto++.pc.in > libcrypto++.pc
|
|
|
|
|
|
|
|
install -m 0644 libcrypto++.pc $PKG/usr/lib/pkgconfig/libcrypto++.pc
|
2011-09-23 23:23:12 +10:00
|
|
|
}
|