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.
This commit is contained in:
Jimmy Olgeni 2006-12-11 17:28:59 +00:00
parent 1bb6af069e
commit 87ce2964ee
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=179503
8 changed files with 144 additions and 0 deletions

View file

@ -8,6 +8,7 @@
PORTNAME= erlang
PORTVERSION= r11b2
PORTEPOCH= 1
PORTREVISION= 1
CATEGORIES= lang parallel
MASTER_SITES= http://www.erlang.org/download/ \
ftp://ftp.erlang.org/pub/download/ \

View file

@ -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:

View file

@ -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) ->

View file

@ -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, []).

View file

@ -8,6 +8,7 @@
PORTNAME= erlang
PORTVERSION= r11b2
PORTEPOCH= 1
PORTREVISION= 1
CATEGORIES= lang parallel
MASTER_SITES= http://www.erlang.org/download/ \
ftp://ftp.erlang.org/pub/download/ \

View file

@ -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:

View file

@ -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) ->

View file

@ -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, []).