Annotation of /branches/R11-stable/extras/crypto++/crypto++-5.6.2-r1.smage2
Parent Directory | Revision Log
Revision 20580 -
(hide annotations)
(download)
Tue Jan 28 11:44:53 2014 UTC (10 years, 8 months ago) by niro
Original Path: trunk/extras/crypto++/crypto++-5.6.2-r1.smage2
File size: 1567 byte(s)
Tue Jan 28 11:44:53 2014 UTC (10 years, 8 months ago) by niro
Original Path: trunk/extras/crypto++/crypto++-5.6.2-r1.smage2
File size: 1567 byte(s)
-create missing pkgconfig file
1 | niro | 20576 | # $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 | niro | 20577 | SRCFILE="${PNAME/++/pp}${PVER//.}.zip" |
19 | niro | 20576 | 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 | niro | 20578 | # disable debug and support pic |
44 | niro | 20576 | export CXXFLAGS="${CXXFLAGS} -DNDEBUG -fPIC" |
45 | |||
46 | mmake -f GNUmakefile || die | ||
47 | # build so-lib | ||
48 | niro | 20579 | mmake libcryptopp.so || die |
49 | niro | 20576 | } |
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 | niro | 20580 | 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 | niro | 20576 | minstalldocs License.txt Readme.txt || die |
73 | } |