diff options
author | Seemant Kulleen <seemant@gentoo.org> | 2002-03-21 04:46:35 +0000 |
---|---|---|
committer | Seemant Kulleen <seemant@gentoo.org> | 2002-03-21 04:46:35 +0000 |
commit | 18f66cbf156cb76b623df11a89c88b56d7f726d5 (patch) | |
tree | 5fea7ebdcb4f6eb1a5c33b81ae2c78b4a89c156f /sys-apps/sh-utils | |
parent | Removed gnome and kde from dependency list, because they are not required in ... (diff) | |
download | gentoo-2-18f66cbf156cb76b623df11a89c88b56d7f726d5.tar.gz gentoo-2-18f66cbf156cb76b623df11a89c88b56d7f726d5.tar.bz2 gentoo-2-18f66cbf156cb76b623df11a89c88b56d7f726d5.zip |
New uname patch from LKML and rant-patch combined.
Diffstat (limited to 'sys-apps/sh-utils')
-rw-r--r-- | sys-apps/sh-utils/ChangeLog | 10 | ||||
-rw-r--r-- | sys-apps/sh-utils/files/digest-sh-utils-2.0.11-r4 | 1 | ||||
-rw-r--r-- | sys-apps/sh-utils/files/sh-utils-2.0.11-gentoo.diff | 65 | ||||
-rw-r--r-- | sys-apps/sh-utils/sh-utils-2.0.11-r4.ebuild | 65 |
4 files changed, 138 insertions, 3 deletions
diff --git a/sys-apps/sh-utils/ChangeLog b/sys-apps/sh-utils/ChangeLog index 759503d7c751..600073e8baea 100644 --- a/sys-apps/sh-utils/ChangeLog +++ b/sys-apps/sh-utils/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-apps/sh-utils # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL -# $Header: /var/cvsroot/gentoo-x86/sys-apps/sh-utils/ChangeLog,v 1.3 2002/03/18 13:53:41 seemant Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/sh-utils/ChangeLog,v 1.4 2002/03/21 04:46:34 seemant Exp $ + +*sh-utils-2.0.11-r4 (20 Mar 2002) + + 20 Mar 2002; Seemant Kulleen <seemant@gentoo.org> sh-utils-2.0.11-r4.ebuild : + + Found an updated patch for processor name in uname output from digiwano in + #fluxbox and LKML. New patch in ${FILESDIR} combines this and the rant-patch. + Now this should compile cleanly with "-* build" as well as normally. *sh-utils-2.0.11-r3 (18 Mar 2002) diff --git a/sys-apps/sh-utils/files/digest-sh-utils-2.0.11-r4 b/sys-apps/sh-utils/files/digest-sh-utils-2.0.11-r4 new file mode 100644 index 000000000000..71cf6fbdf3b6 --- /dev/null +++ b/sys-apps/sh-utils/files/digest-sh-utils-2.0.11-r4 @@ -0,0 +1 @@ +MD5 78ba650ef854d0b8f2bfcf12997295c2 sh-utils-2.0.11.tar.gz 1667803 diff --git a/sys-apps/sh-utils/files/sh-utils-2.0.11-gentoo.diff b/sys-apps/sh-utils/files/sh-utils-2.0.11-gentoo.diff index 6d7d5fa13af5..4641d4ba5917 100644 --- a/sys-apps/sh-utils/files/sh-utils-2.0.11-gentoo.diff +++ b/sys-apps/sh-utils/files/sh-utils-2.0.11-gentoo.diff @@ -1,5 +1,6 @@ ---- sh-utils.texi Mon Mar 18 04:50:39 2002 -+++ sh-utils.texi.new Mon Mar 18 04:56:40 2002 +diff -ur ./doc/sh-utils.texi ./doc/sh-utils.texi.new +--- ./doc/sh-utils.texi Wed Oct 18 13:42:43 2000 ++++ ./doc/sh-utils.texi.new Wed Mar 20 20:15:13 2002 @@ -47,7 +47,6 @@ * seq: (sh-utils)seq invocation. Print numeric sequences * sleep: (sh-utils)sleep invocation. Delay for a specified time. @@ -52,3 +53,63 @@ @node Delaying @chapter Delaying +diff -ur ./src/uname.c ./src/uname.c,new +--- ./src/uname.c Sat May 6 07:17:53 2000 ++++ ./src/uname.c.new Wed Mar 20 20:15:43 2002 +@@ -48,6 +48,7 @@ + #define AUTHORS "David MacKenzie" + + static void print_element PARAMS ((unsigned int mask, char *element)); ++void __sysinfo_processor_type(char*); + + /* Values that are bitwise or'd into `toprint'. */ + /* Operating system name. */ +@@ -118,7 +119,7 @@ + { + struct utsname name; + int c; +- char processor[256]; ++ char processor[BUFSIZ]; + + program_name = argv[0]; + setlocale (LC_ALL, ""); +@@ -183,12 +184,7 @@ + if (uname (&name) == -1) + error (1, errno, _("cannot get system name")); + +-#if defined (HAVE_SYSINFO) && defined (SI_ARCHITECTURE) +- if (sysinfo (SI_ARCHITECTURE, processor, sizeof (processor)) == -1) +- error (1, errno, _("cannot get processor type")); +-#else +- strcpy (processor, "unknown"); +-#endif ++ __sysinfo_processor_type(processor); + + print_element (PRINT_SYSNAME, name.sysname); + print_element (PRINT_NODENAME, name.nodename); +@@ -213,3 +209,25 @@ + printf ("%s%c", element, toprint ? ' ' : '\n'); + } + } ++ ++ ++/* Carlos E. Gorges ++return vendor_id from proc cpuinfo ++*/ ++ ++void ++__sysinfo_processor_type (char* proc_info) { ++ FILE *ffd; ++ char temp_string[BUFSIZ],final_string[BUFSIZ]="unknown"; ++ ++ if ((ffd=fopen("/proc/cpuinfo", "r") )!=NULL) { ++ while ( fscanf(ffd, "%s :", temp_string) != EOF) ++ if (!(strcmp(temp_string, "vendor_id"))) { ++ fscanf(ffd, "%s", final_string); ++ break; ++ } ++ fclose(ffd); ++ } ++ strncpy(proc_info,final_string,BUFSIZ); ++} ++ diff --git a/sys-apps/sh-utils/sh-utils-2.0.11-r4.ebuild b/sys-apps/sh-utils/sh-utils-2.0.11-r4.ebuild new file mode 100644 index 000000000000..f906068168d6 --- /dev/null +++ b/sys-apps/sh-utils/sh-utils-2.0.11-r4.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Maintainer: Daniel Robbins <drobbins@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/sys-apps/sh-utils/sh-utils-2.0.11-r4.ebuild,v 1.1 2002/03/21 04:46:35 seemant Exp $ + +S=${WORKDIR}/${P} +DESCRIPTION="Your standard GNU shell utilities" +SRC_URI="ftp://alpha.gnu.org/gnu/fetish/${P}.tar.gz" + +DEPEND="virtual/glibc nls? ( sys-devel/gettext )" + +RDEPEND="virtual/glibc" + +src_unpack() { + unpack ${P}.tar.gz + cd ${S} + + # + # patch to remove Stallman's su/wheel group rant and to add processor + # information in uname output + patch -p0 < ${FILESDIR}/${P}-gentoo.diff + rm doc/sh-utils.info +} + +src_compile() { + local myconf + use nls || myconf="--disable-nls" + CFLAGS="${CFLAGS}" ./configure --host=${CHOST} --build=${CHOST} \ + --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info \ + --without-included-regex ${myconf} || die + + if [ -z "`use static`" ] + then + emake || die + else + emake LDFLAGS=-static || die + fi +} + +src_install() { + make prefix=${D}/usr mandir=${D}/usr/share/man infodir=${D}/usr/share/info install || die + rm -rf ${D}/usr/lib + dodir /bin + cd ${D}/usr/bin + mv date echo false pwd stty su true uname sleep ${D}/bin + + if [ -z "`use build`" ] + then + # We must use hostname from net-base + rm ${D}/usr/bin/hostname + cd ${S} + dodoc AUTHORS COPYING ChangeLog ChangeLog.0 NEWS README THANKS TODO + else + rm -rf ${D}/usr/share + fi + #we use the /bin/su from the sys-apps/shadow package + rm ${D}/bin/su + rm ${D}/usr/share/man/man1/su.1.gz + #we use the /usr/bin/uptime from the sys-apps/procps package + rm ${D}/usr/bin/uptime + rm ${D}/usr/share/man/man1/uptime.1.gz +} + + + |