forked from Lainports/freebsd-ports
This is a major upgrade from 3.x to 4.x.
Changelog from versions 3.4.1--4.5.1 can be found here:
https://github.com/opencv/opencv/wiki/ChangeLog
Note: this has explicitely not been added as a new graphics/opencv4 port, but replaces the
previous graphics/opencv[3] port. Again, to improve maintainability by not giving ports
the option to pick the "wrong one" - this leads however to some abandoned ports being
broken.
The port has been greatly simplified:
* graphics/opencv-core which existed to enable ffmpeg to depend on opencv, and vice versa
has been removed. ffmpeg no longer can depend on opencv.
* graphics/py-opencv has been integrated into graphics/opencv, the default versions python
bindings will be built unless the PYTHON option is explicitely turned off.
* graphics/opencv-java has been integrated into graphics/opencv -- it is off by default,
but can be enabled by toggling the JAVA option -- there are no consumers in the tree,
so that option might go away in the future.
* All the previous options have been removed and replaced by a (hopefully) sane set of
dependencies that make the port and package most usable for the majority of consumers.
- Please let me know if you think there are better defaults (i.e. anything that is missing,
or something that should not be dependet on).
- If you think something should be added or removed, please open a bug report.
- If you think something should be added as an optional dependency, please open a
bug report (with a good reason [tm]).
The depending ports have been updated to work against opencv4, or marked broken.
* Ports broken:
- graphics/rubygem-objectdetect: OpenCV4 no longer ships opencv-1.0 API
- graphics/p5-Image-ObjectDetect: OpenCV4 no longer ships opencv-1.0 API
- graphics/gimp-gmic-plugin: OpenCV4 no longer ships opencv-1.0 API
* Backports:
- misc/visp: dfa7e4bd47
- multimedia/zart: 6ca1964690,
d3a2931b1a
* Others:
- misc/actiona: switch to pkgconfig 'opencv4'
- multimedia/libav: drop opencv support
- misc/darknet: already failed to build prior to the upgrade
- math/saga: remove patching added to work against opencv3
121 lines
4.1 KiB
Makefile
121 lines
4.1 KiB
Makefile
# Created by: Rainer Hurling <rhurlin@gwdg.de>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= saga
|
|
PORTVERSION= 7.9.0
|
|
PORTREVISION= 1
|
|
CATEGORIES= math
|
|
MASTER_SITES= SF/saga-gis/SAGA%20-%20${PORTVERSION:C/\.[[:digit:]]\.[[:digit:]]*$//}/SAGA%20-%20${PORTVERSION}
|
|
|
|
MAINTAINER= rhurlin@FreeBSD.org
|
|
COMMENT= System for Automated Geoscientific Analyses
|
|
|
|
LICENSE= GPLv2 LGPL21
|
|
LICENSE_COMB= multi
|
|
|
|
BUILD_DEPENDS= clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} \
|
|
swig:devel/swig
|
|
LIB_DEPENDS= libcurl.so:ftp/curl \
|
|
libfftw3.so:math/fftw3 \
|
|
libgdal.so:graphics/gdal \
|
|
libhpdf.so:print/libharu \
|
|
libjasper.so:graphics/jasper \
|
|
liblas12.so:devel/liblas12 \
|
|
libodbc.so:databases/unixODBC \
|
|
libopencv_core.so:graphics/opencv \
|
|
libpdal_base.so:math/pdal \
|
|
libproj.so:graphics/proj \
|
|
libsvm.so:science/libsvm \
|
|
libtbb.so:devel/tbb \
|
|
libtiff.so:graphics/tiff
|
|
RUN_DEPENDS:= swig:devel/swig
|
|
|
|
USES= autoreconf compiler:c++11-lib dos2unix gnome \
|
|
iconv:wchar_t libtool localbase pkgconfig python
|
|
USE_LDCONFIG= yes
|
|
USE_WX= 3.0+
|
|
|
|
CONFIGURE_ARGS= CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
|
|
--enable-python --with-system-svm
|
|
CONFIGURE_ENV= SWIG="${LOCALBASE}/bin/swig"
|
|
GNU_CONFIGURE= yes
|
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
|
|
|
INSTALLS_ICONS= yes
|
|
DOS2UNIX_GLOB= *.cpp *.h
|
|
PLIST_SUB= PORTVERSION=${PORTVERSION}
|
|
|
|
OPTIONS_DEFINE= PGSQL OPENMP VIGRA
|
|
OPTIONS_DEFAULT= PGSQL VIGRA
|
|
OPTIONS_DEFAULT_amd64= OPENMP
|
|
OPTIONS_DEFAULT_i386= OPENMP
|
|
NO_OPTIONS_SORT= yes
|
|
OPTIONS_SUB= yes
|
|
OPENMP_DESC= Enable Multiprocessing (only amd64 and i386)
|
|
VIGRA_DESC= Enable 'Vision with Generic Algorithms' Library
|
|
|
|
OPENMP_CONFIGURE_ENABLE= openmp
|
|
PGSQL_CONFIGURE_WITH= postgresql
|
|
PGSQL_USES= pgsql
|
|
VIGRA_BUILD_DEPENDS= ${LOCALBASE}/lib/libvigraimpex.so:graphics/vigra
|
|
VIGRA_RUN_DEPENDS= ${LOCALBASE}/lib/libvigraimpex.so:graphics/vigra
|
|
|
|
INSTALL_TARGET= install-strip
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
# make describe needs them here
|
|
CPP= clang-cpp${LLVM_DEFAULT}
|
|
CC= clang${LLVM_DEFAULT}
|
|
CXX= clang++${LLVM_DEFAULT}
|
|
|
|
SUB_FILES= pkg-message
|
|
|
|
post-extract:
|
|
@${REINPLACE_CMD} -e 's|wx-config |${WX_CONFIG} |g' \
|
|
${WRKSRC}/configure.ac \
|
|
${WRKSRC}/src/saga_core/saga_api/Makefile.am \
|
|
${WRKSRC}/src/saga_core/saga_cmd/Makefile.am \
|
|
${WRKSRC}/src/saga_core/saga_gdi/Makefile.am \
|
|
${WRKSRC}/src/saga_core/saga_gui/Makefile.am \
|
|
${WRKSRC}/src/tools/garden/garden_3d_viewer/Makefile.am \
|
|
${WRKSRC}/src/tools/garden/garden_webservices/Makefile.am \
|
|
${WRKSRC}/src/tools/io/io_grid_image/Makefile.am \
|
|
${WRKSRC}/src/tools/io/io_shapes/Makefile.am \
|
|
${WRKSRC}/src/tools/io/io_virtual/Makefile.am \
|
|
${WRKSRC}/src/tools/io/io_webservices/Makefile.am \
|
|
${WRKSRC}/src/tools/pointcloud/pointcloud_tools/Makefile.am \
|
|
${WRKSRC}/src/tools/pointcloud/pointcloud_viewer/Makefile.am \
|
|
${WRKSRC}/src/tools/statistics/statistics_kriging/Makefile.am \
|
|
${WRKSRC}/src/tools/tin/tin_viewer/Makefile.am
|
|
|
|
post-patch:
|
|
.if ${ARCH} == "powerpc"
|
|
@${REINPLACE_CMD} -e 's|typedef unsigned long DWORD;|typedef unsigned int DWORD;|' \
|
|
${WRKSRC}/src/saga_core/saga_api/api_core.h
|
|
.endif
|
|
@${REINPLACE_CMD} -e 's|PORTVERSION|${PORTVERSION}|' \
|
|
${WRKSRC}/src/saga_core/saga_gui/dlg_about.cpp
|
|
@${REINPLACE_CMD} -e 's|-lgomp|-lomp|' \
|
|
${WRKSRC}/src/accessories/templates/template4saga-tools/my_tool_library/Makefile
|
|
|
|
post-configure:
|
|
@${REINPLACE_CMD} -e 's|^LDFLAGS = .*|& -lopencv_core|' \
|
|
${WRKSRC}/src/tools/imagery/imagery_opencv/Makefile
|
|
|
|
post-install:
|
|
${MKDIR} ${STAGEDIR}${DATADIR}
|
|
${INSTALL_DATA} ${WRKSRC}/src/saga_core/saga_gui/res/saga*.txt ${STAGEDIR}${DATADIR}
|
|
${INSTALL_DATA} ${WRKSRC}/src/saga_core/saga_gui/res/saga.png ${STAGEDIR}${DATADIR}
|
|
${RM} ${STAGEDIR}${DATADIR}/saga_dic.txt ${STAGEDIR}${DATADIR}/saga_srs.txt
|
|
# toolchains dir was moved in r2805 (and followups r2810,r2811,r2820)
|
|
(cd ${WRKSRC}/src/accessories && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR})
|
|
${RM} -R ${STAGEDIR}${DATADIR}/CMakeLists.txt
|
|
${RM} -R ${STAGEDIR}${DATADIR}/templates/template4saga-tools/my_tool_library/Makefile.bak
|
|
${INSTALL_DATA} ${WRKSRC}/src/saga_core/saga_gui/res/saga.desktop \
|
|
${STAGEDIR}${PREFIX}/share/applications/
|
|
# library helper files are not needed and cripple some math/qgis extensions
|
|
@${RM} ${STAGEDIR}${PREFIX}/lib/saga/*.la
|
|
|
|
.include <bsd.port.post.mk>
|