Merge branch 'org.openembedded.dev' of git://git.openembedded.net/openembedded into...
[vuplus_openembedded] / packages / alsa / alsa-driver_0.9.6-hh4c.bb
1 # needs a gcc4 fix
2 BROKEN = "1"
3
4 COMPATIBLE_MACHINE = "(h3600|h3900)"
5
6 DESCRIPTION = "Alsa Drivers"
7 SECTION = "base"
8 LICENSE = "GPL"
9 PR = "r6"
10
11 DEPENDS += "fakeroot-native"
12
13 SRC_URI = "ftp://ftp.handhelds.org/packages/alsa-driver/alsa-driver-${PV}.tar.gz \
14         file://sound.p.patch;patch=1 \
15         file://h5400.patch;patch=1 \
16         file://sa11xx.patch;patch=1 \
17         file://adriver.h.patch;patch=1"
18
19 inherit autotools module
20
21 EXTRA_OECONF = "--with-sequencer=yes \
22         --with-isapnp=no \
23         --with-oss=yes \
24         --with-kernel=${STAGING_KERNEL_DIR} \
25         --with-kernel-version=${KERNEL_VERSION}"
26
27 PACKAGES =+ "${PN}-midi ${PN}-misc"
28 FILES_${PN} = "/lib/modules/*/misc/snd* \
29         ${sysconfdir}/modutils/*"
30 midi_modules = "snd-seq-midi-emul.o \
31         snd-seq-midi-event.o \
32         snd-seq-midi.o \
33         snd-seq-virmidi.o \
34         snd-seq-oss.o"
35 FILES_${PN}-midi = "${@' '.join(map ((lambda x: '/lib/modules/*/misc/%s' % x), bb.data.getVar('midi_modules', d).split()))}"
36 misc_modules = "snd-gus-synth.o \
37         snd-emu8000-synth.o \
38         snd-emux-synth.o \
39         snd-ainstr-fm.o \
40         snd-ainstr-gf1.o \
41         snd-ainstr-iw.o \
42         snd-ainstr-simple.o"
43 FILES_${PN}-misc = "${@' '.join(map ((lambda x: '/lib/modules/*/misc/%s' % x), bb.data.getVar('misc_modules', d).split()))}"
44
45 # put in-kernel headers first in the include search path.
46 # without this all configure checks fail
47 CFLAGS =+ "-I${STAGING_KERNEL_DIR}/include"
48
49 do_configure() {
50
51 cards=
52 if egrep "CONFIG_SA1100_H3[168]00=y" "${STAGING_KERNEL_DIR}/.config" ; then
53   cards="$cards,sa11xx-uda1341"
54   familiar_arch=ipaqsa
55 fi
56 if grep "CONFIG_ARCH_H3900=y" "${STAGING_KERNEL_DIR}/.config" ; then
57   cards="$cards,pxa-uda1380,h5400-ak4535"
58   familiar_arch=ipaqpxa
59 fi
60 cards="$cards,bluez-sco,pdaudiocf"
61
62    oe_runconf --with-cards=${cards}
63 }
64
65
66 do_install() {
67
68 if egrep "CONFIG_SA1100_H3[168]00=y" "${STAGING_KERNEL_DIR}/.config" ; then
69   familiar_arch=ipaqsa
70 fi
71 if grep "CONFIG_ARCH_H3900=y" "${STAGING_KERNEL_DIR}/.config" ; then
72   familiar_arch=ipaqpxa
73 fi
74
75       fakeroot make -k NODEPMOD=yes DESTDIR=${D} install;
76
77       if [ -d ${D}${sysconfdir}/modutils/ ] ; then
78          rm -r ${D}${sysconfdir}/modutils/ ;
79       fi
80       mkdir -p ${D}${sysconfdir}/modutils/
81       cp familiar/alsa-modules-${familiar_arch} ${D}${sysconfdir}/modutils/
82 }
83