Date:2010-09-24 23:57:07 (13 years 6 months ago)
Author:kyak
Commit:7e5961a3fc16e3769569557ea8ce1ec054764fde
Message:stupid workaround to make links compile

Files: links/Makefile (2 diffs)
links/files/directfb-config (1 diff)

Change Details

links/Makefile
3333    Text and graphics WWW browser
3434endef
3535
36define Build/Prepare
37    $(call Build/Prepare/Default)
38    $(CP) $(FILES_DIR)/directfb-config $(PKG_BUILD_DIR)
39endef
40
3641CONFIGURE_ARGS += --enable-graphics \
3742  --enable-debuglevel=0 \
3843  --without-gpm \
...... 
4550TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/directfb
4651
4752CONFIGURE_VARS += \
48    DIRECTFB_CONFIG="$(STAGING_DIR)/root-xburst/usr/bin/directfb-config"
53    DIRECTFB_CONFIG="$(PKG_BUILD_DIR)/directfb-config $(STAGING_DIR)"
54#DIRECTFB_CONFIG="$(STAGING_DIR)/root-xburst/usr/bin/directfb-config"
4955
5056define Package/links/install
5157    $(INSTALL_DIR) $(1)/usr/bin
links/files/directfb-config
1#!/bin/sh
2
3prefix=$1/usr
4exec_prefix=$1/usr
5exec_prefix_set=no
6moduledir=${exec_prefix}/lib/directfb-1.4-0
7
8usage()
9{
10    cat <<EOF
11Usage: directfb-config [OPTIONS] [LIBRARIES]
12Options:
13    [--prefix[=DIR]]
14    [--exec-prefix[=DIR]]
15    [--version]
16    [--libs]
17    [--cflags]
18
19For static linking:
20    [--input=<driver>[,<driver>]...] (default: none)
21    [--graphics=<driver>[,<driver>]...] (default: none)
22    [--system=<system>[,<system>]...] (default: 'fbdev')
23    [--wm=<wm>[,<wm>]...] (default: 'default')
24    [--font=<impl>[,<impl>]...] (default: none)
25    [--imageprovider=<impl>[,<impl>]...] (default: none)
26    [--videoprovider=<impl>[,<impl>]...] (default: none)
27    [--fusionsound]
28    [--voodoo]
29
30Example for static linking:
31    directfb-config --libs --graphics=matrox,r200
32            --input=linux_input --font=ft2
33            --imageprovider=jpeg,png,gif
34EOF
35    exit $2
36}
37
38if test $# -eq 0; then
39    usage 1 1>&2
40fi
41
42lib_directfb=yes
43lib_avifile=no
44
45while test $# -gt 1; do
46  case "$2" in
47    -*=*) optarg=`echo "$2" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
48    *) optarg= ;;
49  esac
50
51  case $2 in
52    --prefix=*)
53      prefix=$optarg
54      if test $exec_prefix_set = no ; then
55        exec_prefix=$optarg
56      fi
57      ;;
58    --prefix)
59      echo_prefix=yes
60      ;;
61    --exec-prefix=*)
62      exec_prefix=$optarg
63      exec_prefix_set=yes
64      ;;
65    --exec-prefix)
66      echo_exec_prefix=yes
67      ;;
68    --version)
69      echo 1.4.2
70      ;;
71    --cflags)
72      echo_cflags=yes
73      ;;
74    --libs)
75      echo_libs=yes
76      ;;
77    directfb)
78      lib_directfb=yes
79      ;;
80    avifile)
81      lib_avifile=yes
82      ;;
83    --input=*)
84      if test -z "$optarg"; then
85        usage 2 1>&2
86      fi
87
88      for i in `echo $optarg | sed 's/,/ /g'`; do
89        echo_input="$echo_input $moduledir/inputdrivers/libdirectfb_$i.o"
90      done
91
92      echo_static=yes
93      ;;
94    --graphics=*)
95      if test -z "$optarg"; then
96        usage 2 1>&2
97      fi
98
99      for i in `echo $optarg | sed 's/,/ /g'`; do
100        echo_graphics="$echo_graphics $moduledir/gfxdrivers/libdirectfb_$i.o"
101      done
102
103      echo_static=yes
104      ;;
105    --font=*)
106      if test -z "$optarg"; then
107        usage 2 1>&2
108      fi
109
110      for i in `echo $optarg | sed 's/,/ /g'`; do
111        echo_font="$echo_font $moduledir/interfaces/IDirectFBFont/libidirectfbfont_$i.o"
112        case $i in
113          ft2)
114            echo_font="$echo_font -lfreetype"
115            ;;
116        esac
117      done
118
119      echo_static=yes
120      ;;
121    --system=*)
122      if test -z "$optarg"; then
123        usage 2 1>&2
124      fi
125
126      for i in `echo $optarg | sed 's/,/ /g'`; do
127        echo_system="$echo_system $moduledir/systems/libdirectfb_$i.o"
128        case $i in
129          fbdev)
130            echo_system="$echo_system "
131            ;;
132          sdl)
133            echo_system="$echo_system "
134            ;;
135        esac
136      done
137
138      echo_static=yes
139      ;;
140    --wm=*)
141      if test -z "$optarg"; then
142        usage 2 1>&2
143      fi
144
145      for i in `echo $optarg | sed 's/,/ /g'`; do
146        echo_wm="$echo_wm $moduledir/wm/libidirectfb_$i.o"
147        case $i in
148          unique)
149            echo_wm="$echo_wm -luniquewm"
150            ;;
151        esac
152      done
153
154      echo_static=yes
155      ;;
156    --imageprovider=*)
157      if test -z "$optarg"; then
158        usage 2 1>&2
159      fi
160
161      for i in `echo $optarg | sed 's/,/ /g'`; do
162        echo_imageprovider="$echo_imageprovider $moduledir/interfaces/IDirectFBImageProvider/libidirectfbimageprovider_$i.o"
163        case $i in
164          imlib2)
165            echo_imageprovider="$echo_imageprovider -lImlib2 -lttf -lm -lXext -lX11"
166            ;;
167          jpeg)
168            echo_imageprovider="$echo_imageprovider -ljpeg"
169            ;;
170          png)
171            echo_imageprovider="$echo_imageprovider -lpng -lz -lm"
172            ;;
173          gif)
174            ;;
175        esac
176      done
177
178      echo_static=yes
179      ;;
180    --videoprovider=*)
181      if test -z "$optarg"; then
182        usage 2 1>&2
183      fi
184
185      for i in `echo $optarg | sed 's/,/ /g'`; do
186        echo_videoprovider="$echo_videoprovider $moduledir/interfaces/IDirectFBVideoProvider/libidirectfbvideoprovider_$i.o"
187        case $i in
188          libmpeg3)
189            echo_videoprovider="$echo_videoprovider -lmpeg3"
190            ;;
191          swf)
192            echo_videoprovider="$echo_videoprovider -ljpeg -lz"
193            ;;
194          openquicktime)
195            echo_videoprovider="$echo_videoprovider -lopenquicktime -lz -lglib -lm"
196            ;;
197        esac
198      done
199
200      echo_static=yes
201      ;;
202    --fusionsound)
203      echo_fusionsound="-Wl,-uIFusionSound_default -lifusionsound"
204      echo_static=yes
205      ;;
206    --voodoo)
207      echo_voodoo=yes
208      echo_static=yes
209      ;;
210    *)
211      usage 1 1>&2
212      ;;
213  esac
214  shift
215done
216
217if test "$echo_prefix" = "yes"; then
218    echo $prefix
219fi
220
221if test "$echo_exec_prefix" = "yes"; then
222    echo $exec_prefix
223fi
224
225if test "$echo_cflags" = "yes"; then
226      if test ${prefix}/include/directfb != /usr/include ; then
227        cflags="-I${SYSROOT}${prefix}/include/directfb"
228      fi
229      echo $cflags -D_REENTRANT
230fi
231
232if test -n "$echo_static"; then
233    echo -static
234
235    if test -z "$echo_system"; then
236        echo $moduledir/systems/libdirectfb_fbdev.o
237    fi
238
239    if test -z "$echo_wm"; then
240        echo $moduledir/wm/libdirectfbwm_default.o
241    fi
242fi
243
244
245if test -n "$echo_font"; then
246    echo $echo_font
247fi
248
249if test -n "$echo_imageprovider"; then
250    echo $echo_imageprovider
251fi
252
253if test -n "$echo_videoprovider"; then
254    echo $echo_videoprovider
255fi
256
257
258if test -n "$echo_input"; then
259    echo $echo_input
260fi
261
262if test -n "$echo_graphics"; then
263    echo $echo_graphics
264fi
265
266if test -n "$echo_system"; then
267    echo $echo_system
268fi
269
270if test -n "$echo_wm"; then
271    echo $echo_wm
272fi
273
274if test -n "$echo_fusionsound"; then
275    echo -L${SYSROOT}$moduledir/interfaces/IFusionSound $echo_fusionsound
276fi
277
278
279print_voodoo ()
280{
281    echo $moduledir/interfaces/$1/lib$2_dispatcher.o $moduledir/interfaces/$1/lib$2_requestor.o
282}
283
284if test -n "$echo_voodoo"; then
285    print_voodoo IDirectFB idirectfb
286    print_voodoo IDirectFBDataBuffer idirectfbdatabuffer
287    print_voodoo IDirectFBDisplayLayer idirectfbdisplaylayer
288    print_voodoo IDirectFBEventBuffer idirectfbeventbuffer
289    print_voodoo IDirectFBFont idirectfbfont
290    print_voodoo IDirectFBImageProvider idirectfbimageprovider
291    print_voodoo IDirectFBInputDevice idirectfbinputdevice
292    print_voodoo IDirectFBPalette idirectfbpalette
293    print_voodoo IDirectFBScreen idirectfbscreen
294    print_voodoo IDirectFBSurface idirectfbsurface
295    print_voodoo IDirectFBWindow idirectfbwindow
296    echo -lvoodoo
297fi
298
299if test "$echo_libs" = "yes"; then
300      libs=-L${SYSROOT}${exec_prefix}/lib
301
302      if test "$lib_directfb" = "yes"; then
303     libs="$libs -ldirectfb -lfusion -ldirect -lpthread"
304
305     if test -n "$echo_static"; then
306        libs="$libs -ldl -lz"
307     fi
308      fi
309
310      if test "$lib_avifile" = "yes"; then
311     libs="$libs @AVIFILE_LIBS@"
312      fi
313
314      echo $libs
315fi

Archive Download the corresponding diff file



interactive