1 |
commit: 6d25fb606f1cf674648e79da2ce71fe7da439508 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 28 18:04:51 2018 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 28 18:05:16 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d25fb60 |
7 |
|
8 |
dev-libs/beecrypt: disable assembly for x32, bug #461960 |
9 |
|
10 |
beecrypt has target-specifix assembly code for arithmetics |
11 |
in gas/mpopt.x86_64.m4. That assumes that x86_64 has 64-bit |
12 |
items to represent bignums. |
13 |
|
14 |
Unfortunately that is not true for x32 ABI as detection is |
15 |
based on size of 'unsigned long': |
16 |
|
17 |
``` |
18 |
AC_DEFUN([BEE_CPU_BITS],[ |
19 |
AC_CHECK_SIZEOF([unsigned long]) |
20 |
if test $ac_cv_sizeof_unsigned_long -eq 8; then |
21 |
AC_SUBST(MP_WBITS,64U) |
22 |
``` |
23 |
|
24 |
To workaround this deficiency disable assembly code completely: |
25 |
pass --enable-debug. |
26 |
|
27 |
Closes: https://bugs.gentoo.org/461960 |
28 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
29 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
30 |
|
31 |
dev-libs/beecrypt/beecrypt-4.2.1-r6.ebuild | 104 +++++++++++++++++++++++++++++ |
32 |
1 file changed, 104 insertions(+) |
33 |
|
34 |
diff --git a/dev-libs/beecrypt/beecrypt-4.2.1-r6.ebuild b/dev-libs/beecrypt/beecrypt-4.2.1-r6.ebuild |
35 |
new file mode 100644 |
36 |
index 00000000000..7ec1630ce8c |
37 |
--- /dev/null |
38 |
+++ b/dev-libs/beecrypt/beecrypt-4.2.1-r6.ebuild |
39 |
@@ -0,0 +1,104 @@ |
40 |
+# Copyright 1999-2018 Gentoo Authors |
41 |
+# Distributed under the terms of the GNU General Public License v2 |
42 |
+ |
43 |
+EAPI=6 |
44 |
+ |
45 |
+PYTHON_COMPAT=( python2_7 ) |
46 |
+ |
47 |
+inherit autotools flag-o-matic java-pkg-opt-2 python-single-r1 |
48 |
+ |
49 |
+DESCRIPTION="General-purpose cryptography library" |
50 |
+HOMEPAGE="https://sourceforge.net/projects/beecrypt/" |
51 |
+SRC_URI="mirror://sourceforge/beecrypt/${P}.tar.gz" |
52 |
+ |
53 |
+LICENSE="GPL-2 LGPL-2" |
54 |
+SLOT="0" |
55 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos" |
56 |
+IUSE="+threads java cxx python static-libs doc" |
57 |
+REQUIRED_USE="cxx? ( threads ) |
58 |
+ python? ( ${PYTHON_REQUIRED_USE} )" |
59 |
+ |
60 |
+COMMON_DEPEND="!<app-arch/rpm-4.2.1 |
61 |
+ cxx? ( >=dev-libs/icu-6.1:= ) |
62 |
+ python? ( ${PYTHON_DEPS} )" |
63 |
+ |
64 |
+DEPEND="${COMMON_DEPEND} |
65 |
+ java? ( >=virtual/jdk-1.4 ) |
66 |
+ doc? ( app-doc/doxygen |
67 |
+ virtual/latex-base |
68 |
+ dev-texlive/texlive-fontsextra |
69 |
+ )" |
70 |
+RDEPEND="${COMMON_DEPEND} |
71 |
+ java? ( >=virtual/jre-1.4 )" |
72 |
+ |
73 |
+DOCS=( BUGS README BENCHMARKS NEWS ) |
74 |
+PATCHES=( |
75 |
+ "${FILESDIR}"/${P}-build-system.patch |
76 |
+ "${FILESDIR}"/${P}-gcc-4.7.patch |
77 |
+ |
78 |
+ # Fixes bug 596904 |
79 |
+ "${FILESDIR}"/${P}-c++11-allow-throw-in-destructors.patch |
80 |
+ "${FILESDIR}"/${P}-cast-uchar.patch #618676 |
81 |
+ |
82 |
+ "${FILESDIR}"/${P}-icu-61.patch |
83 |
+) |
84 |
+ |
85 |
+pkg_setup() { |
86 |
+ use python && python-single-r1_pkg_setup |
87 |
+ java-pkg-opt-2_pkg_setup |
88 |
+} |
89 |
+ |
90 |
+src_prepare() { |
91 |
+ default |
92 |
+ eautoreconf |
93 |
+} |
94 |
+ |
95 |
+src_configure() { |
96 |
+ # ICU needs char16_t support now |
97 |
+ # bug 649548 |
98 |
+ append-cxxflags -std=c++14 |
99 |
+ |
100 |
+ # Crudely disable amd64 assembly code |
101 |
+ # as it assumes 64-bit 'unsinged long' size. bug #461960 |
102 |
+ local x32_hack=() |
103 |
+ use amd64 && [[ ${ABI} == "x32" ]] && x32_hack=(--enable-debug) |
104 |
+ |
105 |
+ # cplusplus needs threads support |
106 |
+ ac_cv_java_include=$(use java && java-pkg_get-jni-cflags) \ |
107 |
+ econf \ |
108 |
+ --disable-expert-mode \ |
109 |
+ $(use_enable static-libs static) \ |
110 |
+ $(use_enable threads) \ |
111 |
+ $(use_with python python "${PYTHON}") \ |
112 |
+ $(use_with cxx cplusplus) \ |
113 |
+ $(use_with java) \ |
114 |
+ "${x32_hack[@]}" |
115 |
+} |
116 |
+ |
117 |
+src_compile() { |
118 |
+ default |
119 |
+ |
120 |
+ if use doc; then |
121 |
+ pushd include/beecrypt >/dev/null || die |
122 |
+ doxygen || die "doxygen failed" |
123 |
+ popd >/dev/null || die |
124 |
+ HTML_DOCS=( docs/html/*.{css,html,js,png} ) |
125 |
+ fi |
126 |
+} |
127 |
+ |
128 |
+src_test() { |
129 |
+ export BEECRYPT_CONF_FILE="${T}/beecrypt-test.conf" |
130 |
+ echo "provider.1=${S}/c++/provider/.libs/base.so" > "${BEECRYPT_CONF_FILE}" || die |
131 |
+ emake check bench |
132 |
+} |
133 |
+ |
134 |
+src_install() { |
135 |
+ default |
136 |
+ |
137 |
+ if use python; then |
138 |
+ rm -f "${D%/}$(python_get_sitedir)"/_bc.*a || die |
139 |
+ fi |
140 |
+ if ! use static-libs; then |
141 |
+ find "${D}" -name '*.la' -delete || die |
142 |
+ fi |
143 |
+} |