Fixed building on FreeBSD.#754
Fixed building on FreeBSD.#754ronelliott wants to merge 3 commits intoAutomattic:masterfrom ronelliott:master
Conversation
|
Is bash not available on FreeBSD? Can you change the shebang instead? |
|
@LinusU No, by default bash will not be installed on FreeBSD. Though it is available, it requires installing the package and the shebang will still have to be updated as it's installed to /usr/local/bin rather than /bin. PR has been updated to change the shebang rather than modifying the binding.gyp. |
|
The script will need updating though, on POSIX sh |
|
What about tcsh? |
|
tcsh is not that common: Debian GNU/Linux 8.3 (jessie): Ubuntu 15.10: Centos 7.2.1511: Which is to say ... probably |
|
OS X 10.11.4 Ubuntu 13.10 Ubuntu 14.04 |
|
Well, we do know that |
|
Isn't |
|
@chearon The current script won't work in |
|
Check out what's done here using node to detect libjpeg-turbo: |
|
Please do! |
|
Hrm, well... I ported has_lib.sh to javascript (untested): https://gist.github.com/zbjornson/3959cae50388d83f69317298257195d3 But, I didn't realize that the jpeg lookup script in #458 returns the library path, and has_lib returns true/false, so consolidation is less obvious (but still possible). Without that benefit, switching that library to JS because of scoping seems silly. As far as modifying has_lib.sh, it looks like |
|
Actually, maybe this would be a great time to fix Instead of trying a bunch of directories that we think might have the libraries, we should just ask the compiler if it can find it or not. This have been discussed before and I'm still not entirely sure on exactly how to do it, but something like invoking the compiler with e.g. |
|
If you really need to use bash changing the The Single UNIX Specification specifies:
The specification also states one should define the
|
|
I agree with @qbit's suggestion to use Doing Thanks everyone! |
|
|
|
I like the idea of using Node.js to replace the shell scripts in the long term. |
|
Might as well drop bash altogether and just use sh which all the major Unix-like OSes have in common, see PR. Also, for the record: |
Ref Automattic#754 (fix build on BSD) Ref Automattic#813 (static build)
Ref Automattic#754 (fix build on BSD) Ref Automattic#813 (static build)
Ref Automattic#754 (fix build on BSD) Ref Automattic#813 (static build)
Ref Automattic#754 (fix build on BSD) Ref Automattic#813 (static build)
Ref Automattic#754 (fix build on BSD) Ref Automattic#813 (static build)
|
This script has been replaced with a javascript-script instead, now it should work :) |
There is an issue with executing the utils/has_lib.sh script on FreeBSD. This is a fix for it.