aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/pstoedit/Makefile
blob: d6558d316a820f16d6e2d973a781eddb0d5e56da (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Created by: Thomas Gellekum <tg@FreeBSD.org>
# $FreeBSD$

PORTNAME=   pstoedit
PORTVERSION=    3.62
PORTREVISION=   1
CATEGORIES= graphics print
MASTER_SITES=   SF

MAINTAINER= nemysis@gmx.ch
COMMENT=    Convert PostScript to other vector graphic formats

LICENSE=    GPLv2

LIB_DEPENDS=    gd:${PORTSDIR}/graphics/gd

OPTIONS_DEFINE= MAGICK EMF MING PLOTUTILS
OPTIONS_DEFAULT=    MAGICK EMF PLOTUTILS
EMF_DESC=   Enable emf interface
MING_DESC=  Enable swf interface
PLOTUTILS_DESC= Enable libplot interface

USES=       pathfix pkgconfig
USE_GHOSTSCRIPT=    yes
USE_AUTOTOOLS=  libtool
USE_LDCONFIG=   yes

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

MAN1=       pstoedit.1

PORTDOCS=   *
PORTEXAMPLES=   *

NO_STAGE=   yes
.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MMAGICK}
LIB_DEPENDS+=   Magick++:${PORTSDIR}/graphics/ImageMagick
PLIST_SUB+= IMAGEMAGICK=""
.else
CONFIGURE_ARGS+=    --without-magick
PLIST_SUB+= IMAGEMAGICK="@comment "
.endif

.if ${PORT_OPTIONS:MEMF}
LIB_DEPENDS+=   EMF:${PORTSDIR}/graphics/libemf
CONFIGURE_ARGS+=    --with-libemf-include=${LOCALBASE}/include/libEMF
PLIST_SUB+= EMF=""
.else
CONFIGURE_ARGS+=    --without-emf
PLIST_SUB+= EMF="@comment "
.endif

.if ${PORT_OPTIONS:MMING}
LIB_DEPENDS+=   ming:${PORTSDIR}/graphics/ming
PLIST_SUB+= MING=""
.else
CONFIGURE_ARGS+=    --without-swf
PLIST_SUB+= MING="@comment "
.endif

.if ${PORT_OPTIONS:MPLOTUTILS}
LIB_DEPENDS+=   plotter:${PORTSDIR}/graphics/plotutils
PLIST_SUB+= PLOTUTILS=""
.else
CONFIGURE_ARGS+=    --without-libplot
PLIST_SUB+= PLOTUTILS="@comment "
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|CXXFLAGS="-g"|CXXFLAGS="$$CXXFLAGS"|g ; \
         s|GraphicsMagick|Magick|g ; \
         s|=$$OLDCPPFLAGS|=$$CPPFLAGS|g ; \
         s|-pedantic||g' ${WRKSRC}/configure
    @${REINPLACE_CMD} -e 's|-ldl||g' ${WRKSRC}/src/Makefile.in

post-install:
    ${INSTALL_MAN} ${WRKSRC}/doc/${MAN1} ${MAN1PREFIX}/man/man1/

.if ${PORT_OPTIONS:MDOCS}
    @${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/doc/*.htm ${DOCSDIR}
.endif

.if ${PORT_OPTIONS:MEXAMPLES}
    @${MKDIR} ${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC}/examples/*.ps ${EXAMPLESDIR}
.endif

.include <bsd.port.mk>