From fd108f56744451b4a9050dcd375a1c22a2ba6f37 Mon Sep 17 00:00:00 2001 From: olgeni Date: Mon, 11 Dec 2006 17:28:59 +0000 Subject: Disable automatic PLT generation. Add the following patches: * patch-lib_dialyzer_src_Makefile Avoid computing the PLT when building the port. It may take so long that the port building cluster thinks this is a runaway port. * patch-lib_dialyzer_src_dialyzer__cl.erl Trick dialyzer into building the PLT even after the port is installed. * patch-lib_dialyzer_src_dialyzer__cl__parse.erl Let every user have his own initial PLT in ~/.dialyzer_init_plt. When dialyzer is invoked the PLT will be rebuilt if needed. This commit will fix both ports/105869 and the pointyhat port checks. --- .../erlang14/files/patch-lib_dialyzer_src_Makefile | 42 ++++++++++++++++++++++ .../files/patch-lib_dialyzer_src_dialyzer__cl.erl | 14 ++++++++ .../patch-lib_dialyzer_src_dialyzer__cl__parse.erl | 15 ++++++++ 3 files changed, 71 insertions(+) create mode 100644 lang/erlang14/files/patch-lib_dialyzer_src_Makefile create mode 100644 lang/erlang14/files/patch-lib_dialyzer_src_dialyzer__cl.erl create mode 100644 lang/erlang14/files/patch-lib_dialyzer_src_dialyzer__cl__parse.erl (limited to 'lang/erlang14/files') diff --git a/lang/erlang14/files/patch-lib_dialyzer_src_Makefile b/lang/erlang14/files/patch-lib_dialyzer_src_Makefile new file mode 100644 index 000000000000..de6ac4c165d6 --- /dev/null +++ b/lang/erlang14/files/patch-lib_dialyzer_src_Makefile @@ -0,0 +1,42 @@ + +$FreeBSD$ + +--- lib/dialyzer/src/Makefile.orig ++++ lib/dialyzer/src/Makefile +@@ -66,8 +66,6 @@ + dialyzer_succ_typings \ + dialyzer_typesig + +-EXTRA_FILES= ../plt/dialyzer_init_plt ## automatically generated +- + HRL_FILES= dialyzer.hrl + ERL_FILES= $(MODULES:%=%.erl) + INSTALL_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR)) $(APP_TARGET) $(APPUP_TARGET) +@@ -91,13 +89,12 @@ + # Targets + # ---------------------------------------------------- + +-debug opt: $(TARGET_FILES) $(DIALYZER_DIR)/plt/dialyzer_init_plt ++debug opt: $(TARGET_FILES) + + docs: + + clean: + rm -f $(TARGET_FILES) +- rm -f $(EXTRA_FILES) + rm -f core + + # ---------------------------------------------------- +@@ -149,11 +146,10 @@ + + release_spec: opt + $(INSTALL_DIR) $(RELSYSDIR)/src +- $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(EXTRA_FILES) \ ++ $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) \ + $(RELSYSDIR)/src + $(INSTALL_DIR) $(RELSYSDIR)/ebin + $(INSTALL_DATA) $(INSTALL_FILES) $(RELSYSDIR)/ebin + $(INSTALL_DIR) $(RELSYSDIR)/plt +- $(INSTALL_DATA) ../plt/dialyzer_init_plt $(RELSYSDIR)/plt + + release_docs_spec: diff --git a/lang/erlang14/files/patch-lib_dialyzer_src_dialyzer__cl.erl b/lang/erlang14/files/patch-lib_dialyzer_src_dialyzer__cl.erl new file mode 100644 index 000000000000..4c2e014af58e --- /dev/null +++ b/lang/erlang14/files/patch-lib_dialyzer_src_dialyzer__cl.erl @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- lib/dialyzer/src/dialyzer_cl.erl.orig ++++ lib/dialyzer/src/dialyzer_cl.erl +@@ -93,7 +93,7 @@ + check_if_installed() -> + case filename:basename(code:lib_dir(dialyzer)) of + "dialyzer" -> false; +- "dialyzer-" ++ _Version -> true ++ "dialyzer-" ++ _Version -> false + end. + + create_init_plt(MD5, Libs, InitPlt, IncludeDirs) -> diff --git a/lang/erlang14/files/patch-lib_dialyzer_src_dialyzer__cl__parse.erl b/lang/erlang14/files/patch-lib_dialyzer_src_dialyzer__cl__parse.erl new file mode 100644 index 000000000000..53c869623278 --- /dev/null +++ b/lang/erlang14/files/patch-lib_dialyzer_src_dialyzer__cl__parse.erl @@ -0,0 +1,15 @@ + +$FreeBSD$ + +--- lib/dialyzer/src/dialyzer_cl_parse.erl.orig ++++ lib/dialyzer/src/dialyzer_cl_parse.erl +@@ -155,8 +155,7 @@ + put(dialyzer_options_from, byte_code), + put(dialyzer_options_libs, ?DEFAULT_LIBS), + +- InitPltDir = filename:join([code:lib_dir(dialyzer), +- "plt","dialyzer_init_plt"]), ++ InitPltDir = filename:join([os:getenv ("HOME"), ".dialyzer_init_plt"]), + put(dialyzer_init_plt, InitPltDir), + put(dialyzer_warnings, []). + -- cgit