diff options
author | Travis Tilley <lv@gentoo.org> | 2004-07-18 01:53:28 +0000 |
---|---|---|
committer | Travis Tilley <lv@gentoo.org> | 2004-07-18 01:53:28 +0000 |
commit | 8150a8779881bcbfc3976e66209dde786b3e4af0 (patch) | |
tree | 21a8fb82e4a3c6a6274b5ea0aa4296f3b298938c /dev-libs/libffi | |
parent | Correct typo in instructions (Manifest recommit) (diff) | |
download | gentoo-2-8150a8779881bcbfc3976e66209dde786b3e4af0.tar.gz gentoo-2-8150a8779881bcbfc3976e66209dde786b3e4af0.tar.bz2 gentoo-2-8150a8779881bcbfc3976e66209dde786b3e4af0.zip |
added an ebuild for the libffi 2.0 beta from the gcc 3.4.1 tarball. keyworded ~amd64
Diffstat (limited to 'dev-libs/libffi')
-rw-r--r-- | dev-libs/libffi/ChangeLog | 8 | ||||
-rw-r--r-- | dev-libs/libffi/Manifest | 2 | ||||
-rw-r--r-- | dev-libs/libffi/files/digest-libffi-3.4.1 | 1 | ||||
-rw-r--r-- | dev-libs/libffi/libffi-3.4.1.ebuild | 241 |
4 files changed, 251 insertions, 1 deletions
diff --git a/dev-libs/libffi/ChangeLog b/dev-libs/libffi/ChangeLog index 2d16f65cada0..b90a3539179f 100644 --- a/dev-libs/libffi/ChangeLog +++ b/dev-libs/libffi/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-libs/libffi # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libffi/ChangeLog,v 1.9 2004/07/02 04:45:59 eradicator Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libffi/ChangeLog,v 1.10 2004/07/18 01:53:28 lv Exp $ + +*libffi-3.4.1 (17 Jul 2004) + + 17 Jul 2004; Travis Tilley <lv@gentoo.org> +libffi-3.4.1.ebuild: + added an ebuild for the libffi 2.0 beta from the gcc 3.4.1 tarball. keyworded + ~amd64 01 Jul 2004; Jeremy Huddleston <eradicator@gentoo.org> libffi-1.20.ebuild: virtual/glibc -> virtual/libc diff --git a/dev-libs/libffi/Manifest b/dev-libs/libffi/Manifest index 4829659ea100..e3d26682ec08 100644 --- a/dev-libs/libffi/Manifest +++ b/dev-libs/libffi/Manifest @@ -1,3 +1,5 @@ MD5 3113b98f43bda47db0f39bd6f6e3aad1 libffi-1.20.ebuild 605 +MD5 f66a8d9d53d731825ff8f84e733646cd libffi-3.4.1.ebuild 6772 MD5 2d971c19d6cde393230a6c824df88206 ChangeLog 1505 MD5 ed8f1e978198c34ad3dc3b81c4804199 files/digest-libffi-1.20 63 +MD5 03a0e46a8ce1aff598b68a731112c13a files/digest-libffi-3.4.1 64 diff --git a/dev-libs/libffi/files/digest-libffi-3.4.1 b/dev-libs/libffi/files/digest-libffi-3.4.1 new file mode 100644 index 000000000000..ba271506dd42 --- /dev/null +++ b/dev-libs/libffi/files/digest-libffi-3.4.1 @@ -0,0 +1 @@ +MD5 31b459062499f9f68d451db9cbf3205c gcc-3.4.1.tar.bz2 27182385 diff --git a/dev-libs/libffi/libffi-3.4.1.ebuild b/dev-libs/libffi/libffi-3.4.1.ebuild new file mode 100644 index 000000000000..d918fda40478 --- /dev/null +++ b/dev-libs/libffi/libffi-3.4.1.ebuild @@ -0,0 +1,241 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: + +IUSE="nls" + +inherit eutils flag-o-matic libtool + +# This ebuild mod'd from libstdc++ compatbility package ebuild to create +# a similar structure for libffi, which is also included in gcc sources. +# __Armando Di Cianno + +# Compile problems with these (bug #6641 among others)... +#filter-flags "-fno-exceptions -fomit-frame-pointer -fforce-addr" + +# Recently there has been a lot of stability problem in Gentoo-land. Many +# things can be the cause to this, but I believe that it is due to gcc3 +# still having issues with optimizations, or with it not filtering bad +# combinations (protecting the user maybe from himeself) yet. +# +# This can clearly be seen in large builds like glibc, where too aggressive +# CFLAGS cause the tests to fail miserbly. +# +# Quote from Nick Jones <carpaski@gentoo.org>, who in my opinion +# knows what he is talking about: +# +# People really shouldn't force code-specific options on... It's a +# bad idea. The -march options aren't just to look pretty. They enable +# options that are sensible (and include sse,mmx,3dnow when apropriate). +# +# The next command strips CFLAGS and CXXFLAGS from nearly all flags. If +# you do not like it, comment it, but do not bugreport if you run into +# problems. +# +# <azarah@gentoo.org> (13 Oct 2002) +do_filter_flags() { + strip-flags + + # In general gcc does not like optimization, and add -O2 where + # it is safe. This is especially true for gcc 3.3 + 3.4 + replace-flags -O? -O2 + + # xgcc isnt patched with propolice + filter-flags -fstack-protector-all + filter-flags -fno-stack-protector-all + filter-flags -fstack-protector + filter-flags -fno-stack-protector + + # xgcc isnt patched with the gcc symbol visibility patch + filter-flags -fvisibility-inlines-hidden + filter-flags -fvisibility=hidden + + # ...sure, why not? + strip-unsupported-flags +} + +S=${WORKDIR}/gcc-${PV} + +# Theoretical cross compiler support +[ ! -n "${CCHOST}" ] && export CCHOST="${CHOST}" + +LOC="/usr" +MY_PV="`echo ${PV} | awk -F. '{ gsub(/_pre.*|_alpha.*/, ""); print $1 "." $2 }'`" +MY_PV_FULL="`echo ${PV} | awk '{ gsub(/_pre.*|_alpha.*/, ""); print $0 }'`" + +LIBPATH="${LOC}/lib/gcc-lib/${CCHOST}/${MY_PV_FULL}" +BINPATH="${LOC}/${CCHOST}/gcc-bin/${MY_PV}" +DATAPATH="${LOC}/share/gcc-data/${CCHOST}/${MY_PV}" +# Dont install in /usr/include/g++-v3/, but in gcc internal directory. +# We will handle /usr/include/g++-v3/ with gcc-config ... +STDCXX_INCDIR="${LIBPATH}/include/g++-v${MY_PV/\.*/}" + +# Branch update support ... +MAIN_BRANCH="${PV}" # Tarball, etc used ... + +# This branch update includes libffi fixes, so we include it here +#BRANCH_UPDATE="20040412" +BRANCH_UPDATE= + +SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-${PV}.tar.bz2" + +DESCRIPTION="libffi (from gcc) does not commonly build unless gcj is compiled, but is used by other projects, like GNUstep." +HOMEPAGE="http://gcc.gnu.org/libstdc++/" + +# libffi itself under an "as-is" license, the rest of GCC can be. +# and is, different +LICENSE="GPL-2 LGPL-2.1 as-is" + +KEYWORDS="-* ~amd64" + +DEPEND="virtual/libc + !nptl? ( >=sys-libs/glibc-2.3.2-r3 ) + >=sys-devel/binutils-2.14.90.0.8-r1 + >=sys-devel/bison-1.875 + >=sys-devel/gcc-config-1.3.1 + !build? ( >=sys-libs/ncurses-5.2-r2 + nls? ( sys-devel/gettext ) )" + +RDEPEND="virtual/libc + !nptl? ( >=sys-libs/glibc-2.3.2-r3 ) + >=sys-devel/gcc-config-1.3.1 + >=sys-libs/zlib-1.1.4 + >=sys-apps/texinfo-4.2-r4 + !build? ( >=sys-libs/ncurses-5.2-r2 )" + +PDEPEND="sys-devel/gcc-config" + +src_unpack() { + unpack ${A} + + cd ${S} + # Fixup libtool to correctly generate .la files with portage + elibtoolize --portage --shallow + + #use amd64 && epatch ${FILESDIR}/libstdc++_amd64_multilib_hack.patch + # not quite needed since we disable multilib in this ebuild, but it cant + # hurt to have anyway, just in case + sed -i -e 's/MULTILIB_OSDIRNAMES\ =.*/MULTILIB_OSDIRNAMES\ =\ ..\/lib64\ ..\/lib32/' ${S}/gcc/config/i386/t-linux64 + + # Branch update ... + if [ -n "${BRANCH_UPDATE}" ] + then + epatch ${DISTDIR}/gcc-${MAIN_BRANCH}-branch-update-${BRANCH_UPDATE}.patch.bz2 + fi + + cd ${S}; ./contrib/gcc_update --touch &> /dev/null +} + +src_compile() { + + local myconf= + + if ! use nls || use build + then + myconf="${myconf} --disable-nls" + else + myconf="${myconf} --enable-nls --without-included-gettext" + fi + + use amd64 && myconf="${myconf} --disable-multilib" + + do_filter_flags + einfo "CFLAGS=\"${CFLAGS}\"" + einfo "CXXFLAGS=\"${CXXFLAGS}\"" + + # Build in a separate build tree + mkdir -p ${WORKDIR}/build + cd ${WORKDIR}/build + + einfo "Configuring libffi..." + addwrite "/dev/zero" + ${S}/configure --prefix=${LOC} \ + --bindir=${BINPATH} \ + --includedir=${LIBPATH}/include \ + --datadir=${DATAPATH} \ + --mandir=${DATAPATH}/man \ + --infodir=${DATAPATH}/info \ + --enable-shared \ + --host=${CHOST} \ + --target=${CCHOST} \ + --with-system-zlib \ + --enable-languages=java,c++,objc \ + --enable-threads=posix \ + --enable-long-long \ + --disable-checking \ + --enable-cstdio=stdio \ + --enable-__cxa_atexit \ + --enable-version-specific-runtime-libs \ + --with-gxx-include-dir=${STDCXX_INCDIR} \ + --with-local-prefix=${LOC}/local \ + ${myconf} || die + + touch ${S}/gcc/c-gperf.h + + # Setup -j in MAKEOPTS + get_number_of_jobs + + einfo "Compiling libffi..." + S="${WORKDIR}/build" \ + emake all-target-libffi \ + LIBPATH="${LIBPATH}" \ + BOOT_CFLAGS="${CFLAGS}" STAGE1_CFLAGS="-O" || die +} + +src_install() { + local x= + + # Do allow symlinks in ${LOC}/lib/gcc-lib/${CHOST}/${PV}/include as + # this can break the build. + for x in ${WORKDIR}/build/gcc/include/* + do + if [ -L ${x} ] + then + rm -f ${x} + continue + fi + done + # Remove generated headers, as they can cause things to break + # (ncurses, openssl, etc). + for x in `find ${WORKDIR}/build/gcc/include/ -name '*.h'` + do + if grep -q 'It has been auto-edited by fixincludes from' ${x} + then + rm -f ${x} + fi + done + + einfo "Installing libfii..." + # Do the 'make install' from the build directory + cd ${WORKDIR}/build + S="${WORKDIR}/build" \ + make prefix=${LOC} \ + bindir=${BINPATH} \ + includedir=${LIBPATH}/include \ + datadir=${DATAPATH} \ + mandir=${DATAPATH}/man \ + infodir=${DATAPATH}/info \ + DESTDIR="${D}" \ + LIBPATH="${LIBPATH}" \ + install-target-libffi || die + + # we'll move this into a directory we can put at the end of ld.so.conf + # other than the normal versioned directory, so that it doesnt conflict + # with gcc + + # we want the headers... + mkdir -p ${D}/${LOC}/include/${PN} + mv ${D}/${LOC}/lib/gcc-lib/${CCHOST}/${PV}/include/* ${D}/${LOC}/include/${PN} + mv ${D}/${LOC}/lib/gcc/${CCHOST}/${PV}/include/libffi/* ${D}/${LOC}/include/${PN} + # remove now useless directory... + rm -Rf ${D}/${LOC}/lib/gcc-lib/ + rm -Rf ${D}/${LOC}/lib/gcc + + mkdir -p ${D}/${LOC}/lib/${PN}/ + mv ${D}/${LOC}/{lib,lib64}/* ${D}/${LOC}/lib/${PN}/ + + mkdir -p ${D}/etc/env.d/ + echo "LDPATH=\"${LOC}/lib/${PN}\"" >> ${D}/etc/env.d/99libffi + echo "CPATH=\"${LOC}/include/${PN}\"" >> ${D}/etc/env.d/99libffi +} + |