2010-08-06 02:38:06 +00:00
#
# For now, we will skip building of a gcc package if it is a uclibc one
# and our build is not a uclibc one, and we skip a eglibc one if our build
# is a uclibc build.
#
# See the note in gcc/gcc_3.4.0.oe
#
python __anonymous () {
import bb , re
2012-03-03 10:59:25 +00:00
uc_os = ( re . match ( '.*uclibc*' , d . getVar ( 'TARGET_OS' , True )) != None )
2010-08-06 02:38:06 +00:00
if uc_os :
raise bb . parse . SkipPackage ( " incompatible with target %s " %
2012-03-03 10:59:25 +00:00
d . getVar ( 'TARGET_OS' , True ))
2010-08-06 02:38:06 +00:00
}
# Set this to zero if you don't want ldconfig in the output package
USE_LDCONFIG ? = " 1 "
2012-09-25 12:56:41 +00:00
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 "
2010-08-06 02:38:06 +00:00
2011-09-19 14:38:44 +00:00
# The ld.so in this eglibc supports the GNU_HASH
2011-12-22 17:43:33 +00:00
RPROVIDES_ $ { PN } = " glibc rtld(GNU_HASH) "
RPROVIDES_ $ { PN } - utils = " glibc-utils "
RPROVIDES_ $ { PN } - mtrace = " glibc-mtrace libc-mtrace "
RPROVIDES_ $ { PN } - pic = " glibc-pic "
2013-03-02 17:06:58 +00:00
RPROVIDES_ $ { PN } - dev = " glibc-dev libc6-dev virtual-libc-dev "
2011-12-22 17:43:33 +00:00
RPROVIDES_ $ { PN } - staticdev = " glibc-staticdev "
RPROVIDES_ $ { PN } - doc = " glibc-doc "
RPROVIDES_eglibc - extra - nss = " glibc-extra-nss "
RPROVIDES_eglibc - thread - db = " glibc-thread-db "
RPROVIDES_ $ { PN } - pcprofile = " glibc-pcprofile "
RPROVIDES_ $ { PN } - dbg = " glibc-dbg "
2011-06-02 12:15:05 +00:00
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 "
2010-08-06 02:38:06 +00:00
2010-12-23 15:50:31 +00:00
FILES_ $ { PN } = " ${ libc_baselibs } ${ libexecdir } /* $ { @base_conditional('USE_LDCONFIG', '1', ' ${ base_sbindir } /ldconfig ${ sysconfdir } /ld.so.conf', '', d)} "
2011-12-22 17:43:33 +00:00
FILES_ldd = " ${ bindir } /ldd "
FILES_libsegfault = " ${ base_libdir } /libSegFault* "
FILES_libcidn = " ${ base_libdir } /libcidn-*.so ${ base_libdir } /libcidn.so.* "
FILES_libmemusage = " ${ base_libdir } /libmemusage.so "
FILES_eglibc - extra - nss = " ${ base_libdir } /libnss_*-*.so ${ base_libdir } /libnss_*.so.* "
FILES_sln = " /sbin/sln "
2012-01-27 17:13:40 +00:00
FILES_ $ { PN } - pic = " ${ libdir } /*_pic.a ${ libdir } /*_pic.map ${ libdir } /libc_pic/*.o "
2011-12-22 17:43:33 +00:00
FILES_libsotruss = " ${ libdir } /audit/sotruss-lib.so "
2012-06-05 12:05:51 +00:00
FILES_SOLIBSDEV = " ${ libdir}/lib*${SOLIBSDEV } "
FILES_ $ { PN } - dev += " ${ bindir } /rpcgen ${ libdir } /*_nonshared.a ${ base_libdir } /*_nonshared.a ${ base_libdir } /*.o ${ datadir } /aclocal "
FILES_ $ { PN } - staticdev += " ${ libdir } /*.a ${ base_libdir } /*.a "
2011-12-22 17:43:33 +00:00
FILES_nscd = " ${ sbindir } /nscd* "
2012-05-15 16:31:32 +00:00
FILES_ $ { PN } - mtrace = " ${ bindir } /mtrace "
2011-08-02 10:42:21 +00:00
FILES_ $ { PN } - utils = " ${ bindir } /* ${ sbindir } /* "
2011-06-28 06:58:15 +00:00
FILES_ $ { PN } - dbg += " ${ libexecdir } /*/.debug ${ libdir } /audit/.debug "
2011-12-22 17:43:33 +00:00
FILES_catchsegv = " ${ bindir } /catchsegv "
RDEPENDS_catchsegv = " libsegfault "
2011-08-02 10:42:21 +00:00
FILES_ $ { PN } - pcprofile = " ${ base_libdir } /libpcprofile.so "
2011-12-22 17:43:33 +00:00
FILES_eglibc - thread - db = " ${ base_libdir } /libthread_db.so.* ${ base_libdir } /libthread_db-*.so "
2011-08-02 10:42:21 +00:00
RPROVIDES_ $ { PN } - dev += " libc-dev "
2012-01-21 00:07:38 +00:00
RPROVIDES_ $ { PN } - staticdev += " libc-staticdev "
2010-08-06 02:38:06 +00:00
2010-09-27 14:44:05 +00:00
SUMMARY_sln = " The static ln. "
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. "
SUMMARY_nscd = " Name service cache daemon "
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. "
2011-12-22 17:43:33 +00:00
SUMMARY_eglibc - extra - nss = " hesiod, NIS and NIS+ nss libraries "
DESCRIPTION_eglibc - extra - nss = " eglibc: nis, nisplus and hesiod search services. "
2010-09-27 14:44:05 +00:00
SUMMARY_ldd = " print shared library dependencies "
2012-09-25 12:56:41 +00:00
DESCRIPTION_ldd = " ${ bindir } /ldd prints shared library dependencies for each program or shared library specified on the command line. "
2011-08-02 10:42:21 +00:00
SUMMARY_ $ { PN } - utils = " Miscellaneous utilities provided by eglibc "
DESCRIPTION_ $ { PN } - utils = " Miscellaneous utilities including getconf, iconf, locale, gencat, tzselect, zic, rpcinfo, ... "
2011-06-22 00:55:33 +00:00
DESCRIPTION_libsotruss = " Library to support sotruss which traces calls through PLTs "
2010-08-06 02:38:06 +00:00
2011-07-26 19:17:11 +00:00
inherit libc - common multilib_header
2010-08-06 02:38:06 +00:00
2011-07-07 16:17:49 +00:00
do_install_append () {
rm - f $ { D } $ { sysconfdir } / localtime
2012-04-28 15:23:23 +00:00
rm - rf $ { D } $ { localstatedir }
2011-07-26 19:17:11 +00:00
2013-08-21 05:45:23 +00:00
# remove empty eglibc dir
2013-08-26 09:51:01 +00:00
if [ - d $ { D } $ { libdir } / eglibc - a ! - e $ { D } $ { libdir } / eglibc / pt_chown ]; then
2013-08-21 05:45:23 +00:00
rmdir $ { D } $ { libdir } / eglibc
fi
2011-07-26 19:17:11 +00:00
oe_multilib_header bits / syscall . h
2012-04-14 08:59:05 +00:00
if [ - f $ { D } $ { bindir } / mtrace ]; then
2012-07-18 17:38:05 +00:00
sed - i - e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' - e '2s,exec.*perl,exec ${USRBINPATH}/env perl,' $ { D } $ { bindir } / mtrace
2012-04-14 08:59:05 +00:00
fi
2012-08-31 20:52:41 +00:00
rm - rf $ { D } $ { includedir } / rpcsvc / rquota *
2013-01-25 19:42:53 +00:00
# Info dir listing isn't interesting at this point so remove it if it exists.
if [ - e " ${ D}${infodir } /dir " ]; then
rm - f $ { D } $ { infodir } / dir
fi
2013-04-24 16:39:59 +00:00
if [ " ${ USE_LDCONFIG } " != " 1 " ]; then
# We won't ship this file (see FILES above) so let's not install it
rm - f $ { D } $ { sysconfdir } / ld . so . conf
# This directory will be empty now so remove it too.
# But check whether it exists first, since it won't for eglibc-initial.
if [ - d $ { D } $ { sysconfdir } ]; then
rmdir $ { D } $ { sysconfdir }
fi
fi
2011-07-07 16:17:49 +00:00
}
2011-06-28 12:30:47 +00:00
do_install_locale () {
dest = $ { D } / $ { includedir } / eglibc - locale - internal - $ { MULTIMACH_TARGET_SYS }
2011-06-30 15:41:49 +00:00
install - d $ { dest } $ { base_libdir } $ { dest } $ { bindir } $ { dest } $ { libdir } $ { dest } $ { datadir }
2011-07-08 19:48:39 +00:00
if [ " ${ base_libdir } " != " ${ libdir } " ]; then
cp - fpPR $ { D } $ { base_libdir } /* $ { dest } $ { base_libdir }
fi
2011-08-26 11:41:18 +00:00
if [ - e $ { D } $ { bindir } / localedef ]; then
2011-07-19 16:51:10 +00:00
mv - f $ { D } $ { bindir } / localedef $ { dest } $ { bindir }
fi
2011-08-26 11:41:18 +00:00
if [ - e $ { D } $ { libdir } / gconv ]; then
2011-07-19 16:51:10 +00:00
mv - f $ { D } $ { libdir } / gconv $ { dest } $ { libdir }
fi
2012-09-24 19:00:41 +00:00
if [ - e $ { D } $ { exec_prefix } / lib ]; then
cp - fpPR $ { D } $ { exec_prefix } / lib $ { dest } $ { exec_prefix }
fi
2012-02-15 08:49:07 +00:00
if [ - e $ { D } $ { datadir } / i18n ]; then
mv $ { D } $ { datadir } / i18n $ { dest } $ { datadir }
fi
2011-06-30 15:41:49 +00:00
cp - fpPR $ { D } $ { datadir } /* $ { dest } $ { datadir }
2012-07-19 13:14:20 +00:00
rm - rf $ { D } $ { datadir } / locale /
2011-06-28 12:30:47 +00:00
cp - fpPR $ { WORKDIR } / SUPPORTED $ { dest }
}
2011-06-30 15:45:20 +00:00
addtask do_install_locale after do_install before do_populate_sysroot do_package
2011-06-28 12:30:47 +00:00
2012-09-25 12:56:41 +00:00
bashscripts = " mtrace sotruss xtrace "
do_evacuate_scripts () {
target = $ { D } $ { includedir } / eglibc - scripts - internal - $ { MULTIMACH_TARGET_SYS }
mkdir - p $target
for i in $ { bashscripts }; do
2013-01-25 14:42:26 +00:00
if [ - f $ { D } $ { bindir } / $i ]; then
cp $ { D } $ { bindir } / $i $target /
fi
2012-09-25 12:56:41 +00:00
done
}
addtask evacuate_scripts after do_install before do_populate_sysroot do_package
2011-06-30 15:41:49 +00:00
PACKAGE_PREPROCESS_FUNCS += " eglibc_package_preprocess "
eglibc_package_preprocess () {
rm - rf $ { PKGD } / $ { includedir } / eglibc - locale - internal - $ { MULTIMACH_TARGET_SYS }
2012-09-25 12:56:41 +00:00
rm - rf $ { PKGD } / $ { includedir } / eglibc - scripts - internal - $ { MULTIMACH_TARGET_SYS }
for i in $ { bashscripts }; do
rm - f $ { PKGD } $ { bindir } / $i
done
2012-09-24 19:00:41 +00:00
rm - rf $ { PKGD } / $ { localedir }
if [ " ${ libdir } " != " ${ exec_prefix } /lib " ]; then
# This dir only exists to hold locales
rm - rf $ { PKGD } $ { exec_prefix } / lib
fi
2011-06-30 15:41:49 +00:00
}