summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2013-03-07 16:45:24 +0000
committerJulian Ospald <hasufell@gentoo.org>2013-03-07 16:45:24 +0000
commit46315d0bdde77337597708f2ccbd3ff2ca6f65a2 (patch)
tree4f47b2affd0bd3b663109c0f0257651ae6be2ec8 /dev-libs
parentVersion bump. (diff)
downloadgentoo-2-46315d0bdde77337597708f2ccbd3ff2ca6f65a2.tar.gz
gentoo-2-46315d0bdde77337597708f2ccbd3ff2ca6f65a2.tar.bz2
gentoo-2-46315d0bdde77337597708f2ccbd3ff2ca6f65a2.zip
fix multilib and bump EAPI
(Portage version: 2.2.0_alpha166/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/libaio/ChangeLog9
-rw-r--r--dev-libs/libaio/libaio-0.3.109-r4.ebuild128
2 files changed, 135 insertions, 2 deletions
diff --git a/dev-libs/libaio/ChangeLog b/dev-libs/libaio/ChangeLog
index b76b25a9ba52..c97d01973608 100644
--- a/dev-libs/libaio/ChangeLog
+++ b/dev-libs/libaio/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-libs/libaio
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libaio/ChangeLog,v 1.71 2012/12/29 20:33:56 vapier Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libaio/ChangeLog,v 1.72 2013/03/07 16:45:24 hasufell Exp $
+
+*libaio-0.3.109-r4 (07 Mar 2013)
+
+ 07 Mar 2013; Julian Ospald <hasufell@gentoo.org> +libaio-0.3.109-r4.ebuild:
+ fix multilib and bump EAPI
29 Dec 2012; Mike Frysinger <vapier@gentoo.org> libaio-0.3.109-r3.ebuild:
Mark stable for the rest of the arches.
diff --git a/dev-libs/libaio/libaio-0.3.109-r4.ebuild b/dev-libs/libaio/libaio-0.3.109-r4.ebuild
new file mode 100644
index 000000000000..254f9eb0817b
--- /dev/null
+++ b/dev-libs/libaio/libaio-0.3.109-r4.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libaio/libaio-0.3.109-r4.ebuild,v 1.1 2013/03/07 16:45:24 hasufell Exp $
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="Asynchronous input/output library that uses the kernels native interface"
+HOMEPAGE="http://www.kernel.org/pub/linux/kernel/people/andrea/libaio/ http://lse.sourceforge.net/io/aio.html"
+SRC_URI="mirror://kernel/linux/libs/aio/${P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="multilib static-libs test"
+
+EMULTILIB_PKG="true"
+
+S=${WORKDIR}
+
+aio_get_install_abis() {
+ use multilib && get_install_abis || echo ${ABI:-default}
+}
+
+src_unpack() {
+ local OABI=${ABI}
+ for ABI in $(aio_get_install_abis)
+ do
+ mkdir -p "${WORKDIR}"/${ABI} || die
+ cd "${WORKDIR}"/${ABI} || die
+ unpack ${A}
+ done
+ ABI=${OABI}
+}
+
+src_prepare() {
+ local OABI=${ABI}
+ for ABI in $(aio_get_install_abis)
+ do
+ einfo "Preparing ${ABI} ABI ..."
+ cd "${WORKDIR}"/${ABI}/${P} || die
+
+ # remove stuff provided by man-pages now
+ rm man/{lio_listio,aio_{cancel,error,fsync,init,read,return,suspend,write}}.* || die
+
+ epatch "${FILESDIR}"/${PN}-0.3.109-unify-bits-endian.patch \
+ "${FILESDIR}"/${PN}-0.3.109-generic-arch.patch \
+ "${FILESDIR}"/${PN}-0.3.106-build.patch \
+ "${FILESDIR}"/${PN}-0.3.107-ar-ranlib.patch \
+ "${FILESDIR}"/${PN}-0.3.109-install.patch \
+ "${FILESDIR}"/${PN}-0.3.109-x32.patch \
+ "${FILESDIR}"/${PN}-0.3.109-testcase-8.patch
+
+ declare -a extra_sed
+ if ! use static-libs; then
+ extra_sed[${#extra_sed[@]}]='-e'
+ extra_sed[${#extra_sed[@]}]='/\tinstall .*\/libaio.a/d'
+ # Tests require the static library to be built.
+ if ! use test; then
+ extra_sed[${#extra_sed[@]}]='-e'
+ extra_sed[${#extra_sed[@]}]='/^all_targets +=/s/ libaio.a//'
+ fi
+ fi
+ sed -i \
+ -e "/^libdir=/s:lib$:$(get_libdir):" \
+ -e "/^prefix=/s:/usr:${EPREFIX}/usr:" \
+ -e '/:=.*strip.*shell.*git/s:=.*:=:' \
+ "${extra_sed[@]}" \
+ src/Makefile Makefile || die
+
+ sed -i -e "s:-Werror::g" harness/Makefile || die
+ done
+ ABI=${OABI}
+}
+
+emake_libaio() {
+ # The Makefiles need these environments, but multilib_toolchain_setup()
+ # does not export anything when there is only one default abi available.
+ CC="$(tc-getCC) $(get_abi_CFLAGS)" \
+ AR=$(tc-getAR) \
+ RANLIB=$(tc-getRANLIB) \
+ emake "$@"
+}
+
+src_compile() {
+ local OABI=${ABI}
+ for ABI in $(aio_get_install_abis)
+ do
+ einfo "Compiling ${ABI} ABI ..."
+ cd "${WORKDIR}"/${ABI}/${P} || die
+ emake_libaio
+ done
+ ABI=${OABI}
+}
+
+src_test() {
+ local OABI=${ABI}
+ for ABI in $(aio_get_install_abis)
+ do
+ einfo "Testing ${ABI} ABI ..."
+ cd "${WORKDIR}"/${ABI}/${P}/harness || die
+ mkdir testdir || die
+ # 'make check' breaks with sandbox, 'make partcheck' works
+ emake_libaio partcheck prefix="${S}/src" libdir="${S}/src"
+ done
+ ABI=${OABI}
+}
+
+src_install() {
+ local OABI=${ABI}
+ for ABI in $(aio_get_install_abis)
+ do
+ einfo "Installing ${ABI} ABI ..."
+ cd "${WORKDIR}"/${ABI}/${P} || die
+
+ # Don't use ED for emake, src_prepare already inserts EPREFIX in the correct
+ # place
+ emake_libaio install DESTDIR="${D}"
+
+ doman man/*
+ dodoc ChangeLog TODO
+
+ # move crap to / for multipath-tools #325355
+ CFLAGS="${CFLAGS} $(get_abi_CFLAGS)" gen_usr_ldscript -a aio
+ done
+ ABI=${OABI}
+}