sg3-utils: add newer buildable version
[openembedded.git] / recipes / eglibc / eglibc_2.11.bb
1 require eglibc.inc
2
3 DEFAULT_PREFERENCE = "-1"
4 DEPENDS += "gperf-native"
5 FILESPATHPKG =. "eglibc-svn:"
6 PV = "2.11"
7 PR = "${INC_PR}.4"
8 SVN_REV="10151"
9 EGLIBC_BRANCH="eglibc-2_11"
10 SRC_URI = "svn://svn.eglibc.org/branches;module=${EGLIBC_BRANCH};rev=${SVN_REV};proto=svn \
11            file://eglibc-svn-arm-lowlevellock-include-tls.patch;patch=1 \
12            file://IO-acquire-lock-fix.patch;patch=1 \
13            file://shorten-build-commands.patch;patch=1 \
14            file://etc/ld.so.conf \
15            file://generate-supported.mk"
16 S = "${WORKDIR}/${EGLIBC_BRANCH}/libc"
17 B = "${WORKDIR}/build-${TARGET_SYS}"
18
19 PACKAGES_DYNAMIC = "libc6*"
20 RPROVIDES_${PN}-dev = "libc6-dev virtual-libc-dev"
21 PROVIDES_${PN}-dbg = "glibc-dbg"
22
23 # the -isystem in bitbake.conf screws up glibc do_stage
24 BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
25 TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${layout_includedir}"
26
27 GLIBC_ADDONS ?= "ports,nptl,libidn"
28
29 GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN"
30
31 #
32 # For now, we will skip building of a gcc package if it is a uclibc one
33 # and our build is not a uclibc one, and we skip a glibc one if our build
34 # is a uclibc build.
35 #
36 # See the note in gcc/gcc_3.4.0.oe
37 #
38
39 python __anonymous () {
40     import bb, re
41     uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None)
42     if uc_os:
43         raise bb.parse.SkipPackage("incompatible with target %s" %
44                                    bb.data.getVar('TARGET_OS', d, 1))
45 }
46
47 EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
48                 --without-cvs --disable-profile --disable-debug --without-gd \
49                 --enable-clocale=gnu \
50                 --enable-add-ons=${GLIBC_ADDONS},ports \
51                 --with-headers=${STAGING_INCDIR} \
52                 --without-selinux \
53                 ${GLIBC_EXTRA_OECONF}"
54
55 EXTRA_OECONF += "${@get_eglibc_fpu_setting(bb, d)}"
56
57 do_unpack_append() {
58         bb.build.exec_func('do_move_ports', d)
59 }
60
61 do_move_ports() {
62         if test -d ${WORKDIR}/${EGLIBC_BRANCH}/ports ; then
63             rm -rf ${S}/ports
64             mv ${WORKDIR}/${EGLIBC_BRANCH}/ports ${S}/
65         fi
66 }
67
68 do_configure () {
69 # override this function to avoid the autoconf/automake/aclocal/autoheader
70 # calls for now
71 # don't pass CPPFLAGS into configure, since it upsets the kernel-headers
72 # version check and doesn't really help with anything
73         if [ -z "`which rpcgen`" ]; then
74                 echo "rpcgen not found.  Install glibc-devel."
75                 exit 1
76         fi
77         (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
78         find ${S} -name "configure" | xargs touch
79         CPPFLAGS="" oe_runconf
80 }
81
82 rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
83           yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
84           rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
85
86 do_compile () {
87         # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
88         unset LDFLAGS
89         base_do_compile
90         (
91                 cd ${S}/sunrpc/rpcsvc
92                 for r in ${rpcsvc}; do
93                         h=`echo $r|sed -e's,\.x$,.h,'`
94                         rpcgen -h $r -o $h || oewarn "unable to generate header for $r"
95                 done
96         )
97 }
98
99 require eglibc-stage.inc
100
101 require eglibc-package.bbclass