# $Id$ PortSystem 1.0 name netpbm version 10.26.58 categories graphics maintainers mas openmaintainer description Image manipulation long_description \ A whole bunch of utilities for primitive manipulation \ of graphic images. Wide array of converters from one \ graphics format to another. E.g. from g3 fax format to \ jpeg. Many basic graphics editing tools such as \ magnifying and cropping. homepage http://netpbm.sourceforge.net/ master_sites sourceforge:netpbm platforms darwin freebsd linux # If you're thinking about enabling parallel build in the Portfile, # please make sure to test it on OS X 10.4 as well! Thanks! use_parallel_build no depends_build path:bin/perl:perl5 depends_lib port:zlib port:jpeg port:tiff \ port:libpng port:jasper extract.suffix .tgz checksums md5 9824116c1a7bb9c05fa63a26e6586c87 \ sha1 663baa755e8336622cff48009435503119fbce00 \ rmd160 29695ca9ef5cca1e147a3bbb5b0d60fe5a6fca5d patchfiles patch-lib-Makefile.diff use_configure no configure.cflags-delete -O2 configure.cflags-append -O3 post-configure { file copy ${worksrcpath}/Makefile.config.in ${worksrcpath}/Makefile.config reinplace "s|^CC =.*\$|CC = ${configure.cc}|" ${worksrcpath}/Makefile.config reinplace "s|^#CFLAGS =.*\$|CFLAGS = ${configure.cppflags} ${configure.cflags}|" ${worksrcpath}/Makefile.config reinplace "s|^#LDFLAGS +=.*\$|LDFLAGS = ${configure.ldflags}|g" ${worksrcpath}/Makefile.config reinplace "s|^CFLAGS_SHLIB =.*\$|CFLAGS_SHLIB = -fno-common|" ${worksrcpath}/Makefile.config reinplace "s|^TIFFLIB =.*\$|TIFFLIB = -ltiff|" ${worksrcpath}/Makefile.config reinplace "s|^JPEGLIB =.*\$|JPEGLIB = -ljpeg|" ${worksrcpath}/Makefile.config reinplace "s|^PNGLIB =.*\$|PNGLIB = -lpng|" ${worksrcpath}/Makefile.config reinplace "s|^ZLIB =.*\$|ZLIB = -lz|" ${worksrcpath}/Makefile.config reinplace "s|^JASPERHDR_DIR =.*\$|JASPERHDR_DIR = ${prefix}/include|" ${worksrcpath}/Makefile.config } platform darwin { post-configure { set ldshlib "-dynamiclib -install_name ${prefix}/lib/libnetpbm.\$(MAJ).dylib -compatibility_version \$(MAJ) -current_version \$(MAJ).\$(MIN)" reinplace "s|^NETPBMLIBTYPE =.*\$|NETPBMLIBTYPE = dylib|" ${worksrcpath}/Makefile.config reinplace "s|^NETPBMLIBSUFFIX =.*\$|NETPBMLIBSUFFIX = dylib|" ${worksrcpath}/Makefile.config reinplace "s|^LDSHLIB =.*\$|LDSHLIB = ${ldshlib}|" ${worksrcpath}/Makefile.config reinplace "s|^JASPERLIB =.*\$|JASPERLIB = -ljasper|" ${worksrcpath}/Makefile.config } } platform linux { post-configure { set ldshlib {-shared -Wl,-soname,$(SONAME)} reinplace "s|^NETPBMLIBTYPE =.*\$|NETPBMLIBTYPE = unixshared|" ${worksrcpath}/Makefile.config reinplace "s|^NETPBMLIBSUFFIX =.*\$|NETPBMLIBSUFFIX = so|" ${worksrcpath}/Makefile.config reinplace "s|^LDSHLIB =.*\$|LDSHLIB = ${ldshlib}|" ${worksrcpath}/Makefile.config reinplace "s|^JASPERLIB =.*\$|JASPERLIB = -ljasper|" ${worksrcpath}/Makefile.config reinplace "s|^LDRELOC =.*\$|LDRELOC = ld --reloc|" ${worksrcpath}/Makefile.config reinplace "s|^LINKER_CAN_DO_EXPLICIT_LIBRARY =.*\$|LINKER_CAN_DO_EXPLICIT_LIBRARY = Y|" ${worksrcpath}/Makefile.config } } platform freebsd { post-configure { set ldshlib {glibtool --mode=link gcc} reinplace "s|^NETPBMLIBTYPE =.*\$|NETPBMLIBTYPE = unixshared|" ${worksrcpath}/Makefile.config reinplace "s|^NETPBMLIBSUFFIX =.*\$|NETPBMLIBSUFFIX = so|" ${worksrcpath}/Makefile.config reinplace "s|^LDSHLIB =.*\$|LDSHLIB = ${ldshlib}|" ${worksrcpath}/Makefile.config reinplace "s|^JASPERLIB =.*\$|JASPERLIB = ${prefix}/lib/libjasper.la|" ${worksrcpath}/Makefile.config } patchfiles-append patch-libopt.c.diff depends_build port:libtool } build.args "messages=yes" build.target "" build.type gnu destroot.target package destroot.destdir pkgdir=${destroot}${prefix} pre-destroot { file delete -force ${destroot}${prefix} } post-destroot { xinstall -m 755 -d ${destroot}${prefix}/share/netpbm eval move ${destroot}${prefix}/bin/doc.url [glob ${destroot}${prefix}/misc/*] ${destroot}${prefix}/share/netpbm move ${destroot}${prefix}/man ${destroot}${prefix}/share/ move ${destroot}${prefix}/link/libnetpbm.a ${destroot}${prefix}/lib eval delete [glob -type f -directory ${destroot}${prefix} *] foreach old_library {pbm pgm pnm ppm} { ln -s libnetpbm.dylib ${destroot}${prefix}/lib/lib${old_library}.dylib } } # "Netpbm has a sophisticated, rather novel system of releasing source code" livecheck.distname super stable universal_variant no # work around bug in Apple's gcc build 4061 platform darwin 8 { set fl [open "| gcc --version"] set data [read $fl] close $fl if {[regexp "build 4061" $data]} { configure.compiler gcc-3.3 } }