summaryrefslogtreecommitdiff
path: root/gtk+
diff options
context:
space:
mode:
authorMichael Lauer <mickey@vanille-media.de>2004-05-02 19:44:26 +0000
committerMichael Lauer <mickey@vanille-media.de>2004-05-02 19:44:26 +0000
commitb2405f3c1c9373fc3e176704ca230e805a1420ab (patch)
tree824c89bbef06f951077ede343abfdb36d975a9be /gtk+
parent6f330ae7e71a759a21cee3135211158a28427ae7 (diff)
use do_split_packages() - patch courtesy pb_.
BKrev: 40954f9aOHO3IBP5WteMncJWuiGDIA
Diffstat (limited to 'gtk+')
-rw-r--r--gtk+/gtk+_2.2.4.oe43
1 files changed, 5 insertions, 38 deletions
diff --git a/gtk+/gtk+_2.2.4.oe b/gtk+/gtk+_2.2.4.oe
index 2da2734890..2a5b74b76f 100644
--- a/gtk+/gtk+_2.2.4.oe
+++ b/gtk+/gtk+_2.2.4.oe
@@ -74,45 +74,12 @@ do_install_append () {
}
python populate_packages_prepend () {
- import os
- def do_split(root, pattern, format, description, postinst):
- dvar = oe.data.getVar('D', d, 1)
- if not dvar:
- oe.error("D not defined")
- return
-
- packages = oe.data.getVar('PACKAGES', d, 1).split()
- if not packages:
- oe.error("PACKAGES not defined")
- return
-
- postinst = '#!/bin/sh\n' + postinst
- objs = os.listdir(dvar + root)
- mainpkg = packages[0]
- for o in objs:
- import re
- m = re.match(pattern, o)
- if not m:
- continue
- on = m.group(1)
- pkg = format % on
- packages.append(pkg)
- oe.data.setVar('FILES_' + pkg, os.path.join(root, o), d)
- oe.data.setVar('RDEPENDS_' + pkg, mainpkg, d)
- oe.data.setVar('DESCRIPTION_' + pkg, description % on, d)
- oe.data.setVar('pkg_postinst_' + pkg, postinst, d)
-
- oe.data.setVar('PACKAGES', ' '.join(packages), d)
-
- libdir = oe.data.getVar('libdir', d, 1)
- if not libdir:
- oe.error("libdir not defined")
- return
-
- gtk_libdir = os.path.join(libdir, "gtk-2.0", oe.data.getVar('LIBV', d))
+ import os.path
+
+ gtk_libdir = oe.data.expand('${libdir}/gtk-2.0/${LIBV}', d)
loaders_root = os.path.join(gtk_libdir, 'loaders')
immodules_root = os.path.join(gtk_libdir, 'immodules')
- do_split(loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s', 'gdk-pixbuf-query-loaders > /etc/gtk-2.0/gdk-pixbuf.loaders')
- do_split(immodules_root, '^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s', 'gtk-query-immodules > /etc/gtk-2.0/gtk.immodules')
+ do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s', 'gdk-pixbuf-query-loaders > /etc/gtk-2.0/gdk-pixbuf.loaders')
+ do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s', 'gtk-query-immodules > /etc/gtk-2.0/gtk.immodules')
}