From fe71ced734d5c3a3e19b8881e8ed34ca39b7a757 Mon Sep 17 00:00:00 2001 From: Tony Vroon Date: Sat, 16 Apr 2005 19:26:20 +0000 Subject: Version bump with experimental patch, package masked. (Portage version: 2.0.51.19) --- net-irc/xchat-xsys/ChangeLog | 9 +- net-irc/xchat-xsys/Manifest | 9 +- .../files/1.9.3-sysfs-instead-of-lspci.patch | 121 +++++++++++++++++++++ net-irc/xchat-xsys/files/digest-xchat-xsys-1.9.3 | 1 + net-irc/xchat-xsys/xchat-xsys-1.9.3.ebuild | 37 +++++++ 5 files changed, 173 insertions(+), 4 deletions(-) create mode 100644 net-irc/xchat-xsys/files/1.9.3-sysfs-instead-of-lspci.patch create mode 100644 net-irc/xchat-xsys/files/digest-xchat-xsys-1.9.3 create mode 100644 net-irc/xchat-xsys/xchat-xsys-1.9.3.ebuild (limited to 'net-irc') diff --git a/net-irc/xchat-xsys/ChangeLog b/net-irc/xchat-xsys/ChangeLog index 0740a23c92e3..d46757b5ec4b 100644 --- a/net-irc/xchat-xsys/ChangeLog +++ b/net-irc/xchat-xsys/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-irc/xchat-xsys # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-irc/xchat-xsys/ChangeLog,v 1.6 2005/01/16 13:05:01 chainsaw Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-irc/xchat-xsys/ChangeLog,v 1.7 2005/04/16 19:26:20 chainsaw Exp $ + +*xchat-xsys-1.9.3 (16 Apr 2005) + + 16 Apr 2005; Tony Vroon + +files/1.9.3-sysfs-instead-of-lspci.patch, +xchat-xsys-1.9.3.ebuild: + Version bump, with experimental patch to remove the lspci dependancy and use + sysfs tree walking instead. *xchat-xsys-1.9.1-r1 (16 Jan 2005) diff --git a/net-irc/xchat-xsys/Manifest b/net-irc/xchat-xsys/Manifest index 5be202516eef..b32ba0836e41 100644 --- a/net-irc/xchat-xsys/Manifest +++ b/net-irc/xchat-xsys/Manifest @@ -1,7 +1,10 @@ MD5 e47f69b8cff83add69e3bb2c54988367 xchat-xsys-1.9.1-r1.ebuild 854 -MD5 4102cd47e1c2df279bf2fe29cd1d5b89 xchat-xsys-1.9.1.ebuild 687 -MD5 ed54a8e426d9a3116497b8bc634c2118 ChangeLog 1212 MD5 42cef2da59c81f792584c3f9048a1930 metadata.xml 250 +MD5 ed54a8e426d9a3116497b8bc634c2118 ChangeLog 1212 +MD5 4102cd47e1c2df279bf2fe29cd1d5b89 xchat-xsys-1.9.1.ebuild 687 +MD5 ce93b52cfafdab5cb9168f52369991cc xchat-xsys-1.9.3.ebuild 865 MD5 f9d3eedf5907d949b6f52bfdbc580bd7 files/digest-xchat-xsys-1.9.1-r1 61 -MD5 f9d3eedf5907d949b6f52bfdbc580bd7 files/digest-xchat-xsys-1.9.1 61 MD5 b9c39b3537e8ee29aa9af6c33467223b files/1.9.1-bmp-support.patch 3230 +MD5 f9d3eedf5907d949b6f52bfdbc580bd7 files/digest-xchat-xsys-1.9.1 61 +MD5 c759ee949bd035895fb11f4608f9ac61 files/1.9.3-sysfs-instead-of-lspci.patch 3498 +MD5 6a0d14cce311c0075599544fd3a107c1 files/digest-xchat-xsys-1.9.3 62 diff --git a/net-irc/xchat-xsys/files/1.9.3-sysfs-instead-of-lspci.patch b/net-irc/xchat-xsys/files/1.9.3-sysfs-instead-of-lspci.patch new file mode 100644 index 000000000000..5b0f796735eb --- /dev/null +++ b/net-irc/xchat-xsys/files/1.9.3-sysfs-instead-of-lspci.patch @@ -0,0 +1,121 @@ +--- xsys2/parse.c.orig 2005-04-16 15:57:31.000000000 +0100 ++++ xsys2/parse.c 2005-04-16 20:10:09.000000000 +0100 +@@ -150,19 +150,85 @@ + + int xs_parse_video(char *vid_card) + { +- char *pos = NULL; +- FILE *pipe = popen(LSPCI" | grep VGA | cut -d\" \" -f5-", "r"); +- if(pipe == NULL) +- return 1; +- while(fgets(vid_card, 1024, pipe) != NULL) ++ char buffer[1024], pcibus[42], vendor[7], device[7], vendorname[128] = "", devicename[128] = "", *position; ++ int buscount = 0; ++ ++ while ( buscount <= 8 ) + { +- if((pos = strchr(vid_card, '\n')) != NULL) +- *pos = '\0'; ++ buscount++; ++ snprintf(pcibus, 42, "/sys/bus/pci/devices/0000:0%d:00.0/class", buscount); ++ FILE *fp = fopen(pcibus, "r"); ++ if(fp != NULL) { ++ if(fgets(buffer, 1024, fp) != NULL) ++ if(strncmp("0x03", buffer, 4) == 0) ++ break; ++ fclose(fp); ++ } ++ } ++ ++ if (buscount == 9) { ++ strncpy(vid_card,"No AGP card found",42); ++ return 1; + } +- if(pos == NULL) return 2; + +- pclose(pipe); ++ snprintf(pcibus, 42, "/sys/bus/pci/devices/0000:0%d:00.0/device", buscount); ++ FILE *fp = fopen(pcibus, "r"); ++ if(fp != NULL) { ++ if(fgets(buffer, 1024, fp) != NULL) ++ if(strstr(buffer, "0x") != NULL) { ++ position = strstr(buffer, "0x"); ++ position += 2; ++ strcpy(device, position); ++ position = strstr(device, "\n"); ++ *(position) = '\0'; ++ } ++ fclose(fp); ++ } ++ ++ snprintf(pcibus, 42, "/sys/bus/pci/devices/0000:0%d:00.0/vendor", buscount); ++ FILE *fp2 = fopen(pcibus, "r"); ++ if(fp2 != NULL) { ++ if(fgets(buffer, 1024, fp) != NULL) ++ if(strstr(buffer, "0x") != NULL) { ++ position = strstr(buffer, "0x"); ++ position += 2; ++ strcpy(vendor, position); ++ position = strstr(vendor, "\n"); ++ *(position) = '\0'; ++ } ++ fclose(fp2); ++ } ++ ++ FILE *fp3 = fopen("/usr/share/misc/pci.ids", "r"); ++ if(fp3 == NULL) { ++ snprintf(vid_card, 42, "Found AGP card %s:%s", vendor, device); ++ return 0; ++ } + ++ while(fgets(buffer, 1024, fp3) != NULL) ++ { ++ if (!isspace(buffer[0])) { ++ if(strstr(buffer, vendor) != NULL) ++ { ++ position = strstr(buffer, vendor); ++ position += 6; ++ strcpy(vendorname, position); ++ position = strstr(vendorname, "\n"); ++ *(position) = '\0'; ++ } ++ } else { ++ if(strstr(buffer, device) != NULL) ++ { ++ position = strstr(buffer, device); ++ position += 6; ++ strcpy(devicename, position); ++ position = strstr(devicename, "\n"); ++ *(position) = '\0'; ++ } ++ } ++ } ++ fclose(fp3); ++ snprintf(vid_card, 256, "%s %s", vendorname, devicename); + return 0; + } + +@@ -389,4 +455,3 @@ + } + return 0; + } +- +--- xsys2/Makefile.orig 2005-04-16 20:15:05.000000000 +0100 ++++ xsys2/Makefile 2005-04-16 20:15:42.000000000 +0100 +@@ -1,7 +1,3 @@ +-#### SET THIS VALUE TO THE LOCATION OF 'lspci' #### +-LSPCI = /sbin/lspci +- +- + #### SHOULD NOT NEED TO EDIT BELOW THIS LINE #### + VER_MAJOR = 1 + VER_MINOR = 9 +@@ -9,7 +5,7 @@ + CC = gcc + CFLAGS += -O2 -Wall -fPIC + CFLAGS += -DVER_MINOR=$(VER_MINOR) -DVER_MAJOR=$(VER_MAJOR) -DVER_PATCH=$(VER_PATCH) \ +- -DVER_STRING=\"$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)\" -DLSPCI=\"$(LSPCI)\" ++ -DVER_STRING=\"$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)\" + LDFLAGS = $(CFLAGS) -shared + LIBRARY = xsys-$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH).so + OBJECTS = xsys.o parse.o diff --git a/net-irc/xchat-xsys/files/digest-xchat-xsys-1.9.3 b/net-irc/xchat-xsys/files/digest-xchat-xsys-1.9.3 new file mode 100644 index 000000000000..717d41bf4a89 --- /dev/null +++ b/net-irc/xchat-xsys/files/digest-xchat-xsys-1.9.3 @@ -0,0 +1 @@ +MD5 7a284ae9aea5f951e8e89e1c846848fb xsys-1.9.3.tar.bz2 10578 diff --git a/net-irc/xchat-xsys/xchat-xsys-1.9.3.ebuild b/net-irc/xchat-xsys/xchat-xsys-1.9.3.ebuild new file mode 100644 index 000000000000..3903cf0bdf40 --- /dev/null +++ b/net-irc/xchat-xsys/xchat-xsys-1.9.3.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-irc/xchat-xsys/xchat-xsys-1.9.3.ebuild,v 1.1 2005/04/16 19:26:20 chainsaw Exp $ + +inherit eutils + +MY_P="${P/xchat-/}" +DESCRIPTION="Sysinfo plugin for X-Chat." +SRC_URI="http://mshoup.us/downloads/xsys/${MY_P}.tar.bz2" +HOMEPAGE="http://mshoup.us/downloads/xsys/README-${PV}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="bmp xmms" +S=${WORKDIR}/xsys2 + +DEPEND=">=net-irc/xchat-2.4.0 + bmp? (media-plugins/bmp-infopipe) + xmms? (media-plugins/xmms-infopipe)" + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/${PV}-sysfs-instead-of-lspci.patch +} + +src_compile() { + emake -j1 || die "Compile failed" +} + +src_install() { + exeinto /usr/$(get_libdir)/xchat/plugins + doexe xsys-${PV}.so + + dodoc ChangeLog README +} -- cgit v1.2.3-65-gdbad