Update libaio patch to work with both old and new versions #103427.
authorMike Frysinger <vapier@gentoo.org>
Sun, 20 Nov 2005 07:34:16 +0000 (07:34 +0000)
committerMike Frysinger <vapier@gentoo.org>
Sun, 20 Nov 2005 07:34:16 +0000 (07:34 +0000)
Package-Manager: portage-2.0.53_rc7

dev-util/strace/ChangeLog
dev-util/strace/Manifest
dev-util/strace/files/strace-4.5.12-libaio.patch
dev-util/strace/strace-4.5.12.ebuild

index e584fccb8c62d655fe0582ed2a39579756cd2a44..d4fd638f5300acd358af79e78e75348f490bb5d3 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for dev-util/strace
 # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/strace/ChangeLog,v 1.68 2005/09/16 22:01:46 ciaranm Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/strace/ChangeLog,v 1.69 2005/11/20 07:34:16 vapier Exp $
+
+  20 Nov 2005; Mike Frysinger <vapier@gentoo.org>
+  files/strace-4.5.12-libaio.patch, strace-4.5.12.ebuild:
+  Update libaio patch to work with both old and new versions #103427.
 
   16 Sep 2005; Ciaran McCreesh <ciaranm@gentoo.org> ChangeLog:
   Converted to UTF-8, fixed encoding screwups
index 200532be09d825c2c13f910c397995ef042a33b0..8df20beeb944855313bee9937e33902c673aae68 100644 (file)
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
 MD5 afdcc17c6bbaa8053962511c70e45989 ChangeLog 8457
 MD5 38e4a65d3a6a6e39695752ba68b2db78 files/digest-strace-4.5.1 65
 MD5 fdb191f71c367e18de7f236b17d51401 files/digest-strace-4.5.11 66
@@ -23,3 +26,10 @@ MD5 91e92b86ae6692835ea86730c597b64b strace-4.5.12.ebuild 2068
 MD5 4474209bd9ff4ef6827bc37e512e6885 strace-4.5.2.ebuild 1311
 MD5 7a45d471b2608afbcfac7b22f86726ce strace-4.5.7.ebuild 1139
 MD5 c9d8ca6c43099729a9c981ed49e94ce3 strace-4.5.9.ebuild 1429
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.2 (GNU/Linux)
+
+iD8DBQFDgCdXgIKl8Uu19MoRArE+AJ4zYkugdYVCFmtP9XQUeBge9gwMLwCfZfAd
+NZaAUcbpX6BNPRHDvweYPxw=
+=xJWK
+-----END PGP SIGNATURE-----
index bc4ab335f799a2ae562426834c7cff4fd627ab40..0f02dcaa48a8c0658147aa0c579aeb1dfcfe1b29 100644 (file)
@@ -1,20 +1,69 @@
---- desc.c
-+++ desc.c
-@@ -767,7 +767,7 @@ struct tcb *tcp;
+Make libaio support a proper option and update the checks to support
+both new and old versions of libaio.
+
+http://bugs.gentoo.org/103427
+
+--- strace/configure.ac
++++ strace/configure.ac
+@@ -170,6 +170,26 @@
+                 struct stat.st_rdev])
+ AC_STAT64
+ 
++AC_ARG_ENABLE(libaio,
++      AC_HELP_STRING([--enable-libaio],[enable support for libaio @<:@default=auto@:>@]),
++      [enable_libaio=$enableval],
++      [enable_libaio=auto]
++)
++if test "x$enable_libaio" != "xno" ; then
++      AC_CHECK_HEADER([libaio.h],[have_libaio=yes],[have_libaio=no])
++      if test "x$enable_libaio$have_libaio" = "xyesno" ; then
++              AC_MSG_ERROR(Could not detect libaio.h)
++      elif test "x$have_libaio" = "xyes" ; then
++              AC_DEFINE(HAVE_LIBAIO_H, 1, [System has libaio.h])
++              AC_CHECK_MEMBERS([
++                      struct iocb.data,
++                      struct iocb.aio_data,
++                      struct iocb.key,
++                      struct iocb.aio_key],
++              [], [], [#include <libaio.h>])
++      fi
++fi
++
+ AC_TYPE_SIGNAL
+ AC_TYPE_UID_T
+ AC_TYPE_MODE_T
+@@ -192,7 +212,7 @@
+ fi
+ 
+ AC_CHECK_FUNCS(sigaction strerror strsignal pread sys_siglist _sys_siglist getdents mctl prctl sendmsg inet_ntop if_indextoname)
+-AC_CHECK_HEADERS([sys/reg.h sys/filio.h sys/acl.h sys/asynch.h sys/door.h stropts.h sys/conf.h sys/stream.h sys/tihdr.h sys/tiuser.h sys/sysconfig.h ioctls.h sys/ioctl.h sys/ptrace.h termio.h linux/ptrace.h asm/reg.h sys/uio.h sys/aio.h  poll.h sys/poll.h sys/vfs.h asm/sysmips.h linux/utsname.h sys/nscsys.h mqueue.h sys/epoll.h libaio.h], [], [])
++AC_CHECK_HEADERS([sys/reg.h sys/filio.h sys/acl.h sys/asynch.h sys/door.h stropts.h sys/conf.h sys/stream.h sys/tihdr.h sys/tiuser.h sys/sysconfig.h ioctls.h sys/ioctl.h sys/ptrace.h termio.h linux/ptrace.h asm/reg.h sys/uio.h poll.h sys/poll.h sys/vfs.h asm/sysmips.h linux/utsname.h sys/nscsys.h mqueue.h sys/epoll.h], [], [])
+ AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h],
+                  [], [], [#include <linux/socket.h>])
+ AC_CHECK_HEADERS([asm/sigcontext.h], [], [], [#include <signal.h>])
+--- strace/desc.c
++++ strace/desc.c
+@@ -767,7 +767,11 @@
                                        continue;
                                }
                                tprintf("{%p, %u, %hu, %hu, %d}",
--                                      iocb.data, iocb.key,
-+                                      iocb.aio_data, iocb.aio_key,
++#ifdef HAVE_STRUCT_IOCB_AIO_DATA
++                                      iocb.aio_data, iocb.key_data,
++#else
+                                       iocb.data, iocb.key,
++#endif
                                        iocb.aio_lio_opcode,
                                        iocb.aio_reqprio, iocb.aio_fildes);
                        }
-@@ -793,7 +793,7 @@ struct tcb *tcp;
+@@ -793,7 +797,11 @@
  #ifdef HAVE_LIBAIO_H
                if (umove(tcp, tcp->u_arg[1], &iocb) == 0) {
                        tprintf("{%p, %u, %hu, %hu, %d}, ",
--                              iocb.data, iocb.key,
-+                              iocb.aio_data, iocb.aio_key,
++#ifdef HAVE_STRUCT_IOCB_AIO_DATA
++                              iocb.aio_data, iocb.key_data,
++#else
+                               iocb.data, iocb.key,
++#endif
                                iocb.aio_lio_opcode,
                                iocb.aio_reqprio, iocb.aio_fildes);
                } else
index b42b1729bfb2cc76825b356fe5bf7ef154c23704..1b197e7964e93eb5d492dad5fa3640f2d3799345 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/strace/strace-4.5.12.ebuild,v 1.4 2005/11/07 23:27:48 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/strace/strace-4.5.12.ebuild,v 1.5 2005/11/20 07:34:16 vapier Exp $
 
 inherit flag-o-matic
 
@@ -22,11 +22,10 @@ src_unpack() {
        [[ ${CHOST} == *-freebsd* ]] && epatch "${FILESDIR}"/${P}-fbsd.patch
        # Fix support for newer glibc snapshots #102080
        epatch "${FILESDIR}"/${P}-quota.patch
-       aclocal && autoheader && autoconf && automake || die "autotools failed"
 
        # Fix SuperH support
        epatch "${FILESDIR}"/strace-dont-use-REG_SYSCALL-for-sh.patch
-       epatch "${FILESDIR}"/strace-superh-update.patch
+       epatch "${FILESDIR}"/${P}-superh-update.patch
 
        # Fix building on older ARM machines
        epatch "${FILESDIR}"/strace-undef-syscall.patch
@@ -37,6 +36,8 @@ src_unpack() {
        # Remove some obsolete ia64-related hacks from the strace source
        # (08 Feb 2005 agriffis)
        epatch "${FILESDIR}"/strace-4.5.8-ia64.patch
+
+       aclocal && autoheader && autoconf && automake || die "autotools failed"
 }
 
 src_compile() {
@@ -46,13 +47,12 @@ src_compile() {
        use ia64 && append-flags -D_ASM_IA64_PAL_H
 
        # Compile fails with -O3 on sparc but works on x86
-       use sparc && replace-flags -O[3-9] -O2
+       use sparc && replace-flags -O3 -O2
        filter-lfs-flags
 
        use static && append-ldflags -static
-       use aio || export ac_cv_header_libaio_h=no
 
-       econf || die
+       econf $(use_enable aio libaio) || die
        emake || die
 }