summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-02-17 07:54:19 +0000
committerMike Frysinger <vapier@gentoo.org>2008-02-17 07:54:19 +0000
commitee4209a465a7ce467128c6d0bf6b04780a0af1d1 (patch)
tree9a333976b2de657d549949522cd4628ece70e489 /app-cdr
parentAdd missing m4 dependency and fixup flag munging. (diff)
downloadgentoo-2-ee4209a465a7ce467128c6d0bf6b04780a0af1d1.tar.gz
gentoo-2-ee4209a465a7ce467128c6d0bf6b04780a0af1d1.tar.bz2
gentoo-2-ee4209a465a7ce467128c6d0bf6b04780a0af1d1.zip
Fix running of growisofs on systems with large thread stacks (like powerpc).
(Portage version: 2.2_pre2)
Diffstat (limited to 'app-cdr')
-rw-r--r--app-cdr/dvd+rw-tools/ChangeLog9
-rw-r--r--app-cdr/dvd+rw-tools/dvd+rw-tools-7.0-r1.ebuild41
-rw-r--r--app-cdr/dvd+rw-tools/files/dvd+rw-tools-7.0-thread-stack-size.patch41
3 files changed, 90 insertions, 1 deletions
diff --git a/app-cdr/dvd+rw-tools/ChangeLog b/app-cdr/dvd+rw-tools/ChangeLog
index 593dc6221886..87921b9a5656 100644
--- a/app-cdr/dvd+rw-tools/ChangeLog
+++ b/app-cdr/dvd+rw-tools/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-cdr/dvd+rw-tools
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-cdr/dvd+rw-tools/ChangeLog,v 1.55 2008/02/17 07:18:00 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-cdr/dvd+rw-tools/ChangeLog,v 1.56 2008/02/17 07:54:19 vapier Exp $
+
+*dvd+rw-tools-7.0-r1 (17 Feb 2008)
+
+ 17 Feb 2008; Mike Frysinger <vapier@gentoo.org>
+ +files/dvd+rw-tools-7.0-thread-stack-size.patch,
+ +dvd+rw-tools-7.0-r1.ebuild:
+ Fix running of growisofs on systems with large thread stacks (like powerpc).
17 Feb 2008; Mike Frysinger <vapier@gentoo.org> dvd+rw-tools-7.0.ebuild:
Add missing m4 dependency and fixup flag munging.
diff --git a/app-cdr/dvd+rw-tools/dvd+rw-tools-7.0-r1.ebuild b/app-cdr/dvd+rw-tools/dvd+rw-tools-7.0-r1.ebuild
new file mode 100644
index 000000000000..85c6a03d987e
--- /dev/null
+++ b/app-cdr/dvd+rw-tools/dvd+rw-tools-7.0-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-cdr/dvd+rw-tools/dvd+rw-tools-7.0-r1.ebuild,v 1.1 2008/02/17 07:54:19 vapier Exp $
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A set of tools for DVD+RW/-RW drives"
+HOMEPAGE="http://fy.chalmers.se/~appro/linux/DVD+RW/"
+SRC_URI="http://fy.chalmers.se/~appro/linux/DVD+RW/tools/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86"
+IUSE=""
+
+RDEPEND="virtual/cdrtools"
+DEPEND="${RDEPEND}
+ sys-devel/m4"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-thread-stack-size.patch
+ # Linux compiler flags only include -O2 and are incremental
+ sed -i '/FLAGS/s:-O2::' Makefile.m4
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) CXX=$(tc-getCXX) || die
+}
+
+src_install() {
+ einstall || die
+ dohtml index.html
+}
+
+pkg_postinst() {
+ elog "When you run growisofs if you receive:"
+ elog "unable to anonymously mmap 33554432: Resource temporarily unavailable"
+ elog "error message please run 'ulimit -l unlimited'"
+}
diff --git a/app-cdr/dvd+rw-tools/files/dvd+rw-tools-7.0-thread-stack-size.patch b/app-cdr/dvd+rw-tools/files/dvd+rw-tools-7.0-thread-stack-size.patch
new file mode 100644
index 000000000000..ab0f1173634a
--- /dev/null
+++ b/app-cdr/dvd+rw-tools/files/dvd+rw-tools-7.0-thread-stack-size.patch
@@ -0,0 +1,41 @@
+Respect PTHREAD_STACK_MIN when defined
+
+Some systems (like PowerPC) cannot work with 64k thread stacks. Setting the
+stack lower will error and the whole process aborts. An example error:
+$ growisofs -dvd-compat -Z /dev/hda=my.iso
+Executing 'builtin_dd if=my.iso of=/dev/hda obs=32k seek=0'
+:-( failed to create thread: Input/output error
+
+So if the minimum required size is larger than 64k, we'll just use whatever
+the system defines. If it is smaller, we'll stick with 64k.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+
+--- dvd+rw-tools-7.0/mp.h
++++ dvd+rw-tools-7.0/mp.h
+@@ -31,6 +31,16 @@
+ #include <sched.h>
+ #include <semaphore.h>
+ #include <stdlib.h>
++#include <limits.h>
++
++/* some systems (like powerpc) cannot work with 64k stacks */
++#define MY_STACK_SIZE 64*1024
++#ifdef PTHREAD_STACK_MIN
++# if MY_STACK_SIZE < PTHREAD_STACK_MIN
++# undef MY_STACK_SIZE
++# define MY_STACK_SIZE PTHREAD_STACK_MIN
++# endif
++#endif
+
+ #define THR_TYPE int
+
+@@ -39,7 +49,7 @@
+ pthread_attr_t attr;
+
+ if (pthread_attr_init(&attr)==0 &&
+- pthread_attr_setstacksize(&attr,64*1024)==0 &&
++ pthread_attr_setstacksize(&attr,MY_STACK_SIZE)==0 &&
+ pthread_attr_setscope(&attr,PTHREAD_SCOPE_SYSTEM)==0 &&
+ pthread_create(&h,&attr,(void *(*)(void *))func,arg)==0 )
+ return (void *)h;