{"action":"closed","issue":{"url":"https://api.github.com/repos/sfackler/rust-openssl/issues/302","labels_url":"https://api.github.com/repos/sfackler/rust-openssl/issues/302/labels{/name}","comments_url":"https://api.github.com/repos/sfackler/rust-openssl/issues/302/comments","events_url":"https://api.github.com/repos/sfackler/rust-openssl/issues/302/events","html_url":"https://github.com/sfackler/rust-openssl/issues/302","id":115936076,"number":302,"title":"Split openssl-sys into openssl-sys and openssl_shim","user":{"login":"kryptan","id":11528855,"avatar_url":"https://avatars.githubusercontent.com/u/11528855?v=3","gravatar_id":"","url":"https://api.github.com/users/kryptan","html_url":"https://github.com/kryptan","followers_url":"https://api.github.com/users/kryptan/followers","following_url":"https://api.github.com/users/kryptan/following{/other_user}","gists_url":"https://api.github.com/users/kryptan/gists{/gist_id}","starred_url":"https://api.github.com/users/kryptan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kryptan/subscriptions","organizations_url":"https://api.github.com/users/kryptan/orgs","repos_url":"https://api.github.com/users/kryptan/repos","events_url":"https://api.github.com/users/kryptan/events{/privacy}","received_events_url":"https://api.github.com/users/kryptan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-09T18:27:24Z","updated_at":"2015-11-17T06:17:59Z","closed_at":"2015-11-17T06:17:59Z","body":"Currently `openssl-sys` can only be configured via environment variables. This is in contrast to the more common way of [overriding build scripts](http://doc.crates.io/build-script.html#overriding-build-scripts) which can be used for most other *-sys crates. It doesn't work for `openssl-sys` because it generates and compiles `libopenssl_shim` library and overriding build script prevents its generation.\r\n\r\nTo fix this I propose to split `openssl-sys` into two crates: `openssl-sys` and `openssl_shim`.\r\n1. `openssl-sys` defines `links = \"openssl\"` and build script does everything it does today except generating and compling `libopenssl_shim`.\r\n2. `openssl_shim` depends on `openssl-sys` and defines no `links`. In its build script it builds `libopenssl_shim`; openssl include directory is provided by the `include` variable generated by the `openssl-sys`.\r\n\r\n`openssl` will depend on both `openssl-sys` and `openssl_shim`.\r\n\r\nThis way it will be posible to overwrite build script in `.cargo/config` by providing the following variables: `rustc-link-search`, `rustc-link-lib`, `include`."}}