changeset 4073:03ed5810b068

of-video: add video package * src/of-video.mk: new file * src/of-video-1-fixes.patch: new file * Makefile.in: add of-video to forge packages * index.html: add of-video package
author John Donoghue
date Wed, 06 Jan 2016 15:59:32 -0500
parents cdd86fbae296
children 44b303c931fb
files Makefile.in index.html src/of-video-1-fixes.patch src/of-video.mk
diffstat 4 files changed, 63 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.in	Tue Jan 05 16:26:53 2016 -0500
+++ b/Makefile.in	Wed Jan 06 15:59:32 2016 -0500
@@ -430,7 +430,7 @@
 endif
 
 OCTAVE_FORGE_BASE_URL := 'http://sourceforge.net/projects/octave/files/Octave Forge Packages/Individual Package Releases'
-OCTAVE_FORGE_PACKAGES := $(addprefix of-,miscellaneous struct optim specfun general signal communications image io statistics control geometry windows linear-algebra sockets zenity data-smoothing fuzzy-logic-toolkit quaternion fits fl-core tsa dicom netcdf ltfat database instrument-control generate_html nurbs strings octcdf financial stk splines dataframe lssa queueing ga odepkg interval nan ocs mapping tisean sparsersb)
+OCTAVE_FORGE_PACKAGES := $(addprefix of-,miscellaneous struct optim specfun general signal communications image io statistics control geometry windows linear-algebra sockets zenity data-smoothing fuzzy-logic-toolkit quaternion fits fl-core tsa dicom netcdf ltfat database instrument-control generate_html nurbs strings octcdf financial stk splines dataframe lssa queueing ga odepkg interval nan ocs mapping tisean sparsersb video)
 # get ALL deps for all of- packages, regardless of whethe building the actual forge package in the installer
 OCTAVE_FORGE_DEPS:= $(sort $(foreach p,$(wildcard $(TOP_DIR)/src/of-*.mk),$(shell $(SED) -n 's/.*_DEPS.*:=\(.*\)/\1/p' $p)))
 
--- a/index.html	Tue Jan 05 16:26:53 2016 -0500
+++ b/index.html	Wed Jan 06 15:59:32 2016 -0500
@@ -2030,6 +2030,10 @@
         <td class="website"><a href="http://octave.sf.net/">Octave Forge struct package</a></td>
     </tr>
     <tr>
+        <td class="package">of-video</td>
+        <td class="website"><a href="http://octave.sf.net/">Octave Forge video package</a></td>
+    </tr>
+    <tr>
         <td class="package">of-zenity</td>
         <td class="website"><a href="http://octave.sf.net/">Octave Forge zenity package</a></td>
     </tr>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/of-video-1-fixes.patch	Wed Jan 06 15:59:32 2016 -0500
@@ -0,0 +1,29 @@
+diff -ur video-1.2.1.orig/src/oct-avifile.cc video-1.2.1/src/oct-avifile.cc
+--- video-1.2.1.orig/src/oct-avifile.cc	2016-01-06 12:44:20.588188244 -0500
++++ video-1.2.1/src/oct-avifile.cc	2016-01-06 12:59:04.321779847 -0500
+@@ -57,6 +57,14 @@
+ }
+ 
+ void
++Avifile::print(std::ostream& os, bool pr_as_read_syntax)
++{
++  os << "AVI movie [" << filename << "][" << av->get_codec() << "]: "
++     << frames << " frame" << (frames != 1 ? "s" : "") << ", "
++     << frame_rows << "x" << frame_columns << "\n";
++}
++
++void
+ Avifile::addframe(const NDArray &f)
+ {
+   if (frames == 0)
+diff -ur video-1.2.1.orig/src/oct-avifile.h video-1.2.1/src/oct-avifile.h
+--- video-1.2.1.orig/src/oct-avifile.h	2016-01-06 12:44:20.588188244 -0500
++++ video-1.2.1/src/oct-avifile.h	2016-01-06 12:58:15.673572910 -0500
+@@ -52,6 +52,7 @@
+   ~Avifile(void);
+ 
+   void print(std::ostream& os, bool pr_as_read_syntax) const;
++  void print(std::ostream& os, bool pr_as_read_syntax=false);
+ 
+   void addframe(const NDArray &f);
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/of-video.mk	Wed Jan 06 15:59:32 2016 -0500
@@ -0,0 +1,29 @@
+# This file is part of MXE.
+# See index.html for further information.
+
+PKG             := of-video
+$(PKG)_IGNORE   :=
+$(PKG)_VERSION  := 1.2.1
+$(PKG)_CHECKSUM := dbefd278e272fcd9a79d2edc4b00df37735b103a
+$(PKG)_REMOTE_SUBDIR := 
+$(PKG)_SUBDIR   := video-$($(PKG)_VERSION)
+$(PKG)_FILE     := $($(PKG)_SUBDIR).tar.gz
+$(PKG)_URL      := '$(OCTAVE_FORGE_BASE_URL)/$($(PKG)_FILE)/download'
+$(PKG)_DEPS     := ffmpeg
+
+
+ifeq ($(MXE_SYSTEM),mingw)
+$(PKG)_OPTIONS := ac_cv_func_realloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes
+else
+$(PKG)_OPTIONS := 
+endif
+
+define $(PKG)_UPDATE
+    $(WGET) -q -O- 'http://$(SOURCEFORGE_MIRROR)/projects/octave/files/Octave%20Forge%20Packages/Individual%20Package%20Releases/' | \
+    $(SED) -n 's,.*title="video-\([0-9][^"]*\).tar.gz".*,\1,p' | \
+    head -1
+endef
+
+define $(PKG)_BUILD
+    $(call OCTAVE_FORGE_PKG_BUILD,$(1),$(2),$(3),$($(PKG)_OPTIONS))
+endef