]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/portaudio/portaudio_0.0.19.bb
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / portaudio / portaudio_0.0.19.bb
1 DESCRIPTION = "A portable audio library"
2 SECTION = "libs"
3 PRIORITY = "optional"
4 MAINTAINER = "Michael 'Mickey' Lauer <mickey@Vanille.de>"
5 LICENSE = "GPL"
6 PV = "v19-cvs-${CVSDATE}"
7 PR = "r1"
8
9 SRC_URI = "http://www.portaudio.com/archives/pa_snapshot_v19.tar.gz"
10 S = "${WORKDIR}/portaudio"
11
12 inherit qmake
13
14 TESTS = "  pa_devs patest1      patest_hang patest_many                   patest_prime patest_sine patest_stop     patest_write_sine        \
15 pa_fuzz    patest_buffer        patest_in_overflow  patest_maxsines       patest_read_record  patest_sine8         patest_sync              \
16 pa_minlat  patest_callbackstop  patest_latency      patest_multi_sine     patest_record       patest_sine_formats  patest_toomanysines      \
17 paqa_devs  patest_clip          patest_leftright    patest_out_underflow  patest_ringmix      patest_sine_time     patest_underflow         \
18 paqa_errs  patest_dither        patest_longsine     patest_pink           patest_saw          patest_start_stop    patest_wire"
19
20 do_configure_prepend() {
21     echo "TEMPLATE = subdirs" >portaudio.pro
22     echo "SUBDIRS = lib tests" >>portaudio.pro
23
24     mkdir -p lib
25     cat <<EOF >lib/lib.pro    
26 TEMPLATE = lib
27 CONFIG = console debug warn_on
28 TARGET = portaudio
29 VERSION = 0.0.19
30 DESTDIR = .
31 DEFINES = PA_USE_OSS=1 HAVE_LIBPTHREAD=1
32 DEFINES += PA_LITTLE_ENDIAN
33
34 INCLUDEPATH = ../pa_common
35
36 SOURCES = \
37         ../pa_common/pa_allocation.c \
38         ../pa_common/pa_converters.c \
39         ../pa_common/pa_cpuload.c \
40         ../pa_common/pa_dither.c \
41         ../pa_common/pa_front.c \
42         ../pa_common/pa_process.c \
43         ../pa_common/pa_skeleton.c \
44         ../pa_common/pa_stream.c \
45         ../pa_common/pa_trace.c \
46 \
47         ../pa_unix_oss/pa_unix_oss.c \
48         ../pa_unix/pa_unix_hostapis.c \
49         ../pa_unix/pa_unix_util.c
50 EOF
51
52     mkdir -p tests
53     echo "TEMPLATE = subdirs" >tests/tests.pro
54     echo "SUBDIRS = \\" >>tests/tests.pro
55     
56     for test in ${TESTS}
57     do
58         mkdir -p tests/$test
59         cat <<EOF >tests/$test/$test.pro
60 TEMPLATE = app
61 CONFIG = console debug warn_on thread
62 DESTDIR = ../../bin
63 INCLUDEPATH = ../../pa_common/
64 LIBS = -L../../lib -lportaudio -lm
65 SOURCES = ../../pa_tests/$test.c
66 EOF
67         echo "$test \\" >>tests/tests.pro
68     done
69     echo >>tests/tests.pro
70 }
71
72 do_stage() {
73         oe_libinstall -so -C lib libportaudio ${STAGING_LIBDIR}
74         install -m 0644 pa_common/portaudio.h ${STAGING_INCDIR}/portaudio.h
75 }
76
77 do_install() {
78         install -d ${D}${libdir}
79         install -d ${D}${bindir}
80         install -d ${D}${includedir}
81         oe_libinstall -so -C lib libportaudio ${D}${libdir}
82         install -m 0644 pa_common/portaudio.h ${D}${includedir}
83         install -m 0755 bin/* ${D}${bindir}/
84 }
85
86 PACKAGES = "libportaudio0 portaudio-dev portaudio-examples"
87 FILES_libportaudio0 = "${libdir}"
88 FILES_portaudio-examples = "${bindir}"