summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Cardona <remi@gentoo.org>2007-06-29 18:56:07 +0000
committerRémi Cardona <remi@gentoo.org>2007-06-29 18:56:07 +0000
commitfe0d36aa1a412f29feb11f51a416f73ac8592b53 (patch)
treef49b83efc1396034ccae5ca5988e37ec7e7907a9 /dev-libs
parentStable for sparc --- Bug #183574 --- no problems detected. (diff)
downloadgentoo-2-fe0d36aa1a412f29feb11f51a416f73ac8592b53.tar.gz
gentoo-2-fe0d36aa1a412f29feb11f51a416f73ac8592b53.tar.bz2
gentoo-2-fe0d36aa1a412f29feb11f51a416f73ac8592b53.zip
dev-libs/libdaemon: fix stdarg usage, patch by Alex Rostovtsev (fixes bug #182999)
(Portage version: 2.1.3_rc5)
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/libdaemon/ChangeLog8
-rw-r--r--dev-libs/libdaemon/files/digest-libdaemon-0.11-r13
-rw-r--r--dev-libs/libdaemon/files/libdaemon-0.11-daemon_close_all.patch31
-rw-r--r--dev-libs/libdaemon/libdaemon-0.11-r1.ebuild45
4 files changed, 86 insertions, 1 deletions
diff --git a/dev-libs/libdaemon/ChangeLog b/dev-libs/libdaemon/ChangeLog
index 21cd269cfe37..ba96165c47f4 100644
--- a/dev-libs/libdaemon/ChangeLog
+++ b/dev-libs/libdaemon/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-libs/libdaemon
# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libdaemon/ChangeLog,v 1.39 2007/06/22 17:36:57 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libdaemon/ChangeLog,v 1.40 2007/06/29 18:56:07 remi Exp $
+
+*libdaemon-0.11-r1 (29 Jun 2007)
+
+ 29 Jun 2007; Remi Cardona <remi@gentoo.org>
+ +files/libdaemon-0.11-daemon_close_all.patch, +libdaemon-0.11-r1.ebuild:
+ fix stdarg usage, patch by Alex Rostovtsev (fixes bug #182999)
*libdaemon-0.11 (22 Jun 2007)
diff --git a/dev-libs/libdaemon/files/digest-libdaemon-0.11-r1 b/dev-libs/libdaemon/files/digest-libdaemon-0.11-r1
new file mode 100644
index 000000000000..97b5058a3c40
--- /dev/null
+++ b/dev-libs/libdaemon/files/digest-libdaemon-0.11-r1
@@ -0,0 +1,3 @@
+MD5 b99a608ae9a762e809b667bfa20d86dd libdaemon-0.11.tar.gz 355080
+RMD160 b557fb95c441fe4fc7f577ff6a86cd398d368aac libdaemon-0.11.tar.gz 355080
+SHA256 d54efe38aad450363c46eaa32b1bf29cbd3b7f8c870c0ffcaec8891c22681eb0 libdaemon-0.11.tar.gz 355080
diff --git a/dev-libs/libdaemon/files/libdaemon-0.11-daemon_close_all.patch b/dev-libs/libdaemon/files/libdaemon-0.11-daemon_close_all.patch
new file mode 100644
index 000000000000..840eceec4a9f
--- /dev/null
+++ b/dev-libs/libdaemon/files/libdaemon-0.11-daemon_close_all.patch
@@ -0,0 +1,31 @@
+diff -ru libdaemon-0.11.orig/libdaemon/dfork.c libdaemon-0.11/libdaemon/dfork.c
+--- libdaemon-0.11.orig/libdaemon/dfork.c 2007-06-11 11:36:11.000000000 -0400
++++ libdaemon-0.11/libdaemon/dfork.c 2007-06-28 16:30:28.000000000 -0400
+@@ -357,6 +357,11 @@
+ int n, i, r;
+ int *p;
+
++ if (except_fd < 0) {
++ int t = -1;
++ return daemon_close_allv(&t);
++ }
++
+ va_start(original_ap, except_fd);
+ va_copy(ap, original_ap);
+
+@@ -365,12 +370,13 @@
+
+ va_end(ap);
+
+- if (!(p = malloc(sizeof(int) * (n+1)))) {
++ if (!(p = malloc(sizeof(int) * (n+2)))) {
+ va_end(original_ap);
+ return -1;
+ }
+
+- i = 0;
++ p[0] = except_fd;
++ i = 1;
+ while ((p[i++] = va_arg(original_ap, int)) >= 0)
+ ;
+
diff --git a/dev-libs/libdaemon/libdaemon-0.11-r1.ebuild b/dev-libs/libdaemon/libdaemon-0.11-r1.ebuild
new file mode 100644
index 000000000000..fa1300f878ec
--- /dev/null
+++ b/dev-libs/libdaemon/libdaemon-0.11-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libdaemon/libdaemon-0.11-r1.ebuild,v 1.1 2007/06/29 18:56:07 remi Exp $
+
+inherit eutils
+
+DESCRIPTION="Simple library for creating daemon processes in C"
+HOMEPAGE="http://0pointer.de/lennart/projects/libdaemon/"
+SRC_URI="http://0pointer.de/lennart/projects/libdaemon/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="doc"
+
+DEPEND="doc? ( app-doc/doxygen )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-daemon_close_all.patch"
+}
+
+src_compile() {
+ econf --disable-lynx || die "econf failed"
+ emake || die "emake failed"
+
+ if use doc ; then
+ einfo "Building documentation"
+ make doxygen || die "make doxygen failed"
+ fi
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+
+ if use doc; then
+ ln -sf doc/reference/html reference
+ dohtml -r doc/README.html reference
+ doman doc/reference/man/man*/*
+ fi
+
+ dodoc README
+ docinto examples ; dodoc examples/testd.c
+}