aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/GraphicsMagick13/Makefile
blob: 5c0939ef32d9939d5f03c35158441e4b93de43c5 (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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# New ports collection makefile for:   GraphicsMagick
# Date created:        25 july 2005
# Whom:                Ron van Daal
#
# $FreeBSD$
#

PORTNAME=   GraphicsMagick
PORTVERSION=    1.3.16
PORTREVISION=   1
CATEGORIES= graphics
MASTER_SITES=   SF \
        ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/
MASTER_SITE_SUBDIR= ${PORTNAME:L}/${PORTNAME:L}/${PORTVERSION}
PORTSCOUT=  limit:^1\.3\.

MAINTAINER= glarkin@FreeBSD.org
COMMENT=    Fast image processing tools based on ImageMagick

CONFLICTS=  GraphicsMagick-1.[12].*

LIB_DEPENDS=    freetype:${PORTSDIR}/print/freetype2    \
        png15:${PORTSDIR}/graphics/png      \
        jbig:${PORTSDIR}/graphics/jbigkit   \
        xml2:${PORTSDIR}/textproc/libxml2
OTHERGRAPHICS=  jasper jpeg lcms tiff
LIB_DEPENDS+=   ${OTHERGRAPHICS:C|(.+)|\1:${PORTSDIR}/graphics/\1|}

OPTIONS_DEFINE= Q8BIT FPX OPENMP SSE TESTS X11 DOCS

Q8BIT_DESC= Use 8-bit pixels (speed) instead of 16 (quality)
DPS_DESC=   Enable Display Ghostscript support
NODPS_DESC= Disable Display Ghostscript support
TESTS_DESC= Run bundled self-tests after build

OPTIONS_DEFAULT=FPX DPS OPENMP X11 TESTS DOCS
OPTIONS_SINGLE= X11
OPTIONS_SINGLE_X11= DPS NODPS

USE_ICONV=  yes
USE_AUTOTOOLS=  libtool libltdl
USE_BZIP2=  yes
USE_GHOSTSCRIPT=yes
GNU_CONFIGURE=  yes

LATEST_LINK=    GraphicsMagick13

MAN1=   GraphicsMagick++-config.1 \
    GraphicsMagick-config.1 \
    GraphicsMagickWand-config.1 \
    gm.1
MAN4=   miff.4
MAN5=   quantize.5

CONFIGURE_ARGS= --without-perl --enable-shared --enable-static \
        --with-ltdl-include=${LOCALBASE}/include \
        --with-ltdl-lib=${LOCALBASE}/lib
USE_LDCONFIG=   yes

ALL_TARGET= -j`${SYSCTL} -n hw.ncpu`

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

test check:
    cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} check

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MDOCS} == ""
# Get rid of the Makefile targets that install the documentation
# and HTML files into DOCSDIR
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-Makefile.in
.endif

.if ${PORT_OPTIONS:MSSE}
.if ${MACHINE_CPU:Msse}
CFLAGS+=    -msse
.endif
.if ${MACHINE_CPU:Msse2}
CFLAGS+=    -msse2
.endif
.if ${MACHINE_CPU:Msse3}
CFLAGS+=    -msse3
.endif
.endif

.if ${PORT_OPTIONS:MFPX}
LIB_DEPENDS+=       fpx.[2-9]:${PORTSDIR}/graphics/libfpx
CONFIGURE_ARGS+=    --with-fpx
.else
CONFIGURE_ARGS+=    --without-fpx
.endif

.if ${PORT_OPTIONS:MDPS}
LIB_DEPENDS+=       dps:${PORTSDIR}/x11/dgs
CONFIGURE_ARGS+=    --with-dps
.else
CONFIGURE_ARGS+=    --without-dps
.endif

.if ${PORT_OPTIONS:MOPENMP}
.if ${OSVERSION} < 700042
IGNORE=     does not support OpenMP on FreeBSD version ${OSVERSION}
.endif

LDFLAGS+=       ${PTHREAD_LIBS}
CONFIGURE_ARGS+=    --with-threads --enable-openmp --disable-openmp-slow
.else
CONFIGURE_ARGS+=    --without-threads --disable-openmp
.endif

.ifndef WINDOWS_FONT_DIR
# Use fonts installed by x11-fonts/webfonts by default
WINDOWS_FONT_DIR=${LOCALBASE}/lib/X11/fonts/webfonts
.endif

.if defined(WITH_WINDOWS_FONT_DIR)
CONFIGURE_ARGS+=    --with-windows-font-dir="${WINDOWS_FONT_DIR}"
.endif

.if ${PORT_OPTIONS:MX11} == ""
PKGNAMESUFFIX+= -nox11
CONFIGURE_ARGS+=--without-x
LIB_DEPENDS+=   wmflite:${PORTSDIR}/graphics/libwmf-nox11
.else
LIB_DEPENDS+=   wmflite:${PORTSDIR}/graphics/libwmf
.endif

.if ${PORT_OPTIONS:MQ8BIT}
CONFIGURE_ARGS+=    --with-quantum-depth=8
PLIST_SUB+=     Q=8
.else
CONFIGURE_ARGS+=    --with-quantum-depth=16
PLIST_SUB+=     Q=16
.endif

.if ${PORT_OPTIONS:MTESTS}
post-build::    test
.else
post-build::
    #
    # You are strongly advised to run ``make test'' now
    # and report any failures to ${MAINTAINER}.
    #
.endif

.include <bsd.port.mk>