Updated to the latest upstream version.
authorChris Gianelloni <wolf31o2@gentoo.org>
Thu, 17 Nov 2005 20:26:00 +0000 (20:26 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Thu, 17 Nov 2005 20:26:00 +0000 (20:26 +0000)
Package-Manager: portage-2.0.53_rc7

sys-apps/hwsetup/ChangeLog
sys-apps/hwsetup/Manifest
sys-apps/hwsetup/files/digest-hwsetup-1.1 [new file with mode: 0644]
sys-apps/hwsetup/files/hwsetup-1.1-dyn_blacklist.patch [new file with mode: 0644]
sys-apps/hwsetup/files/hwsetup-1.1-fastprobe.patch [new file with mode: 0644]
sys-apps/hwsetup/files/hwsetup-1.1-gentoo.patch [new file with mode: 0644]
sys-apps/hwsetup/hwsetup-1.1.ebuild [new file with mode: 0644]

index b52c059dad3164b0218e46375bc8eb0757160d81..66c8f3b3e9c6df94ecc393f5a8511c0a1a2cbd3a 100644 (file)
@@ -1,6 +1,14 @@
 # ChangeLog for sys-apps/hwsetup
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/hwsetup/ChangeLog,v 1.25 2005/09/12 14:28:02 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hwsetup/ChangeLog,v 1.26 2005/11/17 20:26:00 wolf31o2 Exp $
+
+*hwsetup-1.1 (17 Nov 2005)
+
+  17 Nov 2005; Chris Gianelloni <wolf31o2@gentoo.org>
+  +files/hwsetup-1.1-dyn_blacklist.patch,
+  +files/hwsetup-1.1-fastprobe.patch, +files/hwsetup-1.1-gentoo.patch,
+  +hwsetup-1.1.ebuild:
+  Updated to the latest upstream version.
 
   12 Sep 2005; Chris Gianelloni <wolf31o2@gentoo.org> hwsetup-1.0-r3.ebuild:
   Explicitly added items to RDEPEND, rather than having RDEPEND=DEPEND.
index 8668b05d7143e6a387430281f8de3c1b2060e3e0..2bf0d53594d6433cba69a3a19519a35533baeb3e 100644 (file)
@@ -1,8 +1,13 @@
-MD5 ec5847892757d50ea68b083d7c72630a hwsetup-1.0-r3.ebuild 1023
-MD5 c87bd931fd7f569e20a88f3235851097 ChangeLog 3507
-MD5 d86e5b5e47260e5a965eae2afe6d6d40 metadata.xml 159
+MD5 44ead7d4a079fe656efe02e74d43e951 ChangeLog 3768
 MD5 70141575b96009e82605b4f86fbe8758 files/digest-hwsetup-1.0-r3 64
-MD5 7f857bf4e30d36be2ac0f59e316dfa66 files/hwsetup-1.0-fastprobe.patch 3715
-MD5 1112a5e573dbca81b1cdc54e7901510a files/hwsetup-1.0-dyn_blacklist.patch 1870
+MD5 bc002ab4509c7c318c438f86d6005c71 files/digest-hwsetup-1.1 63
 MD5 eff6f85f9378f9f180386a7c34deb4c3 files/hwsetup-1.0-alsa.patch 3831
+MD5 1112a5e573dbca81b1cdc54e7901510a files/hwsetup-1.0-dyn_blacklist.patch 1870
+MD5 7f857bf4e30d36be2ac0f59e316dfa66 files/hwsetup-1.0-fastprobe.patch 3715
 MD5 5899ca3d018df09b6e2851f3e8c2e294 files/hwsetup-1.0-gentoo.patch 3599
+MD5 331c5c1b01eaee2c066608e8dd1faf71 files/hwsetup-1.1-dyn_blacklist.patch 1949
+MD5 a01ba41c868d97350621a124fece8d25 files/hwsetup-1.1-fastprobe.patch 2802
+MD5 bb521633bf17c370c41a83edbcab2711 files/hwsetup-1.1-gentoo.patch 3805
+MD5 ec5847892757d50ea68b083d7c72630a hwsetup-1.0-r3.ebuild 1023
+MD5 0391d793650e16132b9be46177bd44a5 hwsetup-1.1.ebuild 1062
+MD5 d86e5b5e47260e5a965eae2afe6d6d40 metadata.xml 159
diff --git a/sys-apps/hwsetup/files/digest-hwsetup-1.1 b/sys-apps/hwsetup/files/digest-hwsetup-1.1
new file mode 100644 (file)
index 0000000..059534c
--- /dev/null
@@ -0,0 +1 @@
+MD5 da9be279ef57f697436fe37fbaa93976 hwsetup_1.1-1.tar.gz 9062
diff --git a/sys-apps/hwsetup/files/hwsetup-1.1-dyn_blacklist.patch b/sys-apps/hwsetup/files/hwsetup-1.1-dyn_blacklist.patch
new file mode 100644 (file)
index 0000000..e97c091
--- /dev/null
@@ -0,0 +1,61 @@
+diff -urN hwsetup-1.1.orig/hwsetup.c hwsetup-1.1/hwsetup.c
+--- hwsetup-1.1.orig/hwsetup.c 2005-05-28 18:11:51.000000000 -0400
++++ hwsetup-1.1/hwsetup.c      2005-11-17 14:08:03.000000000 -0500
+@@ -43,12 +43,38 @@
+ /* Do not, under any circumstances, load these modules automatically, */
+ /* even if in pcitable. (libkudzu may ignore this, and the KNOPPIX    */
+ /* autoconfig scripts may probe them, too)  */
+-const char *blacklist[] =
++char blacklist[200][1024] =
+ { "apm","agpgart","yenta_socket","i82092","i82365","tcic",
+   "pcmcia_core","ds","ohci1394","hisax",
+   /* Winmodems, unusable, can block sound slot */
+   "snd-atiixp-modem", "snd-intel8x0m","snd-via82xx-modem"
+ };
++
++int blacklistsize = 13;
++void gen_blacklist(){
++              int n = 13;
++              int size = 0;
++              char *comment;
++              char module[1024];
++              FILE *stream;
++
++              if((stream = fopen ("/etc/hotplug/blacklist", "r")) != (FILE *)0) {
++                              while((fgets(module, 1023, stream)) != (char *)0 ) {
++
++                                              comment = strchr(module, '#');
++                                              if (comment != 0) *comment = '\0';
++                                              comment = strchr(module, '\n');
++                                              if (comment != 0) *comment = '\0';
++                                              size = strlen(module);
++                                              if (size < 2) continue;
++                                              strcat (module , " \0");
++                                              strcpy(blacklist[n] , module);
++                                              n++;
++                                              //printf(module);
++                              }
++                              blacklistsize = n;
++              }
++}
+ #endif
+ 
+ /* If a conflicting module in a row is already loaded, the new module will not be probed anymore */
+@@ -412,7 +438,7 @@
+  pid_t mpid;
+  if((m==NULL)||(!strcmp("unknown",m))||(!strcmp("ignore",m))) return 0;
+ #ifdef BLACKLIST
+- for(i=0;i<(sizeof(blacklist)/sizeof(char*));i++)
++ for(i=0;i < blacklistsize;i++)
+   {
+    if(!strcmp(blacklist[i],m))
+     {
+@@ -638,5 +664,8 @@
+  /* Allow SIGTERM, SIGINT: rmmod depends on this. */
+  signal(SIGTERM,SIG_DFL); signal(SIGINT,SIG_DFL);
+  signal(SIGALRM,alarm_handler); alarm(MAX_TIME);
++#ifdef BLACKLIST
++ gen_blacklist();
++#endif
+  return hw_setup(dc,verbose,probeonly,skip);
+ }
diff --git a/sys-apps/hwsetup/files/hwsetup-1.1-fastprobe.patch b/sys-apps/hwsetup/files/hwsetup-1.1-fastprobe.patch
new file mode 100644 (file)
index 0000000..a19589a
--- /dev/null
@@ -0,0 +1,75 @@
+diff -urN hwsetup-1.1.dyn_blacklist/hwsetup.c hwsetup-1.1/hwsetup.c
+--- hwsetup-1.1.dyn_blacklist/hwsetup.c        2005-11-17 14:20:14.000000000 -0500
++++ hwsetup-1.1/hwsetup.c      2005-11-17 14:24:54.000000000 -0500
+@@ -140,14 +140,15 @@
+ 
+ int syntax(char *option)
+ {
+- printf(VERSION);
++ puts(VERSION);
+  if(option) fprintf(stderr,"hwsetup: Unknown option '%s'\n\n",option);
+- printf("Usage: hwsetup\n"
+-         "               -v       be verbose\n"
+-         "               -p       print rotating prompt\n"
+-         "               -a       ignore audio devices\n"
+-         "               -s       ignore scsi controllers\n"
+-         "               -n       probe only, don't configure anything.\n");
++ puts("Usage: hwsetup\n"
++         "\t\t-v\tbe verbose\n"
++         "\t\t-p\tprint rotating prompt\n"
++         "\t\t-a\tignore audio devices\n"
++         "\t\t-s\tignore scsi controllers\n"
++         "\t\t-n\tprobe only, don't configure anything.\n"
++               "\t\t-f\trun a fast probe.");
+  return option?1:0;
+ }
+ 
+@@ -425,7 +426,7 @@
+ {
+  signal(SIGALRM,SIG_IGN);
+  fprintf(stderr,"\nWARNING: Autodetection seems to hang,\n"
+-                "please check your computers BIOS settings.\n");
++                "please check your computer's BIOS settings.\n");
+  fflush(stderr);
+  if(wpid) { kill(wpid,SIGTERM); usleep(2500000); kill(wpid,SIGKILL); wpid=0; }
+  exit(1); /* exit program */
+@@ -591,12 +592,13 @@
+  return 0;
+ }
+ 
+-int hw_setup(enum deviceClass dc, int verbose, int probeonly, int skip)
++int hw_setup(enum deviceClass dc, int verbose, int probeonly, int skip, int fastprobe)
+ {
+  int i,mouse=0,cdrom=0,modem=0,scanner=0;
++ int probeopt=fastprobe?PROBE_SAFE:PROBE_ALL;
+  struct device **currentDevs, *d, *serialmouse=NULL, *usbmouse=NULL;
+  if(verbose&VERBOSE_PROMPT) wpid=startwheel();
+- if((currentDevs=probeDevices(dc,BUS_UNSPEC,PROBE_ALL))==NULL) return -1;
++ if((currentDevs=probeDevices(dc,BUS_UNSPEC,probeopt))==NULL) return -1;
+  if(verbose&VERBOSE_PROMPT&&wpid>0) { kill(wpid,SIGTERM); wpid=0; usleep(160000); write(2,"\033[0m Done.\n",11); }
+  for(i=0;(d=currentDevs[i]);i++)
+   {
+@@ -650,7 +652,7 @@
+ 
+ int main(int argc, char **argv)
+ {
+- int i, verbose=0, probeonly=0, skip=0;
++ int i, verbose=0, probeonly=0, skip=0, fast=0;
+  enum deviceClass dc=CLASS_UNSPEC;
+  for(i=1;i<argc;i++)
+   {
+@@ -659,6 +661,7 @@
+    else if(!strcasecmp(argv[i],"-a")) skip|=SKIP_AUDIO;
+    else if(!strcasecmp(argv[i],"-s")) skip|=SKIP_SCSI;
+    else if(!strcasecmp(argv[i],"-n")) probeonly=1;
++   else if(!strcasecmp(argv[i],"-f")) fast=1;
+    else return syntax(argv[i]);
+   }
+  /* Allow SIGTERM, SIGINT: rmmod depends on this. */
+@@ -667,5 +670,5 @@
+ #ifdef BLACKLIST
+  gen_blacklist();
+ #endif
+- return hw_setup(dc,verbose,probeonly,skip);
++ return hw_setup(dc,verbose,probeonly,skip,fast);
+ }
diff --git a/sys-apps/hwsetup/files/hwsetup-1.1-gentoo.patch b/sys-apps/hwsetup/files/hwsetup-1.1-gentoo.patch
new file mode 100644 (file)
index 0000000..2654c25
--- /dev/null
@@ -0,0 +1,108 @@
+diff -urN hwsetup-1.1.fastprobe/hwsetup.c hwsetup-1.1/hwsetup.c
+--- hwsetup-1.1.fastprobe/hwsetup.c    2005-11-17 14:27:27.000000000 -0500
++++ hwsetup-1.1/hwsetup.c      2005-11-17 14:35:02.000000000 -0500
+@@ -23,11 +23,12 @@
+ #endif
+ 
+ #define VERSION "HWSETUP 1.1, an automatic hardware configuration tool\n" \
+-                "(C) 2005 Klaus Knopper <knoppix@knopper.net>\n\n"
++                "(C) 2005 Klaus Knopper <knoppix@knopper.net>\n" \
++                              "Modified for Gentoo Linux\n\n"
+ 
+ #define CARDSDB "/usr/share/hwdata/Cards"
+-#define XPATH "/usr/X11R6/bin/"
+-#define XMODPATH "/usr/X11R6/lib/modules/drivers/"
++#define XPATH "/usr/bin/"
++#define XMODPATH "/usr/lib/modules/drivers/"
+ 
+ #define VERBOSE_PRINT 1
+ #define VERBOSE_PROMPT 2
+@@ -193,7 +194,7 @@
+ 
+ struct xinfo *getxinfo(struct device *d)
+ {
+- const char *xfree4="XFree86", *xvesa4="vesa";
++ const char *xorg="X", *xvesa="vesa";
+  const char *xpath=XPATH;
+  static struct xinfo xi;
+  int rescanned=0;
+@@ -203,10 +204,10 @@
+   {
+    const char *driver[]={"3DLabs",   "Mach64", "Mach32",    "Mach8",     "AGX",
+                    "P9000", "S3 ViRGE",    "S3V",       "S3",     "W32",
+-                   "8514",     "I128",   "SVGA", xfree4, NULL};
++                   "8514",     "I128",   "SVGA", xorg, NULL};
+    const char *server[]={driver[0], driver[1], driver[2], driver[3], driver[4],
+                    driver[5], "S3V",     driver[7], driver[8], driver[9],
+-                   driver[10], driver[11],  driver[12], xfree4, NULL};
++                   driver[10], driver[11],  driver[12], xorg, NULL};
+    if(!strncasecmp(d->driver,"Card:",5)) /* RedHat Cards-DB */
+     { /* Kudzu "Cards" format */
+      FILE *cardsdb;
+@@ -279,9 +280,9 @@
+          if(*xfree3server&&!*xi.xmodule)
+            strncpy(xi.xserver,xfree3server,sizeof(xi.xserver));
+          else
+-           strncpy(xi.xserver,xfree4,sizeof(xi.xserver));
++           strncpy(xi.xserver,xorg,sizeof(xi.xserver));
+         }
+-       if(!*xi.xmodule) strcpy(xi.xmodule,xvesa4);
++       if(!*xi.xmodule) strcpy(xi.xmodule,xvesa);
+        return &xi;
+       }
+     }
+@@ -292,14 +293,14 @@
+      if(strstr(d->driver,driver[i]))
+       {
+        char *xpos;
+-       if((xpos=strstr(d->driver,xfree4))!=NULL) /* Check for XFree 4 */
++       if((xpos=strstr(d->driver,xorg))!=NULL)
+         {
+          char xm[32]="";
+-         strcpy(xi.xserver,xfree4);
+-         if(sscanf(xpos,"XFree86(%30[^)])",xm)==1)
++         strcpy(xi.xserver,xorg);
++         if(sscanf(xpos,"X(%30[^)])",xm)==1)
+           strcpy(xi.xmodule,xm);
+          else
+-          strcpy(xi.xmodule,xvesa4);
++          strcpy(xi.xmodule,xvesa);
+         }
+        else
+         {
+@@ -330,22 +331,22 @@
+    if(strstr(d->desc,"Trident")||strstr(d->desc,"TGUI")
+           ||strstr(d->desc,"Cirrus")||strstr(d->desc,"clgd"))
+     {
+-     if(!strcmp(xi.xserver,xfree4))
++     if(!strcmp(xi.xserver,xorg))
+       strncpy(xi.xopts,"-depth 16",sizeof(xi.xopts)-1);
+      else
+       strncpy(xi.xopts,"-bpp 16",sizeof(xi.xopts)-1);
+     }
+    else if(strstr(d->desc,"Savage 4")) /* S3 Inc.|Savage 4 */
+     {
+-     if(!strcmp(xi.xserver,xfree4))
++     if(!strcmp(xi.xserver,xorg))
+       strncpy(xi.xopts,"-depth 32",sizeof(xi.xopts)-1);
+      else
+       strncpy(xi.xopts,"-bpp 32",sizeof(xi.xopts)-1);
+     }
+   }
+  /* Fallback values */
+- if(!*xi.xserver) strcpy(xi.xserver,xfree4);
+- if(!*xi.xmodule) strcpy(xi.xmodule,xvesa4);
++ if(!*xi.xserver) strcpy(xi.xserver,xorg);
++ if(!*xi.xmodule) strcpy(xi.xmodule,xvesa);
+  return &xi;
+ }
+ 
+@@ -517,7 +518,7 @@
+ int writeconfig(char *name,struct device *d,int verbose)
+ {
+  FILE *f,*k;
+- const char *kconfig="/etc/sysconfig/knoppix";
++ const char *kconfig="/etc/sysconfig/gentoo";
+  unlink(name);
+  if((f=fopen(name,"w"))==NULL)
+   { /* Read-only filesystem on /etc ?! */
diff --git a/sys-apps/hwsetup/hwsetup-1.1.ebuild b/sys-apps/hwsetup/hwsetup-1.1.ebuild
new file mode 100644 (file)
index 0000000..649fc0a
--- /dev/null
@@ -0,0 +1,42 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hwsetup/hwsetup-1.1.ebuild,v 1.1 2005/11/17 20:26:00 wolf31o2 Exp $
+
+inherit eutils
+
+MY_PV=${PV}-1
+DESCRIPTION="Hardware setup program"
+HOMEPAGE="http://www.knopper.net/"
+SRC_URI="http://debian-knoppix.alioth.debian.org/sources/${PN}_${MY_PV}.tar.gz"
+#http://developer.linuxtag.net/knoppix/sources/${PN}_${MY_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 -mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE=""
+
+DEPEND="|| (
+       sys-libs/libkudzu
+       sys-libs/libkudzu-knoppix
+       sys-apps/kudzu-knoppix
+       sys-apps/kudzu )"
+RDEPEND="|| (
+       sys-libs/libkudzu
+       sys-libs/libkudzu-knoppix
+       sys-apps/kudzu-knoppix
+       sys-apps/kudzu )"
+
+src_unpack() {
+       unpack ${A}
+       epatch ${FILESDIR}/${P}-dyn_blacklist.patch
+       epatch ${FILESDIR}/${P}-fastprobe.patch
+       epatch ${FILESDIR}/${P}-gentoo.patch
+}
+
+src_compile() {
+       emake  || die
+}
+
+src_install() {
+       einstall DESTDIR=${D} PREFIX=/usr MANDIR=/usr/share/man || die "Install failed"
+}