Skip to content

Commit

Permalink
lang/julia: unbreak build when using libcurl 7.81
Browse files Browse the repository at this point in the history
See:

 * JuliaLang/Downloads.jl#172
 * conda-forge/julia-feedstock#169 (comment)

PR:	261417
Reported by:	rizor.reardon@yahoo.com
  • Loading branch information
E-Ryze authored and fernape committed Jan 25, 2022
1 parent 52862c2 commit 175c1f5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lang/julia/Makefile
Expand Up @@ -3,7 +3,7 @@
PORTNAME= julia
DISTVERSION= 1.7.1
DISTVERSIONSUFFIX= -full
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= lang math
MASTER_SITES= https://github.com/JuliaLang/julia/releases/download/v${DISTVERSION}/

Expand Down Expand Up @@ -96,6 +96,12 @@ GPL_LIBS_MAKE_ARGS= USE_SYSTEM_LIBSUITESPARSE=1 \
NATIVE_DESC= Build with native CPU JIT tuning
NATIVE_MAKE_ARGS= MARCH=native

post-extract:
${MKDIR} ${WRKSRC}/stdlib/Downloads-26d79afcde9cf837a331fce023b31f1d3699700c/
${TAR} -C ${WRKSRC}/stdlib/Downloads-26d79afcde9cf837a331fce023b31f1d3699700c/ --strip-components 1 \
-xf ${WRKSRC}/stdlib/srccache/Downloads-26d79afcde9cf837a331fce023b31f1d3699700c.tar.gz
echo "1" > ${WRKSRC}/stdlib/Downloads-26d79afcde9cf837a331fce023b31f1d3699700c/source-extracted

post-patch:
echo "override TAGGED_RELEASE_BANNER=\"FreeBSD port lang/${PORTNAME} build\"" >> ${WRKSRC}/Make.user
# unset ARCH for auto-detection
Expand Down
@@ -0,0 +1,16 @@
--- stdlib/Downloads-26d79afcde9cf837a331fce023b31f1d3699700c/src/Curl/Multi.jl.orig 2021-10-26 22:48:36 UTC
+++ stdlib/Downloads-26d79afcde9cf837a331fce023b31f1d3699700c/src/Curl/Multi.jl
@@ -142,12 +142,7 @@ function timer_callback(
)::Cint
multi = unsafe_pointer_to_objref(multi_p)::Multi
@assert multi_h == multi.handle
- if timeout_ms == 0
- lock(multi.lock) do
- @check curl_multi_socket_action(multi.handle, CURL_SOCKET_TIMEOUT, 0)
- check_multi_info(multi)
- end
- elseif timeout_ms >= 0
+ if timeout_ms >= 0
timeout_cb = @cfunction(timeout_callback, Cvoid, (Ptr{Cvoid},))
uv_timer_start(multi.timer, timeout_cb, max(1, timeout_ms), 0)
elseif timeout_ms == -1

0 comments on commit 175c1f5

Please sign in to comment.