diff options
author | Alexander Peyser | 2018-08-02 20:52:11 +0200 |
---|---|---|
committer | Alexander Peyser | 2018-08-02 20:52:11 +0200 |
commit | d1dbebda34b3c0858a5d7a89fc04b5e2bdd722d6 (patch) | |
tree | 4f0c4ff9a880715aa15407e74289ea07445d60b4 | |
parent | f1222b34cf6ec2c183cfe23156f93306a0eed82d (diff) | |
download | aur-d1dbebda34b3c0858a5d7a89fc04b5e2bdd722d6.tar.gz |
Fix return type of xopendisplay with patch disper_0.3.1-fix_init.patch
-rw-r--r-- | PKGBUILD | 13 | ||||
-rw-r--r-- | disper_0.3.1-fix_init.patch | 34 |
2 files changed, 44 insertions, 3 deletions
@@ -7,9 +7,16 @@ arch=('any') url="http://willem.engen.nl/projects/disper/" license=('GPL') depends=('python2') -source=(http://ppa.launchpad.net/disper-dev/ppa/ubuntu/pool/main/d/disper/disper_${pkgver}.tar.gz) -md5sums=('4474f6c98078cfab24f49db744eb1e80') -sha256sums=('7cefe3b9837f304bca6a6622081cf91ecfb23307d5934216d32a12eb2ecb0bd1') +source=(http://ppa.launchpad.net/disper-dev/ppa/ubuntu/pool/main/d/disper/disper_${pkgver}.tar.gz disper_0.3.1-fix_init.patch ) +md5sums=('4474f6c98078cfab24f49db744eb1e80' + 'b14b8e21842eda8d13e35a13cf9b84be') +sha256sums=('7cefe3b9837f304bca6a6622081cf91ecfb23307d5934216d32a12eb2ecb0bd1' + 'fa9b9098c8252809f02a4b59a49c9079355a60a7c96e37eecfdaf4a619b206e8') + +prepare() { + cd "$srcdir/disper" + patch -p1 <../disper_0.3.1-fix_init.patch +} build() { cd "$srcdir/disper" diff --git a/disper_0.3.1-fix_init.patch b/disper_0.3.1-fix_init.patch new file mode 100644 index 000000000000..d1a6be7d3566 --- /dev/null +++ b/disper_0.3.1-fix_init.patch @@ -0,0 +1,34 @@ +diff -Naur disper/src/xrandr/__init__.py disper-new/src/xrandr/__init__.py +--- disper/src/xrandr/__init__.py 2011-09-09 16:20:45.000000000 +0200 ++++ disper-new/src/xrandr/__init__.py 2016-07-28 15:33:34.391703460 +0200 +@@ -83,10 +83,20 @@ + + from core import Screen, xlib, rr + ++xopendisplay = None ++class Display(Structure): pass ++ ++def get_display(name): ++ global xopendisplay ++ if xopendisplay is None: ++ xopendisplay = xlib.XOpenDisplay ++ xopendisplay.restype = POINTER(Display) ++ return xopendisplay(name) ++ + def get_current_display(): + """Returns the currently used display""" + display_url = os.getenv("DISPLAY") +- dpy = xlib.XOpenDisplay(display_url) ++ dpy = get_display(display_url) + return dpy + + def get_current_screen(): +@@ -98,7 +108,7 @@ + + def get_screen_of_display(display, count): + """Returns the screen of the given display""" +- dpy = xlib.XOpenDisplay(display) ++ dpy = get_display(display) + return Screen(dpy, count) + + def get_version(): |