[NEW] Added WxWidgets Platform
[ohcount] / rules / platforms.rb
1 # platforms
2 include Ohcount::Gestalt
3
4 class POSIX < Platform
5         # gnu_lib && generic
6         c_headers 'pthread.h', 'xstrtol.h', 'xreadlink.h', 'fatal-signal.h', 'diacrit.h', 'syslog.h', 'sys/stat.h'
7
8         # autoconf means m4 (unix macro processor)
9         language :autoconf
10 end
11
12 class Win32 < Platform
13         c_headers 'windows.h'
14         c_keywords 'WM_PAINT', 'ReleaseDC', 'WndProc', :min => 2
15 end
16
17 class Ruby < Platform
18         language :ruby, :min_percent => 15
19 end
20
21 class Rails < Platform
22         _and(
23                          platform(Ruby),
24                          ruby_keywords("RAILS_ROOT")
25                         )
26 end
27
28 class Java < Platform
29         language :java, :min_percent => 15
30 end
31
32 class Javascript < Platform
33         language :javascript, :min_percent => 20
34 end
35
36 class JQuery < Platform
37         filenames 'jquery-\d.\d.\d.min.js'
38 end
39
40 class SpringFramework < Platform
41         _and(
42                          platform(Java),
43                          filenames('spring\.jar$')
44                         )
45 end
46
47 class XWindows < Platform
48         c_headers 'Xlib.h', 'X11\/xpm.h', 'X11/Xlib.h'
49 end
50
51 class Mac < Platform
52         # apple events
53         c_keywords 'AppleEvent', 'AEBuildAppleEvent'
54
55         # plist is a mac thing, right?
56         filenames '\.plist'
57 end
58
59 class PHP < Platform
60         language :php, :min_percent => 15
61 end
62
63 class WxWidgets < Platform
64         c_headers 'wx/window.h'
65 end
66
67 class CakePHP < Platform
68         _and(
69                                 platform(PHP),
70                                 php_keywords('CAKE_CORE_INCLUDE_PATH')
71                          )
72 end
73
74 class KDE < Platform
75         c_headers 'KDEInit.h', 'kdeversion.h'
76 end
77
78 class SQL < Platform
79         language :sql
80 end
81
82 class MySQL < Platform
83         php_keywords('mysql_connect')
84 end
85
86 class PostgreSQL < Platform
87         php_keywords('pg_connect')
88 end
89
90 class EclipsePlatform < Platform
91         java_import 'org.eclipse.'
92 end