diff options
Diffstat (limited to 'lang/julia/files')
-rw-r--r-- | lang/julia/files/check_openblas.c | 10 | ||||
-rw-r--r-- | lang/julia/files/patch-Make.inc | 51 | ||||
-rw-r--r-- | lang/julia/files/patch-Make.user | 28 | ||||
-rw-r--r-- | lang/julia/files/patch-Makefile | 85 | ||||
-rw-r--r-- | lang/julia/files/patch-deps_suitesparse.mk | 11 | ||||
-rw-r--r-- | lang/julia/files/patch-src_Makefile | 28 | ||||
-rw-r--r-- | lang/julia/files/patch-ui_Makefile | 17 |
7 files changed, 230 insertions, 0 deletions
diff --git a/lang/julia/files/check_openblas.c b/lang/julia/files/check_openblas.c new file mode 100644 index 000000000000..6218d3507c65 --- /dev/null +++ b/lang/julia/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/julia/files/patch-Make.inc b/lang/julia/files/patch-Make.inc new file mode 100644 index 000000000000..5390c73c479d --- /dev/null +++ b/lang/julia/files/patch-Make.inc @@ -0,0 +1,51 @@ +--- Make.inc.orig 2016-09-20 02:54:21 UTC ++++ Make.inc +@@ -128,12 +128,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 +@@ -178,7 +173,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 +@@ -192,7 +187,7 @@ build_libdir := $(build_prefix)/lib + build_libexecdir := $(build_prefix)/libexec + build_datarootdir := $(build_prefix)/share + build_docdir := $(build_datarootdir)/doc/julia +-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 +@@ -400,7 +395,7 @@ JCFLAGS := -pipe $(fPIC) -fno-strict-ali + JCPPFLAGS := -fasynchronous-unwind-tables + JCXXFLAGS := -pipe $(fPIC) -fno-rtti -pedantic + DEBUGFLAGS := -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all +-SHIPFLAGS := -O3 -g ++SHIPFLAGS := -O3 + ifeq ($(OS), Darwin) + ifeq ($(USE_LIBCPP), 1) + CC += -stdlib=libc++ -mmacosx-version-min=10.7 +@@ -832,7 +827,7 @@ endif + + ifeq ($(USE_SYSTEM_UTF8PROC), 1) + LIBUTF8PROC := -lutf8proc +- UTF8PROC_INC := /usr/include ++ UTF8PROC_INC := $(LOCALBASE)/include + else + LIBUTF8PROC := $(build_libdir)/libutf8proc.a + UTF8PROC_INC := $(build_includedir) diff --git a/lang/julia/files/patch-Make.user b/lang/julia/files/patch-Make.user new file mode 100644 index 000000000000..7edb8a1df31e --- /dev/null +++ b/lang/julia/files/patch-Make.user @@ -0,0 +1,28 @@ +--- Make.user.orig 2016-12-17 12:39:14 UTC ++++ Make.user +@@ -0,0 +1,25 @@ ++USE_SYSTEM_ARPACK= 1 ++USE_SYSTEM_BLAS= 1 ++USE_SYSTEM_GMP= 1 ++USE_SYSTEM_LAPACK= 1 ++USE_SYSTEM_LIBGIT2= 1 ++USE_SYSTEM_LIBM= 1 ++USE_SYSTEM_LIBUNWIND= 1 ++USE_SYSTEM_LIBUV= 0 ++USE_SYSTEM_LLVM= 1 ++USE_SYSTEM_MPFR= 1 ++# USE_SYSTEM_OPENLIBM= 0 ++USE_SYSTEM_PATCHELF= 1 ++USE_SYSTEM_PCRE= 1 ++USE_SYSTEM_UTF8PROC= 1 ++ ++LLVM_CONFIG= llvm-config38 ++ ++USE_SYSTEM_FFTW= 1 ++USE_SYSTEM_SUITESPARSE= 1 ++ ++LIBBLAS= -lopenblas -L$(LOCALBASE)/lib ++LIBBLASNAME= libopenblas ++ ++LIBLAPACK= $(LIBBLAS) ++LIBLAPACKNAME= $(LIBBLASNAME) diff --git a/lang/julia/files/patch-Makefile b/lang/julia/files/patch-Makefile new file mode 100644 index 000000000000..4154f3dacf91 --- /dev/null +++ b/lang/julia/files/patch-Makefile @@ -0,0 +1,85 @@ +--- Makefile.orig 2016-09-20 02:54:21 UTC ++++ Makefile +@@ -327,8 +327,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 +- @$(MAKE) $(QUIET_MAKE) all ++install: $(build_depsbindir)/stringreplace default + @for subdir in $(bindir) $(libexecdir) $(datarootdir)/julia/site/$(VERSDIR) $(docdir) $(man1dir) $(includedir)/julia $(libdir) $(private_libdir) $(sysconfdir); do \ + mkdir -p $(DESTDIR)$$subdir; \ + done +@@ -387,10 +386,6 @@ endif + $(INSTALL_M) $(JULIAHOME)/contrib/julia-config.jl $(DESTDIR)$(datarootdir)/julia/ + # Copy in all .jl sources as well + cp -R -L $(build_datarootdir)/julia $(DESTDIR)$(datarootdir)/ +- # Copy documentation +- cp -R -L $(build_docdir)/* $(DESTDIR)$(docdir)/ +- cp -R -L $(BUILDROOT)/doc/_build/html $(DESTDIR)$(docdir)/ +- -rm $(DESTDIR)$(docdir)/html/.buildinfo + # Remove perf suite + -rm -rf $(DESTDIR)$(datarootdir)/julia/test/perf/ + # Remove various files which should not be installed +@@ -398,38 +393,44 @@ endif + -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)) ++ # Update RPATH entries and JL_SYSTEM_IMAGE_PATH if $(libdir_rel) != $(private_libdir_rel) ++ifneq ($(libdir_rel),$(private_libdir_rel)) + ifeq ($(OS), Darwin) + for julia in $(DESTDIR)$(bindir)/julia* ; do \ + install_name_tool -rpath @executable_path/$(build_private_libdir_rel) @executable_path/$(private_libdir_rel) $$julia; \ + install_name_tool -rpath @executable_path/$(build_libdir_rel) @executable_path/$(libdir_rel) $$julia; \ + done +-else ifeq ($(OS), Linux) ++else + for julia in $(DESTDIR)$(bindir)/julia* ; do \ + patchelf --set-rpath '$$ORIGIN/$(private_libdir_rel):$$ORIGIN/$(libdir_rel)' $$julia; \ + done + endif +- +- # Overwrite JL_SYSTEM_IMAGE_PATH in julia library +- $(call stringreplace,$(DESTDIR)$(libdir)/libjulia.$(SHLIB_EXT),sys.$(SHLIB_EXT)$$,$(private_libdir_rel)/sys.$(SHLIB_EXT)) +- $(call stringreplace,$(DESTDIR)$(libdir)/libjulia-debug.$(SHLIB_EXT),sys-debug.$(SHLIB_EXT)$$,$(private_libdir_rel)/sys-debug.$(SHLIB_EXT)) + endif + + mkdir -p $(DESTDIR)$(sysconfdir) + cp -R $(build_sysconfdir)/julia $(DESTDIR)$(sysconfdir)/ + ++install-docs: ++ mkdir -p $(DESTDIR)$(docdir)/ ++ cp -R -L $(BUILDROOT)/doc/_build/html $(DESTDIR)$(docdir)/ ++ rm $(DESTDIR)$(docdir)/html/.buildinfo ++ ++install-examples: ++ mkdir -p $(DESTDIR)$(datarootdir)/examples/julia/ ++ cp -R -L $(JULIAHOME)/examples/* $(DESTDIR)$(datarootdir)/examples/julia/ ++ ++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/ ++ 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/julia/files/patch-deps_suitesparse.mk b/lang/julia/files/patch-deps_suitesparse.mk new file mode 100644 index 000000000000..31a04009761d --- /dev/null +++ b/lang/julia/files/patch-deps_suitesparse.mk @@ -0,0 +1,11 @@ +--- deps/suitesparse.mk.orig 2016-09-20 02:54:21 UTC ++++ deps/suitesparse.mk +@@ -93,7 +93,7 @@ install-suitesparse: $(SUITESPARSE_OBJ_T + # SUITESPARSE WRAPPER + + ifeq ($(USE_SYSTEM_SUITESPARSE), 1) +-SUITESPARSE_INC := -I /usr/include/suitesparse ++SUITESPARSE_INC := -I $(LOCALBASE)/include/suitesparse + SUITESPARSE_LIB := -lumfpack -lcholmod -lamd -lcamd -lcolamd -lspqr + else + SUITESPARSE_INC := -I $(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/CHOLMOD/Include -I $(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/SuiteSparse_config -I $(BUILDDIR)/SuiteSparse-$(SUITESPARSE_VER)/SPQR/Include diff --git a/lang/julia/files/patch-src_Makefile b/lang/julia/files/patch-src_Makefile new file mode 100644 index 000000000000..4cc45173e9a6 --- /dev/null +++ b/lang/julia/files/patch-src_Makefile @@ -0,0 +1,28 @@ +--- src/Makefile.orig 2016-09-20 02:54:21 UTC ++++ src/Makefile +@@ -9,7 +9,7 @@ override CFLAGS += $(JCFLAGS) + ifeq ($(LLVM_VER),3.3) + override CXXFLAGS += $(JCXXFLAGS) -std=c++11 + else +-override CXXFLAGS += $(JCXXFLAGS) ++override CXXFLAGS += $(JCXXFLAGS) -stdlib=libc++ -std=c++11 + endif + override CPPFLAGS += $(JCPPFLAGS) + +@@ -21,6 +21,7 @@ FLAGS := \ + -D_GNU_SOURCE -I$(BUILDDIR) -I$(SRCDIR) \ + -I$(SRCDIR)/flisp -I$(SRCDIR)/support \ + -I$(LIBUV_INC) -I$(build_includedir) -DLIBRARY_EXPORTS \ ++ -I$(LOCALBASE)/include \ + -I$(JULIAHOME)/deps/valgrind + ifneq ($(USEMSVC), 1) + FLAGS += -Wall -Wno-strict-aliasing -fno-omit-frame-pointer -fvisibility=hidden -fno-common \ +@@ -75,7 +76,7 @@ else + ifeq ($(OS),WINNT) + LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM-$(LLVM_VER_SHORT) + else +-LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM-$(shell $(LLVM_CONFIG_HOST) --version) ++LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags --libs) + endif # OS == WINNT + endif # LLVM_USE_CMAKE == 1 + FLAGS += -DLLVM_SHLIB diff --git a/lang/julia/files/patch-ui_Makefile b/lang/julia/files/patch-ui_Makefile new file mode 100644 index 000000000000..e6878e287919 --- /dev/null +++ b/lang/julia/files/patch-ui_Makefile @@ -0,0 +1,17 @@ +--- ui/Makefile.orig 2016-09-20 02:54:22 UTC ++++ ui/Makefile +@@ -66,10 +66,12 @@ else + CXXLD := $(LD) + endif + ++LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags --system-libs) ++ + $(build_bindir)/julia$(EXE): $(OBJS) +- @$(call PRINT_LINK, $(CXXLD) $(CXXFLAGS) $(CXXLDFLAGS) $(LINK_FLAGS) $(SHIPFLAGS) $^ -o $@ -L$(build_private_libdir) -L$(build_libdir) -L$(build_shlibdir) -ljulia $(JLDFLAGS) $(CXXLDFLAGS)) ++ @$(call PRINT_LINK, $(CXXLD) -v $(CXXFLAGS) $(CXXLDFLAGS) $(LINK_FLAGS) $(SHIPFLAGS) $^ -o $@ -L$(build_private_libdir) -L$(build_libdir) -L$(build_shlibdir) -ljulia $(JLDFLAGS) $(CXXLDFLAGS) $(LLVMLINK)) + $(build_bindir)/julia-debug$(EXE): $(DOBJS) +- @$(call PRINT_LINK, $(CXXLD) $(CXXFLAGS) $(CXXLDFLAGS) $(LINK_FLAGS) $(DEBUGFLAGS) $^ -o $@ -L$(build_private_libdir) -L$(build_libdir) -L$(build_shlibdir) -ljulia-debug $(JLDFLAGS) $(CXXLDFLAGS)) ++ @$(call PRINT_LINK, $(CXXLD) $(CXXFLAGS) $(CXXLDFLAGS) $(LINK_FLAGS) $(DEBUGFLAGS) $^ -o $@ -L$(build_private_libdir) -L$(build_libdir) -L$(build_shlibdir) -ljulia-debug $(JLDFLAGS) $(CXXLDFLAGS) $(LLVMLINK)) + + clean: | $(CLEAN_TARGETS) + rm -f *.o *.dbg.obj |