From 758edde62973c24d29b0c082f9cab9329b405194 Mon Sep 17 00:00:00 2001 From: Rene Ladan Date: Wed, 1 Jan 2020 14:20:43 +0000 Subject: Remove expired ports: 2020-01-01 databases/couchdb: No longer supported upstream, move to databases/couchdb2 2020-01-01 databases/riak: No longer supported upstream, see riak 2.9.0 and newer 2020-01-01 lang/erlang-runtime15: No longer supported upstream, use lang/erlang >= 21 2020-01-01 lang/erlang-runtime16: No longer supported upstream, use lang/erlang >=21 2020-01-01 lang/erlang-runtime17: No longer supported upstream, use lang/erlang >=21 2020-01-01 lang/erlang-runtime18: No longer supported upstream, use lang/erlang >=21 2020-01-01 lang/erlang-runtime19: No longer supported upstream, use lang/erlang >=21 --- .../files/patch-lib_gs_src_tool__utils.erl | 84 ---------------------- 1 file changed, 84 deletions(-) delete mode 100644 lang/erlang-runtime15/files/patch-lib_gs_src_tool__utils.erl (limited to 'lang/erlang-runtime15/files/patch-lib_gs_src_tool__utils.erl') diff --git a/lang/erlang-runtime15/files/patch-lib_gs_src_tool__utils.erl b/lang/erlang-runtime15/files/patch-lib_gs_src_tool__utils.erl deleted file mode 100644 index 94d64aaf2a94..000000000000 --- a/lang/erlang-runtime15/files/patch-lib_gs_src_tool__utils.erl +++ /dev/null @@ -1,84 +0,0 @@ ---- lib/gs/src/tool_utils.erl.orig -+++ lib/gs/src/tool_utils.erl -@@ -27,6 +27,9 @@ - -export([file_dialog/1]). - -export([notify/2, confirm/2, confirm_yesno/2, request/2]). - -+%% Browser executable list (openURL command line protocol required) -+-define(BROWSERS, ["netscape", "mozilla", "MozillaFirebird", "opera", "firefox", "seamonkey"]). -+ - %%---------------------------------------------------------------------- - %% open_help(GS, File) - %% GS = gsobj() (GS root object returned by gs:start/0,1) -@@ -67,7 +70,7 @@ - {unix,Type} -> - case Type of - darwin -> "open " ++ File; -- _Else -> "netscape -remote \"openURL(file:" ++ File ++ ")\"" -+ _Else -> unix_url_command("file:" ++ File) - end; - {win32,_AnyType} -> - "start " ++ filename:nativename(File); -@@ -82,7 +85,7 @@ - {unix,Type} -> - case Type of - darwin -> "open " ++ File; -- _Else -> "netscape -remote \"openURL(file:" ++ File ++ ")\"" -+ _Else -> unix_url_command("file:" ++ File) - end; - {win32,_AnyType} -> - "netscape.exe -h " ++ regexp:gsub(File,"\\\\","/"); -@@ -342,3 +345,53 @@ - [Last]; - insert_newlines(Other) -> - Other. -+ -+%% find_browser(BrowserList) => string() | false -+%% BrowserList - [string()] -+%% Given a list of basenames, find the first available executable. -+ -+find_browser([]) -> -+ false; -+ -+find_browser([H | T]) -> -+ case os:find_executable(H) of -+ false -> -+ find_browser(T); -+ Browser -> -+ Browser -+ end. -+ -+%% unix_url_command(URL) => string() -+%% URL - string() -+%% Open an URL, using a browser which supports the openURL command -+%% line protocol. If no browser is found, the empty string will be -+%% returned. -+ -+unix_url_command(URL) -> -+ Template = "BROWSER -remote \"openURL(" ++ URL ++ ")\" || BROWSER " ++ URL ++ "&", -+ -+ case os:getenv("BROWSER") of -+ false -> -+ %% look for a compatible browser -+ case find_browser(?BROWSERS) of -+ false -> -+ ""; -+ Browser -> -+ case regexp:gsub(Template, "BROWSER", Browser) of -+ {ok, Command, 0} -> -+ %% Template does not contain "BROWSER" placeholder -+ ""; -+ {ok, Command, _} -> -+ Command -+ end -+ end; -+ -+ Value -> -+ case regexp:gsub(Template, "BROWSER", Value) of -+ {ok, Command2, 0} -> -+ %% no placeholder -+ ""; -+ {ok, Command2, _} -> -+ Command2 -+ end -+ end. -- cgit v1.2.3