Last active
August 29, 2015 14:05
-
-
Save onlime/3f1cade72dfdf2904dec to your computer and use it in GitHub Desktop.
Homebrew php56-excel (using libxl)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Libxl < Formula | |
homepage 'http://www.libxl.com/' | |
url 'ftp://xlware.com/libxl-mac-3.6.0.tar.gz' | |
sha1 '52da78f73e4a8e727c8c73c99435f4136e3774c2' | |
def install | |
lib.install 'lib/libxl.dylib' | |
include.install Dir["include_c/*.h"] | |
end | |
def caveats; <<-EOS | |
LibXl will write a banner in the first row of each spreadsheet and it will be able to | |
read only 100 cells (first row is unavailable). Buy a license key to remove banner and reading restriction: | |
http://libxl.com/purchase.html | |
EOS | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require File.expand_path("../../Abstract/abstract-php-extension", __FILE__) | |
class Php56Excel < AbstractPhp56Extension | |
init | |
homepage 'https://github.com/iliaal/php_excel' | |
url 'https://github.com/iliaal/php_excel/archive/1.0.tar.gz' | |
sha1 '3995b754117952290f0f56a8c2f8653e29a025ea' | |
head 'https://github.com/iliaal/php_excel.git' | |
depends_on 'autoconf' => :build | |
depends_on 'php56' unless build.include?('without-homebrew-php') | |
depends_on 'libxl' | |
def install | |
ENV.universal_binary if build.universal? | |
safe_phpize | |
system "./configure", "--prefix=#{prefix}", | |
"--with-libxl-incdir=#{Formula['libxl'].opt_prefix}/include_c/", | |
"--with-libxl-libdir=#{Formula['libxl'].opt_prefix}/lib/", | |
phpconfig | |
system "make" | |
prefix.install "modules/excel.so" | |
write_config_file if build.with? "config-file" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm still getting this clang error on OSX 10.9 Mavericks:
Full verbose output:
Any help greatly appreciated!