# HG changeset patch
# User John Donoghue
# Date 1452113972 18000
# Node ID 03ed5810b068a9eb7b8ec880bc60eac7c68b9f5c
# Parent cdd86fbae296a50ae38feecaad8d0c19899a7d28
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
diff -r cdd86fbae296 -r 03ed5810b068 Makefile.in
--- 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)))
diff -r cdd86fbae296 -r 03ed5810b068 index.html
--- 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 @@
Octave Forge struct package |
+ of-video |
+ Octave Forge video package |
+
+
of-zenity |
Octave Forge zenity package |
diff -r cdd86fbae296 -r 03ed5810b068 src/of-video-1-fixes.patch
--- /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);
+
diff -r cdd86fbae296 -r 03ed5810b068 src/of-video.mk
--- /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