dev-libs/kuserfeedback: x86 stable wrt bug #721452
[gentoo.git] / dev-libs / ffcall / ffcall-2.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit eutils flag-o-matic ltprune toolchain-funcs
7
8 MY_PV="libffcall-${PV}"
9
10 DESCRIPTION="Build foreign function call interfaces in embedded interpreter"
11 HOMEPAGE="https://www.gnu.org/software/libffcall/"
12 SRC_URI="mirror://gnu/libffcall/${MY_PV}.tar.gz"
13
14 # "Ffcall is under GNU GPL. As a special exception, if used in GNUstep
15 # or in derivate works of GNUstep, the included parts of ffcall are
16 # under GNU LGPL." -ffcall author
17 LICENSE="GPL-2+"
18 SLOT="0"
19 KEYWORDS="~alpha amd64 ~arm64 ~hppa ~ia64 ppc ~ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
20 IUSE=""
21
22 S=${WORKDIR}/${MY_PV}
23
24 DEPEND=""
25 RDEPEND=""
26
27 src_prepare() {
28         # The build system is a strange mix of autogenerated
29         # files and manual tweaks on top. Uses $CFLAGS / $LDFLAGS randomly.
30         # We are adding them consistently here and a bit over the top:
31         # bugs: #334581
32
33         for mfi in {,*/,*/*/,}Makefile.in
34         do
35                 einfo "Patching '${mfi}'"
36                 # usually uses only assembler here, but -march=
37                 # and -Wa, are a must to pass here.
38                 sed -e 's/$(CC) /&$(CFLAGS) /g' \
39                         -i "${mfi}" || die
40         done
41         eapply_user
42 }
43
44 src_configure() {
45         append-flags -fPIC
46
47         # Doc goes in datadir
48         econf \
49                 --datadir="${EPREFIX}"/usr/share/doc/${PF} \
50                 --enable-shared \
51                 --disable-static
52 }
53
54 src_compile() {
55         # TODO. Remove -j1
56         emake -j1
57 }
58
59 src_install() {
60         dodoc NEWS README
61         dodir /usr/share/man
62         default
63         prune_libtool_files
64 }