diff options
author | olgeni <olgeni@FreeBSD.org> | 2005-01-09 01:46:32 +0800 |
---|---|---|
committer | olgeni <olgeni@FreeBSD.org> | 2005-01-09 01:46:32 +0800 |
commit | e9500d57873f0c5d693ffbebd20738c28ae2d81c (patch) | |
tree | d0a7798c99bcebd2ff12561eb32b7f258c824fca /devel | |
parent | 86b5a0c8ab8f249a28f9880f3ec7e9087f2cdf50 (diff) | |
download | freebsd-ports-gnome-e9500d57873f0c5d693ffbebd20738c28ae2d81c.tar.gz freebsd-ports-gnome-e9500d57873f0c5d693ffbebd20738c28ae2d81c.tar.zst freebsd-ports-gnome-e9500d57873f0c5d693ffbebd20738c28ae2d81c.zip |
Add dialyzer, a static analysis tool for Erlang/OTP applications.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/dialyzer/Makefile | 41 | ||||
-rw-r--r-- | devel/dialyzer/distinfo | 2 | ||||
-rw-r--r-- | devel/dialyzer/files/patch-setup.sh | 26 | ||||
-rw-r--r-- | devel/dialyzer/files/patch-src_dialyzer__gui.erl | 25 | ||||
-rw-r--r-- | devel/dialyzer/pkg-descr | 6 | ||||
-rw-r--r-- | devel/dialyzer/pkg-message | 6 | ||||
-rw-r--r-- | devel/dialyzer/pkg-plist | 37 |
8 files changed, 144 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index f8ce05714715..0d71f37c25f2 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -195,6 +195,7 @@ SUBDIR += devhelp SUBDIR += devtodo SUBDIR += dia2code + SUBDIR += dialyzer SUBDIR += diffconvert SUBDIR += directfb SUBDIR += distcc diff --git a/devel/dialyzer/Makefile b/devel/dialyzer/Makefile new file mode 100644 index 000000000000..505cbdfc77a0 --- /dev/null +++ b/devel/dialyzer/Makefile @@ -0,0 +1,41 @@ +# New ports collection makefile for: dialyzer +# Date Created: 8 January 2005 +# Whom: olgeni@FreeBSD.org +# +# $FreeBSD$ +# + +PORTNAME= dialyzer +PORTVERSION= 1.2.0 +CATEGORIES= devel +MASTER_SITES= http://www.it.uu.se/research/group/hipe/dialyzer/snapshots/ + +MAINTAINER= olgeni@FreeBSD.org +COMMENT= Static analysis tool for Erlang/OTP applications + +BUILD_DEPENDS= erlc:${PORTSDIR}/lang/erlang +RUN_DEPENDS= erl:${PORTSDIR}/lang/erlang + +USE_REINPLACE= yes +WRKSRC= ${WRKDIR}/${PORTNAME} + +PLIST_SUB= VERSION="${PORTVERSION}" + +post-patch: + @${REINPLACE_CMD} -e 's|%%DIALYZER_DIR%%|${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}|g' ${WRKSRC}/setup.sh + @${FIND} ${WRKSRC} -name .cvsignore | ${XARGS} ${RM} + +do-build: + @cd ${WRKSRC} && ./setup.sh ${PREFIX}/lib/erlang + +do-install: + @${MKDIR} ${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION} + @${LN} -sf ${PORTNAME}-${PORTVERSION} ${PREFIX}/lib/erlang/lib/${PORTNAME} + @cd ${WRKSRC} && ${CP} -r README RELEASE_NOTES dialyzer doc ebin plt src ${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION} + @${FIND} ${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION} -name \*.orig | ${XARGS} ${RM} + @${LN} -sf ${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}/dialyzer ${PREFIX}/bin/dialyzer + +post-install: + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/devel/dialyzer/distinfo b/devel/dialyzer/distinfo new file mode 100644 index 000000000000..0e209348bf60 --- /dev/null +++ b/devel/dialyzer/distinfo @@ -0,0 +1,2 @@ +MD5 (dialyzer-1.2.0.tar.gz) = ed2bb42a7628f57950ca146e041a5f99 +SIZE (dialyzer-1.2.0.tar.gz) = 33017 diff --git a/devel/dialyzer/files/patch-setup.sh b/devel/dialyzer/files/patch-setup.sh new file mode 100644 index 000000000000..388698edad6e --- /dev/null +++ b/devel/dialyzer/files/patch-setup.sh @@ -0,0 +1,26 @@ + +$FreeBSD$ + +--- setup.sh.orig ++++ setup.sh +@@ -87,19 +87,12 @@ + echo "Compilation of $file failed" + exit 1 + fi +- printf " Checking consistency of ebin/*.beam files... " +- $DIALYZER_OTP_OTP -pa utils/ -noshell -s dialyzer_chk test `pwd` -s init stop +- rm -f utils/dialyzer_chk.beam + + ## create the dialyzer script + sed -e "s;%OTP_DIR%;$DIALYZER_OTP_DIR;" \ + -e "s;%VSN%;$VSN;" -e "s;%DATE%;`date`;" \ +- -e "s;%DIALYZER_DIR%;`pwd`;" src/dialyzer.src > dialyzer ++ -e "s;%DIALYZER_DIR%;%%DIALYZER_DIR%%;" src/dialyzer.src > dialyzer + chmod +x dialyzer +- echo "Dialyzer is analyzing itself..." +- ./dialyzer --src --command-line "`pwd`/src" +- echo "Dialyzer setup done!" +- echo " For the full set of Dialyzer options type: ./dialyzer --help" + else + echo "Could not find ${DIALYZER_OTP_ERLC}" + fi diff --git a/devel/dialyzer/files/patch-src_dialyzer__gui.erl b/devel/dialyzer/files/patch-src_dialyzer__gui.erl new file mode 100644 index 000000000000..5ed6444f2e02 --- /dev/null +++ b/devel/dialyzer/files/patch-src_dialyzer__gui.erl @@ -0,0 +1,25 @@ + +$FreeBSD$ + +--- src/dialyzer_gui.erl.orig ++++ src/dialyzer_gui.erl +@@ -489,8 +489,8 @@ + {'EXIT', BackendPid, Reason} when Reason /= normal -> + error(State, Reason), + gui_loop(State); +- Other -> +- io:format("Received ~p\n", [Other]), ++ _Other -> ++ %% io:format("Received ~p\n", [Other]), + gui_loop(State) + end. + +@@ -1019,7 +1019,7 @@ + ReAnalyze = + case filelib:is_file(Plt) of + true -> +- case dets:open_file(Plt) of ++ case dets:open_file(Plt,[{access,read}]) of + {ok, Dets} -> + Res = + case dets:lookup(Dets, md5) of diff --git a/devel/dialyzer/pkg-descr b/devel/dialyzer/pkg-descr new file mode 100644 index 000000000000..497d06766889 --- /dev/null +++ b/devel/dialyzer/pkg-descr @@ -0,0 +1,6 @@ +The Dialyzer is a static analysis tool that identifies software +discrepancies such as obvious type errors, unreachable code, redundant +tests, virtual machine bytecode which is unsafe, etc. in single +Erlang modules or entire applications. + +WWW: http://www.it.uu.se/research/group/hipe/dialyzer/ diff --git a/devel/dialyzer/pkg-message b/devel/dialyzer/pkg-message new file mode 100644 index 000000000000..fe5255dd718a --- /dev/null +++ b/devel/dialyzer/pkg-message @@ -0,0 +1,6 @@ +============================================================= + +You will have to run "dialyzer" as root for the first time to +initialize the PLT table. + +============================================================= diff --git a/devel/dialyzer/pkg-plist b/devel/dialyzer/pkg-plist new file mode 100644 index 000000000000..8eb22b8ff61c --- /dev/null +++ b/devel/dialyzer/pkg-plist @@ -0,0 +1,37 @@ +lib/erlang/lib/dialyzer-%%VERSION%%/README +lib/erlang/lib/dialyzer-%%VERSION%%/RELEASE_NOTES +lib/erlang/lib/dialyzer-%%VERSION%%/dialyzer +lib/erlang/lib/dialyzer-%%VERSION%%/doc/about.txt +lib/erlang/lib/dialyzer-%%VERSION%%/doc/manual.txt +lib/erlang/lib/dialyzer-%%VERSION%%/doc/overview.txt +lib/erlang/lib/dialyzer-%%VERSION%%/doc/warnings.txt +lib/erlang/lib/dialyzer-%%VERSION%%/ebin/dialyzer.app +lib/erlang/lib/dialyzer-%%VERSION%%/ebin/dialyzer.beam +lib/erlang/lib/dialyzer-%%VERSION%%/ebin/dialyzer_analysis.beam +lib/erlang/lib/dialyzer-%%VERSION%%/ebin/dialyzer_cl.beam +lib/erlang/lib/dialyzer-%%VERSION%%/ebin/dialyzer_gui.beam +lib/erlang/lib/dialyzer-%%VERSION%%/ebin/dialyzer_module_callgraph.beam +lib/erlang/lib/dialyzer-%%VERSION%%/ebin/dialyzer_options.beam +lib/erlang/lib/dialyzer-%%VERSION%%/ebin/dialyzer_plt.beam +lib/erlang/lib/dialyzer-%%VERSION%%/plt/dialyzer_empty_plt +lib/erlang/lib/dialyzer-%%VERSION%%/src/dialyzer.app.src +lib/erlang/lib/dialyzer-%%VERSION%%/src/dialyzer.erl +lib/erlang/lib/dialyzer-%%VERSION%%/src/dialyzer.hrl +lib/erlang/lib/dialyzer-%%VERSION%%/src/dialyzer.hrl.src +lib/erlang/lib/dialyzer-%%VERSION%%/src/dialyzer.src +lib/erlang/lib/dialyzer-%%VERSION%%/src/dialyzer_analysis.erl +lib/erlang/lib/dialyzer-%%VERSION%%/src/dialyzer_cl.erl +lib/erlang/lib/dialyzer-%%VERSION%%/src/dialyzer_gui.erl +lib/erlang/lib/dialyzer-%%VERSION%%/src/dialyzer_module_callgraph.erl +lib/erlang/lib/dialyzer-%%VERSION%%/src/dialyzer_options.erl +lib/erlang/lib/dialyzer-%%VERSION%%/src/dialyzer_plt.erl +lib/erlang/lib/dialyzer-%%VERSION%%/src/hipe_icode_type.hrl +@dirrm lib/erlang/lib/dialyzer-%%VERSION%%/src +@dirrm lib/erlang/lib/dialyzer-%%VERSION%%/plt +@dirrm lib/erlang/lib/dialyzer-%%VERSION%%/ebin +@dirrm lib/erlang/lib/dialyzer-%%VERSION%%/doc +@dirrm lib/erlang/lib/dialyzer-%%VERSION%% +@exec ln -sf dialyzer-%%VERSION%% %D/lib/erlang/lib/dialyzer +@unexec rm -f %D/lib/erlang/lib/dialyzer 2>&1 >/dev/null || true +@exec ln -sf %D/lib/erlang/lib/dialyzer-%%VERSION%%/dialyzer %D/bin/dialyzer +@unexec rm %D/bin/dialyzer 2>&1 >/dev/null || true |