[packages] Cleanup libSDL package Makefile
[openwrt/svn-archive/archive.git] / libs / libsdl / Makefile
1 #
2 # Copyright (C) 2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=SDL
11 PKG_VERSION:=1.2.14
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.libsdl.org/release/
16 PKG_MD5SUM:=e52086d1b508fa0b76c52ee30b55bec4
17
18 PKG_FIXUP:=libtool
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/libsdl
24 SECTION:=libs
25 CATEGORY:=Libraries
26 TITLE:=Simple DirectMedia Layer
27 URL:=http://www.libsdl.org
28 DEPENDS:=+DirectFB +zlib +libpthread
29 endef
30
31 define Package/libsdl/description
32 SDL is a library that allows programs portable low level access to a video
33 framebuffer, audio output, mouse, and keyboard.
34 endef
35
36 define Build/Configure
37 $(call Build/Configure/Default, \
38 --enable-libc \
39 --disable-audio \
40 --enable-video \
41 --disable-events \
42 --disable-joystick \
43 --disable-cdrom \
44 --enable-threads \
45 --enable-timers \
46 --enable-file \
47 --enable-loadso \
48 --enable-cpuinfo \
49 --enable-assembly \
50 --disable-oss \
51 --disable-alsa \
52 --disable-alsatest \
53 --enable-alsa-shared \
54 --disable-esd \
55 --disable-esdtest \
56 --enable-esd-shared \
57 --disable-pulseaudio \
58 --enable-pulseaudio-shared \
59 --disable-arts \
60 --enable-arts-shared \
61 --disable-nas \
62 --enable-nas-shared \
63 --disable-diskaudio \
64 --disable-dummyaudio \
65 --disable-mintaudio \
66 --disable-nasm \
67 --disable-altivec \
68 --disable-ipod \
69 --disable-nanox \
70 --disable-video-x11 \
71 --enable-x11-shared \
72 --enable-dga \
73 --enable-video-dga \
74 --enable-video-x11-dgamouse \
75 --enable-video-x11-vm \
76 --enable-video-x11-xv \
77 --disable-video-x11-xinerama \
78 --disable-video-x11-xme \
79 --disable-video-x11-xrandr \
80 --disable-video-photon \
81 --disable-video-carbon \
82 --disable-video-cocoa \
83 --disable-video-fbcon \
84 --enable-video-directfb \
85 --disable-video-ps2gs \
86 --disable-video-ps3 \
87 --disable-video-ggi \
88 --disable-video-svga \
89 --disable-video-vgl \
90 --disable-video-wscons \
91 --disable-video-aalib \
92 --disable-video-caca \
93 --disable-video-qtopia \
94 --disable-video-picogui \
95 --disable-video-xbios \
96 --disable-video-gem \
97 --disable-video-dummy \
98 --disable-video-opengl \
99 --disable-osmesa-shared \
100 --disable-screensaver \
101 --enable-input-events \
102 --disable-input-tslib \
103 --enable-pth \
104 --enable-pthreads \
105 --enable-pthread-sem \
106 --disable-stdio-redirect \
107 --disable-directx \
108 --enable-sdl-dlopen \
109 --disable-atari-ldg \
110 --disable-clock_gettime \
111 --without-x \
112 --enable-rpath \
113 , \
114 ac_cv_path_DIRECTFBCONFIG=no \
115 )
116 endef
117
118 define Build/InstallDev
119 $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
120 $(CP) \
121 $(PKG_INSTALL_DIR)/usr/include/SDL* \
122 $(1)/usr/include/
123 $(CP) \
124 $(PKG_INSTALL_DIR)/usr/lib/libSDL*.{a,so*} \
125 $(1)/usr/lib/
126 $(INSTALL_DATA) \
127 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
128 $(1)/usr/lib/pkgconfig
129
130
131 $(INSTALL_DIR) $(1)/usr/share/aclocal
132 $(INSTALL_DATA) \
133 $(PKG_INSTALL_DIR)/usr/share/aclocal/* \
134 $(1)/usr/share/aclocal/
135
136 $(INSTALL_DIR) $(1)/host/bin
137 $(INSTALL_BIN) \
138 $(PKG_INSTALL_DIR)/usr/bin/sdl-config \
139 $(1)/host/bin
140
141 $(SED) 's,^\(exec_prefix\|prefix\)=.*,\1=\"$(STAGING_DIR)/usr/\",g' \
142 $(1)/host/bin/sdl-config
143 endef
144
145 define Package/libsdl/install
146 $(INSTALL_DIR) $(1)/usr/lib
147 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libSDL*.so.* $(1)/usr/lib/
148 endef
149
150 $(eval $(call BuildPackage,libsdl))