From 2ee602ad04a5d5edfbe1e80486ecbe43785668b4 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Mon, 16 Oct 2006 14:34:44 +0000 Subject: add gtk-binver parsing gtk_binary_version out of .pc file. close #1455 NOTE1: patch based on work of XorA NOTE2: we might want to make this more generic (i.e. get-pkgconfig-entry) eventually NOTE3: please adapt this to other gtk-engine versions as suitable --- classes/gtk-binver.bbclass | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 classes/gtk-binver.bbclass (limited to 'classes') diff --git a/classes/gtk-binver.bbclass b/classes/gtk-binver.bbclass new file mode 100644 index 0000000000..d59145e641 --- /dev/null +++ b/classes/gtk-binver.bbclass @@ -0,0 +1,9 @@ +def gtkbinver_find(d): + import bb + try: + for line in file( "%s/pkgconfig/gtk+-2.0.pc" % bb.data.getVar('STAGING_DATADIR', d, 1) ).readlines(): + if line.startswith( "gtk_binary_version" ): + # bb.note( "gtk_binary_version = '%s'" % line.split("=")[1].strip() ) + return line.split("=")[1].strip() + except OSError: + return "0.0.0" -- cgit v1.2.3