blob: a6686d34b64141242fc62a0c7ed54ee144dd8a80 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
src_configure() {
export ac_cv_sys_symbol_underscore=no
local myconf=(
--enable-static=yes
--disable-padlock-support
--enable-static=yes
)
gkconf "${myconf[@]}"
}
src_install() {
default
rm -rf \
"${D}"/usr/bin/dumpsexp \
"${D}"/usr/bin/hmac256 \
"${D}"/usr/bin/mpicalc \
"${D}"/usr/share
# libgcrypt-config tries to be smart and will omit include
# and lib dir due to set prefix
sed -i \
-e "s|/usr/include|/dont-try-to-be-smart|" \
-e "s|/usr/lib|/dont-try-to-be-smart|" \
"${D}"/usr/bin/libgcrypt-config \
|| die "Failed to make libgcrypt-config dumb!"
mv "${D}"/usr/bin/libgcrypt-config "${D}"/usr/bin/libgcrypt-config.ori \
|| die "Failed to rename '${D}/usr/bin/libgcrypt-config' to '${D}/usr/bin/libgcrypt-config.ori'!"
cat >"${D}"/usr/bin/libgcrypt-config <<-EOF
#!/bin/sh
SYSROOT=\$(dirname "\$(dirname "\$(dirname "\$(readlink -fm "\$0")")")")
exec "\${SYSROOT}"/usr/bin/libgcrypt-config.ori "\$@" | sed -e 's#/#'\${SYSROOT}'/#'
EOF
chmod +x "${D}"/usr/bin/libgcrypt-config \
|| die "Failed to chmod of '${D}/bin/libgcrypt-config'!"
}
|