summaryrefslogtreecommitdiff
path: root/graphics/ming/Makefile
blob: 4b7b197c81ef26e5b163ba3368782c401e03a47f (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
66
67
68
69
70
# New ports collection makefile for:	Ming
# Date created:		14 October 2000
# Whom:			Akinori MUSHA aka knu <knu@idaemons.org>
#
# $FreeBSD$
#

PORTNAME=	ming
PORTVERSION=	0.4.4
PORTREVISION?=	2
CATEGORIES=	graphics
MASTER_SITES=	SF/${PORTNAME}/Releases/

MAINTAINER=	sunpoet@FreeBSD.org
COMMENT=	Flash 4/5 movie output library with many languages support

LIB_DEPENDS=	freetype:${PORTSDIR}/print/freetype2 \
		gif:${PORTSDIR}/graphics/giflib \
		png15:${PORTSDIR}/graphics/png

CONFLICTS=	ja-ming-[0-9]*

CFLAGS+=	-I${LOCALBASE}/include
CONFIGURE_ARGS+=--includedir=${PREFIX}/include/ming
CPPFLAGS+=	-I. -I.. -I${LOCALBASE}/include
LDFLAGS+=	-L. -L.. -L${LOCALBASE}/lib
GNU_CONFIGURE=	yes
MAKE_JOBS_UNSAFE=	yes
USE_BISON=	build
USE_GMAKE=	yes
USE_GNOME=	gnomehack
USE_LDCONFIG=	yes

DOCS=		HISTORY NEWS README TODO
DOCS_UTIL=	README TIPS TODO swftoperl.html

.if defined(SLAVEPORT)
LIB_DEPENDS+=	ming:${PORTSDIR}/graphics/ming
.endif

post-patch:
	@${REINPLACE_CMD} -e 's|ungif|gif|g' ${WRKSRC}/configure ${WRKSRC}/docs/man/Makefile \
		${WRKSRC}/perl_ext/Makefile.PL ${WRKSRC}/py_ext/setup.py.in
	@${REINPLACE_CMD} -e '/PrintGifError();/d' ${WRKSRC}/src/blocks/gifdbl.c \
		${WRKSRC}/util/gif2dbl.c ${WRKSRC}/util/gif2mask.c
# patch for graphics/p5-ming
	@${REINPLACE_CMD} -e 's|\.3pm|.3|g' ${WRKSRC}/perl_ext/Makefile.PL ${WRKSRC}/perl_ext/mkdoc
	@${REINPLACE_CMD} -e 's|GvCV(\(.*\)) = \(.*\);|GvCV_set(\1, \2);|' ${WRKSRC}/perl_ext/Exports.c
	@${REINPLACE_CMD} -e '1 s|/usr/bin/perl|${PERL}|' ${WRKSRC}/perl_ext/examples/*.cgi
# patch for graphics/py-ming
	@${REINPLACE_CMD} -e 's| --root ".*"||' ${WRKSRC}/py_ext/Makefile.in
	@${REINPLACE_CMD} -e 's|/usr/local/|${LOCALBASE}/|g' ${WRKSRC}/py_ext/setup.py.in
	@${LN} -sf ${LOCALBASE}/include/ming ${WRKSRC}/src

.if !target(post-install)
post-install:
	${MKDIR} ${PREFIX}/include/ming/ ${PREFIX}/include/ming/blocks/ ${PREFIX}/include/ming/util/
	cd ${WRKSRC}/ && \
		${INSTALL_SCRIPT} util/cws2fws util/ming-config ${PREFIX}/bin/ && \
		${INSTALL_DATA} *.h src/*.h ${PREFIX}/include/ming/ && \
		${INSTALL_DATA} src/blocks/*.h ${PREFIX}/include/ming/blocks/ && \
		${INSTALL_DATA} util/png2dbl.c util/*.h ${PREFIX}/include/ming/util/
.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR}/ ${DOCSDIR}/util/
	cd ${WRKSRC}/ && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}/
	cd ${WRKSRC}/util/ && ${INSTALL_DATA} ${DOCS_UTIL} ${DOCSDIR}/util/
.endif
.endif

.include <bsd.port.mk>