summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--0001-Fix-build-for-Python-3.5.patch51
-rw-r--r--PKGBUILD18
3 files changed, 69 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 82cbd4dc432d..4d61ee35b709 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = pyalpm-git
pkgdesc = Libalpm bindings for Python 3 (Git version)
pkgver = 0.6.2.r3.g3c4692b
- pkgrel = 1
+ pkgrel = 2
url = http://projects.archlinux.org/users/remy/pyalpm.git/
arch = i686
arch = x86_64
@@ -12,7 +12,9 @@ pkgbase = pyalpm-git
provides = pyalpm=0.6.2.r3.g3c4692b
conflicts = pyalpm
source = git+https://projects.archlinux.org/git/users/remy/pyalpm.git
+ source = 0001-Fix-build-for-Python-3.5.patch
md5sums = SKIP
+ md5sums = d5481d4f9920860518277a78857c25e8
pkgname = pyalpm-git
diff --git a/0001-Fix-build-for-Python-3.5.patch b/0001-Fix-build-for-Python-3.5.patch
new file mode 100644
index 000000000000..061cbff0f1a0
--- /dev/null
+++ b/0001-Fix-build-for-Python-3.5.patch
@@ -0,0 +1,51 @@
+From 327f1055e62b4905d6cfa0e2997e35eb358a5c14 Mon Sep 17 00:00:00 2001
+From: Yen Chi Hsuan <yan12125@gmail.com>
+Date: Tue, 6 Oct 2015 12:47:18 +0800
+Subject: [pyalpm][PATCH] Fix build for Python 3.5
+
+Signed-off-by: Yen Chi Hsuan <yan12125@gmail.com>
+---
+ src/db.c | 1 +
+ src/package.c | 1 +
+ src/transaction.c | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/src/db.c b/src/db.c
+index 8b9ffd2..fae8edb 100644
+--- a/src/db.c
++++ b/src/db.c
+@@ -20,6 +20,7 @@
+ *
+ */
+
++#include <pyconfig.h>
+ #include <alpm.h>
+ #include <Python.h>
+ #include "db.h"
+diff --git a/src/package.c b/src/package.c
+index d4ab941..bd08c25 100644
+--- a/src/package.c
++++ b/src/package.c
+@@ -20,6 +20,7 @@
+ *
+ */
+
++#include <pyconfig.h>
+ #include <string.h>
+ #include <alpm.h>
+ #include <Python.h>
+diff --git a/src/transaction.c b/src/transaction.c
+index 9c28c50..8cb7e5b 100644
+--- a/src/transaction.c
++++ b/src/transaction.c
+@@ -20,6 +20,7 @@
+ *
+ */
+
++#include <pyconfig.h>
+ #include <string.h>
+ #include <alpm.h>
+ #include <Python.h>
+--
+2.6.1
+
diff --git a/PKGBUILD b/PKGBUILD
index 58dfc78a5223..883fda198783 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
_pkgname=pyalpm
pkgname=$_pkgname-git
pkgver=0.6.2.r3.g3c4692b
-pkgrel=1
+pkgrel=2
pkgdesc="Libalpm bindings for Python 3 (Git version)"
arch=('i686' 'x86_64')
url="http://projects.archlinux.org/users/remy/pyalpm.git/"
@@ -13,8 +13,14 @@ depends=('python>=3.2' 'pacman')
provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname")
makedepends=('git')
-source=('git+https://projects.archlinux.org/git/users/remy/pyalpm.git')
-md5sums=('SKIP')
+source=(
+ 'git+https://projects.archlinux.org/git/users/remy/pyalpm.git'
+ '0001-Fix-build-for-Python-3.5.patch'
+)
+md5sums=(
+ 'SKIP'
+ 'd5481d4f9920860518277a78857c25e8'
+)
pkgver() {
cd "$srcdir/$_pkgname"
@@ -24,6 +30,12 @@ pkgver() {
)
}
+prepare() {
+ cd "$srcdir/$_pkgname"
+
+ patch -Np1 -i ../0001-Fix-build-for-Python-3.5.patch
+}
+
package() {
cd "$srcdir/$_pkgname"