diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-16 03:05:19 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-16 03:05:19 +0200 |
commit | c527fd1f14c27855a37f2e8ac5346ce8d940ced2 (patch) | |
tree | bb002c1fdf011c41dbd2f0927bed23ecb5f83c97 /meta/recipes-core/eglibc/eglibc-package.inc | |
download | poky-daisy-140929.tar.gz |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-core/eglibc/eglibc-package.inc')
-rw-r--r-- | meta/recipes-core/eglibc/eglibc-package.inc | 155 |
1 files changed, 155 insertions, 0 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-package.inc b/meta/recipes-core/eglibc/eglibc-package.inc new file mode 100644 index 0000000000..6721819d2e --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-package.inc | |||
@@ -0,0 +1,155 @@ | |||
1 | # | ||
2 | # For now, we will skip building of a gcc package if it is a uclibc one | ||
3 | # and our build is not a uclibc one, and we skip a eglibc one if our build | ||
4 | # is a uclibc build. | ||
5 | # | ||
6 | # See the note in gcc/gcc_3.4.0.oe | ||
7 | # | ||
8 | |||
9 | python __anonymous () { | ||
10 | import bb, re | ||
11 | uc_os = (re.match('.*uclibc*', d.getVar('TARGET_OS', True)) != None) | ||
12 | if uc_os: | ||
13 | raise bb.parse.SkipPackage("incompatible with target %s" % | ||
14 | d.getVar('TARGET_OS', True)) | ||
15 | } | ||
16 | |||
17 | # Set this to zero if you don't want ldconfig in the output package | ||
18 | USE_LDCONFIG ?= "1" | ||
19 | |||
20 | PACKAGES = "${PN}-dbg catchsegv sln nscd ldd ${PN}-utils eglibc-thread-db ${PN}-pic libcidn libmemusage libsegfault ${PN}-pcprofile libsotruss ${PN} eglibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc" | ||
21 | |||
22 | # The ld.so in this eglibc supports the GNU_HASH | ||
23 | RPROVIDES_${PN} = "glibc rtld(GNU_HASH)" | ||
24 | RPROVIDES_${PN}-utils = "glibc-utils" | ||
25 | RPROVIDES_${PN}-mtrace = "glibc-mtrace libc-mtrace" | ||
26 | RPROVIDES_${PN}-pic = "glibc-pic" | ||
27 | RPROVIDES_${PN}-dev = "glibc-dev libc6-dev virtual-libc-dev" | ||
28 | RPROVIDES_${PN}-staticdev = "glibc-staticdev" | ||
29 | RPROVIDES_${PN}-doc = "glibc-doc" | ||
30 | RPROVIDES_eglibc-extra-nss = "glibc-extra-nss" | ||
31 | RPROVIDES_eglibc-thread-db = "glibc-thread-db" | ||
32 | RPROVIDES_${PN}-pcprofile = "glibc-pcprofile" | ||
33 | RPROVIDES_${PN}-dbg = "glibc-dbg" | ||
34 | libc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so ${base_libdir}/libc.so.* ${base_libdir}/libc-*.so ${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so ${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so ${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so ${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so ${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so ${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so ${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so ${base_libdir}/libnss_files*.so.* ${base_libdir}/libnss_files-*.so ${base_libdir}/libnss_compat*.so.* ${base_libdir}/libnss_compat-*.so ${base_libdir}/libnss_dns*.so.* ${base_libdir}/libnss_dns-*.so ${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so ${base_libdir}/libanl*.so.* ${base_libdir}/libanl-*.so ${base_libdir}/libBrokenLocale*.so.* ${base_libdir}/libBrokenLocale-*.so" | ||
35 | |||
36 | FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf', '', d)}" | ||
37 | FILES_ldd = "${bindir}/ldd" | ||
38 | FILES_libsegfault = "${base_libdir}/libSegFault*" | ||
39 | FILES_libcidn = "${base_libdir}/libcidn-*.so ${base_libdir}/libcidn.so.*" | ||
40 | FILES_libmemusage = "${base_libdir}/libmemusage.so" | ||
41 | FILES_eglibc-extra-nss = "${base_libdir}/libnss_*-*.so ${base_libdir}/libnss_*.so.*" | ||
42 | FILES_sln = "/sbin/sln" | ||
43 | FILES_${PN}-pic = "${libdir}/*_pic.a ${libdir}/*_pic.map ${libdir}/libc_pic/*.o" | ||
44 | FILES_libsotruss = "${libdir}/audit/sotruss-lib.so" | ||
45 | FILES_SOLIBSDEV = "${libdir}/lib*${SOLIBSDEV}" | ||
46 | FILES_${PN}-dev += "${bindir}/rpcgen ${libdir}/*_nonshared.a ${base_libdir}/*_nonshared.a ${base_libdir}/*.o ${datadir}/aclocal" | ||
47 | FILES_${PN}-staticdev += "${libdir}/*.a ${base_libdir}/*.a" | ||
48 | FILES_nscd = "${sbindir}/nscd*" | ||
49 | FILES_${PN}-mtrace = "${bindir}/mtrace" | ||
50 | FILES_${PN}-utils = "${bindir}/* ${sbindir}/*" | ||
51 | FILES_${PN}-dbg += "${libexecdir}/*/.debug ${libdir}/audit/.debug" | ||
52 | FILES_catchsegv = "${bindir}/catchsegv" | ||
53 | RDEPENDS_catchsegv = "libsegfault" | ||
54 | FILES_${PN}-pcprofile = "${base_libdir}/libpcprofile.so" | ||
55 | FILES_eglibc-thread-db = "${base_libdir}/libthread_db.so.* ${base_libdir}/libthread_db-*.so" | ||
56 | RPROVIDES_${PN}-dev += "libc-dev" | ||
57 | RPROVIDES_${PN}-staticdev += "libc-staticdev" | ||
58 | |||
59 | SUMMARY_sln = "The static ln" | ||
60 | DESCRIPTION_sln = "Similar to the 'ln' utility, but statically linked. sln is useful to make symbolic links to dynamic libraries if the dynamic linking system, for some reason, is not functional." | ||
61 | SUMMARY_nscd = "Name service cache daemon" | ||
62 | DESCRIPTION_nscd = "nscd, name service cache daemon, caches name service lookups for the passwd, group and hosts information. It can damatically improvide performance with remote, such as NIS or NIS+, name services." | ||
63 | SUMMARY_eglibc-extra-nss = "hesiod, NIS and NIS+ nss libraries" | ||
64 | DESCRIPTION_eglibc-extra-nss = "eglibc: nis, nisplus and hesiod search services." | ||
65 | SUMMARY_ldd = "print shared library dependencies" | ||
66 | DESCRIPTION_ldd = "${bindir}/ldd prints shared library dependencies for each program or shared library specified on the command line." | ||
67 | SUMMARY_${PN}-utils = "Miscellaneous utilities provided by eglibc" | ||
68 | DESCRIPTION_${PN}-utils = "Miscellaneous utilities including getconf, iconf, locale, gencat, tzselect, zic, rpcinfo, ..." | ||
69 | DESCRIPTION_libsotruss = "Library to support sotruss which traces calls through PLTs" | ||
70 | |||
71 | inherit libc-common multilib_header | ||
72 | |||
73 | do_install_append () { | ||
74 | rm -f ${D}${sysconfdir}/localtime | ||
75 | rm -rf ${D}${localstatedir} | ||
76 | |||
77 | # remove empty eglibc dir | ||
78 | if [ -d ${D}${libdir}/eglibc -a ! -e ${D}${libdir}/eglibc/pt_chown ]; then | ||
79 | rmdir ${D}${libdir}/eglibc | ||
80 | fi | ||
81 | oe_multilib_header bits/syscall.h | ||
82 | |||
83 | if [ -f ${D}${bindir}/mtrace ]; then | ||
84 | sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' -e '2s,exec.*perl,exec ${USRBINPATH}/env perl,' ${D}${bindir}/mtrace | ||
85 | fi | ||
86 | rm -rf ${D}${includedir}/rpcsvc/rquota* | ||
87 | # Info dir listing isn't interesting at this point so remove it if it exists. | ||
88 | if [ -e "${D}${infodir}/dir" ]; then | ||
89 | rm -f ${D}${infodir}/dir | ||
90 | fi | ||
91 | |||
92 | if [ "${USE_LDCONFIG}" != "1" ]; then | ||
93 | # We won't ship this file (see FILES above) so let's not install it | ||
94 | rm -f ${D}${sysconfdir}/ld.so.conf | ||
95 | # This directory will be empty now so remove it too. | ||
96 | # But check whether it exists first, since it won't for eglibc-initial. | ||
97 | if [ -d ${D}${sysconfdir} ]; then | ||
98 | rmdir ${D}${sysconfdir} | ||
99 | fi | ||
100 | fi | ||
101 | } | ||
102 | |||
103 | do_install_locale () { | ||
104 | dest=${D}/${includedir}/eglibc-locale-internal-${MULTIMACH_TARGET_SYS} | ||
105 | install -d ${dest}${base_libdir} ${dest}${bindir} ${dest}${libdir} ${dest}${datadir} | ||
106 | if [ "${base_libdir}" != "${libdir}" ]; then | ||
107 | cp -fpPR ${D}${base_libdir}/* ${dest}${base_libdir} | ||
108 | fi | ||
109 | if [ -e ${D}${bindir}/localedef ]; then | ||
110 | mv -f ${D}${bindir}/localedef ${dest}${bindir} | ||
111 | fi | ||
112 | if [ -e ${D}${libdir}/gconv ]; then | ||
113 | mv -f ${D}${libdir}/gconv ${dest}${libdir} | ||
114 | fi | ||
115 | if [ -e ${D}${exec_prefix}/lib ]; then | ||
116 | cp -fpPR ${D}${exec_prefix}/lib ${dest}${exec_prefix} | ||
117 | fi | ||
118 | if [ -e ${D}${datadir}/i18n ]; then | ||
119 | mv ${D}${datadir}/i18n ${dest}${datadir} | ||
120 | fi | ||
121 | cp -fpPR ${D}${datadir}/* ${dest}${datadir} | ||
122 | rm -rf ${D}${datadir}/locale/ | ||
123 | cp -fpPR ${WORKDIR}/SUPPORTED ${dest} | ||
124 | } | ||
125 | |||
126 | addtask do_install_locale after do_install before do_populate_sysroot do_package | ||
127 | |||
128 | bashscripts = "mtrace sotruss xtrace" | ||
129 | |||
130 | do_evacuate_scripts () { | ||
131 | target=${D}${includedir}/eglibc-scripts-internal-${MULTIMACH_TARGET_SYS} | ||
132 | mkdir -p $target | ||
133 | for i in ${bashscripts}; do | ||
134 | if [ -f ${D}${bindir}/$i ]; then | ||
135 | cp ${D}${bindir}/$i $target/ | ||
136 | fi | ||
137 | done | ||
138 | } | ||
139 | |||
140 | addtask evacuate_scripts after do_install before do_populate_sysroot do_package | ||
141 | |||
142 | PACKAGE_PREPROCESS_FUNCS += "eglibc_package_preprocess" | ||
143 | |||
144 | eglibc_package_preprocess () { | ||
145 | rm -rf ${PKGD}/${includedir}/eglibc-locale-internal-${MULTIMACH_TARGET_SYS} | ||
146 | rm -rf ${PKGD}/${includedir}/eglibc-scripts-internal-${MULTIMACH_TARGET_SYS} | ||
147 | for i in ${bashscripts}; do | ||
148 | rm -f ${PKGD}${bindir}/$i | ||
149 | done | ||
150 | rm -rf ${PKGD}/${localedir} | ||
151 | if [ "${libdir}" != "${exec_prefix}/lib" ]; then | ||
152 | # This dir only exists to hold locales | ||
153 | rm -rf ${PKGD}${exec_prefix}/lib | ||
154 | fi | ||
155 | } | ||