commit: bd238c3c3cbf1f218a9cd7b3dfc5f494dc8dcb7b
Author: Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 27 09:57:10 2017 +0000
Commit: José María Alonso <nimiux <AT> gentoo <DOT> org>
CommitDate: Tue Jun 27 09:57:10 2017 +0000
URL: https://gitweb.gentoo.org/proj/lisp.git/commit/?id=bd238c3c
dev-libs/ffcall: Adds new ebuild for version 1.13
dev-libs/ffcall/ffcall-1.13.ebuild | 76 ++++++++++++++++++++++++++++++
dev-libs/ffcall/files/ffcall-make-jN.patch | 13 +++++
2 files changed, 89 insertions(+)
diff --git a/dev-libs/ffcall/ffcall-1.13.ebuild
b/dev-libs/ffcall/ffcall-1.13.ebuild
new file mode 100644
index 00000000..e2514f4f
--- /dev/null
+++ b/dev-libs/ffcall/ffcall-1.13.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils flag-o-matic toolchain-funcs
+
+MY_PV="libffcall-${PV}"
+
+DESCRIPTION="foreign function call libraries"
+HOMEPAGE="https://www.gnu.org/software/libffcall/"
+SRC_URI="http://ftp.gnu.org/gnu/libffcall/${MY_PV}.tar.gz"
+
+# "Ffcall is under GNU GPL. As a special exception, if used in GNUstep
+# or in derivate works of GNUstep, the included parts of ffcall are
+# under GNU LGPL." -ffcall author
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd
~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE=""
+
+S=${WORKDIR}/${MY_PV}
+
+DEPEND=""
+RDEPEND=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-make-jN.patch
+
+ # The build system is a strange mix of autogenerated
+ # files and manual tweaks on top. Uses $CFLAGS / $LDFLAGS randomly.
+ # We are adding them consistently here and a bit over the top:
+ # bugs: #334581
+
+ for mfi in {,*/,*/*/,}Makefile.in
+ do
+ elog "Patching '${mfi}'"
+ # usually uses only assembler here, but -march=
+ # and -Wa, are a must to pass here.
+ sed -e 's/$(CC) /&$(CFLAGS) /g' \
+ -i "${mfi}" || die
+
+ # usually uses '$(CC) ... -o something' for linking
+ sed -e 's/\($(CC) .* \)-o /\1 $(LDFLAGS) -o /g' \
+ -i "${mfi}" || die
+ done
+ eapply_user
+}
+
+src_configure() {
+ append-flags -fPIC
+ append-flags $(test-flags-CC -Wa,--noexecstack) #253963
+
+ # Doc goes in datadir
+ econf \
+ --datadir="${EPREFIX}"/usr/share/doc/${PF} \
+ --enable-shared \
+ --disable-static
+}
+
+src_compile() {
+ # Because CHOST is set to (for example)
+ # alphaev67-unknown-linux-gnu, CPU gets set to alphaev67 which
+ # doesn't work in the Makefile (29 Jan 2004 agriffis)
+ local cpu_setting
+ [[ "${ARCH}" == "alpha" ]] && cpu_setting='CPU=alpha'
+
+ emake ${cpu_setting}
+}
+
+src_install() {
+ dodoc NEWS README
+ dodir /usr/share/man
+ default
+ prune_libtool_files
+}
diff --git a/dev-libs/ffcall/files/ffcall-make-jN.patch
b/dev-libs/ffcall/files/ffcall-make-jN.patch
new file mode 100644
index 00000000..98f4c497
--- /dev/null
+++ b/dev-libs/ffcall/files/ffcall-make-jN.patch
@@ -0,0 +1,13 @@
+--- ffcall-1.10/callback/Makefile.in~ 2003-10-01 21:46:19.000000000 +0200
++++ ffcall-1.10/callback/Makefile.in 2007-12-18 21:10:51.302118000 +0100
+@@ -51,6 +51,10 @@
+ all-subdirs : force
+ cd @subdir@; $(MAKE) all
+
++vacall_r/libvacall.la: all-subdirs
++
++trampoline_r/libtrampoline.la: all-subdirs
++
+ callback.h :
+ $(LN_S) $(srcdir)/callback.h.in callback.h
+