summaryrefslogtreecommitdiff
path: root/sys-apps/hwsetup
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/hwsetup')
-rw-r--r--sys-apps/hwsetup/Manifest10
-rw-r--r--sys-apps/hwsetup/files/1.2-3-fastprobe.patch74
-rw-r--r--sys-apps/hwsetup/files/1.2-7-dyn_blacklist.patch62
-rw-r--r--sys-apps/hwsetup/files/1.2-7-gentoo.patch20
-rw-r--r--sys-apps/hwsetup/files/1.2-7-openchrome.patch11
-rw-r--r--sys-apps/hwsetup/files/1.2-strip.patch11
-rw-r--r--sys-apps/hwsetup/hwsetup-1.2-r3.ebuild69
-rw-r--r--sys-apps/hwsetup/metadata.xml8
8 files changed, 265 insertions, 0 deletions
diff --git a/sys-apps/hwsetup/Manifest b/sys-apps/hwsetup/Manifest
new file mode 100644
index 000000000000..ae83cf2a87b4
--- /dev/null
+++ b/sys-apps/hwsetup/Manifest
@@ -0,0 +1,10 @@
+AUX 1.2-3-fastprobe.patch 2643 SHA256 c21f593fef9c1541ccc6889938686a3d20cbd9a2197debf3ce24412223d01258 SHA512 4a9d4e35f071849e7285f7cf9459d454e4878d1940525444863ac2c6104d999c5efffb62e01e792649697eddfbe8f4755dfc90cf4a4185d6637c989bd566ba82 WHIRLPOOL a9c1789861c54d6b7c1775eaf2b24c887bb7ff43c332e1947fa461d9321801d3b8060ba5c7c59e0f48dd6ba9a5af795ca6016b003232ca4409e9b13a90c6429d
+AUX 1.2-7-dyn_blacklist.patch 1840 SHA256 9b82f871fa67c6840d873fc3be4a1d3841f4ff899786ba7860b0a79c1e03d762 SHA512 e98d95a54987f12e6bc5a6171803490f0f8f14c82587909bd02375ef05ec0270e14b3d9442250948328e7062dfcb79e42e61240ed5a209bedd37b1a1e552f2b9 WHIRLPOOL 26dba9ada0a48944e6fd9dacf5a5333581fc3081743fa9253bef26b5c72cb8722c2efac8dfedece06ca4b576a44547e027aed4f143c7f28952079c49805be893
+AUX 1.2-7-gentoo.patch 560 SHA256 a521f3e4cffc3fd72db93add2599bdf6aa1e68ec06fff159a6cb78a4994cce36 SHA512 4fac3e716ddd511b9f533567a09f763f25bde439b772cbf8be3fffd6ef83ee60dc82b2655e63283c302955d3b8ee5d8aa06d99610cfd27a17412938b7cab1e0f WHIRLPOOL 2880bb255f7c1ccb9e5216000d97b822e509f6397f0a5c95d06894f1c4ef5feaee62f62c96ce1e44c87753a8737a49caa0f732a71437fd8e655fa6758251cb0a
+AUX 1.2-7-openchrome.patch 520 SHA256 f214c87787d88c4f50b10a54191b4715194c8e4cfb525a554838584e44346cf9 SHA512 f8a301d7e2d6508e5a25ba0099a808b1494cd992f2f6066912504b077a26c3fe01772e689a25f80acce59c5eff8369e2e1e33c06a7ea935e9a50d79f6fbfa25d WHIRLPOOL 22f42e20fede20e470d46b09c6914c83ae032375494dc462cd9ed367e124c78ec36343e609cf4edbe739b1bcce9724fcfa399a02febe2b7d7c88af2f282ea61a
+AUX 1.2-strip.patch 209 SHA256 2a193036174d383cc4aff646119c0a4b72c61b94ca5b49b2a366029f7bb712e0 SHA512 93033d62d6328dab7bef0f42f6f41352c60081523d86388cd5823181483cf9245dd55c163d1e78ab51e20187cdca4017c815ae86f6de14394fb6cd2724dda98b WHIRLPOOL 505032a29aa0e0ebac3d5bac118f8c526f2b3eec3dd50d4aca2fe6735154a9abf7c3c736c9d40e83b2f37c09fe7b0bbb3445206231448d048f10a2cc47ae74d9
+DIST hwsetup_1.2-7.tar.gz 10706 SHA256 aa72b37ce306b5191cabd31eb5f19ab2a5e635697a263c6735d10c7bf99f9589 SHA512 ef252c748ecf1fc17d107fa413a76df5d9daab84b10eb1ca2c5c320207e0be522c4ae6204c1c85c613403e40312c9c876bcab04eeaa1a2e1724b7bb1c6d41a1e WHIRLPOOL 083111b1aa8d3fd547b25fe16fcf10929ed65effbdf5d566a18d652ee339392c335d93d8605e9b52aa9403da9e9c6a2c209f6f317f8e25f218487f867e25184c
+EBUILD hwsetup-1.2-r3.ebuild 1729 SHA256 0f0f6533d0fb97a5c27aaafb14beefd306046f045d1b54724d8e3d24c129e4aa SHA512 74ad6856a2a2de06fe6e4feae26a404f46d703f82f433c1e95b27d9bb50ae39d8f610979de7116b8c33493feabd11e661e86b4a40df0ccf4c2bfaefdccecb49a WHIRLPOOL 29d10a6983e95bd38c171426562c153c8c124f54f03ab527a34731039d03a5f0c9764b6583a991d4a9dfaf3937afd38bd9ed3b6c9e69b8169df07b1a5db131db
+MISC ChangeLog 2579 SHA256 ee0e4da825398f21bf7034ed2c3c22920317632f95a49dbea3bca3043a23383e SHA512 e368391bf0b67bce16144b97252c614ef4938de730c646ca463a6a12fc2457015c83126d2b5eaf2607da9747239846d2c8fd6df7aa5d5c911f2ba6c5dc5b5d46 WHIRLPOOL dfbd46b81d3ccf3c13aab9d2cc862162372878ded8130bc8ff87c05bbb847ab7dea2ae9c1a688ca65a44111988647ef8c2afe6ddfd9cfd104945d52cc39faf12
+MISC ChangeLog-2015 11257 SHA256 eb4c1cfbb338bfd64ed40e7c76b0f57886fca966e7af5b964d7ecccc717cb34d SHA512 ba7bff21c8514c0543044ee28ec3a3cb507798304f7e17fd893d6232881bc96d0f21ef655254904be3e50482fd085917bd57cc25cb772652569ebd53582eda8c WHIRLPOOL 670f3680fec3e859bc18658bc5fd595e083cb61f81942697a521fd261e0610823567e9593d5978a8938dd8c40e327cf781105a39e9d427618e48aa1cbc7c2fb6
+MISC metadata.xml 251 SHA256 64aac5f4a42f3b20222048411f52dbf0c57134b8d5aecd25dee154d75d1c0b73 SHA512 2da7a6b2b1b7153b8803cc52201fa006313bf75a25f7d917f26eadd7a6426529e4b30a57c3c24cca20865d9dc4f3d56fdfa14b10254158bea2dfeb2c64fcc18c WHIRLPOOL 5fb64a7c924e2d96d98db3c80ebaa98d19bf644a2936b65d63c3642673cb259670411265eb7c2647697f09aae62d503ee21334e1f1c8aa68d85e6521cf83608f
diff --git a/sys-apps/hwsetup/files/1.2-3-fastprobe.patch b/sys-apps/hwsetup/files/1.2-3-fastprobe.patch
new file mode 100644
index 000000000000..600b8c4002d6
--- /dev/null
+++ b/sys-apps/hwsetup/files/1.2-3-fastprobe.patch
@@ -0,0 +1,74 @@
+--- a/hwsetup.c
++++ b/hwsetup.c
+@@ -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();
+- currentDevs=probeDevices(dc,BUS_UNSPEC,PROBE_ALL);
++ currentDevs=probeDevices(dc,BUS_UNSPEC,probeopt);
+ if(verbose&VERBOSE_PROMPT&&wpid>0) { kill(wpid,SIGTERM); wpid=0; usleep(160000); write(2,"\033[0m Done.\n",11); }
+ if(currentDevs==NULL) return -1;
+ check_proc_modules(); /* Get currently loaded module list */
+@@ -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/1.2-7-dyn_blacklist.patch b/sys-apps/hwsetup/files/1.2-7-dyn_blacklist.patch
new file mode 100644
index 000000000000..efbe0f6abfed
--- /dev/null
+++ b/sys-apps/hwsetup/files/1.2-7-dyn_blacklist.patch
@@ -0,0 +1,62 @@
+--- a/hwsetup.c
++++ b/hwsetup.c
+@@ -51,13 +51,40 @@
+ /* 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) */
+-char *blacklist[] =
++char *blacklist[200][200] =
+ { "apm","agpgart","yenta_socket","i82092","i82365","tcic",
+ "pcmcia_core","ds","ohci1394","hisax", "hisax_fcpcipnp",
+ "hisax_isac","hisax_st5481",
+ /* 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 ("/usr/share/hwdata/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++;
++ if ( n == 200 ) break;
++ //printf(module);
++ }
++ blacklistsize = n;
++ }
++}
+ #endif
+
+ /* If a conflicting module in a row is already loaded, the new module will not be probed anymore */
+@@ -547,7 +574,7 @@
+ char *cc;
+ if((m==NULL)||(!strcmp("unknown",m))||(!strcmp("ignore",m))|| check_loaded(m)) return 0;
+ #ifdef BLACKLIST
+- for(i=0;i<(sizeof(blacklist)/sizeof(char*));i++)
++ for(i=0;i<blacklistsize;i++)
+ {
+ if(!modcmp(blacklist[i],m))
+ {
+@@ -781,5 +808,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/1.2-7-gentoo.patch b/sys-apps/hwsetup/files/1.2-7-gentoo.patch
new file mode 100644
index 000000000000..e4fc590393fd
--- /dev/null
+++ b/sys-apps/hwsetup/files/1.2-7-gentoo.patch
@@ -0,0 +1,20 @@
+--- a/hwsetup.c
++++ b/hwsetup.c
+@@ -388,7 +388,7 @@
+ sprintf(fullpath,"%.90s%.32s",xpath,server[i]);
+ if(!exists(fullpath)) continue;
+ strncpy(xi.xserver,server[i],sizeof(xi.xserver));
+- }
++ }
+ }
+ }
+ if((xpos=strstr(d->driver,xorg))!=NULL) /* Check for Xorg */
+@@ -653,7 +653,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";
+ char *desc;
+ unlink(name);
+ if((f=fopen(name,"w"))==NULL)
diff --git a/sys-apps/hwsetup/files/1.2-7-openchrome.patch b/sys-apps/hwsetup/files/1.2-7-openchrome.patch
new file mode 100644
index 000000000000..fb80f9dfcb1a
--- /dev/null
+++ b/sys-apps/hwsetup/files/1.2-7-openchrome.patch
@@ -0,0 +1,11 @@
+--- a/hwsetup.c
++++ b/hwsetup.c
+@@ -456,7 +456,7 @@
+ else if(strcasestr(xi.xdesc,"Newport")) strcpy(xi.xmodule,"newport");
+ else if(strcasestr(xi.xdesc,"Siliconmotion")||strcasestr(xi.xdesc,"Silicon Motion")) strcpy(xi.xmodule,"siliconmotion");
+ else if(strcasestr(xi.xdesc,"Chips")) strcpy(xi.xmodule,"chips");
+- else if(strcasestr(xi.xdesc,"VIA ")) strcpy(xi.xmodule,"via");
++ else if(strcasestr(xi.xdesc,"VIA ")) strcpy(xi.xmodule,"openchrome");
+ }
+ else strcpy(xi.xmodule,xvesa4);
+ }
diff --git a/sys-apps/hwsetup/files/1.2-strip.patch b/sys-apps/hwsetup/files/1.2-strip.patch
new file mode 100644
index 000000000000..17de636a5dc7
--- /dev/null
+++ b/sys-apps/hwsetup/files/1.2-strip.patch
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -3,7 +3,7 @@
+ # define BLACKLIST to avoid loading potentially dangerous modules
+ CFLAGS=-DBLACKLIST -Wall -fPIC
+ OPT=-O2
+-LDFLAGS=-s
++#LDFLAGS=-s
+ LIBS=-lkudzu -lpci
+ CC=gcc
+
diff --git a/sys-apps/hwsetup/hwsetup-1.2-r3.ebuild b/sys-apps/hwsetup/hwsetup-1.2-r3.ebuild
new file mode 100644
index 000000000000..d027099ea1cb
--- /dev/null
+++ b/sys-apps/hwsetup/hwsetup-1.2-r3.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils toolchain-funcs flag-o-matic
+
+MY_PV=${PV}-7
+DESCRIPTION="Hardware setup program from Knoppix - used only on LiveCD"
+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 hppa ia64 -mips ppc ppc64 sparc x86"
+IUSE="zlib"
+
+COMMON_DEPEND="
+ sys-apps/pciutils[zlib?]
+ zlib? ( sys-libs/zlib )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ sys-libs/libkudzu
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ sys-apps/hwdata-gentoo
+"
+
+pkg_setup() {
+ ewarn "This package is designed for use on the LiveCD only and will do "
+ ewarn "unspeakably horrible and unexpected things on a normal system."
+ ewarn "YOU HAVE BEEN WARNED!!!"
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${MY_PV}-dyn_blacklist.patch \
+ "${FILESDIR}"/${PV}-3-fastprobe.patch \
+ "${FILESDIR}"/${MY_PV}-gentoo.patch \
+ "${FILESDIR}"/${PV}-strip.patch \
+ "${FILESDIR}"/${MY_PV}-openchrome.patch
+}
+
+src_configure() {
+ if use zlib ; then
+ sed -i \
+ -e '/^LIBS=/s,-lpci,-lz -lpci,g' \
+ Makefile
+ fi
+}
+
+src_compile() {
+ emake LDFLAGS="${LDFLAGS}" OPT="${CFLAGS}" CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX=/usr MANDIR=/usr/share/man
+ dosbin ${PN}
+ keepdir /etc/sysconfig
+}
+
+pkg_postinst() {
+ ewarn "This package is intended for use on the Gentoo release media. If"
+ ewarn "you are not building a CD, remove this package. It will not work"
+ ewarn "properly on a running system, as Gentoo does not use any of the"
+ ewarn "Knoppix-style detection except for CD builds."
+}
diff --git a/sys-apps/hwsetup/metadata.xml b/sys-apps/hwsetup/metadata.xml
new file mode 100644
index 000000000000..767266dca141
--- /dev/null
+++ b/sys-apps/hwsetup/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>livecd@gentoo.org</email>
+ <name>Gentoo LiveCD Project</name>
+</maintainer>
+</pkgmetadata>