python-pyrex: Rework DEPENDS updates
[openembedded.git] / recipes / glibc / glibc_2.3.3.bb
blob6e0ed6bd689104d5737c2e8649f69f070c69f6be
1 require glibc.inc
3 PR = "${INC_PR}.0"
5 DEFAULT_PREFERENCE_sh3 = "-99"
7 DEFAULT_PREFERENCE = "-1"
8 DEFAULT_PREFERENCE_mipsel = "0"
10 GLIBC_ADDONS ?= "linuxthreads"
13 # For now, we will skip building of a gcc package if it is a uclibc one
14 # and our build is not a uclibc one, and we skip a glibc one if our build
15 # is a uclibc build.
17 # See the note in gcc/gcc_3.4.0.oe
20 python __anonymous () {
21 import bb, re
22 uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None)
23 if uc_os:
24 raise bb.parse.SkipPackage("incompatible with target %s" %
25 bb.data.getVar('TARGET_OS', d, 1))
28 libc_baselibs = "/lib/libc* /lib/libm* /lib/ld* /lib/libpthread* /lib/libresolv* /lib/librt* /lib/libutil* /lib/libnsl* /lib/libnss_files* /lib/libnss_compat* /lib/libnss_dns* /lib/libdl* /lib/libanl* /lib/libBrokenLocale*"
30 FILES_${PN} = "${sysconfdir} ${libc_baselibs} /sbin/ldconfig ${libexecdir} ${datadir}/zoneinfo"
31 FILES_ldd = "${bindir}/ldd"
32 FILES_libsegfault = "/lib/libSegFault*"
33 FILES_glibc-extra-nss = "/lib/libnss*"
34 FILES_sln = "/sbin/sln"
35 FILES_glibc-dev_append = " ${libdir}/*.o ${bindir}/rpcgen"
36 FILES_nscd = "${sbindir}/nscd*"
37 FILES_glibc-utils = "${bindir} ${sbindir}"
38 FILES_glibc-gconv = "${libdir}/gconv"
39 FILES_catchsegv = "${bindir}/catchsegv"
40 DEPENDS_catchsegv = "libsegfault"
41 FILES_glibc-pcprofile = "/lib/libpcprofile.so"
42 FILES_glibc-thread-db = "/lib/libthread_db*"
43 FILES_localedef = "${bindir}/localedef"
44 RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
45 RPROVIDES_${PN}-dev += "libc-dev virtual-libc-dev"
47 SRC_URI = "ftp://ftp.gnu.org/gnu/glibc/glibc-${PV}.tar.gz;name=archive \
48 ftp://ftp.gnu.org/pub/gnu/glibc/glibc-linuxthreads-${PV}.tar.gz;name=linuxthreads \
49 file://etc/ld.so.conf \
50 file://generate-supported.mk"
52 SRC_URI_append_mtx-1 = " file://mips-abio32.patch \
53 file://allow-gcc.patch "
54 SRC_URI_append_mtx-2 = " file://mips-abio32.patch \
55 file://allow-gcc.patch "
57 S = "${WORKDIR}/glibc-${PV}"
58 B = "${WORKDIR}/build-${TARGET_SYS}"
60 EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
61 --without-cvs --disable-profile --disable-debug --without-gd \
62 --enable-clocale=gnu \
63 --enable-add-ons=${GLIBC_ADDONS} \
64 --with-headers=${STAGING_INCDIR} \
65 ${GLIBC_EXTRA_OECONF}"
67 EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
69 glibc_do_unpack () {
70 mv "${WORKDIR}/linuxthreads" "${WORKDIR}/linuxthreads_db" "${S}/"
73 python do_unpack () {
74 bb.build.exec_func('base_do_unpack', d)
75 bb.build.exec_func('glibc_do_unpack', d)
78 do_configure () {
79 # override this function to avoid the autoconf/automake/aclocal/autoheader
80 # calls for now
81 # don't pass CPPFLAGS into configure, since it upsets the kernel-headers
82 # version check and doesn't really help with anything
83 if [ -z "`which rpcgen`" ]; then
84 echo "rpcgen not found. Install glibc-devel."
85 exit 1
87 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
88 CPPFLAGS="" oe_runconf
91 rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
92 yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
93 rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
95 do_compile () {
96 # this really is arm specific
97 touch ${S}/sysdeps/arm/framestate.c
98 # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
99 unset LDFLAGS
100 base_do_compile
102 cd ${S}/sunrpc/rpcsvc
103 for r in ${rpcsvc}; do
104 h=`echo $r|sed -e's,\.x$,.h,'`
105 rpcgen -h $r -o $h || oewarn "unable to generate header for $r"
106 done
110 require glibc-stage.inc
112 require glibc-package.inc
114 SRC_URI[archive.md5sum] = "b45c4cfa714a4688c319149c15a1e060"
115 SRC_URI[archive.sha256sum] = "0ae1b1dc1ee870d307ae6ad4546778377b04055520d3771dab1290e60ab13286"
116 SRC_URI[linuxthreads.md5sum] = "9006b8bff18beb864f6053857f25b410"
117 SRC_URI[linuxthreads.sha256sum] = "2d7af8211cda81abde3e0bb8ccedbd18924a27b244ff35d4eacafcf899038c56"