Tweak graphics/mozjpeg version 3.1_1
[dports.git] / graphics / mozjpeg / Makefile
1 # Created by: Horia Racoviceanu <horia@racoviceanu.com>
2 # $FreeBSD$
3
4 PORTNAME=       mozjpeg
5 PORTVERSION=    3.1
6 DISTVERSIONPREFIX=      v
7 PORTREVISION=   1
8 CATEGORIES=     graphics
9
10 MAINTAINER=     ports@FreeBSD.org
11 COMMENT=        Advanced JPEG encoder for the Web
12
13 LICENSE=        BSD3CLAUSE
14 LICENSE_FILE=   ${WRKSRC}/LICENSE.txt
15
16 USE_GITHUB=     yes
17 GH_ACCOUNT=     mozilla
18
19 USES=           autoreconf libtool pkgconfig
20 USE_LDCONFIG=   ${PREFIX}/lib/${PORTNAME}
21 GNU_CONFIGURE=  yes
22 CONFIGURE_ARGS= --docdir=${PREFIX}/share/doc/${PORTNAME} \
23                 --includedir=${PREFIX}/include/${PORTNAME} \
24                 --libdir=${PREFIX}/lib/${PORTNAME} \
25                 --with-jpeg8 \
26                 --disable-static
27 INSTALL_TARGET= install-strip
28
29 PLIST_SUB=      PORTNAME=${PORTNAME}
30
31 PORTDOCS=       *
32 PORTEXAMPLES=   *
33
34 OPTIONS_DEFINE= DOCS EXAMPLES SIMD TURBOJPEG
35 OPTIONS_DEFAULT=SIMD TURBOJPEG
36 OPTIONS_SUB=    yes
37
38 SIMD_DESC=      Include SIMD extensions
39 TURBOJPEG_DESC= Include the TurboJPEG wrapper library and associated tests
40
41 SIMD_CONFIGURE_WITH=            simd
42 SIMD_BUILD_DEPENDS=             yasm:devel/yasm
43 TURBOJPEG_CONFIGURE_WITH=       turbojpeg
44
45 BROKEN_aarch64=         Does not configure: error: SIMD support cannot be enabled
46 BROKEN_mips64=          Does not configure: error: SIMD support cannot be enabled
47 BROKEN_powerpc64=       Does not build: undefined reference to htole32
48 BROKEN_sparc64=         Does not configure: error: SIMD support cannot be enabled
49
50 post-patch:
51         @${REINPLACE_CMD} -e '/^docdir/s|=.*|= ${DOCSDIR}|; \
52                 /^exampledir/s|=.*|= ${EXAMPLESDIR}|' \
53                         ${WRKSRC}/Makefile.am
54
55 post-install:
56         (cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
57
58 .include <bsd.port.mk>