Netpbm version 10.26.61 - How to Download and Install on Mac OS X
Sunday the 22nd of November, 2009

    version 10.26.61

      View the most recent changes for the netpbm port at: netpbm.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for netpbm.
      The raw portfile for netpbm 10.26.61 is located here:
      http://netpbm.darwinports.com/dports/graphics/netpbm/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/netpbm


      The netpbm Portfile 50420 2009-04-30 20:21:13Z mcalhoun macports.org $

      PortSystem 1.0

      Name: netpbm
      Version: 10.26.61
      Category: 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
      Platform: darwin freebsd linux
      # Parallel building is not reliable in netpbm 10.26.x.
      # This has been fixed for the next major release of netpbm.
      # See http://trac.macports.org/ticket/17516#comment:7
      # 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 1f6224210265ad9a9d196b9f83109a6d sha1 38e47c96adcfdaa8a8cc4741b6985f82f0100260 rmd160 18a8ee7160edeaf99e98125b9af01352f359f4ec

      Patch Files: patch-lib-Makefile.diff patch-pm_config.in.h.diff

      post-patch {
      reinplace "s| PREFIX |${prefix}|g" ${worksrcpath}/pm_config.in.h
      }

      configure.cflags-delete -O2
      configure.cflags-append -O3

      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 "${configure.ldflags} -dynamiclib -install_name ${prefix}/lib/libnetpbm.\$(MAJ).dylib -compatibility_version \$(MAJ) -current_version ${version}"
      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

      # work around bug in Apple's gcc build 4061
      platform darwin 8 {
      set fl [open "| ${configure.cc} --version"]
      set data [read $fl]
      close $fl
      if {[regexp "build 4061" $data]} {
      ui_msg "On Mac OS X ${macosx_version}, ${name} ${version} does not work with gcc version \"${data}\"."
      return -code error "incompatible gcc version"
      }
      }

    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/netpbm
      % sudo port install netpbm
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching netpbm
      ---> Verifying checksum for netpbm
      ---> Extracting netpbm
      ---> Configuring netpbm
      ---> Building netpbm with target all
      ---> Staging netpbm into destroot
      ---> Installing netpbm
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using netpbm with these commands:
      %  man netpbm
      % apropos netpbm
      % which netpbm
      % locate netpbm

     Where to find more information:

    Darwin Ports



    Lightbox this page.