aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortcberner <tcberner@FreeBSD.org>2018-01-03 00:49:24 +0800
committertcberner <tcberner@FreeBSD.org>2018-01-03 00:49:24 +0800
commit98f12cd71d8be47f727a159669046065aff7fb2b (patch)
treefefd75a0b797bfd5f2fbecc832b9a94f740ee983
parent2e5f9718524f65806c04f8377358291676d5450b (diff)
downloadfreebsd-ports-gnome-98f12cd71d8be47f727a159669046065aff7fb2b.tar.gz
freebsd-ports-gnome-98f12cd71d8be47f727a159669046065aff7fb2b.tar.zst
freebsd-ports-gnome-98f12cd71d8be47f727a159669046065aff7fb2b.zip
New USES=eigen
Usage: USES=eigen:<version>[,<type>] version: 2 or 3 (required) type: build (default), run For example: USES=eigen:2,build,run will add a BUILD- and RUN_DEPENDS on math/eigen2, and USES=eigen:3 will add a BUILD_DEPENDS on math/eigen3. * Convert the existing ports to use it - biology/iqtree: remove run time dependency (seemed not to be needed) - graphics/movit: remove run time dependency (seemed not to be needed) - science/avogadro: add run time dependeny (installed cmake file requires it to be present) Reviewed by: rakuco, mat Differential Revision: https://reviews.freebsd.org/D13702
-rw-r--r--CHANGES17
-rw-r--r--Mk/Uses/eigen.mk55
-rw-r--r--astro/kstars/Makefile5
-rw-r--r--audio/csound6/Makefile3
-rw-r--r--biology/iqtree/Makefile7
-rw-r--r--cad/freecad/Makefile5
-rw-r--r--cad/openscad/Makefile3
-rw-r--r--deskutils/kdeplasma-addons/Makefile4
-rw-r--r--editors/calligra/Makefile5
-rw-r--r--games/xptools/Makefile3
-rw-r--r--graphics/code-eli/Makefile4
-rw-r--r--graphics/colmap/Makefile3
-rw-r--r--graphics/digikam-kde4/Makefile3
-rw-r--r--graphics/krita/Makefile3
-rw-r--r--graphics/mitsuba/Makefile3
-rw-r--r--graphics/movit/Makefile5
-rw-r--r--graphics/opencv/Makefile2
-rw-r--r--math/ceres-solver/Makefile3
-rw-r--r--math/cgal/Makefile5
-rw-r--r--math/libmesh/Makefile3
-rw-r--r--net-mgmt/metronome/Makefile3
-rw-r--r--science/avogadro/Makefile7
-rw-r--r--science/gnudatalanguage/Makefile2
-rw-r--r--science/kalzium/Makefile6
-rw-r--r--science/openbabel/Makefile4
-rw-r--r--science/step/Makefile3
26 files changed, 106 insertions, 60 deletions
diff --git a/CHANGES b/CHANGES
index d1c633cc27a2..7cd329941000 100644
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,23 @@ in the release notes and/or placed into UPDATING.
All ports committers are allowed to commit to this file.
+20180102:
+AUTHOR: kde@FreeBSD.org
+
+ There is a new USES=eigen to depend on math/eigen[23].
+
+ Usage:
+ USES=eigen:<version>[,<type>]
+
+ version: 2 or 3 (required)
+ type: build (default), run
+
+ For example:
+ USES=eigen:2,build,run
+ will add a BUILD- and RUN_DEPENDS on math/eigen2, and
+ USES=eigen:3
+ will add a BUILD_DEPENDS on math/eigen3.
+
20171231:
AUTHOR: kde@FreeBSD.org
diff --git a/Mk/Uses/eigen.mk b/Mk/Uses/eigen.mk
new file mode 100644
index 000000000000..73ce0055fa2b
--- /dev/null
+++ b/Mk/Uses/eigen.mk
@@ -0,0 +1,55 @@
+# $FreeBSD$
+#
+# Handle dependency on eigen
+#
+# Feature: eigen
+# Usage: USES=eigen:ARGS
+# Valid ARGS: <version>,[build,run]
+#
+# version The chooseable versions are 2 and 3.
+# USES=eigen:2 # Use eigen 2.x
+# USES=eigen:3 # Use eigen 3.x
+#
+# build Add build depends [default]
+# run Add run depends
+#
+# MAINTAINER: kde@FreeBSD.org
+#
+
+.if ! defined(_INCLUDE_USES_EIGEN_MK)
+_INCLUDE_USES_EIGEN_MK= YES
+
+_EIGEN_SUPPORTED= 2 3
+
+_eigen_version= #
+. for _ver in ${_EIGEN_SUPPORTED:O:u}
+. if ${eigen_ARGS:M${_ver}}
+. if empty(_eigen_version)
+_eigen_version= ${_ver}
+. else
+IGNORE= Incorrect USES=eigen:${eigen_ARGS} - multiple versions defined
+. endif
+. endif
+. endfor
+
+. if empty(_eigen_version)
+IGNORE= Incorrect USES=eigen:${eigen_ARGS} - no version defined
+. endif
+
+# Export the version of the chosen eigen port
+_EIGEN_PORT= math/eigen${_eigen_version}
+_EIGEN_PATH= ${LOCALBASE}/libdata/pkgconfig/eigen${_eigen_version}.pc
+_EIGEN_DEP= ${_EIGEN_PATH}:${_EIGEN_PORT}
+
+# Append the correct BUILD-/RUN_DEPENDS
+. if empty(eigen_ARGS:Mbuild) && empty(eigen_ARGS:Mrun)
+eigen_ARGS+= build
+. endif
+. if ! empty(eigen_ARGS:Mbuild)
+BUILD_DEPENDS+= ${_EIGEN_DEP}
+. endif
+. if ! empty(eigen_ARGS:Mrun)
+RUN_DEPENDS+= ${_EIGEN_DEP}
+. endif
+
+.endif
diff --git a/astro/kstars/Makefile b/astro/kstars/Makefile
index 171aaa110333..4eb0d7f7ab09 100644
--- a/astro/kstars/Makefile
+++ b/astro/kstars/Makefile
@@ -10,11 +10,10 @@ COMMENT= KDE 4 desktop planetarium
LIB_DEPENDS= libcfitsio.so:astro/cfitsio \
libwcs.so:astro/wcslib
-BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/eigen3.pc:math/eigen3 \
- xplanet:astro/xplanet
+BUILD_DEPENDS= xplanet:astro/xplanet
RUN_DEPENDS= xplanet:astro/xplanet
-USES= cmake:outsource compiler:c++11-lib kde:4 tar:xz
+USES= cmake:outsource compiler:c++11-lib eigen:3 kde:4 tar:xz
USE_KDE= kdelibs automoc4
USE_QT4= opengl qmake_build moc_build rcc_build uic_build
diff --git a/audio/csound6/Makefile b/audio/csound6/Makefile
index 176cad0b1d9b..a4ddaaaa0233 100644
--- a/audio/csound6/Makefile
+++ b/audio/csound6/Makefile
@@ -18,12 +18,11 @@ LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= boost-libs>0:devel/boost-libs \
swig3.0:devel/swig30 \
- eigen>0:math/eigen3 \
gmm++>0:math/gmm++
LIB_DEPENDS= libsamplerate.so:audio/libsamplerate \
libsndfile.so:audio/libsndfile
-USES= alias bison cmake:outsource,noninja localbase python:2
+USES= alias bison cmake:outsource,noninja eigen:3 localbase python:2
# math/gmm++ requires c++11
USE_CXXSTD= c++11
CMAKE_ARGS= -DBUILD_CSOUNDVST:BOOL=OFF \
diff --git a/biology/iqtree/Makefile b/biology/iqtree/Makefile
index f0216237b428..4fcfd325cd5c 100644
--- a/biology/iqtree/Makefile
+++ b/biology/iqtree/Makefile
@@ -3,7 +3,7 @@
PORTNAME= iqtree
DISTVERSIONPREFIX= v
DISTVERSION= 1.6.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= biology
MAINTAINER= jrm@FreeBSD.org
@@ -16,10 +16,7 @@ BROKEN_aarch64= fails to compile: unrecognized command line option '-msse3'
BROKEN_armv6= fails to compile: unrecognized command line options '-m32' and '-msse3'
BROKEN_armv7= fails to compile: unrecognized command line options '-m32' and '-msse3'
-BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/eigen3.pc:math/eigen3
-RUN_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/eigen3.pc:math/eigen3
-
-USES= cmake compiler:openmp
+USES= cmake compiler:openmp eigen:3
USE_GITHUB= yes
GH_ACCOUNT= Cibiv
GH_PROJECT= IQ-TREE
diff --git a/cad/freecad/Makefile b/cad/freecad/Makefile
index e74dfdc0955f..f749702a0085 100644
--- a/cad/freecad/Makefile
+++ b/cad/freecad/Makefile
@@ -11,8 +11,7 @@ LICENSE= LGPL20+
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= pyside-rcc:devel/pyside-tools \
- swig3.0:devel/swig30 \
- ${LOCALBASE}/libdata/pkgconfig/eigen3.pc:math/eigen3
+ swig3.0:devel/swig30
LIB_DEPENDS= libexpat.so:textproc/expat2 \
libfreetype.so:print/freetype2 \
libboost_python.so:devel/boost-python-libs \
@@ -31,7 +30,7 @@ LIB_DEPENDS= libexpat.so:textproc/expat2 \
libhdf5.so:science/hdf5
RUN_DEPENDS= pivy>0:graphics/py-pivy@${PY_FLAVOR}
-USES= dos2unix compiler:c++11-lib cmake:outsource fortran jpeg \
+USES= dos2unix compiler:c++11-lib cmake:outsource eigen:3 fortran jpeg \
python:2.7 localbase
USE_XORG= ice sm x11 xext xt
USE_GL= gl glu
diff --git a/cad/openscad/Makefile b/cad/openscad/Makefile
index 4c597ba6b746..0542eebfe20f 100644
--- a/cad/openscad/Makefile
+++ b/cad/openscad/Makefile
@@ -15,7 +15,6 @@ LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= ${LOCALBASE}/bin/flex:textproc/flex \
- ${LOCALBASE}/libdata/pkgconfig/eigen3.pc:math/eigen3 \
${LOCALBASE}/include/boost/tuple/tuple.hpp:devel/boost-libs
LIB_DEPENDS= libgmp.so:math/gmp \
libmpfr.so:math/mpfr \
@@ -24,7 +23,7 @@ LIB_DEPENDS= libgmp.so:math/gmp \
libharfbuzz.so:print/harfbuzz \
libopencsg.so:graphics/opencsg
-USES= bison compiler:c++11-lang desktop-file-utils gettext-tools pkgconfig qmake shebangfix
+USES= bison compiler:c++11-lang desktop-file-utils eigen:3 gettext-tools pkgconfig qmake shebangfix
SHEBANG_FILES= libraries/MCAD/get_submodules.py
USE_GL= glu glew
USE_QT4= corelib gui opengl moc_build uic_build rcc_build
diff --git a/deskutils/kdeplasma-addons/Makefile b/deskutils/kdeplasma-addons/Makefile
index 1709f3371d4f..29166a5740bc 100644
--- a/deskutils/kdeplasma-addons/Makefile
+++ b/deskutils/kdeplasma-addons/Makefile
@@ -13,11 +13,9 @@ LIB_DEPENDS= libqalculate.so:math/libqalculate \
libqca.so:devel/qca \
libqoauth.so:net/qoauth \
libqjson.so:devel/qjson
-BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/eigen2.pc:math/eigen2
-
CONFLICTS_INSTALL= plasma-applet-icontasks-0.[89].*
-USES= cmake:outsource kde:4 pkgconfig shared-mime-info tar:xz
+USES= cmake:outsource eigen:2 kde:4 pkgconfig shared-mime-info tar:xz
USE_KDE= kdelibs libkexiv2 pimlibs workspace \
akonadi attica automoc4 qimageblitz soprano
USE_QT4= corelib dbus declarative gui network script sql webkit \
diff --git a/editors/calligra/Makefile b/editors/calligra/Makefile
index 357d0e0ca2c9..2428dd5147e1 100644
--- a/editors/calligra/Makefile
+++ b/editors/calligra/Makefile
@@ -37,11 +37,10 @@ LIB_DEPENDS= libImath-2_2.so:graphics/ilmbase \
libwpg-0.3.so:graphics/libwpg03 \
libwps-0.3.so:textproc/libwps03
-BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/eigen3.pc:math/eigen3 \
- pstoedit:graphics/pstoedit
+BUILD_DEPENDS= pstoedit:graphics/pstoedit
RUN_DEPENDS= pstoedit:graphics/pstoedit
-USES= cmake:outsource cpe compiler:c++11-lib desktop-file-utils \
+USES= cmake:outsource cpe compiler:c++11-lib desktop-file-utils eigen:3 \
gettext iconv:translit jpeg kde:5 localbase:ldflags perl5 pkgconfig \
shared-mime-info sqlite tar:xz
USE_KDE= activities archive auth bookmarks codecs completion config \
diff --git a/games/xptools/Makefile b/games/xptools/Makefile
index 2988a867666c..25dd605591a0 100644
--- a/games/xptools/Makefile
+++ b/games/xptools/Makefile
@@ -14,7 +14,6 @@ LICENSE= MIT
ONLY_FOR_ARCHS= amd64
BUILD_DEPENDS= gnustat:sysutils/coreutils \
- ${LOCALBASE}/libdata/pkgconfig/eigen3.pc:math/eigen3 \
${LOCALBASE}/lib/libntl.a:math/ntl \
cmake:devel/cmake
LIB_DEPENDS= libboost_system.so:devel/boost-libs \
@@ -34,7 +33,7 @@ LIB_DEPENDS= libboost_system.so:devel/boost-libs \
libGLw.so:graphics/libGLw \
libGLU.so:graphics/libGLU
-USES= gmake jpeg sqlite ssl
+USES= eigen:3 gmake jpeg sqlite ssl
USE_GITHUB= yes
GH_ACCOUNT= X-Plane
diff --git a/graphics/code-eli/Makefile b/graphics/code-eli/Makefile
index 10fdc146cf05..5d63e954e35c 100644
--- a/graphics/code-eli/Makefile
+++ b/graphics/code-eli/Makefile
@@ -14,13 +14,11 @@ LICENSE_FILE= ${WRKSRC}/LICENSE.txt
BROKEN= Needs work to use math/eigen3 currently in ports
-BUILD_DEPENDS= eigen>3:math/eigen3
-
USE_GITHUB= yes
GH_PROJECT= Code-Eli
GH_ACCOUNT= ddmarshall
-USES= cmake:outsource compiler:c++11-lib
+USES= cmake:outsource compiler:c++11-lib eigen:3
PORTEXAMPLES= AirfoilFitExample VSPPodExample test
ALL_TARGET= all
diff --git a/graphics/colmap/Makefile b/graphics/colmap/Makefile
index 89443b2a5a27..153e1b212156 100644
--- a/graphics/colmap/Makefile
+++ b/graphics/colmap/Makefile
@@ -18,13 +18,12 @@ LICENSE_FILE_MIT= ${WRKSRC}/src/ext/PoissonRecon/LICENSE
LICENSE_FILE_SIFTGPU= ${WRKSRC}/src/ext/SiftGPU/LICENSE
LICENSE_PERMS_SIFTGPU= dist-mirror pkg-mirror auto-accept
-BUILD_DEPENDS= eigen>=3:math/eigen3
LIB_DEPENDS= libboost_filesystem.so:devel/boost-libs \
libglog.so:devel/glog \
libfreeimage.so:graphics/freeimage \
libceres.so:math/ceres-solver
-USES= cmake compiler:${OPENMP}c++11-lib fortran localbase sqlite
+USES= cmake compiler:${OPENMP}c++11-lib eigen:3 fortran localbase sqlite
USE_GITHUB= yes
USE_GL= gl glew
USE_QT5= qmake_build buildtools_build core gui opengl_build widgets
diff --git a/graphics/digikam-kde4/Makefile b/graphics/digikam-kde4/Makefile
index ba4d6efa77f8..38d42a7b3c33 100644
--- a/graphics/digikam-kde4/Makefile
+++ b/graphics/digikam-kde4/Makefile
@@ -12,7 +12,6 @@ COMMENT= KDE4 digital photo management application
.include "${.CURDIR}/Makefile.common"
-BUILD_DEPENDS= ${LOCALBASE}/include/eigen3/Eigen/Eigen:math/eigen3
LIB_DEPENDS= libtiff.so:graphics/tiff \
liblcms.so:graphics/lcms \
libpng.so:graphics/png \
@@ -24,7 +23,7 @@ LIB_DEPENDS= libtiff.so:graphics/tiff \
libkgeomap.so:astro/libkgeomap \
libboost_graph.so:devel/boost-libs
-USES+= pkgconfig shebangfix
+USES+= eigen:3 pkgconfig shebangfix
USE_KDE+= libkdcraw libkexiv2 libkipi runtime_run
USE_QT4+= sql-sqlite3_run
USE_LDCONFIG= yes
diff --git a/graphics/krita/Makefile b/graphics/krita/Makefile
index b7371e701345..8ee31fbdf93a 100644
--- a/graphics/krita/Makefile
+++ b/graphics/krita/Makefile
@@ -13,7 +13,6 @@ COMMENT= Sketching and painting program
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
-BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/eigen3.pc:math/eigen3
LIB_DEPENDS= libImath.so:graphics/ilmbase \
libOpenColorIO.so:graphics/opencolorio \
libX11.so:x11/libX11 \
@@ -31,7 +30,7 @@ LIB_DEPENDS= libImath.so:graphics/ilmbase \
libxcb-util.so:x11/xcb-util
USES= cmake:outsource compiler:c++11-lib desktop-file-utils \
- gettext jpeg kde:5
+ eigen:3 gettext jpeg kde:5
USE_KDE= archive completion config coreaddons crash guiaddons i18n \
itemmodels itemviews kio service widgetsaddons windowsystem
USE_QT5= buildtools_build concurrent core dbus gui network printsupport \
diff --git a/graphics/mitsuba/Makefile b/graphics/mitsuba/Makefile
index 1ea84aa17d5f..c34807ffe3e8 100644
--- a/graphics/mitsuba/Makefile
+++ b/graphics/mitsuba/Makefile
@@ -15,7 +15,6 @@ LICENSE= GPLv3
BROKEN= fails to build with boost 1.65, see bug 220719
-BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/eigen3.pc:math/eigen3
LIB_DEPENDS= libboost_system.so:devel/boost-libs \
libpng.so:graphics/png \
libIlmImf.so:graphics/OpenEXR \
@@ -25,7 +24,7 @@ LIB_DEPENDS= libboost_system.so:devel/boost-libs \
ONLY_FOR_ARCHS= i386 amd64
ONLY_FOR_ARCHS_REASON= uses SSE instructions
-USES= cmake jpeg tar:bzip2
+USES= cmake eigen:3 jpeg tar:bzip2
USE_GL= glew
USE_QT4= moc_build qmake_build rcc_build uic_build \
gui opengl network xml xmlpatterns
diff --git a/graphics/movit/Makefile b/graphics/movit/Makefile
index 70583681be9f..d74ce2f9b37d 100644
--- a/graphics/movit/Makefile
+++ b/graphics/movit/Makefile
@@ -2,6 +2,7 @@
PORTNAME= movit
PORTVERSION= 1.4.0
+PORTREVISION= 1
CATEGORIES= graphics
MASTER_SITES= http://${PORTNAME}.sesse.net/
@@ -12,10 +13,8 @@ LICENSE= GPLv2+
LIB_DEPENDS= libepoxy.so:graphics/libepoxy \
libfftw3.so:math/fftw3
-BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/eigen3.pc:math/eigen3
-RUN_DEPENDS:= ${BUILD_DEPENDS}
-USES= autoreconf gmake libtool pathfix pkgconfig
+USES= autoreconf gmake eigen:3 libtool pathfix pkgconfig
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
diff --git a/graphics/opencv/Makefile b/graphics/opencv/Makefile
index 32c572e28ed0..0f5d50891ce3 100644
--- a/graphics/opencv/Makefile
+++ b/graphics/opencv/Makefile
@@ -65,7 +65,7 @@ DC1394_LIB_DEPENDS= libdc1394.so:multimedia/libdc1394
DC1394_CMAKE_BOOL= WITH_1394
EIGEN3_DESC= Eigen 3 support
-EIGEN3_BUILD_DEPENDS= ${LOCALBASE}/include/eigen3/Eigen/Eigen:math/eigen3
+EIGEN3_USES= eigen:3
EIGEN3_CMAKE_BOOL= WITH_EIGEN
. if !defined(OCV_SLAVE)
diff --git a/math/ceres-solver/Makefile b/math/ceres-solver/Makefile
index 9c8909e64d17..69197b21c7e1 100644
--- a/math/ceres-solver/Makefile
+++ b/math/ceres-solver/Makefile
@@ -14,11 +14,10 @@ COMMENT= Nonlinear least squares minimizer
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
-BUILD_DEPENDS= eigen>=3.2.2:math/eigen3
LIB_DEPENDS= libglog.so:devel/glog
RUN_DEPENDS:= ${BUILD_DEPENDS:Meigen*}
-USES= cmake:outsource compiler:${OPENMP}c++11-lib localbase shebangfix
+USES= cmake:outsource compiler:${OPENMP}c++11-lib eigen:3 localbase shebangfix
USE_GITHUB= yes
USE_LDCONFIG= yes
SHEBANG_FILES= examples/slam/pose_graph_*/plot_results.py \
diff --git a/math/cgal/Makefile b/math/cgal/Makefile
index b81bd341b65c..a5f7b56e1d71 100644
--- a/math/cgal/Makefile
+++ b/math/cgal/Makefile
@@ -16,8 +16,7 @@ LICENSE_COMB= multi
BROKEN_sparc64= does not build: fails to compile all_files.cpp
-BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/eigen3.pc:math/eigen3 \
- ${LOCALBASE}/lib/libntl.a:math/ntl
+BUILD_DEPENDS= ${LOCALBASE}/lib/libntl.a:math/ntl
LIB_DEPENDS= libboost_system.so:devel/boost-libs \
libmpfr.so:math/mpfr \
libgmp.so:math/gmp
@@ -25,7 +24,7 @@ LIB_DEPENDS= libboost_system.so:devel/boost-libs \
#TODO math/mpfi, math/rs, graphics/qglviewer
#Not yet in ports
-USES= cmake shebangfix tar:xz
+USES= cmake eigen:3 shebangfix tar:xz
USE_LDCONFIG= yes
SHEBANG_FILES= scripts/cgal_create_CMakeLists \
scripts/cgal_create_cmake_script
diff --git a/math/libmesh/Makefile b/math/libmesh/Makefile
index 5ccc8aad4759..a022063d65a6 100644
--- a/math/libmesh/Makefile
+++ b/math/libmesh/Makefile
@@ -12,10 +12,9 @@ COMMENT= Numerical simulation of partial differential equations
LICENSE= LGPL21
LICENSE_FILE= ${WRKSRC}/COPYING
-BUILD_DEPENDS= eigen>0:math/eigen3
LIB_DEPENDS= libboost_system.so:devel/boost-libs
-USES= autoreconf gmake libtool
+USES= autoreconf eigen:3 gmake libtool
GNU_CONFIGURE= yes
USE_GITHUB= yes
GH_ACCOUNT= libMesh
diff --git a/net-mgmt/metronome/Makefile b/net-mgmt/metronome/Makefile
index 7837e6cd64c8..fd63a9a3dd05 100644
--- a/net-mgmt/metronome/Makefile
+++ b/net-mgmt/metronome/Makefile
@@ -10,10 +10,9 @@ COMMENT= Client-side java script to render graphs w/o depending on graphite
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/LICENSE
-BUILD_DEPENDS= eigen>0:math/eigen3
LIB_DEPENDS= libboost_thread.so:devel/boost-libs
-USES= autoreconf:build libtool:build pathfix pkgconfig
+USES= autoreconf:build eigen:3 libtool:build pathfix pkgconfig
USE_GITHUB= yes
GH_ACCOUNT= ahupowerdns
diff --git a/science/avogadro/Makefile b/science/avogadro/Makefile
index 9cbc8598882d..bd3a2e4a2e3b 100644
--- a/science/avogadro/Makefile
+++ b/science/avogadro/Makefile
@@ -3,7 +3,7 @@
PORTNAME= avogadro
PORTVERSION= 1.1.1
-PORTREVISION= 9
+PORTREVISION= 10
CATEGORIES= science
MASTER_SITES= SF
@@ -13,10 +13,11 @@ COMMENT= Advanced molecular editor and viewer
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
-BUILD_DEPENDS= eigen2>2:math/eigen2
LIB_DEPENDS= libopenbabel.so:science/openbabel
-USES= cmake desktop-file-utils pkgconfig tar:bzip2
+# We need to add a RUN_DEPENDS on eigen2, as the cmake file shiped with
+# avogadro to use it, contains 'find_package(Eigen2 REQUIRED)'.
+USES= cmake desktop-file-utils eigen:2,build,run pkgconfig tar:bzip2
USE_GL= glu gl
USE_QT4= gui network opengl \
linguisttools_build moc_build qmake_build rcc_build uic_build
diff --git a/science/gnudatalanguage/Makefile b/science/gnudatalanguage/Makefile
index 7b5a9e60a42e..4577ab7704e1 100644
--- a/science/gnudatalanguage/Makefile
+++ b/science/gnudatalanguage/Makefile
@@ -54,7 +54,7 @@ OPTIONS_DEFINE= EIGEN EXAMPLES FFTW GRAPHICSMAGICK GRIB HDF5 LIBPROJ4 MPICH2 NET
OPTIONS_DEFAULT=EIGEN FFTW GRAPHICSMAGICK GRIB HDF5 LIBPROJ4 NETCDF PYTHON UDUNITS
EIGEN_DESC= Eigen3 support (boost performance)
-EIGEN_BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/eigen3.pc:math/eigen3
+EIGEN_USES= eigen:3
EIGEN_CMAKE_ON= -DEIGEN3:BOOL=YES
EIGEN_CMAKE_OFF= -DEIGEN3:BOOL=NO
diff --git a/science/kalzium/Makefile b/science/kalzium/Makefile
index 68572b24cee7..0c615abe9867 100644
--- a/science/kalzium/Makefile
+++ b/science/kalzium/Makefile
@@ -10,13 +10,11 @@ COMMENT= Periodic table of elements for KDE 4
LIB_DEPENDS= libopenbabel.so:science/openbabel \
libavogadro.so:science/avogadro
-BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/eigen2.pc:math/eigen2 \
- ${LOCALBASE}/libdata/pkgconfig/eigen3.pc:math/eigen3 \
- ${LOCALBASE}/lib/ocaml/facile/facile.a:math/facile \
+BUILD_DEPENDS= ${LOCALBASE}/lib/ocaml/facile/facile.a:math/facile \
${LOCALBASE}/libdata/pkgconfig/chemical-mime-data.pc:science/chemical-mime-data
RUN_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/chemical-mime-data.pc:science/chemical-mime-data
-USES= cmake:outsource kde:4 pkgconfig tar:xz
+USES= cmake:outsource eigen:3 kde:4 pkgconfig tar:xz
USE_KDE= kdelibs automoc4
USE_OCAML= yes
NO_OCAML_RUNDEPENDS= yes
diff --git a/science/openbabel/Makefile b/science/openbabel/Makefile
index 8e641bab8494..1ad6002c358a 100644
--- a/science/openbabel/Makefile
+++ b/science/openbabel/Makefile
@@ -12,15 +12,13 @@ COMMENT= Chemistry file translation program
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
-BUILD_DEPENDS= eigen>=0:math/eigen3
-
BROKEN_powerpc64= Does not build: relocation truncated to fit: R_PPC64_TOC16_DS
CONFLICTS_INSTALL= babel-*
USE_CXXSTD= gnu++98
USE_GNOME= libxml2
-USES= cmake:outsource
+USES= cmake:outsource eigen:3
CMAKE_ARGS= -DBUILD_GUI=off
USE_LDCONFIG= yes
diff --git a/science/step/Makefile b/science/step/Makefile
index c1d590ef5772..19876a0d4c8a 100644
--- a/science/step/Makefile
+++ b/science/step/Makefile
@@ -8,11 +8,10 @@ CATEGORIES= science kde kde-kde4
MAINTAINER= kde@FreeBSD.org
COMMENT= KDE 4 interactive physics simulator
-BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/eigen2.pc:math/eigen2
LIB_DEPENDS= libqalculate.so:math/libqalculate \
libgsl.so:math/gsl
-USES= cmake:outsource kde:4 pkgconfig tar:xz
+USES= cmake:outsource eigen:2 kde:4 pkgconfig tar:xz
USE_KDE= kdelibs automoc4
USE_QT4= opengl moc_build qmake_build rcc_build uic_build