# $Id: Portfile 64763 2010-03-15 16:31:33Z nox@macports.org $

PortSystem              1.0

name                    xv
version                 3.10a
set jumbo_version       20070520
revision                6
categories              graphics x11
maintainers             raimue

description             xv is an interactive image manipulation program for \
                        the X Window System.

long_description        xv is an interactive image manipulation program for \
                        the X Window System. It can operate on images in the \
                        GIF, JPEG, TIFF, PNG, PhotoCD, PBM, PGM, PPM, XPM, \
                        X11 bitmap, Sun Rasterfile, Targa, RLE, RGB, BMP, PCX, \
                        FITS, and PM formats on all known types of X \
                        displays. It can generate PostScript files, and if you \
                        have ghostscript (version 2.6 or above) installed on \
                        your machine, it can also display them. \
                        This port includes 'xv jumbo patches' from http://www.sonic.net/~roelofs/greg_xv.html \
                        Note that this program is shareware except for personal \
                        use only, please read the license agreement.

homepage                http://www.trilon.com/xv/xv.html
platforms               darwin

master_sites            ftp://ftp.trilon.com/pub/xv/:xv \
                        sourceforge:png-mng:xv-jumbo
distfiles               ${distname}${extract.suffix}:xv \
                        ${distname}-jumbo-patches-${jumbo_version}${extract.suffix}:xv-jumbo
checksums               ${distname}${extract.suffix} \
                        md5 2d4fbeec1561304362781cc8e2f7f72d \
                        ${distname}-jumbo-patches-${jumbo_version}${extract.suffix} \
                        md5 9fb2d0ec320498105cafeba38a588472
depends_lib             port:xorg-libX11 \
                        port:jpeg \
                        port:tiff \
                        port:libpng \
                        port:jasper \
                        path:include/gif_lib.h:giflib \
                        port:zlib \
                        port:xpm

patch {
    system "cd '${worksrcpath}' && patch -p1 < ${workpath}/${distname}-jumbo-fix-enh-patch-${jumbo_version}.txt"
    system "cd '${worksrcpath}' && patch -p0 < ${filespath}/patch-Makefile.diff"
    system "cd '${worksrcpath}' && patch -p0 < ${filespath}/patch-xv.h.diff"
}

use_configure           no

build.post_args         PREFIX='${prefix}' \
                        ZLIBDIR='${prefix}' \
                        JPEGDIR='${prefix}' \
                        TIFFDIR='${prefix}' \
                        PNGDIR='${prefix}' \

destroot.post_args      PREFIX='${prefix}' DESTDIR='${destroot}'

livecheck.type          none
