# Created by: Emanuel Haupt <ehaupt@critical.ch>
# $FreeBSD: head/graphics/exrtools/Makefile 455244 2017-12-01 01:58:23Z mandree $

PORTNAME=	exrtools
PORTVERSION=	0.4
PORTREVISION=	14
CATEGORIES=	graphics
MASTER_SITES=	http://scanline.ca/exrtools/ \
		LOCAL/ehaupt

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

LICENSE=	GPLv2

LIB_DEPENDS=	libImath-2_2.so:graphics/ilmbase \
		libpng.so:graphics/png \
		libIlmImf.so:graphics/OpenEXR

BROKEN_armv6=		fails to configure: checking for /nxb-bin/usr/bin/cc... no
BROKEN_armv7=		fails to configure: checking for /nxb-bin/usr/bin/cc... no

GNU_CONFIGURE=	yes
USES=		gmake jpeg pkgconfig

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>
