colouringcode-passenger 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/NEWS +129 -0
- data/Rakefile +2 -2
- data/bin/passenger-install-apache2-module +1 -0
- data/bin/passenger-install-nginx-module +4 -2
- data/ext/apache2/Hooks.cpp +4 -2
- data/ext/common/ApplicationPoolServer.h +1 -1
- data/ext/common/ApplicationPoolServerExecutable.cpp +1 -1
- data/ext/common/MessageChannel.h +48 -4
- data/ext/common/StandardApplicationPool.h +4 -2
- data/ext/common/Version.h +1 -1
- data/ext/nginx/Configuration.c +1 -1
- data/ext/nginx/HttpStatusExtractor.h +1 -0
- data/ext/nginx/ScgiRequestParser.h +1 -0
- data/ext/oxt/system_calls.cpp +11 -0
- data/ext/oxt/system_calls.hpp +2 -1
- data/ext/oxt/thread.hpp +97 -1
- data/ext/phusion_passenger/native_support.c +30 -1
- data/lib/phusion_passenger/constants.rb +1 -1
- data/lib/phusion_passenger/dependencies.rb +32 -0
- data/lib/phusion_passenger/message_channel.rb +45 -3
- data/lib/phusion_passenger/platform_info.rb +1 -1
- data/lib/phusion_passenger/rack/application_spawner.rb +10 -4
- data/lib/phusion_passenger/rack/request_handler.rb +2 -5
- data/lib/phusion_passenger/railz/application_spawner.rb +59 -7
- data/lib/phusion_passenger/utils.rb +70 -16
- data/{vendor/rack-1.0.0-git/lib/rack → lib/phusion_passenger/utils}/rewindable_input.rb +34 -9
- data/test/ApplicationPoolTest.cpp +1 -1
- data/test/MessageChannelTest.cpp +9 -1
- data/test/stub/message_channel.rb +1 -1
- data/test/stub/message_channel_2.rb +1 -1
- data/test/stub/message_channel_3.rb +2 -2
- metadata +43 -155
- data/doc/Architectural overview.html +0 -1
- data/doc/rdoc/classes/ConditionVariable.html +0 -194
- data/doc/rdoc/classes/Exception.html +0 -120
- data/doc/rdoc/classes/GC.html +0 -113
- data/doc/rdoc/classes/IO.html +0 -169
- data/doc/rdoc/classes/PhusionPassenger.html +0 -238
- data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +0 -153
- data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +0 -517
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +0 -719
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerAlreadyStarted.html +0 -97
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerError.html +0 -96
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerNotStarted.html +0 -97
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/UnknownMessage.html +0 -96
- data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +0 -598
- data/doc/rdoc/classes/PhusionPassenger/AdminTools.html +0 -140
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess.html +0 -317
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess/Instance.html +0 -138
- data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +0 -154
- data/doc/rdoc/classes/PhusionPassenger/Application.html +0 -283
- data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +0 -172
- data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +0 -145
- data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +0 -181
- data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +0 -141
- data/doc/rdoc/classes/PhusionPassenger/InvalidPath.html +0 -92
- data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +0 -489
- data/doc/rdoc/classes/PhusionPassenger/NativeSupport.html +0 -350
- data/doc/rdoc/classes/PhusionPassenger/Rack.html +0 -91
- data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html +0 -188
- data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +0 -199
- data/doc/rdoc/classes/PhusionPassenger/Railz.html +0 -95
- data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner.html +0 -438
- data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner/Error.html +0 -98
- data/doc/rdoc/classes/PhusionPassenger/Railz/CGIFixed.html +0 -200
- data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner.html +0 -436
- data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner/Error.html +0 -98
- data/doc/rdoc/classes/PhusionPassenger/Railz/RequestHandler.html +0 -155
- data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +0 -402
- data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +0 -125
- data/doc/rdoc/classes/PhusionPassenger/Utils.html +0 -803
- data/doc/rdoc/classes/PhusionPassenger/Utils/PseudoIO.html +0 -169
- data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +0 -140
- data/doc/rdoc/classes/PhusionPassenger/WSGI.html +0 -89
- data/doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html +0 -188
- data/doc/rdoc/classes/PlatformInfo.html +0 -866
- data/doc/rdoc/classes/RakeExtensions.html +0 -197
- data/doc/rdoc/classes/Signal.html +0 -131
- data/doc/rdoc/created.rid +0 -1
- data/doc/rdoc/files/DEVELOPERS_TXT.html +0 -255
- data/doc/rdoc/files/README.html +0 -175
- data/doc/rdoc/files/ext/phusion_passenger/native_support_c.html +0 -92
- data/doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html +0 -129
- data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +0 -129
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html +0 -126
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +0 -128
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools/control_process_rb.html +0 -130
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html +0 -122
- data/doc/rdoc/files/lib/phusion_passenger/application_rb.html +0 -127
- data/doc/rdoc/files/lib/phusion_passenger/console_text_template_rb.html +0 -126
- data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +0 -122
- data/doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html +0 -134
- data/doc/rdoc/files/lib/phusion_passenger/events_rb.html +0 -122
- data/doc/rdoc/files/lib/phusion_passenger/exceptions_rb.html +0 -122
- data/doc/rdoc/files/lib/phusion_passenger/html_template_rb.html +0 -126
- data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +0 -120
- data/doc/rdoc/files/lib/phusion_passenger/packaging_rb.html +0 -122
- data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +0 -127
- data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +0 -133
- data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +0 -125
- data/doc/rdoc/files/lib/phusion_passenger/railz/application_spawner_rb.html +0 -140
- data/doc/rdoc/files/lib/phusion_passenger/railz/cgi_fixed_rb.html +0 -126
- data/doc/rdoc/files/lib/phusion_passenger/railz/framework_spawner_rb.html +0 -145
- data/doc/rdoc/files/lib/phusion_passenger/railz/request_handler_rb.html +0 -125
- data/doc/rdoc/files/lib/phusion_passenger/simple_benchmarking_rb.html +0 -122
- data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +0 -159
- data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +0 -174
- data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +0 -129
- data/doc/rdoc/files/misc/rake/extensions_rb.html +0 -130
- data/doc/rdoc/fr_class_index.html +0 -91
- data/doc/rdoc/fr_file_index.html +0 -76
- data/doc/rdoc/fr_method_index.html +0 -205
- data/doc/rdoc/index.html +0 -26
- data/doc/rdoc/rdoc-style.css +0 -187
- data/vendor/README +0 -13
- data/vendor/README_FOR_PACKAGERS +0 -1
- data/vendor/rack-1.0.0-git/COPYING +0 -18
- data/vendor/rack-1.0.0-git/KNOWN-ISSUES +0 -18
- data/vendor/rack-1.0.0-git/README +0 -353
- data/vendor/rack-1.0.0-git/Rakefile +0 -164
- data/vendor/rack-1.0.0-git/lib/rack.rb +0 -90
- data/vendor/rack-1.0.0-git/lib/rack/adapter/camping.rb +0 -22
- data/vendor/rack-1.0.0-git/lib/rack/auth/abstract/handler.rb +0 -37
- data/vendor/rack-1.0.0-git/lib/rack/auth/abstract/request.rb +0 -37
- data/vendor/rack-1.0.0-git/lib/rack/auth/basic.rb +0 -58
- data/vendor/rack-1.0.0-git/lib/rack/auth/digest/md5.rb +0 -124
- data/vendor/rack-1.0.0-git/lib/rack/auth/digest/nonce.rb +0 -51
- data/vendor/rack-1.0.0-git/lib/rack/auth/digest/params.rb +0 -55
- data/vendor/rack-1.0.0-git/lib/rack/auth/digest/request.rb +0 -40
- data/vendor/rack-1.0.0-git/lib/rack/auth/openid.rb +0 -487
- data/vendor/rack-1.0.0-git/lib/rack/builder.rb +0 -63
- data/vendor/rack-1.0.0-git/lib/rack/cascade.rb +0 -41
- data/vendor/rack-1.0.0-git/lib/rack/chunked.rb +0 -49
- data/vendor/rack-1.0.0-git/lib/rack/commonlogger.rb +0 -52
- data/vendor/rack-1.0.0-git/lib/rack/conditionalget.rb +0 -47
- data/vendor/rack-1.0.0-git/lib/rack/content_length.rb +0 -29
- data/vendor/rack-1.0.0-git/lib/rack/content_type.rb +0 -23
- data/vendor/rack-1.0.0-git/lib/rack/deflater.rb +0 -96
- data/vendor/rack-1.0.0-git/lib/rack/directory.rb +0 -153
- data/vendor/rack-1.0.0-git/lib/rack/file.rb +0 -88
- data/vendor/rack-1.0.0-git/lib/rack/handler.rb +0 -69
- data/vendor/rack-1.0.0-git/lib/rack/handler/cgi.rb +0 -61
- data/vendor/rack-1.0.0-git/lib/rack/handler/evented_mongrel.rb +0 -8
- data/vendor/rack-1.0.0-git/lib/rack/handler/fastcgi.rb +0 -88
- data/vendor/rack-1.0.0-git/lib/rack/handler/lsws.rb +0 -55
- data/vendor/rack-1.0.0-git/lib/rack/handler/mongrel.rb +0 -84
- data/vendor/rack-1.0.0-git/lib/rack/handler/scgi.rb +0 -59
- data/vendor/rack-1.0.0-git/lib/rack/handler/swiftiplied_mongrel.rb +0 -8
- data/vendor/rack-1.0.0-git/lib/rack/handler/thin.rb +0 -18
- data/vendor/rack-1.0.0-git/lib/rack/handler/webrick.rb +0 -67
- data/vendor/rack-1.0.0-git/lib/rack/head.rb +0 -19
- data/vendor/rack-1.0.0-git/lib/rack/lint.rb +0 -537
- data/vendor/rack-1.0.0-git/lib/rack/lobster.rb +0 -65
- data/vendor/rack-1.0.0-git/lib/rack/lock.rb +0 -16
- data/vendor/rack-1.0.0-git/lib/rack/methodoverride.rb +0 -27
- data/vendor/rack-1.0.0-git/lib/rack/mime.rb +0 -204
- data/vendor/rack-1.0.0-git/lib/rack/mock.rb +0 -184
- data/vendor/rack-1.0.0-git/lib/rack/recursive.rb +0 -57
- data/vendor/rack-1.0.0-git/lib/rack/reloader.rb +0 -106
- data/vendor/rack-1.0.0-git/lib/rack/request.rb +0 -248
- data/vendor/rack-1.0.0-git/lib/rack/response.rb +0 -183
- data/vendor/rack-1.0.0-git/lib/rack/session/abstract/id.rb +0 -142
- data/vendor/rack-1.0.0-git/lib/rack/session/cookie.rb +0 -91
- data/vendor/rack-1.0.0-git/lib/rack/session/memcache.rb +0 -109
- data/vendor/rack-1.0.0-git/lib/rack/session/pool.rb +0 -100
- data/vendor/rack-1.0.0-git/lib/rack/showexceptions.rb +0 -349
- data/vendor/rack-1.0.0-git/lib/rack/showstatus.rb +0 -106
- data/vendor/rack-1.0.0-git/lib/rack/static.rb +0 -38
- data/vendor/rack-1.0.0-git/lib/rack/urlmap.rb +0 -55
- data/vendor/rack-1.0.0-git/lib/rack/utils.rb +0 -522
@@ -1,866 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
<html>
|
6
|
-
<head>
|
7
|
-
<title>Module: PlatformInfo</title>
|
8
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
10
|
-
|
11
|
-
<script language="JavaScript" type="text/javascript">
|
12
|
-
// <![CDATA[
|
13
|
-
|
14
|
-
function toggleSource( id )
|
15
|
-
{
|
16
|
-
var elem
|
17
|
-
var link
|
18
|
-
|
19
|
-
if( document.getElementById )
|
20
|
-
{
|
21
|
-
elem = document.getElementById( id )
|
22
|
-
link = document.getElementById( "l_" + id )
|
23
|
-
}
|
24
|
-
else if ( document.all )
|
25
|
-
{
|
26
|
-
elem = eval( "document.all." + id )
|
27
|
-
link = eval( "document.all.l_" + id )
|
28
|
-
}
|
29
|
-
else
|
30
|
-
return false;
|
31
|
-
|
32
|
-
if( elem.style.display == "block" )
|
33
|
-
{
|
34
|
-
elem.style.display = "none"
|
35
|
-
link.innerHTML = "show source"
|
36
|
-
}
|
37
|
-
else
|
38
|
-
{
|
39
|
-
elem.style.display = "block"
|
40
|
-
link.innerHTML = "hide source"
|
41
|
-
}
|
42
|
-
}
|
43
|
-
|
44
|
-
function openCode( url )
|
45
|
-
{
|
46
|
-
window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
|
47
|
-
}
|
48
|
-
// ]]>
|
49
|
-
</script>
|
50
|
-
</head>
|
51
|
-
|
52
|
-
<body>
|
53
|
-
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
54
|
-
<td class="file-title"><span class="file-title-prefix">Module</span><br />PlatformInfo</td>
|
55
|
-
<td align="right">
|
56
|
-
<table cellspacing="0" cellpadding="2">
|
57
|
-
<tr valign="top">
|
58
|
-
<td>In:</td>
|
59
|
-
<td>
|
60
|
-
<a href="../files/lib/phusion_passenger/platform_info_rb.html">lib/phusion_passenger/platform_info.rb</a>
|
61
|
-
</td>
|
62
|
-
</tr>
|
63
|
-
</table>
|
64
|
-
</td>
|
65
|
-
</tr>
|
66
|
-
</table>
|
67
|
-
<!-- banner header -->
|
68
|
-
|
69
|
-
<div id="bodyContent">
|
70
|
-
<div id="content">
|
71
|
-
|
72
|
-
<div class="description"><p>
|
73
|
-
This module autodetects various platform-specific information, and provides
|
74
|
-
that information through constants.
|
75
|
-
</p>
|
76
|
-
<p>
|
77
|
-
Users can change the detection behavior by setting the environment variable
|
78
|
-
<tt>APXS2</tt> to the correct ‘apxs’ (or ‘<a
|
79
|
-
href="PlatformInfo.html#M000013">apxs2</a>’) binary, as provided by
|
80
|
-
Apache.
|
81
|
-
</p>
|
82
|
-
</div>
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
<div class="sectiontitle">Methods</div>
|
87
|
-
<ul>
|
88
|
-
<li><a href="#M000018">apache2_bindir</a></li>
|
89
|
-
<li><a href="#M000023">apache2_module_cflags</a></li>
|
90
|
-
<li><a href="#M000024">apache2_module_ldflags</a></li>
|
91
|
-
<li><a href="#M000019">apache2_sbindir</a></li>
|
92
|
-
<li><a href="#M000014">apache2ctl</a></li>
|
93
|
-
<li><a href="#M000016">apr_config</a></li>
|
94
|
-
<li><a href="#M000029">apr_config_needed_for_building_apache_modules?</a></li>
|
95
|
-
<li><a href="#M000025">apr_flags</a></li>
|
96
|
-
<li><a href="#M000026">apr_libs</a></li>
|
97
|
-
<li><a href="#M000017">apu_config</a></li>
|
98
|
-
<li><a href="#M000027">apu_flags</a></li>
|
99
|
-
<li><a href="#M000028">apu_libs</a></li>
|
100
|
-
<li><a href="#M000013">apxs2</a></li>
|
101
|
-
<li><a href="#M000022">debugging_cflags</a></li>
|
102
|
-
<li><a href="#M000010">find_command</a></li>
|
103
|
-
<li><a href="#M000015">httpd</a></li>
|
104
|
-
<li><a href="#M000030">library_extension</a></li>
|
105
|
-
<li><a href="#M000031">linux_distro</a></li>
|
106
|
-
<li><a href="#M000032">linux_distro_tags</a></li>
|
107
|
-
<li><a href="#M000020">portability_cflags</a></li>
|
108
|
-
<li><a href="#M000021">portability_ldflags</a></li>
|
109
|
-
<li><a href="#M000011">rake</a></li>
|
110
|
-
<li><a href="#M000012">rspec</a></li>
|
111
|
-
</ul>
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
<div class="sectiontitle">Constants</div>
|
117
|
-
<table border='0' cellpadding='5'>
|
118
|
-
<tr valign='top'>
|
119
|
-
<td class="attr-name">RUBY</td>
|
120
|
-
<td>=</td>
|
121
|
-
<td class="attr-value">Config::CONFIG['bindir'] + '/' + Config::CONFIG['RUBY_INSTALL_NAME'] + Config::CONFIG['EXEEXT']</td>
|
122
|
-
</tr>
|
123
|
-
<tr valign='top'>
|
124
|
-
<td> </td>
|
125
|
-
<td colspan="2" class="attr-desc">
|
126
|
-
The absolute path to the current Ruby interpreter.
|
127
|
-
|
128
|
-
</td>
|
129
|
-
</tr>
|
130
|
-
<tr valign='top'>
|
131
|
-
<td class="attr-name">GEM</td>
|
132
|
-
<td>=</td>
|
133
|
-
<td class="attr-value">locate_ruby_executable('gem')</td>
|
134
|
-
</tr>
|
135
|
-
<tr valign='top'>
|
136
|
-
<td> </td>
|
137
|
-
<td colspan="2" class="attr-desc">
|
138
|
-
The correct ‘gem’ command for this Ruby interpreter.
|
139
|
-
|
140
|
-
</td>
|
141
|
-
</tr>
|
142
|
-
</table>
|
143
|
-
|
144
|
-
|
145
|
-
<div class="sectiontitle">Public Class methods</div>
|
146
|
-
<div class="method">
|
147
|
-
<div class="title">
|
148
|
-
<a name="M000018"></a><b>apache2_bindir</b>()
|
149
|
-
</div>
|
150
|
-
<div class="description">
|
151
|
-
<p>
|
152
|
-
The absolute path to the Apache 2 ‘bin’ directory.
|
153
|
-
</p>
|
154
|
-
</div>
|
155
|
-
<div class="sourcecode">
|
156
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000018_source')" id="l_M000018_source">show source</a> ]</p>
|
157
|
-
<div id="M000018_source" class="dyn-source">
|
158
|
-
<pre>
|
159
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 312</span>
|
160
|
-
312: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apache2_bindir</span>
|
161
|
-
313: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">apxs2</span>.<span class="ruby-identifier">nil?</span>
|
162
|
-
314: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
163
|
-
315: <span class="ruby-keyword kw">else</span>
|
164
|
-
316: <span class="ruby-keyword kw">return</span> <span class="ruby-node">`#{apxs2} -q BINDIR 2>/dev/null`</span>.<span class="ruby-identifier">strip</span>
|
165
|
-
317: <span class="ruby-keyword kw">end</span>
|
166
|
-
318: <span class="ruby-keyword kw">end</span>
|
167
|
-
</pre>
|
168
|
-
</div>
|
169
|
-
</div>
|
170
|
-
</div>
|
171
|
-
<div class="method">
|
172
|
-
<div class="title">
|
173
|
-
<a name="M000023"></a><b>apache2_module_cflags</b>(with_apr_flags = true)
|
174
|
-
</div>
|
175
|
-
<div class="description">
|
176
|
-
<p>
|
177
|
-
The C compiler flags that are necessary to compile an Apache module.
|
178
|
-
Possibly includes APR and APU compiler flags.
|
179
|
-
</p>
|
180
|
-
</div>
|
181
|
-
<div class="sourcecode">
|
182
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000023_source')" id="l_M000023_source">show source</a> ]</p>
|
183
|
-
<div id="M000023_source" class="dyn-source">
|
184
|
-
<pre>
|
185
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 384</span>
|
186
|
-
384: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apache2_module_cflags</span>(<span class="ruby-identifier">with_apr_flags</span> = <span class="ruby-keyword kw">true</span>)
|
187
|
-
385: <span class="ruby-identifier">flags</span> = [<span class="ruby-value str">"-fPIC"</span>]
|
188
|
-
386: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">with_apr_flags</span>
|
189
|
-
387: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">apr_flags</span>
|
190
|
-
388: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">apu_flags</span>
|
191
|
-
389: <span class="ruby-keyword kw">end</span>
|
192
|
-
390: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">apxs2</span>.<span class="ruby-identifier">nil?</span>
|
193
|
-
391: <span class="ruby-identifier">apxs2_flags</span> = <span class="ruby-node">`#{apxs2} -q CFLAGS`</span>.<span class="ruby-identifier">strip</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" -I"</span> <span class="ruby-operator"><<</span> <span class="ruby-node">`#{apxs2} -q INCLUDEDIR`</span>.<span class="ruby-identifier">strip</span>
|
194
|
-
392: <span class="ruby-identifier">apxs2_flags</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/-O\d? /</span>, <span class="ruby-value str">''</span>)
|
195
|
-
393:
|
196
|
-
394: <span class="ruby-comment cmt"># Remove flags not supported by GCC</span>
|
197
|
-
395: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris/</span> <span class="ruby-comment cmt"># TODO: Add support for people using SunStudio</span>
|
198
|
-
396: <span class="ruby-comment cmt"># The big problem is Coolstack apxs includes a bunch of solaris -x directives.</span>
|
199
|
-
397: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">apxs2_flags</span>.<span class="ruby-identifier">split</span>
|
200
|
-
398: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^\-x/</span> }
|
201
|
-
399: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^\-Xa/</span> }
|
202
|
-
400: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^\-fast/</span> }
|
203
|
-
401: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^\-mt/</span> }
|
204
|
-
402: <span class="ruby-identifier">apxs2_flags</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>)
|
205
|
-
403: <span class="ruby-keyword kw">end</span>
|
206
|
-
404:
|
207
|
-
405: <span class="ruby-identifier">apxs2_flags</span>.<span class="ruby-identifier">strip!</span>
|
208
|
-
406: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">apxs2_flags</span>
|
209
|
-
407: <span class="ruby-keyword kw">end</span>
|
210
|
-
408: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">httpd</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/darwin/</span>
|
211
|
-
409: <span class="ruby-comment cmt"># The default Apache install on OS X is a universal binary.</span>
|
212
|
-
410: <span class="ruby-comment cmt"># Figure out which architectures it's compiled for and do the same</span>
|
213
|
-
411: <span class="ruby-comment cmt"># thing for mod_passenger. We use the 'file' utility to do this.</span>
|
214
|
-
412: <span class="ruby-comment cmt">#</span>
|
215
|
-
413: <span class="ruby-comment cmt"># Running 'file' on the Apache executable usually outputs something</span>
|
216
|
-
414: <span class="ruby-comment cmt"># like this:</span>
|
217
|
-
415: <span class="ruby-comment cmt">#</span>
|
218
|
-
416: <span class="ruby-comment cmt"># /usr/sbin/httpd: Mach-O universal binary with 4 architectures</span>
|
219
|
-
417: <span class="ruby-comment cmt"># /usr/sbin/httpd (for architecture ppc7400): Mach-O executable ppc</span>
|
220
|
-
418: <span class="ruby-comment cmt"># /usr/sbin/httpd (for architecture ppc64): Mach-O 64-bit executable ppc64</span>
|
221
|
-
419: <span class="ruby-comment cmt"># /usr/sbin/httpd (for architecture i386): Mach-O executable i386</span>
|
222
|
-
420: <span class="ruby-comment cmt"># /usr/sbin/httpd (for architecture x86_64): Mach-O 64-bit executable x86_64</span>
|
223
|
-
421: <span class="ruby-comment cmt">#</span>
|
224
|
-
422: <span class="ruby-comment cmt"># But on some machines, it may output just:</span>
|
225
|
-
423: <span class="ruby-comment cmt">#</span>
|
226
|
-
424: <span class="ruby-comment cmt"># /usr/sbin/httpd: Mach-O fat file with 4 architectures</span>
|
227
|
-
425: <span class="ruby-comment cmt">#</span>
|
228
|
-
426: <span class="ruby-comment cmt"># (http://code.google.com/p/phusion-passenger/issues/detail?id=236)</span>
|
229
|
-
427: <span class="ruby-identifier">output</span> = <span class="ruby-node">`file "#{httpd}"`</span>.<span class="ruby-identifier">strip</span>
|
230
|
-
428: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">output</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/Mach-O fat file/</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">output</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/for architecture/</span>
|
231
|
-
429: <span class="ruby-identifier">architectures</span> = [<span class="ruby-value str">"-arch i386 -arch ppc -arch x86_64 -arch ppc64"</span>]
|
232
|
-
430: <span class="ruby-keyword kw">else</span>
|
233
|
-
431: <span class="ruby-identifier">architectures</span> = []
|
234
|
-
432: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">"\n"</span>).<span class="ruby-identifier">grep</span>(<span class="ruby-regexp re">/for architecture/</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
|
235
|
-
433: <span class="ruby-identifier">line</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/for architecture (.*?)\)/</span>
|
236
|
-
434: <span class="ruby-identifier">architectures</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"-arch #{$1}"</span>
|
237
|
-
435: <span class="ruby-keyword kw">end</span>
|
238
|
-
436: <span class="ruby-keyword kw">end</span>
|
239
|
-
437: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">architectures</span>.<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>)
|
240
|
-
438: <span class="ruby-keyword kw">end</span>
|
241
|
-
439: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">flags</span>.<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>).<span class="ruby-identifier">strip</span>
|
242
|
-
440: <span class="ruby-keyword kw">end</span>
|
243
|
-
</pre>
|
244
|
-
</div>
|
245
|
-
</div>
|
246
|
-
</div>
|
247
|
-
<div class="method">
|
248
|
-
<div class="title">
|
249
|
-
<a name="M000024"></a><b>apache2_module_ldflags</b>()
|
250
|
-
</div>
|
251
|
-
<div class="description">
|
252
|
-
<p>
|
253
|
-
Linker flags that are necessary for linking an Apache module. Possibly
|
254
|
-
includes APR and APU linker flags.
|
255
|
-
</p>
|
256
|
-
</div>
|
257
|
-
<div class="sourcecode">
|
258
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000024_source')" id="l_M000024_source">show source</a> ]</p>
|
259
|
-
<div id="M000024_source" class="dyn-source">
|
260
|
-
<pre>
|
261
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 445</span>
|
262
|
-
445: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apache2_module_ldflags</span>
|
263
|
-
446: <span class="ruby-identifier">flags</span> = <span class="ruby-node">"-fPIC #{apr_libs} #{apu_libs}"</span>
|
264
|
-
447: <span class="ruby-identifier">flags</span>.<span class="ruby-identifier">strip!</span>
|
265
|
-
448: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">flags</span>
|
266
|
-
449: <span class="ruby-keyword kw">end</span>
|
267
|
-
</pre>
|
268
|
-
</div>
|
269
|
-
</div>
|
270
|
-
</div>
|
271
|
-
<div class="method">
|
272
|
-
<div class="title">
|
273
|
-
<a name="M000019"></a><b>apache2_sbindir</b>()
|
274
|
-
</div>
|
275
|
-
<div class="description">
|
276
|
-
<p>
|
277
|
-
The absolute path to the Apache 2 ‘sbin’ directory.
|
278
|
-
</p>
|
279
|
-
</div>
|
280
|
-
<div class="sourcecode">
|
281
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000019_source')" id="l_M000019_source">show source</a> ]</p>
|
282
|
-
<div id="M000019_source" class="dyn-source">
|
283
|
-
<pre>
|
284
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 322</span>
|
285
|
-
322: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apache2_sbindir</span>
|
286
|
-
323: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">apxs2</span>.<span class="ruby-identifier">nil?</span>
|
287
|
-
324: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
288
|
-
325: <span class="ruby-keyword kw">else</span>
|
289
|
-
326: <span class="ruby-keyword kw">return</span> <span class="ruby-node">`#{apxs2} -q SBINDIR`</span>.<span class="ruby-identifier">strip</span>
|
290
|
-
327: <span class="ruby-keyword kw">end</span>
|
291
|
-
328: <span class="ruby-keyword kw">end</span>
|
292
|
-
</pre>
|
293
|
-
</div>
|
294
|
-
</div>
|
295
|
-
</div>
|
296
|
-
<div class="method">
|
297
|
-
<div class="title">
|
298
|
-
<a name="M000014"></a><b>apache2ctl</b>()
|
299
|
-
</div>
|
300
|
-
<div class="description">
|
301
|
-
<p>
|
302
|
-
The absolute path to the ‘apachectl’ or ‘<a
|
303
|
-
href="PlatformInfo.html#M000014">apache2ctl</a>’ binary.
|
304
|
-
</p>
|
305
|
-
</div>
|
306
|
-
<div class="sourcecode">
|
307
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000014_source')" id="l_M000014_source">show source</a> ]</p>
|
308
|
-
<div id="M000014_source" class="dyn-source">
|
309
|
-
<pre>
|
310
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 234</span>
|
311
|
-
234: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apache2ctl</span>
|
312
|
-
235: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">find_apache2_executable</span>(<span class="ruby-value str">'apache2ctl'</span>, <span class="ruby-value str">'apachectl2'</span>, <span class="ruby-value str">'apachectl'</span>)
|
313
|
-
236: <span class="ruby-keyword kw">end</span>
|
314
|
-
</pre>
|
315
|
-
</div>
|
316
|
-
</div>
|
317
|
-
</div>
|
318
|
-
<div class="method">
|
319
|
-
<div class="title">
|
320
|
-
<a name="M000016"></a><b>apr_config</b>()
|
321
|
-
</div>
|
322
|
-
<div class="description">
|
323
|
-
<p>
|
324
|
-
The absolute path to the ‘apr-config’ or
|
325
|
-
‘apr-1-config’ executable.
|
326
|
-
</p>
|
327
|
-
</div>
|
328
|
-
<div class="sourcecode">
|
329
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000016_source')" id="l_M000016_source">show source</a> ]</p>
|
330
|
-
<div id="M000016_source" class="dyn-source">
|
331
|
-
<pre>
|
332
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 258</span>
|
333
|
-
258: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apr_config</span>
|
334
|
-
259: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">env_defined?</span>(<span class="ruby-value str">'APR_CONFIG'</span>)
|
335
|
-
260: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'APR_CONFIG'</span>]
|
336
|
-
261: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">apxs2</span>.<span class="ruby-identifier">nil?</span>
|
337
|
-
262: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
338
|
-
263: <span class="ruby-keyword kw">else</span>
|
339
|
-
264: <span class="ruby-identifier">filename</span> = <span class="ruby-node">`#{apxs2} -q APR_CONFIG 2>/dev/null`</span>.<span class="ruby-identifier">strip</span>
|
340
|
-
265: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filename</span>.<span class="ruby-identifier">empty?</span>
|
341
|
-
266: <span class="ruby-identifier">apr_bindir</span> = <span class="ruby-node">`#{apxs2} -q APR_BINDIR 2>/dev/null`</span>.<span class="ruby-identifier">strip</span>
|
342
|
-
267: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">apr_bindir</span>.<span class="ruby-identifier">empty?</span>
|
343
|
-
268: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
344
|
-
269: <span class="ruby-keyword kw">else</span>
|
345
|
-
270: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">select_executable</span>(<span class="ruby-identifier">apr_bindir</span>,
|
346
|
-
271: <span class="ruby-value str">"apr-1-config"</span>, <span class="ruby-value str">"apr-config"</span>)
|
347
|
-
272: <span class="ruby-keyword kw">end</span>
|
348
|
-
273: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">filename</span>)
|
349
|
-
274: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">filename</span>
|
350
|
-
275: <span class="ruby-keyword kw">else</span>
|
351
|
-
276: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
352
|
-
277: <span class="ruby-keyword kw">end</span>
|
353
|
-
278: <span class="ruby-keyword kw">end</span>
|
354
|
-
279: <span class="ruby-keyword kw">end</span>
|
355
|
-
</pre>
|
356
|
-
</div>
|
357
|
-
</div>
|
358
|
-
</div>
|
359
|
-
<div class="method">
|
360
|
-
<div class="title">
|
361
|
-
<a name="M000029"></a><b>apr_config_needed_for_building_apache_modules?</b>()
|
362
|
-
</div>
|
363
|
-
<div class="description">
|
364
|
-
<p>
|
365
|
-
Returns whether it is necessary to use information outputted by
|
366
|
-
‘apr-config’ and ‘apu-config’ in order to compile
|
367
|
-
an Apache module. When Apache is installed with —with-included-apr,
|
368
|
-
the APR/APU headers are placed into the same directory as the Apache
|
369
|
-
headers, and so ‘apr-config’ and ‘apu-config’
|
370
|
-
won‘t be necessary in that case.
|
371
|
-
</p>
|
372
|
-
</div>
|
373
|
-
<div class="sourcecode">
|
374
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000029_source')" id="l_M000029_source">show source</a> ]</p>
|
375
|
-
<div id="M000029_source" class="dyn-source">
|
376
|
-
<pre>
|
377
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 481</span>
|
378
|
-
481: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apr_config_needed_for_building_apache_modules?</span>
|
379
|
-
482: <span class="ruby-identifier">filename</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-node">"/tmp/passenger-platform-check-#{Process.pid}.c"</span>)
|
380
|
-
483: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">"w"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
381
|
-
484: <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span>(<span class="ruby-value str">"#include <apr.h>"</span>)
|
382
|
-
485: <span class="ruby-keyword kw">end</span>
|
383
|
-
486: <span class="ruby-keyword kw">begin</span>
|
384
|
-
487: <span class="ruby-keyword kw">return</span> <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>(<span class="ruby-node">"(gcc #{apache2_module_cflags(false)} -c '#{filename}' -o '#{filename}.o') >/dev/null 2>/dev/null"</span>)
|
385
|
-
488: <span class="ruby-keyword kw">ensure</span>
|
386
|
-
489: <span class="ruby-constant">File</span>.<span class="ruby-identifier">unlink</span>(<span class="ruby-identifier">filename</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
|
387
|
-
490: <span class="ruby-constant">File</span>.<span class="ruby-identifier">unlink</span>(<span class="ruby-node">"#{filename}.o"</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
|
388
|
-
491: <span class="ruby-keyword kw">end</span>
|
389
|
-
492: <span class="ruby-keyword kw">end</span>
|
390
|
-
</pre>
|
391
|
-
</div>
|
392
|
-
</div>
|
393
|
-
</div>
|
394
|
-
<div class="method">
|
395
|
-
<div class="title">
|
396
|
-
<a name="M000025"></a><b>apr_flags</b>()
|
397
|
-
</div>
|
398
|
-
<div class="description">
|
399
|
-
<p>
|
400
|
-
The C compiler flags that are necessary for programs that use APR.
|
401
|
-
</p>
|
402
|
-
</div>
|
403
|
-
<div class="sourcecode">
|
404
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000025_source')" id="l_M000025_source">show source</a> ]</p>
|
405
|
-
<div id="M000025_source" class="dyn-source">
|
406
|
-
<pre>
|
407
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 453</span>
|
408
|
-
453: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apr_flags</span>
|
409
|
-
454: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">determine_apr_info</span>[<span class="ruby-value">0</span>]
|
410
|
-
455: <span class="ruby-keyword kw">end</span>
|
411
|
-
</pre>
|
412
|
-
</div>
|
413
|
-
</div>
|
414
|
-
</div>
|
415
|
-
<div class="method">
|
416
|
-
<div class="title">
|
417
|
-
<a name="M000026"></a><b>apr_libs</b>()
|
418
|
-
</div>
|
419
|
-
<div class="description">
|
420
|
-
<p>
|
421
|
-
The linker flags that are necessary for linking programs that use APR.
|
422
|
-
</p>
|
423
|
-
</div>
|
424
|
-
<div class="sourcecode">
|
425
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000026_source')" id="l_M000026_source">show source</a> ]</p>
|
426
|
-
<div id="M000026_source" class="dyn-source">
|
427
|
-
<pre>
|
428
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 458</span>
|
429
|
-
458: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apr_libs</span>
|
430
|
-
459: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">determine_apr_info</span>[<span class="ruby-value">1</span>]
|
431
|
-
460: <span class="ruby-keyword kw">end</span>
|
432
|
-
</pre>
|
433
|
-
</div>
|
434
|
-
</div>
|
435
|
-
</div>
|
436
|
-
<div class="method">
|
437
|
-
<div class="title">
|
438
|
-
<a name="M000017"></a><b>apu_config</b>()
|
439
|
-
</div>
|
440
|
-
<div class="description">
|
441
|
-
<p>
|
442
|
-
The absolute path to the ‘apu-config’ or
|
443
|
-
‘apu-1-config’ executable.
|
444
|
-
</p>
|
445
|
-
</div>
|
446
|
-
<div class="sourcecode">
|
447
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000017_source')" id="l_M000017_source">show source</a> ]</p>
|
448
|
-
<div id="M000017_source" class="dyn-source">
|
449
|
-
<pre>
|
450
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 283</span>
|
451
|
-
283: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apu_config</span>
|
452
|
-
284: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">env_defined?</span>(<span class="ruby-value str">'APU_CONFIG'</span>)
|
453
|
-
285: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'APU_CONFIG'</span>]
|
454
|
-
286: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">apxs2</span>.<span class="ruby-identifier">nil?</span>
|
455
|
-
287: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
456
|
-
288: <span class="ruby-keyword kw">else</span>
|
457
|
-
289: <span class="ruby-identifier">filename</span> = <span class="ruby-node">`#{apxs2} -q APU_CONFIG 2>/dev/null`</span>.<span class="ruby-identifier">strip</span>
|
458
|
-
290: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filename</span>.<span class="ruby-identifier">empty?</span>
|
459
|
-
291: <span class="ruby-identifier">apu_bindir</span> = <span class="ruby-node">`#{apxs2} -q APU_BINDIR 2>/dev/null`</span>.<span class="ruby-identifier">strip</span>
|
460
|
-
292: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">apu_bindir</span>.<span class="ruby-identifier">empty?</span>
|
461
|
-
293: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
462
|
-
294: <span class="ruby-keyword kw">else</span>
|
463
|
-
295: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">select_executable</span>(<span class="ruby-identifier">apu_bindir</span>,
|
464
|
-
296: <span class="ruby-value str">"apu-1-config"</span>, <span class="ruby-value str">"apu-config"</span>)
|
465
|
-
297: <span class="ruby-keyword kw">end</span>
|
466
|
-
298: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">filename</span>)
|
467
|
-
299: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">filename</span>
|
468
|
-
300: <span class="ruby-keyword kw">else</span>
|
469
|
-
301: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
470
|
-
302: <span class="ruby-keyword kw">end</span>
|
471
|
-
303: <span class="ruby-keyword kw">end</span>
|
472
|
-
304: <span class="ruby-keyword kw">end</span>
|
473
|
-
</pre>
|
474
|
-
</div>
|
475
|
-
</div>
|
476
|
-
</div>
|
477
|
-
<div class="method">
|
478
|
-
<div class="title">
|
479
|
-
<a name="M000027"></a><b>apu_flags</b>()
|
480
|
-
</div>
|
481
|
-
<div class="description">
|
482
|
-
<p>
|
483
|
-
The C compiler flags that are necessary for programs that use APR-Util.
|
484
|
-
</p>
|
485
|
-
</div>
|
486
|
-
<div class="sourcecode">
|
487
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000027_source')" id="l_M000027_source">show source</a> ]</p>
|
488
|
-
<div id="M000027_source" class="dyn-source">
|
489
|
-
<pre>
|
490
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 463</span>
|
491
|
-
463: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apu_flags</span>
|
492
|
-
464: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">determine_apu_info</span>[<span class="ruby-value">0</span>]
|
493
|
-
465: <span class="ruby-keyword kw">end</span>
|
494
|
-
</pre>
|
495
|
-
</div>
|
496
|
-
</div>
|
497
|
-
</div>
|
498
|
-
<div class="method">
|
499
|
-
<div class="title">
|
500
|
-
<a name="M000028"></a><b>apu_libs</b>()
|
501
|
-
</div>
|
502
|
-
<div class="description">
|
503
|
-
<p>
|
504
|
-
The linker flags that are necessary for linking programs that use APR-Util.
|
505
|
-
</p>
|
506
|
-
</div>
|
507
|
-
<div class="sourcecode">
|
508
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000028_source')" id="l_M000028_source">show source</a> ]</p>
|
509
|
-
<div id="M000028_source" class="dyn-source">
|
510
|
-
<pre>
|
511
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 468</span>
|
512
|
-
468: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apu_libs</span>
|
513
|
-
469: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">determine_apu_info</span>[<span class="ruby-value">1</span>]
|
514
|
-
470: <span class="ruby-keyword kw">end</span>
|
515
|
-
</pre>
|
516
|
-
</div>
|
517
|
-
</div>
|
518
|
-
</div>
|
519
|
-
<div class="method">
|
520
|
-
<div class="title">
|
521
|
-
<a name="M000013"></a><b>apxs2</b>()
|
522
|
-
</div>
|
523
|
-
<div class="description">
|
524
|
-
<p>
|
525
|
-
The absolute path to the ‘apxs’ or ‘<a
|
526
|
-
href="PlatformInfo.html#M000013">apxs2</a>’ executable, or nil if not
|
527
|
-
found.
|
528
|
-
</p>
|
529
|
-
</div>
|
530
|
-
<div class="sourcecode">
|
531
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000013_source')" id="l_M000013_source">show source</a> ]</p>
|
532
|
-
<div id="M000013_source" class="dyn-source">
|
533
|
-
<pre>
|
534
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 219</span>
|
535
|
-
219: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apxs2</span>
|
536
|
-
220: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">env_defined?</span>(<span class="ruby-value str">"APXS2"</span>)
|
537
|
-
221: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"APXS2"</span>]
|
538
|
-
222: <span class="ruby-keyword kw">end</span>
|
539
|
-
223: [<span class="ruby-value str">'apxs2'</span>, <span class="ruby-value str">'apxs'</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
|
540
|
-
224: <span class="ruby-identifier">command</span> = <span class="ruby-identifier">find_command</span>(<span class="ruby-identifier">name</span>)
|
541
|
-
225: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">command</span>.<span class="ruby-identifier">nil?</span>
|
542
|
-
226: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">command</span>
|
543
|
-
227: <span class="ruby-keyword kw">end</span>
|
544
|
-
228: <span class="ruby-keyword kw">end</span>
|
545
|
-
229: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
546
|
-
230: <span class="ruby-keyword kw">end</span>
|
547
|
-
</pre>
|
548
|
-
</div>
|
549
|
-
</div>
|
550
|
-
</div>
|
551
|
-
<div class="method">
|
552
|
-
<div class="title">
|
553
|
-
<a name="M000022"></a><b>debugging_cflags</b>()
|
554
|
-
</div>
|
555
|
-
<div class="description">
|
556
|
-
<p>
|
557
|
-
C compiler flags that should be passed in order to enable debugging
|
558
|
-
information.
|
559
|
-
</p>
|
560
|
-
</div>
|
561
|
-
<div class="sourcecode">
|
562
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000022_source')" id="l_M000022_source">show source</a> ]</p>
|
563
|
-
<div id="M000022_source" class="dyn-source">
|
564
|
-
<pre>
|
565
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 371</span>
|
566
|
-
371: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">debugging_cflags</span>
|
567
|
-
372: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/openbsd/</span>
|
568
|
-
373: <span class="ruby-comment cmt"># According to OpenBSD's pthreads man page, pthreads do not work</span>
|
569
|
-
374: <span class="ruby-comment cmt"># correctly when an app is compiled with -g. It recommends using</span>
|
570
|
-
375: <span class="ruby-comment cmt"># -ggdb instead.</span>
|
571
|
-
376: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'-ggdb'</span>
|
572
|
-
377: <span class="ruby-keyword kw">else</span>
|
573
|
-
378: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'-g'</span>
|
574
|
-
379: <span class="ruby-keyword kw">end</span>
|
575
|
-
380: <span class="ruby-keyword kw">end</span>
|
576
|
-
</pre>
|
577
|
-
</div>
|
578
|
-
</div>
|
579
|
-
</div>
|
580
|
-
<div class="method">
|
581
|
-
<div class="title">
|
582
|
-
<a name="M000010"></a><b>find_command</b>(name)
|
583
|
-
</div>
|
584
|
-
<div class="description">
|
585
|
-
<p>
|
586
|
-
Check whether the specified command is in $PATH, and return its absolute
|
587
|
-
filename. Returns nil if the command is not found.
|
588
|
-
</p>
|
589
|
-
<p>
|
590
|
-
This function exists because system(‘which’) doesn‘t
|
591
|
-
always behave correctly, for some weird reason.
|
592
|
-
</p>
|
593
|
-
</div>
|
594
|
-
<div class="sourcecode">
|
595
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000010_source')" id="l_M000010_source">show source</a> ]</p>
|
596
|
-
<div id="M000010_source" class="dyn-source">
|
597
|
-
<pre>
|
598
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 188</span>
|
599
|
-
188: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">find_command</span>(<span class="ruby-identifier">name</span>)
|
600
|
-
189: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'PATH'</span>].<span class="ruby-identifier">split</span>(<span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">PATH_SEPARATOR</span>).<span class="ruby-identifier">detect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">directory</span><span class="ruby-operator">|</span>
|
601
|
-
190: <span class="ruby-identifier">path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">directory</span>, <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>)
|
602
|
-
191: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">executable?</span>(<span class="ruby-identifier">path</span>)
|
603
|
-
192: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">path</span>
|
604
|
-
193: <span class="ruby-keyword kw">end</span>
|
605
|
-
194: <span class="ruby-keyword kw">end</span>
|
606
|
-
195: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
607
|
-
196: <span class="ruby-keyword kw">end</span>
|
608
|
-
</pre>
|
609
|
-
</div>
|
610
|
-
</div>
|
611
|
-
</div>
|
612
|
-
<div class="method">
|
613
|
-
<div class="title">
|
614
|
-
<a name="M000015"></a><b>httpd</b>()
|
615
|
-
</div>
|
616
|
-
<div class="description">
|
617
|
-
<p>
|
618
|
-
The absolute path to the Apache binary (that is, ‘<a
|
619
|
-
href="PlatformInfo.html#M000015">httpd</a>’, ‘httpd2’,
|
620
|
-
‘apache’ or ‘apache2’).
|
621
|
-
</p>
|
622
|
-
</div>
|
623
|
-
<div class="sourcecode">
|
624
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000015_source')" id="l_M000015_source">show source</a> ]</p>
|
625
|
-
<div id="M000015_source" class="dyn-source">
|
626
|
-
<pre>
|
627
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 240</span>
|
628
|
-
240: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">httpd</span>
|
629
|
-
241: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">env_defined?</span>(<span class="ruby-value str">'HTTPD'</span>)
|
630
|
-
242: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'HTTPD'</span>]
|
631
|
-
243: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">apxs2</span>.<span class="ruby-identifier">nil?</span>
|
632
|
-
244: [<span class="ruby-value str">"apache2"</span>, <span class="ruby-value str">"httpd2"</span>, <span class="ruby-value str">"apache"</span>, <span class="ruby-value str">"httpd"</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
|
633
|
-
245: <span class="ruby-identifier">command</span> = <span class="ruby-identifier">find_command</span>(<span class="ruby-identifier">name</span>)
|
634
|
-
246: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">command</span>.<span class="ruby-identifier">nil?</span>
|
635
|
-
247: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">command</span>
|
636
|
-
248: <span class="ruby-keyword kw">end</span>
|
637
|
-
249: <span class="ruby-keyword kw">end</span>
|
638
|
-
250: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
639
|
-
251: <span class="ruby-keyword kw">else</span>
|
640
|
-
252: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">find_apache2_executable</span>(<span class="ruby-node">`#{apxs2} -q TARGET`</span>.<span class="ruby-identifier">strip</span>)
|
641
|
-
253: <span class="ruby-keyword kw">end</span>
|
642
|
-
254: <span class="ruby-keyword kw">end</span>
|
643
|
-
</pre>
|
644
|
-
</div>
|
645
|
-
</div>
|
646
|
-
</div>
|
647
|
-
<div class="method">
|
648
|
-
<div class="title">
|
649
|
-
<a name="M000030"></a><b>library_extension</b>()
|
650
|
-
</div>
|
651
|
-
<div class="description">
|
652
|
-
<p>
|
653
|
-
The current platform‘s shared library extension (‘so’ on
|
654
|
-
most Unices).
|
655
|
-
</p>
|
656
|
-
</div>
|
657
|
-
<div class="sourcecode">
|
658
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000030_source')" id="l_M000030_source">show source</a> ]</p>
|
659
|
-
<div id="M000030_source" class="dyn-source">
|
660
|
-
<pre>
|
661
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 496</span>
|
662
|
-
496: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">library_extension</span>
|
663
|
-
497: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/darwin/</span>
|
664
|
-
498: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">"bundle"</span>
|
665
|
-
499: <span class="ruby-keyword kw">else</span>
|
666
|
-
500: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">"so"</span>
|
667
|
-
501: <span class="ruby-keyword kw">end</span>
|
668
|
-
502: <span class="ruby-keyword kw">end</span>
|
669
|
-
</pre>
|
670
|
-
</div>
|
671
|
-
</div>
|
672
|
-
</div>
|
673
|
-
<div class="method">
|
674
|
-
<div class="title">
|
675
|
-
<a name="M000031"></a><b>linux_distro</b>()
|
676
|
-
</div>
|
677
|
-
<div class="description">
|
678
|
-
<p>
|
679
|
-
An identifier for the current Linux distribution. nil if the operating
|
680
|
-
system is not Linux.
|
681
|
-
</p>
|
682
|
-
</div>
|
683
|
-
<div class="sourcecode">
|
684
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000031_source')" id="l_M000031_source">show source</a> ]</p>
|
685
|
-
<div id="M000031_source" class="dyn-source">
|
686
|
-
<pre>
|
687
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 505</span>
|
688
|
-
505: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">linux_distro</span>
|
689
|
-
506: <span class="ruby-identifier">tags</span> = <span class="ruby-identifier">linux_distro_tags</span>
|
690
|
-
507: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">tags</span>
|
691
|
-
508: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">tags</span>.<span class="ruby-identifier">first</span>
|
692
|
-
509: <span class="ruby-keyword kw">else</span>
|
693
|
-
510: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
694
|
-
511: <span class="ruby-keyword kw">end</span>
|
695
|
-
512: <span class="ruby-keyword kw">end</span>
|
696
|
-
</pre>
|
697
|
-
</div>
|
698
|
-
</div>
|
699
|
-
</div>
|
700
|
-
<div class="method">
|
701
|
-
<div class="title">
|
702
|
-
<a name="M000032"></a><b>linux_distro_tags</b>()
|
703
|
-
</div>
|
704
|
-
<div class="description">
|
705
|
-
<p>
|
706
|
-
Autodetects the current Linux distribution and return a number of
|
707
|
-
identifier tags. The first tag identifies the distribution while the other
|
708
|
-
tags indicate which distributions it is likely compatible with. Returns nil
|
709
|
-
if the operating system is not Linux.
|
710
|
-
</p>
|
711
|
-
</div>
|
712
|
-
<div class="sourcecode">
|
713
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000032_source')" id="l_M000032_source">show source</a> ]</p>
|
714
|
-
<div id="M000032_source" class="dyn-source">
|
715
|
-
<pre>
|
716
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 518</span>
|
717
|
-
518: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">linux_distro_tags</span>
|
718
|
-
519: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/linux/</span>
|
719
|
-
520: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
720
|
-
521: <span class="ruby-keyword kw">end</span>
|
721
|
-
522: <span class="ruby-identifier">lsb_release</span> = <span class="ruby-identifier">read_file</span>(<span class="ruby-value str">"/etc/lsb-release"</span>)
|
722
|
-
523: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lsb_release</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/Ubuntu/</span>
|
723
|
-
524: <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">:ubuntu</span>, <span class="ruby-identifier">:debian</span>]
|
724
|
-
525: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-value str">"/etc/debian_version"</span>)
|
725
|
-
526: <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">:debian</span>]
|
726
|
-
527: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-value str">"/etc/redhat-release"</span>)
|
727
|
-
528: <span class="ruby-identifier">redhat_release</span> = <span class="ruby-identifier">read_file</span>(<span class="ruby-value str">"/etc/redhat-release"</span>)
|
728
|
-
529: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">redhat_release</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/CentOS/</span>
|
729
|
-
530: <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">:centos</span>, <span class="ruby-identifier">:redhat</span>]
|
730
|
-
531: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">redhat_release</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/Fedora/</span>
|
731
|
-
532: <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">:fedora</span>, <span class="ruby-identifier">:redhat</span>]
|
732
|
-
533: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">redhat_release</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/Mandriva/</span>
|
733
|
-
534: <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">:mandriva</span>, <span class="ruby-identifier">:redhat</span>]
|
734
|
-
535: <span class="ruby-keyword kw">else</span>
|
735
|
-
536: <span class="ruby-comment cmt"># On official RHEL distros, the content is in the form of</span>
|
736
|
-
537: <span class="ruby-comment cmt"># "Red Hat Enterprise Linux Server release 5.1 (Tikanga)"</span>
|
737
|
-
538: <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">:rhel</span>, <span class="ruby-identifier">:redhat</span>]
|
738
|
-
539: <span class="ruby-keyword kw">end</span>
|
739
|
-
540: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-value str">"/etc/suse-release"</span>)
|
740
|
-
541: <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">:suse</span>]
|
741
|
-
542: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-value str">"/etc/gentoo-release"</span>)
|
742
|
-
543: <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">:gentoo</span>]
|
743
|
-
544: <span class="ruby-keyword kw">else</span>
|
744
|
-
545: <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">:unknown</span>]
|
745
|
-
546: <span class="ruby-keyword kw">end</span>
|
746
|
-
547: <span class="ruby-comment cmt"># TODO: Slackware</span>
|
747
|
-
548: <span class="ruby-keyword kw">end</span>
|
748
|
-
</pre>
|
749
|
-
</div>
|
750
|
-
</div>
|
751
|
-
</div>
|
752
|
-
<div class="method">
|
753
|
-
<div class="title">
|
754
|
-
<a name="M000020"></a><b>portability_cflags</b>()
|
755
|
-
</div>
|
756
|
-
<div class="description">
|
757
|
-
<p>
|
758
|
-
Compiler flags that should be used for compiling every C/C++ program, for
|
759
|
-
portability reasons. These flags should be specified as last when invoking
|
760
|
-
the compiler.
|
761
|
-
</p>
|
762
|
-
</div>
|
763
|
-
<div class="sourcecode">
|
764
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000020_source')" id="l_M000020_source">show source</a> ]</p>
|
765
|
-
<div id="M000020_source" class="dyn-source">
|
766
|
-
<pre>
|
767
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 338</span>
|
768
|
-
338: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">portability_cflags</span>
|
769
|
-
339: <span class="ruby-identifier">flags</span> = [<span class="ruby-value str">"-D_REENTRANT -I/usr/local/include"</span>]
|
770
|
-
340: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris/</span>
|
771
|
-
341: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-D_XOPEN_SOURCE=500 -D_XPG4_2 -D__EXTENSIONS__ -D__SOLARIS__ -D_FILE_OFFSET_BITS=64'</span>
|
772
|
-
342: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-DBOOST_HAS_STDINT_H'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris2.9/</span>
|
773
|
-
343: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-D__SOLARIS9__ -DBOOST__STDC_CONSTANT_MACROS_DEFINED'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris2.9/</span>
|
774
|
-
344: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-mcpu=ultrasparc'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/sparc/</span>
|
775
|
-
345: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/openbsd/</span>
|
776
|
-
346: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-DBOOST_HAS_STDINT_H -D_GLIBCPP__PTHREADS'</span>
|
777
|
-
347: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/aix/</span>
|
778
|
-
348: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-DOXT_DISABLE_BACKTRACES'</span>
|
779
|
-
349: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/(sparc-linux|arm-linux)/</span>
|
780
|
-
350: <span class="ruby-comment cmt"># http://code.google.com/p/phusion-passenger/issues/detail?id=200</span>
|
781
|
-
351: <span class="ruby-comment cmt"># http://groups.google.com/group/phusion-passenger/t/6b904a962ee28e5c</span>
|
782
|
-
352: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-DBOOST_SP_USE_PTHREADS'</span>
|
783
|
-
353: <span class="ruby-keyword kw">end</span>
|
784
|
-
354: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">flags</span>.<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">" "</span>).<span class="ruby-identifier">strip</span>
|
785
|
-
355: <span class="ruby-keyword kw">end</span>
|
786
|
-
</pre>
|
787
|
-
</div>
|
788
|
-
</div>
|
789
|
-
</div>
|
790
|
-
<div class="method">
|
791
|
-
<div class="title">
|
792
|
-
<a name="M000021"></a><b>portability_ldflags</b>()
|
793
|
-
</div>
|
794
|
-
<div class="description">
|
795
|
-
<p>
|
796
|
-
Linker flags that should be used for linking every C/C++ program, for
|
797
|
-
portability reasons. These flags should be specified as last when invoking
|
798
|
-
the linker.
|
799
|
-
</p>
|
800
|
-
</div>
|
801
|
-
<div class="sourcecode">
|
802
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000021_source')" id="l_M000021_source">show source</a> ]</p>
|
803
|
-
<div id="M000021_source" class="dyn-source">
|
804
|
-
<pre>
|
805
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 361</span>
|
806
|
-
361: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">portability_ldflags</span>
|
807
|
-
362: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris/</span>
|
808
|
-
363: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'-lxnet -lrt -lsocket -lnsl -lpthread'</span>
|
809
|
-
364: <span class="ruby-keyword kw">else</span>
|
810
|
-
365: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'-lpthread'</span>
|
811
|
-
366: <span class="ruby-keyword kw">end</span>
|
812
|
-
367: <span class="ruby-keyword kw">end</span>
|
813
|
-
</pre>
|
814
|
-
</div>
|
815
|
-
</div>
|
816
|
-
</div>
|
817
|
-
<div class="method">
|
818
|
-
<div class="title">
|
819
|
-
<a name="M000011"></a><b>rake</b>()
|
820
|
-
</div>
|
821
|
-
<div class="description">
|
822
|
-
<p>
|
823
|
-
Returns the absolute path to the Rake executable that belongs to the
|
824
|
-
current Ruby interpreter. Returns nil if it doesn‘t exist.
|
825
|
-
</p>
|
826
|
-
</div>
|
827
|
-
<div class="sourcecode">
|
828
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000011_source')" id="l_M000011_source">show source</a> ]</p>
|
829
|
-
<div id="M000011_source" class="dyn-source">
|
830
|
-
<pre>
|
831
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 205</span>
|
832
|
-
205: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">rake</span>
|
833
|
-
206: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">locate_ruby_executable</span>(<span class="ruby-value str">'rake'</span>)
|
834
|
-
207: <span class="ruby-keyword kw">end</span>
|
835
|
-
</pre>
|
836
|
-
</div>
|
837
|
-
</div>
|
838
|
-
</div>
|
839
|
-
<div class="method">
|
840
|
-
<div class="title">
|
841
|
-
<a name="M000012"></a><b>rspec</b>()
|
842
|
-
</div>
|
843
|
-
<div class="description">
|
844
|
-
<p>
|
845
|
-
Returns the absolute path to the RSpec runner program that belongs to the
|
846
|
-
current Ruby interpreter. Returns nil if it doesn‘t exist.
|
847
|
-
</p>
|
848
|
-
</div>
|
849
|
-
<div class="sourcecode">
|
850
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000012_source')" id="l_M000012_source">show source</a> ]</p>
|
851
|
-
<div id="M000012_source" class="dyn-source">
|
852
|
-
<pre>
|
853
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 213</span>
|
854
|
-
213: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">rspec</span>
|
855
|
-
214: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">locate_ruby_executable</span>(<span class="ruby-value str">'spec'</span>)
|
856
|
-
215: <span class="ruby-keyword kw">end</span>
|
857
|
-
</pre>
|
858
|
-
</div>
|
859
|
-
</div>
|
860
|
-
</div>
|
861
|
-
</div>
|
862
|
-
|
863
|
-
</div>
|
864
|
-
|
865
|
-
</body>
|
866
|
-
</html>
|