homebrew-core/Formula/netpbm.rb
nibbles 2bits 90f5900ea6 netpbm: use Advanced and Trunk branches, redact stable
- Neither super-stable nor stable compile due to our new libpng.
- So swith to using the netpbm advanced and trunk branches.
- Upgrade to the newer advanced revision 1755, version 10.60.02.
- Remove the patches for devel and HEAD that have been merged.
- Works with superenv

Fixes Homebrew/homebrew#15677.
Closes Homebrew/homebrew#15762.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-30 21:45:34 -05:00

43 lines
1.3 KiB
Ruby

require 'formula'
class Netpbm < Formula
homepage 'http://netpbm.sourceforge.net'
url 'svn+http://netpbm.svn.sourceforge.net/svnroot/netpbm/advanced/', :revision => 1755
version '10.60.02'
head 'http://netpbm.svn.sourceforge.net/svnroot/netpbm/trunk'
depends_on "libtiff"
depends_on "jasper"
depends_on :libpng
def install
system "cp", "config.mk.in", "config.mk"
config = "config.mk"
inreplace config do |s|
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"
s.change_make_var! "JASPERHDR_DIR", "#{HOMEBREW_PREFIX}/include/jasper"
end
ENV.deparallelize
system "make"
system "make", "package", "pkgdir=#{buildpath}/stage"
cd 'stage' do
prefix.install %w{ bin include lib misc }
# 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']
lib.install Dir['link/*.a']
end
end
end