/[gentoo-x86]/dev-libs/libffi/libffi-3.0.11.ebuild
Gentoo

Contents of /dev-libs/libffi/libffi-3.0.11.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.22 - (show annotations) (download)
Tue May 27 17:14:03 2014 UTC (2 months ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.21: +1 -1 lines
FILE REMOVED
old

(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-libs/libffi/libffi-3.0.11.ebuild,v 1.21 2014/03/25 20:04:37 vapier Exp $
4
5 EAPI=4
6
7 MY_P=${P/_/-}
8
9 inherit eutils libtool multilib toolchain-funcs
10
11 DESCRIPTION="a portable, high level programming interface to various calling conventions."
12 HOMEPAGE="http://sourceware.org/libffi/"
13 SRC_URI="ftp://sourceware.org/pub/${PN}/${MY_P}.tar.gz"
14
15 LICENSE="MIT"
16 SLOT="0"
17 KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
18 IUSE="debug static-libs test"
19
20 RDEPEND=""
21 DEPEND="test? ( dev-util/dejagnu )"
22
23 S=${WORKDIR}/${MY_P}
24
25 DOCS="ChangeLog* README"
26
27 pkg_setup() {
28 # Check for orphaned libffi, see http://bugs.gentoo.org/354903 for example
29 if [[ ${ROOT} == "/" && ${EPREFIX} == "" ]] && ! has_version ${CATEGORY}/${PN}; then
30 local base="${T}"/conftest
31 echo 'int main() { }' > "${base}".c
32 $(tc-getCC) -o "${base}" "${base}".c -lffi >&/dev/null
33 if [ $? -eq 0 ]; then
34 eerror "The linker reported linking against -lffi to be working while it shouldn't have."
35 eerror "This is wrong and you should find and delete the old copy of libffi before continuing."
36 die "The system is in inconsistent state with unknown libffi installed."
37 fi
38 fi
39 }
40
41 src_prepare() {
42 epatch "${FILESDIR}"/${P}-x86-pic-check.patch #417179
43 sed -i 's:@toolexeclibdir@:$(libdir):g' Makefile.in || die #462814
44 epatch_user
45 elibtoolize
46 }
47
48 src_configure() {
49 use userland_BSD && export HOST="${CHOST}"
50 econf \
51 $(use_enable static-libs static) \
52 $(use_enable debug)
53 }
54
55 src_install() {
56 default
57 rm -f "${ED}"/usr/lib*/lib*.la
58 }
59
60 pkg_preinst() {
61 preserve_old_lib /usr/$(get_libdir)/${PN}$(get_libname 5)
62 }
63
64 pkg_postinst() {
65 preserve_old_lib_notify /usr/$(get_libdir)/${PN}$(get_libname 5)
66 }

  ViewVC Help
Powered by ViewVC 1.1.20