aboutsummaryrefslogtreecommitdiffstats
path: root/lang/julia
diff options
context:
space:
mode:
authorlwhsu <lwhsu@FreeBSD.org>2017-02-27 21:44:30 +0800
committerlwhsu <lwhsu@FreeBSD.org>2017-02-27 21:44:30 +0800
commit67daecce713dc0ced7f9ba8dce114d15901406ad (patch)
treed937d865c67eeb8065a31cb2e850b531e3893225 /lang/julia
parent0aed8c343bf11abc2c6246117445dff429d86cd0 (diff)
downloadfreebsd-ports-gnome-67daecce713dc0ced7f9ba8dce114d15901406ad.tar.gz
freebsd-ports-gnome-67daecce713dc0ced7f9ba8dce114d15901406ad.tar.zst
freebsd-ports-gnome-67daecce713dc0ced7f9ba8dce114d15901406ad.zip
- Backport FreeBSD only patches
PR: 217320 Submitted by: Iblis Lin <iblis@hs.ntnu.edu.tw> (maintainer)
Diffstat (limited to 'lang/julia')
-rw-r--r--lang/julia/Makefile2
-rw-r--r--lang/julia/files/patch-base_Terminals.jl11
-rw-r--r--lang/julia/files/patch-base_libdl.jl48
-rw-r--r--lang/julia/files/patch-base_mmap.jl11
-rw-r--r--lang/julia/files/patch-base_sharedarray.jl17
-rw-r--r--lang/julia/files/patch-base_socket.jl11
6 files changed, 99 insertions, 1 deletions
diff --git a/lang/julia/Makefile b/lang/julia/Makefile
index d2696ad5b874..7fc07b7a880d 100644
--- a/lang/julia/Makefile
+++ b/lang/julia/Makefile
@@ -4,7 +4,7 @@
PORTNAME= julia
PORTVERSION= 0.5.0
DISTVERSIONSUFFIX= -full
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= lang math
MASTER_SITES= https://github.com/JuliaLang/julia/releases/download/v${PORTVERSION}/
diff --git a/lang/julia/files/patch-base_Terminals.jl b/lang/julia/files/patch-base_Terminals.jl
new file mode 100644
index 000000000000..618c31b7f1fe
--- /dev/null
+++ b/lang/julia/files/patch-base_Terminals.jl
@@ -0,0 +1,11 @@
+--- base/Terminals.jl.orig 2017-02-19 14:49:03 UTC
++++ base/Terminals.jl
+@@ -156,7 +156,7 @@ else
+ function hascolor(t::TTYTerminal)
+ startswith(t.term_type, "xterm") && return true
+ try
+- return success(`tput setaf 0`)
++ return success(`tput AF 0`)
+ catch
+ return false
+ end
diff --git a/lang/julia/files/patch-base_libdl.jl b/lang/julia/files/patch-base_libdl.jl
new file mode 100644
index 000000000000..72e208a35dd9
--- /dev/null
+++ b/lang/julia/files/patch-base_libdl.jl
@@ -0,0 +1,48 @@
+--- base/libdl.jl.orig 2016-09-20 02:54:21 UTC
++++ base/libdl.jl
+@@ -198,6 +198,31 @@ if is_linux()
+ end
+ end # linux-only
+
++if is_bsd() && !is_apple()
++ # DL_ITERATE_PHDR(3) on freebsd
++ immutable dl_phdr_info
++ # Base address of object
++ addr::Cuint
++
++ # Null-terminated name of object
++ name::Ptr{UInt8}
++
++ # Pointer to array of ELF program headers for this object
++ phdr::Ptr{Void}
++
++ # Number of program headers for this object
++ phnum::Cshort
++ end
++
++ function dl_phdr_info_callback(di::dl_phdr_info, size::Csize_t, dy_libs::Array{AbstractString,1})
++ name = unsafe_string(di.name)
++ if !isempty(name)
++ push!(dy_libs, name)
++ end
++ return convert(Cint, 0)::Cint
++ end
++end # bsd family
++
+ function dllist()
+ dynamic_libraries = Array{AbstractString}(0)
+
+@@ -221,6 +246,13 @@ function dllist()
+ ccall(:jl_dllist, Cint, (Any,), dynamic_libraries)
+ end
+
++ @static if is_bsd() && !is_apple()
++ const callback = cfunction(dl_phdr_info_callback, Cint,
++ (Ref{dl_phdr_info}, Csize_t, Ref{Array{AbstractString,1}} ))
++ ccall(:dl_iterate_phdr, Cint, (Ptr{Void}, Ref{Array{AbstractString,1}}), callback, dynamic_libraries)
++ shift!(dynamic_libraries)
++ end
++
+ return dynamic_libraries
+ end
+
diff --git a/lang/julia/files/patch-base_mmap.jl b/lang/julia/files/patch-base_mmap.jl
new file mode 100644
index 000000000000..1eefb32d88ab
--- /dev/null
+++ b/lang/julia/files/patch-base_mmap.jl
@@ -0,0 +1,11 @@
+--- base/mmap.jl.orig 2017-02-23 09:50:38 UTC
++++ base/mmap.jl
+@@ -27,7 +27,7 @@ const PROT_READ = Cint(1)
+ const PROT_WRITE = Cint(2)
+ const MAP_SHARED = Cint(1)
+ const MAP_PRIVATE = Cint(2)
+-const MAP_ANONYMOUS = Cint(is_apple() ? 0x1000 : 0x20)
++const MAP_ANONYMOUS = Cint(0x1000)
+ const F_GETFL = Cint(3)
+
+ gethandle(io::IO) = fd(io)
diff --git a/lang/julia/files/patch-base_sharedarray.jl b/lang/julia/files/patch-base_sharedarray.jl
new file mode 100644
index 000000000000..81da304186d8
--- /dev/null
+++ b/lang/julia/files/patch-base_sharedarray.jl
@@ -0,0 +1,17 @@
+--- base/sharedarray.jl.orig 2017-02-23 09:55:38 UTC
++++ base/sharedarray.jl
+@@ -477,13 +477,7 @@ complex(S1::SharedArray,S2::SharedArray)
+
+ function print_shmem_limits(slen)
+ try
+- if is_linux()
+- pfx = "kernel"
+- elseif is_apple()
+- pfx = "kern.sysv"
+- else
+- return
+- end
++ pfx = "kern.ipc"
+
+ shmmax_MB = div(parse(Int, split(readstring(`sysctl $(pfx).shmmax`))[end]), 1024*1024)
+ page_size = parse(Int, split(readstring(`getconf PAGE_SIZE`))[end])
diff --git a/lang/julia/files/patch-base_socket.jl b/lang/julia/files/patch-base_socket.jl
new file mode 100644
index 000000000000..e57755988392
--- /dev/null
+++ b/lang/julia/files/patch-base_socket.jl
@@ -0,0 +1,11 @@
+--- base/socket.jl.orig 2017-02-24 09:57:14 UTC
++++ base/socket.jl
+@@ -762,7 +762,7 @@ function getsockname(sock::Union{TCPServ
+ addrv4 = raddress[1:4]
+ naddr = ntoh(unsafe_load(Ptr{Cuint}(pointer(addrv4)), 1))
+ addr = IPv4(naddr)
+- elseif rfamily[] == @static is_windows() ? 23 : (@static is_apple() ? 30 : 10) # AF_INET6
++ elseif rfamily[] == 28 # AF_INET6
+ naddr = ntoh(unsafe_load(Ptr{UInt128}(pointer(raddress)), 1))
+ addr = IPv6(naddr)
+ else