2010-09-27 18:34:11 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Netpbm < Formula
|
2010-09-27 18:34:11 +00:00
|
|
|
homepage 'http://netpbm.sourceforge.net'
|
2013-05-19 23:53:30 +00:00
|
|
|
url 'svn+http://svn.code.sf.net/p/netpbm/code/advanced/', :revision => 1809
|
2012-12-19 13:05:32 +00:00
|
|
|
version '10.60.05'
|
2013-05-06 23:16:39 +00:00
|
|
|
# Maintainers: Look at http://netpbm.svn.sourceforge.net/viewvc/netpbm/
|
2012-12-19 13:05:32 +00:00
|
|
|
# for versions and matching revisions
|
2012-02-21 06:04:21 +00:00
|
|
|
|
2013-05-19 23:53:30 +00:00
|
|
|
head 'http://svn.code.sf.net/p/netpbm/code/trunk'
|
2010-09-27 18:34:11 +00:00
|
|
|
|
|
|
|
depends_on "libtiff"
|
|
|
|
depends_on "jasper"
|
2012-06-07 01:35:12 +00:00
|
|
|
depends_on :libpng
|
2010-09-27 18:34:11 +00:00
|
|
|
|
|
|
|
def install
|
2012-10-30 17:53:22 +00:00
|
|
|
system "cp", "config.mk.in", "config.mk"
|
2010-09-27 18:34:11 +00:00
|
|
|
|
2013-05-06 23:16:39 +00:00
|
|
|
inreplace "config.mk" do |s|
|
2010-09-27 18:34:11 +00:00
|
|
|
s.remove_make_var! "CC"
|
|
|
|
s.change_make_var! "CFLAGS_SHLIB", "-fno-common"
|
|
|
|
s.change_make_var! "NETPBMLIBTYPE", "dylib"
|
|
|
|
s.change_make_var! "NETPBMLIBSUFFIX", "dylib"
|
|
|
|
s.change_make_var! "LDSHLIB", "--shared -o $(SONAME)"
|
|
|
|
s.change_make_var! "TIFFLIB", "-ltiff"
|
|
|
|
s.change_make_var! "JPEGLIB", "-ljpeg"
|
|
|
|
s.change_make_var! "PNGLIB", "-lpng"
|
|
|
|
s.change_make_var! "ZLIB", "-lz"
|
|
|
|
s.change_make_var! "JASPERLIB", "-ljasper"
|
2013-05-06 23:16:39 +00:00
|
|
|
s.change_make_var! "JASPERHDR_DIR", "#{Formula.factory('jasper').opt_prefix}/include/jasper"
|
2010-09-27 18:34:11 +00:00
|
|
|
end
|
|
|
|
|
2013-05-06 23:16:39 +00:00
|
|
|
ENV.append 'LDFLAGS', '-Wl,-headerpad_max_install_names'
|
|
|
|
|
2010-09-27 18:34:11 +00:00
|
|
|
ENV.deparallelize
|
|
|
|
system "make"
|
2012-02-24 20:50:21 +00:00
|
|
|
system "make", "package", "pkgdir=#{buildpath}/stage"
|
|
|
|
cd 'stage' do
|
2010-09-27 18:34:11 +00:00
|
|
|
prefix.install %w{ bin include lib misc }
|
2012-01-05 18:24:46 +00:00
|
|
|
# do man pages explicitly; otherwise a junk file is installed in man/web
|
|
|
|
man1.install Dir['man/man1/*.1']
|
|
|
|
man5.install Dir['man/man5/*.5']
|
2010-09-27 18:34:11 +00:00
|
|
|
lib.install Dir['link/*.a']
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|