Browse Source

Proper fix for NIF code detection when port_specs is used

Adds rafter back to the index.
Loïc Hoguin 10 years ago
parent
commit
3e7c5625f6
4 changed files with 15 additions and 10 deletions
  1. 12 10
      core/deps.mk
  2. 1 0
      packages.v1.tsv
  3. 1 0
      packages.v1.txt
  4. 1 0
      packages.v2.tsv

+ 12 - 10
core/deps.mk

@@ -244,10 +244,20 @@ define dep_autopatch_rebar.erl
 		])
 		])
 	end,
 	end,
 	fun() ->
 	fun() ->
+		case filelib:is_dir("$(DEPS_DIR)/$(1)/c_src") of
+			false -> ok;
+			true ->
+				Sources = filelib:fold_files("$(DEPS_DIR)/$(1)/c_src", ".*\\\\.(c|C|cc|cpp)$$$$", true, fun(F, Acc) -> [F|Acc] end, []),
+				Write(io_lib:format("SOURCES :=~s\n", [[[" ", S] || S <- Sources]]))
+		end
+	end(),
+	fun() ->
 		case lists:keyfind(port_specs, 1, Conf) of
 		case lists:keyfind(port_specs, 1, Conf) of
-			{_, [{Output, _}]} ->
+			{_, [{Output, Wildcards}]} ->
 				filelib:ensure_dir("$(DEPS_DIR)/$(1)/" ++ Output),
 				filelib:ensure_dir("$(DEPS_DIR)/$(1)/" ++ Output),
-				Write("C_SRC_OUTPUT = " ++ Escape(Output) ++ "\n");
+				Write("C_SRC_OUTPUT = " ++ Escape(Output) ++ "\n"),
+				Sources = [[[" ", S] || S <- filelib:wildcard("$(DEPS_DIR)/$(1)/" ++ W)] || W <- Wildcards],
+				Write(io_lib:format("SOURCES :=~s\n", [Sources]));
 			{_, [First, Second]} ->
 			{_, [First, Second]} ->
 				PortSpec("1", First),
 				PortSpec("1", First),
 				PortSpec("2", Second),
 				PortSpec("2", Second),
@@ -285,14 +295,6 @@ define dep_autopatch_rebar.erl
 			_ -> ok
 			_ -> ok
 		end
 		end
 	end(),
 	end(),
-	fun() ->
-		case filelib:is_dir("$(DEPS_DIR)/$(1)/c_src") of
-			false -> ok;
-			true ->
-				Sources = filelib:fold_files("$(DEPS_DIR)/$(1)/c_src", ".*\\\\.(c|C|cc|cpp)$$$$", true, fun(F, Acc) -> [F|Acc] end, []),
-				Write(io_lib:format("SOURCES :=~s\n", [[[" ", S] || S <- Sources]]))
-		end
-	end(),
 	Write("\n\nrebar_dep: pre-deps deps pre-app app\n"),
 	Write("\n\nrebar_dep: pre-deps deps pre-app app\n"),
 	Write("\npre-deps::\n"),
 	Write("\npre-deps::\n"),
 	Write("\npre-app::\n"),
 	Write("\npre-app::\n"),

+ 1 - 0
packages.v1.tsv

@@ -115,6 +115,7 @@ ptrackerl	https://github.com/inaka/ptrackerl	https://github.com/inaka/ptrackerl
 push_service	https://github.com/hairyhum/push_service	https://github.com/hairyhum/push_service	Push service
 push_service	https://github.com/hairyhum/push_service	https://github.com/hairyhum/push_service	Push service
 qdate	https://github.com/choptastic/qdate	https://github.com/choptastic/qdate	Date, time, and timezone parsing, formatting, and conversion for Erlang.
 qdate	https://github.com/choptastic/qdate	https://github.com/choptastic/qdate	Date, time, and timezone parsing, formatting, and conversion for Erlang.
 rack	https://github.com/erlyvideo/rack	https://github.com/erlyvideo/rack	Rack handler for erlang
 rack	https://github.com/erlyvideo/rack	https://github.com/erlyvideo/rack	Rack handler for erlang
+rafter	https://github.com/andrewjstone/rafter	https://github.com/andrewjstone/rafter	An Erlang library application which implements the Raft consensus protocol
 ranch	https://github.com/ninenines/ranch	http://ninenines.eu	Socket acceptor pool for TCP protocols.
 ranch	https://github.com/ninenines/ranch	http://ninenines.eu	Socket acceptor pool for TCP protocols.
 rebar	https://github.com/rebar/rebar3	http://www.rebar3.org	Erlang build tool that makes it easy to compile and test Erlang applications, port drivers and releases.
 rebar	https://github.com/rebar/rebar3	http://www.rebar3.org	Erlang build tool that makes it easy to compile and test Erlang applications, port drivers and releases.
 rec2json	https://github.com/lordnull/rec2json	https://github.com/lordnull/rec2json	Compile erlang record definitions into modules to convert them to/from json easily.
 rec2json	https://github.com/lordnull/rec2json	https://github.com/lordnull/rec2json	Compile erlang record definitions into modules to convert them to/from json easily.

+ 1 - 0
packages.v1.txt

@@ -115,6 +115,7 @@ ptrackerl	https://github.com/inaka/ptrackerl	https://github.com/inaka/ptrackerl
 push_service	https://github.com/hairyhum/push_service	https://github.com/hairyhum/push_service	Push service
 push_service	https://github.com/hairyhum/push_service	https://github.com/hairyhum/push_service	Push service
 qdate	https://github.com/choptastic/qdate	https://github.com/choptastic/qdate	Date, time, and timezone parsing, formatting, and conversion for Erlang.
 qdate	https://github.com/choptastic/qdate	https://github.com/choptastic/qdate	Date, time, and timezone parsing, formatting, and conversion for Erlang.
 rack	https://github.com/erlyvideo/rack	https://github.com/erlyvideo/rack	Rack handler for erlang
 rack	https://github.com/erlyvideo/rack	https://github.com/erlyvideo/rack	Rack handler for erlang
+rafter	https://github.com/andrewjstone/rafter	https://github.com/andrewjstone/rafter	An Erlang library application which implements the Raft consensus protocol
 ranch	https://github.com/ninenines/ranch	http://ninenines.eu	Socket acceptor pool for TCP protocols.
 ranch	https://github.com/ninenines/ranch	http://ninenines.eu	Socket acceptor pool for TCP protocols.
 rebar	https://github.com/rebar/rebar3	http://www.rebar3.org	Erlang build tool that makes it easy to compile and test Erlang applications, port drivers and releases.
 rebar	https://github.com/rebar/rebar3	http://www.rebar3.org	Erlang build tool that makes it easy to compile and test Erlang applications, port drivers and releases.
 rec2json	https://github.com/lordnull/rec2json	https://github.com/lordnull/rec2json	Compile erlang record definitions into modules to convert them to/from json easily.
 rec2json	https://github.com/lordnull/rec2json	https://github.com/lordnull/rec2json	Compile erlang record definitions into modules to convert them to/from json easily.

+ 1 - 0
packages.v2.tsv

@@ -115,6 +115,7 @@ ptrackerl	git	https://github.com/inaka/ptrackerl	master	https://github.com/inaka
 push_service	git	https://github.com/hairyhum/push_service	master	https://github.com/hairyhum/push_service	Push service
 push_service	git	https://github.com/hairyhum/push_service	master	https://github.com/hairyhum/push_service	Push service
 qdate	git	https://github.com/choptastic/qdate	0.4.0	https://github.com/choptastic/qdate	Date, time, and timezone parsing, formatting, and conversion for Erlang.
 qdate	git	https://github.com/choptastic/qdate	0.4.0	https://github.com/choptastic/qdate	Date, time, and timezone parsing, formatting, and conversion for Erlang.
 rack	git	https://github.com/erlyvideo/rack	master	https://github.com/erlyvideo/rack	Rack handler for erlang
 rack	git	https://github.com/erlyvideo/rack	master	https://github.com/erlyvideo/rack	Rack handler for erlang
+rafter	git	https://github.com/andrewjstone/rafter	master	https://github.com/andrewjstone/rafter	An Erlang library application which implements the Raft consensus protocol
 ranch	git	https://github.com/ninenines/ranch	1.1.0	http://ninenines.eu	Socket acceptor pool for TCP protocols.
 ranch	git	https://github.com/ninenines/ranch	1.1.0	http://ninenines.eu	Socket acceptor pool for TCP protocols.
 rebar	git	https://github.com/rebar/rebar3	master	http://www.rebar3.org	Erlang build tool that makes it easy to compile and test Erlang applications, port drivers and releases.
 rebar	git	https://github.com/rebar/rebar3	master	http://www.rebar3.org	Erlang build tool that makes it easy to compile and test Erlang applications, port drivers and releases.
 rec2json	git	https://github.com/lordnull/rec2json	master	https://github.com/lordnull/rec2json	Compile erlang record definitions into modules to convert them to/from json easily.
 rec2json	git	https://github.com/lordnull/rec2json	master	https://github.com/lordnull/rec2json	Compile erlang record definitions into modules to convert them to/from json easily.