summaryrefslogtreecommitdiff
path: root/graphics/dcraw-m/Makefile
blob: 9e9b535fee900fe881e91db14ccbd15d35038c84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Created by: "Waitman Gobble" <uzimac@da3m0n8t3r.com>
# $FreeBSD$

PORTNAME=	dcraw-m
PORTVERSION=	9.17
CATEGORIES=	graphics
MASTER_SITES=	https://dx.burplex.com/dcraw-m/ \
		http://www.waitman.net/dcraw-m/

MAINTAINER=	waitman@waitman.net
COMMENT=	Modified Decoder for RAW files from digital cameras

LIB_DEPENDS=	libjasper.so:${PORTSDIR}/graphics/jasper \
		libjpeg.so:${PORTSDIR}/graphics/jpeg \
		liblcms.so:${PORTSDIR}/graphics/lcms \
		libMagickWand.so:${PORTSDIR}/graphics/ImageMagick

PLIST_FILES=	bin/dcraw-m

OPTIONS_DEFINE=	OPTIMIZE_O3 OPTIMIZE_O4
OPTIMIZE_O3_DESC=	Use O3 with clang (O4 not working)
OPTIMIZE_O4_DESC=	Use O4 with gcc

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MOPTIMIZE_O3}
CFLAGS+=	-O3
.else
.if ${PORT_OPTIONS:MOPTIMIZE_O4}
CFLAGS+=	-O4
.endif
.endif

CFLAGS+=	-I${LOCALBASE}/include -I${LOCALBASE}/include/ImageMagick
LDFLAGS+=	-L${LOCALBASE}/lib -lm -ljasper -ljpeg -llcms -lMagickWand

do-build:
	cd ${WRKSRC}/ && ${CC} -o ${PORTNAME} ${CFLAGS} ${PORTNAME}.c ${LDFLAGS}

do-install:
	${MKDIR} ${STAGEDIR}${PREFIX}/bin
	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/

.include <bsd.port.mk>