require 'formula' class Ushare "http://svn.macports.org/repository/macports/trunk/dports/net/ushare/files/patch-configure.diff" } end def install # Need to explicitly add gettext here. ENV.append 'LDFLAGS', "-lintl" inreplace 'configure', /config.h/, 'src/config.h' system "./configure", "--disable-debug", "--prefix=#{prefix}", "--enable-dlna", "--with-libupnp-dir=#{HOMEBREW_PREFIX}", "--with-libdlna-dir=#{HOMEBREW_PREFIX}", "--disable-strip" system "make install" man1.install "src/ushare.1" end end