1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-30 10:38:37 +00:00
freebsd-ports/graphics/libbpg/Makefile
Juergen Lock 58000b12ef Add new port graphics/libbpg:
BPG (Better Portable Graphics) is a new image format. Its purpose is to
replace the JPEG image format when quality or file size is an issue. Its
main advantages are:
 - High compression ratio. Files are much smaller than JPEG for similar
   quality.
 - Supported by most Web browsers with a small Javascript decoder (gzipped
   size: 56 KB).
 - Based on a subset of the HEVC open video compression standard.
 - Supports the same chroma formats as JPEG (grayscale, YCbCr 4:2:0, 4:2:2,
   4:4:4) to reduce the losses during the conversion. An alpha channel is
   supported. The RGB, YCgCo and CMYK color spaces are also supported.
 - Native support of 8 to 14 bits per channel for a higher dynamic range.
 - Lossless compression is supported.
 - Various metadata (such as EXIF, ICC profile, XMP) can be included.
 - Animation support.

WWW: http://bellard.org/bpg/

PR:		196837
Submitted by:	Matthieu Volat <mazhe@alkumuna.eu>
2015-01-30 17:47:01 +00:00

57 lines
1.6 KiB
Makefile

# Created by: Matthieu Volat <mazhe@alkumuna.eu>
# $FreeBSD$
PORTNAME= libbpg
PORTVERSION= 0.9.5
CATEGORIES= graphics
MASTER_SITES= http://bellard.org/bpg/
MAINTAINER= mazhe@alkumuna.eu
COMMENT= BPG (Better Portable Graphics) is a new image format
LICENSE= BSD2CLAUSE LGPL21
LICENSE_COMB= multi
LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \
libpng.so:${PORTSDIR}/graphics/png
OPTIONS_DEFINE= SDL JCTVC X265
OPTIONS_DEFAULT=SDL JCTVC
OPTIONS_SUB= yes
USE_LDCONFIG= yes
SDL_USE= SDL=image
X265_LIB_DEPENDS= libx265.so:${PORTSDIR}/multimedia/x265
.include <bsd.port.options.mk>
JCTVC_DESC= Enable JCTVC (best quality but slow) for the encoder
JCTVCHI_DESC= Use bit depths > 12 with JCTVC (experimental)
USES= gmake compiler:c++11-lib
CFLAGS+= -fPIC -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
do-configure:
.if ! ${PORT_OPTIONS:MSDL}
${REINPLACE_CMD} -e 's/^USE_BPGVIEW=y$$/#USE_BPGVIEW=/' ${WRKSRC}/Makefile
.endif
.if ! ${PORT_OPTIONS:MJCTVC}
${REINPLACE_CMD} -e 's/^USE_JCTVC=y$$/#USE_JCTVC=/' ${WRKSRC}/Makefile
.endif
.if ${PORT_OPTIONS:MX265}
${REINPLACE_CMD} -e 's/^#USE_JCTVC_HIGH_BIT_DEPTH=y$$/USE_JCTVC_HIGH_BIT_DEPTH=y/' ${WRKSRC}/Makefile
.endif
.if ${PORT_OPTIONS:MX265}
${REINPLACE_CMD} -e 's/^#USE_X265=y$$/USE_X265=y/' ${WRKSRC}/Makefile
.endif
post-install:
.if ${PORT_OPTIONS:MSDL}
${INSTALL_PROGRAM} ${WRKSRC}/bpgview ${STAGEDIR}${PREFIX}/bin
.endif
${INSTALL_DATA} ${WRKSRC}/libbpg.h ${STAGEDIR}${PREFIX}/include
${INSTALL_LIB} ${WRKSRC}/libbpg.a ${STAGEDIR}${PREFIX}/lib
${INSTALL_LIB} ${WRKSRC}/libbpg.so ${STAGEDIR}${PREFIX}/lib
.include <bsd.port.mk>