rev_httpserver 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/ext/extconf.rb +133 -0
  2. metadata +58 -0
@@ -0,0 +1,133 @@
1
+ #----------------------------------------------------------------------------
2
+ #
3
+ # Copyright (C) 2006-07 by Francis Cianfrocca. All Rights Reserved.
4
+ #
5
+ # Gmail: garbagecat10
6
+ #
7
+ # This program is free software; you can redistribute it and/or modify
8
+ # it under the terms of the GNU General Public License as published by
9
+ # the Free Software Foundation; either version 2 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # This program is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU General Public License
18
+ # along with this program; if not, write to the Free Software
19
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20
+ #
21
+ #---------------------------------------------------------------------------
22
+ #
23
+ # extconf.rb for Ruby/EventMachine
24
+ # We have to munge LDSHARED because this code needs a C++ link.
25
+ #
26
+
27
+ require 'mkmf'
28
+
29
+ flags = []
30
+
31
+ case RUBY_PLATFORM.split('-',2)[1]
32
+ when 'mswin32', 'mingw32', 'bccwin32'
33
+ unless have_header('windows.h') and
34
+ have_header('winsock.h') and
35
+ have_library('kernel32') and
36
+ have_library('rpcrt4') and
37
+ have_library('gdi32')
38
+ exit
39
+ end
40
+
41
+ flags << "-D OS_WIN32"
42
+ flags << '-D BUILD_FOR_RUBY'
43
+ flags << "-EHs"
44
+ flags << "-GR"
45
+
46
+ dir_config('ssl')
47
+ if have_library('ssleay32') and
48
+ have_library('libeay32') and
49
+ have_header('openssl/ssl.h') and
50
+ have_header('openssl/err.h')
51
+ flags << '-D WITH_SSL'
52
+ else
53
+ flags << '-D WITHOUT_SSL'
54
+ end
55
+
56
+ when /solaris/
57
+ unless have_library('pthread') and
58
+ have_library('nsl') and
59
+ have_library('socket')
60
+ exit
61
+ end
62
+
63
+ flags << '-D OS_UNIX'
64
+ flags << '-D OS_SOLARIS8'
65
+ flags << '-D BUILD_FOR_RUBY'
66
+
67
+ dir_config('ssl')
68
+ if have_library('ssl') and
69
+ have_library('crypto') and
70
+ have_header('openssl/ssl.h') and
71
+ have_header('openssl/err.h')
72
+ flags << '-D WITH_SSL'
73
+ else
74
+ flags << '-D WITHOUT_SSL'
75
+ end
76
+
77
+ # on Unix we need a g++ link, not gcc.
78
+ CONFIG['LDSHARED'] = "$(CXX) -shared"
79
+
80
+ when /darwin/
81
+ flags << '-DOS_UNIX'
82
+ flags << '-DBUILD_FOR_RUBY'
83
+
84
+ dir_config('ssl')
85
+ if have_library('ssl') and
86
+ have_library('crypto') and
87
+ have_library('C') and
88
+ have_header('openssl/ssl.h') and
89
+ have_header('openssl/err.h')
90
+ flags << '-DWITH_SSL'
91
+ else
92
+ flags << '-DWITHOUT_SSL'
93
+ end
94
+ # on Unix we need a g++ link, not gcc.
95
+ # Ff line contributed by Daniel Harple.
96
+ CONFIG['LDSHARED'] = "$(CXX) " + CONFIG['LDSHARED'].split[1..-1].join(' ')
97
+
98
+ else
99
+ unless have_library('pthread')
100
+ exit
101
+ end
102
+
103
+ flags << '-DOS_UNIX'
104
+ flags << '-DBUILD_FOR_RUBY'
105
+
106
+ dir_config('ssl')
107
+ if have_library('ssl') and
108
+ have_library('crypto') and
109
+ have_header('openssl/ssl.h') and
110
+ have_header('openssl/err.h')
111
+ flags << '-DWITH_SSL'
112
+ else
113
+ flags << '-DWITHOUT_SSL'
114
+ end
115
+ # on Unix we need a g++ link, not gcc.
116
+ CONFIG['LDSHARED'] = "$(CXX) -shared"
117
+
118
+ # Modify the mkmf constant LINK_SO so the generated shared object is stripped.
119
+ # You might think modifying CONFIG['LINK_SO'] would be a better way to do this,
120
+ # but it doesn't work because mkmf doesn't look at CONFIG['LINK_SO'] again after
121
+ # it initializes.
122
+ # linkso = Object.send :remove_const, "LINK_SO"
123
+ # LINK_SO = linkso + "; strip $@"
124
+ end
125
+
126
+ if $CPPFLAGS
127
+ $CPPFLAGS += ' ' + flags.join(' ')
128
+ else
129
+ $CFLAGS += ' ' + flags.join(' ')
130
+ end
131
+
132
+
133
+ create_makefile "rev_httpserver_ext"
metadata ADDED
@@ -0,0 +1,58 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rev_httpserver
3
+ version: !ruby/object:Gem::Version
4
+ version: "0.1"
5
+ platform: ruby
6
+ authors:
7
+ - Andrew Rudenko
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ date: 2010-02-19 00:00:00 +03:00
12
+ default_executable:
13
+ dependencies: []
14
+
15
+ description: ""
16
+ email: ceo@prepor.ru
17
+ executables: []
18
+
19
+ extensions:
20
+ - ext/extconf.rb
21
+ extra_rdoc_files: []
22
+
23
+ files:
24
+ - ext/extconf.rb
25
+ has_rdoc: true
26
+ homepage: http://rubyeventmachine.com
27
+ licenses: []
28
+
29
+ post_install_message:
30
+ rdoc_options:
31
+ - --title
32
+ - Rev_HttpServer
33
+ - --main
34
+ - docs/README
35
+ - --line-numbers
36
+ require_paths:
37
+ - lib
38
+ required_ruby_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">"
41
+ - !ruby/object:Gem::Version
42
+ version: 0.0.0
43
+ version:
44
+ required_rubygems_version: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: "0"
49
+ version:
50
+ requirements: []
51
+
52
+ rubyforge_project:
53
+ rubygems_version: 1.3.5
54
+ signing_key:
55
+ specification_version: 1
56
+ summary: Rev HTTP Server. Fork of EventMachine HTTP Server
57
+ test_files: []
58
+