summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2011-03-31 15:31:52 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2011-03-31 15:31:52 +0000
commitdbf165f99d4e8fffbce0139f9b0e07150fee55c7 (patch)
tree10cd943deae355d9977c6d887c19b7c79c4bf933 /sys-block
parentDepend on virtual/ffmpeg instead of media-video/ffmpeg. (diff)
downloadgentoo-2-dbf165f99d4e8fffbce0139f9b0e07150fee55c7.tar.gz
gentoo-2-dbf165f99d4e8fffbce0139f9b0e07150fee55c7.tar.bz2
gentoo-2-dbf165f99d4e8fffbce0139f9b0e07150fee55c7.zip
Move from sys-apps/eject.
(Portage version: 2.2.0_alpha29/cvs/Linux x86_64, RepoMan options: --force)
Diffstat (limited to 'sys-block')
-rw-r--r--sys-block/eject/ChangeLog317
-rw-r--r--sys-block/eject/eject-2.1.5-r2.ebuild41
-rw-r--r--sys-block/eject/files/eject-2.0.13-xmalloc.patch28
-rw-r--r--sys-block/eject/files/eject-2.1.4-scsi-rdwr.patch21
-rw-r--r--sys-block/eject/files/eject-2.1.5-handle-spaces.patch57
-rw-r--r--sys-block/eject/files/eject-2.1.5-man-typo.patch18
-rw-r--r--sys-block/eject/files/eject-2.1.5-toggle.patch27
-rw-r--r--sys-block/eject/metadata.xml5
8 files changed, 514 insertions, 0 deletions
diff --git a/sys-block/eject/ChangeLog b/sys-block/eject/ChangeLog
new file mode 100644
index 000000000000..eb45ec78c7e8
--- /dev/null
+++ b/sys-block/eject/ChangeLog
@@ -0,0 +1,317 @@
+# ChangeLog for sys-block/eject
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-block/eject/ChangeLog,v 1.1 2011/03/31 15:31:52 ssuominen Exp $
+
+ 12 Sep 2010; Jonathan Callen <abcd@gentoo.org> eject-2.1.5-r2.ebuild:
+ Add prefix support and keywords, switch to EAPI=3, add missing dep on
+ sys-devel/gettext when USE=nls
+
+ 01 Feb 2010; Samuli Suominen <ssuominen@gentoo.org> eject-2.1.5-r2.ebuild:
+ Change SRC_URI to Gentoo mirrors wrt #303136, thanks to Juan Welthagen for
+ reporting.
+
+ 16 Jan 2010; Raúl Porcel <armin76@gentoo.org> eject-2.1.5-r2.ebuild:
+ ia64/m68k/s390/sh/sparc stable wrt #296429
+
+ 01 Jan 2010; Tobias Klausmann <klausman@gentoo.org> eject-2.1.5-r2.ebuild:
+ Stable on alpha, bug #296429
+
+ 28 Dec 2009; Markus Meier <maekke@gentoo.org> eject-2.1.5-r2.ebuild:
+ arm/x86 stable, bug #296429
+
+ 28 Dec 2009; nixnut <nixnut@gentoo.org> eject-2.1.5-r2.ebuild:
+ ppc stable #296429
+
+ 16 Dec 2009; Jeroen Roovers <jer@gentoo.org> eject-2.1.5-r2.ebuild:
+ Stable for HPPA (bug #296429).
+
+ 15 Dec 2009; Samuli Suominen <ssuominen@gentoo.org> eject-2.1.5-r1.ebuild,
+ eject-2.1.5-r2.ebuild:
+ amd64 stable wrt #296429. Remove geocities from HOMEPAGE wrt #297028.
+
+ 14 Dec 2009; Brent Baude <ranger@gentoo.org> eject-2.1.5-r2.ebuild:
+ stable ppc64, bug 296429
+
+*eject-2.1.5-r2 (14 Mar 2009)
+
+ 14 Mar 2009; Mike Frysinger <vapier@gentoo.org>
+ +files/eject-2.1.5-toggle.patch, +eject-2.1.5-r2.ebuild:
+ Cleanup and apply fix from opensuse #261880 by Peter Tworek.
+
+ 25 May 2007; Bryan Østergaard <kloeri@gentoo.org> eject-2.1.5-r1.ebuild:
+ Stable on Alpha, bug 165355.
+
+ 13 Feb 2007; Markus Rothe <corsair@gentoo.org> eject-2.1.5-r1.ebuild:
+ Stable on ppc64; bug #165355
+
+ 06 Feb 2007; Joseph Jezak <josejx@gentoo.org> eject-2.1.5-r1.ebuild:
+ Marked ppc stable for bug #165355.
+
+ 05 Feb 2007; Gustavo Zacarias <gustavoz@gentoo.org> eject-2.1.5-r1.ebuild:
+ Stable on sparc wrt #165335
+
+ 05 Feb 2007; Andrej Kacian <ticho@gentoo.org> eject-2.1.5-r1.ebuild:
+ Stable on x86, bug #165355.
+
+ 05 Feb 2007; Steve Dibb <beandog@gentoo.org> eject-2.1.5-r1.ebuild:
+ amd64 stable, bug 165355
+
+ 04 Feb 2007; Jeroen Roovers <jer@gentoo.org> eject-2.1.5-r1.ebuild:
+ Stable for HPPA (bug #165355).
+
+ 04 Feb 2007; Mike Frysinger <vapier@gentoo.org>
+ +files/eject-2.1.5-man-typo.patch, eject-2.1.5-r1.ebuild:
+ Fix typo in eject manpage #165248 by DoubleHP.
+
+ 03 Feb 2007; Alexander H. Færøy <eroyf@gentoo.org>
+ eject-2.1.5-r1.ebuild:
+ Stable on MIPS; bug #164176
+
+ 20 Oct 2006; Aron Griffis <agriffis@gentoo.org> eject-2.1.5.ebuild:
+ Mark 2.1.5 stable on alpha
+
+*eject-2.1.5-r1 (16 Oct 2006)
+
+ 16 Oct 2006; Mike Frysinger <vapier@gentoo.org>
+ +files/eject-2.1.5-handle-spaces.patch, +eject-2.1.5-r1.ebuild:
+ Handle spaces in mounts #151257 by Adam Goossens.
+
+ 23 Sep 2006; Tobias Scherbaum <dertobi123@gentoo.org> eject-2.1.5.ebuild:
+ hppa stable, bug #148121
+
+ 21 Sep 2006; Tobias Scherbaum <dertobi123@gentoo.org> eject-2.1.5.ebuild:
+ ppc stable, bug #148121
+
+ 20 Sep 2006; <blubb@gentoo.org> eject-2.1.5.ebuild:
+ stable on amd64
+
+ 19 Sep 2006; Gustavo Zacarias <gustavoz@gentoo.org> eject-2.1.5.ebuild:
+ Stable on sparc wrt #148121
+
+ 19 Sep 2006; Markus Rothe <corsair@gentoo.org> eject-2.1.5.ebuild:
+ Stable on ppc64; bug #148121
+
+ 19 Sep 2006; Michele Noberasco <s4t4n@gentoo.org> eject-2.1.5.ebuild:
+ stable for x86. See bug #148121.
+
+*eject-2.1.5 (01 Aug 2006)
+
+ 01 Aug 2006; Roy Marples <uberlord@gentoo.org> +eject-2.1.5.ebuild:
+ Version bump thanks to Flameeyes.
+
+ 27 Apr 2006; Alec Warner <antarus@gentoo.org>
+ files/digest-eject-2.0.13-r1, files/digest-eject-2.0.13-r2, Manifest:
+ Fixing SHA256 digest, pass four
+
+*eject-2.1.4-r1 (23 Apr 2006)
+
+ 23 Apr 2006; Roy Marples <uberlord@gentoo.org>
+ +files/eject-2.1.4-scsi-rdwr.patch, +eject-2.1.4-r1.ebuild:
+ Patch to open device read/write when it's scsi, #116731.
+ Now iPod owners can eject their iPods when not root!
+
+ 19 Feb 2006; Joshua Kinard <kumba@gentoo.org> eject-2.1.0-r1.ebuild:
+ Marked stable on mips.
+
+*eject-2.1.4 (18 Feb 2006)
+
+ 18 Feb 2006; Mike Frysinger <vapier@gentoo.org>
+ +files/eject-2.1.4-toggle.patch, +eject-2.1.4.ebuild:
+ Version bump by Daniel Walker #123174.
+
+*eject-2.1.0-r1 (11 Feb 2006)
+
+ 11 Feb 2006; Mike Frysinger <vapier@gentoo.org>
+ +files/eject-2.1.0-toggle.patch, -eject-2.1.0.ebuild,
+ +eject-2.1.0-r1.ebuild:
+ Fix by Stuart W. Finlayson for bug in toggle support #122256.
+
+ 09 Feb 2006; Jeroen Roovers <jer@gentoo.org> eject-2.1.0.ebuild:
+ Stable on hppa (bug #122136).
+
+ 09 Feb 2006; Gustavo Zacarias <gustavoz@gentoo.org> eject-2.1.0.ebuild:
+ Stable on sparc wrt #122126
+
+ 09 Feb 2006; <deltacow@gentoo.org> eject-2.1.0.ebuild:
+ amd64 stable
+
+ 09 Feb 2006; Michele Noberasco <s4t4n@gentoo.org> eject-2.1.0.ebuild:
+ Mark 2.1.0 stable on x86. See bug #122136.
+
+ 08 Feb 2006; Aron Griffis <agriffis@gentoo.org> eject-2.1.0.ebuild:
+ Mark 2.1.0 stable on alpha
+
+ 07 Feb 2006; Aron Griffis <agriffis@gentoo.org> eject-2.1.0.ebuild:
+ Mark 2.1.0 stable on ia64
+
+ 22 Jan 2006; Markus Rothe <corsair@gentoo.org> eject-2.1.0.ebuild:
+ Stable on ppc64
+
+ 25 Dec 2005; Michael Hanselmann <hansmi@gentoo.org> eject-2.1.0.ebuild:
+ Stable on ppc because it adds the -t parameter which is very useful on newer
+ Apple computers, see bug 116703 and verified by myself.
+
+ 03 Oct 2005; Hardave Riar <hardave@gentoo.org> eject-2.0.13-r2.ebuild:
+ Stable on mips.
+
+ 02 Oct 2005; Bryan Østergaard <kloeri@gentoo.org> eject-2.0.13-r2.ebuild:
+ Alpha stable.
+
+ 01 Oct 2005; Luis Medinas <metalgod@gentoo.org> eject-2.0.13-r2.ebuild:
+ Marked Stable on amd64.
+
+ 24 Sep 2005; Michael Hanselmann <hansmi@gentoo.org>
+ eject-2.0.13-r2.ebuild:
+ Stable on ppc.
+
+ 24 Sep 2005; Markus Rothe <corsair@gentoo.org> eject-2.0.13-r2.ebuild:
+ Stable on ppc64
+
+ 19 Sep 2005; Gustavo Zacarias <gustavoz@gentoo.org>
+ eject-2.0.13-r2.ebuild:
+ Stable on sparc
+
+*eject-2.1.0 (18 Sep 2005)
+
+ 18 Sep 2005; Mike Frysinger <vapier@gentoo.org>
+ +files/eject-2.1.0-regcomp-check.patch,
+ +files/eject-2.1.0-scsi-io-update.patch, +eject-2.1.0.ebuild:
+ Version bump #106356 by Surakshan Mendis.
+
+ 25 Jul 2005; Diego Pettenò <flameeyes@gentoo.org> eject-2.0.13.ebuild,
+ eject-2.0.13-r1.ebuild, eject-2.0.13-r2.ebuild:
+ Block virtual/eject else it conflicts with sys-block/unieject.
+
+ 23 Jul 2005; <solar.@gentoo.org> +files/eject-2.0.13-i18n-uclibc.patch,
+ eject-2.0.13-r2.ebuild:
+ - handle uclibc minimal exceptions when i18n/nls/gettext is not active
+
+ 28 May 2005; Diego Pettenò <flameeyes@gentoo.org> eject-2.0.13.ebuild,
+ eject-2.0.13-r1.ebuild, eject-2.0.13-r2.ebuild:
+ Added virtual provision for virtual/eject.
+
+*eject-2.0.13-r2 (21 May 2005)
+
+ 21 May 2005; Mike Frysinger <vapier@gentoo.org>
+ +files/eject-2.0.13-close-check.patch, files/eject-2.0.13-finddev.patch,
+ +files/eject-2.0.13-fstab-error.patch,
+ +files/eject-2.0.13-no-umount.patch,
+ +files/eject-2.0.13-prefix-defaultdevice-with-dev.patch,
+ +files/eject-2.0.13-toggle.patch, +files/eject-2.0.13-xmalloc.patch,
+ +files/eject-2.0.13-xregcomp.patch, +eject-2.0.13-r2.ebuild,
+ +eject-2.0.13-pumount.patch:
+ Add toggle support by Patrik Kullman #62612 and a bunch of patches from
+ Debian #91977.
+
+*eject-2.0.13-r1 (13 Feb 2005)
+
+ 13 Feb 2005; Mike Frysinger <vapier@gentoo.org>
+ +files/eject-2.0.13-autoclose.patch, +files/eject-2.0.13-finddev.patch,
+ +files/eject-2.0.13-header.patch,
+ files/eject-2.0.13-kernel25-support.patch,
+ +files/eject-2.0.13-use-mountpoints.patch, +eject-2.0.13-r1.ebuild:
+ Grab a bunch of patches from Fedora.
+
+ 25 Jan 2005; Mike Doty <kingtaco@gentoo.org> eject-2.0.13.ebuild:
+ nls patch provided by seemant
+
+ 03 Sep 2004; Pieter Van den Abeele <pvdabeel@gentoo.org>
+ eject-2.0.13.ebuild:
+ Masked eject-2.0.13.ebuild stable for ppc
+
+ 29 Jun 2004; Michael Sterrett <mr_bones_@gentoo.org> eject-2.0.13.ebuild:
+ depend on sed-4; error check sed; tidy install
+
+ 13 May 2004; Stephen P. Becker <geoman@gentoo.org> eject-2.0.13.ebuild:
+ Stable on mips.
+
+ 14 Mar 2004; Stephen P. Becker <geoman@gentoo.org> eject-2.0.13.ebuild:
+ Added ~mips keyword.
+
+ 09 Mar 2004; <agriffis@gentoo.org> eject-2.0.13.ebuild:
+ stable on alpha and ia64
+
+ 26 Feb 2004; Gustavo Zacarias <gustavoz@gentoo.org> eject-2.0.13.ebuild:
+ stable on sparc
+
+ 25 Feb 2004; Guy Martin <gmsoft@gentoo.org> eject-2.0.13.ebuild:
+ Marked stable on hppa.
+
+ 24 Feb 2004; <augustus@gentoo.org> eject-2.0.13.ebuild:
+ Made eject-2.0.13 stable on amd64. BUG #42720.
+
+ 23 Feb 2004; Seemant Kulleen <seemant@gentoo.org> eject-2.0.13.ebuild:
+ moved 13 to stable, 12 is causing issues all over the place it seems
+
+ 19 Feb 2004; Martin Schlemmer <azarah@gentoo.org> eject-2.0.13.ebuild:
+ Fix silly includes based on a patch by Ronald Hummelink
+ <gentoo-bugzilla@hummelink.xs4all.nl>, bug #41856.
+
+ 05 Dec 2003; <plasmaroo@gentoo.org>
+ files/eject-2.0.12-kernel25-support.patch,
+ files/eject-2.0.13-kernel25-support.patch:
+ Fixed the patches to work happily with 2.6. kernels; closing bug #35088.
+
+ 14 Nov 2003; Aron Griffis <agriffis@gentoo.org> eject-2.0.12-r1.ebuild:
+ Stable on ia64.
+
+*eject-2.0.13 (08 Nov 2003)
+
+ 08 Nov 2003; Martin Holzer <mholzer@gentoo.org> eject-2.0.13.ebuild,
+ files/eject-2.0.13-kernel25-support.patch:
+ Version bumped. Closes bug #32953.
+
+ 06 Mar 2003; Martin Schlemmer <azarah@gentoo.org> eject-2.0.12-r1.ebuild :
+ Get eject to build with kernel-2.5.x.
+
+ 03 Mar 2003; Daniel Ahlberg <aliz@gentoo.org> :
+ This update should not be classified as a security update. The advisory says that eject is only
+ vulnerable if it is install setuid root and in Gentoo it is not. However if someone decides to
+ make it setuid root the patch in -r1 will make it safer.
+
+*eject-2.0.12-r1 (03 Mar 2003)
+
+ 04 Jul 2003; Guy Martin <gmsoft@gentoo.org> eject-2.0.12-r1.ebuild :
+ Added hppa to KEYWORDS.
+
+ 03 Mar 2003; Daniel Ahlberg <aliz@gentoo.org> :
+ Security update.
+
+ 25 Feb 2003; Daniel Ahlberg <aliz@gentoo.org> eject-2.0.12.ebuild :
+ Unmasked becuse of GLSA.
+
+ 06 Dec 2002; Rodney Rees <manson@gentoo.org> : changed sparc ~sparc keywords
+
+*eject-2.0.12 (05 Nov 2002)
+
+ 21 Feb 2003; Aron Griffis <agriffis@gentoo.org> eject-2.0.12.ebuild :
+ Mark stable on Alpha.
+
+ 05 Dec 2002; Will Woods <wwoods@gentoo.org> eject-2.0.10.ebuild, eject-2.0.12.ebuild:
+ Added 'alpha' keyword.
+
+ 06 Nov 2002; Daniel Ahlberg <aliz@gentoo.org> :
+ Version bump.
+
+*eject-2.0.10 (9 May 2002)
+
+ 14 Jul 2002; phoen][x <phoenix@gentoo.org> eject-2.0.10.ebuild :
+ Added KEYWORDS, SLOT.
+
+ 9 May 2002; D.Chamberlain <daybird@gentoo.org> Changelog:
+
+ Updated to 2.0.10. This version is not sandbox friendly, so we only install the
+ binaries and docs.
+
+*eject-2.0.6 (1 Feb 2002)
+
+ 14 Jul 2002; phoen][x <phoenix@gentoo.org> eject-2.0.6.ebuild :
+ Added KEYWORDS, SLOT.
+
+ 1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog :
+
+ Added initial ChangeLog which should be updated whenever the package is
+ updated in any way. This changelog is targetted to users. This means that the
+ comments should well explained and written in clean English. The details about
+ writing correct changelogs are explained in the skel.ChangeLog file which you
+ can find in the root directory of the portage repository.
diff --git a/sys-block/eject/eject-2.1.5-r2.ebuild b/sys-block/eject/eject-2.1.5-r2.ebuild
new file mode 100644
index 000000000000..45eb4fb79361
--- /dev/null
+++ b/sys-block/eject/eject-2.1.5-r2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-block/eject/eject-2.1.5-r2.ebuild,v 1.1 2011/03/31 15:31:52 ssuominen Exp $
+
+EAPI="3"
+
+inherit eutils
+
+DESCRIPTION="A command to eject a disc from the CD-ROM drive"
+HOMEPAGE="http://eject.sourceforge.net/"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
+IUSE="nls"
+
+DEPEND="nls? ( sys-devel/gettext )"
+RDEPEND=""
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.0.13-xmalloc.patch
+ epatch "${FILESDIR}"/${PN}-2.1.4-scsi-rdwr.patch
+ epatch "${FILESDIR}"/${PN}-2.1.5-handle-spaces.patch #151257
+ epatch "${FILESDIR}"/${PN}-2.1.5-man-typo.patch #165248
+ epatch "${FILESDIR}"/${PN}-2.1.5-toggle.patch #261880
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls)
+}
+
+src_install() {
+ # PREFIX for po/Makefile, which hardcodes a prefix of "$(DESTDIR)/usr"
+ # it is not used in the other makefiles
+ emake DESTDIR="${D}" PREFIX="${ED}/usr" install || die
+ dodoc ChangeLog README PORTING TODO AUTHORS NEWS PROBLEMS
+}
diff --git a/sys-block/eject/files/eject-2.0.13-xmalloc.patch b/sys-block/eject/files/eject-2.0.13-xmalloc.patch
new file mode 100644
index 000000000000..f609da19d05f
--- /dev/null
+++ b/sys-block/eject/files/eject-2.0.13-xmalloc.patch
@@ -0,0 +1,28 @@
+Make sure the malloc's work.
+
+http://bugs.gentoo.org/91977
+
+--- eject.c
++++ eject.c
+@@ -304,2 +304,11 @@
+
++void *xmalloc(size_t size)
++{
++ void *ret = malloc(size);
++ if (!ret) {
++ fprintf(stderr, _("%s: could not allocate memory\n"), programName);
++ exit(1);
++ }
++ return ret;
++}
+
+@@ -324,3 +333,3 @@
+
+- buf = (char *) malloc(strlen(name)+14); /* to allow for "/dev/cdroms/ + "0" + null */
++ buf = (char *) xmalloc(strlen(name)+14); /* to allow for "/dev/cdroms/ + "0" + null */
+
+@@ -794,3 +803,3 @@
+ if (status == 0) {
+- result = (char *) malloc(strlen(name) + 25);
++ result = (char *) xmalloc(strlen(name) + 25);
+ strcpy(result, name);
diff --git a/sys-block/eject/files/eject-2.1.4-scsi-rdwr.patch b/sys-block/eject/files/eject-2.1.4-scsi-rdwr.patch
new file mode 100644
index 000000000000..cd5e497b9d9a
--- /dev/null
+++ b/sys-block/eject/files/eject-2.1.4-scsi-rdwr.patch
@@ -0,0 +1,21 @@
+http://bugs.gentoo.org/116731
+
+--- eject-2.0.13/eject.c
++++ eject-2.0.13/eject.c
+@@ -657,7 +657,15 @@
+ /* Open a device file. */
+ static int OpenDevice(const char *fullName)
+ {
+- int fd = open(fullName, O_RDONLY|O_NONBLOCK);
++ int flags = O_NONBLOCK;
++ int fd;
++
++ if (s_option)
++ flags |= O_RDWR;
++ else
++ flags |= O_RDONLY;
++
++ fd = open(fullName, flags);
+ if (fd == -1) {
+ fprintf(stderr, _("%s: unable to open `%s'\n"), programName, fullName);
+ exit(1);
diff --git a/sys-block/eject/files/eject-2.1.5-handle-spaces.patch b/sys-block/eject/files/eject-2.1.5-handle-spaces.patch
new file mode 100644
index 000000000000..692368fa50b8
--- /dev/null
+++ b/sys-block/eject/files/eject-2.1.5-handle-spaces.patch
@@ -0,0 +1,57 @@
+http://bugs.gentoo.org/151257
+
+--- eject.c
++++ eject.c
+@@ -370,6 +370,30 @@ static int FileExists(const char *name,
+
+
+ /*
++ * Linux mangles spaces in mount points by changing them to an octal string
++ * of '\040'. So lets scan the mount point and fix it up by replacing all
++ * occurrences off '\0##' with the ASCII value of 0##. Requires a writable
++ * string as input as we mangle in place. Some of this was taken from the
++ * util-linux package.
++ */
++#define octalify(a) ((a) & 7)
++#define tooctal(s) (64*octalify(s[1]) + 8*octalify(s[2]) + octalify(s[3]))
++#define isoctal(a) (((a) & ~7) == '0')
++static char *DeMangleMount(char *s)
++{
++ char *tmp = s;
++ while ((tmp = strchr(tmp, '\\')) != NULL) {
++ if (isoctal(tmp[1]) && isoctal(tmp[2]) && isoctal(tmp[3])) {
++ tmp[0] = tooctal(tmp);
++ memmove(tmp+1, tmp+4, strlen(tmp)-3);
++ }
++ ++tmp;
++ }
++ return s;
++}
++
++
++/*
+ * Given name, such as foo, see if any of the following exist:
+ *
+ * foo (if foo starts with '.' or '/')
+@@ -884,8 +908,8 @@ static int MountedDevice(const char *nam
+ if (((strcmp(s1, name) == 0) || (strcmp(s2, name) == 0)) ||
+ ((maj != -1) && (maj == mtabmaj) && (min == mtabmin))) {
+ FCLOSE(fp);
+- *deviceName = strdup(s1);
+- *mountName = strdup(s2);
++ *deviceName = DeMangleMount(strdup(s1));
++ *mountName = DeMangleMount(strdup(s2));
+ return 1;
+ }
+ }
+@@ -928,8 +952,8 @@ static int MountableDevice(const char *n
+ rc = sscanf(line, "%1023s %1023s", s1, s2);
+ if (rc >= 2 && s1[0] != '#' && strcmp(s2, name) == 0) {
+ FCLOSE(fp);
+- *deviceName = strdup(s1);
+- *mountName = strdup(s2);
++ *deviceName = DeMangleMount(strdup(s1));
++ *mountName = DeMangleMount(strdup(s2));
+ return 1;
+ }
+ }
diff --git a/sys-block/eject/files/eject-2.1.5-man-typo.patch b/sys-block/eject/files/eject-2.1.5-man-typo.patch
new file mode 100644
index 000000000000..2fecb745ce0f
--- /dev/null
+++ b/sys-block/eject/files/eject-2.1.5-man-typo.patch
@@ -0,0 +1,18 @@
+http://bugs.gentoo.org/165248
+
+Index: eject.1
+===================================================================
+RCS file: /cvsroot/eject/eject/eject/eject.1,v
+retrieving revision 1.5
+diff -u -p -r1.5 eject.1
+--- eject.1 11 Dec 2005 00:21:06 -0000 1.5
++++ eject.1 4 Feb 2007 23:11:15 -0000
+@@ -145,7 +145,7 @@ also passes the \-n option to umount(1).
+ .TP 0.5i
+ .B \-m
+ This option allows eject to work with device drivers which automatically
+-mount removable media and therefore must be always mount()ed.
++mount removable media and therefore must be always mount(1)ed.
+ The option tells eject to not try to unmount the given device,
+ even if it is mounted according to /etc/mtab or /proc/mounts.
+
diff --git a/sys-block/eject/files/eject-2.1.5-toggle.patch b/sys-block/eject/files/eject-2.1.5-toggle.patch
new file mode 100644
index 000000000000..30a96028fbd6
--- /dev/null
+++ b/sys-block/eject/files/eject-2.1.5-toggle.patch
@@ -0,0 +1,27 @@
+idea take from opensuse
+http://bugs.gentoo.org/261880
+
+--- a/eject.c
++++ b/eject.c
+@@ -576,6 +576,21 @@ static void ToggleTray(int fd)
+
+ #ifdef CDROMCLOSETRAY
+
++ /* Ask the CDROM for info, otherwise fall back to manual */
++ switch (ioctl(fd, CDROM_DRIVE_STATUS)) {
++ case CDS_TRAY_OPEN:
++ CloseTray(fd);
++ return;
++
++ case CDS_NO_DISC:
++ case CDS_DISC_OK:
++ if (ioctl(fd, CDROMEJECT, 0) < 0) {
++ perror("ioctl");
++ exit(1);
++ }
++ return;
++ }
++
+ /* Try to open the CDROM tray and measure the time therefor
+ * needed. In my experience the function needs less than 0.05
+ * seconds if the tray was already open, and at least 1.5 seconds
diff --git a/sys-block/eject/metadata.xml b/sys-block/eject/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/sys-block/eject/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>