Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
1b13c549
Commit
1b13c549
authored
9 years ago
by
Michael Lumish
Browse files
Options
Downloads
Plain Diff
Merge pull request #1910 from tbetbetbe/grpc-ruby-fix-extconf-rb
Grpc ruby fix extconf rb
parents
491a67bc
1a2988df
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/ruby/ext/grpc/extconf.rb
+19
-28
19 additions, 28 deletions
src/ruby/ext/grpc/extconf.rb
src/ruby/grpc.gemspec
+1
-1
1 addition, 1 deletion
src/ruby/grpc.gemspec
src/ruby/lib/grpc/version.rb
+1
-1
1 addition, 1 deletion
src/ruby/lib/grpc/version.rb
with
21 additions
and
30 deletions
src/ruby/ext/grpc/extconf.rb
+
19
−
28
View file @
1b13c549
...
...
@@ -32,29 +32,6 @@ require 'mkmf'
LIBDIR
=
RbConfig
::
CONFIG
[
'libdir'
]
INCLUDEDIR
=
RbConfig
::
CONFIG
[
'includedir'
]
if
ENV
.
key?
'GRPC_ROOT'
GRPC_ROOT
=
ENV
[
'GRPC_ROOT'
]
else
grpc_root
=
File
.
expand_path
(
File
.
join
(
File
.
dirname
(
__FILE__
),
'../../../..'
))
if
File
.
exist?
(
File
.
join
(
grpc_root
,
'include/grpc/grpc.h'
))
GRPC_ROOT
=
grpc_root
else
GRPC_ROOT
=
nil
end
end
if
ENV
.
key?
'CONFIG'
GRPC_CONFIG
=
ENV
[
'CONFIG'
]
else
GRPC_CONFIG
=
'opt'
end
if
(
ENV
.
key?
'GRPC_LIB_DIR'
)
&&
(
!
GRPC_ROOT
.
nil?
)
GRPC_LIB_DIR
=
File
.
join
(
GRPC_ROOT
,
ENV
[
'GRPC_LIB_DIR'
])
else
GRPC_LIB_DIR
=
File
.
join
(
File
.
join
(
GRPC_ROOT
,
'libs'
),
GRPC_CONFIG
)
end
HEADER_DIRS
=
[
# Search /opt/local (Mac source install)
'/opt/local/include'
,
...
...
@@ -77,12 +54,26 @@ LIB_DIRS = [
LIBDIR
]
unless
GRPC_ROOT
.
nil?
HEADER_DIRS
.
unshift
File
.
join
(
GRPC_ROOT
,
'include'
)
LIB_DIRS
.
unshift
GRPC_LIB_DIR
unless
File
.
exist?
(
File
.
join
(
GRPC_LIB_DIR
,
'libgrpc.a'
))
system
(
"make -C
#{
GRPC_ROOT
}
static_c CONFIG=
#{
GRPC_CONFIG
}
"
)
# Check to see if GRPC_ROOT is defined or available
grpc_root
=
ENV
[
'GRPC_ROOT'
]
if
grpc_root
.
nil?
r
=
File
.
expand_path
(
File
.
join
(
File
.
dirname
(
__FILE__
),
'../../../..'
))
grpc_root
=
r
if
File
.
exist?
(
File
.
join
(
r
,
'include/grpc/grpc.h'
))
end
# When grpc_root is available attempt to build the grpc core.
unless
grpc_root
.
nil?
grpc_config
=
ENV
[
'GRPC_CONFIG'
]
||
'opt'
if
ENV
.
key?
(
'GRPC_LIB_DIR'
)
grpc_lib_dir
=
File
.
join
(
grpc_root
,
ENV
[
'GRPC_LIB_DIR'
])
else
grpc_lib_dir
=
File
.
join
(
File
.
join
(
grpc_root
,
'libs'
),
grpc_config
)
end
unless
File
.
exist?
(
File
.
join
(
grpc_lib_dir
,
'libgrpc.a'
))
system
(
"make -C
#{
grpc_root
}
static_c CONFIG=
#{
grpc_config
}
"
)
end
HEADER_DIRS
.
unshift
File
.
join
(
grpc_root
,
'include'
)
LIB_DIRS
.
unshift
grpc_lib_dir
end
def
crash
(
msg
)
...
...
This diff is collapsed.
Click to expand it.
src/ruby/grpc.gemspec
+
1
−
1
View file @
1b13c549
...
...
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
s
.
license
=
'BSD-3-Clause'
s
.
required_ruby_version
=
'>= 2.0.0'
s
.
requirements
<<
'libgrpc ~> 0.
6.0
needs to be installed'
s
.
requirements
<<
'libgrpc ~> 0.
9.1
needs to be installed'
s
.
files
=
`git ls-files`
.
split
(
"
\n
"
)
s
.
test_files
=
`git ls-files -- spec/*`
.
split
(
"
\n
"
)
...
...
This diff is collapsed.
Click to expand it.
src/ruby/lib/grpc/version.rb
+
1
−
1
View file @
1b13c549
...
...
@@ -29,5 +29,5 @@
# GRPC contains the General RPC module.
module
GRPC
VERSION
=
'0.9.
2
'
VERSION
=
'0.9.
3
'
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment