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
This commit is contained in:
Tobias C. Berner 2018-01-02 16:49:24 +00:00
parent a3cc859109
commit 51d04637cb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=457914
26 changed files with 106 additions and 60 deletions

17
CHANGES
View File

@ -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

55
Mk/Uses/eigen.mk Normal file
View File

@ -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

View File

@ -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

View File

@ -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 \

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 \

View File

@ -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 \

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 \

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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 \

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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