2010-08-03 03:34:39 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Imlib2 < Formula
|
2010-08-03 03:34:39 +00:00
|
|
|
homepage 'http://sourceforge.net/projects/enlightenment/files/'
|
2012-03-18 03:28:11 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/enlightenment/imlib2-src/1.4.5/imlib2-1.4.5.tar.bz2'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 'af86a2c38f4bc3806db57e64e74dc9814ad474a0'
|
2010-08-03 03:34:39 +00:00
|
|
|
|
2012-10-13 15:11:53 +00:00
|
|
|
option "without-x", "Build without X support"
|
2012-10-13 08:08:49 +00:00
|
|
|
|
|
|
|
depends_on :freetype
|
|
|
|
depends_on :libpng => :recommended
|
2012-10-13 15:11:53 +00:00
|
|
|
depends_on :x11 if MacOS::X11.installed? or not build.include? "without-x"
|
2010-08-03 03:34:39 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2012-09-02 07:59:54 +00:00
|
|
|
depends_on 'jpeg' => :recommended
|
2010-08-03 03:34:39 +00:00
|
|
|
|
|
|
|
def install
|
2012-10-13 08:08:49 +00:00
|
|
|
args = %W[
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--prefix=#{prefix}
|
|
|
|
--enable-amd64=no
|
|
|
|
]
|
2012-10-13 15:11:53 +00:00
|
|
|
args << "--without-x" if build.include? "without-x"
|
2012-10-13 08:08:49 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
2010-08-03 03:34:39 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
2012-09-02 07:59:54 +00:00
|
|
|
|
|
|
|
def test
|
|
|
|
mktemp do
|
|
|
|
system "#{bin}/imlib2_conv", \
|
|
|
|
"/System/Library/Frameworks/SecurityInterface.framework/Versions/A/Resources/Key_Large.png", \
|
|
|
|
"imlib2_test.jpg"
|
|
|
|
end
|
|
|
|
end
|
2010-08-03 03:34:39 +00:00
|
|
|
end
|