ports/lang/julia06/files/patch-Makefile
Li-Wen Hsu 7a74aea931 - Copy lang/julia to lang/julia06 and lang/julia07
- Update lang/julia07 to 0.7.0
- Update lang/julia to 0.1.0

PR:		230663
Submitted by:	Iblis Lin <iblis@hs.ntnu.edu.tw> (maintainer)
2018-09-06 20:57:01 +00:00

114 lines
5.8 KiB
Text

--- Makefile.orig 2018-07-09 19:17:10 UTC
+++ Makefile
@@ -71,7 +71,6 @@ $(build_prefix)/.examples: $(wildcard $(JULIAHOME)/exa
@mkdir -p $(build_docdir)/examples
@cp -R $(JULIAHOME)/examples/*.jl $(build_docdir)/examples/
@cp -R $(JULIAHOME)/examples/clustermanager $(build_docdir)/examples/
- @cp -R $(JULIAHOME)/examples/embedding $(build_docdir)/examples
@echo 1 > $@
julia-symlink: julia-ui-$(JULIA_BUILD_MODE)
@@ -96,7 +95,7 @@ julia-src-release julia-src-debug : julia-src-% : juli
julia-ui-release julia-ui-debug : julia-ui-% : julia-src-%
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/ui julia-$*
-julia-inference : julia-base julia-ui-$(JULIA_BUILD_MODE) $(build_prefix)/.examples
+julia-inference : julia-base julia-ui-$(JULIA_BUILD_MODE)
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) $(build_private_libdir)/inference.ji JULIA_BUILD_MODE=$(JULIA_BUILD_MODE)
ifneq ($(CPUID_SPECIFIC_BINARIES), 0)
@@ -351,7 +350,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
+install: $(build_depsbindir)/stringreplace
@$(MAKE) $(QUIET_MAKE) all
@for subdir in $(bindir) $(datarootdir)/julia/site/$(VERSDIR) $(docdir) $(man1dir) $(includedir)/julia $(libdir) $(private_libdir) $(sysconfdir); do \
mkdir -p $(DESTDIR)$$subdir; \
@@ -396,9 +395,6 @@ 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 $(build_docdir)/* $(DESTDIR)$(docdir)/
- cp -R -L $(BUILDROOT)/doc/_build/html $(DESTDIR)$(docdir)/
# Remove perf suite
-rm -rf $(DESTDIR)$(datarootdir)/julia/test/perf/
# Remove various files which should not be installed
@@ -406,51 +402,43 @@ 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 -add_rpath @executable_path/$(build_libdir_rel) @executable_path/$(libdir_rel) $$julia; \
done
-else ifneq (,$(findstring $(OS),Linux FreeBSD))
+else
for julia in $(DESTDIR)$(bindir)/julia* ; do \
- patchelf --set-rpath '$$ORIGIN/$(private_libdir_rel):$$ORIGIN/$(libdir_rel)' $$julia; \
+ patchelf --set-rpath '$(GCCPATH):$$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
- # 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-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/
+ -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)