Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rbnacl-libsodium
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
rbnacl-libsodium
Commits
9259e295
Commit
9259e295
authored
Apr 02, 2016
by
Tony Arcieri
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8 from cryptosphere/windows-fixup
Support for loading libsodium.dll on Windows
parents
4e0e0373
c5f0d1c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
ext/rbnacl/extconf.rb
ext/rbnacl/extconf.rb
+0
-4
lib/rbnacl/libsodium.rb
lib/rbnacl/libsodium.rb
+8
-2
No files found.
ext/rbnacl/extconf.rb
View file @
9259e295
...
...
@@ -23,10 +23,6 @@ Dir.chdir(LIBSODIUM_DIR) do
sys
(
"sh -c
\"
./configure --prefix=
#{
LIBSODIUM_DIR
}
/dist
\"
"
)
sys
(
MAKE
)
sys
(
"
#{
MAKE
}
install"
)
if
!
Dir
.
glob
(
'dist/bin/libsodium*.dll'
).
empty?
# copy dll to make it loadable on Windows
sys
(
"cp dist/bin/libsodium*.dll dist/lib/libsodium.so"
)
end
end
File
.
open
(
"Makefile"
,
"w"
)
do
|
f
|
...
...
lib/rbnacl/libsodium.rb
View file @
9259e295
...
...
@@ -2,8 +2,14 @@ require "rbnacl/libsodium/version"
module
RbNaCl
module
Libsodium
sodiumlib_dir
=
File
.
expand_path
(
File
.
join
(
File
.
dirname
(
__FILE__
),
"../../vendor/libsodium/dist/lib/"
))
sodiumlib_filename
=
RUBY_DESCRIPTION
=~
/darwin/
?
"libsodium.dylib"
:
"libsodium.so"
sodiumlib_dir
=
File
.
expand_path
(
"../../../vendor/libsodium/dist/lib/"
,
__FILE__
)
sodiumlib_filename
=
case
RUBY_DESCRIPTION
when
/darwin/
then
"libsodium.dylib"
when
/Windows|(win|mingw)32/
then
"libsodium.dll"
else
"libsodium.so"
end
::
RBNACL_LIBSODIUM_GEM_LIB_PATH
=
File
.
join
(
sodiumlib_dir
,
sodiumlib_filename
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment