diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-block/eject | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-block/eject')
-rw-r--r-- | sys-block/eject/Manifest | 1 | ||||
-rw-r--r-- | sys-block/eject/eject-2.1.5-r2.ebuild | 41 | ||||
-rw-r--r-- | sys-block/eject/files/eject-2.0.13-xmalloc.patch | 28 | ||||
-rw-r--r-- | sys-block/eject/files/eject-2.1.4-scsi-rdwr.patch | 21 | ||||
-rw-r--r-- | sys-block/eject/files/eject-2.1.5-handle-spaces.patch | 57 | ||||
-rw-r--r-- | sys-block/eject/files/eject-2.1.5-man-typo.patch | 18 | ||||
-rw-r--r-- | sys-block/eject/files/eject-2.1.5-toggle.patch | 27 | ||||
-rw-r--r-- | sys-block/eject/metadata.xml | 5 |
8 files changed, 198 insertions, 0 deletions
diff --git a/sys-block/eject/Manifest b/sys-block/eject/Manifest new file mode 100644 index 00000000000..7b51df3e576 --- /dev/null +++ b/sys-block/eject/Manifest @@ -0,0 +1 @@ +DIST eject-2.1.5.tar.gz 123585 RMD160 6e2f161e1399f9f01f376e56593d6ca586c4c8ea SHA1 17986aa4732f1c33ecae15db32d1e379bbbd99f8 SHA256 ef9f7906484cfde4ba223b2682a37058f9a3c7d3bb1adda7a34a67402e2ffe55 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 00000000000..41f9f09d7ea --- /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 +# $Id$ + +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 00000000000..f609da19d05 --- /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 00000000000..cd5e497b9d9 --- /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 00000000000..692368fa50b --- /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 00000000000..2fecb745ce0 --- /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 00000000000..30a96028fbd --- /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 00000000000..96a2d586367 --- /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> |