Patchwork [meta-xfce/-oe/-multimedia,02/40] xfce.bbclass: change SRC_URI calculation

login
register
mail settings
Submitter Andreas Müller
Date Sept. 18, 2012, 2:12 p.m.
Message ID <1347977601-28665-3-git-send-email-schnitzeltony@googlemail.com>
Download mbox | patch
Permalink /patch/36741/
State Accepted
Commit a2417b3b98bd6200e211c333a7044ccdb08dc515
Headers show

Comments

Andreas Müller - Sept. 18, 2012, 2:12 p.m.
* grabbed from oe-core gnomebase.bbclass
* old calculation did not work for version numbers with multiple digits (4.10)

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 meta-xfce/classes/xfce.bbclass |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

Patch

diff --git a/meta-xfce/classes/xfce.bbclass b/meta-xfce/classes/xfce.bbclass
index 2350c27..f4ef556 100644
--- a/meta-xfce/classes/xfce.bbclass
+++ b/meta-xfce/classes/xfce.bbclass
@@ -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