2013-09-20 20:35:44 +02:00
|
|
|
# Created by: cartola (Carlos E. G. Carvalho)
|
2004-12-15 13:36:25 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= vigra
|
2014-05-05 20:45:43 +02:00
|
|
|
DISTVERSION= 1.10.0
|
2014-12-25 21:54:41 +01:00
|
|
|
PORTREVISION= 4
|
2004-12-15 13:36:25 +01:00
|
|
|
CATEGORIES= graphics
|
2014-05-05 20:45:43 +02:00
|
|
|
DISTNAME= ${PORTNAME}-${PORTVERSION}-src-with-docu
|
2004-12-15 13:36:25 +01:00
|
|
|
|
2012-06-09 15:08:32 +02:00
|
|
|
MAINTAINER= fluffy@FreeBSD.org
|
2004-12-15 13:36:25 +01:00
|
|
|
COMMENT= VIGRA stands for "Vision with Generic Algorithms"
|
|
|
|
|
2012-11-23 16:10:16 +01:00
|
|
|
LICENSE= MIT
|
|
|
|
|
2014-05-05 20:45:43 +02:00
|
|
|
USE_GITHUB=
|
|
|
|
GH_ACCOUNT= ukoethe
|
|
|
|
GH_COMMIT= e6c21f3
|
|
|
|
GH_TAGNAME= ${GH_COMMIT}
|
|
|
|
FETCH_ARGS?= -Fpr
|
|
|
|
|
|
|
|
WRKSRC= ${WRKDIR}/ukoethe-${PORTNAME}-${GH_COMMIT}
|
2011-06-29 09:42:36 +02:00
|
|
|
|
2013-03-22 21:06:14 +01:00
|
|
|
USES= cmake
|
2011-06-29 09:42:36 +02:00
|
|
|
CMAKE_ARGS= -DDEPENDENCY_SEARCH_PREFIX:PATH=${LOCALBASE} \
|
2012-11-23 16:10:16 +01:00
|
|
|
-DDOCINSTALL:PATH=${DOCSDIR_REL}
|
2004-12-15 13:36:25 +01:00
|
|
|
|
2007-05-01 17:52:25 +02:00
|
|
|
USE_LDCONFIG= yes
|
2004-12-15 13:36:25 +01:00
|
|
|
|
2014-07-16 01:30:05 +02:00
|
|
|
OPTIONS_DEFINE= HDF5 OPENEXR NUMPY DOCS
|
2012-11-23 16:10:16 +01:00
|
|
|
OPTIONS_DEFAULT= HDF5 OPENEXR
|
2014-05-05 20:45:43 +02:00
|
|
|
NUMPY_DESC= NumPy mathematical computing (USE Fortran/GCC47+)
|
2012-11-23 03:27:09 +01:00
|
|
|
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
2012-11-23 16:10:16 +01:00
|
|
|
.if ${PORT_OPTIONS:MHDF5}
|
|
|
|
CMAKE_ARGS+= -DWITH_HDF5=1
|
2014-05-03 02:55:30 +02:00
|
|
|
LIB_DEPENDS+= libhdf5.so:${PORTSDIR}/science/hdf5
|
2012-11-23 16:10:16 +01:00
|
|
|
.else
|
|
|
|
CMAKE_ARGS+= -DWITH_HDF5=0
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MOPENEXR}
|
|
|
|
CMAKE_ARGS+= -DWITH_OPENEXR=1
|
2013-12-12 14:01:40 +01:00
|
|
|
LIB_DEPENDS+= libIlmImf.so:${PORTSDIR}/graphics/OpenEXR
|
2012-11-23 16:10:16 +01:00
|
|
|
.else
|
|
|
|
CMAKE_ARGS+= -DWITH_OPENEXR=0
|
|
|
|
.endif
|
|
|
|
|
2013-03-13 14:53:29 +01:00
|
|
|
.if ${PORT_OPTIONS:MNUMPY}
|
2014-05-05 20:45:43 +02:00
|
|
|
# Should ignore Python3 since commit f51b0b5
|
|
|
|
#CONFLICTS_BUILD= python3*
|
2012-11-23 16:10:16 +01:00
|
|
|
CMAKE_ARGS+= -DWITH_VIGRANUMPY=1
|
2014-10-21 18:36:12 +02:00
|
|
|
USES+= compiler:gcc-c++11-lib python:2
|
2012-11-23 16:10:16 +01:00
|
|
|
BUILD_DEPENDS+= nosetests:${PORTSDIR}/devel/py-nose
|
|
|
|
BUILD_DEPENDS+= ${PYTHON_SITELIBDIR}/numpy/core/numeric.py:${PORTSDIR}/math/py-numpy
|
|
|
|
#BUILD_DEPENDS+= sphinx-build:${PORTSDIR}/textproc/py-sphinx
|
2014-05-03 02:55:30 +02:00
|
|
|
LIB_DEPENDS+= libboost_python.so:${PORTSDIR}/devel/boost-python-libs
|
2012-11-23 16:10:16 +01:00
|
|
|
RUN_DEPENDS:= ${BUILD_DEPENDS}
|
|
|
|
PLIST_SUB+= PYTHON=""
|
2012-11-23 03:27:09 +01:00
|
|
|
.else
|
|
|
|
CMAKE_ARGS+= -DWITH_VIGRANUMPY=0
|
2012-11-23 16:10:16 +01:00
|
|
|
PLIST_SUB+= PYTHON="@comment "
|
2012-11-23 03:27:09 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2011-06-29 09:42:36 +02:00
|
|
|
# Vigra's CMakeLists.txt does not support disabling those so we hook them
|
|
|
|
# as dependencies here unconditionally (without OPTIONS=) even though if
|
|
|
|
# they are not present then Vigra/CMake will do without them (they are not
|
|
|
|
# mandatory).
|
|
|
|
#
|
|
|
|
# Notice that if you define e.g. WITHOUT_VIGRA_TIFF and graphics/tiff is
|
|
|
|
# installed on your system, then the lib will be picked up by Vigra, the
|
|
|
|
# dependency will not be recorded by the ports system and later deletion
|
|
|
|
# of graphics/tiff will break Vigra. Only define WITHOUT_VIGRA_TIFF if you
|
|
|
|
# do not have graphics/tiff installed and do not want TIFF support in Vigra.
|
|
|
|
|
2006-06-17 21:47:58 +02:00
|
|
|
.if !defined(WITHOUT_VIGRA_TIFF)
|
2013-12-12 14:01:40 +01:00
|
|
|
LIB_DEPENDS+= libtiff.so:${PORTSDIR}/graphics/tiff
|
2006-06-17 21:47:58 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(WITHOUT_VIGRA_JPEG)
|
2013-12-12 14:01:40 +01:00
|
|
|
LIB_DEPENDS+= libjpeg.so:${PORTSDIR}/graphics/jpeg
|
2006-06-17 21:47:58 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(WITHOUT_VIGRA_PNG)
|
2014-12-25 20:04:25 +01:00
|
|
|
LIB_DEPENDS+= libpng.so:${PORTSDIR}/graphics/png
|
2006-06-17 21:47:58 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(WITHOUT_VIGRA_FFTW)
|
2013-12-12 14:01:40 +01:00
|
|
|
LIB_DEPENDS+= libfftw3.so:${PORTSDIR}/math/fftw3
|
|
|
|
LIB_DEPENDS+= libfftw3f.so:${PORTSDIR}/math/fftw3-float
|
2012-06-08 15:45:00 +02:00
|
|
|
.endif
|
|
|
|
|
2013-03-13 14:53:29 +01:00
|
|
|
pre-everything::
|
|
|
|
.if ${PORT_OPTIONS:MNUMPY}
|
|
|
|
@${ECHO} ""
|
|
|
|
@${ECHO} "* BEWARE!"
|
2014-05-05 20:45:43 +02:00
|
|
|
@${ECHO} "* Using py-NumPY implies Fortran and GCC 4.7+ as hard dependencies"
|
2013-08-17 18:27:24 +02:00
|
|
|
@${ECHO} "* and require all ports, depending on vigra, to set USE_GCC=yes"
|
2013-03-13 14:53:29 +01:00
|
|
|
@${ECHO} ""
|
|
|
|
.endif
|
|
|
|
|
2012-06-08 15:45:00 +02:00
|
|
|
post-patch:
|
|
|
|
# FIXME: This is ugly
|
|
|
|
@${RM} ${WRKSRC}/include/vigra/*.orig
|
|
|
|
|
2012-11-23 03:27:09 +01:00
|
|
|
.include <bsd.port.post.mk>
|