Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=6174cbe0e76d9e4c60eaa63df5191a31652ed5b7

commit 6174cbe0e76d9e4c60eaa63df5191a31652ed5b7
Author: Devil505 <[email protected]>
Date:   Sun May 13 12:53:40 2012 +0200

cryptopp-5.6.1-1-i686
* version bump
* changed m8r
* add gcc47 patch
* add pkgconfig file

diff --git a/source/lib-extra/cryptopp/FrugalBuild 
b/source/lib-extra/cryptopp/FrugalBuild
index 357a18f..76d2221 100644
--- a/source/lib-extra/cryptopp/FrugalBuild
+++ b/source/lib-extra/cryptopp/FrugalBuild
@@ -1,8 +1,9 @@
# Compiling Time: 0.83 SBU
-# Maintainer: crazy <[email protected]>
+# Maintainer: Devil505 <[email protected]>
+# Contributor: crazy <[email protected]>

pkgname=cryptopp
-pkgver=5.5.2
+pkgver=5.6.1
pkgrel=1
pkgdesc="C++ library for cryptography"
groups=('lib-extra')
@@ -12,14 +13,29 @@ _F_sourceforge_sep="None"
_F_sourceforge_pkgver="`echo $pkgver|tr -d '.'`"
_F_sourceforge_ext=".zip"
Finclude sourceforge
-sha1sums=('18efe451b3c682f40db75dc2b09cb448a835e7d6')
+source=($source \
+       libcrypto++.pc \
+       gcc4.7.patch)
+sha1sums=('31dbb456c21f50865218c57b7eaf4c955a222ba1' \
+          '0cd7179419cfb004da379635d8212a127db94c23' \
+          'eff7a5f5b95c6f392ba05aef09603c77a4a322af')

build()
{
-       cd $Fsrcdir || Fdie
-       ## DO NOT USE our C*FLAGS on this one!!
-       make CXXFLAGS="-O0 -DNDEBUG" PREFIX=/usr || Fdie
-       make PREFIX=$Fdestdir/usr install || Fdie
-       Frm usr/bin
+       cd ${Fsrcdir} || Fdie
+       # Fix gcc 4.7 build
+       patch -Np1 -i "${Fsrcdir}/gcc4.7.patch" || Fdie
+
+       sed -i -e 's/^CXXFLAGS/#CXXFLAGS/' GNUmakefile || Fdie
+       export CXXFLAGS="${CXXFLAGS} -DNDEBUG -fPIC" || Fdie
+       make -f GNUmakefile || Fdie
+       make libcryptopp.so || Fdie
+
+       Fmkdir usr/{lib/pkgconfig,include/cryptopp}
+       Finstallrel 644 *.h /usr/include/cryptopp/
+       Finstallrel 644 libcryptopp.a usr/lib/libcryptopp.a
+       Finstallrel 644 libcryptopp.so usr/lib/libcryptopp.so
+       Finstall 644 libcrypto++.pc /usr/lib/pkgconfig/libcrypto++.pc
}

+# optimization OK
diff --git a/source/lib-extra/cryptopp/gcc4.7.patch 
b/source/lib-extra/cryptopp/gcc4.7.patch
new file mode 100644
index 0000000..1853c49
--- /dev/null
+++ b/source/lib-extra/cryptopp/gcc4.7.patch
@@ -0,0 +1,102 @@
+diff -Naur cryptopp561/algebra.cpp cryptopp561new/algebra.cpp
+--- cryptopp561/algebra.cpp    2010-08-06 18:44:32.000000000 +0200
++++ cryptopp561new/algebra.cpp 2012-05-13 12:38:52.000000000 +0200
+@@ -58,7 +58,7 @@
+       Element g[3]={b, a};
+       unsigned int i0=0, i1=1, i2=2;
+
+-      while (!Equal(g[i1], this->Identity()))
++      while (!this->Equal(g[i1], this->Identity()))
+       {
+               g[i2] = Mod(g[i0], g[i1]);
+               unsigned int t = i0; i0 = i1; i1 = i2; i2 = t;
+diff -Naur cryptopp561/eccrypto.cpp cryptopp561new/eccrypto.cpp
+--- cryptopp561/eccrypto.cpp   2010-08-06 18:44:28.000000000 +0200
++++ cryptopp561new/eccrypto.cpp        2012-05-13 12:40:21.000000000 +0200
+@@ -435,7 +435,7 @@
+       StringSource ssG(param.g, true, new HexDecoder);
+       Element G;
+       bool result = GetCurve().DecodePoint(G, ssG, 
(size_t)ssG.MaxRetrievable());
+-      SetSubgroupGenerator(G);
++      this->SetSubgroupGenerator(G);
+       assert(result);
+
+       StringSource ssN(param.n, true, new HexDecoder);
+@@ -591,7 +591,7 @@
+       if (level >= 2 && pass)
+       {
+               const Integer &q = GetSubgroupOrder();
+-              Element gq = gpc ? 
gpc->Exponentiate(this->GetGroupPrecomputation(), q) : ExponentiateElement(g, 
q);
++              Element gq = gpc ? 
gpc->Exponentiate(this->GetGroupPrecomputation(), q) : 
this->ExponentiateElement(g, q);
+               pass = pass && IsIdentity(gq);
+       }
+       return pass;
+@@ -629,7 +629,7 @@
+       typename EC::Point P;
+       if (!this->GetGroupParameters().GetCurve().DecodePoint(P, bt, size))
+               BERDecodeError();
+-      SetPublicElement(P);
++      this->SetPublicElement(P);
+ }
+
+ template <class EC>
+diff -Naur cryptopp561/eccrypto.h cryptopp561new/eccrypto.h
+--- cryptopp561/eccrypto.h     2010-08-06 18:46:24.000000000 +0200
++++ cryptopp561new/eccrypto.h  2012-05-13 12:43:59.000000000 +0200
+@@ -43,7 +43,7 @@
+       void Initialize(const EllipticCurve &ec, const Point &G, const Integer 
&n, const Integer &k = Integer::Zero())
+       {
+               this->m_groupPrecomputation.SetCurve(ec);
+-              SetSubgroupGenerator(G);
++              this->SetSubgroupGenerator(G);
+               m_n = n;
+               m_k = k;
+       }
+@@ -145,9 +145,9 @@
+       typedef typename EC::Point Element;
+
+       void Initialize(const DL_GroupParameters_EC<EC> &params, const Element 
&Q)
+-              {this->AccessGroupParameters() = params; SetPublicElement(Q);}
++              {this->AccessGroupParameters() = params; 
this->SetPublicElement(Q);}
+       void Initialize(const EC &ec, const Element &G, const Integer &n, const 
Element &Q)
+-              {this->AccessGroupParameters().Initialize(ec, G, n); 
SetPublicElement(Q);}
++              {this->AccessGroupParameters().Initialize(ec, G, n); 
this->SetPublicElement(Q);}
+
+       // X509PublicKey
+       void BERDecodePublicKey(BufferedTransformation &bt, bool 
parametersPresent, size_t size);
+@@ -166,9 +166,9 @@
+       void Initialize(const EC &ec, const Element &G, const Integer &n, const 
Integer &x)
+               {this->AccessGroupParameters().Initialize(ec, G, n); 
this->SetPrivateExponent(x);}
+       void Initialize(RandomNumberGenerator &rng, const 
DL_GroupParameters_EC<EC> &params)
+-              {GenerateRandom(rng, params);}
++              {this->GenerateRandom(rng, params);}
+       void Initialize(RandomNumberGenerator &rng, const EC &ec, const Element 
&G, const Integer &n)
+-              {GenerateRandom(rng, DL_GroupParameters_EC<EC>(ec, G, n));}
++              {this->GenerateRandom(rng, DL_GroupParameters_EC<EC>(ec, G, 
n));}
+
+       // PKCS8PrivateKey
+       void BERDecodePrivateKey(BufferedTransformation &bt, bool 
parametersPresent, size_t size);
+diff -Naur cryptopp561/panama.cpp cryptopp561new/panama.cpp
+--- cryptopp561/panama.cpp     2010-08-09 14:22:42.000000000 +0200
++++ cryptopp561new/panama.cpp  2012-05-13 12:45:47.000000000 +0200
+@@ -422,7 +422,7 @@
+ {
+       this->ThrowIfInvalidTruncatedSize(size);
+
+-      PadLastBlock(this->BLOCKSIZE, 0x01);
++      this->PadLastBlock(this->BLOCKSIZE, 0x01);
+
+       HashEndianCorrectedBlock(this->m_data);
+
+diff -Naur cryptopp561/secblock.h cryptopp561new/secblock.h
+--- cryptopp561/secblock.h     2010-08-06 18:46:20.000000000 +0200
++++ cryptopp561new/secblock.h  2012-05-13 12:44:26.000000000 +0200
+@@ -88,7 +88,7 @@
+
+       pointer allocate(size_type n, const void * = NULL)
+       {
+-              CheckSize(n);
++              this->CheckSize(n);
+               if (n == 0)
+                       return NULL;
+
diff --git a/source/lib-extra/cryptopp/libcrypto++.pc 
b/source/lib-extra/cryptopp/libcrypto++.pc
new file mode 100644
index 0000000..698d761
--- /dev/null
+++ b/source/lib-extra/cryptopp/libcrypto++.pc
@@ -0,0 +1,11 @@
+# Written by Alexander Rødseth <[email protected]>
+
+prefix=/usr
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: libcrypto++-5.6.1
+Description: Class library of cryptographic schemes
+Version: 5.6.1
+Libs: -L${libdir} -lcryptopp
+Cflags: -I${includedir}
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to