OS X Homebrew: Build FreeTDS from HEAD (gitorious)

Here’s a pull request I just submitted to homebrew to make it possible to build FreeTDS from master on its gitorious repo:


Example of using it:

$ brew install freetds --HEAD --universal
==> Cloning https://git.gitorious.org/freetds/freetds.git
Updating /Library/Caches/Homebrew/freetds--git
==> autoreconf -i
==> ./configure --prefix=/usr/local/Cellar/freetds/HEAD --with-openssl=/usr/bin --with-tdsver=7.1 --mandir=/usr/local/Cellar/freetds/HEAD/share/man
==> make
==> make install
🍺  /usr/local/Cellar/freetds/HEAD: 63 files, 3.6M, built in 67 seconds

$ brew test freetds --HEAD -v
Testing freetds
==> /usr/local/Cellar/freetds/HEAD/bin/tsql -C
/usr/local/Cellar/freetds/HEAD/bin/tsql -C
Compile-time settings (established with the "configure" script)
                            Version: freetds v0.92.dev.20130718
             freetds.conf directory: /usr/local/Cellar/freetds/HEAD/etc
     MS db-lib source compatibility: no
        Sybase binary compatibility: no
                      Thread safety: yes
                      iconv library: yes
                        TDS version: 7.1
                              iODBC: yes
                           unixodbc: no
              SSPI "trusted" logins: no
                           Kerberos: no

Pretty simple:

commit 3d786f23bc2ff5d73a22474f9256330a17f01e23
Author: Marc Abramowitz 
Date:   Thu Jul 18 09:10:33 2013 -0700

    freetds.rb: Enable support for building FreeTDS from HEAD (gitorious)

diff --git a/Library/Formula/freetds.rb b/Library/Formula/freetds.rb
index 0a700e6..362b411 100644
--- a/Library/Formula/freetds.rb
+++ b/Library/Formula/freetds.rb
@@ -5,10 +5,19 @@ class Freetds < Formula
   url 'http://mirrors.ibiblio.org/freetds/stable/freetds-0.91.tar.gz'
   sha1 '3ab06c8e208e82197dc25d09ae353d9f3be7db52'

+  head 'https://git.gitorious.org/freetds/freetds.git'
   depends_on "pkg-config" => :build
   depends_on "unixodbc" => :optional

+  if build.head?
+    depends_on :automake
+    depends_on :libtool
+  end
   def install
+    system "autoreconf -i" if build.head?
     args = %W[--prefix=#{prefix}

Here’s the commit on GitHub.

I also added support for a test and for doing a universal build.

New Homebrew formula for justniffer

Justniffer (http://justniffer.sourceforge.net/) – A very cool little TCP sniffer specialized for capturing HTTP traffic.

Example invocations:

$ justniffer -i en1 -p "port 80" - - [22/Dec/2011:11:45:03 -0800] "GET /wiki/Brew HTTP/1.1" 200 23163 "" "curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8r zlib/1.2.3"

$ justniffer-grab-http-traffic -d . -i en1
$ tree
├── bits.wikimedia.org/
│   ├── _w_extensions_1_18_OggHandler_OggPlayer_js_12index.js
│   └── _w_extensions_1_18_OggHandler_play_pngindex.png
├── en.wikipedia.org/
│   ├── _w_index_php_title_Special_3ABannerListLoader_cache__cn_js_language_en_project_wikipedia_country_USindex.js
│   ├── _wiki_Agile_software_developmentindex.html
│   ├── _wiki_Kent_Beckindex.html
│   └── _wiki_Martin_Fowlerindex.html


brew install growlnotify-1.2.2 on OS X 10.6 (Snow Leopard)

The latest growlnotify in homebrew (1.3) fails on OS X 10.6 (Snow Leopard), because it’s a Lion-only binary.

marca@SCML-MarcA:/usr/local$ growlnotify 
dyld: Symbol not found: _kSecRandomDefault
  Referenced from: /usr/local/bin/growlnotify
  Expected in: /System/Library/Frameworks/Security.framework/Versions/A/Security
 in /usr/local/bin/growlnotify
Trace/BPT trap

Here’s how to fix it (thanks to https://github.com/mxcl/homebrew/issues/8316):