diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-03-14 12:24:34 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-03-14 12:24:34 +0000 |
commit | 792063a7ae92a9aa6e2f0f8aa35e59b3781d2c47 (patch) | |
tree | ab5edbd245bd3c5e3c6d7feba2b5f22d0c1b1785 /sys-apps/eject | |
parent | Xfce 4.6 uses xfce-base/xfce4-settings, add it as alternative to RDEPEND. (diff) | |
download | gentoo-2-792063a7ae92a9aa6e2f0f8aa35e59b3781d2c47.tar.gz gentoo-2-792063a7ae92a9aa6e2f0f8aa35e59b3781d2c47.tar.bz2 gentoo-2-792063a7ae92a9aa6e2f0f8aa35e59b3781d2c47.zip |
Cleanup and apply fix from opensuse #261880 by Peter Tworek.
(Portage version: 2.2_rc25/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/eject')
-rw-r--r-- | sys-apps/eject/ChangeLog | 10 | ||||
-rw-r--r-- | sys-apps/eject/eject-2.1.5-r2.ebuild | 40 | ||||
-rw-r--r-- | sys-apps/eject/files/eject-2.1.5-toggle.patch | 27 |
3 files changed, 75 insertions, 2 deletions
diff --git a/sys-apps/eject/ChangeLog b/sys-apps/eject/ChangeLog index a2792750c7e0..526c35039a07 100644 --- a/sys-apps/eject/ChangeLog +++ b/sys-apps/eject/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-apps/eject -# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/eject/ChangeLog,v 1.72 2007/05/25 22:04:59 kloeri Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/eject/ChangeLog,v 1.73 2009/03/14 12:24:33 vapier Exp $ + +*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. diff --git a/sys-apps/eject/eject-2.1.5-r2.ebuild b/sys-apps/eject/eject-2.1.5-r2.ebuild new file mode 100644 index 000000000000..f635065ba8eb --- /dev/null +++ b/sys-apps/eject/eject-2.1.5-r2.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/eject/eject-2.1.5-r2.ebuild,v 1.1 2009/03/14 12:24:33 vapier Exp $ + +inherit eutils + +DESCRIPTION="A command to eject a disc from the CD-ROM drive" +HOMEPAGE="http://eject.sourceforge.net/ http://ca.geocities.com/jefftranter@rogers.com/eject.html" +SRC_URI="http://www.ibiblio.org/pub/Linux/utils/disk-management/${P}.tar.gz + http://www.pobox.com/~tranter/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="nls" + +DEPEND="!virtual/eject" +PROVIDE="virtual/eject" + +S=${WORKDIR}/${PN} + +src_unpack() { + unpack ${A} + cd "${S}" + 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_compile() { + econf $(use_enable nls) || die + emake || die +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" + dodoc ChangeLog README PORTING TODO AUTHORS NEWS PROBLEMS +} diff --git a/sys-apps/eject/files/eject-2.1.5-toggle.patch b/sys-apps/eject/files/eject-2.1.5-toggle.patch new file mode 100644 index 000000000000..30a96028fbd6 --- /dev/null +++ b/sys-apps/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 |