From 19c41a23d339cb66e57b7152aee5b21d1532df9f Mon Sep 17 00:00:00 2001 From: Bruce Kuo Date: Fri, 7 Dec 2012 11:17:18 +0800 Subject: [PATCH] libaio: upgraded package to upstream Upgraded dev-libs/libaio to version 0.3.109-r3 on amd64 BUG=None TEST=Manual Change-Id: I0759c6d182ac81a20a22f61281bd76ff0a2c917e Reviewed-on: https://gerrit.chromium.org/gerrit/39359 Reviewed-by: Mike Frysinger Commit-Ready: Bruce Kuo Tested-by: Bruce Kuo --- .../files/libaio-0.3.107-generic-arch.patch | 101 ++++++++++++ .../libaio-0.3.107-install-to-slash.patch | 31 ++++ .../libaio/files/libaio-0.3.107-sparc.patch | 151 ++++++++++++++++++ .../files/libaio-0.3.109-testcase-8.patch | 19 +++ .../libaio/files/libaio-0.3.109-x32.patch | 63 ++++++++ .../dev-libs/libaio/libaio-0.3.109-r2.ebuild | 58 ------- .../dev-libs/libaio/libaio-0.3.109-r3.ebuild | 125 +++++++++++++++ .../{libaio-0.3.109-r2 => libaio-0.3.109-r3} | 9 +- 8 files changed, 494 insertions(+), 63 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.107-generic-arch.patch create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.107-install-to-slash.patch create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.107-sparc.patch create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.109-testcase-8.patch create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.109-x32.patch delete mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libaio/libaio-0.3.109-r2.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libaio/libaio-0.3.109-r3.ebuild rename sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-libs/{libaio-0.3.109-r2 => libaio-0.3.109-r3} (69%) diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.107-generic-arch.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.107-generic-arch.patch new file mode 100644 index 0000000000..6ecd7f10d5 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.107-generic-arch.patch @@ -0,0 +1,101 @@ +for arches that lack magic assembly (arm, blackfin, etc...), implement support +using standard syscall() function + +--- src/libaio.h ++++ src/libaio.h +@@ -49,38 +49,34 @@ typedef enum io_iocb_cmd { + IO_CMD_PWRITEV = 8, + } io_iocb_cmd_t; + +-#if defined(__i386__) /* little endian, 32 bits */ ++/* little endian, 32 bits */ ++#if defined(__i386__) || defined(__sh__) || defined(__bfin__) || \ ++ defined(__ARMEL__) || defined(__MIPSEL__) || defined(__cris__) + #define PADDED(x, y) x; unsigned y + #define PADDEDptr(x, y) x; unsigned y + #define PADDEDul(x, y) unsigned long x; unsigned y ++ ++/* little endian, 64 bits */ + #elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) + #define PADDED(x, y) x, y + #define PADDEDptr(x, y) x + #define PADDEDul(x, y) unsigned long x +-#elif defined(__powerpc64__) /* big endian, 64 bits */ ++ ++/* big endian, 64 bits */ ++#elif defined(__powerpc64__) || defined(__s390x__) || \ ++ (defined(__sparc__) && defined(__arch64__)) + #define PADDED(x, y) unsigned y; x + #define PADDEDptr(x,y) x + #define PADDEDul(x, y) unsigned long x +-#elif defined(__PPC__) /* big endian, 32 bits */ ++ ++/* big endian, 32 bits */ ++#elif defined(__PPC__) || defined(__s390__) || defined(__ARMEB__) || \ ++ defined(__MIPSEB__) || defined(__sparc__) || defined(__m68k__) || \ ++ defined(__hppa__) || defined(__frv__) || defined(__avr32__) + #define PADDED(x, y) unsigned y; x + #define PADDEDptr(x, y) unsigned y; x + #define PADDEDul(x, y) unsigned y; unsigned long x +-#elif defined(__s390x__) /* big endian, 64 bits */ +-#define PADDED(x, y) unsigned y; x +-#define PADDEDptr(x,y) x +-#define PADDEDul(x, y) unsigned long x +-#elif defined(__s390__) /* big endian, 32 bits */ +-#define PADDED(x, y) unsigned y; x +-#define PADDEDptr(x, y) unsigned y; x +-#define PADDEDul(x, y) unsigned y; unsigned long x +-#elif defined(__sparc__) && defined(__arch64__) /* big endian, 64 bits */ +-#define PADDED(x, y) unsigned y; x +-#define PADDEDptr(x,y) x +-#define PADDEDul(x, y) unsigned long x +-#elif defined(__sparc__) /* big endian, 32 bits */ +-#define PADDED(x, y) unsigned y; x +-#define PADDEDptr(x, y) unsigned y; x +-#define PADDEDul(x, y) unsigned y; unsigned long x ++ + #else + #error endian? + #endif +--- /dev/null ++++ src/syscall-generic.h +@@ -0,0 +1,29 @@ ++#include ++#include ++#include ++ ++#define _body_io_syscall(sname, args...) \ ++{ \ ++ int ret = syscall(__NR_##sname, ## args); \ ++ return ret < 0 ? -errno : ret; \ ++} ++ ++#define io_syscall1(type,fname,sname,type1,arg1) \ ++type fname(type1 arg1) \ ++_body_io_syscall(sname, (long)arg1) ++ ++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ ++type fname(type1 arg1,type2 arg2) \ ++_body_io_syscall(sname, (long)arg1, (long)arg2) ++ ++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ ++type fname(type1 arg1,type2 arg2,type3 arg3) \ ++_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3) ++ ++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ ++type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ ++_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3, (long)arg4) ++ ++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, type5,arg5) \ ++type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ ++_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3, (long)arg4, (long)arg5) +--- src/syscall.h ++++ src/syscall.h +@@ -25,5 +25,6 @@ + #elif defined(__sparc__) + #include "syscall-sparc.h" + #else +-#error "add syscall-arch.h" ++#warning "using generic syscall method" ++#include "syscall-generic.h" + #endif diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.107-install-to-slash.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.107-install-to-slash.patch new file mode 100644 index 0000000000..c47273631f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.107-install-to-slash.patch @@ -0,0 +1,31 @@ +based on fedora ptach + +--- libaio-0.3.107/src/Makefile ++++ libaio-0.3.107/src/Makefile +@@ -1,6 +1,7 @@ + prefix=/usr +-includedir=$(prefix)/include +-libdir=$(prefix)/lib ++includedir=/usr/include ++libdir=/usr/lib ++usrlibdir=$(libdir) + + ARCH := $(shell uname -m | sed -e s/i.86/i386/) + CFLAGS := -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -O2 -fPIC +@@ -51,11 +52,11 @@ + $(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) $(LINK_FLAGS) + + install: $(all_targets) +- install -D -m 644 libaio.h $(includedir)/libaio.h +- install -D -m 644 libaio.a $(libdir)/libaio.a +- install -D -m 755 $(libname) $(libdir)/$(libname) +- ln -sf $(libname) $(libdir)/$(soname) +- ln -sf $(libname) $(libdir)/libaio.so ++ install -D -m 644 libaio.h $(DESTDIR)$(includedir)/libaio.h ++ install -D -m 644 libaio.a $(DESTDIR)$(usrlibdir)/libaio.a ++ install -D -m 755 $(libname) $(DESTDIR)$(libdir)/$(libname) ++ ln -sf $(libname) $(DESTDIR)$(usrlibdir)/$(soname) ++ ln -sf $(libname) $(DESTDIR)$(usrlibdir)/libaio.so + + $(libaio_objs): libaio.h + diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.107-sparc.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.107-sparc.patch new file mode 100644 index 0000000000..92bcd5325e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.107-sparc.patch @@ -0,0 +1,151 @@ +ripped from fedora + +--- libaio-0.3.107/src/libaio.h ++++ libaio-0.3.107/src/libaio.h +@@ -73,6 +73,14 @@ + #define PADDED(x, y) unsigned y; x + #define PADDEDptr(x, y) unsigned y; x + #define PADDEDul(x, y) unsigned y; unsigned long x ++#elif defined(__sparc__) && defined(__arch64__) /* big endian, 64 bits */ ++#define PADDED(x, y) unsigned y; x ++#define PADDEDptr(x,y) x ++#define PADDEDul(x, y) unsigned long x ++#elif defined(__sparc__) /* big endian, 32 bits */ ++#define PADDED(x, y) unsigned y; x ++#define PADDEDptr(x, y) unsigned y; x ++#define PADDEDul(x, y) unsigned y; unsigned long x + #else + #error endian? + #endif +--- libaio-0.3.107/src/syscall.h ++++ libaio-0.3.107/src/syscall.h +@@ -22,6 +22,8 @@ + #include "syscall-s390.h" + #elif defined(__alpha__) + #include "syscall-alpha.h" ++#elif defined(__sparc__) ++#include "syscall-sparc.h" + #else + #error "add syscall-arch.h" + #endif +--- libaio-0.3.107/src/syscall-sparc.h ++++ libaio-0.3.107/src/syscall-sparc.h +@@ -0,0 +1,118 @@ ++#include ++ ++#define __NR_io_setup 268 ++#define __NR_io_destroy 269 ++#define __NR_io_submit 270 ++#define __NR_io_cancel 271 ++#define __NR_io_getevents 272 ++ ++#define io_syscall1(type,fname,sname,type1,arg1) \ ++type fname(type1 arg1) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res >= 0) \ ++ return (type) __res; \ ++errno = -__res; \ ++return -1; \ ++} ++ ++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ ++type fname(type1 arg1,type2 arg2) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++register long __o1 __asm__ ("o1") = (long)(arg2); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res >= 0) \ ++ return (type) __res; \ ++errno = -__res; \ ++return -1; \ ++} ++ ++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ ++type fname(type1 arg1,type2 arg2,type3 arg3) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++register long __o1 __asm__ ("o1") = (long)(arg2); \ ++register long __o2 __asm__ ("o2") = (long)(arg3); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res>=0) \ ++ return (type) __res; \ ++errno = -__res; \ ++return -1; \ ++} ++ ++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ ++type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++register long __o1 __asm__ ("o1") = (long)(arg2); \ ++register long __o2 __asm__ ("o2") = (long)(arg3); \ ++register long __o3 __asm__ ("o3") = (long)(arg4); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res>=0) \ ++ return (type) __res; \ ++errno = -__res; \ ++return -1; \ ++} ++ ++#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ ++ type5,arg5) \ ++type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ ++{ \ ++long __res; \ ++register long __g1 __asm__ ("g1") = __NR_##sname; \ ++register long __o0 __asm__ ("o0") = (long)(arg1); \ ++register long __o1 __asm__ ("o1") = (long)(arg2); \ ++register long __o2 __asm__ ("o2") = (long)(arg3); \ ++register long __o3 __asm__ ("o3") = (long)(arg4); \ ++register long __o4 __asm__ ("o4") = (long)(arg5); \ ++__asm__ __volatile__ ("t 0x10\n\t" \ ++ "bcc 1f\n\t" \ ++ "mov %%o0, %0\n\t" \ ++ "sub %%g0, %%o0, %0\n\t" \ ++ "1:\n\t" \ ++ : "=r" (__res), "=&r" (__o0) \ ++ : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__o4), "r" (__g1) \ ++ : "cc"); \ ++if (__res < -255 || __res>=0) \ ++ return (type) __res; \ ++errno = -__res; \ ++return -1; \ ++} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.109-testcase-8.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.109-testcase-8.patch new file mode 100644 index 0000000000..de66f2110f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.109-testcase-8.patch @@ -0,0 +1,19 @@ +Do not ignore return value of ftruncate(): testcases are compiled with -Werror, +and ftruncate is declared with attribute warn_unused_result. +--- harness/cases/8.t.orig 2012-03-09 16:40:04.074168070 +0100 ++++ harness/cases/8.t 2012-03-09 16:40:57.777278646 +0100 +@@ -9,12 +9,13 @@ + { + long long min = 0, max = 9223372036854775807LL; + char c = 0; ++ int ret; + + while (max - min > 1) { + if (pwrite64(fd, &c, 1, (min + max) / 2) == -1) + max = (min + max) / 2; + else { +- ftruncate(fd, 0); ++ ret = ftruncate(fd, 0); assert(ret == 0); + min = (min + max) / 2; + } + } diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.109-x32.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.109-x32.patch new file mode 100644 index 0000000000..1d2c2a9050 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/files/libaio-0.3.109-x32.patch @@ -0,0 +1,63 @@ +http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=f5c071d93c9e6f57930bce56b1e4f009c160a826 + +Upstream-Status: Pending + +Properly load arguments 5 an 6 for x86-64 syscall +Use asm ("r10") and asm ("r8") to load arguments 5 an 6 for x86-64 +syscall so that it works with both x32 and x86-64. + +Received this patch from H.J. Lu + +Signed-Off-By: Nitin A Kamble +2011/12/02 + +--- libaio-0.3.109/src/syscall-x86_64.h.x32 2009-10-09 11:17:02.000000000 -0700 ++++ libaio-0.3.109/src/syscall-x86_64.h 2011-12-02 09:09:07.537603224 -0800 +@@ -1,8 +1,18 @@ ++#ifndef __NR_io_setup + #define __NR_io_setup 206 ++#endif ++#ifndef __NR_io_destroy + #define __NR_io_destroy 207 ++#endif ++#ifndef __NR_io_getevents + #define __NR_io_getevents 208 ++#endif ++#ifndef __NR_io_submit + #define __NR_io_submit 209 ++#endif ++#ifndef __NR_io_cancel + #define __NR_io_cancel 210 ++#endif + + #define __syscall_clobber "r11","rcx","memory" + #define __syscall "syscall" +@@ -42,10 +52,11 @@ return __res; \ + type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ + { \ + long __res; \ +-__asm__ volatile ("movq %5,%%r10 ;" __syscall \ ++register long __a4 asm ("r10") = (long) arg4; \ ++__asm__ volatile (__syscall \ + : "=a" (__res) \ + : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \ +- "d" ((long)(arg3)),"g" ((long)(arg4)) : __syscall_clobber,"r10" ); \ ++ "d" ((long)(arg3)),"r" (__a4)); \ + return __res; \ + } + +@@ -54,10 +65,11 @@ return __res; \ + type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ + { \ + long __res; \ +-__asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; " __syscall \ ++register long __a4 asm ("r10") = (long) arg4; \ ++register long __a5 asm ("r8") = (long) arg5; \ ++__asm__ volatile ( __syscall \ + : "=a" (__res) \ + : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \ +- "d" ((long)(arg3)),"g" ((long)(arg4)),"g" ((long)(arg5)) : \ +- __syscall_clobber,"r8","r10" ); \ ++ "d" ((long)(arg3)),"r" (__a4),"r" (__a5)); \ + return __res; \ + } diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libaio/libaio-0.3.109-r2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/libaio-0.3.109-r2.ebuild deleted file mode 100644 index 26f9d74835..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libaio/libaio-0.3.109-r2.ebuild +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright 1999-2011 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-r2.ebuild,v 1.7 2011/09/03 16:11:48 armin76 Exp $ - -EAPI="3" - -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" -IUSE="static-libs" - -RESTRICT="test" - -src_prepare() { - epatch "${FILESDIR}"/${PN}-0.3.109-unify-bits-endian.patch - epatch "${FILESDIR}"/${PN}-0.3.109-generic-arch.patch - epatch "${FILESDIR}"/${PN}-0.3.106-build.patch - epatch "${FILESDIR}"/${PN}-0.3.107-ar-ranlib.patch - epatch "${FILESDIR}"/${PN}-0.3.109-install.patch - sed -i \ - -e "/^libdir=/s:lib$:$(get_libdir):" \ - -e "/^prefix=/s:/usr:${EPREFIX}/usr:" \ - -e '/:=.*strip.*shell.*git/s:=.*:=:' \ - src/Makefile Makefile || die -} - -src_configure() { - tc-export AR CC RANLIB -} - -src_test() { - cd "${S}"/harness - mkdir testdir - emake check prefix="${S}/src" libdir="${S}/src" || die -} - -src_install() { - # Don't use ED for emake, src_prepare already inserts EPREFIX in the correct - # place - emake install DESTDIR="${D}" || die - doman man/* - dodoc ChangeLog TODO - - # move crap to / for multipath-tools #325355 - gen_usr_ldscript -a aio - if ! use static-libs ; then - rm "${ED}"usr/lib*/*.a || die - fi - - # remove stuff provided by man-pages now - rm "${ED}"usr/share/man/man3/{lio_listio,aio_{cancel,error,fsync,init,read,return,suspend,write}}.* -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libaio/libaio-0.3.109-r3.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/libaio-0.3.109-r3.ebuild new file mode 100644 index 0000000000..5ac7015383 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libaio/libaio-0.3.109-r3.ebuild @@ -0,0 +1,125 @@ +# Copyright 1999-2012 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-r3.ebuild,v 1.9 2012/11/14 17:19:51 ago Exp $ + +EAPI=3 + +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" + +EMULTILIB_PKG="true" + +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 + epatch "${FILESDIR}"/${PN}-0.3.109-generic-arch.patch + epatch "${FILESDIR}"/${PN}-0.3.106-build.patch + epatch "${FILESDIR}"/${PN}-0.3.107-ar-ranlib.patch + epatch "${FILESDIR}"/${PN}-0.3.109-install.patch + epatch "${FILESDIR}"/${PN}-0.3.109-x32.patch + epatch "${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 "$@" || die +} + +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 + gen_usr_ldscript -a aio + done + ABI=${OABI} +} diff --git a/sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-libs/libaio-0.3.109-r2 b/sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-libs/libaio-0.3.109-r3 similarity index 69% rename from sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-libs/libaio-0.3.109-r2 rename to sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-libs/libaio-0.3.109-r3 index 27a2bdf66c..6d076fe138 100644 --- a/sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-libs/libaio-0.3.109-r2 +++ b/sdk_container/src/third_party/portage-stable/metadata/md5-cache/dev-libs/libaio-0.3.109-r3 @@ -1,12 +1,11 @@ -DEFINED_PHASES=configure install prepare test +DEFINED_PHASES=compile install prepare test unpack DESCRIPTION=Asynchronous input/output library that uses the kernels native interface EAPI=3 HOMEPAGE=http://www.kernel.org/pub/linux/kernel/people/andrea/libaio/ http://lse.sourceforge.net/io/aio.html -IUSE=static-libs -KEYWORDS=alpha amd64 arm ~hppa ia64 m68k ~mips ~ppc ~ppc64 s390 sh sparc x86 ~amd64-linux +IUSE=multilib static-libs +KEYWORDS=~alpha amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-linux ~x86-linux LICENSE=LGPL-2 -RESTRICT=test SLOT=0 SRC_URI=mirror://kernel/linux/libs/aio/libaio-0.3.109.tar.bz2 _eclasses_=eutils 33ef77a15337022e05342d2c772a7a5a multilib 5f4ad6cf85e365e8f0c6050ddd21659e portability 0be430f759a631e692678ed796e09f5c toolchain-funcs 6526ac6fc9aedf391efb91fcd75ace68 user 9e552f935106ff0bc92af16da64b4b29 -_md5_=3c252fac55fba9058f8f87b949bd603f +_md5_=fc3b9db0889b8eb1c2f29eb6434d27f1