Contents of /branches/R11-unstable/extras/crypto++/crypto++-5.6.2-r1.smage2
Parent Directory | Revision Log
Revision 25162 -
(show annotations)
(download)
Tue Nov 25 03:09:13 2014 UTC (9 years, 10 months ago) by niro
File size: 1567 byte(s)
Tue Nov 25 03:09:13 2014 UTC (9 years, 10 months ago) by niro
File size: 1567 byte(s)
-release branches/R11-unstable
1 | # $Id$ |
2 | |
3 | PNAME="crypto++" |
4 | PVER="5.6.2" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="app-crypt" |
8 | |
9 | DESCRIPTION="Crypto++ Library is a free C++ class library of cryptographic schemes." |
10 | HOMEPAGE="http://www.cryptopp.com/" |
11 | |
12 | DEPEND=">= virtual/glibc |
13 | >= sys-libs/libstdc++-4.8" |
14 | |
15 | SDEPEND=">= app-arch/unzip-6 |
16 | >= virtual/sed" |
17 | |
18 | SRCFILE="${PNAME/++/pp}${PVER//.}.zip" |
19 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
20 | |
21 | sminclude mtools |
22 | |
23 | SRC_URI=( |
24 | http://www.cryptopp.com/${SRCFILE} |
25 | mirror://${PNAME}/${SRCFILE} |
26 | ) |
27 | |
28 | UP2DATE="updatecmd ${HOMEPAGE} | grep ']Crypto++ [0-9]' | sed -n 's:.*Crypto++\ \(.*\):\1:;$ p'" |
29 | |
30 | src_prepare() |
31 | { |
32 | munpack ${SRCFILE} ${SRCDIR} || die |
33 | cd ${SRCDIR} |
34 | |
35 | # honor cflags |
36 | sed -i 's:^CXXFLAGS:#CXXFLAGS:' GNUmakefile || die |
37 | } |
38 | |
39 | src_compile() |
40 | { |
41 | cd ${SRCDIR} |
42 | |
43 | # disable debug and support pic |
44 | export CXXFLAGS="${CXXFLAGS} -DNDEBUG -fPIC" |
45 | |
46 | mmake -f GNUmakefile || die |
47 | # build so-lib |
48 | mmake libcryptopp.so || die |
49 | } |
50 | |
51 | src_install() |
52 | { |
53 | cd ${SRCDIR} |
54 | |
55 | minstalldir /usr/include/cryptopp || die |
56 | minstallfile \*.h /usr/include/cryptopp || die |
57 | minstalldir /usr/$(mlibdir)/pkgconfig || die |
58 | minstallexec libcryptopp.so /usr/$(mlibdir) || die |
59 | |
60 | MCONFIG="/usr/$(mlibdir)/pkgconfig/libcrypto++.pc" |
61 | mclearconfig |
62 | maddconfig 'prefix=/usr' |
63 | maddconfig "libdir=\${prefix}/$(mlibdir)" |
64 | maddconfig 'includedir=${prefix}/include' |
65 | maddconfig |
66 | maddconfig "Name: libcrypto++-${PVER}" |
67 | maddconfig 'Description: Class library of cryptographic schemes' |
68 | maddconfig "Version: ${PVER}" |
69 | maddconfig 'Libs: -L${libdir} -lcryptopp' |
70 | maddconfig 'Cflags: -I${includedir}' |
71 | |
72 | minstalldocs License.txt Readme.txt || die |
73 | } |