Skip to content

Commit

Permalink
fix julia 0.5 deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
bjarthur committed Sep 27, 2016
1 parent 69ab458 commit 23e3d9f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
julia 0.3
Compat 0.7.16
Compat 0.7.20
Cairo
Graphics 0.1
BinDeps 0.2.2-
Expand Down
8 changes: 4 additions & 4 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ using Compat; import Compat.String

tcl = library_dependency("tcl",aliases=["libtcl8.6","tcl86g","tcl86t","libtcl","libtcl8.6.so.0","libtcl8.5","libtcl8.5.so.0","tcl85"])
tk = library_dependency("tk",aliases=["libtk8.6","libtk","libtk8.6.so.0","libtk8.5","libtk8.5.so.0","tk85","tk86","tk86t"], depends=[tcl], validate = function(p,h)
@osx_only return @compat Libdl.dlsym_e(h,:TkMacOSXGetRootControl) != C_NULL
is_apple() && (return @compat Libdl.dlsym_e(h,:TkMacOSXGetRootControl) != C_NULL)
return true
end)

@windows_only begin
if is_windows()
using WinRPM
provides(WinRPM.RPM,"tk",tk,os = :Windows)
provides(WinRPM.RPM,"tcl",tcl,os = :Windows)
Expand All @@ -21,12 +21,12 @@ provides(AptGet,"tk8.5",tk)
provides(Sources,URI("http://prdownloads.sourceforge.net/tcl/tcl8.6.0-src.tar.gz"),tcl,unpacked_dir = "tcl8.6.0")
provides(Sources,URI("http://prdownloads.sourceforge.net/tcl/tk8.6.0-src.tar.gz"),tk,unpacked_dir = "tk8.6.0")

is64bit = WORD_SIZE == 64
is64bit = @compat Sys.WORD_SIZE == 64

provides(BuildProcess,Autotools(configure_subdir = "unix", configure_options = [is64bit?"--enable-64bit":"--disable-64bit"]),tcl, os = :Unix)
provides(BuildProcess,Autotools(configure_subdir = "unix", configure_options = [is64bit?"--enable-64bit":"--disable-64bit"]),tk, os = :Unix)

if WORD_SIZE == 64
if @compat Sys.WORD_SIZE == 64
# Unfortunately the mingw-built tc segfaults since some function signatures
# are different between VC and mingw. This is fixed on tcl trunk. For now,
# just use VC to build tcl (Note requlres Visual Studio Express in the PATH)
Expand Down
2 changes: 1 addition & 1 deletion src/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function bindwheel(widget::Widget, modifier::AbstractString, callback::Function,
tkargs = string(" ", tkargs)
end
ccb = tcl_callback(callback)
if OS_NAME == :Linux
if @compat Sys.KERNEL == :Linux
tcl_eval("bind $(path) <$(modifier)Button-4> {$ccb -120$tkargs}")
tcl_eval("bind $(path) <$(modifier)Button-5> {$ccb 120$tkargs}")
else
Expand Down
4 changes: 2 additions & 2 deletions src/menu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function menu_add(widget::Tk_Menu, rb::Tk_Radio)
end

function tk_popup(widget::Tk_Widget, menu::Tk_Menu)
if OS_NAME == :Darwin
if @compat Sys.KERNEL == :Darwin
tcl_eval("bind $(widget.w.path) <2> {tk_popup $(menu.w.path) %X %Y}")
tcl_eval("bind $(widget.w.path) <Control-1> {tk_popup $(menu.w.path) %X %Y}")
else
Expand All @@ -63,7 +63,7 @@ function tk_popup(widget::Tk_Widget, menu::Tk_Menu)
end

function tk_popup(c::Canvas, menu::Tk_Menu)
if OS_NAME == :Darwin
if @compat Sys.KERNEL == :Darwin
tcl_eval("bind $(c.c.path) <2> {tk_popup $(menu.w.path) %X %Y}")
tcl_eval("bind $(c.c.path) <Control-1> {tk_popup $(menu.w.path) %X %Y}")
else
Expand Down
2 changes: 1 addition & 1 deletion src/tkwidget.jl
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ function reveal(c::Canvas)
end

@static if is_apple()
if WORD_SIZE == 32
if @compat Sys.WORD_SIZE == 32
typealias CGFloat Float32
else
typealias CGFloat Float64
Expand Down

0 comments on commit 23e3d9f

Please sign in to comment.