summaryrefslogtreecommitdiff
path: root/graphics/autotrace/Makefile
blob: fb26ce69965f62ca0175168e6b554961e66423d7 (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
# Created by: KANOU Hiroki <kanou@mil.allnet.ne.jp>
# $FreeBSD$

PORTNAME=	autotrace
PORTVERSION=	0.31.1
PORTREVISION=	23
CATEGORIES=	graphics
MASTER_SITES=	SF/${PORTNAME}/AutoTrace/${PORTVERSION}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Convert bitmap to vector graphics

LICENSE=	GPLv2 LGPL21
LICENSE_COMB=	multi

LIB_DEPENDS=	png15:${PORTSDIR}/graphics/png

OPTIONS_DEFINE=	IMAGEMAGICK MING PSTOEDIT
OPTIONS_DEFAULT=	IMAGEMAGICK PSTOEDIT
MING_DESC=	Enable swf interface
PSTOEDIT_DESC=	Convert postscript to other formats

USES=	pathfix pkgconfig
USE_AUTOTOOLS=	libtool
USE_LDCONFIG=	yes
MAKE_JOBS_SAFE= yes
CPPFLAGS+=	$$(libpng-config --I_opts) ${PTHREAD_CFLAGS}
LDFLAGS+=	$$(libpng-config --L_opts) ${PTHREAD_LIBS}

MAN1=		autotrace.1

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MIMAGEMAGICK}
LIB_DEPENDS+=	MagickWand:${PORTSDIR}/graphics/ImageMagick
.else
CONFIGURE_ARGS+=	--without-magick
.endif

.if ${PORT_OPTIONS:MMING}
LIB_DEPENDS+=	ming:${PORTSDIR}/graphics/ming
CPPFLAGS+=	-I${LOCALBASE}/include -I${LOCALBASE}/include/ming
.else
CONFIGURE_ENV+=	ac_cv_header_ming_h=no
.endif

.if ${PORT_OPTIONS:MPSTOEDIT}
LIB_DEPENDS+=	pstoedit:${PORTSDIR}/graphics/pstoedit
.else
CONFIGURE_ARGS+=	--without-pstoedit
.endif

post-patch:
	@${REINPLACE_CMD} -e \
		's|Magick-config|MagickWand-config|g ; \
		/$$PSTOEDIT_CONFIG/s|--version|--modversion| ; \
		s|$$PSTOEDIT_CONFIG $$pstoedit_args|pkg-config pstoedit| ; \
		/^PSTOEDIT_CONFIG=/s|=.*$$|=pkg-config|' ${WRKSRC}/configure

.include <bsd.port.mk>