diff options
author | makc <makc@FreeBSD.org> | 2012-04-27 07:16:05 +0800 |
---|---|---|
committer | makc <makc@FreeBSD.org> | 2012-04-27 07:16:05 +0800 |
commit | 45c847eacca2766f9476278a7eacfe50bd09450c (patch) | |
tree | a834d009af4358162c23f5607d1ae64b9b02dc36 /math | |
parent | dae5abe83ec12383c8407af98caaf0aa017b3295 (diff) | |
download | freebsd-ports-gnome-45c847eacca2766f9476278a7eacfe50bd09450c.tar.gz freebsd-ports-gnome-45c847eacca2766f9476278a7eacfe50bd09450c.tar.zst freebsd-ports-gnome-45c847eacca2766f9476278a7eacfe50bd09450c.zip |
Unbreak by updating to svn snapshot
Add option to build help file
Diffstat (limited to 'math')
-rw-r--r-- | math/scilab-toolbox-sivp/Makefile | 67 | ||||
-rw-r--r-- | math/scilab-toolbox-sivp/distinfo | 4 | ||||
-rw-r--r-- | math/scilab-toolbox-sivp/files/extrapatch-etc__SIVP.start | 16 | ||||
-rw-r--r-- | math/scilab-toolbox-sivp/files/patch-builder.sce | 16 | ||||
-rw-r--r-- | math/scilab-toolbox-sivp/files/patch-sci_gateway__c__detectforeground.c | 11 | ||||
-rw-r--r-- | math/scilab-toolbox-sivp/pkg-plist | 17 |
6 files changed, 81 insertions, 50 deletions
diff --git a/math/scilab-toolbox-sivp/Makefile b/math/scilab-toolbox-sivp/Makefile index eca656915ba7..813f807aa102 100644 --- a/math/scilab-toolbox-sivp/Makefile +++ b/math/scilab-toolbox-sivp/Makefile @@ -6,48 +6,85 @@ # PORTNAME= sivp -DISTVERSION= 0.5.2 +DISTVERSION= 1.0.0.r286 CATEGORIES= math graphics multimedia -MASTER_SITES= SF/${PORTNAME} +MASTER_SITES= LOCAL/makc PKGNAMEPREFIX= scilab-toolbox- MAINTAINER= makc@FreeBSD.org COMMENT= Scilab Image and Video Processing Toolbox BUILD_DEPENDS= ${SCILAB_CMD}:${PORTSDIR}/math/scilab -LIB_DEPENDS= cv.2:${PORTSDIR}/graphics/opencv +LIB_DEPENDS= opencv_legacy.2:${PORTSDIR}/graphics/opencv RUN_DEPENDS= ${SCILAB_CMD}:${PORTSDIR}/math/scilab -USE_ZIP= yes - -DEPRECATED= BROKEN for more than 6 month -EXPIRATION_DATE= 2012-05-10 - -BROKEN= doesn't not compile with opencv-2.3 +USE_XZ= yes SCILAB_CMD= ${LOCALBASE}/bin/scilab CONTRIBDIR?= share/scilab/contrib TOOLBOXDIR_REL?= ${CONTRIBDIR}/${PORTNAME} TOOLBOXDIR= ${PREFIX}/${TOOLBOXDIR_REL} PLIST_SUB= TOOLBOXDIR=${TOOLBOXDIR_REL} +TOOLBOX_SUBDIRS= demos etc images macros + +OPTIONS= HELP "Build help files (requires scilab with gui support)" on + +.include <bsd.port.options.mk> + +.if defined(WITHOUT_HELP) +SCILAB_ARGS= -nogui +PLIST_SUB+= HELP="@comment " +EXTRA_PATCHES+= ${FILESDIR}/extrapatch-etc__SIVP.start +.else +USE_DISPLAY= yes +MAKE_ENV= LC_ALL="C" +PLIST_SUB+= HELP="" +TOOLBOX_SUBDIRS+= jar +.endif pre-everything:: @${ECHO_CMD} @${ECHO_CMD} "If you want video support, OpenCV should be compiled with ffmpeg!" @${ECHO_CMD} +post-patch: +.if defined(WITHOUT_HELP) + ${REINPLACE_CMD} -e '/tbx_builder_help/d' ${WRKSRC}/builder.sce +.endif + ${ECHO_CMD} quit >> ${WRKSRC}/builder.sce + +pre-build: + ${FIND} -d ${WRKSRC} \( -name '*.orig' -or -name '*.bak' \) -delete +.if !defined(WITHOUT_HELP) && !defined(DISPLAY) + @if [ -f ${WRKDIR}/.Xvfb.pid ]; then \ + ${CAT} ${WRKDIR}/.Xvfb.pid | ${XARGS} kill || ${TRUE} ; \ + ${RM} -f ${WRKDIR}/.Xvfb.pid ; \ + fi + ${LOCALBASE}/bin/Xvfb :1001 -screen 0 800x600x24 -fp ${LOCALBASE}/lib/X11/fonts/misc > /dev/null 2>&1 & ${ECHO} $$! > ${WRKDIR}/.Xvfb.pid + @sleep 5 +.endif + do-build: - cd ${WRKSRC} && ${SCILAB_CMD} -nogui -f builder.sce + cd ${WRKSRC} && \ + ${SETENV} ${MAKE_ENV} ${SCILAB_CMD} ${SCILAB_ARGS} -f builder.sce + +post-build: +.if !defined(WITHOUT_HELP) && !defined(DISPLAY) + @if [ -f ${WRKDIR}/.Xvfb.pid ]; then \ + ${CAT} ${WRKDIR}/.Xvfb.pid | ${XARGS} kill || ${TRUE} ; \ + ${RM} -f ${WRKDIR}/.Xvfb.pid ; \ + fi +.endif do-install: - ${MKDIR} ${TOOLBOXDIR}/sci_gateway/c + ${MKDIR} ${TOOLBOXDIR}/sci_gateway/cpp ${INSTALL_DATA} ${WRKSRC}/loader.sce ${TOOLBOXDIR} ${INSTALL_DATA} ${WRKSRC}/sci_gateway/loader_gateway.sce \ ${TOOLBOXDIR}/sci_gateway - cd ${WRKSRC}/sci_gateway/c && \ - ${INSTALL_DATA} loader.sce ${TOOLBOXDIR}/sci_gateway/c && \ - ${INSTALL_PROGRAM} libsivp.so ${TOOLBOXDIR}/sci_gateway/c -.for d in demos etc images jar macros + cd ${WRKSRC}/sci_gateway/cpp && \ + ${INSTALL_DATA} loader.sce ${TOOLBOXDIR}/sci_gateway/cpp && \ + ${INSTALL_PROGRAM} libgw_sivp.so ${TOOLBOXDIR}/sci_gateway/cpp +.for d in ${TOOLBOX_SUBDIRS} cd ${WRKSRC} && ${COPYTREE_SHARE} ${d} ${TOOLBOXDIR} .endfor diff --git a/math/scilab-toolbox-sivp/distinfo b/math/scilab-toolbox-sivp/distinfo index 00eda8626a4a..a214d5e718ab 100644 --- a/math/scilab-toolbox-sivp/distinfo +++ b/math/scilab-toolbox-sivp/distinfo @@ -1,2 +1,2 @@ -SHA256 (sivp-0.5.2.zip) = cf3106d42861d54e434806840170f370cfbc3e023602d095c20032c3de8957a4 -SIZE (sivp-0.5.2.zip) = 5769590 +SHA256 (sivp-1.0.0.r286.tar.xz) = 241eb610e9f3dea4597af9bcaf0627613fb97e61e699e0be87ad2d7cb4dbdb03 +SIZE (sivp-1.0.0.r286.tar.xz) = 3720116 diff --git a/math/scilab-toolbox-sivp/files/extrapatch-etc__SIVP.start b/math/scilab-toolbox-sivp/files/extrapatch-etc__SIVP.start new file mode 100644 index 000000000000..b0dd7f387420 --- /dev/null +++ b/math/scilab-toolbox-sivp/files/extrapatch-etc__SIVP.start @@ -0,0 +1,16 @@ +--- ./etc/SIVP.start.orig 2012-02-28 11:35:59.000000000 +0000 ++++ ./etc/SIVP.start 2012-04-25 15:51:27.604824817 +0000 +@@ -107,13 +107,6 @@ +
+ // Load and add help chapter
+ // =============================================================================
+- if or(getscilabmode() == ["NW";"STD"]) then
+- mprintf("\tLoad help\n");
+- path_addchapter = pathconvert(root_tlbx+"/jar");
+- if ( isdir(path_addchapter) <> [] ) then
+- add_help_chapter(TOOLBOX_TITLE, path_addchapter, %F);
+- end
+- end
+
+ // Load demos
+ // =============================================================================
diff --git a/math/scilab-toolbox-sivp/files/patch-builder.sce b/math/scilab-toolbox-sivp/files/patch-builder.sce deleted file mode 100644 index 7685e3fba925..000000000000 --- a/math/scilab-toolbox-sivp/files/patch-builder.sce +++ /dev/null @@ -1,16 +0,0 @@ ---- ./builder.sce.orig 2010-01-31 15:21:14.000000000 +0300 -+++ ./builder.sce 2010-07-10 19:24:17.021776380 +0400 -@@ -33,7 +33,6 @@ - tbx_builder_macros(toolbox_dir);
- //tbx_builder_src(toolbox_dir);
- tbx_builder_gateway(toolbox_dir);
--tbx_builder_help(toolbox_dir);
- tbx_build_loader(TOOLBOX_NAME, toolbox_dir);
- tbx_build_cleaner(TOOLBOX_NAME, toolbox_dir);
-
-@@ -41,3 +40,5 @@ - // =============================================================================
-
- clear toolbox_dir TOOLBOX_NAME TOOLBOX_TITLE;
-+
-+quit
diff --git a/math/scilab-toolbox-sivp/files/patch-sci_gateway__c__detectforeground.c b/math/scilab-toolbox-sivp/files/patch-sci_gateway__c__detectforeground.c deleted file mode 100644 index da5423de525b..000000000000 --- a/math/scilab-toolbox-sivp/files/patch-sci_gateway__c__detectforeground.c +++ /dev/null @@ -1,11 +0,0 @@ ---- ./sci_gateway/c/detectforeground.c.orig 2010-01-31 15:21:14.000000000 +0300 -+++ ./sci_gateway/c/detectforeground.c 2010-12-19 12:25:28.752039065 +0300 -@@ -93,7 +93,7 @@ - //foreground detection - else - { -- cvUpdateBGStatModel(pSrcImg, bg_model); -+ cvUpdateBGStatModel(pSrcImg, bg_model, -1); - - IplImg2Mat(bg_model->foreground, Rhs+1); - } diff --git a/math/scilab-toolbox-sivp/pkg-plist b/math/scilab-toolbox-sivp/pkg-plist index 7fd0622fc876..4d21d29f8ec8 100644 --- a/math/scilab-toolbox-sivp/pkg-plist +++ b/math/scilab-toolbox-sivp/pkg-plist @@ -8,6 +8,7 @@ %%TOOLBOXDIR%%/demos/noise.sce %%TOOLBOXDIR%%/demos/sivp.dem.gateway.sce %%TOOLBOXDIR%%/demos/video.sce +%%TOOLBOXDIR%%/etc/SIVP.quit %%TOOLBOXDIR%%/etc/SIVP.start %%TOOLBOXDIR%%/etc/haarcascade_frontalface_alt2.xml %%TOOLBOXDIR%%/etc/lefteye.xml @@ -17,10 +18,13 @@ %%TOOLBOXDIR%%/images/people.jpg %%TOOLBOXDIR%%/images/peppers.png %%TOOLBOXDIR%%/images/red-car-video.avi +%%TOOLBOXDIR%%/images/red-car-video.mpg %%TOOLBOXDIR%%/images/video.avi -%%TOOLBOXDIR%%/jar/scilab_en_US_help.jar +%%TOOLBOXDIR%%/images/video.mpg +%%HELP%%%%TOOLBOXDIR%%/jar/scilab_en_US_help.jar %%TOOLBOXDIR%%/loader.sce %%TOOLBOXDIR%%/macros/buildmacros.sce +%%TOOLBOXDIR%%/macros/cleanmacros.sce %%TOOLBOXDIR%%/macros/corr2.bin %%TOOLBOXDIR%%/macros/corr2.sci %%TOOLBOXDIR%%/macros/detectfaces.bin @@ -33,6 +37,8 @@ %%TOOLBOXDIR%%/macros/edge.sci %%TOOLBOXDIR%%/macros/fspecial.bin %%TOOLBOXDIR%%/macros/fspecial.sci +%%TOOLBOXDIR%%/macros/getSIVPpath.bin +%%TOOLBOXDIR%%/macros/getSIVPpath.sci %%TOOLBOXDIR%%/macros/hsv2rgb.bin %%TOOLBOXDIR%%/macros/hsv2rgb.sci %%TOOLBOXDIR%%/macros/im2bw.bin @@ -71,7 +77,6 @@ %%TOOLBOXDIR%%/macros/imresize.sci %%TOOLBOXDIR%%/macros/imshow.bin %%TOOLBOXDIR%%/macros/imshow.sci -%%TOOLBOXDIR%%/macros/imshow.tcl %%TOOLBOXDIR%%/macros/imsubtract.bin %%TOOLBOXDIR%%/macros/imsubtract.sci %%TOOLBOXDIR%%/macros/imwrite.bin @@ -104,13 +109,13 @@ %%TOOLBOXDIR%%/macros/xs2im.sci %%TOOLBOXDIR%%/macros/ycbcr2rgb.bin %%TOOLBOXDIR%%/macros/ycbcr2rgb.sci -%%TOOLBOXDIR%%/sci_gateway/c/libsivp.so -%%TOOLBOXDIR%%/sci_gateway/c/loader.sce +%%TOOLBOXDIR%%/sci_gateway/cpp/libgw_sivp.so +%%TOOLBOXDIR%%/sci_gateway/cpp/loader.sce %%TOOLBOXDIR%%/sci_gateway/loader_gateway.sce -@dirrm %%TOOLBOXDIR%%/sci_gateway/c +@dirrm %%TOOLBOXDIR%%/sci_gateway/cpp @dirrm %%TOOLBOXDIR%%/sci_gateway @dirrm %%TOOLBOXDIR%%/macros -@dirrm %%TOOLBOXDIR%%/jar +%%HELP%%@dirrm %%TOOLBOXDIR%%/jar @dirrm %%TOOLBOXDIR%%/images @dirrm %%TOOLBOXDIR%%/etc @dirrm %%TOOLBOXDIR%%/demos |