freebsd-ports/Mk/Uses/jpeg.mk
Po-Chuan Hsieh 3e8a53b114
Mk/Uses/jpeg.mk: Update comment for graphics/mozjpeg
MozJPEG (graphics/mozjpeg) is a patched libjpeg-turbo (graphics/jpeg-turbo). It
is also a valid JPEG implementation.

from README.md:
MozJPEG is compatible with the libjpeg API and ABI. It is intended to be a
drop-in replacement for libjpeg. MozJPEG is a strict superset of libjpeg-turbo's
functionality. All MozJPEG's improvements can be disabled at run time, and in
that case it behaves exactly like libjpeg-turbo.

Reference:	https://github.com/mozilla/mozjpeg/blob/master/README.md
PR:		257028
Approved by:	bapt (portmgr, maintainer)
2021-11-22 05:17:16 +08:00

36 lines
835 B
Makefile

# Handle dependency on jpeg
#
# Feature: jpeg
# Usage: USES=jpeg or USES=jpeg:ARGS
# Valid ARGS: lib (default, implicit), build, run, both
#
# User defined variables:
# JPEG_PORT - jpeg implementation
# Valid values: graphics/jpeg-turbo, graphics/mozjpeg
# Default value: graphics/jpeg-turbo
#
# MAINTAINER: portmgr@FreeBSD.org
.if !defined(_INCLUDE_USES_JPEG_MK)
_INCLUDE_USES_JPEG_MK= yes
JPEG_PORT?= graphics/jpeg-turbo
.if empty(jpeg_ARGS)
jpeg_ARGS= lib
.endif
.if ${jpeg_ARGS} == lib
LIB_DEPENDS+= libjpeg.so:${JPEG_PORT}
.elif ${jpeg_ARGS} == build
BUILD_DEPENDS+= cjpeg:${JPEG_PORT}
.elif ${jpeg_ARGS} == run
RUN_DEPENDS+= cjpeg:${JPEG_PORT}
.elif ${jpeg_ARGS} == both
BUILD_DEPENDS+= cjpeg:${JPEG_PORT}
RUN_DEPENDS+= cjpeg:${JPEG_PORT}
.else
IGNORE= USES=jpeg - invalid args: [${jpeg_ARGS}] specified
.endif
.endif