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