summaryrefslogtreecommitdiff
path: root/recipes/disko/files/pkgconfig.patch
blob: c405f0200e3b04491e82df69e896b624e1d2e911 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
Index: disko-1.6.0/SConstruct
===================================================================
--- disko-1.6.0.orig/SConstruct	2009-10-14 12:54:36.000000000 +0200
+++ disko-1.6.0/SConstruct	2009-11-17 18:22:49.656165471 +0100
@@ -580,6 +580,7 @@
 #######################################################################
 # TODO: handle disko_pc_libs                                          #
 if 'install' in BUILD_TARGETS:
+	PKG_CCFLAGS = ''
 	disko_pc = open('disko.pc', 'w')
 	disko_pc_requires = 'libxml-2.0 >= 2.6, sigc++-2.0, libpng >= 1.2, freetype2'
 	if env['LIBPATH']:
@@ -602,50 +603,76 @@
 	if env.has_key('libdl'):
 		disko_pc_libs += ' -ldl'
 
+        if('fbdev' in env['graphics']):
+                PKG_CCFLAGS += '-D__HAVE_FBDEV__ '
+
 	if 'dfb' in env['graphics']:
 		disko_pc_requires += ', directfb'
+                PKG_CCFLAGS += '-D__HAVE_DIRECTFB__ '
 	  
 	if 'x11' in env['graphics']:
 		disko_pc_requires += ', x11, xv, xxf86vm'
+                PKG_CCFLAGS += '-D__HAVE_XLIB__ '
+                PKG_CCFLAGS += '-D__ENABLE_MMSFB_X11_CORE__ '
+                PKG_CCFLAGS += '-D__ENABLE_MMSFBSURFACE_X11_CORE__ '
 		
 	if env['media'] and env['media'] != 'none':
 	 	disko_pc_requires += ', alsa'
 		if not env['big_lib'] and not env['static_lib']:
 			disko_pc_libs += ' -lmmsmedia'
+                        PKG_CCFLAGS += '-D__HAVE_MMSMEDIA__ -D__HAVE_MIXER__ '
 		
 	if 'xine' in env['media']:
 		if('x11' in env['graphics']):
 			disko_pc_requires += ', libxine >= 1.1.15'
 		else:
 			disko_pc_requires += ', libxine'
+                PKG_CCFLAGS += '-D__HAVE_XINE__ '
+                if conf.checkXineBlDvb():
+                        PKG_CCFLAGS += '-D__HAVE_XINE_BLDVB__ '
 
 	if 'gstreamer' in env['media']:
 		disko_pc_requires += ', gstreamer-0.10'
+                PKG_CCFLAGS += '-D__HAVE_GSTREAMER__ '
 
 	if env['enable_flash']:
 		disko_pc_requires += ', swfdec-' + swfdecversion
 		if not env['big_lib'] and not env['static_lib']:
 			disko_pc_libs += ' -lmmsflash'
+                        PKG_CCFLAGS += '-D__HAVE_MMSFLASH__ '
 
 	if env['enable_sip']:
 		disko_pc_requires += ', libpj'
 		if not env['big_lib'] and not env['static_lib']:
 			disko_pc_libs += ' -lmmssip'
+			PKG_CCFLAGS += '-D__HAVE_MMSSIP__ '
 		if('uuid' in env['LIBS']):
 			disko_pc_requires += ', uuid'
 		
 	if env['enable_mail']:
 		disko_pc_requires += ', vmime'
+		PKG_CCFLAGS += '-D__HAVE_VMIME__ '
 		
 	if env['enable_crypt']:
 		disko_pc_requires += ', openssl'
+		PKG_CCFLAGS += '-D__HAVE_MMSCRYPT__ '
 
 	if 'sqlite3' in env['database']:
 		disko_pc_requires += ', sqlite3'
+		PKG_CCFLAGS += '-D__ENABLE_SQLITE__ '
 		
 	if 'mysql' in env['database']:
 		disko_pc_requires += ', mysql'
 
+	if 'odbc' in env['database']:
+		PKG_CCFLAGS += '-D__ENABLE_FREETDS__ '
+
+	if env['messages']:
+		PKG_CCFLAGS += '-D__ENABLE_LOG__ '
+
+	if env['debug']:
+		PKG_CCFLAGS += '-D__ENABLE_DEBUG__ '
+
 	disko_pc.write('prefix=' + env['prefix'] + '\n')
 	disko_pc.write('exec_prefix=${prefix}\n')
 	disko_pc.write('libdir=${exec_prefix}/lib/disko\n')
@@ -656,13 +683,7 @@
 	disko_pc.write('Requires: ' + disko_pc_requires + '\n')
 	disko_pc.write('Libs: -L${libdir} ' + disko_pc_libs + '\n')
 	disko_pc.write('Cflags: -I${includedir}/ ')
-	for ccflag in env['CCFLAGS']:
-		if type(ccflag).__name__ == 'str' and not ccflag.startswith('-isystem'):
-			disko_pc.write(' ')
-			if(type(ccflag).__name__ == 'str'):
-				disko_pc.write(ccflag)
-			else:
-				disko_pc.write(' '.join(ccflag))
+        disko_pc.write(PKG_CCFLAGS)
 	disko_pc.write('\n')
 	
 	disko_pc.close()