aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/openjpeg/Makefile
blob: 03d5745f8a2502759639a382d65fba2fe53ee4dd (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
# New ports collection makefile for:    openjpeg
# Date created:     2007-01-13
# Whom:         trasz <trasz@pin.if.uz.zgora.pl>
#
# $FreeBSD$
#

PORTNAME=   openjpeg
PORTVERSION=    1.3
PORTREVISION=   2
CATEGORIES= graphics
MASTER_SITES=   http://www.openjpeg.org/ \
        http://openjpeg.googlecode.com/files/ \
        ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= trasz
DISTNAME=   ${PORTNAME}_v${PORTVERSION:S/./_/g}

MAINTAINER= dinoex@FreeBSD.org
COMMENT=    An open-source JPEG 2000 codec

LIB_DEPENDS=    tiff.4:${PORTSDIR}/graphics/tiff

LICENSE=    BSD
LICENSE_FILE=   ${WRKSRC}/COPYRIGHT
MAKE_JOBS_UNSAFE=   yes

USE_GMAKE=  yes
USE_LDCONFIG=   yes
WRKSRC=     ${WRKDIR}/OpenJPEG_v1_3
JPWL_BINS=  JPWL_image_to_j2k JPWL_j2k_to_image
M2J_BINS=   extract_j2k_from_mj2 frames_to_mj2 mj2_to_frames wrap_j2k_in_mj2

PLIST_FILES=    include/openjpeg.h \
        lib/libopenjpeg.a \
        lib/libopenjpeg.so.${SHLIB_VER} \
        lib/libopenjpeg.so \
        ${JPWL_BINS:S|^|bin/|} \
        ${M2J_BINS:S|^|bin/|}

SHLIB_VER=  2

post-extract:
        ${LN} ${WRKSRC}/jp3d/LICENSE.txt ${WRKSRC}/COPYRIGHT

post-patch: .SILENT
        ${FIND} ${WRKSRC} -type f -name Makefile -exec ${REINPLACE_CMD} 's|gcc|$$(CC)|g' {} +

do-install:
        ${INSTALL_DATA} ${WRKSRC}/libopenjpeg/openjpeg.h ${PREFIX}/include/
        ${INSTALL_DATA} ${WRKSRC}/libopenjpeg.a ${PREFIX}/lib/
        ${INSTALL_DATA} ${WRKSRC}/libopenjpeg-2.1.3.0.so \
            ${PREFIX}/lib/libopenjpeg.so.${SHLIB_VER}
        cd ${PREFIX}/lib && \
            ${LN} -sf libopenjpeg.so.${SHLIB_VER} libopenjpeg.so
.for file in ${M2J_BINS:S|^|mj2/|} ${JPWL_BINS:S|^|jpwl/|}
        ${INSTALL_PROGRAM} ${WRKSRC}/${file} ${PREFIX}/bin/
.endfor

.include <bsd.port.mk>