xfce.bbclass: change SRC_URI calculation
authorAndreas Müller <schnitzeltony@googlemail.com>
Fri, 18 May 2012 13:29:56 +0000 (15:29 +0200)
committerPatrick Ohly <patrick.ohly@intel.com>
Fri, 9 Jan 2015 16:23:20 +0000 (08:23 -0800)
* grabbed from oe-core gnomebase.bbclass
* old calculation did not work for version numbers with multiple digits (4.10)

(From meta-openembedded rev: a2417b3b98bd6200e211c333a7044ccdb08dc515)

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
meta-openembedded/meta-xfce/classes/xfce.bbclass

index 2350c27..f4ef556 100644 (file)
@@ -1,5 +1,10 @@
+def xfce_verdir(v):
+    import re
+    m = re.match("^([0-9]+)\.([0-9]+)", v)
+    return "%s.%s" % (m.group(1), m.group(2))
+
 HOMEPAGE = "http://www.xfce.org"
-SRC_URI = "http://archive.xfce.org/src/xfce/${BPN}/${@'${PV}'[0:3]}/${BPN}-${PV}.tar.bz2"
+SRC_URI = "http://archive.xfce.org/src/xfce/${BPN}/${@xfce_verdir("${PV}")}/${BPN}-${PV}.tar.bz2"
 
 inherit autotools gettext gtk-icon-cache pkgconfig