1 |
commit: 5df451b2110c922f0677d5f2d34cab1a709afdf0 |
2 |
Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 8 15:44:42 2016 +0000 |
4 |
Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 8 15:45:17 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5df451b2 |
7 |
|
8 |
dev-libs/crypto++: switch to cmake |
9 |
|
10 |
Thanks to aballier for the idea |
11 |
|
12 |
Package-Manager: portage-2.3.0 |
13 |
|
14 |
dev-libs/crypto++/crypto++-5.6.4-r3.ebuild | 54 ++++++++++++++++++++++++++++++ |
15 |
1 file changed, 54 insertions(+) |
16 |
|
17 |
diff --git a/dev-libs/crypto++/crypto++-5.6.4-r3.ebuild b/dev-libs/crypto++/crypto++-5.6.4-r3.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000..f19fedd |
20 |
--- /dev/null |
21 |
+++ b/dev-libs/crypto++/crypto++-5.6.4-r3.ebuild |
22 |
@@ -0,0 +1,54 @@ |
23 |
+# Copyright 1999-2016 Gentoo Foundation |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+# $Id$ |
26 |
+ |
27 |
+EAPI=6 |
28 |
+ |
29 |
+inherit cmake-multilib |
30 |
+ |
31 |
+DESCRIPTION="C++ class library of cryptographic schemes" |
32 |
+HOMEPAGE="http://cryptopp.com" |
33 |
+SRC_URI="mirror://sourceforge/cryptopp/cryptopp${PV//.}.zip" |
34 |
+ |
35 |
+LICENSE="Boost-1.0" |
36 |
+SLOT="0/5.6" # subslot is so version |
37 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x64-macos" |
38 |
+IUSE="static-libs test" |
39 |
+ |
40 |
+DEPEND="app-arch/unzip" |
41 |
+ |
42 |
+S="${WORKDIR}" |
43 |
+ |
44 |
+src_configure() { |
45 |
+ local mycmakeargs=( |
46 |
+ -DBUILD_SHARED=ON |
47 |
+ -DBUILD_STATIC=$(usex static-libs ON $(usex test ON OFF)) |
48 |
+ -DBUILD_TESTING=$(usex test ON OFF) |
49 |
+ |
50 |
+ # ASM isn't Darwin/Mach-O ready, #479554 |
51 |
+ -DDISABLE_ASM=$([[ ${CHOST} == *-darwin* ]] && echo ON || echo OFF) |
52 |
+ ) |
53 |
+ cp config.recommend config.h || die |
54 |
+ cmake-multilib_src_configure |
55 |
+} |
56 |
+ |
57 |
+src_install() { |
58 |
+ cmake-multilib_src_install |
59 |
+ |
60 |
+ # remove leftovers as build system sucks |
61 |
+ rm -fr "${ED}"/usr/bin "${ED}"/usr/share/cryptopp |
62 |
+ use static-libs || rm -f "${ED}${EPREFIX}"/usr/$(get_libdir)/*.a |
63 |
+ |
64 |
+ # compatibility |
65 |
+ dosym cryptopp "${EPREFIX}"/usr/include/crypto++ |
66 |
+ for f in "${ED}${EPREFIX}"/usr/$(get_libdir)/*; do |
67 |
+ ln -s "$(basename "${f}")" "$(echo "${f}" | sed 's/cryptopp/crypto++/')" || die |
68 |
+ done |
69 |
+} |
70 |
+ |
71 |
+pkg_preinst() { |
72 |
+ # we switched directory to symlink |
73 |
+ # make sure portage digests that |
74 |
+ rm -fr "${EROOT}/usr/include/crypto++" |
75 |
+ rm -fr "${EROOT}/usr/include/cryptopp" |
76 |
+} |