diff options
author | Richard Purdie <richard@openedhand.com> | 2008-01-17 10:45:16 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2008-01-17 10:45:16 +0000 |
commit | d59f40bbf405eec59c68fbe93fa982fb4e2b2897 (patch) | |
tree | 45f6cefa2fc721d616142c081d3b356946dc339a /meta/packages/libsdl | |
parent | 6b21b82e745d603012ae35e38db470fbb4b46d40 (diff) | |
download | poky-d59f40bbf405eec59c68fbe93fa982fb4e2b2897.tar.gz |
Add libsdl-sdk
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3505 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/libsdl')
-rw-r--r-- | meta/packages/libsdl/files/acinclude.m4 | 189 | ||||
-rw-r--r-- | meta/packages/libsdl/files/directfb_obsolete_calls.patch | 33 | ||||
-rw-r--r-- | meta/packages/libsdl/files/extra-keys.patch | 53 | ||||
-rw-r--r-- | meta/packages/libsdl/files/kernel-asm-page.patch | 13 | ||||
-rw-r--r-- | meta/packages/libsdl/libsdl-sdk_1.2.11.bb | 39 |
5 files changed, 327 insertions, 0 deletions
diff --git a/meta/packages/libsdl/files/acinclude.m4 b/meta/packages/libsdl/files/acinclude.m4 new file mode 100644 index 0000000000..ca2df9d5e5 --- /dev/null +++ b/meta/packages/libsdl/files/acinclude.m4 | |||
@@ -0,0 +1,189 @@ | |||
1 | # Local macros for the SDL configure.in script | ||
2 | |||
3 | dnl Function to link an architecture specific file | ||
4 | dnl LINK_ARCH_SRC(source_dir, arch, source_file) | ||
5 | AC_DEFUN([COPY_ARCH_SRC], | ||
6 | [ | ||
7 | old="$srcdir/$1/$2/$3" | ||
8 | new="$1/$3" | ||
9 | if test ! -d $1; then | ||
10 | echo "Creating directory $1" | ||
11 | mkdir -p $1 | ||
12 | fi | ||
13 | echo "Copying $old -> $new" | ||
14 | cat >$new <<__EOF__ | ||
15 | /* WARNING: This file was automatically generated! | ||
16 | * Original: $old | ||
17 | */ | ||
18 | __EOF__ | ||
19 | cat >>$new <$old | ||
20 | ]) | ||
21 | |||
22 | # | ||
23 | # --- esd.m4 --- | ||
24 | # | ||
25 | # Configure paths for ESD | ||
26 | # Manish Singh 98-9-30 | ||
27 | # stolen back from Frank Belew | ||
28 | # stolen from Manish Singh | ||
29 | # Shamelessly stolen from Owen Taylor | ||
30 | |||
31 | dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) | ||
32 | dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS | ||
33 | dnl | ||
34 | AC_DEFUN([AM_PATH_ESD], | ||
35 | [dnl | ||
36 | dnl Get the cflags and libraries from the esd-config script | ||
37 | dnl | ||
38 | AC_ARG_WITH(esd-prefix,[ --with-esd-prefix=PFX Prefix where ESD is installed (optional)], | ||
39 | esd_prefix="$withval", esd_prefix="") | ||
40 | AC_ARG_WITH(esd-exec-prefix,[ --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)], | ||
41 | esd_exec_prefix="$withval", esd_exec_prefix="") | ||
42 | AC_ARG_ENABLE(esdtest, [ --disable-esdtest Do not try to compile and run a test ESD program], | ||
43 | , enable_esdtest=yes) | ||
44 | |||
45 | if test x$esd_exec_prefix != x ; then | ||
46 | esd_args="$esd_args --exec-prefix=$esd_exec_prefix" | ||
47 | if test x${ESD_CONFIG+set} != xset ; then | ||
48 | ESD_CONFIG=$esd_exec_prefix/bin/esd-config | ||
49 | fi | ||
50 | fi | ||
51 | if test x$esd_prefix != x ; then | ||
52 | esd_args="$esd_args --prefix=$esd_prefix" | ||
53 | if test x${ESD_CONFIG+set} != xset ; then | ||
54 | ESD_CONFIG=$esd_prefix/bin/esd-config | ||
55 | fi | ||
56 | fi | ||
57 | |||
58 | AC_PATH_PROG(ESD_CONFIG, esd-config, no) | ||
59 | min_esd_version=ifelse([$1], ,0.2.7,$1) | ||
60 | AC_MSG_CHECKING(for ESD - version >= $min_esd_version) | ||
61 | no_esd="" | ||
62 | if test "$ESD_CONFIG" = "no" ; then | ||
63 | no_esd=yes | ||
64 | else | ||
65 | ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags` | ||
66 | ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs` | ||
67 | |||
68 | esd_major_version=`$ESD_CONFIG $esd_args --version | \ | ||
69 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` | ||
70 | esd_minor_version=`$ESD_CONFIG $esd_args --version | \ | ||
71 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` | ||
72 | esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \ | ||
73 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` | ||
74 | if test "x$enable_esdtest" = "xyes" ; then | ||
75 | ac_save_CFLAGS="$CFLAGS" | ||
76 | ac_save_LIBS="$LIBS" | ||
77 | CFLAGS="$CFLAGS $ESD_CFLAGS" | ||
78 | LIBS="$LIBS $ESD_LIBS" | ||
79 | dnl | ||
80 | dnl Now check if the installed ESD is sufficiently new. (Also sanity | ||
81 | dnl checks the results of esd-config to some extent | ||
82 | dnl | ||
83 | rm -f conf.esdtest | ||
84 | AC_TRY_RUN([ | ||
85 | #include <stdio.h> | ||
86 | #include <stdlib.h> | ||
87 | #include <string.h> | ||
88 | #include <esd.h> | ||
89 | |||
90 | char* | ||
91 | my_strdup (char *str) | ||
92 | { | ||
93 | char *new_str; | ||
94 | |||
95 | if (str) | ||
96 | { | ||
97 | new_str = malloc ((strlen (str) + 1) * sizeof(char)); | ||
98 | strcpy (new_str, str); | ||
99 | } | ||
100 | else | ||
101 | new_str = NULL; | ||
102 | |||
103 | return new_str; | ||
104 | } | ||
105 | |||
106 | int main () | ||
107 | { | ||
108 | int major, minor, micro; | ||
109 | char *tmp_version; | ||
110 | |||
111 | system ("touch conf.esdtest"); | ||
112 | |||
113 | /* HP/UX 9 (%@#!) writes to sscanf strings */ | ||
114 | tmp_version = my_strdup("$min_esd_version"); | ||
115 | if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { | ||
116 | printf("%s, bad version string\n", "$min_esd_version"); | ||
117 | exit(1); | ||
118 | } | ||
119 | |||
120 | if (($esd_major_version > major) || | ||
121 | (($esd_major_version == major) && ($esd_minor_version > minor)) || | ||
122 | (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro))) | ||
123 | { | ||
124 | return 0; | ||
125 | } | ||
126 | else | ||
127 | { | ||
128 | printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version); | ||
129 | printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro); | ||
130 | printf("*** best to upgrade to the required version.\n"); | ||
131 | printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n"); | ||
132 | printf("*** to point to the correct copy of esd-config, and remove the file\n"); | ||
133 | printf("*** config.cache before re-running configure\n"); | ||
134 | return 1; | ||
135 | } | ||
136 | } | ||
137 | |||
138 | ],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) | ||
139 | CFLAGS="$ac_save_CFLAGS" | ||
140 | LIBS="$ac_save_LIBS" | ||
141 | fi | ||
142 | fi | ||
143 | if test "x$no_esd" = x ; then | ||
144 | AC_MSG_RESULT(yes) | ||
145 | ifelse([$2], , :, [$2]) | ||
146 | else | ||
147 | AC_MSG_RESULT(no) | ||
148 | if test "$ESD_CONFIG" = "no" ; then | ||
149 | echo "*** The esd-config script installed by ESD could not be found" | ||
150 | echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in" | ||
151 | echo "*** your path, or set the ESD_CONFIG environment variable to the" | ||
152 | echo "*** full path to esd-config." | ||
153 | else | ||
154 | if test -f conf.esdtest ; then | ||
155 | : | ||
156 | else | ||
157 | echo "*** Could not run ESD test program, checking why..." | ||
158 | CFLAGS="$CFLAGS $ESD_CFLAGS" | ||
159 | LIBS="$LIBS $ESD_LIBS" | ||
160 | AC_TRY_LINK([ | ||
161 | #include <stdio.h> | ||
162 | #include <esd.h> | ||
163 | ], [ return 0; ], | ||
164 | [ echo "*** The test program compiled, but did not run. This usually means" | ||
165 | echo "*** that the run-time linker is not finding ESD or finding the wrong" | ||
166 | echo "*** version of ESD. If it is not finding ESD, you'll need to set your" | ||
167 | echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" | ||
168 | echo "*** to the installed location Also, make sure you have run ldconfig if that" | ||
169 | echo "*** is required on your system" | ||
170 | echo "***" | ||
171 | echo "*** If you have an old version installed, it is best to remove it, although" | ||
172 | echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], | ||
173 | [ echo "*** The test program failed to compile or link. See the file config.log for the" | ||
174 | echo "*** exact error that occured. This usually means ESD was incorrectly installed" | ||
175 | echo "*** or that you have moved ESD since it was installed. In the latter case, you" | ||
176 | echo "*** may want to edit the esd-config script: $ESD_CONFIG" ]) | ||
177 | CFLAGS="$ac_save_CFLAGS" | ||
178 | LIBS="$ac_save_LIBS" | ||
179 | fi | ||
180 | fi | ||
181 | ESD_CFLAGS="" | ||
182 | ESD_LIBS="" | ||
183 | ifelse([$3], , :, [$3]) | ||
184 | fi | ||
185 | AC_SUBST(ESD_CFLAGS) | ||
186 | AC_SUBST(ESD_LIBS) | ||
187 | rm -f conf.esdtest | ||
188 | ]) | ||
189 | |||
diff --git a/meta/packages/libsdl/files/directfb_obsolete_calls.patch b/meta/packages/libsdl/files/directfb_obsolete_calls.patch new file mode 100644 index 0000000000..f3f422cde3 --- /dev/null +++ b/meta/packages/libsdl/files/directfb_obsolete_calls.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | --- tmp/work/armv5te-angstrom-linux-gnueabi/libsdl-directfb-1.2.9-r1/SDL-1.2.9/src/video/directfb/SDL_DirectFB_video.c 2007-02-18 11:40:38.000000000 -0500 | ||
2 | +++ SDL/src/video/directfb/SDL_DirectFB_video.c 2007-02-18 11:00:07.000000000 -0500 | ||
3 | @@ -376,7 +376,7 @@ | ||
4 | { | ||
5 | int i; | ||
6 | DFBResult ret; | ||
7 | - DFBCardCapabilities caps; | ||
8 | + DFBGraphicsDeviceDescription caps; | ||
9 | DFBDisplayLayerConfig dlc; | ||
10 | struct DirectFBEnumRect *rect; | ||
11 | IDirectFB *dfb = NULL; | ||
12 | @@ -448,7 +448,7 @@ | ||
13 | |||
14 | |||
15 | /* Query card capabilities to get the video memory size */ | ||
16 | - dfb->GetCardCapabilities (dfb, &caps); | ||
17 | + dfb->GetDeviceDescription (dfb, &caps); | ||
18 | |||
19 | this->info.wm_available = 1; | ||
20 | this->info.hw_available = 1; | ||
21 | diff -u'rNF^function' tmp/work/armv5te-angstrom-linux-gnueabi/libsdl-directfb-1.2.9-r1/SDL-1.2.9/src/video/directfb/SDL_Direct | ||
22 | /SDL_DirectFB_events.c | ||
23 | --- tmp/work/armv5te-angstrom-linux-gnueabi/libsdl-directfb-1.2.9-r1/SDL-1.2.9/src/video/directfb/SDL_DirectFB_events.c 2004-0 | ||
24 | +++ SDL/src/video/directfb/SDL_DirectFB_events.c 2007-02-18 11:00:07.000000000 -0500 | ||
25 | @@ -161,7 +161,7 @@ | ||
26 | keymap[DIKI_SHIFT_L - DIKI_UNKNOWN] = SDLK_LSHIFT; | ||
27 | keymap[DIKI_SHIFT_R - DIKI_UNKNOWN] = SDLK_RSHIFT; | ||
28 | keymap[DIKI_ALT_L - DIKI_UNKNOWN] = SDLK_LALT; | ||
29 | - keymap[DIKI_ALTGR - DIKI_UNKNOWN] = SDLK_RALT; | ||
30 | + keymap[DIKI_ALT_R - DIKI_UNKNOWN] = SDLK_RALT; | ||
31 | keymap[DIKI_TAB - DIKI_UNKNOWN] = SDLK_TAB; | ||
32 | keymap[DIKI_ENTER - DIKI_UNKNOWN] = SDLK_RETURN; | ||
33 | keymap[DIKI_SPACE - DIKI_UNKNOWN] = SDLK_SPACE; | ||
diff --git a/meta/packages/libsdl/files/extra-keys.patch b/meta/packages/libsdl/files/extra-keys.patch new file mode 100644 index 0000000000..f12f0c7efb --- /dev/null +++ b/meta/packages/libsdl/files/extra-keys.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | diff -upr --exclude=configure --exclude=Makefile --exclude=Makefile.in libsdl1.2-1.2.4/include/SDL_keysym.h libsdl1.2-1.2.4-arm/include/SDL_keysym.h | ||
2 | --- libsdl1.2-1.2.4/include/SDL_keysym.h 2002-03-06 11:23:01.000000000 +0000 | ||
3 | +++ libsdl1.2-1.2.4-arm/include/SDL_keysym.h 2002-11-08 20:43:09.000000000 +0000 | ||
4 | @@ -286,6 +286,12 @@ typedef enum { | ||
5 | SDLK_EURO = 321, /* Some european keyboards */ | ||
6 | SDLK_UNDO = 322, /* Atari keyboard has Undo */ | ||
7 | |||
8 | + SDLK_RECORD = 322, | ||
9 | + SDLK_CALENDAR = 323, | ||
10 | + SDLK_TELEPHONE = 324, | ||
11 | + SDLK_MAIL = 325, | ||
12 | + SDLK_START = 326, | ||
13 | + | ||
14 | /* Add any other keys here */ | ||
15 | |||
16 | SDLK_LAST | ||
17 | diff -upr --exclude=configure --exclude=Makefile --exclude=Makefile.in libsdl1.2-1.2.4/src/video/x11/SDL_x11events.c libsdl1.2-1.2.4-arm/src/video/x11/SDL_x11events.c | ||
18 | --- libsdl1.2-1.2.4/src/video/x11/SDL_x11events.c 2002-03-06 11:23:08.000000000 +0000 | ||
19 | +++ libsdl1.2-1.2.4-arm/src/video/x11/SDL_x11events.c 2002-11-08 21:01:41.000000000 +0000 | ||
20 | @@ -34,6 +34,7 @@ static char rcsid = | ||
21 | #include <X11/Xlib.h> | ||
22 | #include <X11/Xutil.h> | ||
23 | #include <X11/keysym.h> | ||
24 | +#include <X11/XF86keysym.h> | ||
25 | #ifdef __SVR4 | ||
26 | #include <X11/Sunkeysym.h> | ||
27 | #endif | ||
28 | @@ -655,6 +656,25 @@ SDL_keysym *X11_TranslateKey(Display *di | ||
29 | case 0xFF: | ||
30 | keysym->sym = MISC_keymap[xsym&0xFF]; | ||
31 | break; | ||
32 | + case 0x1008ff: | ||
33 | + switch (xsym) { | ||
34 | + case XF86XK_AudioRecord: | ||
35 | + keysym->sym = SDLK_RECORD; | ||
36 | + break; | ||
37 | + case XF86XK_PowerDown: | ||
38 | + keysym->sym = SDLK_POWER; | ||
39 | + break; | ||
40 | + case XF86XK_Calendar: | ||
41 | + keysym->sym = SDLK_CALENDAR; | ||
42 | + break; | ||
43 | + case XF86XK_Mail: | ||
44 | + keysym->sym = SDLK_MAIL; | ||
45 | + break; | ||
46 | + case XF86XK_Start: | ||
47 | + keysym->sym = SDLK_START; | ||
48 | + break; | ||
49 | + } | ||
50 | + break; | ||
51 | default: | ||
52 | fprintf(stderr, | ||
53 | "X11: Unknown xsym, sym = 0x%04x\n", | ||
diff --git a/meta/packages/libsdl/files/kernel-asm-page.patch b/meta/packages/libsdl/files/kernel-asm-page.patch new file mode 100644 index 0000000000..42bceadfdc --- /dev/null +++ b/meta/packages/libsdl/files/kernel-asm-page.patch | |||
@@ -0,0 +1,13 @@ | |||
1 | diff --git a/src/video/Xext/Xxf86dga/XF86DGA.c b/src/video/Xext/Xxf86dga/XF86DGA.c | ||
2 | index 4e3d662..de38a3c 100644 | ||
3 | --- a/src/video/Xext/Xxf86dga/XF86DGA.c | ||
4 | +++ b/src/video/Xext/Xxf86dga/XF86DGA.c | ||
5 | @@ -18,7 +18,7 @@ Copyright (c) 1995,1996 The XFree86 Project, Inc | ||
6 | #define HAS_MMAP_ANON | ||
7 | #include <sys/types.h> | ||
8 | #include <sys/mman.h> | ||
9 | -#include <asm/page.h> /* PAGE_SIZE */ | ||
10 | +#include <unistd.h> | ||
11 | #define HAS_SC_PAGESIZE /* _SC_PAGESIZE may be an enum for Linux */ | ||
12 | #define HAS_GETPAGESIZE | ||
13 | #endif /* linux */ | ||
diff --git a/meta/packages/libsdl/libsdl-sdk_1.2.11.bb b/meta/packages/libsdl/libsdl-sdk_1.2.11.bb new file mode 100644 index 0000000000..ea65903824 --- /dev/null +++ b/meta/packages/libsdl/libsdl-sdk_1.2.11.bb | |||
@@ -0,0 +1,39 @@ | |||
1 | DESCRIPTION = "Simple DirectMedia Layer - native Edition" | ||
2 | HOMEPAGE = "http://www.libsdl.org" | ||
3 | SECTION = "libs" | ||
4 | LICENSE = "LGPL" | ||
5 | DEPENDS = "libx11-sdk libxext-sdk libxrandr-sdk libxrender-sdk" | ||
6 | RDEPENDS = "libx11-sdk libxrandr-sdk libxrender-sdk libxext-sdk" | ||
7 | PR = "r2" | ||
8 | |||
9 | SRC_URI = "http://www.libsdl.org/release/SDL-${PV}.tar.gz \ | ||
10 | file://acinclude.m4 \ | ||
11 | file://kernel-asm-page.patch;patch=1 " | ||
12 | S = "${WORKDIR}/SDL-${PV}" | ||
13 | |||
14 | inherit autotools binconfig pkgconfig sdk | ||
15 | |||
16 | EXTRA_OECONF = "--disable-static --disable-debug --disable-cdrom --enable-threads --enable-timers --enable-endian \ | ||
17 | --enable-file --disable-oss --disable-alsa --disable-esd --disable-arts \ | ||
18 | --disable-diskaudio --disable-nas --disable-esd-shared --disable-esdtest \ | ||
19 | --disable-mintaudio --disable-nasm --enable-video-x11 --disable-video-dga \ | ||
20 | --disable-video-fbcon --disable-video-directfb --disable-video-ps2gs \ | ||
21 | --disable-video-xbios --disable-video-gem --disable-video-dummy \ | ||
22 | --disable-video-opengl --enable-input-events --enable-pthreads \ | ||
23 | --disable-video-picogui --disable-video-qtopia --enable-dlopen" | ||
24 | |||
25 | do_configure() { | ||
26 | rm -f ${S}/acinclude.m4 | ||
27 | cp ${WORKDIR}/acinclude.m4 ${S}/ | ||
28 | gnu-configize | ||
29 | oe_runconf | ||
30 | cd ${S} | ||
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 | autotools_stage_all | ||
38 | install -m 0644 build/libSDLmain.a ${STAGING_LIBDIR} | ||
39 | } | ||