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