# Created by: Emanuel Haupt <ehaupt@critical.ch>
# $FreeBSD: graphics/exrtools/Makefile 334422 2013-11-20 14:25:28Z nemysis $

PORTNAME=	exrtools
PORTVERSION=	0.4
PORTREVISION=	9
CATEGORIES=	graphics
MASTER_SITES=	http://scanline.ca/exrtools/ \
		CRITICAL

MAINTAINER=	ehaupt@FreeBSD.org
COMMENT=	Utilities for manipulating with HDR images in OpenEXR format

LICENSE=	GPLv2

LIB_DEPENDS=	IlmImf:${PORTSDIR}/graphics/OpenEXR \
		png15:${PORTSDIR}/graphics/png \
		jpeg:${PORTSDIR}/graphics/jpeg

GNU_CONFIGURE=	yes
USES=		pkgconfig gmake

CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib

post-patch:
	@${REINPLACE_CMD} -e 's|<values\.h>|<float.h>|' \
		${WRKSRC}/src/exrnormalize.c \
		${WRKSRC}/src/exrpptm.c \
		${WRKSRC}/src/exrstats.c

.include <bsd.port.mk>
