commit:     de34159b3a6953d2858ffa42124617f3886a9962
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 19 08:09:45 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Nov 19 08:33:58 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de34159b

dev-libs/ffcall: add 2.4

Contains some important portability fixes.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/ffcall/Manifest          |  1 +
 dev-libs/ffcall/ffcall-2.4.ebuild | 61 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+)

diff --git a/dev-libs/ffcall/Manifest b/dev-libs/ffcall/Manifest
index d12160d31ce4..70f09ecda210 100644
--- a/dev-libs/ffcall/Manifest
+++ b/dev-libs/ffcall/Manifest
@@ -1 +1,2 @@
 DIST libffcall-2.1.tar.gz 943235 BLAKE2B 
ae82663174db084e830b6ff77ceedf8641b3edeb7800952ac4e2772d9033da3e45f46159e6fdae86615dc69fceba39f48d6c75e6cbd41be98f1986fa69d50b3b
 SHA512 
da73375fb45b7d764c06437a517c2a90abf7d5de6afe0a8ca19e6dfafd2a8c7107e39d230ecbc8edfdd5926b16a0c13b7bb9319287047c47de1241b2f6ae805e
+DIST libffcall-2.4.tar.gz 1253767 BLAKE2B 
669bf556f082b533eb7d71ebc6fadeac464b1a6054ac8078c9315678929bcfb8ad4b7376b345bcfbb5d2caf9d45179012d4bb5a08ad675f475f58570ae96b7ae
 SHA512 
c9451662764a888e3be21499c29673bfb0e1df4915814da3506db5d395a2b00ea2f0c08d1c9dffebf030179f9347794876ec6ec9e6710b4fc70fd760960335e6

diff --git a/dev-libs/ffcall/ffcall-2.4.ebuild 
b/dev-libs/ffcall/ffcall-2.4.ebuild
new file mode 100644
index 000000000000..84fa806a52d6
--- /dev/null
+++ b/dev-libs/ffcall/ffcall-2.4.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic
+
+MY_PV="libffcall-${PV}"
+
+DESCRIPTION="Build foreign function call interfaces in embedded interpreter"
+HOMEPAGE="https://www.gnu.org/software/libffcall/";
+SRC_URI="mirror://gnu/libffcall/${MY_PV}.tar.gz"
+S="${WORKDIR}"/${MY_PV}
+
+# "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 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 
~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
+
+src_prepare() {
+       # 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
+       local mfi
+       for mfi in {,*/,*/*/,}Makefile.in ; do
+               einfo "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
+       done
+
+       eapply_user
+}
+
+src_configure() {
+       append-flags -fPIC
+
+       # Doc goes in datadir
+       econf \
+               --datadir="${EPREFIX}"/usr/share/doc/${PF} \
+               --enable-shared \
+               --disable-static
+}
+
+src_compile() {
+       # TODO. Remove -j1
+       emake -j1
+}
+
+src_install() {
+       dodoc NEWS README
+       dodir /usr/share/man
+
+       default
+
+       find "${ED}" -name '*.la' -delete || die
+}

Reply via email to