diff options
Diffstat (limited to 'lang/julia07/files')
-rw-r--r-- | lang/julia07/files/check_openblas.c | 10 | ||||
-rw-r--r-- | lang/julia07/files/extra-patch-ui_Makefile | 11 | ||||
-rw-r--r-- | lang/julia07/files/patch-Make.inc | 53 | ||||
-rw-r--r-- | lang/julia07/files/patch-Make.user | 11 | ||||
-rw-r--r-- | lang/julia07/files/patch-Makefile | 121 | ||||
-rw-r--r-- | lang/julia07/files/patch-issue-29016 | 196 | ||||
-rw-r--r-- | lang/julia07/files/patch-src_Makefile | 20 |
7 files changed, 422 insertions, 0 deletions
diff --git a/lang/julia07/files/check_openblas.c b/lang/julia07/files/check_openblas.c new file mode 100644 index 000000000000..6218d3507c65 --- /dev/null +++ b/lang/julia07/files/check_openblas.c @@ -0,0 +1,10 @@ +#include <string.h> + +char* openblas_get_config(void); + +int main() +{ + if (strstr(openblas_get_config(), "USE64BITINT") == NULL) + return 1; + return 0; +} diff --git a/lang/julia07/files/extra-patch-ui_Makefile b/lang/julia07/files/extra-patch-ui_Makefile new file mode 100644 index 000000000000..2c3a834537dd --- /dev/null +++ b/lang/julia07/files/extra-patch-ui_Makefile @@ -0,0 +1,11 @@ +--- ui/Makefile.orig 2016-09-20 02:54:22 UTC ++++ ui/Makefile +@@ -14,7 +14,7 @@ SRCS := repl + HEADERS := $(addprefix $(JULIAHOME)/src/,julia.h julia_threads.h julia_internal.h options.h) \ + $(BUILDDIR)/../src/julia_version.h $(wildcard $(JULIAHOME)/src/support/*.h) $(LIBUV_INC)/uv.h + +-FLAGS := -I$(BUILDROOT)/src -I$(JULIAHOME)/src -I$(JULIAHOME)/src/support -I$(build_includedir) ++FLAGS := -I$(BUILDROOT)/src -I$(JULIAHOME)/src -I$(JULIAHOME)/src/support -I$(build_includedir) -latomic + ifneq ($(USEMSVC), 1) + FLAGS += -Wall -Wno-strict-aliasing -fno-omit-frame-pointer -Wc++-compat + endif diff --git a/lang/julia07/files/patch-Make.inc b/lang/julia07/files/patch-Make.inc new file mode 100644 index 000000000000..3ab1956f35e9 --- /dev/null +++ b/lang/julia07/files/patch-Make.inc @@ -0,0 +1,53 @@ +--- Make.inc.orig 2018-07-31 20:35:41 UTC ++++ Make.inc +@@ -130,12 +130,7 @@ endif + # disable automatic Makefile rules + .SUFFIXES: + +-# find out if git repository is available +-ifeq ($(shell [ -e $(JULIAHOME)/.git ] && echo true || echo "Warning: git information unavailable; versioning information limited" >&2), true) +-NO_GIT := 0 +-else + NO_GIT := 1 +-endif + + # Julia's Semantic Versioning system labels the three decimal places in a version number as + # the major, minor and patch versions. Typically the major version would be incremented +@@ -185,7 +180,7 @@ libdir := $(prefix)/lib + libexecdir := $(prefix)/libexec + datarootdir := $(prefix)/share + docdir := $(datarootdir)/doc/julia +-mandir := $(datarootdir)/man ++mandir := $(prefix)/man + man1dir := $(mandir)/man1 + includedir := $(prefix)/include + sysconfdir := $(prefix)/etc +@@ -198,7 +193,7 @@ build_depsbindir := $(build_prefix)/tools + build_libdir := $(build_prefix)/lib + build_libexecdir := $(build_prefix)/libexec + build_datarootdir := $(build_prefix)/share +-build_mandir := $(build_datarootdir)/man ++build_mandir := $(build_prefix)/man + build_man1dir := $(build_mandir)/man1 + build_includedir := $(build_prefix)/include + build_sysconfdir := $(build_prefix)/etc +@@ -364,7 +359,7 @@ endif + ifeq ($(USEIFC), 1) + FC := ifort + else +-FC := $(CROSS_COMPILE)gfortran ++FC ?= $(CROSS_COMPILE)gfortran + endif + + STDLIBCPP_FLAG := +@@ -417,8 +412,8 @@ SHIPFLAGS := -O3 -ggdb2 -falign-functions + endif + + ifeq ($(USECLANG),1) +-CC := $(CROSS_COMPILE)clang +-CXX := $(CROSS_COMPILE)clang++ ++CC ?= $(CROSS_COMPILE)clang ++CXX ?= $(CROSS_COMPILE)clang++ + JCFLAGS := -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 + # AArch64 needs this flag to generate the .eh_frame used by libunwind + JCPPFLAGS := -fasynchronous-unwind-tables diff --git a/lang/julia07/files/patch-Make.user b/lang/julia07/files/patch-Make.user new file mode 100644 index 000000000000..2f14b992366d --- /dev/null +++ b/lang/julia07/files/patch-Make.user @@ -0,0 +1,11 @@ +--- Make.user.orig 2018-08-15 02:26:57 UTC ++++ Make.user +@@ -0,0 +1,8 @@ ++LIBBLAS= -lopenblasp -L$(LOCALBASE)/lib ++LIBBLASNAME= libopenblasp ++ ++LIBLAPACK= $(LIBBLAS) ++LIBLAPACKNAME= $(LIBBLASNAME) ++ ++override TAGGED_RELEASE_BANNER = "FreeBSD ports lang/julia build" ++USE_BLAS64=0 diff --git a/lang/julia07/files/patch-Makefile b/lang/julia07/files/patch-Makefile new file mode 100644 index 000000000000..326d5d9a3ddb --- /dev/null +++ b/lang/julia07/files/patch-Makefile @@ -0,0 +1,121 @@ +--- Makefile.orig 2018-08-02 19:21:47 UTC ++++ Makefile +@@ -266,24 +266,6 @@ endif + endif + endif + +-# On FreeBSD, /lib/libgcc_s.so.1 is incompatible with Fortran; to use Fortran on FreeBSD, +-# we need to link to the libgcc_s that ships with the same GCC version used by libgfortran. +-# To work around this, we copy the GCC libraries we need, namely libgfortran, libgcc_s, +-# and libquadmath, into our build library directory, $(build_libdir). We also add them to +-# JL_PRIVATE_LIBS-0 so that they know where they need to live at install time. +-ifeq ($(OS),FreeBSD) +-define std_so +-julia-deps: | $$(build_libdir)/$(1).so +-$$(build_libdir)/$(1).so: | $$(build_libdir) +- $$(INSTALL_M) $$(GCCPATH)/$(1).so* $$(build_libdir) +-JL_PRIVATE_LIBS-0 += $(1) +-endef +- +-$(eval $(call std_so,libgfortran)) +-$(eval $(call std_so,libgcc_s)) +-$(eval $(call std_so,libquadmath)) +-endif # FreeBSD +- + ifeq ($(OS),WINNT) + define std_dll + julia-deps: | $$(build_bindir)/lib$(1).dll $$(build_depsbindir)/lib$(1).dll +@@ -316,8 +298,7 @@ define stringreplace + $(build_depsbindir)/stringreplace $$(strings -t x - $1 | grep '$2' | awk '{print $$1;}') '$3' 255 "$(call cygpath_w,$1)" + endef + +-install: $(build_depsbindir)/stringreplace $(BUILDROOT)/doc/_build/html/en/index.html +- @$(MAKE) $(QUIET_MAKE) all ++install: $(build_depsbindir)/stringreplace + @for subdir in $(bindir) $(datarootdir)/julia/stdlib/$(VERSDIR) $(docdir) $(man1dir) $(includedir)/julia $(libdir) $(private_libdir) $(sysconfdir); do \ + mkdir -p $(DESTDIR)$$subdir; \ + done +@@ -359,10 +340,6 @@ endif + fi \ + done \ + done +- for suffix in $(JL_PRIVATE_LIBS-1) ; do \ +- lib=$(build_private_libdir)/$${suffix}.$(SHLIB_EXT); \ +- $(INSTALL_M) $$lib $(DESTDIR)$(private_libdir) ; \ +- done + endif + + # Copy public headers +@@ -376,24 +353,11 @@ endif + $(INSTALL_M) $(JULIAHOME)/contrib/build_sysimg.jl $(DESTDIR)$(datarootdir)/julia/ + # Copy in all .jl sources as well + cp -R -L $(build_datarootdir)/julia $(DESTDIR)$(datarootdir)/ +- # Copy documentation +- cp -R -L $(BUILDROOT)/doc/_build/html $(DESTDIR)$(docdir)/ + # Remove various files which should not be installed + -rm -f $(DESTDIR)$(datarootdir)/julia/base/version_git.sh + -rm -f $(DESTDIR)$(datarootdir)/julia/test/Makefile + # Copy in beautiful new man page + $(INSTALL_F) $(build_man1dir)/julia.1 $(DESTDIR)$(man1dir)/ +- # Copy icon and .desktop file +- mkdir -p $(DESTDIR)$(datarootdir)/icons/hicolor/scalable/apps/ +- $(INSTALL_F) $(JULIAHOME)/contrib/julia.svg $(DESTDIR)$(datarootdir)/icons/hicolor/scalable/apps/ +- -touch -c $(DESTDIR)$(datarootdir)/icons/hicolor/ +- -gtk-update-icon-cache $(DESTDIR)$(datarootdir)/icons/hicolor/ +- mkdir -p $(DESTDIR)$(datarootdir)/applications/ +- $(INSTALL_F) $(JULIAHOME)/contrib/julia.desktop $(DESTDIR)$(datarootdir)/applications/ +- # Install appdata file +- mkdir -p $(DESTDIR)$(datarootdir)/appdata/ +- $(INSTALL_F) $(JULIAHOME)/contrib/julia.appdata.xml $(DESTDIR)$(datarootdir)/appdata/ +- + # Update RPATH entries and JL_SYSTEM_IMAGE_PATH if $(private_libdir_rel) != $(build_private_libdir_rel) + ifneq ($(private_libdir_rel),$(build_private_libdir_rel)) + ifeq ($(OS), Darwin) +@@ -403,7 +367,7 @@ ifeq ($(OS), Darwin) + done + else ifneq (,$(findstring $(OS),Linux FreeBSD)) + for j in $(JL_TARGETS) ; do \ +- patchelf --set-rpath '$$ORIGIN/$(private_libdir_rel):$$ORIGIN/$(libdir_rel)' $(DESTDIR)$(bindir)/$$j; \ ++ patchelf --set-rpath '$(GCCPATH):$$ORIGIN/$(private_libdir_rel):$$ORIGIN/$(libdir_rel)' $(DESTDIR)$(bindir)/$$j; \ + done + endif + +@@ -414,22 +378,24 @@ ifeq ($(BUNDLE_DEBUG_LIBS),1) + endif + + endif +- # On FreeBSD, remove the build's libdir from each library's RPATH +-ifeq ($(OS),FreeBSD) +- $(JULIAHOME)/contrib/fixup-rpath.sh $(build_depsbindir)/patchelf $(DESTDIR)$(libdir) $(build_libdir) +- $(JULIAHOME)/contrib/fixup-rpath.sh $(build_depsbindir)/patchelf $(DESTDIR)$(private_libdir) $(build_libdir) +- $(JULIAHOME)/contrib/fixup-rpath.sh $(build_depsbindir)/patchelf $(DESTDIR)$(bindir) $(build_libdir) +- # Set libgfortran's RPATH to ORIGIN instead of GCCPATH. It's only libgfortran that +- # needs to be fixed here, as libgcc_s and libquadmath don't have RPATHs set. If we +- # don't set libgfortran's RPATH, it won't be able to find its friends on systems +- # that don't have the exact GCC port installed used for the build. +- for lib in $(DESTDIR)$(private_libdir)/libgfortran*$(SHLIB_EXT)*; do \ +- $(build_depsbindir)/patchelf --set-rpath '$$ORIGIN' $$lib; \ +- done +-endif +- + mkdir -p $(DESTDIR)$(sysconfdir) + cp -R $(build_sysconfdir)/julia $(DESTDIR)$(sysconfdir)/ ++ ++install-docs: ++ # Copy documentation ++ cp -R -L $(BUILDROOT)/doc/_build/html $(DESTDIR)$(docdir)/ ++ ++install-desktop: ++ # Copy icon and .desktop file ++ mkdir -p $(DESTDIR)$(datarootdir)/icons/hicolor/scalable/apps/ ++ $(INSTALL_F) $(JULIAHOME)/contrib/julia.svg $(DESTDIR)$(datarootdir)/icons/hicolor/scalable/apps/ ++ -touch -c $(DESTDIR)$(datarootdir)/icons/hicolor/ ++ -gtk-update-icon-cache $(DESTDIR)$(datarootdir)/icons/hicolor/ ++ mkdir -p $(DESTDIR)$(datarootdir)/applications/ ++ $(INSTALL_F) $(JULIAHOME)/contrib/julia.desktop $(DESTDIR)$(datarootdir)/applications/ ++ # Install appdata file ++ mkdir -p $(DESTDIR)$(datarootdir)/appdata/ ++ $(INSTALL_F) $(JULIAHOME)/contrib/julia.appdata.xml $(DESTDIR)$(datarootdir)/appdata/ + + distclean dist-clean: + -rm -fr $(BUILDROOT)/julia-*.tar.gz $(BUILDROOT)/julia*.exe $(BUILDROOT)/julia-*.7z $(BUILDROOT)/julia-$(JULIA_COMMIT) diff --git a/lang/julia07/files/patch-issue-29016 b/lang/julia07/files/patch-issue-29016 new file mode 100644 index 000000000000..419adb2d0f35 --- /dev/null +++ b/lang/julia07/files/patch-issue-29016 @@ -0,0 +1,196 @@ +diff --git contrib/generate_precompile.jl contrib/generate_precompile.jl +index 6788558275..11e9de09ae 100644 +--- contrib/generate_precompile.jl ++++ contrib/generate_precompile.jl +@@ -8,7 +8,7 @@ if !isdefined(Base, :uv_eventloop) + Base.reinit_stdio() + end + Base.include(@__MODULE__, joinpath(Sys.BINDIR, "..", "share", "julia", "test", "testhelpers", "FakePTYs.jl")) +-import .FakePTYs: with_fake_pty ++import .FakePTYs: open_fake_pty + + CTRL_C = '\x03' + UP_ARROW = "\e[A" +@@ -43,6 +43,12 @@ if Pkg !== nothing + precompile_script *= Pkg.precompile_script + end + ++push!(LOAD_PATH, Sys.STDLIB) ++using Sockets ++Sockets.__init__() ++using Libdl ++empty!(LOAD_PATH) ++ + function generate_precompile_statements() + start_time = time() + +@@ -62,82 +68,106 @@ function generate_precompile_statements() + empty!(DEPOT_PATH) + end + +- # Create a staging area where all the loaded packages are available +- PrecompileStagingArea = Module() +- for (_pkgid, _mod) in Base.loaded_modules +- if !(_pkgid.name in ("Main", "Core", "Base")) +- eval(PrecompileStagingArea, :($(Symbol(_mod)) = $_mod)) ++ print("Generating precompile statements...") ++ sysimg = Base.unsafe_string(Base.JLOptions().image_file) ++ mktemp() do precompile_file, _ ++ # Run a repl process and replay our script ++ repl_output_buffer = IOBuffer() ++ @static if Sys.iswindows() ++ # Fake being cygwin ++ pipename = """\\\\?\\pipe\\cygwin-$("0"^16)-pty10-abcdef""" ++ server = listen(pipename) ++ slave = connect(pipename) ++ @assert ccall(:jl_ispty, Cint, (Ptr{Cvoid},), slave.handle) == 1 ++ master = accept(server) ++ else ++ slave, master = open_fake_pty() + end +- end +- +- # TODO: Implement REPL replayer for Windows +- @static if !Sys.iswindows() +- print("Generating precompile statements...") +- sysimg = isempty(ARGS) ? joinpath(dirname(Sys.BINDIR), "lib", "julia", "sys.ji") : ARGS[1] +- +- mktemp() do precompile_file, _ +- # Run a repl process and replay our script +- stdout_accumulator, stderr_accumulator = IOBuffer(), IOBuffer() +- with_fake_pty() do slave, master +- with_fake_pty() do slave_err, master_err +- done = false +- withenv("JULIA_HISTORY" => tempname(), "JULIA_PROJECT" => nothing, +- "TERM" => "") do +- p = run(`$(julia_cmd()) -O0 --trace-compile=$precompile_file --sysimage $sysimg +- --startup-file=no --color=yes`, +- slave, slave, slave_err; wait=false) +- readuntil(master, "julia>", keep=true) +- for (tty, accumulator) in (master => stdout_accumulator, +- master_err => stderr_accumulator) +- @async begin +- while true +- done && break +- write(accumulator, readavailable(tty)) +- end +- end +- end +- if have_repl +- for l in split(precompile_script, '\n'; keepempty=false) +- write(master, l, '\n') +- end ++ done = false ++ withenv("JULIA_HISTORY" => tempname(), "JULIA_PROJECT" => nothing, ++ "TERM" => "") do ++ if have_repl ++ p = run(`$(julia_cmd()) -O0 --trace-compile=$precompile_file --sysimage $sysimg ++ --compile=all --startup-file=no --color=yes`, ++ slave, slave, slave; wait=false) ++ readuntil(master, "julia>", keep=true) ++ t = @async begin ++ while true ++ sleep(0.5) ++ s = String(readavailable(master)) ++ write(repl_output_buffer, s) ++ if occursin("__PRECOMPILE_END__", s) ++ break + end +- write(master, "exit()\n") +- wait(p) +- done = true + end + end ++ if have_repl ++ for l in split(precompile_script, '\n'; keepempty=false) ++ write(master, l, '\n') ++ end ++ end ++ write(master, "print(\"__PRECOMPILE\", \"_END__\")", '\n') ++ wait(t) ++ ++ # TODO Figure out why exit() on Windows doesn't exit the process ++ if Sys.iswindows() ++ print(master, "ccall(:_exit, Cvoid, (Cint,), 0)\n") ++ else ++ write(master, "exit()\n") ++ readuntil(master, "exit()\r\e[13C\r\n") ++ @assert bytesavailable(master) == 0 ++ end ++ wait(p) ++ else ++ # Is this even needed or is this already recorded just from starting this process? ++ p = run(`$(julia_cmd()) -O0 --trace-compile=$precompile_file --sysimage $sysimg ++ --compile=all --startup-file=no ++ -e0`) + end ++ end ++ close(master) + +- # Check what the REPL displayed +- # stdout_output = String(take!(stdout_accumulator)) +- # println(stdout_output) ++ # Check what the REPL displayed ++ # repl_output = String(take!(repl_output_buffer)) ++ # println(repl_output) + +- # Extract the precompile statements from stderr +- statements = Set{String}() +- for statement in split(read(precompile_file, String), '\n') +- occursin("Main.", statement) && continue +- push!(statements, statement) +- end ++ # Extract the precompile statements from stderr ++ statements = Set{String}() ++ for statement in split(read(precompile_file, String), '\n') ++ occursin("Main.", statement) && continue ++ push!(statements, statement) ++ end + +- # Load the precompile statements +- statements_ordered = join(sort(collect(statements)), '\n') +- # println(statements_ordered) +- if have_repl +- # Seems like a reasonable number right now, adjust as needed +- @assert length(statements) > 700 ++ if have_repl ++ # Seems like a reasonable number right now, adjust as needed ++ # comment out if debugging script ++ @assert length(statements) > 700 ++ end ++ ++ # Create a staging area where all the loaded packages are available ++ PrecompileStagingArea = Module() ++ for (_pkgid, _mod) in Base.loaded_modules ++ if !(_pkgid.name in ("Main", "Core", "Base")) ++ eval(PrecompileStagingArea, :($(Symbol(_mod)) = $_mod)) + end ++ end + +- Base.include_string(PrecompileStagingArea, statements_ordered) +- print(" $(length(statements)) generated in ") +- Base.time_print((time() - start_time) * 10^9) +- println() ++ # Execute the collected precompile statements ++ include_time = @elapsed for statement in sort(collect(statements)) ++ # println(statement) ++ try ++ Base.include_string(PrecompileStagingArea, statement) ++ catch ex ++ @error "Failed to precompile $statement" ++ rethrow(ex) ++ end + end ++ print(" $(length(statements)) generated in ") ++ tot_time = time() - start_time ++ Base.time_print(tot_time * 10^9) ++ print(" (overhead "); Base.time_print((tot_time - include_time) * 10^9); println(")") + end + +- # Fall back to explicit list on Windows, might as well include them +- # for everyone though +- Base.include(PrecompileStagingArea, "precompile_explicit.jl") +- + return + end + diff --git a/lang/julia07/files/patch-src_Makefile b/lang/julia07/files/patch-src_Makefile new file mode 100644 index 000000000000..557d854f3cca --- /dev/null +++ b/lang/julia07/files/patch-src_Makefile @@ -0,0 +1,20 @@ +--- src/Makefile.orig 2018-07-13 22:23:23 UTC ++++ src/Makefile +@@ -266,7 +266,7 @@ else + endif + + $(build_shlibdir)/libjulia-debug.$(JL_MAJOR_MINOR_SHLIB_EXT): $(SRCDIR)/julia.expmap $(DOBJS) $(BUILDDIR)/flisp/libflisp-debug.a $(BUILDDIR)/support/libsupport-debug.a $(LIBUV) +- @$(call PRINT_LINK, $(CXXLD) $(CXXFLAGS) $(CXXLDFLAGS) $(DEBUGFLAGS) $(DOBJS) $(RPATH_LIB) -o $@ $(LDFLAGS) $(JLIBLDFLAGS) $(DEBUG_LIBS) $(SONAME_DEBUG)) ++ @$(call PRINT_LINK, $(CXXLD) $(CXXFLAGS) $(CXXLDFLAGS) $(DEBUGFLAGS) $(DOBJS) $(RPATH_LIB) -o $@ $(LDFLAGS) $(JLIBLDFLAGS) $(DEBUG_LIBS) $(SONAME_DEBUG)) -lgcc_s + $(INSTALL_NAME_CMD)libjulia-debug.$(SHLIB_EXT) $@ + ifneq ($(OS), WINNT) + @ln -sf libjulia-debug.$(JL_MAJOR_MINOR_SHLIB_EXT) $(build_shlibdir)/libjulia-debug.$(JL_MAJOR_SHLIB_EXT) +@@ -281,7 +281,7 @@ $(BUILDDIR)/libjulia-debug.a: $(SRCDIR)/julia.expmap $ + libjulia-debug: $(build_shlibdir)/libjulia-debug.$(JL_MAJOR_MINOR_SHLIB_EXT) $(PUBLIC_HEADER_TARGETS) + + $(build_shlibdir)/libjulia.$(JL_MAJOR_MINOR_SHLIB_EXT): $(SRCDIR)/julia.expmap $(OBJS) $(BUILDDIR)/flisp/libflisp.a $(BUILDDIR)/support/libsupport.a $(LIBUV) +- @$(call PRINT_LINK, $(CXXLD) $(CXXFLAGS) $(CXXLDFLAGS) $(SHIPFLAGS) $(OBJS) $(RPATH_LIB) -o $@ $(LDFLAGS) $(JLIBLDFLAGS) $(RELEASE_LIBS) $(SONAME)) ++ @$(call PRINT_LINK, $(CXXLD) $(CXXFLAGS) $(CXXLDFLAGS) $(SHIPFLAGS) $(OBJS) $(RPATH_LIB) -o $@ $(LDFLAGS) $(JLIBLDFLAGS) $(RELEASE_LIBS) $(SONAME)) -lgcc_s + $(INSTALL_NAME_CMD)libjulia.$(SHLIB_EXT) $@ + ifneq ($(OS), WINNT) + @ln -sf libjulia.$(JL_MAJOR_MINOR_SHLIB_EXT) $(build_shlibdir)/libjulia.$(JL_MAJOR_SHLIB_EXT) |