contrib/crypto++/Pkgfile

31 lines
911 B
Plaintext
Raw Normal View History

2011-09-23 15:23:12 +02:00
# Description: C++ class library of cryptographic schemes.
2019-09-20 15:42:12 +02:00
# URL: https://www.cryptopp.com/
2014-11-10 13:28:07 +01:00
# Maintainer: Danny Rawlins, crux at romster dot me
2011-09-23 15:23:12 +02:00
name=crypto++
2019-09-20 15:42:12 +02:00
version=8.2.0
2011-09-23 15:23:12 +02:00
release=1
2014-10-21 10:50:30 +02:00
source=(http://www.cryptopp.com/${name/++/pp}${version//\./}.zip
libcrypto++.pc.in)
2011-09-23 15:23:12 +02:00
build() {
2014-10-21 10:50:30 +02:00
sed -i -e 's/^CXXFLAGS/#CXXFLAGS/' GNUmakefile
export CXXFLAGS="$CXXFLAGS -DNDEBUG -fPIC"
# 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 10:50:30 +02: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 15:23:12 +02:00
}