summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Kitching2018-07-12 18:01:07 +0100
committerChris Kitching2018-07-12 18:01:34 +0100
commit7de3a33be699c1c5a80a5511b399a5848dd619ff (patch)
tree4bee8f8bbca90ea6e6b5c79b8a40baf10dee6fa3
parent37cfd660867b1b3c065877f2bf5b5b1296ac06a5 (diff)
downloadaur-python2-llvm-lit.tar.gz
Fix python package versioning sillies
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD21
-rw-r--r--versioning.patch12
3 files changed, 34 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fe8a5afc9e0..fc3b2c4ba73 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,16 @@
# Generated by mksrcinfo v8
-# Thu Jul 12 03:41:28 UTC 2018
+# Thu Jul 12 17:01:00 UTC 2018
pkgbase = python2-llvm-lit
pkgdesc = LLVM integrated tester
pkgver = 6.0.1
pkgrel = 1
- arch = x86_64
+ arch = any
depends = python2
depends = python2-pip
source = https://releases.llvm.org/6.0.1/llvm-6.0.1.src.tar.xz
+ source = versioning.patch
md5sums = c88c98709300ce2c285391f387fecce0
+ md5sums = 9f54e688dd2028c9bfa861f67607f3e4
pkgname = python2-llvm-lit
diff --git a/PKGBUILD b/PKGBUILD
index e4e47e8c7ca..a0f102e8cc9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,10 +4,25 @@ pkgname=python2-llvm-lit
pkgver=6.0.1
pkgrel=1
pkgdesc="LLVM integrated tester"
-arch=('x86_64')
+arch=('any')
depends=(python2 python2-pip)
-source=("https://releases.llvm.org/$pkgver/llvm-$pkgver.src.tar.xz")
-md5sums=('c88c98709300ce2c285391f387fecce0')
+source=(
+ "https://releases.llvm.org/$pkgver/llvm-$pkgver.src.tar.xz"
+ versioning.patch
+)
+md5sums=(
+ 'c88c98709300ce2c285391f387fecce0'
+ '9f54e688dd2028c9bfa861f67607f3e4'
+)
+
+prepare() {
+ cd llvm-$pkgver.src
+ # Patch to cope with silly Python package versioning.
+ # llvm-lit is hardcoded to append `-dev` to the Python package version. Python versioning
+ # rules say that version 0.6.0-dev < 0.6.0, so downstream packages like lnt fail because
+ # the installed version of llvm-lit is "too old".
+ patch -p1 < $srcdir/versioning.patch
+}
build() {
cd "llvm-$pkgver.src/utils/lit"
diff --git a/versioning.patch b/versioning.patch
new file mode 100644
index 00000000000..346ba75cd5c
--- /dev/null
+++ b/versioning.patch
@@ -0,0 +1,12 @@
+diff -ura llvm-6.0.1.src/utils/lit/lit/__init__.py new/utils/lit/lit/__init__.py
+--- llvm-6.0.1.src/utils/lit/lit/__init__.py 2016-10-11 00:22:11.000000000 +0100
++++ new/utils/lit/lit/__init__.py 2018-07-12 17:51:32.828661837 +0100
+@@ -3,7 +3,7 @@
+ __author__ = 'Daniel Dunbar'
+ __email__ = 'daniel@minormatter.com'
+ __versioninfo__ = (0, 6, 0)
+-__version__ = '.'.join(str(v) for v in __versioninfo__) + 'dev'
++__version__ = '.'.join(str(v) for v in __versioninfo__)
+
+ __all__ = []
+