aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/Uses/jpeg.mk
blob: 1aaf07fba08f2ce211b53b5dbf43db4773ebdbf6 (plain) (blame)
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
# $FreeBSD$
#
# Handle dependency on jpeg
#
# Feature:  jpeg
# Usage:    USES=jpeg or USES=jpeg:ARGS
# Valid ARGS:   lib (default, implicit), build, run, both
#
# MAINTAINER: portmgr@FreeBSD.org

.if !defined(_INCLUDE_USES_JPEG_MK)

_INCLUDE_USES_JPEG_MK=  yes
JPEG_PORT?= graphics/jpeg

.if empty(jpeg_ARGS)
jpeg_ARGS=  lib
.endif

.if ${jpeg_ARGS} == lib
LIB_DEPENDS+=   libjpeg.so:${PORTSDIR}/${JPEG_PORT}
.elif ${jpeg_ARGS} == build
BUILD_DEPENDS+= cjpeg:${PORTSDIR}/${JPEG_PORT}
.elif ${jpeg_ARGS} == run
RUN_DEPENDS+=   cjpeg:${PORTSDIR}/${JPEG_PORT}
.elif ${jpeg_ARGS} == both
BUILD_DEPENDS+= cjpeg:${PORTSDIR}/${JPEG_PORT}
RUN_DEPENDS+=   cjpeg:${PORTSDIR}/${JPEG_PORT}
.else
IGNORE=     USES=jpeg - invalid args: [${jpeg_ARGS}] specified
.endif

.endif