summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/eglibc/eglibc-package.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/eglibc/eglibc-package.inc')
-rw-r--r--meta/recipes-core/eglibc/eglibc-package.inc155
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 0000000..6721819
--- /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
9python __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
18USE_LDCONFIG ?= "1"
19
20PACKAGES = "${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
23RPROVIDES_${PN} = "glibc rtld(GNU_HASH)"
24RPROVIDES_${PN}-utils = "glibc-utils"
25RPROVIDES_${PN}-mtrace = "glibc-mtrace libc-mtrace"
26RPROVIDES_${PN}-pic = "glibc-pic"
27RPROVIDES_${PN}-dev = "glibc-dev libc6-dev virtual-libc-dev"
28RPROVIDES_${PN}-staticdev = "glibc-staticdev"
29RPROVIDES_${PN}-doc = "glibc-doc"
30RPROVIDES_eglibc-extra-nss = "glibc-extra-nss"
31RPROVIDES_eglibc-thread-db = "glibc-thread-db"
32RPROVIDES_${PN}-pcprofile = "glibc-pcprofile"
33RPROVIDES_${PN}-dbg = "glibc-dbg"
34libc_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
36FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf', '', d)}"
37FILES_ldd = "${bindir}/ldd"
38FILES_libsegfault = "${base_libdir}/libSegFault*"
39FILES_libcidn = "${base_libdir}/libcidn-*.so ${base_libdir}/libcidn.so.*"
40FILES_libmemusage = "${base_libdir}/libmemusage.so"
41FILES_eglibc-extra-nss = "${base_libdir}/libnss_*-*.so ${base_libdir}/libnss_*.so.*"
42FILES_sln = "/sbin/sln"
43FILES_${PN}-pic = "${libdir}/*_pic.a ${libdir}/*_pic.map ${libdir}/libc_pic/*.o"
44FILES_libsotruss = "${libdir}/audit/sotruss-lib.so"
45FILES_SOLIBSDEV = "${libdir}/lib*${SOLIBSDEV}"
46FILES_${PN}-dev += "${bindir}/rpcgen ${libdir}/*_nonshared.a ${base_libdir}/*_nonshared.a ${base_libdir}/*.o ${datadir}/aclocal"
47FILES_${PN}-staticdev += "${libdir}/*.a ${base_libdir}/*.a"
48FILES_nscd = "${sbindir}/nscd*"
49FILES_${PN}-mtrace = "${bindir}/mtrace"
50FILES_${PN}-utils = "${bindir}/* ${sbindir}/*"
51FILES_${PN}-dbg += "${libexecdir}/*/.debug ${libdir}/audit/.debug"
52FILES_catchsegv = "${bindir}/catchsegv"
53RDEPENDS_catchsegv = "libsegfault"
54FILES_${PN}-pcprofile = "${base_libdir}/libpcprofile.so"
55FILES_eglibc-thread-db = "${base_libdir}/libthread_db.so.* ${base_libdir}/libthread_db-*.so"
56RPROVIDES_${PN}-dev += "libc-dev"
57RPROVIDES_${PN}-staticdev += "libc-staticdev"
58
59SUMMARY_sln = "The static ln"
60DESCRIPTION_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."
61SUMMARY_nscd = "Name service cache daemon"
62DESCRIPTION_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."
63SUMMARY_eglibc-extra-nss = "hesiod, NIS and NIS+ nss libraries"
64DESCRIPTION_eglibc-extra-nss = "eglibc: nis, nisplus and hesiod search services."
65SUMMARY_ldd = "print shared library dependencies"
66DESCRIPTION_ldd = "${bindir}/ldd prints shared library dependencies for each program or shared library specified on the command line."
67SUMMARY_${PN}-utils = "Miscellaneous utilities provided by eglibc"
68DESCRIPTION_${PN}-utils = "Miscellaneous utilities including getconf, iconf, locale, gencat, tzselect, zic, rpcinfo, ..."
69DESCRIPTION_libsotruss = "Library to support sotruss which traces calls through PLTs"
70
71inherit libc-common multilib_header
72
73do_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
103do_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
126addtask do_install_locale after do_install before do_populate_sysroot do_package
127
128bashscripts = "mtrace sotruss xtrace"
129
130do_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
140addtask evacuate_scripts after do_install before do_populate_sysroot do_package
141
142PACKAGE_PREPROCESS_FUNCS += "eglibc_package_preprocess"
143
144eglibc_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}