aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/opencv/Makefile
blob: a28e4c5d59add6faf5504648e802f49baac79a8e (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
# New ports collection makefile for:   opencv - open source computer vision
# library from Intel
# Date created:                05 March 2005
# Whom:                        Marc Abramowitz (http://marc.abramowitz.info)
#
# $FreeBSD$
#

PORTNAME=   opencv
PORTVERSION=    1.0.0
CATEGORIES= graphics
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= opencvlibrary

MAINTAINER= msabramo@yahoo.com
COMMENT=    Open Source Computer Vision Library from Intel

CFLAGS+=    -I${LOCALBASE}/include/OpenEXR
CPPFLAGS+=  -I${LOCALBASE}/include -I${LOCALBASE}/include/OpenEXR
LDFLAGS+=   -L${LOCALBASE}/lib
USE_AUTOTOOLS=  libtool:15
USE_GMAKE=  yes
USE_LDCONFIG=   yes
GNU_CONFIGURE=  yes
CONFIGURE_ENV=  CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
CONFIGURE_ARGS= --without-v4l --without-quicktime --without-carbon \
                --without-1394libs \
                --without-swig # I don't know anything about swig ...
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
LIB_DEPENDS+=   jpeg:${PORTSDIR}/graphics/jpeg \
                png:${PORTSDIR}/graphics/png \
                tiff:${PORTSDIR}/graphics/tiff \
                jasper:${PORTSDIR}/graphics/jasper \
                IlmImf:${PORTSDIR}/graphics/OpenEXR
USE_GNOME=

OPTIONS=    GTK "Enable GTK+-2.0 support" Off \
            XINE "Enable XINE support" Off \
            FFMPEG "Enable FFMPEG support" Off \
            PYTHON "Enable PYTHON support" Off \
            DEBUG "Build debugging symbols" Off \
            DEMO "Build demo apps" Off
# XXX:
# I cannot disable the following features if they have been installed,
# thus they should be enable now ...
#
#           JPEG "Enable JPEG support" On \
#           PNG "Enable PNG support" On \
#           TIFF "Enable TIFF support" On \
#           JASPER "Enable JASPER support" Off \
#           OPENEXR "Enable OpenEXR support" Off \

.include <bsd.port.pre.mk>

.if defined(WITH_GTK)
USE_XLIB=   yes
USE_GNOME=  gtk20
CONFIGURE_ARGS+=--with-gtk
.else
CONFIGURE_ARGS+=--without-gtk
.endif

#.if !defined(WITHOUT_JPEG)
#LIB_DEPENDS+=  jpeg:${PORTSDIR}/graphics/jpeg
#.endif
#
#.if !defined(WITHOUT_PNG)
#LIB_DEPENDS+=  png:${PORTSDIR}/graphics/png
#.endif
#
#.if !defined(WITHOUT_TIFF)
#LIB_DEPENDS+=  tiff:${PORTSDIR}/graphics/tiff
#.endif
#
#.if defined(WITH_JASPER)
#LIB_DEPENDS+=  jasper:${PORTSDIR}/graphics/jasper
#.endif
#
#.if defined(WITH_OPENEXR)
#LIB_DEPENDS+=  libIlmImf:${PORTSDIR}/graphics/OpenEXR
#CFLAGS+=   -I${LOCALBASE}/include/OpenEXR
#CPPFLAGS+= -I${LOCALBASE}/include/OpenEXR
#.endif

.if defined(WITH_XINE)
CFLAGS+=    -I${X11BASE}/include
CPPFLAGS+=  -I${X11BASE}/include
LDFLAGS+=   -L${X11BASE}/lib
LIB_DEPENDS+=   xine:${PORTSDIR}/multimedia/libxine
CONFIGURE_ARGS+=--with-xine
.else
CONFIGURE_ARGS+=--without-xine
.endif

.if defined(WITH_FFMPEG)
LIB_DEPENDS+=   avcodec:${PORTSDIR}/multimedia/ffmpeg
CONFIGURE_ARGS+=--with-ffmpeg
.else
CONFIGURE_ARGS+=--without-ffmpeg
.endif

.if defined(WITH_PYTHON)
USE_PYTHON= yes
CONFIGURE_ARGS+=--with-python
PLIST_SUB+= PYTHON=""
.else
CONFIGURE_ARGS+=--without-python
PLIST_SUB+= PYTHON="@comment "
.endif

.if defined(WITH_DEBUG)
CONFIGURE_ARGS+=--enable-debug
.else
CONFIGURE_ARGS+=--disable-debug
.endif

.if defined(WITH_DEMO)
CONFIGURE_ARGS+=--enable-apps
PLIST_SUB+= DEMO=""
.else
CONFIGURE_ARGS+=--disable-apps
PLIST_SUB+= DEMO="@comment "
.endif

.include <bsd.port.post.mk>