Fixing up the ebuild and adding a patch that allows compilation on ppc-macos
authorFabian Groffen <grobian@gentoo.org>
Fri, 2 Sep 2005 08:10:39 +0000 (08:10 +0000)
committerFabian Groffen <grobian@gentoo.org>
Fri, 2 Sep 2005 08:10:39 +0000 (08:10 +0000)
Package-Manager: portage-2.0.51.22-r2

dev-libs/libsigsegv/ChangeLog
dev-libs/libsigsegv/Manifest
dev-libs/libsigsegv/files/libsigsegv-2.2-ppc-macos.patch [new file with mode: 0644]
dev-libs/libsigsegv/libsigsegv-2.2.ebuild

index 38b89fa373300afa6dd005d26d2525751cb6206e..85b0ab4321be49fdc76ee9421b09d514b9bf83b0 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for dev-libs/libsigsegv
 # Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libsigsegv/ChangeLog,v 1.16 2005/06/14 22:32:34 mkennedy Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libsigsegv/ChangeLog,v 1.17 2005/09/02 08:10:39 grobian Exp $
+
+  02 Sep 2005; Fabian Groffen <grobian@gentoo.org>
+  +files/libsigsegv-2.2-ppc-macos.patch, libsigsegv-2.2.ebuild:
+  Removing ppc-macos hack for configure/econf, ppc-macos should just use econf
+  to get the right prefixes etc.  Adding a patch that disables Darwin5 testing
+  in configure as it hangs for Darwin8.  (We only support Darwin7 and Darwin8)
 
   14 Jun 2005; <mkennedy@gentoo.org> libsigsegv-2.2.ebuild:
   Keywording ~sparc.
index 3f721773e2ca528724f9a7fc00530fbd9fd37137..4488fad9541574226700b27be509e0801a1f9d0f 100644 (file)
@@ -1,7 +1,8 @@
-MD5 33a3af8c5a90d3d266ccd5b9c788b2a6 ChangeLog 1996
+MD5 7fb1ad0ea0438c079a811c8f29e28320 libsigsegv-2.2.ebuild 778
 MD5 48ae2b06c34a5c88d12177082cb7e869 libsigsegv-2.1.ebuild 829
-MD5 7bf0a1772300325e7337a2b1e6e85a18 libsigsegv-2.2.ebuild 780
+MD5 c3a7d607152ee9bd139998ad03a6f22e ChangeLog 2348
 MD5 39ee6b9cae3dc2366d14eabd6c1a5e0b metadata.xml 617
+MD5 dda0160f1d6fde7b52e5985e13713ffb files/libsigsegv-2.1-darwin-7.x.patch 3526
+MD5 ce7f51f0615c169507949eab0e2b9dc5 files/libsigsegv-2.2-ppc-macos.patch 5934
 MD5 ab150e95621479ef341ba173f9182181 files/digest-libsigsegv-2.1 66
 MD5 b79888309ed5e46670de384dfbe3562e files/digest-libsigsegv-2.2 66
-MD5 dda0160f1d6fde7b52e5985e13713ffb files/libsigsegv-2.1-darwin-7.x.patch 3526
diff --git a/dev-libs/libsigsegv/files/libsigsegv-2.2-ppc-macos.patch b/dev-libs/libsigsegv/files/libsigsegv-2.2-ppc-macos.patch
new file mode 100644 (file)
index 0000000..79df2fc
--- /dev/null
@@ -0,0 +1,209 @@
+--- libsigsegv-2.2/configure.orig      2005-09-02 09:57:18.000000000 +0200
++++ libsigsegv-2.2/configure   2005-09-02 09:58:06.000000000 +0200
+@@ -22882,206 +22882,6 @@
+ echo "${ECHO_T}$sv_cv_fault_macosdarwin7_ppc" >&6
+ 
+ 
+-if test "$sv_cv_fault_macosdarwin7_ppc" != yes; then
+-
+-
+-
+-
+-  echo "$as_me:$LINENO: checking whether a fault handler according to MacOSX/Darwin5 PowerPC works" >&5
+-echo $ECHO_N "checking whether a fault handler according to MacOSX/Darwin5 PowerPC works... $ECHO_C" >&6
+-if test "${sv_cv_fault_macosdarwin5_ppc+set}" = set; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-
+-    if test "$cross_compiling" = yes; then
+-  case "$host" in
+-         powerpc-*-darwin5*) sv_cv_fault_macosdarwin5_ppc=yes ;;
+-         *)
+-           cat >conftest.$ac_ext <<_ACEOF
+-
+-             /* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-
+-#include <signal.h>
+-#include "$srcdir/src/fault-macosdarwin5-powerpc.c"
+-void sigsegv_handler (int sig, int code, struct sigcontext *scp)
+-{
+-  void *fault_address = (void *) (get_fault_addr (scp));
+-}
+-
+-int
+-main ()
+-{
+-struct sigaction action;
+-
+-  ;
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+-  (eval $ac_link) 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } &&
+-       { ac_try='test -z "$ac_c_werror_flag"
+-                       || test ! -s conftest.err'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; } &&
+-       { ac_try='test -s conftest$ac_exeext'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  sv_cv_fault_macosdarwin5_ppc="guessing no"
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-sv_cv_fault_macosdarwin5_ppc=no
+-fi
+-rm -f conftest.err conftest.$ac_objext \
+-      conftest$ac_exeext conftest.$ac_ext
+-           ;;
+-       esac
+-
+-else
+-  cat >conftest.$ac_ext <<_ACEOF
+-
+-      /* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-
+-#include <stdlib.h>
+-#include <signal.h>
+-#if HAVE_SYS_SIGNAL_H
+-# include <sys/signal.h>
+-#endif
+-#include "$srcdir/src/fault-macosdarwin5-powerpc.c"
+-#include <sys/types.h>
+-#include <sys/mman.h>
+-#if HAVE_MMAP_DEVZERO
+-# include <fcntl.h>
+-# ifndef MAP_FILE
+-#  define MAP_FILE 0
+-# endif
+-#endif
+-#ifndef PROT_NONE
+-# define PROT_NONE 0
+-#endif
+-#if HAVE_MMAP_ANON
+-# define zero_fd -1
+-# define map_flags MAP_ANON | MAP_PRIVATE
+-#elif HAVE_MMAP_ANONYMOUS
+-# define zero_fd -1
+-# define map_flags MAP_ANONYMOUS | MAP_PRIVATE
+-#elif HAVE_MMAP_DEVZERO
+-static int zero_fd;
+-# define map_flags MAP_FILE | MAP_PRIVATE
+-#endif
+-unsigned long page;
+-int handler_called = 0;
+-void sigsegv_handler (int sig, int code, struct sigcontext *scp)
+-{
+-  void *fault_address = (void *) (get_fault_addr (scp));
+-  handler_called++;
+-  if (handler_called == 10)
+-    exit (4);
+-  if (fault_address != (void*)(page + 0x678))
+-    exit (3);
+-  if (mprotect ((void *) page, 0x10000, PROT_READ | PROT_WRITE) < 0)
+-    exit (2);
+-}
+-void crasher (unsigned long p)
+-{
+-  *(int *) (p + 0x678) = 42;
+-}
+-int main ()
+-{
+-  void *p;
+-  struct sigaction action;
+-  /* Preparations.  */
+-#if !HAVE_MMAP_ANON && !HAVE_MMAP_ANONYMOUS && HAVE_MMAP_DEVZERO
+-  zero_fd = open ("/dev/zero", O_RDONLY, 0644);
+-#endif
+-  /* Setup some mmaped memory.  */
+-#ifdef __hpux
+-  /* HP-UX 10 mmap() often fails when given a hint.  So give the OS complete
+-     freedom about the address range.  */
+-  p = mmap ((void *) 0,          0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0);
+-#else
+-  p = mmap ((void *) 0x12340000, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0);
+-#endif
+-  if (p == (void *)(-1))
+-    exit (2);
+-  page = (unsigned long) p;
+-  /* Make it read-only.  */
+-  if (mprotect ((void *) page, 0x10000, PROT_READ) < 0)
+-    exit (2);
+-  /* Install the SIGSEGV handler.  */
+-  sigemptyset(&action.sa_mask);
+-
+-  action.sa_handler = (void (*) (int)) &sigsegv_handler;
+-  action.sa_flags = 0;
+-
+-  sigaction (SIGSEGV, &action, (struct sigaction *) NULL);
+-  sigaction (SIGBUS, &action, (struct sigaction *) NULL);
+-  /* The first write access should invoke the handler and then complete.  */
+-  crasher (page);
+-  /* The second write access should not invoke the handler.  */
+-  crasher (page);
+-  /* Check that the handler was called only once.  */
+-  if (handler_called != 1)
+-    exit (1);
+-  /* Test passed!  */
+-  return 0;
+-}
+-_ACEOF
+-rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+-  (eval $ac_link) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+-  (eval $ac_try) 2>&5
+-  ac_status=$?
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); }; }; then
+-  sv_cv_fault_macosdarwin5_ppc=yes
+-else
+-  echo "$as_me: program exited with status $ac_status" >&5
+-echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-( exit $ac_status )
+-sv_cv_fault_macosdarwin5_ppc=no
+-fi
+-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+-fi
+-
+-fi
+-echo "$as_me:$LINENO: result: $sv_cv_fault_macosdarwin5_ppc" >&5
+-echo "${ECHO_T}$sv_cv_fault_macosdarwin5_ppc" >&6
+-
+-fi
+-
+-
+-
+-
+-
+   echo "$as_me:$LINENO: checking whether a fault handler according to Hurd works" >&5
+ echo $ECHO_N "checking whether a fault handler according to Hurd works... $ECHO_C" >&6
+ if test "${sv_cv_fault_hurd+set}" = set; then
index 4d503d7c1749843e0e19b5892fb17cd2368fa8ec..63fc3e56188676560d29f690aef1c9bfe68a38c4 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-libs/libsigsegv/libsigsegv-2.2.ebuild,v 1.4 2005/06/14 22:32:34 mkennedy Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libsigsegv/libsigsegv-2.2.ebuild,v 1.5 2005/09/02 08:10:39 grobian Exp $
 
 inherit eutils
 
@@ -9,17 +9,18 @@ HOMEPAGE="ftp://ftp.gnu.org/pub/gnu/libsigsegv/"
 SRC_URI="ftp://ftp.gnu.org/pub/gnu/libsigsegv/${P}.tar.gz"
 LICENSE="GPL-2"
 SLOT="0"
-KEYWORDS="~x86 ~ppc-macos ~amd64 ~sparc"
+KEYWORDS="~amd64 ~ppc-macos ~sparc ~x86"
 IUSE=""
 
 DEPEND="virtual/libc"
 
+src_unpack() {
+       unpack ${A}
+       epatch ${FILESDIR}/${P}-ppc-macos.patch
+}
+
 src_compile() {
-       if use ppc-macos ; then
-               ./configure --enable-shared || die
-       else
-               econf --enable-shared || die
-       fi
+       econf --enable-shared || die
        emake || die
 }