summaryrefslogtreecommitdiffstats
path: root/graphics/swftools/Makefile
blob: 0a1775bb88fc760d42f9dcc09956dcbf8d871a14 (plain)
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
66
# Created by: ijliao
# $FreeBSD$

PORTNAME=	swftools
PORTVERSION=	0.9.2
PORTREVISION=	1
CATEGORIES=	graphics
MASTER_SITES=	http://www.swftools.org/ \
		http://www.c-s.li/ports/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	SWF manipulation and generation utilities

LICENSE=	GPLv2

LIB_DEPENDS=	t1.5:${PORTSDIR}/devel/t1lib \
		jpeg.11:${PORTSDIR}/graphics/jpeg \
		gif.5:${PORTSDIR}/graphics/giflib \
		fftw3:${PORTSDIR}/math/fftw3 \
		freetype.9:${PORTSDIR}/print/freetype2 \
		fontconfig.1:${PORTSDIR}/x11-fonts/fontconfig

OPTIONS_DEFINE=	LAME PDF

USES=		pkgconfig
USE_GL=		glut
USE_GMAKE=	yes
GNU_CONFIGURE=	yes
CONFIGURE_ENV=	ac_cv_lib_zzip_zzip_file_open=no

MAKE_JOBS_SAFE=	yes

MAN1=		as3compile.1 font2swf.1 gif2swf.1 jpeg2swf.1 pdf2swf.1 \
		png2swf.1 swfbbox.1 swfc.1 swfcombine.1 swfdump.1 \
		swfextract.1 swfrender.1 swfstrings.1 wav2swf.1

CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MLAME}
LIB_DEPENDS+=	mp3lame.0:${PORTSDIR}/audio/lame
.else
#CONFIGURE_ARGS+=	--disable-lame
CONFIGURE_ENV+=	ac_cv_lib_mp3lame_lame_init=no
.endif

.if ${PORT_OPTIONS:MPDF}
LIB_DEPENDS+=	pdf.6:${PORTSDIR}/print/pdflib
PLIST_SUB+=	PDF=""
MAN1+=		pdf2pdf.1
.else
CONFIGURE_ENV+=	ac_cv_lib_pdf_PDF_open_file=no
PLIST_SUB+=	PDF="@comment "
.endif

post-patch:
	@${REINPLACE_CMD} -e 's| -O | |g ; \
		 s|/usr/include/fontconfig|${LOCALBASE}/include/fontconfig|g ; \
		 s|/usr/local/include|${LOCALBASE}/include|g ; \
		 s|/usr/local/lib|${LOCALBASE}/lib|g' ${WRKSRC}/configure
	@${REINPLACE_CMD} -e '/python/d ; \
		 /avi2swf/d' ${WRKSRC}/Makefile.in

.include <bsd.port.mk>
OpenPOWER on IntegriCloud