disko: update git version, use INC_PR, re work disko.inc usage
[openembedded.git] / recipes / disko / disko-git / pkgconfig.patch
1 Index: git/SConstruct
2 ===================================================================
3 --- git.orig/SConstruct 2011-02-08 20:28:50.000000000 +0100
4 +++ git/SConstruct      2011-02-08 22:25:08.512491454 +0100
5 @@ -678,6 +678,7 @@
6  #######################################################################
7  # TODO: handle disko_pc_libs                                          #
8  if 'install' in BUILD_TARGETS:
9 +       PKG_CCFLAGS = ''
10         disko_pc = open('disko.pc', 'w')
11         disko_pc_requires = 'libxml-2.0 >= 2.6, sigc++-2.0, freetype2'
12         if (env['enable_curl']):
13 @@ -712,6 +713,9 @@
14                 else:
15                         disko_pc_libs_private += ' -ltiff'
16  
17 +       if('fbdev' in env['graphics']):
18 +               PKG_CCFLAGS += '-D__HAVE_FBDEV__ '
19 +
20         if env.has_key('libdl'):
21                 disko_pc_libs_private += ' -ldl'
22  
23 @@ -720,6 +724,10 @@
24          
25         if 'x11' in env['graphics']:
26                 disko_pc_requires += ', x11, xv, xxf86vm, xcomposite, xrender'
27 +               PKG_CCFLAGS += '-D__HAVE_XLIB__ '
28 +               PKG_CCFLAGS += '-D__ENABLE_MMSFB_X11_CORE__ '
29 +               PKG_CCFLAGS += '-D__ENABLE_MMSFBSURFACE_X11_CORE__ '
30 +
31                 if '-D__HAVE_OPENGL__' in env['CCFLAGS']:
32                         disko_pc_requires += ', gl, glu'
33         
34 @@ -733,23 +741,30 @@
35         if env['media'] and env['media'] != 'none':
36                 if not env['big_lib'] and not env['static_lib']:
37                         disko_pc_libs += ' -lmmsmedia'
38 +                        PKG_CCFLAGS += '-D__HAVE_MMSMEDIA__ -D__HAVE_MIXER__ '
39                 
40                 if 'xine' in env['media']:
41                         if('x11' in env['graphics']):
42                                 disko_pc_requires += ', libxine >= 1.1.15'
43                         else:
44                                 disko_pc_requires += ', libxine'
45 +                       PKG_CCFLAGS += '-D__HAVE_XINE__ '
46 +                       if conf.checkXineBlDvb():
47 +                               PKG_CCFLAGS += '-D__HAVE_XINE_BLDVB__ '
48  
49                 if 'gstreamer' in env['media']:
50                         disko_pc_requires += ', gstreamer-0.10'
51 +                       PKG_CCFLAGS += '-D__HAVE_GSTREAMER__ '
52  
53         if env['enable_flash']:
54                 disko_pc_requires += ', swfdec-' + swfdecversion
55 +               PKG_CCFLAGS += '-D__HAVE_MMSFLASH__ '
56                 if not env['big_lib'] and not env['static_lib']:
57                         disko_pc_libs += ' -lmmsflash'
58  
59         if env['enable_sip']:
60                 disko_pc_requires += ', libpj'
61 +               PKG_CCFLAGS += '-D__HAVE_MMSSIP__ '
62                 if not env['big_lib'] and not env['static_lib']:
63                         disko_pc_libs += ' -lmmssip'
64                 if('uuid' in env['LIBS']):
65 @@ -757,19 +772,32 @@
66                 
67         if env['enable_mail']:
68                 disko_pc_requires += ', vmime'
69 +               PKG_CCFLAGS += '-D__HAVE_VMIME__ '
70                 
71         if env['enable_crypt']:
72                 disko_pc_requires += ', openssl'
73 +               PKG_CCFLAGS += '-D__HAVE_MMSCRYPT__ '
74  
75         if 'sqlite3' in env['database']:
76                 disko_pc_requires += ', sqlite3'
77 +               PKG_CCFLAGS += '-D__ENABLE_SQLITE__ '
78                 
79         if 'mysql' in env['database']:
80                 disko_pc_requires += ', mysql'
81  
82 +       if 'odbc' in env['database']:
83 +               PKG_CCFLAGS += '-D__ENABLE_FREETDS__ '
84 +
85         if env['enable_swscale']:
86                 disko_pc_libs_private += ' -lswscale -lavutil'
87  
88 +       if env['messages']:
89 +               PKG_CCFLAGS += '-D__ENABLE_LOG__ '
90 +
91 +       if env['debug']:
92 +               PKG_CCFLAGS += '-D__ENABLE_DEBUG__ '
93 +
94 +
95         disko_pc.write('prefix=')
96         if env['destdir'] and env['destdir'] != 'none':
97                 disko_pc.write(env['destdir'] + '/')
98 @@ -784,12 +812,7 @@
99         disko_pc.write('Libs: -L${libdir} ' + disko_pc_libs + '\n')
100         disko_pc.write('Libs.private: ' + disko_pc_libs_private + '\n')
101         disko_pc.write('Cflags: -I${includedir}/ ')
102 -
103 -       for ccflag in env['CCFLAGS']:
104 -               if(type(ccflag).__name__ == 'str'):
105 -                       disko_pc.write(' ' + ccflag)
106 -               else:
107 -                       disko_pc.write(' ' + ' '.join(ccflag))
108 +       disko_pc.write(PKG_CCFLAGS)
109         disko_pc.write('\n')
110         
111         disko_pc.close()