From 9bdc4efbca596249d360d9fc179c23bc9c3c2aec Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Thu, 1 Dec 2011 18:25:17 +0100 Subject: [PATCH] PyBluez: add patches to add linux-3 support Signed-off-by: Stephan Raue --- .../PyBluez/patches/PyBluez-0.18-linux3.patch | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 packages/python/system/PyBluez/patches/PyBluez-0.18-linux3.patch diff --git a/packages/python/system/PyBluez/patches/PyBluez-0.18-linux3.patch b/packages/python/system/PyBluez/patches/PyBluez-0.18-linux3.patch new file mode 100644 index 0000000000..d0a5a95312 --- /dev/null +++ b/packages/python/system/PyBluez/patches/PyBluez-0.18-linux3.patch @@ -0,0 +1,38 @@ +diff -Naur PyBluez-0.18/bluetooth/__init__.py PyBluez-0.18.patch/bluetooth/__init__.py +--- PyBluez-0.18/bluetooth/__init__.py 2009-11-24 09:39:49.000000000 +0100 ++++ PyBluez-0.18.patch/bluetooth/__init__.py 2011-11-30 11:41:31.652163261 +0100 +@@ -30,10 +30,12 @@ + _dbg("Widcomm not ready. falling back to MS stack") + from msbt import * + +-elif sys.platform == "linux2": ++elif sys.platform.startswith("linux"): + from bluez import * + elif sys.platform == "darwin": + from osx import * ++else: ++ raise Exception("This platform (%s) is currently not supported by pybluez." % sys.platform) + + discover_devices.__doc__ = \ + """ +diff -Naur PyBluez-0.18/setup.py PyBluez-0.18.patch/setup.py +--- PyBluez-0.18/setup.py 2009-11-25 23:39:55.000000000 +0100 ++++ PyBluez-0.18.patch/setup.py 2011-11-30 11:42:45.018457088 +0100 +@@ -46,7 +46,7 @@ + ) + mods.append (mod2) + +-elif sys.platform == 'linux2': ++elif sys.platform.startswith('linux'): + mod1 = Extension('bluetooth._bluetooth', + libraries = ['bluetooth'], + sources = ['bluez/btmodule.c', 'bluez/btsdp.c']) +@@ -59,6 +59,8 @@ + sources = ['osx/_osxbt.c'] + ) + mods = [ mod1 ] ++else: ++ raise Exception("This platform (%s) is currently not supported by pybluez." % sys.platform) + + + setup ( name = 'PyBluez',