summaryrefslogtreecommitdiff
path: root/testing/hpoj/hpoj-kernel26.patch
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-10-07 17:33:04 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-10-07 17:33:04 -0300
commit2302f1d28510fadb2dcfa119f28ed28f164845bf (patch)
treee7040e1c743f46bc60a7844275516e4404f6ac30 /testing/hpoj/hpoj-kernel26.patch
parent2a9d1292ab60e8a2356fb3eeb36b8c3cfc22759b (diff)
parent5442e9b8f357932ed5d6cb46e90fcbf6f453469f (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/fotoxx/PKGBUILD community/gtkdialog/PKGBUILD community/hubbub/PKGBUILD community/libgdamm/PKGBUILD community/libparserutils/PKGBUILD community/mingw32-binutils/PKGBUILD community/mingw32-gcc-base/PKGBUILD community/mingw32-gcc/PKGBUILD community/mtpaint/PKGBUILD community/netsurf/PKGBUILD community/patchage/PKGBUILD community/qgo/PKGBUILD community/tomoyo-tools/PKGBUILD community/tre/PKGBUILD community/virtualbox/PKGBUILD core/net-tools/PKGBUILD core/openldap/PKGBUILD extra/epiphany/PKGBUILD extra/evince/PKGBUILD extra/evolution-data-server/PKGBUILD extra/evolution/PKGBUILD extra/exiv2/PKGBUILD extra/folks/PKGBUILD extra/gimp-ufraw/PKGBUILD extra/gnome-control-center/PKGBUILD extra/gnome-power-manager/PKGBUILD extra/gnome-python-desktop/PKGBUILD extra/gnome-python-extras/PKGBUILD extra/gvfs/PKGBUILD extra/jack/PKGBUILD extra/kdelibs/PKGBUILD extra/kdepim/PKGBUILD extra/koffice/PKGBUILD extra/libreoffice/PKGBUILD extra/libwebkit/PKGBUILD extra/mutter/PKGBUILD extra/nautilus/PKGBUILD extra/openmpi/PKGBUILD extra/pavucontrol/PKGBUILD extra/php/PKGBUILD extra/pidgin/PKGBUILD extra/postgresql/PKGBUILD extra/pulseaudio/PKGBUILD extra/pygobject2/PKGBUILD extra/swt/PKGBUILD extra/tomcat/PKGBUILD extra/totem/PKGBUILD extra/vigra/PKGBUILD extra/vte/PKGBUILD extra/xulrunner/PKGBUILD kde-unstable/calligra/PKGBUILD kde-unstable/kdebase-workspace/PKGBUILD multilib/lib32-atk/PKGBUILD multilib/lib32-gdk-pixbuf2/PKGBUILD multilib/lib32-glew/PKGBUILD multilib/lib32-glib2/PKGBUILD multilib/lib32-jack/PKGBUILD multilib/lib32-libpulse/PKGBUILD multilib/lib32-pango/PKGBUILD multilib/wine/PKGBUILD social/miniupnpc/PKGBUILD testing/icedtea-web-java7/PKGBUILD testing/sqlite3/PKGBUILD ~xihh/abiword/PKGBUILD
Diffstat (limited to 'testing/hpoj/hpoj-kernel26.patch')
-rw-r--r--testing/hpoj/hpoj-kernel26.patch86
1 files changed, 86 insertions, 0 deletions
diff --git a/testing/hpoj/hpoj-kernel26.patch b/testing/hpoj/hpoj-kernel26.patch
new file mode 100644
index 000000000..38b8d0464
--- /dev/null
+++ b/testing/hpoj/hpoj-kernel26.patch
@@ -0,0 +1,86 @@
+--- hpoj-0.91/scripts/ptal-init.in.kernel26 2004-03-03 17:30:47.000000000 +0000
++++ hpoj-0.91/scripts/ptal-init.in 2004-03-03 17:30:59.000000000 +0000
+@@ -90,6 +90,11 @@
+ my $varLock="/var/lock";
+ my $varLockSubsys="$varLock/subsys";
+ my $osPlatform=`uname -s 2>/dev/null`;
++chomp $osPlatform;
++my $linuxVersion=($osPlatform eq 'Linux' ? `uname -r 2>/dev/null` : '');
++$linuxVersion=~s/^(\s*)(\d+\.\d+)(\..*)$/$2/;
++chomp $linuxVersion;
++my $usbprintermodule = ($linuxVersion eq '2.6' ? "usblp" : "printer");
+ my %devnames;
+ my %obsoleteDevnames;
+ my %configInfo;
+@@ -1222,12 +1227,12 @@
+ # undef -- skip USB probe
+ # 0 -- do nothing, proceed with USB probe
+ # >0 -- load printer.o
+-# <0 -- disable and unload printer.o
++# <0 -- disable and unload printer.o/usblp.o
+ sub linuxWhatShouldWeDoAboutUsbPrinterModule {
+ my $isSmp=&linuxIsSmp;
+ my $libusbSupported=&ptalMlcdSupportsLibusb;
+ my $usblpIsLoaded=&linuxUsblpIsLoaded;
+- my $printerIsLoaded=&linuxModuleIsLoaded("printer");
++ my $printerIsLoaded=&linuxModuleIsLoaded($usbprintermodule);
+
+ # non-SMP:
+ if (!$isSmp) {
+@@ -1261,9 +1266,10 @@
+ }
+ goto allowInsmodPrinter;
+
+- # SMP, libusb support, some sort of printer.c functionality loaded:
++ # SMP, libusb support, some sort of printer.c/usblp.c
++ # functionality loaded:
+ } elsif ($usblpIsLoaded) {
+- # printer.c compiled into the kernel:
++ # printer.c/usblp.c compiled into the kernel:
+ if (!$printerIsLoaded) {
+ if (!&askYN(
+ "\n".
+@@ -1280,7 +1286,7 @@
+ return undef;
+ }
+
+- # printer.c compiled and loaded as a module:
++ # printer.c/usblp.c compiled and loaded as a module:
+ } else {
+ promptDisableRmmodPrinter:
+ my $r=&askYN(
+@@ -1301,8 +1307,9 @@
+ }
+ }
+
+- # SMP, libusb support, printer.c enabled although not loaded:
+- } elsif (!&linuxModuleIsDisabled("printer")) {
++ # SMP, libusb support, printer.c/usblp.c enabled although not
++ # loaded:
++ } elsif (!&linuxModuleIsDisabled($usbprintermodule)) {
+ goto promptDisableRmmodPrinter;
+ }
+
+@@ -1326,11 +1333,11 @@
+ return 1;
+ }
+ if ($r<0) {
+- $r=&linuxDisableAndUnloadModule("printer",
++ $r=&linuxDisableAndUnloadModule($usbprintermodule,
+ "to prevent possible system instability due to SMP+USB");
+ } else {
+ linuxJustLoad:
+- $r=&linuxInsmod("printer",$quiet);
++ $r=&linuxInsmod($usbprintermodule,$quiet);
+ }
+ if (!$r && !$quiet &&
+ &askYN("\n*** Continue with the USB probe anyway".$msg,0)) {
+@@ -1601,7 +1608,7 @@
+
+ } else {
+ my $parModulesLoaded=0;
+- # Don't "modprobe printer" on SMP Linux with libusb support:
++ # Don't "modprobe printer/usblp" on SMP Linux with libusb support:
+ my $usbModulesLoaded=
+ (&ptalMlcdSupportsLibusb &&
+ $osPlatform=~/Linux/ && &linuxIsSmp);