update driver
[vuplus_openembedded] / recipes / libffi / libffi_2.0+gcc3.4.1.bb
1 SECTION = "libs"
2 DESCRIPTION = "Foreign Function Interface library"
3 LICENSE = "libffi"
4 PRIORITY = "optional"
5 PR = "r1"
6
7 inherit autotools gettext
8
9 PACKAGES = "${PN}-dbg ${PN} ${PN}-dev"
10
11 FILES_${PN} = "${libdir}/libffi.so.*"
12
13 FILES_${PN}-dev = "${includedir}/ffi* \
14                    ${libdir}/libffi.a \
15                    ${libdir}/libffi.la \
16                    ${libdir}/libffi.so"
17
18 GCC_VER = "${@bb.data.getVar('PV',d,1).split('gcc')[1]}"
19
20 SRC_URI = "${GNU_MIRROR}/gcc/gcc-${GCC_VER}/gcc-${GCC_VER}.tar.bz2 \
21            file://soname.patch;patch=1"
22
23 MIRRORS_prepend () {
24 ${GNU_MIRROR}/gcc/      http://gcc.get-software.com/releases/
25 ${GNU_MIRROR}/gcc/      http://mirrors.rcn.net/pub/sourceware/gcc/releases/
26 }
27
28 S = "${WORKDIR}/gcc-${GCC_VER}/libffi"
29 B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
30
31 EXTRA_OECONF = "--with-gnu-ld \
32                 --enable-shared \
33                 --enable-target-optspace \
34                 --enable-languages=c,c++,f77 \
35                 --enable-threads=posix \
36                 --enable-multilib \
37                 --enable-c99 \
38                 --enable-long-long \
39                 --enable-symvers=gnu \
40                 --program-prefix=${TARGET_PREFIX} \
41                 ${EXTRA_OECONF_PATHS}"
42
43 EXTRA_OECONF_PATHS = "--with-local-prefix=${prefix}/local \
44                       --with-gxx-include-dir=${includedir}/c++/${PV}"
45
46 do_configure () {
47         (cd ${S}/.. && gnu-configize) || die "failure running gnu-configize"
48         oe_runconf
49 }
50
51 do_install_append() {
52         # follow debian and move this to $includedir
53         mv ${D}${libdir}/gcc/${TARGET_SYS}/${GCC_VER}/include/libffi/ffitarget.h ${D}${includedir}/
54 }
55
56 ffi_include = "ffi.h ffitarget.h"
57
58 do_stage () {
59         oe_libinstall -so -C .libs libffi ${STAGING_LIBDIR}
60
61         mkdir -p ${STAGING_INCDIR}/
62         for i in ${ffi_include}; do
63                 install -m 0644 include/$i ${STAGING_INCDIR}/
64         done
65 }