From 0fb8443510d0a6f88251707be563c28f502ee8d3 Mon Sep 17 00:00:00 2001 From: Phil Blundell Date: Thu, 5 Aug 2004 23:05:37 +0000 Subject: rename glibc_package.oe -> glibc_package.oeclass BKrev: 4112bd41gSTO0JoRPxlzTLpBLTpdUA --- glibc/glibc-package.oe | 121 --------------------------------------- glibc/glibc-package.oeclass | 0 glibc/glibc_2.3.2+cvs20040726.oe | 2 +- glibc/glibc_2.3.2.oe | 2 +- glibc/glibc_cvs.oe | 2 +- 5 files changed, 3 insertions(+), 124 deletions(-) delete mode 100644 glibc/glibc-package.oe create mode 100644 glibc/glibc-package.oeclass (limited to 'glibc') diff --git a/glibc/glibc-package.oe b/glibc/glibc-package.oe deleted file mode 100644 index 6cfa913d25..0000000000 --- a/glibc/glibc-package.oe +++ /dev/null @@ -1,121 +0,0 @@ -do_install() { - oe_runmake install_root=${D} install - for r in ${rpcsvc}; do - h=`echo $r|sed -e's,\.x$,.h,'` - install -m 0644 ${S}/sunrpc/rpcsvc/$h ${D}/${includedir}/rpcsvc/ - done - install -m 0644 ${WORKDIR}/etc/ld.so.conf ${D}/${sysconfdir}/ - install -d ${D}${libdir}/locale - make -f ${WORKDIR}/generate-supported.mk IN="${S}/localedata/SUPPORTED" OUT="${WORKDIR}/SUPPORTED" -} - -TMP_LOCALE="/tmp/locale/${libdir}/locale" - -locale_base_postinst() { -#!/bin/sh - -rm -rf ${TMP_LOCALE} -mkdir -p ${TMP_LOCALE} -if [ -f ${libdir}/locale/locale-archive ]; then - cp ${libdir}/locale/locale-archive ${TMP_LOCALE}/ -fi -localedef --add-to-archive --inputfile=${datadir}/locales/%s --charmap=${datadir}/charmaps/%s.gz --prefix=/tmp/locale -mv ${TMP_LOCALE}/locale-archive ${libdir}/locale/ -rm -rf ${TMP_LOCALE} -} - -locale_base_postrm() { -#!/bin/sh - -rm -rf ${TMP_LOCALE} -mkdir -p ${TMP_LOCALE} -if [ -f ${libdir}/locale/locale-archive ]; then - cp ${libdir}/locale/locale-archive ${TMP_LOCALE}/ -fi -localedef --delete-from-archive --inputfile=${datadir}/locales/%s --charmap=${datadir}/charmaps/%s.gz --prefix=/tmp/locale -mv ${TMP_LOCALE}/locale-archive ${libdir}/locale/ -rm -rf ${TMP_LOCALE} -} - -python package_do_split_gconvs () { - import os, re - if (oe.data.getVar('PACKAGE_NO_GCONV', d, 1) == '1'): - oe.note("package requested not splitting gconvs") - return - - if not oe.data.getVar('PACKAGES', d, 1): - return - - libdir = oe.data.getVar('libdir', d, 1) - if not libdir: - oe.error("libdir not defined") - return - datadir = oe.data.getVar('datadir', d, 1) - if not datadir: - oe.error("datadir not defined") - return - - gconv_libdir = os.path.join(libdir, "gconv") - charmap_dir = os.path.join(datadir, "i18n", "charmaps") - locales_dir = os.path.join(datadir, "i18n", "locales") - - do_split_packages(d, gconv_libdir, file_regex='^(.*)\.so$', output_pattern='glibc-gconv-%s', description='gconv module for character set %s') - - do_split_packages(d, charmap_dir, file_regex='^(.*)\.gz$', output_pattern='glibc-charmap-%s', description='character map for %s encoding') - - do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern='glibc-localedata-%s', description='locale definition for %s') - - oe.data.setVar('PACKAGES', oe.data.getVar('PACKAGES', d) + ' glibc-gconv', d) - - f = open(os.path.join(oe.data.getVar('WORKDIR', d, 1), "SUPPORTED"), "r") - supported = f.readlines() - f.close() - - dot_re = re.compile("(.*)\.(.*)") - - # Collate the locales by base and encoding - encodings = {} - for l in supported: - l = l[:-1] - (locale, charset) = l.split(" ") - m = dot_re.match(locale) - if m: - locale = m.group(1) - if not encodings.has_key(locale): - encodings[locale] = [] - encodings[locale].append(charset) - - def output_locale(name, locale, encoding): - pkgname = 'locale-base-' + legitimize_package_name(name) - - oe.data.setVar('RDEPENDS_%s' % pkgname, 'localedef glibc-localedata-%s glibc-charmap-%s' % (legitimize_package_name(locale), legitimize_package_name(encoding)), d) - rprovides = 'virtual-locale-%s' % legitimize_package_name(name) - m = re.match("(.*)_(.*)", name) - if m: - rprovides += ' virtual-locale-%s' % m.group(1) - oe.data.setVar('RPROVIDES_%s' % pkgname, rprovides, d) - oe.data.setVar('PACKAGES', '%s %s' % (pkgname, oe.data.getVar('PACKAGES', d, 1)), d) - oe.data.setVar('ALLOW_EMPTY_%s' % pkgname, '1', d) - oe.data.setVar('pkg_postinst_%s' % pkgname, oe.data.getVar('locale_base_postinst', d, 1) % (locale, encoding), d) - oe.data.setVar('pkg_postrm_%s' % pkgname, oe.data.getVar('locale_base_postrm', d, 1) % (locale, encoding), d) - - # Reshuffle names so that UTF-8 is preferred over other encodings - for l in encodings.keys(): - if len(encodings[l]) == 1: - output_locale(l, l, encodings[l][0]) - else: - if "UTF-8" in encodings[l]: - output_locale(l, l, "UTF-8") - encodings[l].remove("UTF-8") - for e in encodings[l]: - output_locale('%s-%s' % (l, e), l, e) -} - -# We want to do this indirection so that we can safely 'return' -# from the called function even though we're prepending -python populate_packages_prepend () { - if oe.data.getVar('DEBIAN_NAMES', d, 1): - oe.data.setVar('PKG_glibc', 'libc6', d) - oe.data.setVar('PKG_glibc-dev', 'libc6-dev', d) - oe.build.exec_func('package_do_split_gconvs', d) -} diff --git a/glibc/glibc-package.oeclass b/glibc/glibc-package.oeclass new file mode 100644 index 0000000000..e69de29bb2 diff --git a/glibc/glibc_2.3.2+cvs20040726.oe b/glibc/glibc_2.3.2+cvs20040726.oe index 2fb4fd071b..b31d898b38 100644 --- a/glibc/glibc_2.3.2+cvs20040726.oe +++ b/glibc/glibc_2.3.2+cvs20040726.oe @@ -159,4 +159,4 @@ do_stage() { echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so } -include glibc-package.oe +include glibc-package.oeclass diff --git a/glibc/glibc_2.3.2.oe b/glibc/glibc_2.3.2.oe index ede521a987..6f13e35a2b 100644 --- a/glibc/glibc_2.3.2.oe +++ b/glibc/glibc_2.3.2.oe @@ -223,4 +223,4 @@ do_stage() { echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so } -include glibc-package.oe +include glibc-package.oeclass diff --git a/glibc/glibc_cvs.oe b/glibc/glibc_cvs.oe index f216faec1b..a1b41806f5 100644 --- a/glibc/glibc_cvs.oe +++ b/glibc/glibc_cvs.oe @@ -163,4 +163,4 @@ do_stage() { echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so } -include glibc-package.oe +include glibc-package.oeclass -- cgit v1.2.3