aboutsummaryrefslogblamecommitdiff
path: root/graphics/opencv/Makefile
blob: 310ea5d89e1a5f7c04406cf1eb8925a605e5a1a8 (plain) (tree)
1
2
3
4
5
6
7
8
9








                                                                            
                     
                 
                        
                                                           
 

                                                              
 

                                                                                       


                                                                     
                          
                   


                                                           
                                                                 

                                                                     
                                                



                                                    

          








                                                           








                                                                      
 
                          
 
                     




























                                                      


                                      


































                                                     
 





                                                                     
 
                           
# 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
PORTREVISION=	5
CATEGORIES=	graphics
MASTER_SITES=	SF/${PORTNAME}library/${PORTNAME}-linux/1.0

MAINTAINER=	villa.alberto@gmail.com
COMMENT=	Open Source Computer Vision library from Intel

BUILD_DEPENDS=	${LOCALBASE}/include/linux/videodev.h:${PORTSDIR}/multimedia/v4l_compat

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

NOT_FOR_ARCHS=	sparc64
NOT_FOR_ARCHS_REASON_sparc64=	does not compile on sparc64

OPTIONS=	DEBUG "Build debugging symbols" off \
		DEMO "Build demo apps" off \
		FFMPEG "Enable FFMPEG support" off \
		GTK "Enable GTK+-2.0 support" off \
		PYTHON "Enable PYTHON support" off \
		XINE "Enable XINE support" 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_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${LOCALBASE}/include
CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/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

pre-configure:
	@${REINPLACE_CMD} -e 's/-pthread/-pthread|${PTHREAD_LIBS}/' \
		${WRKSRC}/autotools/ltmain.sh
	@${REINPLACE_CMD} -e 's/-lpthread/${PTHREAD_LIBS}/g' \
		${WRKSRC}/configure \
		${WRKSRC}/Makefile.*

.include <bsd.port.post.mk>