-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build hunspell-sys also on Windows #2
Conversation
- msvc does not support autotools & hunspell's build scripts itself do not play well with msvc - just compile the hunspell-1.7.lib with cc "by hand" - keep build without msvc as it is
Very nice work! |
It would be nice to autodetect, if autotools are available, but the autotools crate does not provide a check. It plainly assumes, that autotools are on |
- build-autotools to build with autotools - build-cc to build with cc - default is build-autotools - added documentation into Readme.md to show how to enable build-cc
I hid the build with Cargo seems not to allow target specific default features. However, dependent crates can specify targets specific features for [target.'cfg(target_env = "msvc")'.dependencies]
hunspell-sys = { version = "0.1.3", default-features = false, features = ["build-cc"] }
[target.'cfg(not(target_env = "msvc"))'.dependencies]
hunspell-sys = "0.1.3" |
- added information about target specific
@euclio anything left to do here? This is blocking cargo-spellcheck from being installed on windows, so I'd see this merged rather sooner than later :) |
I don't think a feature flag is the right solution here. I would prefer either using |
Using |
Cargo features are not mutually exclusive. If I try to build this PR with I'm unfamiliar with the linking impact on licensing here. Why is statically linking not an issue for MSVC but it is for other platforms? |
It's not about msvc, it's about static linkage with |
We can use |
Huh, mea culpa, I had something GPL-ish in the back of my head. Discard my previous comments then. |
Ping @msuesskraut, any interest in finishing this? |
The question is on how to rewrite it. We could orient ourselves on
Hence, that would mean to search for the hunspell library by default via However, with the bundled feature the hunspell library will be compiled from source by Is this the way to move forward? If yes, I could adapt my pull request. |
I would very much appreciate that approach. |
Yeah, that sounds great to me. |
- by default hunspell is searched by pkg-config - optionally - with feature bundled - hunspell is build from directory vendor by crate cc - documented this in README.md - extended .travis.yml to test building the bundled hunspell
- for testing feature bundled
- for testing all features in all rust versions
So I updated the pull request as discussed. Sorry for the many commits. I'm not so fluent with travis. I copied the approach to test the I also updated the build dependencies to the most current versions. Please have a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Just one suggestion.
Don't worry too much about travis, I'll have to change it anyways to get it to work with Windows. (I'll probably migrate to GHA too).
Published v0.2.0. |
Thank you! |
Thanks!
…On Fri 10. Jul 2020 at 07:56, Bernhard Schuster ***@***.***> wrote:
Thank you!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFOQLUXY6ACX7CQLYACAJ3TR22USNANCNFSM4ODBAYSQ>
.
|
Just for sake of completeness: https://hunspell.github.io/ states the following regarding licensing:
|
hunspell's build scripts itself do not play well with msvc