]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/libsdl/libsdl-native_1.2.7.bb
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / libsdl / libsdl-native_1.2.7.bb
1 DESCRIPTION = "Simple DirectMedia Layer - native Edition"
2 SECTION = "libs"
3 PRIORITY = "optional"
4 LICENSE = "LGPL"
5 PR = "r0"
6
7 SRC_URI = "http://www.libsdl.org/release/SDL-${PV}.tar.gz \
8            file://extra-keys.patch;patch=1 \
9            file://acinclude.m4"
10 S = "${WORKDIR}/SDL-${PV}"
11
12 inherit autotools native
13
14 EXTRA_OECONF = "--disable-debug --disable-cdrom --enable-threads --enable-timers --enable-endian \
15                 --enable-file --disable-oss --disable-alsa --disable-esd --disable-arts \
16                 --disable-diskaudio --disable-nas --disable-esd-shared --disable-esdtest \
17                 --disable-mintaudio --disable-nasm --disable-video-x11 --disable-video-dga \
18                 --disable-video-fbcon --disable-video-directfb --disable-video-ps2gs \
19                 --disable-video-xbios --disable-video-gem --disable-video-dummy \
20                 --disable-video-opengl --enable-input-events --enable-pthreads \
21                 --disable-video-picogui --disable-video-qtopia --enable-dlopen"
22
23 do_configure_prepend() {
24         rm -f ${S}/acinclude.m4
25         cp ${WORKDIR}/acinclude.m4 ${S}/
26 }
27
28 do_configure_append () {
29         cd ${S}
30
31         # prevent libtool from linking libs against libstdc++, libgcc, ...
32         cat ${TARGET_PREFIX}libtool | sed -e 's/postdeps=".*"/postdeps=""/' > ${TARGET_PREFIX}libtool.tmp
33         mv ${TARGET_PREFIX}libtool.tmp ${TARGET_PREFIX}libtool
34 }
35
36 do_stage() {
37         oe_libinstall -so -C src libSDL ${STAGING_LIBDIR}
38         ln -sf libSDL.so ${STAGING_LIBDIR}/libSDL-1.2.so
39         #oe_libinstall -a -C src/main libSDLmain ${STAGING_LIBDIR}
40         install -m 0644 src/main/libSDLmain.a ${STAGING_LIBDIR}
41
42         install -d ${STAGING_INCDIR}/SDL
43         for f in include/*.h
44         do
45                 install -m 0644 $f ${STAGING_INCDIR}/SDL/
46         done
47
48         cat >${STAGING_BINDIR}/sdl-config-native <<EOF
49 #!/bin/sh
50   case "\$1" in
51     --prefix)
52       echo /usr
53       ;;
54     --exec-prefix)
55       echo /usr 
56       ;;
57     --version)
58       echo ${PV}
59       ;;
60     --cflags)
61       echo -I${STAGING_INCDIR}/SDL -D_REENTRANT
62       ;;
63     --libs)
64       echo -lSDLmain -lSDL-1.2 -lpthread -L${STAGING_LIBDIR}
65       ;;
66   esac
67 EOF
68         chmod a+rx ${STAGING_BINDIR}/sdl-config-native
69 }