aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authorolgeni <olgeni@FreeBSD.org>2004-12-31 06:34:09 +0800
committerolgeni <olgeni@FreeBSD.org>2004-12-31 06:34:09 +0800
commite9a34b56c9e778b011b948c572cbdc7cb6f780b5 (patch)
tree373f98c11a6dfe2e2315806374aeeb53df533417 /lang
parent81043a59735322479671bd238e80035cae780395 (diff)
downloadfreebsd-ports-gnome-e9a34b56c9e778b011b948c572cbdc7cb6f780b5.tar.gz
freebsd-ports-gnome-e9a34b56c9e778b011b948c572cbdc7cb6f780b5.tar.zst
freebsd-ports-gnome-e9a34b56c9e778b011b948c572cbdc7cb6f780b5.zip
Fix issue with rb:show/1 (could not be called twice).
Obtained from: Peter Andersson <peppe (at) erix.ericsson.se>
Diffstat (limited to 'lang')
-rw-r--r--lang/erlang/Makefile1
-rw-r--r--lang/erlang/files/patch-lib_sasl_src_rb.erl65
-rw-r--r--lang/erlang14/Makefile1
-rw-r--r--lang/erlang14/files/patch-lib_sasl_src_rb.erl65
4 files changed, 132 insertions, 0 deletions
diff --git a/lang/erlang/Makefile b/lang/erlang/Makefile
index 156b2f445710..2098042ee87b 100644
--- a/lang/erlang/Makefile
+++ b/lang/erlang/Makefile
@@ -7,6 +7,7 @@
PORTNAME= erlang
PORTVERSION= r10b2
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= lang parallel
MASTER_SITES= http://www.erlang.org/download/ \
diff --git a/lang/erlang/files/patch-lib_sasl_src_rb.erl b/lang/erlang/files/patch-lib_sasl_src_rb.erl
new file mode 100644
index 000000000000..6fae0f417ac4
--- /dev/null
+++ b/lang/erlang/files/patch-lib_sasl_src_rb.erl
@@ -0,0 +1,65 @@
+
+$FreeBSD$
+
+--- lib/sasl/src/rb.erl.orig
++++ lib/sasl/src/rb.erl
+@@ -177,7 +177,7 @@
+ {reply, ok, State#state{device = standard_io}};
+ handle_call({show_number, Number}, _From, State) ->
+ #state{dir = Dir, data = Data, device = Device, abort = Abort, log = Log} = State,
+- NewDevice = print_report(Dir, Data, Number, Device, Abort, Log),
++ NewDevice = print_report_by_num(Dir, Data, Number, Device, Abort, Log),
+ {reply, ok, State#state{device = NewDevice}};
+ handle_call({show_type, Type}, _From, State) ->
+ #state{dir = Dir, data = Data, device = Device, abort = Abort, log = Log} = State,
+@@ -541,6 +541,10 @@
+ io_lib:format("~s", [ShortDescr]),
+ Date]).
+
++print_report_by_num(Dir, Data, Number, Device, Abort, Log) ->
++ {_,Device1} = print_report(Dir, Data, Number, Device, Abort, Log),
++ Device1.
++
+ print_typed_reports(_Dir, [], _Type, Device, _Abort, _Log) ->
+ Device;
+ print_typed_reports(Dir, Data, Type, Device, Abort, Log) ->
+@@ -569,23 +573,29 @@
+ end.
+
+ print_report(Dir, Data, Number, Device, Abort, Log) ->
+- {Fname, FilePosition} = find_report(Data, Number),
+- FileName = lists:concat([Dir, Fname]),
+- case file:open(FileName, read) of
+- {ok, Fd} ->
+- read_rep(Fd, FilePosition, Device, Abort, Log);
+- _ ->
+- io:format("rb: can't open file ~p~n", [Fname]),
++ case find_report(Data, Number) of
++ {Fname, FilePosition} ->
++ FileName = lists:concat([Dir, Fname]),
++ case file:open(FileName, read) of
++ {ok, Fd} ->
++ read_rep(Fd, FilePosition, Device, Abort, Log);
++ _ ->
++ io:format("rb: can't open file ~p~n", [Fname]),
++ {proceed,Device}
++ end;
++ no_report ->
+ {proceed,Device}
+ end.
+
+ find_report([{No, _Type, _Descr, _Date, Fname, FilePosition}|_T], No) ->
+ {Fname, FilePosition};
+-find_report([_H|T], No) -> find_report(T, No);
++find_report([_H|T], No) ->
++ find_report(T, No);
+ find_report([], No) ->
+- io:format("There is no report with number ~p.~n", [No]).
++ io:format("There is no report with number ~p.~n", [No]),
++ no_report.
+
+-print_grep_reports(_Dir, [], _RegExp, Device, Abort, Log) ->
++print_grep_reports(_Dir, [], _RegExp, Device, _Abort, _Log) ->
+ Device;
+ print_grep_reports(Dir, Data, RegExp, Device, Abort, Log) ->
+ {Next,Device1} = print_grep_report(Dir, Data, element(1, hd(Data)),
diff --git a/lang/erlang14/Makefile b/lang/erlang14/Makefile
index 156b2f445710..2098042ee87b 100644
--- a/lang/erlang14/Makefile
+++ b/lang/erlang14/Makefile
@@ -7,6 +7,7 @@
PORTNAME= erlang
PORTVERSION= r10b2
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= lang parallel
MASTER_SITES= http://www.erlang.org/download/ \
diff --git a/lang/erlang14/files/patch-lib_sasl_src_rb.erl b/lang/erlang14/files/patch-lib_sasl_src_rb.erl
new file mode 100644
index 000000000000..6fae0f417ac4
--- /dev/null
+++ b/lang/erlang14/files/patch-lib_sasl_src_rb.erl
@@ -0,0 +1,65 @@
+
+$FreeBSD$
+
+--- lib/sasl/src/rb.erl.orig
++++ lib/sasl/src/rb.erl
+@@ -177,7 +177,7 @@
+ {reply, ok, State#state{device = standard_io}};
+ handle_call({show_number, Number}, _From, State) ->
+ #state{dir = Dir, data = Data, device = Device, abort = Abort, log = Log} = State,
+- NewDevice = print_report(Dir, Data, Number, Device, Abort, Log),
++ NewDevice = print_report_by_num(Dir, Data, Number, Device, Abort, Log),
+ {reply, ok, State#state{device = NewDevice}};
+ handle_call({show_type, Type}, _From, State) ->
+ #state{dir = Dir, data = Data, device = Device, abort = Abort, log = Log} = State,
+@@ -541,6 +541,10 @@
+ io_lib:format("~s", [ShortDescr]),
+ Date]).
+
++print_report_by_num(Dir, Data, Number, Device, Abort, Log) ->
++ {_,Device1} = print_report(Dir, Data, Number, Device, Abort, Log),
++ Device1.
++
+ print_typed_reports(_Dir, [], _Type, Device, _Abort, _Log) ->
+ Device;
+ print_typed_reports(Dir, Data, Type, Device, Abort, Log) ->
+@@ -569,23 +573,29 @@
+ end.
+
+ print_report(Dir, Data, Number, Device, Abort, Log) ->
+- {Fname, FilePosition} = find_report(Data, Number),
+- FileName = lists:concat([Dir, Fname]),
+- case file:open(FileName, read) of
+- {ok, Fd} ->
+- read_rep(Fd, FilePosition, Device, Abort, Log);
+- _ ->
+- io:format("rb: can't open file ~p~n", [Fname]),
++ case find_report(Data, Number) of
++ {Fname, FilePosition} ->
++ FileName = lists:concat([Dir, Fname]),
++ case file:open(FileName, read) of
++ {ok, Fd} ->
++ read_rep(Fd, FilePosition, Device, Abort, Log);
++ _ ->
++ io:format("rb: can't open file ~p~n", [Fname]),
++ {proceed,Device}
++ end;
++ no_report ->
+ {proceed,Device}
+ end.
+
+ find_report([{No, _Type, _Descr, _Date, Fname, FilePosition}|_T], No) ->
+ {Fname, FilePosition};
+-find_report([_H|T], No) -> find_report(T, No);
++find_report([_H|T], No) ->
++ find_report(T, No);
+ find_report([], No) ->
+- io:format("There is no report with number ~p.~n", [No]).
++ io:format("There is no report with number ~p.~n", [No]),
++ no_report.
+
+-print_grep_reports(_Dir, [], _RegExp, Device, Abort, Log) ->
++print_grep_reports(_Dir, [], _RegExp, Device, _Abort, _Log) ->
+ Device;
+ print_grep_reports(Dir, Data, RegExp, Device, Abort, Log) ->
+ {Next,Device1} = print_grep_report(Dir, Data, element(1, hd(Data)),