ports/187795: [maintainer update] math/saga: update to 2.1.1 and stage support
Rainer Hurling
rhurlin at gwdg.de
Thu Mar 20 18:20:00 UTC 2014
>Number: 187795
>Category: ports
>Synopsis: [maintainer update] math/saga: update to 2.1.1 and stage support
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Thu Mar 20 18:20:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Rainer Hurling
>Release: 11.0-CURRENT amd64 (clang)
>Organization:
>Environment:
FreeBSD xxx.xxx.xxx 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r263309: Tue Mar 18 19:41:19 CET 2014 xxx at xxx.xxx.xxx:/usr/obj/usr/src/sys/XXX amd64
>Description:
This patch updates SAGA GIS from 2.1.0 to 2.1.1.
Main new features are
- support staging
- OpenMP support now on 10.0 and HEAD
- python not optional anymore
- new option for PostgreSQL
- Usage of x11-toolkits/wxgtk30
- many new features and bugfixes
This PR makes ports/185559 to be unnecessary and should be closed after commit of version 2.1.1.
>How-To-Repeat:
>Fix:
This patch was tested on RedPorts with 8.4, 9.2, 10.0 and HEAD, all i386 and amd64.
There are some problems so far with QATty and EXP1. The QATty build breaks building lang/gcc48 (iconv problem), the EXP1 build breaks with devel/glib20 (plist does not work with python33?).
But I hope math/saga is mature enough now to be committed ;)
Patch attached with submission follows:
diff -Nur saga.orig/Makefile saga/Makefile
--- saga.orig/Makefile 2014-03-10 18:17:27.000000000 +0100
+++ saga/Makefile 2014-03-20 18:34:08.000000000 +0100
@@ -2,11 +2,10 @@
# $FreeBSD: head/math/saga/Makefile 347776 2014-03-10 16:25:33Z bapt $
PORTNAME= saga
-PORTVERSION= 2.1.0
-PORTREVISION= 3
+PORTVERSION= 2.1.1
CATEGORIES= math
MASTER_SITES= SF/saga-gis/SAGA%20-%20${PORTVERSION:C/\.[[:digit:]]*$//}/SAGA%20${PORTVERSION}
-DISTNAME= ${PORTNAME}_${PORTVERSION}_src
+DISTNAME= ${PORTNAME}_${PORTVERSION}
MAINTAINER= rhurlin at gwdg.de
COMMENT= System for Automated Geoscientific Analyses
@@ -19,49 +18,56 @@
libtiff.so:${PORTSDIR}/graphics/tiff \
libiodbc.so:${PORTSDIR}/databases/libiodbc \
liblas.so:${PORTSDIR}/devel/liblas \
- libopencv_core.so:${PORTSDIR}/graphics/opencv-core
+ libopencv_ml.so:${PORTSDIR}/graphics/opencv
-USES= zip
-USE_WX= 2.9
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+
+USE_WX= 3.0+
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
CFLAGS+= -I${LOCALBASE}/include
-USE_DOS2UNIX= dlg_about.cpp
+USES= compiler:features iconv:wchar_t dos2unix
+DOS2UNIX_GLOB= *.cpp *.h
-MAN1= saga_cmd.1 saga_gui.1
+# Python no option any more, because it can't be turned off completely
+USE_PYTHON= 2.7
+CONFIGURE_ARGS+= --enable-python
+BUILD_DEPENDS+= swig2.0:${PORTSDIR}/devel/swig20
+RUN_DEPENDS+= swig2.0:${PORTSDIR}/devel/swig20
+CONFIGURE_ENV+= SWIG="${LOCALBASE}/bin/swig2.0"
DESKTOP_ENTRIES= "SAGA GIS" "${COMMENT}" "${DATADIR}/saga.png" \
"saga_gui" "Science;Geoscience;Math;" true
-OPTIONS_DEFINE= PYTHON OPENMP HARU VIGRA
-OPTIONS_DEFAULT= OPENMP HARU VIGRA
+OPTIONS_DEFINE= PGSQL OPENMP HARU VIGRA
+OPTIONS_DEFAULT= PGSQL OPENMP HARU VIGRA
NO_OPTIONS_SORT= yes
OPENMP_DESC= Enable Multiprocessing
HARU_DESC= Enable Haru Free PDF Library
VIGRA_DESC= Enable 'Vision with Generic Algorithms' Library
-NO_STAGE= yes
-.include <bsd.port.options.mk>
+.include <bsd.port.pre.mk>
+
+# CLANG is not able to handle neither Fortran nor OpenMP
+USE_GCC= 4.8+
+.if ${COMPILER_FEATURES:Mlibc++}
+LDFLAGS+= -L${LOCALBASE}/lib/c++
+CXXFLAGS+= -nostdinc++ -isystem ${LOCALBASE}/include/c++/v1
+CFLAGS+= -isystem ${LOCALBASE}/include/c++/v1
+BUILD_DEPENDS+= ${LOCALBASE}/lib/c++/libstdc++.so:${PORTSDIR}/devel/libc++
+.endif
LDFLAGS+= -L${LOCALBASE}/lib -lopencv_core
CONFIGURE_ARGS+= CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
-.if ${PORT_OPTIONS:MPYTHON}
-CONFIGURE_ARGS+= --enable-python
-BUILD_DEPENDS+= swig2.0:${PORTSDIR}/devel/swig20
-RUN_DEPENDS+= swig2.0:${PORTSDIR}/devel/swig20
-CONFIGURE_ENV+= SWIG="${LOCALBASE}/bin/swig2.0"
-USE_PYTHON= 2
-PLIST_SUB+= SAGA_PYTHON=""
+.if ${PORT_OPTIONS:MPGSQL}
+CONFIGURE_ARGS+= --with-postgresql=${LOCALBASE}/bin/pg_config
+LIB_DEPENDS+= libpq.so:${PORTSDIR}/databases/postgresql93-client
.else
-CONFIGURE_ARGS+= --disable-python
-PLIST_SUB+= SAGA_PYTHON="@comment "
+CONFIGURE_ARGS+= --with-postgresql=no
.endif
.if ${PORT_OPTIONS:MOPENMP}
@@ -76,6 +82,7 @@
RUN_DEPENDS+= ${LOCALBASE}/lib/libhpdf.so:${PORTSDIR}/print/libharu
PLIST_SUB+= HARU=""
.else
+# Haru docs are build nevertheless -> failure :-(
CFLAGS+= -D_SAGA_DONOTUSE_HARU
PLIST_SUB+= HARU="@comment "
.endif
@@ -88,30 +95,30 @@
PLIST_SUB+= VIGRA="@comment "
.endif
-.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
+ ${WRKSRC}/configure \
+ ${WRKSRC}/src/saga_core/saga_gui/Makefile.in \
+ ${WRKSRC}/src/saga_core/saga_api/Makefile.in \
+ ${WRKSRC}/src/saga_core/saga_cmd/Makefile.in \
+ ${WRKSRC}/src/saga_core/saga_gdi/Makefile.in \
+ ${WRKSRC}/src/modules_contrib/garden/garden_webservices/Makefile.in \
+ ${WRKSRC}/src/modules_contrib/garden/garden_3d_viewer/Makefile.in \
+ ${WRKSRC}/src/modules_io/shapes/io_shapes/Makefile.in \
+ ${WRKSRC}/src/modules_io/grid/io_grid_image/Makefile.in \
+ ${WRKSRC}/src/modules/pointcloud/pointcloud_tools/Makefile.in \
+ ${WRKSRC}/src/modules/pointcloud/pointcloud_viewer/Makefile.in \
+ ${WRKSRC}/src/modules/tin/tin_viewer/Makefile.in \
+ ${WRKSRC}/src/modules_geostatistics/geostatistics/geostatistics_kriging/Makefile.in
post-patch:
@${REINPLACE_CMD} -e 's|-lcv|-lopencv_core -lopencv_imgproc|g' \
- ${WRKSRC}/src/modules_images/modules_opencv/opencv/Makefile.am
- @${REINPLACE_CMD} -e 's|\[cv\]|\[opencv_core\]|' \
- ${WRKSRC}/configure.in
- @${REINPLACE_CMD} -e 's|\\n"), SAGA_VERSION)| (rev. 1760)\\n"), SAGA_VERSION)|' \
+ ${WRKSRC}/src/modules_images/modules_opencv/opencv/Makefile.in
+ @${REINPLACE_CMD} -e 's|lib_cv|lib_opencv_core|' \
+ ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e 's|-lcv |-lopencv_core |' \
+ ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e 's|\\n"), SAGA_VERSION)| (rev. 1998)\\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;|' \
@@ -119,12 +126,13 @@
.endif
post-install:
- @${MKDIR} ${DATADIR}
- ${INSTALL_DATA} ${WRKSRC}/src/saga_core/saga_gui/res/saga_tip.txt ${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
+ @${MKDIR} ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/src/saga_core/saga_gui/res/saga_tip.txt ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/src/saga_core/saga_gui/res/saga.png ${STAGEDIR}${DATADIR}
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libsaga_api-2.1.1.so
+ @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/_saga_api-2.1.1.so
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libsaga_gdi-2.1.1.so
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/saga/*.so
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff -Nur saga.orig/distinfo saga/distinfo
--- saga.orig/distinfo 2014-01-22 18:03:02.000000000 +0100
+++ saga/distinfo 2014-03-17 11:31:35.000000000 +0100
@@ -1,2 +1,2 @@
-SHA256 (saga_2.1.0_src.zip) = 34b6ca55f08f19dc80963dd109035b7fb3881f201dc6118e205e62a73becaf4d
-SIZE (saga_2.1.0_src.zip) = 7848258
+SHA256 (saga_2.1.1.tar.gz) = 254fb0fb885ffe73aa2a024f774e05ee0fb1625d89754f70b6020a7d34bbd2fe
+SIZE (saga_2.1.1.tar.gz) = 3691046
diff -Nur saga.orig/files/patch-src-modules_images-modules_vigra-vigra-vigra_fft.cpp saga/files/patch-src-modules_images-modules_vigra-vigra-vigra_fft.cpp
--- saga.orig/files/patch-src-modules_images-modules_vigra-vigra-vigra_fft.cpp 2014-01-22 18:41:52.000000000 +0100
+++ saga/files/patch-src-modules_images-modules_vigra-vigra-vigra_fft.cpp 1970-01-01 01:00:00.000000000 +0100
@@ -1,29 +0,0 @@
---- 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<double>(Real.asDouble(x, y), Imag.asDouble(x, y));
- }
- }
-
-@@ -296,7 +296,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<double> >(), 1.0 / Get_NX() / Get_NY()));
-
- //-----------------------------------------------------
- pReal = Parameters("REAL_OUT")->asGrid();
-@@ -519,7 +519,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<double> >(), 1.0 / Get_NX() / Get_NY()));
-
- //-----------------------------------------------------
- Copy_ComplexGrid_VIGRA_to_SAGA(*pReal, *pImag, Output, false);
diff -Nur saga.orig/files/patch-src__modules_images__modules_opencv__opencv__opencv_nnet.cpp saga/files/patch-src__modules_images__modules_opencv__opencv__opencv_nnet.cpp
--- saga.orig/files/patch-src__modules_images__modules_opencv__opencv__opencv_nnet.cpp 1970-01-01 01:00:00.000000000 +0100
+++ saga/files/patch-src__modules_images__modules_opencv__opencv__opencv_nnet.cpp 2014-03-17 21:46:28.000000000 +0100
@@ -0,0 +1,13 @@
+--- src/modules_images/modules_opencv/opencv/opencv_nnet.cpp.orig 2014-03-17 15:20:31.000000000 +0100
++++ src/modules_images/modules_opencv/opencv/opencv_nnet.cpp 2014-03-17 15:28:25.000000000 +0100
+@@ -60,8 +60,8 @@
+
+ //---------------------------------------------------------
+ #include "opencv_nnet.h"
+-#include "opencv\cxcore.h"
+-#include "opencv\ml.h"
++#include <opencv/cxcore.h>
++#include <opencv/ml.h>
+
+ ///////////////////////////////////////////////////////////
+ // //
diff -Nur saga.orig/files/patch-src__modules_images__modules_opencv__opencv__opencv_nnet.h saga/files/patch-src__modules_images__modules_opencv__opencv__opencv_nnet.h
--- saga.orig/files/patch-src__modules_images__modules_opencv__opencv__opencv_nnet.h 1970-01-01 01:00:00.000000000 +0100
+++ saga/files/patch-src__modules_images__modules_opencv__opencv__opencv_nnet.h 2014-03-17 21:46:43.000000000 +0100
@@ -0,0 +1,13 @@
+--- src/modules_images/modules_opencv/opencv/opencv_nnet.h.orig 2014-03-17 15:06:15.000000000 +0100
++++ src/modules_images/modules_opencv/opencv/opencv_nnet.h 2014-03-17 15:18:58.000000000 +0100
+@@ -64,8 +64,8 @@
+
+ //---------------------------------------------------------
+ #include "MLB_Interface.h"
+-#include "opencv\cxcore.h"
+-#include "opencv\ml.h"
++#include <opencv/cxcore.h>
++#include <opencv/ml.h>
+
+ ///////////////////////////////////////////////////////////
+ // //
diff -Nur saga.orig/files/patch-src__saga_core__saga_cmd__saga_cmd.cpp saga/files/patch-src__saga_core__saga_cmd__saga_cmd.cpp
--- saga.orig/files/patch-src__saga_core__saga_cmd__saga_cmd.cpp 1970-01-01 01:00:00.000000000 +0100
+++ saga/files/patch-src__saga_core__saga_cmd__saga_cmd.cpp 2014-01-05 17:56:26.000000000 +0100
@@ -0,0 +1,10 @@
+--- src/saga_core/saga_cmd/saga_cmd.cpp.orig 2013-07-01 16:16:32.000000000 +0200
++++ src/saga_core/saga_cmd/saga_cmd.cpp 2014-01-05 17:54:51.000000000 +0100
+@@ -64,6 +64,7 @@
+ #include <wx/app.h>
+ #include <wx/utils.h>
+
++#include <locale.h>
+ #include "callback.h"
+
+ #include "module_library.h"
diff -Nur saga.orig/pkg-plist saga/pkg-plist
--- saga.orig/pkg-plist 2013-01-17 11:53:41.000000000 +0100
+++ saga/pkg-plist 2014-03-17 15:55:17.000000000 +0100
@@ -1,22 +1,18 @@
bin/saga_cmd
bin/saga_gui
+lib/libsaga_api-2.1.1.so
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-2.1.1.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
+%%PYTHON_SITELIBDIR%%/_saga_api-2.1.1.so
+%%PYTHON_SITELIBDIR%%/_saga_api.a
+%%PYTHON_SITELIBDIR%%/_saga_api.la
+%%PYTHON_SITELIBDIR%%/_saga_api.so
+%%PYTHON_SITELIBDIR%%/saga_api.py
+%%PYTHON_SITELIBDIR%%/saga_api.pyc
+%%PYTHON_SITELIBDIR%%/saga_api.pyo
lib/saga/libclimate_tools.so
lib/saga/libcontrib_a_perego.so
lib/saga/libdocs_html.so
@@ -48,16 +44,17 @@
lib/saga/libio_grid_grib2.so
lib/saga/libio_grid_image.so
lib/saga/libio_odbc.so
+lib/saga/libio_pgsql.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/libopencv.so
lib/saga/librecreations_fractals.so
lib/saga/librecreations_games.so
lib/saga/libshapes_grid.so
@@ -65,6 +62,7 @@
lib/saga/libshapes_points.so
lib/saga/libshapes_polygons.so
lib/saga/libshapes_tools.so
+lib/saga/libshapes_transect.so
lib/saga/libsim_cellular_automata.so
lib/saga/libsim_ecosystems_hugget.so
lib/saga/libsim_erosion.so
@@ -81,9 +79,13 @@
lib/saga/libtable_tools.so
lib/saga/libtin_tools.so
lib/saga/libtin_viewer.so
-lib/saga/libtransect.so
%%VIGRA%%lib/saga/libvigra.so
+man/man1/saga_cmd.1.gz
+man/man1/saga_gui.1.gz
+share/applications/saga_gui.desktop
%%DATADIR%%/saga.png
%%DATADIR%%/saga_tip.txt
- at dirrm share/saga
- at dirrm lib/saga
+ at dirrmtry %%DATADIR%%
+ at dirrmtry lib/saga
+ at dirrmtry %%PYTHON_SITELIBDIR%%
+ at dirrmtry %%PYTHON_LIBDIR%%
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list