I am taking an attempt at updating a homebrew formula, it's the primer3 formula from homebrew-science. It's a simple, minor version update, and the source is at: http://sourceforge.net/projects/primer3/files/primer3/2.3.5/
I have performed the following steps:
- Forked the repo
- Cloned the repo to my local drive
- Updated the formula
- Unlinked the existing formula
- Installed from the updated local formula
require 'formula' class Primer3 < Formula homepage 'http://primer3.sourceforge.net/' url 'https://sourceforge.net/projects/primer3/files/primer3/2.3.4/primer3-2.3.4.tar.gz' sha1 '850d8e5cfbe84cdf3e4955a3974a6531a8ac6516' def install cd "src" do system "make all" bin.install %w(primer3_core ntdpal oligotm long_seq_tm_test) end end
After - version and sha1 is changed:
require 'formula' class Primer3 < Formula homepage 'http://primer3.sourceforge.net/' url 'https://sourceforge.net/projects/primer3/files/primer3/2.3.5/primer3-2.3.5.tar.gz' sha1 '4473bf684d6f3faf0632fbd2cf8a7ccba56c5053' def install cd "src" do system "make all" bin.install %w(primer3_core ntdpal oligotm long_seq_tm_test) end end end
I have committed & pushed the change to my forked repo, and I am now trying to test the new formula. I tried the following:
brew install --verbose --debug /Users/sean/dropbox/bin/homebrew-science/primer3.rb
First I was told I needed to unlink the current version, which I was surprised about, but I did:
Error: primer3-2.3.4 already installed To install this version, first `brew unlink primer3' ~/dropbox/bin/homebrew-science$ brew unlink primer3 Unlinking /usr/local/Cellar/primer3/2.3.4... 4 links removed
The nest time I ran the same brew install command I received a compile error.
/usr/local/Library/brew.rb: loading /Users/sean/dropbox/bin/homebrew-science/primer3.rb /Users/sean/.rvm/gems/ruby-1.9.3-p327/gems/debugger-1.6.0/lib/ruby_debug.bundle: [BUG] Segmentation fault ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0] Error: Suspicious installation failure
As a separate step I have downloaded unzip/tarred the repo and compiled, so the source code is fine.
EDIT I just noticed in the error message it is calling ruby 1.8.7 which is weird.