Closed NuLL3rr0r closed 7 years ago
This is actually a pretty big issue for me as well. It's unfortunate that other packages (such as grunt-mocha-phantomjs) are depending on a pre-built binary. I am able to build and run phantomjs on my FreeBSD systems without issues though, so I'd like to propose that phantomjs-prebuilt has a valid FreeBSD binary.
I am happy to assist with this work, although it's not obvious to me as to how the OSX and Linux binaries are produced so that I can use the same method for FreeBSD. Can someone point me in the right direction for this?
also - this patch can probably be applied as well, since osx/darwin binaries are def not compatible with freebsd nor openbsd. there is a probably a more elegant solution where we throw an exception or warning if we don't match linux, windows nor osx - but I think this will prevent us from installing incompatible binaries on bsd hosts:
diff --git a/lib/util.js b/lib/util.js
index 3cf515a..7a3c17d 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -103,7 +103,7 @@ function getDownloadSpec() {
} else if (platform === 'linux' && arch == 'ia32') {
downloadUrl += 'linux-i686.tar.bz2'
checksum = '80e03cfeb22cc4dfe4e73b68ab81c9fdd7c78968cfd5358e6af33960464f15e3'
- } else if (platform === 'darwin' || platform === 'openbsd' || platform === 'freebsd') {
+ } else if (platform === 'darwin') {
downloadUrl += 'macosx.zip'
checksum = '538cf488219ab27e309eafc629e2bcee9976990fe90b1ec334f541779150f8c1'
} else if (platform === 'win32') {
for now, you'll have to find/compile your own and put it on PATH
I'm on FreeBSD, but it installs MacOS X binary.
The same issue also addressed here: https://github.com/ariya/phantomjs/issues/12963