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
1862cf03
Commit
1862cf03
authored
May 13, 2014
by
Artiom Di
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JRuby support
parent
b3e3978b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
19 deletions
+13
-19
ext/rbnacl/extconf.rb
ext/rbnacl/extconf.rb
+11
-17
lib/rbnacl/libsodium.rb
lib/rbnacl/libsodium.rb
+1
-1
lib/rbnacl/libsodium/version.rb
lib/rbnacl/libsodium/version.rb
+1
-1
No files found.
ext/rbnacl/extconf.rb
View file @
1862cf03
require
'mkmf'
RbConfig
::
MAKEFILE_CONFIG
[
'CC'
]
=
ENV
[
'CC'
]
if
ENV
[
'CC'
]
$CFLAGS
<<
"
#{
ENV
[
"CFLAGS"
]
}
"
def
sys
(
cmd
)
def
sys
(
cmd
)
puts
" --
#{
cmd
}
"
puts
" --
#{
cmd
}
"
unless
ret
=
x
system
(
cmd
)
unless
ret
=
system
(
cmd
)
raise
"ERROR: '
#{
cmd
}
' failed"
raise
"ERROR: '
#{
cmd
}
' failed"
end
end
ret
ret
end
end
if
!
(
MAKE
=
find_executable
(
'gmake'
)
||
find_executable
(
'make'
))
mkfl
=
<<
MAKEFILE
abort
"ERROR: GNU make is required to build libsodium."
install:
end
\t
@echo "Nothing to do"
clean:
\t
@echo "Nothing to do"
MAKEFILE
CWD
=
File
.
expand_path
(
File
.
dirname
(
__FILE__
))
CWD
=
File
.
expand_path
(
File
.
dirname
(
__FILE__
))
LIBSODIUM_DIR
=
File
.
expand_path
(
File
.
join
(
CWD
,
'..'
,
'..'
,
'vendor'
,
'libsodium'
))
LIBSODIUM_DIR
=
File
.
expand_path
(
File
.
join
(
CWD
,
'..'
,
'..'
,
'vendor'
,
'libsodium'
))
MAKE
=
ENV
[
'MAKE'
]
||
ENV
[
'make'
]
||
"make"
Dir
.
chdir
(
LIBSODIUM_DIR
)
do
Dir
.
chdir
(
LIBSODIUM_DIR
)
do
sys
(
"./autogen.sh"
)
sys
(
"./autogen.sh"
)
...
@@ -26,11 +25,6 @@ Dir.chdir(LIBSODIUM_DIR) do
...
@@ -26,11 +25,6 @@ Dir.chdir(LIBSODIUM_DIR) do
sys
(
"
#{
MAKE
}
install"
)
sys
(
"
#{
MAKE
}
install"
)
end
end
$DEFLIBPATH
.
unshift
(
"
#{
LIBSODIUM_DIR
}
/dist"
)
File
.
open
(
"Makefile"
,
"w"
)
do
|
f
|
dir_config
(
'sodium'
,
"
#{
LIBSODIUM_DIR
}
/dist/include"
,
"
#{
LIBSODIUM_DIR
}
/dist/lib"
)
f
.
write
(
mkfl
)
unless
have_library
'sodium'
abort
"ERROR: Failed to build libsodium"
end
end
create_makefile
(
"rbnacl-libsodium/rbnacl-libsodium"
)
lib/rbnacl/libsodium.rb
View file @
1862cf03
...
@@ -3,7 +3,7 @@ require "rbnacl/libsodium/version"
...
@@ -3,7 +3,7 @@ require "rbnacl/libsodium/version"
module
RbNaCl
module
RbNaCl
module
Libsodium
module
Libsodium
sodiumlib_dir
=
File
.
expand_path
(
File
.
join
(
File
.
dirname
(
__FILE__
),
"../../vendor/libsodium/dist/lib/"
))
sodiumlib_dir
=
File
.
expand_path
(
File
.
join
(
File
.
dirname
(
__FILE__
),
"../../vendor/libsodium/dist/lib/"
))
sodiumlib_filename
=
RUBY_
PLATFORM
=~
/darwin/
?
"libsodium.dylib"
:
"libsodium.so"
sodiumlib_filename
=
RUBY_
DESCRIPTION
=~
/darwin/
?
"libsodium.dylib"
:
"libsodium.so"
::
RBNACL_LIBSODIUM_GEM_LIB_PATH
=
File
.
join
(
sodiumlib_dir
,
sodiumlib_filename
)
::
RBNACL_LIBSODIUM_GEM_LIB_PATH
=
File
.
join
(
sodiumlib_dir
,
sodiumlib_filename
)
end
end
end
end
...
...
lib/rbnacl/libsodium/version.rb
View file @
1862cf03
module
RbNaCl
module
RbNaCl
module
Libsodium
module
Libsodium
VERSION
=
"0.0.
1
"
VERSION
=
"0.0.
2
"
end
end
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