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