2010-04-13 21:34:11 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Ushare < Formula
|
2010-04-13 21:34:11 +00:00
|
|
|
homepage 'http://ushare.geexbox.org/'
|
2012-03-11 23:27:04 +00:00
|
|
|
url 'http://ushare.geexbox.org/releases/ushare-1.1a.tar.bz2'
|
2010-04-13 21:34:11 +00:00
|
|
|
md5 '5bbcdbf1ff85a9710fa3d4e82ccaa251'
|
|
|
|
|
|
|
|
depends_on 'gettext'
|
|
|
|
depends_on 'libupnp'
|
|
|
|
depends_on 'libdlna'
|
|
|
|
|
2012-03-11 23:27:04 +00:00
|
|
|
# Correct "OPTFLAGS" to "CFLAGS"
|
2010-04-13 21:34:11 +00:00
|
|
|
def patches
|
|
|
|
{ :p0 =>
|
2012-01-22 21:56:15 +00:00
|
|
|
"https://trac.macports.org/export/89267/trunk/dports/net/ushare/files/patch-configure.diff"
|
2010-04-13 21:34:11 +00:00
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2012-03-11 23:27:04 +00:00
|
|
|
# Need to explicitly add intl and gettext here.
|
2011-03-29 19:33:19 +00:00
|
|
|
gettext = Formula.factory("gettext")
|
2010-04-13 21:34:11 +00:00
|
|
|
ENV.append 'LDFLAGS', "-lintl"
|
2011-03-29 19:33:19 +00:00
|
|
|
ENV.append 'CFLAGS', "-I#{gettext.include}"
|
2010-04-13 21:34:11 +00:00
|
|
|
|
|
|
|
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
|