freebsd-ports/math/saga/Makefile
Jan Beich 0b52e68840 math/saga: unbreak build with wxWidgets 3.0.3
wksp_tool.cpp: In member function 'virtual wxString CWKSP_Tool::Get_Description()':
wksp_tool.cpp:159:61: error: no matching function for call to 'CSG_File::Open(const wxScopedWCharBuffer, ESG_File_Flags_Open)'
   if( Stream.Open(FileName.GetFullPath().wc_str(), SG_FILE_R) && Stream.Read(Description, Stream.Length()) )
                                                             ^
In file included from ../saga_api/geo_tools.h:77:0,
                 from ../saga_api/mat_tools.h:77,
                 from ../saga_api/dataobject.h:84,
                 from ../saga_api/table.h:77,
                 from ../saga_api/grid.h:77,
                 from ../saga_api/parameters.h:77,
                 from ../saga_api/tool.h:76,
                 from ../saga_api/tool_library.h:77,
                 from ../saga_api/saga_api.h:118,
                 from res_commands.h:78,
                 from wksp_tool.cpp:67:
../saga_api/api_core.h:955:13: note: candidate: bool CSG_File::Open(const CSG_String&, int, bool, int)
  bool       Open    (const CSG_String &File_Name, int Mode = SG_FILE_R, bool bBinary = true, int Encoding = SG_FILE_ENCODING_CHAR);
             ^~~~
../saga_api/api_core.h:955:13: note:   no known conversion for argument 1 from 'const wxScopedWCharBuffer {aka const wxScopedCharTypeBuffer<wchar_t>}' to 'const CSG_String&'
wksp_tool.cpp:166:61: error: no matching function for call to 'CSG_File::Open(const wxScopedWCharBuffer, ESG_File_Flags_Open)'
   if( Stream.Open(FileName.GetFullPath().wc_str(), SG_FILE_R) && Stream.Read(Description, Stream.Length()) )
                                                             ^
In file included from ../saga_api/geo_tools.h:77:0,
                 from ../saga_api/mat_tools.h:77,
                 from ../saga_api/dataobject.h:84,
                 from ../saga_api/table.h:77,
                 from ../saga_api/grid.h:77,
                 from ../saga_api/parameters.h:77,
                 from ../saga_api/tool.h:76,
                 from ../saga_api/tool_library.h:77,
                 from ../saga_api/saga_api.h:118,
                 from res_commands.h:78,
                 from wksp_tool.cpp:67:
../saga_api/api_core.h:955:13: note: candidate: bool CSG_File::Open(const CSG_String&, int, bool, int)
  bool       Open    (const CSG_String &File_Name, int Mode = SG_FILE_R, bool bBinary = true, int Encoding = SG_FILE_ENCODING_CHAR);
             ^~~~
../saga_api/api_core.h:955:13: note:   no known conversion for argument 1 from 'const wxScopedWCharBuffer {aka const wxScopedCharTypeBuffer<wchar_t>}' to 'const CSG_String&'

PR:		223758
Submitted by:	rozhuk.im@gmail.com
Obtained from:	upstream
Approved by:	Rainer Hurling (maintainer)
2018-01-21 02:22:17 +00:00

114 lines
4.1 KiB
Makefile

# Created by: Rainer Hurling <rhurlin@gwdg.de>
# $FreeBSD$
PORTNAME= saga
PORTVERSION= 6.1.0
PORTREVISION= 1
CATEGORIES= math
MASTER_SITES= SF/saga-gis/SAGA%20-%20${PORTVERSION:C/\.[[:digit:]]\.[[:digit:]]*$//}/SAGA%20-%20${PORTVERSION}
MAINTAINER= rhurlin@gwdg.de
COMMENT= System for Automated Geoscientific Analyses
LICENSE= GPLv2 LGPL21
LICENSE_COMB= multi
BUILD_DEPENDS= swig3.0:devel/swig30
LIB_DEPENDS= libfftw3.so:math/fftw3 \
libgdal.so:graphics/gdal \
libhpdf.so:print/libharu \
libjasper.so:graphics/jasper \
liblas.so:devel/liblas12 \
libodbc.so:databases/unixODBC \
libopencv_core.so:graphics/opencv-core \
libopencv_ml.so:graphics/opencv \
libproj.so:graphics/proj \
libsvm.so:science/libsvm \
libtbb.so:devel/tbb \
libtiff.so:graphics/tiff
RUN_DEPENDS:= ${BUILD_DEPENDS}
USES= autoreconf compiler:gcc-c++11-lib desktop-file-utils dos2unix \
iconv:wchar_t libtool localbase pkgconfig python:2
USE_LDCONFIG= yes
USE_CXXSTD= c++11
USE_WX= 3.0+
CONFIGURE_ARGS= CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
--enable-python --with-system-svm
CONFIGURE_ENV= SWIG="${LOCALBASE}/bin/swig3.0"
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 OPENMP VIGRA
NO_OPTIONS_SORT= yes
OPTIONS_SUB= yes
OPENMP_DESC= Enable Multiprocessing
VIGRA_DESC= Enable 'Vision with Generic Algorithms' Library
OPENMP_CONFIGURE_ENABLE= openmp
OPENMP_LDFLAGS= -pthread
PGSQL_CONFIGURE_OFF= --with-postgresql=no
PGSQL_CONFIGURE_ON= --with-postgresql=${LOCALBASE}/bin/pg_config
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>
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/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
@${REINPLACE_CMD} -e 's|/usr/include/opencv|${LOCALBASE}/include/opencv ${LOCALBASE}/include|g' \
${WRKSRC}/src/tools/imagery/imagery_opencv/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
post-configure:
@${REINPLACE_CMD} -e 's|cd $$(pkgdatadir);|cd ${STAGEDIR}${DATADIR};|g' \
${WRKSRC}/src/saga_core/saga_gui/Makefile
@${REINPLACE_CMD} -e 's|^LDFLAGS = .*|& -lopencv_contrib|' \
${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)
${MKDIR} ${STAGEDIR}${DATADIR}/accessories
(cd ${WRKSRC}/src/accessories && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/accessories)
${RM} -R ${STAGEDIR}${DATADIR}/accessories/toolchains
${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>