Gentoo Archives: gentoo-commits

From: "José María Alonso" <nimiux@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/lisp:master commit in: dev-libs/ffcall/, dev-libs/ffcall/files/
Date: Tue, 27 Jun 2017 09:57:19
Message-Id: 1498557430.bd238c3c3cbf1f218a9cd7b3dfc5f494dc8dcb7b.nimiux@gentoo
1 commit: bd238c3c3cbf1f218a9cd7b3dfc5f494dc8dcb7b
2 Author: Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 27 09:57:10 2017 +0000
4 Commit: José María Alonso <nimiux <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 27 09:57:10 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/lisp.git/commit/?id=bd238c3c
7
8 dev-libs/ffcall: Adds new ebuild for version 1.13
9
10 dev-libs/ffcall/ffcall-1.13.ebuild | 76 ++++++++++++++++++++++++++++++
11 dev-libs/ffcall/files/ffcall-make-jN.patch | 13 +++++
12 2 files changed, 89 insertions(+)
13
14 diff --git a/dev-libs/ffcall/ffcall-1.13.ebuild b/dev-libs/ffcall/ffcall-1.13.ebuild
15 new file mode 100644
16 index 00000000..e2514f4f
17 --- /dev/null
18 +++ b/dev-libs/ffcall/ffcall-1.13.ebuild
19 @@ -0,0 +1,76 @@
20 +# Copyright 1999-2017 Gentoo Foundation
21 +# Distributed under the terms of the GNU General Public License v2
22 +
23 +EAPI=6
24 +
25 +inherit eutils flag-o-matic toolchain-funcs
26 +
27 +MY_PV="libffcall-${PV}"
28 +
29 +DESCRIPTION="foreign function call libraries"
30 +HOMEPAGE="https://www.gnu.org/software/libffcall/"
31 +SRC_URI="http://ftp.gnu.org/gnu/libffcall/${MY_PV}.tar.gz"
32 +
33 +# "Ffcall is under GNU GPL. As a special exception, if used in GNUstep
34 +# or in derivate works of GNUstep, the included parts of ffcall are
35 +# under GNU LGPL." -ffcall author
36 +LICENSE="GPL-2+"
37 +SLOT="0"
38 +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
39 +IUSE=""
40 +
41 +S=${WORKDIR}/${MY_PV}
42 +
43 +DEPEND=""
44 +RDEPEND=""
45 +
46 +src_prepare() {
47 + epatch "${FILESDIR}"/${PN}-make-jN.patch
48 +
49 + # The build system is a strange mix of autogenerated
50 + # files and manual tweaks on top. Uses $CFLAGS / $LDFLAGS randomly.
51 + # We are adding them consistently here and a bit over the top:
52 + # bugs: #334581
53 +
54 + for mfi in {,*/,*/*/,}Makefile.in
55 + do
56 + elog "Patching '${mfi}'"
57 + # usually uses only assembler here, but -march=
58 + # and -Wa, are a must to pass here.
59 + sed -e 's/$(CC) /&$(CFLAGS) /g' \
60 + -i "${mfi}" || die
61 +
62 + # usually uses '$(CC) ... -o something' for linking
63 + sed -e 's/\($(CC) .* \)-o /\1 $(LDFLAGS) -o /g' \
64 + -i "${mfi}" || die
65 + done
66 + eapply_user
67 +}
68 +
69 +src_configure() {
70 + append-flags -fPIC
71 + append-flags $(test-flags-CC -Wa,--noexecstack) #253963
72 +
73 + # Doc goes in datadir
74 + econf \
75 + --datadir="${EPREFIX}"/usr/share/doc/${PF} \
76 + --enable-shared \
77 + --disable-static
78 +}
79 +
80 +src_compile() {
81 + # Because CHOST is set to (for example)
82 + # alphaev67-unknown-linux-gnu, CPU gets set to alphaev67 which
83 + # doesn't work in the Makefile (29 Jan 2004 agriffis)
84 + local cpu_setting
85 + [[ "${ARCH}" == "alpha" ]] && cpu_setting='CPU=alpha'
86 +
87 + emake ${cpu_setting}
88 +}
89 +
90 +src_install() {
91 + dodoc NEWS README
92 + dodir /usr/share/man
93 + default
94 + prune_libtool_files
95 +}
96
97 diff --git a/dev-libs/ffcall/files/ffcall-make-jN.patch b/dev-libs/ffcall/files/ffcall-make-jN.patch
98 new file mode 100644
99 index 00000000..98f4c497
100 --- /dev/null
101 +++ b/dev-libs/ffcall/files/ffcall-make-jN.patch
102 @@ -0,0 +1,13 @@
103 +--- ffcall-1.10/callback/Makefile.in~ 2003-10-01 21:46:19.000000000 +0200
104 ++++ ffcall-1.10/callback/Makefile.in 2007-12-18 21:10:51.302118000 +0100
105 +@@ -51,6 +51,10 @@
106 + all-subdirs : force
107 + cd @subdir@; $(MAKE) all
108 +
109 ++vacall_r/libvacall.la: all-subdirs
110 ++
111 ++trampoline_r/libtrampoline.la: all-subdirs
112 ++
113 + callback.h :
114 + $(LN_S) $(srcdir)/callback.h.in callback.h
115 +