{"action":"opened","number":8,"pull_request":{"url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/pulls/8","id":49767631,"html_url":"https://github.com/mmottl/sqlite3-ocaml/pull/8","diff_url":"https://github.com/mmottl/sqlite3-ocaml/pull/8.diff","patch_url":"https://github.com/mmottl/sqlite3-ocaml/pull/8.patch","issue_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/issues/8","number":8,"state":"open","locked":false,"title":"Add brew checking capability during build","user":{"login":"rleonid","id":6570317,"avatar_url":"https://avatars.githubusercontent.com/u/6570317?v=3","gravatar_id":"","url":"https://api.github.com/users/rleonid","html_url":"https://github.com/rleonid","followers_url":"https://api.github.com/users/rleonid/followers","following_url":"https://api.github.com/users/rleonid/following{/other_user}","gists_url":"https://api.github.com/users/rleonid/gists{/gist_id}","starred_url":"https://api.github.com/users/rleonid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rleonid/subscriptions","organizations_url":"https://api.github.com/users/rleonid/orgs","repos_url":"https://api.github.com/users/rleonid/repos","events_url":"https://api.github.com/users/rleonid/events{/privacy}","received_events_url":"https://api.github.com/users/rleonid/received_events","type":"User","site_admin":false},"body":"The problem: The default Sqlite3 library installed on MacOSX is not compiled with some useful extensions. Consequently, some users install a version via [homebrew](https://github.com/Homebrew/homebrew), but linking against that library specifically requires tweaking where `pkg-config` looks for the appropriate flags. My previous [attempt](https://github.com/mmottl/sqlite3-ocaml/commit/967198e2b9adb38844d296d1f6b0803d25d04006) to solve this problem violated the default expected behavior of `pkg-config`.\r\n\r\nProposal:\r\nThis patch enables a flag in the `sqlite3-ocaml` build logic to perform a check for a `brewed` sqlite3 and link against it specifically. \r\nFurthermore adding\r\n\r\n```\r\n[\"ocaml\" \"setup.ml\" \"-configure\" \"--prefix\" prefix \"%{sqlite3:brewcheck}%\"]\r\n```\r\nto this packages `opam` would allow a downstream installer to say\r\n```\r\n$OPAMVAR_sqlite3_brewcheck=--enable-brewcheck opam install sqlite3 \r\n```\r\nwhen they use sqlite3.","created_at":"2015-11-05T00:38:02Z","updated_at":"2015-11-05T00:38:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/pulls/8/commits","review_comments_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/pulls/8/comments","review_comment_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/issues/8/comments","statuses_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/statuses/1ba04be4021ccf43652a0a60d720b8e836953116","head":{"label":"rleonid:add_brew_checking_via_variables","ref":"add_brew_checking_via_variables","sha":"1ba04be4021ccf43652a0a60d720b8e836953116","user":{"login":"rleonid","id":6570317,"avatar_url":"https://avatars.githubusercontent.com/u/6570317?v=3","gravatar_id":"","url":"https://api.github.com/users/rleonid","html_url":"https://github.com/rleonid","followers_url":"https://api.github.com/users/rleonid/followers","following_url":"https://api.github.com/users/rleonid/following{/other_user}","gists_url":"https://api.github.com/users/rleonid/gists{/gist_id}","starred_url":"https://api.github.com/users/rleonid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rleonid/subscriptions","organizations_url":"https://api.github.com/users/rleonid/orgs","repos_url":"https://api.github.com/users/rleonid/repos","events_url":"https://api.github.com/users/rleonid/events{/privacy}","received_events_url":"https://api.github.com/users/rleonid/received_events","type":"User","site_admin":false},"repo":{"id":45570230,"name":"sqlite3-ocaml","full_name":"rleonid/sqlite3-ocaml","owner":{"login":"rleonid","id":6570317,"avatar_url":"https://avatars.githubusercontent.com/u/6570317?v=3","gravatar_id":"","url":"https://api.github.com/users/rleonid","html_url":"https://github.com/rleonid","followers_url":"https://api.github.com/users/rleonid/followers","following_url":"https://api.github.com/users/rleonid/following{/other_user}","gists_url":"https://api.github.com/users/rleonid/gists{/gist_id}","starred_url":"https://api.github.com/users/rleonid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rleonid/subscriptions","organizations_url":"https://api.github.com/users/rleonid/orgs","repos_url":"https://api.github.com/users/rleonid/repos","events_url":"https://api.github.com/users/rleonid/events{/privacy}","received_events_url":"https://api.github.com/users/rleonid/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rleonid/sqlite3-ocaml","description":"OCaml bindings to the SQLite3 database","fork":true,"url":"https://api.github.com/repos/rleonid/sqlite3-ocaml","forks_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/forks","keys_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/teams","hooks_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/hooks","issue_events_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/issues/events{/number}","events_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/events","assignees_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/assignees{/user}","branches_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/branches{/branch}","tags_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/tags","blobs_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/git/refs{/sha}","trees_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/statuses/{sha}","languages_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/languages","stargazers_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/stargazers","contributors_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/contributors","subscribers_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/subscribers","subscription_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/subscription","commits_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/commits{/sha}","git_commits_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/git/commits{/sha}","comments_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/comments{/number}","issue_comment_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/issues/comments{/number}","contents_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/contents/{+path}","compare_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/merges","archive_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/downloads","issues_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/issues{/number}","pulls_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/pulls{/number}","milestones_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/milestones{/number}","notifications_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/labels{/name}","releases_url":"https://api.github.com/repos/rleonid/sqlite3-ocaml/releases{/id}","created_at":"2015-11-04T21:59:40Z","updated_at":"2015-11-04T21:59:41Z","pushed_at":"2015-11-05T00:26:48Z","git_url":"git://github.com/rleonid/sqlite3-ocaml.git","ssh_url":"git@github.com:rleonid/sqlite3-ocaml.git","clone_url":"https://github.com/rleonid/sqlite3-ocaml.git","svn_url":"https://github.com/rleonid/sqlite3-ocaml","homepage":null,"size":816,"stargazers_count":0,"watchers_count":0,"language":"OCaml","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mmottl:master","ref":"master","sha":"85985f49ca8a3938fd38d96ea355cfee3df0e52d","user":{"login":"mmottl","id":1189131,"avatar_url":"https://avatars.githubusercontent.com/u/1189131?v=3","gravatar_id":"","url":"https://api.github.com/users/mmottl","html_url":"https://github.com/mmottl","followers_url":"https://api.github.com/users/mmottl/followers","following_url":"https://api.github.com/users/mmottl/following{/other_user}","gists_url":"https://api.github.com/users/mmottl/gists{/gist_id}","starred_url":"https://api.github.com/users/mmottl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmottl/subscriptions","organizations_url":"https://api.github.com/users/mmottl/orgs","repos_url":"https://api.github.com/users/mmottl/repos","events_url":"https://api.github.com/users/mmottl/events{/privacy}","received_events_url":"https://api.github.com/users/mmottl/received_events","type":"User","site_admin":false},"repo":{"id":21544705,"name":"sqlite3-ocaml","full_name":"mmottl/sqlite3-ocaml","owner":{"login":"mmottl","id":1189131,"avatar_url":"https://avatars.githubusercontent.com/u/1189131?v=3","gravatar_id":"","url":"https://api.github.com/users/mmottl","html_url":"https://github.com/mmottl","followers_url":"https://api.github.com/users/mmottl/followers","following_url":"https://api.github.com/users/mmottl/following{/other_user}","gists_url":"https://api.github.com/users/mmottl/gists{/gist_id}","starred_url":"https://api.github.com/users/mmottl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmottl/subscriptions","organizations_url":"https://api.github.com/users/mmottl/orgs","repos_url":"https://api.github.com/users/mmottl/repos","events_url":"https://api.github.com/users/mmottl/events{/privacy}","received_events_url":"https://api.github.com/users/mmottl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mmottl/sqlite3-ocaml","description":"OCaml bindings to the SQLite3 database","fork":false,"url":"https://api.github.com/repos/mmottl/sqlite3-ocaml","forks_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/forks","keys_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/teams","hooks_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/hooks","issue_events_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/issues/events{/number}","events_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/events","assignees_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/assignees{/user}","branches_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/branches{/branch}","tags_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/tags","blobs_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/git/refs{/sha}","trees_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/statuses/{sha}","languages_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/languages","stargazers_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/stargazers","contributors_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/contributors","subscribers_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/subscribers","subscription_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/subscription","commits_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/commits{/sha}","git_commits_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/git/commits{/sha}","comments_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/comments{/number}","issue_comment_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/issues/comments{/number}","contents_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/contents/{+path}","compare_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/merges","archive_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/downloads","issues_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/issues{/number}","pulls_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/pulls{/number}","milestones_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/milestones{/number}","notifications_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/labels{/name}","releases_url":"https://api.github.com/repos/mmottl/sqlite3-ocaml/releases{/id}","created_at":"2014-07-06T17:21:13Z","updated_at":"2015-11-04T21:35:25Z","pushed_at":"2015-09-03T15:18:28Z","git_url":"git://github.com/mmottl/sqlite3-ocaml.git","ssh_url":"git@github.com:mmottl/sqlite3-ocaml.git","clone_url":"https://github.com/mmottl/sqlite3-ocaml.git","svn_url":"https://github.com/mmottl/sqlite3-ocaml","homepage":null,"size":816,"stargazers_count":14,"watchers_count":14,"language":"OCaml","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5,"mirror_url":null,"open_issues_count":1,"forks":5,"open_issues":1,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mmottl/sqlite3-ocaml/pulls/8"},"html":{"href":"https://github.com/mmottl/sqlite3-ocaml/pull/8"},"issue":{"href":"https://api.github.com/repos/mmottl/sqlite3-ocaml/issues/8"},"comments":{"href":"https://api.github.com/repos/mmottl/sqlite3-ocaml/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/mmottl/sqlite3-ocaml/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/mmottl/sqlite3-ocaml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mmottl/sqlite3-ocaml/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/mmottl/sqlite3-ocaml/statuses/1ba04be4021ccf43652a0a60d720b8e836953116"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":34,"deletions":5,"changed_files":3}}