aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/jpeg/Makefile
blob: 1db369649f7f617ec4208ff57eee3bd8da5ad7c2 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# New ports collection makefile for:    jpeg
# Date created:     6 November 1994
# Whom:         smace
#
# $FreeBSD$
#

PORTNAME=   jpeg
PORTVERSION=    8
PORTREVISION=   3
CATEGORIES= graphics
MASTER_SITES=   http://www.ijg.org/files/ \
        http://sylvana.net/jpegcrop/:exif
DISTNAME=   jpegsrc.v${DISTVERSION2}
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX} \
        jpegexiforient.c:exif exifautotran.txt:exif
DIST_SUBDIR=    ${PORTNAME}${DISTVERSION2}2
EXTRACT_ONLY=   ${DISTNAME}${EXTRACT_SUFX}

MAINTAINER= dinoex@FreeBSD.org
COMMENT=    IJG's jpeg compression utilities

CONFLICTS=  libjpeg-turbo-[0-9]*
WRKSRC=     ${WRKDIR}/${PORTNAME}-${DISTVERSION2}

DISTVERSION2=   8b
USE_AUTOTOOLS=  libtool
USE_LDCONFIG=   yes
CONFIGURE_ARGS= --enable-shared --enable-static
MAKE_JOBS_SAFE= yes

ADDITIONAL_HEADER=  jinclude.h jpegint.h

# define J_MAXMEM like "make J_MAXMEM=32" to limit max processing memory to 32Mb
.if defined(J_MAXMEM)
CONFIGURE_ARGS+=    --enable-maxmem=${J_MAXMEM}
.endif

MAN1=       cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1

post-extract:
    @${CP} ${DISTDIR}/${DIST_SUBDIR}/jpegexiforient.c ${WRKSRC}/
    @${CP} ${DISTDIR}/${DIST_SUBDIR}/exifautotran.txt ${WRKSRC}/exifautotran

post-build:
    @cd ${WRKSRC} && ${CC} ${CFLAGS} -o jpegexiforient jpegexiforient.c

test: build
    ${SETENV} LD_LIBRARY_PATH=${WRKSRC}/.libs ${MAKE} -C ${WRKSRC} test

regression-test:    test

post-install:
.if !defined(NOPORTDOCS)
    @${MKDIR} ${PREFIX}/share/doc/jpeg
    @${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/jpeg/
    @${INSTALL_DATA} ${WRKSRC}/*.txt ${PREFIX}/share/doc/jpeg/
.endif
.for header in ${ADDITIONAL_HEADER}
    @${INSTALL_DATA} ${WRKSRC}/${header} ${PREFIX}/include/
.endfor
    ${INSTALL_PROGRAM} ${WRKSRC}/jpegexiforient ${PREFIX}/bin/
    ${INSTALL_SCRIPT} ${WRKSRC}/exifautotran ${PREFIX}/bin/

.include <bsd.port.mk>