From: Michael Lauer Date: Sun, 2 May 2004 19:14:44 +0000 (+0000) Subject: use common do_split_package() - patch courtesy pb_. X-Git-Tag: Release-2010-05/1~19388 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f330ae7e71a759a21cee3135211158a28427ae7;p=openembedded.git use common do_split_package() - patch courtesy pb_. BKrev: 409548a4i3FO-5Ibm0vZ1-mD60a21w --- diff --git a/pango/pango_1.2.5.oe b/pango/pango_1.2.5.oe index be59411c94..b37a33e8e3 100644 --- a/pango/pango_1.2.5.oe +++ b/pango/pango_1.2.5.oe @@ -29,43 +29,7 @@ do_stage () { } 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 + modules_root = oe.data.expand('${libdir}/pango/${LIBV}/modules', d) - 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 - - pango_libdir = os.path.join(libdir, "pango", oe.data.getVar('LIBV', d)) - modules_root = os.path.join(pango_libdir, 'modules') - - do_split(modules_root, '^pango-(.*)\.so$', 'pango-module-%s', 'Pango module %s', 'pango-querymodules > /etc/pango/pango.modules') + do_split_packages(d, modules_root, '^pango-(.*)\.so$', 'pango-module-%s', 'Pango module %s', 'pango-querymodules > /etc/pango/pango.modules') }