Bug 180366 - [maintainer update] math/saga: update to version 2.1.0
Summary: [maintainer update] math/saga: update to version 2.1.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: William Grzybowski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-07 18:00 UTC by Rainer Hurling
Modified: 2013-07-31 15:50 UTC (History)
0 users

See Also:


Attachments
file.diff (10.51 KB, patch)
2013-07-07 18:00 UTC, Rainer Hurling
no flags Details | Diff
patch_saga_2.1.0-v2.txt (10.66 KB, text/plain; charset=UTF-8)
2013-07-31 10:49 UTC, Rainer Hurling
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Hurling freebsd_committer freebsd_triage 2013-07-07 18:00:01 UTC
This patch updates SAGA GIS from 2.0.8 to 2.1.0.

Main new features are
- Usage of wxGTK2-2.9.4
- Better Unicode support
- Multiprocessor support via OpenMP
- New GIS modules
- many bugfixes

In particular the multiprocessor support speeds up some modules enormously.

Fix: The attached patch should update to 2.1.0.

I am not sure if it is OK that option PYTHON can be selected while option OPENMP is enabled. Some own python scripts seem to work with SAGA modules so far.

Patch attached with submission follows:
Comment 1 William Grzybowski freebsd_committer freebsd_triage 2013-07-28 18:40:33 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wg

I'll take it.
Comment 2 William Grzybowski 2013-07-30 17:54:12 UTC
Hi,

It doesnt build in tinderbox:
https://redports.org/~wg/20130730153200-54347-135074/saga-2.1.0.log


Cheers
-- 
William Grzybowski
------------------------------------------
Curitiba/PR - Brasil
Comment 3 Rainer Hurling freebsd_committer freebsd_triage 2013-07-31 10:49:21 UTC
Thanks for taking up this PR.

Obviously my update was not able to install autoconf-269 if not present.

There is a general 'chicken and egg problem' with autoreconf, which I
was not able to solve in an elegant way:
In other ports it seems sufficient to use 'USE_AUTOTOOLS=aclocal
autoconf' to start autoreconf at the right time. In my port I explicitly
have to use an extra invocation in 'post-patch:'. Do you have any idea
to improve this?

The attached patch (complete port again) should resolve the install
problem with autoconf.

Regards,
Rainer Hurling
Comment 4 William Grzybowski freebsd_committer freebsd_triage 2013-07-31 15:40:25 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!
Comment 5 dfilter service freebsd_committer freebsd_triage 2013-07-31 15:40:28 UTC
Author: wg
Date: Wed Jul 31 14:40:03 2013
New Revision: 324057
URL: http://svnweb.freebsd.org/changeset/ports/324057

Log:
  math/saga: update to 2.1.0
  
  - Update to 2.1.0 [1]
  - Fix autotools
  
  Changes: http://sourceforge.net/p/saga-gis/news/2013/07/saga-210-is-released/
  
  PR:		ports/180366 [1]
  Submitted by:	Rainer Hurling <rhurlin gwdg.de> (maintainer)

Modified:
  head/math/saga/Makefile
  head/math/saga/distinfo
  head/math/saga/files/patch-src-modules_images-modules_vigra-vigra-vigra_fft.cpp
  head/math/saga/pkg-message
  head/math/saga/pkg-plist

Modified: head/math/saga/Makefile
==============================================================================
--- head/math/saga/Makefile	Wed Jul 31 14:39:37 2013	(r324056)
+++ head/math/saga/Makefile	Wed Jul 31 14:40:03 2013	(r324057)
@@ -2,11 +2,10 @@
 # $FreeBSD$
 
 PORTNAME=	saga
-PORTVERSION=	2.0.8
-PORTREVISION=	4
+PORTVERSION=	2.1.0
 CATEGORIES=	math
 MASTER_SITES=	SF/saga-gis/SAGA%20-%20${PORTVERSION:C/\.[[:digit:]]*$//}/SAGA%20${PORTVERSION}
-DISTNAME=	${PORTNAME}_${PORTVERSION}
+DISTNAME=	${PORTNAME}_${PORTVERSION}_src
 
 MAINTAINER=	rhurlin@gwdg.de
 COMMENT=	System for Automated Geoscientific Analyses
@@ -21,24 +20,28 @@ LIB_DEPENDS=	proj:${PORTSDIR}/graphics/p
 		las:${PORTSDIR}/devel/liblas \
 		opencv_legacy:${PORTSDIR}/graphics/opencv
 
-USE_WX=		2.8
+USE_ZIP=	yes
+USE_WX=		2.9
+WX_UNICODE=	yes
 USE_LDCONFIG=	yes
 GNU_CONFIGURE=	yes
+USE_AUTOTOOLS=	autoconf autoheader automake aclocal libtoolize
+AUTOMAKE_ARGS=	--add-missing
+
+# CLANG is not able to handle neither Fortran nor OpenMP
 USE_GCC=	any
-USE_AUTOTOOLS=	libtool
 CFLAGS+=	-I${LOCALBASE}/include
-WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 USE_DOS2UNIX=	dlg_about.cpp
 
 MAN1=		saga_cmd.1 saga_gui.1
 
-DESKTOP_ENTRIES=	"SAGA GIS" "${COMMENT}" "${DATADIR}/saga_icon_32.xpm" \
+DESKTOP_ENTRIES=	"SAGA GIS" "${COMMENT}" "${DATADIR}/saga.png" \
 			"saga_gui" "Science;Geoscience;Math;" true
 
-OPTIONS_DEFINE=	UNICODE PYTHON HARU VIGRA
-OPTIONS_DEFAULT=	UNICODE PYTHON
+OPTIONS_DEFINE=	PYTHON OPENMP HARU VIGRA
+OPTIONS_DEFAULT=	OPENMP HARU VIGRA
 NO_OPTIONS_SORT=	yes
-UNICODE_DESC=	Enable Unicode Support
+OPENMP_DESC=	Enable Multiprocessing
 HARU_DESC=	Enable Haru Free PDF Library
 VIGRA_DESC=	Enable 'Vision with Generic Algorithms' Library
 
@@ -47,16 +50,11 @@ VIGRA_DESC=	Enable 'Vision with Generic 
 LDFLAGS+=	-L${LOCALBASE}/lib
 CONFIGURE_ARGS+=	CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
 
-.if ${PORT_OPTIONS:MUNICODE}
-WITH_UNICODE=	yes
-CONFIGURE_ARGS+=	--enable-unicode
-.else
-CONFIGURE_ARGS+=	--disable-unicode
-.endif
-
 .if ${PORT_OPTIONS:MPYTHON}
 CONFIGURE_ARGS+=	--enable-python
-BUILD_DEPENDS+=	swig:${PORTSDIR}/devel/swig13
+BUILD_DEPENDS+=	swig2.0:${PORTSDIR}/devel/swig20
+RUN_DEPENDS+=	swig2.0:${PORTSDIR}/devel/swig20
+CONFIGURE_ENV+=	SWIG="${LOCALBASE}/bin/swig2.0"
 USE_PYTHON=	2.6-2.7
 PLIST_SUB+=	SAGA_PYTHON=""
 .else
@@ -64,11 +62,19 @@ CONFIGURE_ARGS+=	--disable-python
 PLIST_SUB+=	SAGA_PYTHON="@comment "
 .endif
 
+.if ${PORT_OPTIONS:MOPENMP}
+LDFLAGS+=		${PTHREAD_LIBS}
+CONFIGURE_ARGS+=	--enable-openmp
+.else
+CONFIGURE_ARGS+=	--disable-openmp
+.endif
+
 .if ${PORT_OPTIONS:MHARU}
 BUILD_DEPENDS+=	${LOCALBASE}/lib/libhpdf.so:${PORTSDIR}/print/libharu
 RUN_DEPENDS+=	${LOCALBASE}/lib/libhpdf.so:${PORTSDIR}/print/libharu
 PLIST_SUB+=	HARU=""
 .else
+CFLAGS+=	-D_SAGA_DONOTUSE_HARU
 PLIST_SUB+=	HARU="@comment "
 .endif
 
@@ -82,23 +88,38 @@ PLIST_SUB+=	VIGRA="@comment "
 
 .include <bsd.port.pre.mk>
 
+post-extract:
+	@${REINPLACE_CMD} -e's|wx-config |${WX_CONFIG} |g' \
+		${WRKSRC}/configure.in \
+		${WRKSRC}/src/saga_core/saga_gui/Makefile.am \
+		${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/modules_contrib/garden/garden_webservices/Makefile.am \
+		${WRKSRC}/src/modules_contrib/garden/garden_3d_viewer/Makefile.am \
+		${WRKSRC}/src/modules_io/shapes/io_shapes/Makefile.am \
+		${WRKSRC}/src/modules_io/grid/io_grid_image/Makefile.am \
+		${WRKSRC}/src/modules/pointcloud/pointcloud_tools/Makefile.am \
+		${WRKSRC}/src/modules/pointcloud/pointcloud_viewer/Makefile.am \
+		${WRKSRC}/src/modules/tin/tin_viewer/Makefile.am \
+		${WRKSRC}/src/modules_geostatistics/geostatistics/geostatistics_kriging/Makefile.am
+
 post-patch:
-	@${REINPLACE_CMD} -e 's/-lcv/-lopencv_legacy/g' \
-		${WRKSRC}/configure \
-		${WRKSRC}/src/modules_images/modules_opencv/opencv/Makefile.in
-	@for f in `${FIND} '${WRKSRC}' -name Makefile.in` \
-		${WRKSRC}/configure; do \
-		${REINPLACE_CMD} -e's|wx-config |${WX_CONFIG} |g' "$$f"; \
-	done
+	@${REINPLACE_CMD} -e 's|-lcv|-lopencv_legacy|g' \
+		${WRKSRC}/src/modules_images/modules_opencv/opencv/Makefile.am
+	@${REINPLACE_CMD} -e 's|\[cv\]|\[opencv_legacy\]|' \
+		${WRKSRC}/configure.in
+	@${REINPLACE_CMD} -e 's|\\n"), SAGA_VERSION)| (rev. 1760)\\n"), SAGA_VERSION)|' \
+		${WRKSRC}/src/saga_core/saga_gui/dlg_about.cpp
 .if ${ARCH} == "i386" || ${ARCH} == "powerpc"
 	@${REINPLACE_CMD} -e 's|typedef unsigned long	DWORD;|typedef unsigned int	DWORD;|' \
 		${WRKSRC}/src/saga_core/saga_api/api_core.h
 .endif
 
 post-install:
-	${MKDIR} ${DATADIR}
+	@${MKDIR} ${DATADIR}
 	${INSTALL_DATA} ${WRKSRC}/src/saga_core/saga_gui/res/saga_tip.txt ${DATADIR}
-	${INSTALL_DATA} ${WRKSRC}/src/saga_core/saga_gui/res/xpm/saga_icon_32.xpm ${DATADIR}
+	${INSTALL_DATA} ${WRKSRC}/src/saga_core/saga_gui/res/saga.png ${DATADIR}
 # library helper files are not needed and cripple some math/qgis extensions
 	@${RM} ${PREFIX}/lib/saga/*.la
 	@${RM} ${PREFIX}/lib/saga/*.a

Modified: head/math/saga/distinfo
==============================================================================
--- head/math/saga/distinfo	Wed Jul 31 14:39:37 2013	(r324056)
+++ head/math/saga/distinfo	Wed Jul 31 14:40:03 2013	(r324057)
@@ -1,2 +1,2 @@
-SHA256 (saga_2.0.8.tar.gz) = 709e4f047e33599a77302c72bffa0d218f1013357292bf583c87761563403f2a
-SIZE (saga_2.0.8.tar.gz) = 3405112
+SHA256 (saga_2.1.0_src.zip) = 34b6ca55f08f19dc80963dd109035b7fb3881f201dc6118e205e62a73becaf4d
+SIZE (saga_2.1.0_src.zip) = 7848258

Modified: head/math/saga/files/patch-src-modules_images-modules_vigra-vigra-vigra_fft.cpp
==============================================================================
--- head/math/saga/files/patch-src-modules_images-modules_vigra-vigra-vigra_fft.cpp	Wed Jul 31 14:39:37 2013	(r324056)
+++ head/math/saga/files/patch-src-modules_images-modules_vigra-vigra-vigra_fft.cpp	Wed Jul 31 14:40:03 2013	(r324057)
@@ -1,10 +1,10 @@
---- src/modules_images/modules_vigra/vigra/vigra_fft.cpp.orig	2011-11-24 15:24:43.000000000 +0100
-+++ src/modules_images/modules_vigra/vigra/vigra_fft.cpp	2012-01-18 23:21:38.000000000 +0100
+--- src/modules_images/modules_vigra/vigra/vigra_fft.cpp.orig	2013-07-01 16:16:34.000000000 +0200
++++ src/modules_images/modules_vigra/vigra/vigra_fft.cpp	2013-07-06 14:49:18.000000000 +0200
 @@ -89,7 +89,7 @@
  	{
  		for(int x=0; x<Real.Get_NX(); x++)
  		{
--			Image(x, y)	= FFTWComplex(Real.asDouble(x, y), Imag.asDouble(x, y));
+-			Image(x, y)	= FFTWComplex<>(Real.asDouble(x, y), Imag.asDouble(x, y));
 +			Image(x, y)	= FFTWComplex<double>(Real.asDouble(x, y), Imag.asDouble(x, y));
  		}
  	}
@@ -13,7 +13,7 @@
  		fourierTransformInverse(srcImageRange(tmp)  , destImage(Output));
  	}
   
--	transformImage(srcImageRange(Output), destImage(Output), std::bind1st(std::multiplies<FFTWComplex>(), 1.0 / Get_NX() / Get_NY()));
+-	transformImage(srcImageRange(Output), destImage(Output), std::bind1st(std::multiplies<FFTWComplex<> >(), 1.0 / Get_NX() / Get_NY()));
 +	transformImage(srcImageRange(Output), destImage(Output), std::bind1st(std::multiplies<FFTWComplex<double> >(), 1.0 / Get_NX() / Get_NY()));
  
  	//-----------------------------------------------------
@@ -22,7 +22,7 @@
  
  	vigra::applyFourierFilter(srcImageRange(Input), srcImage(Filter_), destImage(Output));
   
--	transformImage(srcImageRange(Output), destImage(Output), std::bind1st(std::multiplies<FFTWComplex>(), 1.0 / Get_NX() / Get_NY()));
+-	transformImage(srcImageRange(Output), destImage(Output), std::bind1st(std::multiplies<FFTWComplex<> >(), 1.0 / Get_NX() / Get_NY()));
 +	transformImage(srcImageRange(Output), destImage(Output), std::bind1st(std::multiplies<FFTWComplex<double> >(), 1.0 / Get_NX() / Get_NY()));
  
  	//-----------------------------------------------------

Modified: head/math/saga/pkg-message
==============================================================================
--- head/math/saga/pkg-message	Wed Jul 31 14:39:37 2013	(r324056)
+++ head/math/saga/pkg-message	Wed Jul 31 14:40:03 2013	(r324057)
@@ -17,19 +17,15 @@ e.g.:
 
 Now your system is prepared for using SAGA CMD to execute SAGA
 modules. 
-
-######################################################################
-
-And don't forget, on Unix-like systems you will have to alter the
-module library name accordingly by adding "lib" to the module library
-name.
-
-e.g.:
-  saga_cmd libta_morphometry    instead of    saga_cmd ta_morphometry
-
-For more information see
-
-http://sourceforge.net/apps/trac/saga-gis/wiki/\
-Executing%20Modules%20with%20SAGA%20CMD
-
-######################################################################
+
+######################################################################
+
+Since version 2.1.0 it is not necessary any more, to use a leading
+"lib" for module library names on Unix-like systems. Now you will have
+to alter back your scripts by removing "lib" from the name (like it is
+on MS Windows).
+
+e.g.:
+  saga_cmd ta_morphometry    instead of    saga_cmd libta_morphometry
+
+######################################################################

Modified: head/math/saga/pkg-plist
==============================================================================
--- head/math/saga/pkg-plist	Wed Jul 31 14:39:37 2013	(r324056)
+++ head/math/saga/pkg-plist	Wed Jul 31 14:40:03 2013	(r324057)
@@ -1,28 +1,29 @@
-bin/saga_cmd
-bin/saga_gui
-lib/libsaga_api-2.0.8.so
-lib/libsaga_api.la
-lib/libsaga_api.so
-lib/libsaga_gdi-2.0.8.so
-lib/libsaga_gdi.la
-lib/libsaga_gdi.so
-lib/libsaga_odbc-2.0.8.so
-lib/libsaga_odbc.a
-lib/libsaga_odbc.la
-lib/libsaga_odbc.so
-%%SAGA_PYTHON%%%%PYTHON_SITELIBDIR%%/_saga_api-2.0.8.so
-%%SAGA_PYTHON%%%%PYTHON_SITELIBDIR%%/_saga_api.a
-%%SAGA_PYTHON%%%%PYTHON_SITELIBDIR%%/_saga_api.la
-%%SAGA_PYTHON%%%%PYTHON_SITELIBDIR%%/_saga_api.so
-%%SAGA_PYTHON%%%%PYTHON_SITELIBDIR%%/saga_api.py
-%%SAGA_PYTHON%%%%PYTHON_SITELIBDIR%%/saga_api.pyc
-%%SAGA_PYTHON%%%%PYTHON_SITELIBDIR%%/saga_api.pyo
-lib/saga/libcontrib_a_perego.so
-lib/saga/libdocs_html.so
-%%HARU%%lib/saga/libdocs_pdf.so
-lib/saga/libgarden_3d_viewer.so
-lib/saga/libgarden_webservices.so
-lib/saga/libgeostatistics_grid.so
+bin/saga_cmd
+bin/saga_gui
+lib/libsaga_api.la
+lib/libsaga_api-2.1.0.so
+lib/libsaga_api.so
+lib/libsaga_gdi-2.1.0.so
+lib/libsaga_gdi.la
+lib/libsaga_gdi.so
+lib/libsaga_odbc.a
+lib/libsaga_odbc.la
+lib/libsaga_odbc-2.1.0.so
+lib/libsaga_odbc.so
+%%SAGA_PYTHON%%%%PYTHON_SITELIBDIR%%/_saga_api-2.1.0.so
+%%SAGA_PYTHON%%%%PYTHON_SITELIBDIR%%/_saga_api.a
+%%SAGA_PYTHON%%%%PYTHON_SITELIBDIR%%/_saga_api.la
+%%SAGA_PYTHON%%%%PYTHON_SITELIBDIR%%/_saga_api.so
+%%SAGA_PYTHON%%%%PYTHON_SITELIBDIR%%/saga_api.py
+%%SAGA_PYTHON%%%%PYTHON_SITELIBDIR%%/saga_api.pyc
+%%SAGA_PYTHON%%%%PYTHON_SITELIBDIR%%/saga_api.pyo
+lib/saga/libclimate_tools.so
+lib/saga/libcontrib_a_perego.so
+lib/saga/libdocs_html.so
+lib/saga/libdocs_pdf.so
+lib/saga/libgarden_3d_viewer.so
+lib/saga/libgarden_webservices.so
+lib/saga/libgeostatistics_grid.so
 lib/saga/libgeostatistics_kriging.so
 lib/saga/libgeostatistics_points.so
 lib/saga/libgeostatistics_regression.so
@@ -35,12 +36,13 @@ lib/saga/libgrid_spline.so
 lib/saga/libgrid_tools.so
 lib/saga/libgrid_visualisation.so
 lib/saga/libihacres.so
-lib/saga/libimagery_classification.so
-lib/saga/libimagery_rga.so
-lib/saga/libimagery_segmentation.so
-lib/saga/libimagery_tools.so
-lib/saga/libio_esri_e00.so
-lib/saga/libio_gdal.so
+lib/saga/libimagery_classification.so
+lib/saga/libimagery_rga.so
+lib/saga/libimagery_segmentation.so
+lib/saga/libimagery_svm.so
+lib/saga/libimagery_tools.so
+lib/saga/libio_esri_e00.so
+lib/saga/libio_gdal.so
 lib/saga/libio_gps.so
 lib/saga/libio_grid.so
 lib/saga/libio_grid_grib2.so
@@ -48,26 +50,27 @@ lib/saga/libio_grid_image.so
 lib/saga/libio_odbc.so
 lib/saga/libio_shapes.so
 lib/saga/libio_shapes_dxf.so
-lib/saga/libio_shapes_las.so
-lib/saga/libio_table.so
-lib/saga/liblectures_introduction.so
-lib/saga/libopencv.so
-lib/saga/libpj_georeference.so
-lib/saga/libpj_proj4.so
-lib/saga/libpointcloud_tools.so
-lib/saga/libpointcloud_viewer.so
-lib/saga/librecreations_fractals.so
-lib/saga/librecreations_games.so
-lib/saga/libshapes_grid.so
+lib/saga/libio_shapes_las.so
+lib/saga/libio_table.so
+lib/saga/liblectures_introduction.so
+lib/saga/libpj_georeference.so
+lib/saga/libpj_proj4.so
+lib/saga/libpointcloud_tools.so
+lib/saga/libpointcloud_viewer.so
+lib/saga/libopencv.so
+lib/saga/librecreations_fractals.so
+lib/saga/librecreations_games.so
+lib/saga/libshapes_grid.so
 lib/saga/libshapes_lines.so
 lib/saga/libshapes_points.so
 lib/saga/libshapes_polygons.so
-lib/saga/libshapes_tools.so
-lib/saga/libsim_cellular_automata.so
-lib/saga/libsim_ecosystems_hugget.so
-lib/saga/libsim_fire_spreading.so
-lib/saga/libsim_hydrology.so
-lib/saga/libta_channels.so
+lib/saga/libshapes_tools.so
+lib/saga/libsim_cellular_automata.so
+lib/saga/libsim_ecosystems_hugget.so
+lib/saga/libsim_erosion.so
+lib/saga/libsim_fire_spreading.so
+lib/saga/libsim_hydrology.so
+lib/saga/libta_channels.so
 lib/saga/libta_compound.so
 lib/saga/libta_hydrology.so
 lib/saga/libta_lighting.so
@@ -77,10 +80,10 @@ lib/saga/libta_profiles.so
 lib/saga/libtable_calculus.so
 lib/saga/libtable_tools.so
 lib/saga/libtin_tools.so
-lib/saga/libtin_viewer.so
-lib/saga/libtransect.so
-%%VIGRA%%lib/saga/libvigra.so
-%%DATADIR%%/saga_icon_32.xpm
-%%DATADIR%%/saga_tip.txt
-@dirrm share/saga
-@dirrm lib/saga
+lib/saga/libtin_viewer.so
+lib/saga/libtransect.so
+%%VIGRA%%lib/saga/libvigra.so
+%%DATADIR%%/saga.png
+%%DATADIR%%/saga_tip.txt
+@dirrm share/saga
+@dirrm lib/saga
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"