summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathon Fernyhough2020-01-24 18:02:10 +0000
committerJonathon Fernyhough2020-01-24 18:02:10 +0000
commit4c44a2df35152deab6e48e4cd1ea4731985de532 (patch)
treeaa214d2c04e80a51b5dbf4c7e0d1e4bf853024fe
downloadaur-4c44a2df35152deab6e48e4cd1ea4731985de532.tar.gz
Import to AUR. Switch pkgbase.
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD41
-rw-r--r--libnotify07.patch36
-rw-r--r--notify-python-0.1.1-fix-GTK-symbols.patch25
4 files changed, 124 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..fe1ac09a61dc
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = python2-notify
+ pkgdesc = Python bindings for libnotify
+ pkgver = 0.1.1
+ pkgrel = 14
+ url = http://www.galago-project.org/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = python2
+ depends = pygtk>=2.22.0
+ depends = libnotify>=0.7.1
+ conflicts = python-notify<=0.1.1-11
+ replaces = python-notify<=0.1.1-11
+ source = http://www.galago-project.org/files/releases/source/notify-python/notify-python-0.1.1.tar.gz
+ source = libnotify07.patch
+ source = notify-python-0.1.1-fix-GTK-symbols.patch
+ sha512sums = f900d58e4004d199f718e458ebaa9b654c0040b848312f6fe5a885afbdf67c771fd3360b4cbf121b66404d750a7cce24f776c360568eadcefc9733e7f501cccf
+ sha512sums = d8c9a829d9255c0e971f00f7ef0f337207f94cd89f67bc657f0bcc2dc18a50b138924e2f9ef878daad2372256f7656064071f7a7324292700044c93e990f17fc
+ sha512sums = a5f9f04b080425114950aaa7fc2e68ff3e32d092cd0f7a9ef212a37d8056e4a2d438d075921e66be541bbdcadb4602c14e5bb7443e7455dc7ebc923c4dbd0961
+
+pkgname = python2-notify
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..59e2350e7c82
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Jonathon Fernyhough <jonathon "manjaro +dotorg>
+# Contributor: Angel Velasquez <angvp@archlinux.org>
+
+pkgname=python2-notify
+pkgver=0.1.1
+pkgrel=14
+pkgdesc="Python bindings for libnotify"
+arch=('i686' 'x86_64')
+url="http://www.galago-project.org/"
+license=('GPL')
+depends=('pygtk>=2.22.0' 'libnotify>=0.7.1')
+makedepends=('python2')
+conflicts=('python-notify<=0.1.1-11')
+replaces=('python-notify<=0.1.1-11')
+source=(http://www.galago-project.org/files/releases/source/notify-python/notify-python-${pkgver}.tar.gz
+ libnotify07.patch
+ notify-python-0.1.1-fix-GTK-symbols.patch)
+sha512sums=('f900d58e4004d199f718e458ebaa9b654c0040b848312f6fe5a885afbdf67c771fd3360b4cbf121b66404d750a7cce24f776c360568eadcefc9733e7f501cccf'
+ 'd8c9a829d9255c0e971f00f7ef0f337207f94cd89f67bc657f0bcc2dc18a50b138924e2f9ef878daad2372256f7656064071f7a7324292700044c93e990f17fc'
+ 'a5f9f04b080425114950aaa7fc2e68ff3e32d092cd0f7a9ef212a37d8056e4a2d438d075921e66be541bbdcadb4602c14e5bb7443e7455dc7ebc923c4dbd0961')
+
+build() {
+ cd "${srcdir}/notify-python-${pkgver}"
+
+ patch -Np1 -i "${srcdir}/libnotify07.patch"
+ patch -Np1 -i "${srcdir}/notify-python-0.1.1-fix-GTK-symbols.patch"
+
+ ./configure --prefix=/usr
+
+ # WARNING - we touch src/pynotify.override in build because upstream did not rebuild pynotify.c
+ # from the input definitions, this forces pynotify.c to be regenerated, at some point this can be removed
+ touch src/pynotify.override
+
+ make clean
+ make
+}
+
+package() {
+ cd "${srcdir}/notify-python-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/libnotify07.patch b/libnotify07.patch
new file mode 100644
index 000000000000..289573d50ae4
--- /dev/null
+++ b/libnotify07.patch
@@ -0,0 +1,36 @@
+diff -up notify-python-0.1.1/src/pynotify.defs.notify070 notify-python-0.1.1/src/pynotify.defs
+--- notify-python-0.1.1/src/pynotify.defs.notify070 2010-11-02 17:11:14.928179237 -0400
++++ notify-python-0.1.1/src/pynotify.defs 2010-11-02 17:11:51.153180231 -0400
+@@ -38,7 +38,6 @@
+ '("const-gchar*" "summary")
+ '("const-gchar*" "message" (null-ok) (default "NULL"))
+ '("const-gchar*" "icon" (null-ok) (default "NULL"))
+- '("GtkWidget*" "attach" (null-ok) (default "NULL"))
+ )
+ )
+
+@@ -53,24 +52,6 @@
+ )
+ )
+
+-(define-method attach_to_widget
+- (of-object "NotifyNotification")
+- (c-name "notify_notification_attach_to_widget")
+- (return-type "none")
+- (parameters
+- '("GtkWidget*" "attach")
+- )
+-)
+-
+-(define-method attach_to_status_icon
+- (of-object "NotifyNotification")
+- (c-name "notify_notification_attach_to_status_icon")
+- (return-type "none")
+- (parameters
+- '("GtkStatusIcon*" "attach")
+- )
+-)
+-
+ (define-method show
+ (of-object "NotifyNotification")
+ (c-name "notify_notification_show")
diff --git a/notify-python-0.1.1-fix-GTK-symbols.patch b/notify-python-0.1.1-fix-GTK-symbols.patch
new file mode 100644
index 000000000000..f985c01363a0
--- /dev/null
+++ b/notify-python-0.1.1-fix-GTK-symbols.patch
@@ -0,0 +1,25 @@
+diff -up notify-python-0.1.1/src/__init__.py.BAD notify-python-0.1.1/src/__init__.py
+--- notify-python-0.1.1/src/__init__.py.BAD 2010-08-31 09:04:45.353844005 -0400
++++ notify-python-0.1.1/src/__init__.py 2010-08-31 09:04:49.281844300 -0400
+@@ -1 +1,21 @@
++"""
++Fedora's libnotify.so is not linked against GTK2 or GTK3. The idea
++was to support being linked against different parallel-installable
++GTK stacks.
++
++Unfortunately, python needs to jump through some special hoops in order
++to share symbols with extension modules, specifically, pygtk, which does
++link against GTK2.
++
++Without using sys.setdlopenflags(sys.getdlopenflags() | ctypes.RTLD_GLOBAL),
++the result is:
++libnotify-WARNING **: Missing symbol 'gdk_screen_make_display_name'
++
++Thanks to David Malcolm for figuring out the workaround.
++"""
++import ctypes
++import sys
++sys.setdlopenflags(sys.getdlopenflags() | ctypes.RTLD_GLOBAL)
++import gtk
++
+ from _pynotify import *