{"action":"created","comment":{"url":"https://api.github.com/repos/blt/port_compiler/pulls/comments/27815381","id":27815381,"diff_hunk":"@@ -75,6 +75,37 @@ type(#spec{type = Type})          -> Type.\n %%% Internal Functions\n %%%===================================================================\n \n+port_spec_from_legacy(Config) ->\n+    %% Get the target from the so_name variable\n+    AName = rebar_state:get(Config, so_name),\n+    Target = filename:join(\"priv\", AName),\n+    %% Get the list of source files from port_sources\n+    Sources = port_sources(rebar_state:get(Config, port_sources,\n+                                                 [\"c_src/*.c\"])),\n+    #spec { type = target_type(Target),\n+            target = maybe_switch_extension(os:type(), Target),\n+            sources = Sources,\n+            objects = port_objects(Sources),\n+            opts    = [port_opt(Config, O) || O <- fill_in_defaults([])]}.\n+\n+port_sources(Sources) ->\n+    lists:flatmap(fun filelib:wildcard/1, Sources).\n+\n+target_type(Target) -> target_type1(filename:extension(Target)).\n+\n+target_type1(\".so\")  -> drv;","path":"src/pc_port_specs.erl","position":31,"original_position":31,"commit_id":"3feb60c4ce7e5e5e70330218d8b1ad4471dd8f7c","original_commit_id":"3feb60c4ce7e5e5e70330218d8b1ad4471dd8f7c","user":{"login":"blt","id":3579,"avatar_url":"https://avatars.githubusercontent.com/u/3579?v=3","gravatar_id":"","url":"https://api.github.com/users/blt","html_url":"https://github.com/blt","followers_url":"https://api.github.com/users/blt/followers","following_url":"https://api.github.com/users/blt/following{/other_user}","gists_url":"https://api.github.com/users/blt/gists{/gist_id}","starred_url":"https://api.github.com/users/blt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blt/subscriptions","organizations_url":"https://api.github.com/users/blt/orgs","repos_url":"https://api.github.com/users/blt/repos","events_url":"https://api.github.com/users/blt/events{/privacy}","received_events_url":"https://api.github.com/users/blt/received_events","type":"User","site_admin":false},"body":"Also a dupe from `pc_util.erl`.","created_at":"2015-04-06T18:02:07Z","updated_at":"2015-04-06T18:02:07Z","html_url":"https://github.com/blt/port_compiler/pull/9#discussion_r27815381","pull_request_url":"https://api.github.com/repos/blt/port_compiler/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/blt/port_compiler/pulls/comments/27815381"},"html":{"href":"https://github.com/blt/port_compiler/pull/9#discussion_r27815381"},"pull_request":{"href":"https://api.github.com/repos/blt/port_compiler/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/blt/port_compiler/pulls/9","id":32633852,"html_url":"https://github.com/blt/port_compiler/pull/9","diff_url":"https://github.com/blt/port_compiler/pull/9.diff","patch_url":"https://github.com/blt/port_compiler/pull/9.patch","issue_url":"https://api.github.com/repos/blt/port_compiler/issues/9","number":9,"state":"open","locked":false,"title":"append current state path to port spec target and sources","user":{"login":"tsloughter","id":36227,"avatar_url":"https://avatars.githubusercontent.com/u/36227?v=3","gravatar_id":"","url":"https://api.github.com/users/tsloughter","html_url":"https://github.com/tsloughter","followers_url":"https://api.github.com/users/tsloughter/followers","following_url":"https://api.github.com/users/tsloughter/following{/other_user}","gists_url":"https://api.github.com/users/tsloughter/gists{/gist_id}","starred_url":"https://api.github.com/users/tsloughter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsloughter/subscriptions","organizations_url":"https://api.github.com/users/tsloughter/orgs","repos_url":"https://api.github.com/users/tsloughter/repos","events_url":"https://api.github.com/users/tsloughter/events{/privacy}","received_events_url":"https://api.github.com/users/tsloughter/received_events","type":"User","site_admin":false},"body":"This is needed for running in a dep so the paths are correct.","created_at":"2015-04-04T13:54:58Z","updated_at":"2015-04-06T18:02:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a5453eafeed64083fc7c897e695615045b5d5146","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/blt/port_compiler/pulls/9/commits","review_comments_url":"https://api.github.com/repos/blt/port_compiler/pulls/9/comments","review_comment_url":"https://api.github.com/repos/blt/port_compiler/pulls/comments{/number}","comments_url":"https://api.github.com/repos/blt/port_compiler/issues/9/comments","statuses_url":"https://api.github.com/repos/blt/port_compiler/statuses/3feb60c4ce7e5e5e70330218d8b1ad4471dd8f7c","head":{"label":"tsloughter:master","ref":"master","sha":"3feb60c4ce7e5e5e70330218d8b1ad4471dd8f7c","user":{"login":"tsloughter","id":36227,"avatar_url":"https://avatars.githubusercontent.com/u/36227?v=3","gravatar_id":"","url":"https://api.github.com/users/tsloughter","html_url":"https://github.com/tsloughter","followers_url":"https://api.github.com/users/tsloughter/followers","following_url":"https://api.github.com/users/tsloughter/following{/other_user}","gists_url":"https://api.github.com/users/tsloughter/gists{/gist_id}","starred_url":"https://api.github.com/users/tsloughter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsloughter/subscriptions","organizations_url":"https://api.github.com/users/tsloughter/orgs","repos_url":"https://api.github.com/users/tsloughter/repos","events_url":"https://api.github.com/users/tsloughter/events{/privacy}","received_events_url":"https://api.github.com/users/tsloughter/received_events","type":"User","site_admin":false},"repo":{"id":33407065,"name":"port_compiler","full_name":"tsloughter/port_compiler","owner":{"login":"tsloughter","id":36227,"avatar_url":"https://avatars.githubusercontent.com/u/36227?v=3","gravatar_id":"","url":"https://api.github.com/users/tsloughter","html_url":"https://github.com/tsloughter","followers_url":"https://api.github.com/users/tsloughter/followers","following_url":"https://api.github.com/users/tsloughter/following{/other_user}","gists_url":"https://api.github.com/users/tsloughter/gists{/gist_id}","starred_url":"https://api.github.com/users/tsloughter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsloughter/subscriptions","organizations_url":"https://api.github.com/users/tsloughter/orgs","repos_url":"https://api.github.com/users/tsloughter/repos","events_url":"https://api.github.com/users/tsloughter/events{/privacy}","received_events_url":"https://api.github.com/users/tsloughter/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tsloughter/port_compiler","description":"A rebar3 port compiler","fork":true,"url":"https://api.github.com/repos/tsloughter/port_compiler","forks_url":"https://api.github.com/repos/tsloughter/port_compiler/forks","keys_url":"https://api.github.com/repos/tsloughter/port_compiler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tsloughter/port_compiler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tsloughter/port_compiler/teams","hooks_url":"https://api.github.com/repos/tsloughter/port_compiler/hooks","issue_events_url":"https://api.github.com/repos/tsloughter/port_compiler/issues/events{/number}","events_url":"https://api.github.com/repos/tsloughter/port_compiler/events","assignees_url":"https://api.github.com/repos/tsloughter/port_compiler/assignees{/user}","branches_url":"https://api.github.com/repos/tsloughter/port_compiler/branches{/branch}","tags_url":"https://api.github.com/repos/tsloughter/port_compiler/tags","blobs_url":"https://api.github.com/repos/tsloughter/port_compiler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tsloughter/port_compiler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tsloughter/port_compiler/git/refs{/sha}","trees_url":"https://api.github.com/repos/tsloughter/port_compiler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tsloughter/port_compiler/statuses/{sha}","languages_url":"https://api.github.com/repos/tsloughter/port_compiler/languages","stargazers_url":"https://api.github.com/repos/tsloughter/port_compiler/stargazers","contributors_url":"https://api.github.com/repos/tsloughter/port_compiler/contributors","subscribers_url":"https://api.github.com/repos/tsloughter/port_compiler/subscribers","subscription_url":"https://api.github.com/repos/tsloughter/port_compiler/subscription","commits_url":"https://api.github.com/repos/tsloughter/port_compiler/commits{/sha}","git_commits_url":"https://api.github.com/repos/tsloughter/port_compiler/git/commits{/sha}","comments_url":"https://api.github.com/repos/tsloughter/port_compiler/comments{/number}","issue_comment_url":"https://api.github.com/repos/tsloughter/port_compiler/issues/comments{/number}","contents_url":"https://api.github.com/repos/tsloughter/port_compiler/contents/{+path}","compare_url":"https://api.github.com/repos/tsloughter/port_compiler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tsloughter/port_compiler/merges","archive_url":"https://api.github.com/repos/tsloughter/port_compiler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tsloughter/port_compiler/downloads","issues_url":"https://api.github.com/repos/tsloughter/port_compiler/issues{/number}","pulls_url":"https://api.github.com/repos/tsloughter/port_compiler/pulls{/number}","milestones_url":"https://api.github.com/repos/tsloughter/port_compiler/milestones{/number}","notifications_url":"https://api.github.com/repos/tsloughter/port_compiler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tsloughter/port_compiler/labels{/name}","releases_url":"https://api.github.com/repos/tsloughter/port_compiler/releases{/id}","created_at":"2015-04-04T13:54:05Z","updated_at":"2015-04-05T18:50:51Z","pushed_at":"2015-04-05T18:50:48Z","git_url":"git://github.com/tsloughter/port_compiler.git","ssh_url":"git@github.com:tsloughter/port_compiler.git","clone_url":"https://github.com/tsloughter/port_compiler.git","svn_url":"https://github.com/tsloughter/port_compiler","homepage":"","size":103,"stargazers_count":0,"watchers_count":0,"language":"Erlang","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"blt:master","ref":"master","sha":"d78d967a699ce80d613690b435d6bbe2f65150ab","user":{"login":"blt","id":3579,"avatar_url":"https://avatars.githubusercontent.com/u/3579?v=3","gravatar_id":"","url":"https://api.github.com/users/blt","html_url":"https://github.com/blt","followers_url":"https://api.github.com/users/blt/followers","following_url":"https://api.github.com/users/blt/following{/other_user}","gists_url":"https://api.github.com/users/blt/gists{/gist_id}","starred_url":"https://api.github.com/users/blt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blt/subscriptions","organizations_url":"https://api.github.com/users/blt/orgs","repos_url":"https://api.github.com/users/blt/repos","events_url":"https://api.github.com/users/blt/events{/privacy}","received_events_url":"https://api.github.com/users/blt/received_events","type":"User","site_admin":false},"repo":{"id":33048493,"name":"port_compiler","full_name":"blt/port_compiler","owner":{"login":"blt","id":3579,"avatar_url":"https://avatars.githubusercontent.com/u/3579?v=3","gravatar_id":"","url":"https://api.github.com/users/blt","html_url":"https://github.com/blt","followers_url":"https://api.github.com/users/blt/followers","following_url":"https://api.github.com/users/blt/following{/other_user}","gists_url":"https://api.github.com/users/blt/gists{/gist_id}","starred_url":"https://api.github.com/users/blt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blt/subscriptions","organizations_url":"https://api.github.com/users/blt/orgs","repos_url":"https://api.github.com/users/blt/repos","events_url":"https://api.github.com/users/blt/events{/privacy}","received_events_url":"https://api.github.com/users/blt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/blt/port_compiler","description":"A rebar3 port compiler","fork":false,"url":"https://api.github.com/repos/blt/port_compiler","forks_url":"https://api.github.com/repos/blt/port_compiler/forks","keys_url":"https://api.github.com/repos/blt/port_compiler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blt/port_compiler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blt/port_compiler/teams","hooks_url":"https://api.github.com/repos/blt/port_compiler/hooks","issue_events_url":"https://api.github.com/repos/blt/port_compiler/issues/events{/number}","events_url":"https://api.github.com/repos/blt/port_compiler/events","assignees_url":"https://api.github.com/repos/blt/port_compiler/assignees{/user}","branches_url":"https://api.github.com/repos/blt/port_compiler/branches{/branch}","tags_url":"https://api.github.com/repos/blt/port_compiler/tags","blobs_url":"https://api.github.com/repos/blt/port_compiler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blt/port_compiler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blt/port_compiler/git/refs{/sha}","trees_url":"https://api.github.com/repos/blt/port_compiler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blt/port_compiler/statuses/{sha}","languages_url":"https://api.github.com/repos/blt/port_compiler/languages","stargazers_url":"https://api.github.com/repos/blt/port_compiler/stargazers","contributors_url":"https://api.github.com/repos/blt/port_compiler/contributors","subscribers_url":"https://api.github.com/repos/blt/port_compiler/subscribers","subscription_url":"https://api.github.com/repos/blt/port_compiler/subscription","commits_url":"https://api.github.com/repos/blt/port_compiler/commits{/sha}","git_commits_url":"https://api.github.com/repos/blt/port_compiler/git/commits{/sha}","comments_url":"https://api.github.com/repos/blt/port_compiler/comments{/number}","issue_comment_url":"https://api.github.com/repos/blt/port_compiler/issues/comments{/number}","contents_url":"https://api.github.com/repos/blt/port_compiler/contents/{+path}","compare_url":"https://api.github.com/repos/blt/port_compiler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blt/port_compiler/merges","archive_url":"https://api.github.com/repos/blt/port_compiler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blt/port_compiler/downloads","issues_url":"https://api.github.com/repos/blt/port_compiler/issues{/number}","pulls_url":"https://api.github.com/repos/blt/port_compiler/pulls{/number}","milestones_url":"https://api.github.com/repos/blt/port_compiler/milestones{/number}","notifications_url":"https://api.github.com/repos/blt/port_compiler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blt/port_compiler/labels{/name}","releases_url":"https://api.github.com/repos/blt/port_compiler/releases{/id}","created_at":"2015-03-28T20:10:14Z","updated_at":"2015-04-03T00:40:29Z","pushed_at":"2015-04-05T18:50:49Z","git_url":"git://github.com/blt/port_compiler.git","ssh_url":"git@github.com:blt/port_compiler.git","clone_url":"https://github.com/blt/port_compiler.git","svn_url":"https://github.com/blt/port_compiler","homepage":"","size":238,"stargazers_count":0,"watchers_count":0,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":8,"forks":1,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/blt/port_compiler/pulls/9"},"html":{"href":"https://github.com/blt/port_compiler/pull/9"},"issue":{"href":"https://api.github.com/repos/blt/port_compiler/issues/9"},"comments":{"href":"https://api.github.com/repos/blt/port_compiler/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/blt/port_compiler/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/blt/port_compiler/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/blt/port_compiler/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/blt/port_compiler/statuses/3feb60c4ce7e5e5e70330218d8b1ad4471dd8f7c"}}}}